aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-17 17:16:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-17 17:16:52 +0000
commit104c829123990f31b11953103544d94926d8efd0 (patch)
tree37c08d82b9100faa165881938d860c91a74b562a /roff.7
parent2c7fbaa0ae224250216f3238dfeaee7aec260283 (diff)
downloadmandoc-104c829123990f31b11953103544d94926d8efd0.tar.gz
mandoc-104c829123990f31b11953103544d94926d8efd0.tar.zst
mandoc-104c829123990f31b11953103544d94926d8efd0.zip
Let .it accept numerical expressions, not just numerical constants.
For .it, ignore scaling units in roff_getnum(). Inside parentheses, skip whitespace after a sign in roff_getnum(). Parse and ignore unary plus in roff_getnum(). As a bonus, get rid of the only call to mandoc_strntoi() in roff.c.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.717
1 files changed, 11 insertions, 6 deletions
diff --git a/roff.7 b/roff.7
index f93b1f12..dc39b69b 100644
--- a/roff.7
+++ b/roff.7
@@ -1,4 +1,4 @@
-.\" $Id: roff.7,v 1.69 2015/01/29 00:33:57 schwarze Exp $
+.\" $Id: roff.7,v 1.70 2015/02/17 17:16:52 schwarze Exp $
.\"
.\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010, 2011, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: January 29 2015 $
+.Dd $Mdocdate: February 17 2015 $
.Dt ROFF 7
.Os
.Sh NAME
@@ -1196,13 +1196,18 @@ This is a Heirloom extension and currently unsupported.
Set an input line trap.
Its syntax is as follows:
.Pp
-.D1 Pf . Cm it Ar number macro
+.D1 Pf . Cm it Ar expression macro
.Pp
The named
.Ar macro
-will be invoked after processing the specified
-.Ar number
-of input text lines.
+will be invoked after processing the number of input text lines
+specified by the numerical
+.Ar expression .
+While evaluating the
+.Ar expression ,
+the unit suffixes described below
+.Sx Scaling Widths
+are ignored.
.Ss \&itc
Set an input line trap, not counting lines ending with \ec.
Currently unsupported.