Improve (or rather, rewrite) tbl(7) option parsing.
authorschwarze <schwarze@openbsd.org>
Mon, 26 Jan 2015 00:54:09 +0000 (00:54 +0000)
committerschwarze <schwarze@openbsd.org>
Mon, 26 Jan 2015 00:54:09 +0000 (00:54 +0000)
commitbdf8ed0fca3f7b8218aa0cc77004b335958dc97a
tree79cb085eea14bcd57f9c5ba5b71f4a981361ee3c
parentb3a497ed788fbc90cc3de0447cc05b01ba4d02e2
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.
regress/usr.bin/mandoc/tbl/Makefile
regress/usr.bin/mandoc/tbl/opt.in [new file with mode: 0644]
regress/usr.bin/mandoc/tbl/opt.out_ascii [new file with mode: 0644]
regress/usr.bin/mandoc/tbl/opt.out_lint [new file with mode: 0644]
usr.bin/mandoc/mandoc.h
usr.bin/mandoc/read.c
usr.bin/mandoc/tbl.c
usr.bin/mandoc/tbl_opts.c