X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/4334192268c4b1c0c27a91d043792a21bd8d1292..5b1d0032b0eb6f4a347c0c2cfdbe6e4bb4f959ab:/bk_xhtml.c?ds=sidebyside
diff --git a/bk_xhtml.c b/bk_xhtml.c
index 439f9f9..4d5069a 100644
--- a/bk_xhtml.c
+++ b/bk_xhtml.c
@@ -192,19 +192,19 @@ static xhtmlconfig xhtml_configure(paragraph *source)
{
if (!ustricmp(source->keyword, L"xhtml-contents-filename")) {
sfree(ret.contents_filename);
- ret.contents_filename = utoa_dup(uadv(source->keyword));
+ ret.contents_filename = dupstr(adv(source->origkeyword));
} else if (!ustricmp(source->keyword, L"xhtml-single-filename")) {
sfree(ret.single_filename);
- ret.single_filename = utoa_dup(uadv(source->keyword));
+ ret.single_filename = dupstr(adv(source->origkeyword));
} else if (!ustricmp(source->keyword, L"xhtml-index-filename")) {
sfree(ret.index_filename);
- ret.index_filename = utoa_dup(uadv(source->keyword));
+ ret.index_filename = dupstr(adv(source->origkeyword));
} else if (!ustricmp(source->keyword, L"xhtml-template-filename")) {
sfree(ret.template_filename);
- ret.template_filename = utoa_dup(uadv(source->keyword));
+ ret.template_filename = dupstr(adv(source->origkeyword));
} else if (!ustricmp(source->keyword, L"xhtml-template-fragment")) {
sfree(ret.template_fragment);
- ret.template_fragment = utoa_dup(uadv(source->keyword));
+ ret.template_fragment = utoa_dup(uadv(source->keyword), CS_ASCII);
} else if (!ustricmp(source->keyword, L"xhtml-contents-depth-0")) {
ret.contents_depth[0] = utoi(uadv(source->keyword));
} else if (!ustricmp(source->keyword, L"xhtml-contents-depth-1")) {
@@ -304,45 +304,12 @@ paragraph *xhtml_config_filename(char *filename)
* \cfg{xhtml-leaf-level}{0}; the rationale being that the user
* wants their output _in that file_.
*/
+ paragraph *p, *q;
- paragraph *p[2];
- int i, len;
- wchar_t *ufilename, *up;
-
- for (i = 0; i < 2; i++) {
- p[i] = mknew(paragraph);
- memset(p[i], 0, sizeof(*p[i]));
- p[i]->type = para_Config;
- p[i]->next = NULL;
- p[i]->fpos.filename = "
");
if (removeattr(text->type) == word_Normal) {
- if (xhtml_convert(text->text, 0, &c, TRUE)) /* spaces in the word are hard */
+ if (xhtml_convert(text->text, 0, &c, TRUE) || !text->alt)
+ /* spaces in the word are hard */
rdaddsc(rs, c);
else
xhtml_rdaddwc(rs, text->alt, NULL, indexable);