X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/0f6bec83b1f6ac0fb3b959ec3b05d8b98c4f5444..refs/heads/master:/bk_info.c diff --git a/bk_info.c b/bk_info.c index faf691c..69cd1e2 100644 --- a/bk_info.c +++ b/bk_info.c @@ -1,5 +1,12 @@ /* - * info backend for Halibut + * Info backend for Halibut + * + * The Info file format isn't well-specified, and what specification + * there is is scattered all over the place. Sources include: + * (info), from GNU Texinfo. + * (texinfo), also from GNU Texinfo. + * (Emacs)Misc Help, and (emacs)Info Lookup, from GNU Emacs. + * info.el, from GNU Emacs. * * Possible future work: * @@ -35,6 +42,12 @@ * make things slightly less ugly by using the lower-case version * when the user asks for \k. Unfortunately, standalone Info seems * to match node names case-sensitively, so we can't downcase that. + * + * - The character encoding used in an Info file can be configured using + * an Emacs local variables block at the end, like this: + * Local Variables: + * coding: iso-8859-1 + * End: */ #include @@ -389,7 +402,7 @@ void info_backend(paragraph *sourceform, keywordlist *keywords, kw = *longname ? uadv(longname) : L""; if (!*longname) { - error(err_cfginsufarg, &p->fpos, p->origkeyword, 3); + err_cfginsufarg(&p->fpos, p->origkeyword, 3); continue; } @@ -678,7 +691,7 @@ void info_backend(paragraph *sourceform, keywordlist *keywords, */ fp = fopen(conf.filename, "w"); if (!fp) { - error(err_cantopenw, conf.filename); + err_cantopenw(conf.filename); return; } fputs(intro_text.output.text, fp); @@ -722,7 +735,7 @@ void info_backend(paragraph *sourceform, keywordlist *keywords, sprintf(fname, "%s-%d", conf.filename, filenum); fp = fopen(fname, "w"); if (!fp) { - error(err_cantopenw, fname); + err_cantopenw(fname); return; } sfree(fname); @@ -1135,7 +1148,7 @@ static char *info_node_name_core(info_data *id, filepos *fpos) p = q = id->output.text; while (*p) { if (*p == ':' || *p == ',' || *p == '(' || *p == ')') { - error(err_infonodechar, fpos, *p); + err_infonodechar(fpos, *p); } else { *q++ = *p; }