aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/roff/while/break.in
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-04-21 22:48:58 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-04-21 22:48:58 +0000
commit521832262338c85e83c79d44a533328fff010240 (patch)
tree7548d4fdb68e384d605f7431428ac0e155cea30a /regress/roff/while/break.in
parent097bd40f100628400564aaf416cd139da33afc3d (diff)
downloadmandoc-521832262338c85e83c79d44a533328fff010240.tar.gz
mandoc-521832262338c85e83c79d44a533328fff010240.tar.zst
mandoc-521832262338c85e83c79d44a533328fff010240.zip
Implement the roff .break request (break out of a .while loop).
Jan Stary <hans at stare dot cz> found it in an ancient groffer(1) manual page (version 1.19) on MacOS X Mojave. Having .break not implemented wasn't a particularly bright idea because obviously, it tended to cause infinite loops.
Diffstat (limited to 'regress/roff/while/break.in')
-rw-r--r--regress/roff/while/break.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/regress/roff/while/break.in b/regress/roff/while/break.in
new file mode 100644
index 00000000..11e7d2f5
--- /dev/null
+++ b/regress/roff/while/break.in
@@ -0,0 +1,16 @@
+.\" $OpenBSD: break.in,v 1.1 2019/04/21 22:43:00 schwarze Exp $
+.Dd $Mdocdate: April 21 2019 $
+.Dt WHILE-BREAK 1
+.Os
+.Sh NAME
+.Nm while-break
+.Nd break request inside a while loop
+.Sh DESCRIPTION
+initial text
+.nr cnt 11 1
+.while n \{\
+\n-[cnt]
+.if !\n[cnt] .break
+\(en
+.\}
+final text