X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/db662ca1b30d08ecf779c42f8c642c2694966279..b9b5ae9cd316d85a2aac4132e19ea54795b712e8:/error.c diff --git a/error.c b/error.c index 0e90f0c..7b9ceaa 100644 --- a/error.c +++ b/error.c @@ -18,7 +18,7 @@ static void do_error(int code, va_list ap) { char c; int i, j; char *sp, *sp2; - wchar_t *wsp; + wchar_t *wsp, *wsp2; filepos fpos, fpos2; int flags; @@ -117,6 +117,11 @@ static void do_error(int code, va_list ap) { sprintf(error, "expected `}' after cross-reference"); flags = FILEPOS; break; + case err_codequote: + fpos = *va_arg(ap, filepos *); + sprintf(error, "unable to nest \\q{...} within \\c{...} or \\cw{...}"); + flags = FILEPOS; + break; case err_missingrbrace: fpos = *va_arg(ap, filepos *); sprintf(error, "unclosed braces at end of paragraph"); @@ -137,6 +142,20 @@ static void do_error(int code, va_list ap) { sprintf(error, "unable to nest index markings"); flags = FILEPOS; break; + case err_indexcase: + fpos = *va_arg(ap, filepos *); + wsp = va_arg(ap, wchar_t *); + sp = utoa_locale_dup(wsp); + fpos2 = *va_arg(ap, filepos *); + wsp2 = va_arg(ap, wchar_t *); + sp2 = utoa_locale_dup(wsp2); + sprintf(error, "warning: index tag `%.200s' used with ", sp); + sprintf(error + strlen(error), "different case (`%.200s') at %s:%d", + sp2, fpos2.filename, fpos2.line); + flags = FILEPOS; + sfree(sp); + sfree(sp2); + break; case err_nosuchkw: fpos = *va_arg(ap, filepos *); wsp = va_arg(ap, wchar_t *); @@ -230,6 +249,22 @@ static void do_error(int code, va_list ap) { " than body width %d", i, j); flags = FILEPOS; break; + case err_htmlver: + fpos = *va_arg(ap, filepos *); + wsp = va_arg(ap, wchar_t *); + sp = utoa_locale_dup(wsp); + sprintf(error, "unrecognised HTML version keyword `%.200s'", sp); + sfree(sp); + flags = FILEPOS; + break; + case err_charset: + fpos = *va_arg(ap, filepos *); + wsp = va_arg(ap, wchar_t *); + sp = utoa_locale_dup(wsp); + sprintf(error, "character set `%.200s' not recognised", sp); + flags = FILEPOS; + sfree(sp); + break; case err_whatever: sp = va_arg(ap, char *); vsprintf(error, sp, ap);