summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-01-26 00:57:22 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-01-26 00:57:22 +0000
commit40e6bb12623d39d53c3ab3ebf4ea56e96a873c33 (patch)
tree26ababa4ce4eb18c889d833708d191750f52e207 /read.c
parent3c01eadf2c2162ef71538063e43d2f0e31dfff0a (diff)
downloadmandoc-40e6bb12623d39d53c3ab3ebf4ea56e96a873c33.tar.gz
Improve (or rather, rewrite) tbl(7) option parsing.
* Allow the layout to start after the semicolon on the options line. * Ignore leading commas. * Option arguments cannot contain closing parentheses. * Avoid needless UNSUPP messages. * Better ERROR reporting. * Delete unused "linesize" field in struct tbl_opts. * No need for static buffers. * Garbage collect one almost empty wrapper function. Improved functionality, but minus 40 lines of code.
Diffstat (limited to 'read.c')
-rw-r--r--read.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/read.c b/read.c
index a998e761..2217368a 100644
--- a/read.c
+++ b/read.c
@@ -180,6 +180,10 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"unexpected end of equation",
/* related to tables */
+ "non-alphabetic character in tbl options",
+ "skipping unknown tbl option",
+ "missing tbl option argument",
+ "wrong tbl option argument size",
"no table layout cells specified",
"no table data cells specified",
"ignore data in cell",
@@ -218,8 +222,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"input too large",
"unsupported control character",
"unsupported roff request",
- "unsupported table syntax",
- "unsupported table option",
"unsupported table layout",
"ignoring macro in table",
};