From 3d43838424a8548b9c4ffe76ae65e482bfa44346 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 27 Apr 2022 13:41:13 +0000 Subject: Fix three bugs regarding the interaction of \z and \h: 1. The combination \z\h is a no-op whatever the argument may be. In the past, the \z only affected the first space character generated by the \h, which was wrong. 2. For the conbination \zX\h with a positive argument, the first space resulting from the \h is not printed but consumed by the \z. 3. For the combination \zX\h with a negative argument, application of the \z needs to be completed before the \h can be started. In the past, if this combination occurred at the beginning of an output line, the \h backed up to the beginning of the line and after that, the \z attempted to back up even further, triggering an assertion. Bugs found during an audit of assignments to termp->col that i started after the bugfix tbl_term.c rev. 1.65. The assertion triggered by bug 3 was *not* yet found by afl(1). --- regress/roff/esc/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'regress/roff/esc/Makefile') diff --git a/regress/roff/esc/Makefile b/regress/roff/esc/Makefile index 4c152fc4..f00aa4d3 100644 --- a/regress/roff/esc/Makefile +++ b/regress/roff/esc/Makefile @@ -1,8 +1,15 @@ -# $OpenBSD: Makefile,v 1.18 2022/04/13 13:11:33 schwarze Exp $ +# $OpenBSD: Makefile,v 1.19 2022/04/27 13:30:19 schwarze Exp $ -REGRESS_TARGETS = one two multi B bs_man bs_mdoc c c_man E1 e f h l O1 o p w z +REGRESS_TARGETS = one two multi +REGRESS_TARGETS += B bs_man bs_mdoc c c_man E1 e f h hneg l O1 o p w z REGRESS_TARGETS += ignore invalid unsupp HTML_TARGETS = f LINT_TARGETS = B h l O1 w ignore invalid unsupp +# mandoc defect: +# - \h with a negative argument replaces output characters +# instead of overstriking them + +SKIP_GROFF = hneg + .include -- cgit v1.2.3-56-ge451