diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-01-26 00:54:10 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-01-26 00:54:10 +0000 |
commit | c93c28ddbd10b595b059b57e708baf92fe431c33 (patch) | |
tree | 9dfb9acc1679ed7fe7a6719a72d2c384083c9331 /usr.bin/mandoc/read.c | |
parent | 4049f099bfc99d5a5f50530f43a44d9b12584b2d (diff) |
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 'usr.bin/mandoc/read.c')
-rw-r--r-- | usr.bin/mandoc/read.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/mandoc/read.c b/usr.bin/mandoc/read.c index 7f8c4c62b0a..f2b4d96d28d 100644 --- a/usr.bin/mandoc/read.c +++ b/usr.bin/mandoc/read.c @@ -1,4 +1,4 @@ -/* $OpenBSD: read.c,v 1.90 2015/01/24 01:59:40 schwarze Exp $ */ +/* $OpenBSD: read.c,v 1.91 2015/01/26 00:54:09 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -175,6 +175,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", @@ -213,8 +217,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", }; |