summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/lib.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-05-23 22:45:02 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-05-23 22:45:02 +0000
commit5f11e83ec40e027d9941a83310ca46e5e32821c7 (patch)
tree443369858d56a918cd55fb337d34f528d8d4d96b /usr.bin/mandoc/lib.c
parent22bfa887a3d98fe67ad553bf37793e74ab6f8142 (diff)
Unified error and warning message system for all of mandoc,
featuring three message levels, as agreed during the mandoc hackathon: * FATAL parser failure, cannot produce any output from this input file: eventually, we hope to convert most of these to ERRORs. * ERROR, meaning mandoc cannot cope fully with the input syntax and will probably lose information or produce structurally garbled output; it will try to produce output anyway but exit non-zero at the end, which is eventually intended to make the ports infrastructure happy. * WARNING, meaning you should clean up the input file, but output is probably mostly OK, so this will not cause error-exit at the end. This commit is mostly just converting the old system to the new one; before the classification will become really reliable, we must check all messages. In particular, * set up a new central message string table in main.c * drop the old message string tables from man.c and mdoc.c * get rid of the piece-meal merr enums in libman and libmdoc * reduce number of error/warning functions from 16 to 6 (still a lot...) While here, handle a few problems more gracefully: * allow .Rv and .Ex to work without a prior .Nm * allow .An to ignore extra arguments * allow undeclared columns in .Bl -column Written by kristaps@.
Diffstat (limited to 'usr.bin/mandoc/lib.c')
-rw-r--r--usr.bin/mandoc/lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/lib.c b/usr.bin/mandoc/lib.c
index 1f9a2cc7971..eb112062094 100644
--- a/usr.bin/mandoc/lib.c
+++ b/usr.bin/mandoc/lib.c
@@ -1,4 +1,4 @@
-/* $Id: lib.c,v 1.3 2009/12/22 23:58:00 schwarze Exp $ */
+/* $Id: lib.c,v 1.4 2010/05/23 22:45:00 schwarze Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -18,6 +18,7 @@
#include <string.h>
#include <time.h>
+#include "mandoc.h"
#include "libmdoc.h"
#define LINE(x, y) \