[BACK]Return to z.in CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc / regress / roff / esc

File: [cvsweb.bsd.lv] / mandoc / regress / roff / esc / z.in (download)

Revision 1.3, Wed Apr 27 13:41:16 2022 UTC (2 years ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +8 -2 lines

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).

.\" $OpenBSD: z.in,v 1.4 2022/04/27 13:30:19 schwarze Exp $
.Dd $Mdocdate: April 27 2022 $
.Dt ESC-Z 1
.Os
.Sh NAME
.Nm esc-z
.Nd the roff escape z sequence
.Sh DESCRIPTION
single z with ASCII char: >\zx<
.br
single z with escape char: >\z\(ci<
.br
.ds mystr mytext
single z with defined string (\*[mystr]): >\z\*[mystr]<
.br
single z with font escape: >\z\fBxbold\fP<
.br
single z with nospace escape: >\z\c
new line<
.br
single z with overstrike: >\z\o'ab'c<
.br
single z with h escape: >\z\h'3'm\z\h'-3'<
.br
single z with char and h with positive argument: >\za\h'3'b<
.br
single z with char and h with zero argument: >\za\h'0'b<
.br
single z near the end of the line: >\z<
.br
double z: >\z\zx<