diff options
| author | James Aylett <james@tartarus.org> | 2001-01-17 11:22:16 +0000 |
|---|---|---|
| committer | James Aylett <james@tartarus.org> | 2001-01-17 11:22:16 +0000 |
| commit | 670ef52114f7b705ee99765d3f0e9d47d4674b20 (patch) | |
| tree | 99cc2a64abf1332d3568cafda3b2ad3d127ec012 | |
| parent | 7523066020f64b1dbf140e2632fefff2ab9c93e0 (diff) | |
| download | halibut-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.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |