From 37f94bbdf74663ed1f212a4a0aa87e4faf4ca885 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 10 Apr 2018 00:52:30 +0000 Subject: Two new low-level roff(7) features: * .nr optional third argument (auto-increment step size) * \n+ and \n- numerical register auto-increment and -decrement bentley@ reported on Dec 9, 2013 that lang/sbcl(1) uses these. --- regress/roff/nr/incr.in | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 regress/roff/nr/incr.in (limited to 'regress/roff/nr/incr.in') diff --git a/regress/roff/nr/incr.in b/regress/roff/nr/incr.in new file mode 100644 index 00000000..a03493ff --- /dev/null +++ b/regress/roff/nr/incr.in @@ -0,0 +1,30 @@ +.\" $OpenBSD: undef.in,v 1.1 2018/04/09 22:26:25 schwarze Exp $ +.TH NR-INCR 1 "April 10, 2018" +.SH NAME +nr-incr \- increment a number register by accessing it +.SH DESCRIPTION +.nr myr 0 1 +Roff can count by merely accessing a number register: +\n+[myr] +\n+[myr] +\n+[myr] +.PP +.nr myr +0 1+1 +It can also change the step size: +\n+[myr] +\n+[myr] +\n+[myr] +.PP +.nr myr +0 3 +It can also count down: +\n-[myr] +\n-[myr] +\n-[myr] +\n-[myr] +.PP +.nr myr -0 -2 +Down in negative steps is up: +\n-[myr] +\n-[myr] +\n-[myr] +\n-[myr] -- cgit