X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/d41ae9ad7a8594d0d90a38a81a646893e1f95fc7..26c8c119efd44804c7b27f8637c69eda63f0c189:/error.c diff --git a/error.c b/error.c index b6c2007..00d007d 100644 --- a/error.c +++ b/error.c @@ -19,6 +19,7 @@ static void do_error(int code, va_list ap) { int i, j; char *sp, *sp2; wchar_t *wsp, *wsp2; + unsigned wc; filepos fpos, fpos2, *fposp; int flags = 0; @@ -374,6 +375,14 @@ static void do_error(int code, va_list ap) { sprintf(error, "font has an invalid header"); flags = FILEPOS; break; + case err_sfntbadglyph: + fpos = *va_arg(ap, filepos *); + wc = va_arg(ap, unsigned); + sprintf(error, + "warning: character U+%04X references an non-existent glyph", + wc); + flags = FILEPOS; + break; case err_whatever: sp = va_arg(ap, char *); vsprintf(error, sp, ap); @@ -384,7 +393,7 @@ static void do_error(int code, va_list ap) { if (flags & PREFIX) fputs("halibut: ", stderr); if (flags & FILEPOS) { - fprintf(stderr, "%s:", fpos.filename); + fprintf(stderr, "%s:", fpos.filename ? fpos.filename : ""); if (fpos.line > 0) fprintf(stderr, "%d:", fpos.line); if (fpos.col > 0)