aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/roff/ce/break.out_ascii
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-04-30 18:51:36 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-04-30 18:51:36 +0000
commitb592e2d9ee8dd845f058dac8ae07a679a4bd10e2 (patch)
tree4274441e268d6735a9caea1b2483186918ca4f8d /regress/roff/ce/break.out_ascii
parent42aa282973a44f08e87cdc71db77df5ac502a1bc (diff)
downloadmandoc-b592e2d9ee8dd845f058dac8ae07a679a4bd10e2.tar.gz
mandoc-b592e2d9ee8dd845f058dac8ae07a679a4bd10e2.tar.zst
mandoc-b592e2d9ee8dd845f058dac8ae07a679a4bd10e2.zip
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.
Diffstat (limited to 'regress/roff/ce/break.out_ascii')
-rw-r--r--regress/roff/ce/break.out_ascii24
1 files changed, 24 insertions, 0 deletions
diff --git a/regress/roff/ce/break.out_ascii b/regress/roff/ce/break.out_ascii
new file mode 100644
index 00000000..8572cc0a
--- /dev/null
+++ b/regress/roff/ce/break.out_ascii
@@ -0,0 +1,24 @@
+CE-BREAK(1) General Commands Manual CE-BREAK(1)
+
+NNAAMMEE
+ ce-break - centering requests broken by high-level macros
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+ Text centered with the .ce request is
+ _n_o_t filled.
+ Text adjusted to the right margin
+ works in just the same way and is
+ _n_o_t filled either.
+ High-level macros break centering even in a
+ _c_o_n_d_i_t_i_o_n_a_l block.
+
+ Now entering
+ explicit no-fill mode.
+ Text is still
+ _n_o_t
+ filled.
+
+ final text in fill mode
+
+OpenBSD April 30, 2022 CE-BREAK(1)