summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Aylett <james@tartarus.org>2001-01-17 11:22:16 +0000
committerJames Aylett <james@tartarus.org>2001-01-17 11:22:16 +0000
commit670ef52114f7b705ee99765d3f0e9d47d4674b20 (patch)
tree99cc2a64abf1332d3568cafda3b2ad3d127ec012
parent7523066020f64b1dbf140e2632fefff2ab9c93e0 (diff)
downloadhalibut-670ef52114f7b705ee99765d3f0e9d47d4674b20.zip
halibut-670ef52114f7b705ee99765d3f0e9d47d4674b20.tar.gz
halibut-670ef52114f7b705ee99765d3f0e9d47d4674b20.tar.bz2
halibut-670ef52114f7b705ee99765d3f0e9d47d4674b20.tar.xz
* Now malloc()ing even built-in filenames, so we can free them all
without worry (oops) [originally from svn r866]
-rw-r--r--bk_xhtml.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bk_xhtml.c b/bk_xhtml.c
index b5bfbf1..dd1c834 100644
--- a/bk_xhtml.c
+++ b/bk_xhtml.c
@@ -254,9 +254,13 @@ static xhtmlfile *xhtml_new_file(xhtmlsection *sect)
ret->is_leaf=(sect!=NULL && sect->level==conf.leaf_level);
if (sect==NULL) {
if (conf.leaf_level==0) { /* currently unused */
- ret->filename = "Manual.html";
+#define FILENAME_MANUAL "Manual.html"
+#define FILENAME_CONTENTS "Contents.html"
+ ret->filename = smalloc(strlen(FILENAME_MANUAL)+1);
+ sprintf(ret->filename, FILENAME_MANUAL);
} else {
- ret->filename = "Contents.html";
+ ret->filename = smalloc(strlen(FILENAME_CONTENTS)+1);
+ sprintf(ret->filename, FILENAME_CONTENTS);
}
} else {
paragraph *p = sect->para;