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

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

Revision 1.1, Wed Feb 6 21:11:48 2019 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_6, VERSION_1_14_5, HEAD

Let roff_getname() end the roff identifier at a tab character
and audit all its callers whether termination is handled correctly.

Resulting improvements:
* An escape or tab ending the macro name in a macro invocation
is discarded, and argument processing is started after it.
* An escape or tab ending a name in ".if d" and ".if r" is preserved.
* An escape ending a name in ".ds" causes the whole request to be ignored.
* A tab ending a name in ".ds" becomes part of the string.
* An escape or tab ending a name in ".rm"
causes the rest of the line to be ignored.
* An escape or tab ending the first name in ".als", ".rn", or ".nr"
causes the whole request to be ignored.

Kurt Jaeger <pi at FreeBSD> made me aware of
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235456#c0
and in that bug report, comment 0 item (3) is a special case
of this class of issues.

Yes, the "mh" manual pages are no doubt among the worst on the planet.

.\" $OpenBSD: tab.in,v 1.1 2019/02/06 20:54:28 schwarze Exp $
.TH NR-TAB 1 "February 6, 2019"
.SH NAME
nr-tab \- tab characters in register definition lines
.SH DESCRIPTION
with tab:
.nr testreg	1
>>\n[testreg]<<
.br
with space:
.nr testreg 2
.nr test2 42
>>\n[testreg]<<
.br
rr with tab:
.rr testreg	test2
>>\n[myr]:\n[test2]<<