diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-17 17:16:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-17 17:16:52 +0000 |
commit | 104c829123990f31b11953103544d94926d8efd0 (patch) | |
tree | 37c08d82b9100faa165881938d860c91a74b562a /roff.7 | |
parent | 2c7fbaa0ae224250216f3238dfeaee7aec260283 (diff) | |
download | mandoc-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.7 | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -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. |