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

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

Revision 1.1, Fri Aug 24 23:12:35 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_6, VERSION_1_14_5, HEAD

Rudimentary implementation of the roff(7) .while request.
Needed for example by groff_hdtbl(7).

There are two limitations:
It does not support nested .while requests yet,
and each .while loop must start and end in the same scope.

The roff_parseln() return codes are now more flexible
and allow OR'ing options.

.\" $OpenBSD: nesting.in,v 1.1 2018/08/24 22:56:37 schwarze Exp $
.Dd $Mdocdate: August 24 2018 $
.Dt WHILE-NESTING 1
.Os
.Sh NAME
.Nm while-nesting
.Nd nested while requests
.Sh DESCRIPTION
initial text
.nr c1 3
.while \n(c1 \{\
.  nr c2 3
.  while \n(c2 \{\
.    nop \n(c1\n(c2
.    nr c2 -1
.  \}
.  nr c1 -1
.\}
final text