Er, don't forget to document the disallowing of \q within \c. Ahem.
[sgt/halibut] / error.c
diff --git a/error.c b/error.c
index 42eea37..350e71a 100644 (file)
--- a/error.c
+++ b/error.c
@@ -16,6 +16,7 @@
 static void do_error(int code, va_list ap) {
     char error[1024];
     char c;
+    int i, j;
     char *sp, *sp2;
     wchar_t *wsp;
     filepos fpos, fpos2;
@@ -116,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");
@@ -221,6 +227,14 @@ static void do_error(int code, va_list ap) {
                " node names; removing", c);
        flags = FILEPOS;
        break;
+      case err_text_codeline:
+       fpos = *va_arg(ap, filepos *);
+       i = va_arg(ap, int);
+       j = va_arg(ap, int);
+       sprintf(error, "warning: code paragraph line is %d chars wide, wider"
+               " than body width %d", i, j);
+       flags = FILEPOS;
+       break;
       case err_whatever:
        sp = va_arg(ap, char *);
         vsprintf(error, sp, ap);