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 /mandoc.1 | |
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 'mandoc.1')
-rw-r--r-- | mandoc.1 | 49 |
1 files changed, 39 insertions, 10 deletions
@@ -1,4 +1,4 @@ -.\" $Id: mandoc.1,v 1.135 2015/01/24 01:58:33 schwarze Exp $ +.\" $Id: mandoc.1,v 1.136 2015/01/26 00:57:22 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 24 2015 $ +.Dd $Mdocdate: January 26 2015 $ .Dt MANDOC 1 .Os .Sh NAME @@ -1281,12 +1281,35 @@ keeps the code more readable. .It "unexpected end of equation" .El .Ss "Errors related to tables" +.Bl -ohang +.It Sy "non-alphabetic character in tbl options" +.Pq tbl +The table options line contains a character other than a letter, +blank, or comma where the beginning of an option name is expected. +The character is ignored. +.It Sy "skipping unknown tbl option" +.Pq tbl +The table options line contains a string of letters that does not +match any known option name. +The word is ignored. +.It Sy "missing tbl option argument" +.Pq tbl +A table option that requires an argument is not followed by an +opening parenthesis, or the opening parenthesis is immediately +followed by a closing parenthesis. +The option is ignored. +.It Sy "wrong tbl option argument size" +.Pq tbl +A table option argument contains an invalid number of characters. +Both the option and the argument are ignored. +.El +.Pp .Bl -inset -compact -.It "no table layout cells specified" -.It "no table data cells specified" -.It "ignore data in cell" -.It "data block still open" -.It "ignoring extra data cells" +.It Sy "no table layout cells specified" +.It Sy "no table data cells specified" +.It Sy "ignore data in cell" +.It Sy "data block still open" +.It Sy "ignoring extra data cells" .El .Ss "Errors related to roff, mdoc, and man code" .Bl -ohang @@ -1568,6 +1591,14 @@ cannot handle input files larger than its arbitrary size limit of 2^31 bytes (2 Gigabytes). Since useful manuals are always small, this is not a problem in practice. Parsing is aborted as soon as the condition is detected. +.It Sy "unsupported control character" +.Pq roff +An ASCII control character supported by other +.Xr roff 7 +implementations but not by +.Nm +was found in an input file. +It is replaced by a question mark. .It Sy "unsupported roff request" .Pq roff An input file contains a @@ -1576,9 +1607,7 @@ request supported by GNU troff or Heirloom troff but not by .Nm , and it is likely that this will cause information loss or considerable misformatting. -.It Sy "bad table syntax" -.It Sy "bad table option" -.It Sy "bad table layout" +.It Sy "unsupported table layout" .It Sy "ignoring macro in table" .El .Sh COMPATIBILITY |