Enhance the text backend to support configurable quote characters,
[sgt/halibut] / error.c
diff --git a/error.c b/error.c
index 42eea37..0e90f0c 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;
@@ -221,6 +222,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);