X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/d7482997dd1ca71b70df43c15dd5956f435a1a7e..05e9c3c2e7be6c54e31121132f43db83597381e8:/biblio.c diff --git a/biblio.c b/biblio.c index de0b925..f4c5413 100644 --- a/biblio.c +++ b/biblio.c @@ -7,7 +7,7 @@ static wchar_t *gentext(int num) { wchar_t text[22]; - wchar_t *p = text + sizeof(text); + wchar_t *p = text + lenof(text); *--p = L'\0'; *--p = L']'; while (num != 0) { @@ -23,7 +23,7 @@ static wchar_t *gentext(int num) { static void cite_biblio(keywordlist *kl, wchar_t *key, filepos fpos) { keyword *kw = kw_lookup(kl, key); if (!kw) - error(err_nosuchkw, &fpos, key); + err_nosuchkw(&fpos, key); else { /* * We've found a \k reference. If it's a @@ -57,9 +57,9 @@ void gen_citations(paragraph *source, keywordlist *kl) { if (para->type == para_BR) { keyword *kw = kw_lookup(kl, para->keyword); if (!kw) { - error(err_nosuchkw, ¶->fpos, para->keyword); + err_nosuchkw(¶->fpos, para->keyword); } else if (kw->text) { - error(err_multiBR, ¶->fpos, para->keyword); + err_multiBR(¶->fpos, para->keyword); } else { kw->text = dup_word_list(para->words); }