/*
- * 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:
*
* 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 <stdio.h>
kw = *longname ? uadv(longname) : L"";
if (!*longname) {
- error(err_cfginsufarg, &p->fpos, p->origkeyword, 3);
+ err_cfginsufarg(&p->fpos, p->origkeyword, 3);
continue;
}
*/
fp = fopen(conf.filename, "w");
if (!fp) {
- error(err_cantopenw, conf.filename);
+ err_cantopenw(conf.filename);
return;
}
fputs(intro_text.output.text, fp);
sprintf(fname, "%s-%d", conf.filename, filenum);
fp = fopen(fname, "w");
if (!fp) {
- error(err_cantopenw, fname);
+ err_cantopenw(fname);
return;
}
sfree(fname);
p = q = id->output.text;
while (*p) {
if (*p == ':' || *p == ',' || *p == '(' || *p == ')') {
- error(err_infonodechar, fpos, *p);
+ err_infonodechar(fpos, *p);
} else {
*q++ = *p;
}