summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/tree.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/tree.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/tree.c')
-rw-r--r--usr.bin/mandoc/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/tree.c b/usr.bin/mandoc/tree.c
index a2e857c22a1..9f4df836a0c 100644
--- a/usr.bin/mandoc/tree.c
+++ b/usr.bin/mandoc/tree.c
@@ -1,4 +1,4 @@
-/* $Id: tree.c,v 1.6 2009/12/22 23:58:00 schwarze Exp $ */
+/* $Id: tree.c,v 1.7 2010/05/23 22:45:01 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -19,6 +19,7 @@
#include <stdlib.h>
#include <time.h>
+#include "mandoc.h"
#include "mdoc.h"
#include "man.h"
#include "main.h"