summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_hash.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/mdoc_hash.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/mdoc_hash.c')
-rw-r--r--usr.bin/mandoc/mdoc_hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_hash.c b/usr.bin/mandoc/mdoc_hash.c
index 313c74182bd..99163d8195b 100644
--- a/usr.bin/mandoc/mdoc_hash.c
+++ b/usr.bin/mandoc/mdoc_hash.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_hash.c,v 1.9 2010/05/14 01:54:37 schwarze Exp $ */
+/* $Id: mdoc_hash.c,v 1.10 2010/05/23 22:45:00 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <string.h>
+#include "mandoc.h"
#include "libmdoc.h"
static u_char table[27 * 13];