diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-08-23 14:16:13 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2018-08-23 14:16:13 +0000 |
commit | fc469ea850621ad85ab19d7482c03478fc263bcb (patch) | |
tree | 29ee64e3e0a1e94868f5a145d1dd55610ad040db /share | |
parent | 19b02c78f13b5e52f321e82720b4b70346dbb581 (diff) |
Implement the roff(7) .shift and .return requests,
for example used by groff_hdtbl(7) and groff_mom(7).
Also correctly interpolate arguments during nested macro execution
even after .shift and .return, implemented using a stack of argument
arrays.
Note that only read.c, but not roff.c can detect the end of a macro
execution, and the existence of .shift implies that arguments cannot
be interpolated up front, so unfortunately, this includes a partial
revert of roff.c rev. 1.209, moving argument interpolation back into
the function roff_res().
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man7/roff.7 | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/share/man/man7/roff.7 b/share/man/man7/roff.7 index a48c10ffb76..2914ce486e3 100644 --- a/share/man/man7/roff.7 +++ b/share/man/man7/roff.7 @@ -1,4 +1,4 @@ -.\" $OpenBSD: roff.7,v 1.82 2018/08/21 18:15:17 schwarze Exp $ +.\" $OpenBSD: roff.7,v 1.83 2018/08/23 14:16:11 schwarze Exp $ .\" .\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2010-2018 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: August 21 2018 $ +.Dd $Mdocdate: August 23 2018 $ .Dt ROFF 7 .Os .Sh NAME @@ -1470,8 +1470,8 @@ Currently ignored. Set the maximum stack depth for recursive macros. This is a Heirloom extension and currently ignored. .It Ic \&return Op Ar twice -Exit a macro and return to the caller. -Currently unsupported. +Exit the presently executed macro and return to the caller. +The argument is currently ignored. .It Ic \&rfschar Ar font glyph ... Remove font-specific fallback glyph definitions. Currently unsupported. @@ -1520,8 +1520,11 @@ This is a Heirloom extension and currently ignored. Change the soft hyphen character. Currently ignored. .It Ic \&shift Op Ar number -Shift macro arguments. -Currently unsupported. +Shift macro arguments +.Ar number +times, by default once: \e\e$i becomes what \e\e$i+number was. +Also decrement \en(.$ by +.Ar number . .It Ic \&sizes Ar size ... Define permissible point sizes. This is a groff extension and currently ignored. |