diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-26 00:57:22 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-26 00:57:22 +0000 |
commit | 445b12f7ab17bc0449361eeb2f956d5a1a9bcdd6 (patch) | |
tree | addd569e7b40f08deeb3e88a3ad2f5c06621ede5 /read.c | |
parent | 552620095793cb4451871506a6b9373d2677acd9 (diff) | |
download | mandoc-445b12f7ab17bc0449361eeb2f956d5a1a9bcdd6.tar.gz mandoc-445b12f7ab17bc0449361eeb2f956d5a1a9bcdd6.tar.zst mandoc-445b12f7ab17bc0449361eeb2f956d5a1a9bcdd6.zip |
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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.115 2015/01/24 01:58:33 schwarze Exp $ */ +/* $Id: read.c,v 1.116 2015/01/26 00:57:22 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -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", }; |