aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-01-26 18:42:30 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-01-26 18:42:30 +0000
commitb0aec68c2e236344e79a7ee4949b2e5c450d13f8 (patch)
treec443152b9cc28944522ddf2bc3103f1346ef178d /read.c
parente4a7a2efc2737e64ac0cf42b148f06566718c1d7 (diff)
downloadmandoc-b0aec68c2e236344e79a7ee4949b2e5c450d13f8.tar.gz
mandoc-b0aec68c2e236344e79a7ee4949b2e5c450d13f8.tar.zst
mandoc-b0aec68c2e236344e79a7ee4949b2e5c450d13f8.zip
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 'read.c')
-rw-r--r--read.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/read.c b/read.c
index 5f381584..7d36778e 100644
--- a/read.c
+++ b/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.117 2015/01/26 13:03:48 schwarze Exp $ */
+/* $Id: read.c,v 1.118 2015/01/26 18:42:30 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -171,6 +171,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 */
@@ -184,7 +189,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",
@@ -222,7 +229,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",
};