summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-01-26 18:41:47 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-01-26 18:41:47 +0000
commitfdcd3d21832c83c6ea3965777b6a70d1d311ab3f (patch)
tree6168d393d345d69e29a9311221f3a67017d67c5f /usr.bin/mandoc/read.c
parent962371a7a40258a1f1047908d55e725532879bff (diff)
Rework tbl(7) layout parsing:
* Continue parsing even if part of the input is invalid. * Do not require whitespace between cell specifications. * Allow tabs as well as blanks between modifiers. * Mark the 'm' modifier as unsupported. * Parse and ignore the 'p' and 'v' modifiers. * Better warning and error messages. * Get rid of a static buffer. Improved functionality but minus 50 lines of code.
Diffstat (limited to 'usr.bin/mandoc/read.c')
-rw-r--r--usr.bin/mandoc/read.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c
index f38fbc62083..18e25e9e87c 100644
--- a/usr.bin/mandoc/read.c
+++ b/usr.bin/mandoc/read.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: read.c,v 1.92 2015/01/26 13:02:53 schwarze Exp $ */
+/* $OpenBSD: read.c,v 1.93 2015/01/26 18:41:45 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -166,6 +166,11 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"invalid escape sequence",
"undefined string, using \"\"",
+ /* related to tables */
+ "tbl line starts with span",
+ "tbl column starts with span",
+ "skipping vertical bar in tbl layout",
+
"generic error",
/* related to equations */
@@ -179,7 +184,9 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"skipping unknown tbl option",
"missing tbl option argument",
"wrong tbl option argument size",
- "no table layout cells specified",
+ "empty tbl layout",
+ "invalid character in tbl layout",
+ "unmatched parenthesis in tbl layout",
"no table data cells specified",
"ignore data in cell",
"data block still open",
@@ -217,7 +224,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"input too large",
"unsupported control character",
"unsupported roff request",
- "unsupported table layout",
+ "unsupported tbl layout modifier",
"ignoring macro in table",
"eqn in tbl",
};