From f5133ff5de286c3849ba772719280fcec35ca374 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/outof.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 regress/roff/while/outof.in (limited to 'regress/roff/while/outof.in') diff --git a/regress/roff/while/outof.in b/regress/roff/while/outof.in new file mode 100644 index 00000000..f505c0c6 --- /dev/null +++ b/regress/roff/while/outof.in @@ -0,0 +1,18 @@ +.\" $OpenBSD: outof.in,v 1.1 2018/08/24 22:56:37 schwarze Exp $ +.Dd $Mdocdate$ +.Dt WHILE-OUTOF 1 +.Os +.Sh NAME +.Nm while-outof +.Nd while request starting in a macro +.Sh DESCRIPTION +.nr cnt 10 +.de mym +. while \\n[cnt] \{\ +. nop \\n[cnt] +.. +initial text +.mym +. nr cnt -1 +.\} +final text -- cgit