From b592e2d9ee8dd845f058dac8ae07a679a4bd10e2 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 30 Apr 2022 18:51:36 +0000 Subject: 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/tbl/macro/req.out_lint | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 regress/tbl/macro/req.out_lint (limited to 'regress/tbl/macro/req.out_lint') diff --git a/regress/tbl/macro/req.out_lint b/regress/tbl/macro/req.out_lint new file mode 100644 index 00000000..26af8f71 --- /dev/null +++ b/regress/tbl/macro/req.out_lint @@ -0,0 +1,5 @@ +mandoc: req.in:10:5: ERROR: ignoring extra tbl data cells: stray +mandoc: req.in:16:2: UNSUPP: ignoring macro in table: ce +mandoc: req.in:19:2: UNSUPP: ignoring macro in table: br +mandoc: req.in:22:8: UNSUPP: ignoring macro in table: ce +mandoc: req.in:25:8: UNSUPP: ignoring macro in table: br -- cgit v1.2.3-56-ge451