X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/f15300499bce37cd28ea2ace0f2bd1c364fc835e..176f95481102941f215f5b36a17e8b43f6bd513e:/bk_info.c?ds=sidebyside diff --git a/bk_info.c b/bk_info.c index 03f8926..85461c4 100644 --- a/bk_info.c +++ b/bk_info.c @@ -134,9 +134,7 @@ static infoconfig info_configure(paragraph *source) { sfree(ret.filename); ret.filename = dupstr(adv(p->origkeyword)); } else if (!ustricmp(p->keyword, L"info-charset")) { - char *csname = utoa_dup(uadv(p->keyword), CS_ASCII); - ret.charset = charset_from_localenc(csname); - sfree(csname); + ret.charset = charset_from_ustr(&p->fpos, uadv(p->keyword)); } else if (!ustricmp(p->keyword, L"info-max-file-size")) { ret.maxfilesize = utoi(uadv(p->keyword)); } else if (!ustricmp(p->keyword, L"info-width")) { @@ -269,6 +267,9 @@ void info_backend(paragraph *sourceform, keywordlist *keywords, currnode = newnode; } break; + default: + p->private_data = NULL; + break; } /* @@ -315,12 +316,12 @@ void info_backend(paragraph *sourceform, keywordlist *keywords, char *s; section = uadv(p->keyword); - shortname = *section ? uadv(section) : NULL; - longname = *shortname ? uadv(shortname) : NULL; - kw = *longname ? uadv(longname) : NULL; + shortname = *section ? uadv(section) : L""; + longname = *shortname ? uadv(shortname) : L""; + kw = *longname ? uadv(longname) : L""; if (!*longname) { - error(err_infodirentry, &p->fpos); + error(err_cfginsufarg, &p->fpos, p->origkeyword, 3); continue; } @@ -708,7 +709,7 @@ static word *info_transform_wordlist(word *words, keywordlist *keywords) * In Info, we do nothing special for xrefs to * numbered list items or bibliography entries. */ - break; + continue; } else { /* * An xref to a different section has its text