diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-02-17 17:16:13 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-02-17 17:16:13 +0000 |
commit | e678cef2819f27c089cb8b2c9bbfe319f6a1e8cc (patch) | |
tree | 3986b7eeaf5f3240b73df1381c1e362baab51040 /share/man/man7/roff.7 | |
parent | a087454e6923e2faa9c40bcb8a5b39e319e4ccee (diff) |
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 'share/man/man7/roff.7')
-rw-r--r-- | share/man/man7/roff.7 | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/share/man/man7/roff.7 b/share/man/man7/roff.7 index fc7a4f9555b..432ff0339d6 100644 --- a/share/man/man7/roff.7 +++ b/share/man/man7/roff.7 @@ -1,4 +1,4 @@ -.\" $OpenBSD: roff.7,v 1.49 2015/01/29 00:33:14 schwarze Exp $ +.\" $OpenBSD: roff.7,v 1.50 2015/02/17 17:16:11 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 @@ -1194,13 +1194,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. |