diff options
author | wlemb <wlemb> | 2000-03-06 11:18:41 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2000-03-06 11:18:41 +0000 |
commit | 2b51a4a9520d5457aa17ee1a92e4384174de4603 (patch) | |
tree | a12aa53d8c416af79cd3b123d81e3e2dee143b3e | |
parent | d270572873db642035b7a2e46ad2aba5949da9cb (diff) | |
download | groff-2b51a4a9520d5457aa17ee1a92e4384174de4603.tar.gz |
* doc/groff.texinfo, src/roff/troff/troff.man: Document evc request.
* src/roff/troff/env.cc (environment_copy): Improve error message and
fix itoa->i_to_a.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/groff.texinfo | 13 | ||||
-rw-r--r-- | src/roff/troff/env.cc | 4 | ||||
-rw-r--r-- | src/roff/troff/troff.man | 6 |
4 files changed, 24 insertions, 3 deletions
@@ -3,6 +3,10 @@ * tmac/groff_man.man: Completely revised to cover everything in tmac.an. + * doc/groff.texinfo, src/roff/troff/troff.man: Document evc request. + * src/roff/troff/env.cc (environment_copy): Improve error message and + fix itoa->i_to_a. + 2000-03-05 Abramo Bagnara <abramo@alsa-project.org> Adding a request `evc' to copy environments. diff --git a/doc/groff.texinfo b/doc/groff.texinfo index bf041710..0015bddd 100644 --- a/doc/groff.texinfo +++ b/doc/groff.texinfo @@ -4262,7 +4262,7 @@ name. This would be called as @example -.vl $Id: groff.texinfo,v 1.14 2000/03/05 12:11:22 wlemb Exp $ +.vl $Id: groff.texinfo,v 1.15 2000/03/06 11:18:41 wlemb Exp $ @end example @xref{Request Arguments}. @@ -4931,6 +4931,13 @@ first time that they are referenced. The @code{.ev} register contains the name or number of the current environment. This is a string-valued register. +Note that a call to @code{ev} (with argument) will push the previously +active environment onto a stack. If, say, environments @samp{foo}, +@{bar}, and @{zap} are called (in that order), the first @{ev} request +without parameter will switch back to environment @samp{bar} (which will +be popped off the stack), and a second call will switch back to +environment @samp{foo}. + @c XXX example @example @@ -4952,6 +4959,10 @@ Here another example: .ev @end example +@findex evc +To copy an environment into the current one, use the @code{evc} request, +which takes the name of the environment to copy from as an argument. + @node I/O, Postprocessor Access, Environments, Programming Tutorial @section I/O diff --git a/src/roff/troff/env.cc b/src/roff/troff/env.cc index fb9576ce..e5713973 100644 --- a/src/roff/troff/env.cc +++ b/src/roff/troff/env.cc @@ -1020,7 +1020,7 @@ void environment_copy() if (n >= 0 && n < NENVIRONMENTS) e = env_table[n]; else - nm = itoa(n); + nm = i_to_a(n); } } else @@ -1028,7 +1028,7 @@ void environment_copy() if (!e && !nm.is_null()) e = (environment *)env_dictionary.lookup(nm); if (e == 0) { - error("Inexistent environment to copy from"); + error("No environment to copy from"); return; } else diff --git a/src/roff/troff/troff.man b/src/roff/troff/troff.man index 1316304e..03af436c 100644 --- a/src/roff/troff/troff.man +++ b/src/roff/troff/troff.man @@ -877,6 +877,12 @@ sourced by are interpreted. .RE .TP +.BI .evc\ xx +Copy the contents of environment +.I xx +to the current environment. +No pushing or popping of environents will be done. +.TP .BI .fam\ xx Set the current font family to .IR xx . |