From 0a8809aa2eea4b189b4ca02bea4883d7cf4ce706 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 24 Aug 2018 23:12:33 +0000 Subject: 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. --- regress/roff/while/nesting.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 regress/roff/while/nesting.in (limited to 'regress/roff/while/nesting.in') diff --git a/regress/roff/while/nesting.in b/regress/roff/while/nesting.in new file mode 100644 index 00000000..930b8b7a --- /dev/null +++ b/regress/roff/while/nesting.in @@ -0,0 +1,19 @@ +.\" $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 -- cgit v1.2.3