]> git.cameronkatri.com Git - mandoc.git/commit
Provide a new function roff_req_or_macro() to parse and handle a request
authorIngo Schwarze <schwarze@openbsd.org>
Sat, 30 Apr 2022 18:51:36 +0000 (18:51 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Sat, 30 Apr 2022 18:51:36 +0000 (18:51 +0000)
commitb592e2d9ee8dd845f058dac8ae07a679a4bd10e2
tree4274441e268d6735a9caea1b2483186918ca4f8d
parent42aa282973a44f08e87cdc71db77df5ac502a1bc
Provide a new function roff_req_or_macro() to parse and handle a request
or macro, including context-dependent error handling inside tbl(7) code
and inside .ce/.rj blocks.  Use it both in the top level roff(7) parser
and inside conditional blocks.

This fixes an assertion failure triggered by ".if 1 .ce" inside tbl(7)
code, found by tb@ using afl(1).

As a side benefit for readability, only one place remains in the
code that calls the main handler functions for the various roff(7)
requests.  This patch also improves column numbers in some error
messages and various comments.
regress/roff/ce/Makefile
regress/roff/ce/break.in [new file with mode: 0644]
regress/roff/ce/break.out_ascii [new file with mode: 0644]
regress/tbl/macro/Makefile
regress/tbl/macro/nested.out_lint
regress/tbl/macro/req.in [new file with mode: 0644]
regress/tbl/macro/req.out_ascii [new file with mode: 0644]
regress/tbl/macro/req.out_lint [new file with mode: 0644]
roff.c