From 40e6bb12623d39d53c3ab3ebf4ea56e96a873c33 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 26 Jan 2015 00:57:22 +0000 Subject: 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. --- read.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'read.c') 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", }; -- cgit