diff options
author | wlemb <wlemb> | 2004-05-06 11:47:19 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2004-05-06 11:47:19 +0000 |
commit | ec3e7631a8e613bc06c05c036c67f1c0f638e82d (patch) | |
tree | d281bc811c93d81864dfa20b6d61b895556a64eb | |
parent | 8e809b1082e9ba7cd4e6907e43e06d50280404cc (diff) | |
download | groff-ec3e7631a8e613bc06c05c036c67f1c0f638e82d.tar.gz |
* NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo:
Document `.U' register.
* src/roff/troff/env.cpp (environment::mark_last_line)
[WIDOW_CONTROL]: Fix scope of `p' for new C++ compilers.
New read-only register `.U'; it returns 1 in safer mode and 0
otherwise.
* src/roff/troff/input.cpp (init_input_requests): Implement `.U'
register.
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | doc/groff.texinfo | 9 | ||||
-rw-r--r-- | man/groff.man | 7 | ||||
-rw-r--r-- | man/groff_diff.man | 12 | ||||
-rw-r--r-- | src/roff/troff/env.cpp | 3 | ||||
-rw-r--r-- | src/roff/troff/input.cpp | 1 |
7 files changed, 45 insertions, 6 deletions
@@ -1,3 +1,19 @@ +2004-05-04 Werner LEMBERG <wl@gnu.org> + + * NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo: + Document `.U' register. + + * src/roff/troff/env.cpp (environment::mark_last_line) + [WIDOW_CONTROL]: Fix scope of `p' for new C++ compilers. + +2004-05-04 Larry Kollar <kollar@alltel.net> + + New read-only register `.U'; it returns 1 in safer mode and 0 + otherwise. + + * src/roff/troff/input.cpp (init_input_requests): Implement `.U' + register. + 2004-05-03 Werner LEMBERG <wl@gnu.org> * install-sh, mkinstalldirs: New versions; taken from texinfo CVS. @@ -21,6 +21,9 @@ Troff o Two new read-only, string-valued registers `.m' and `.M' return the name of the current drawing and background color, respectively. +o New read-only register `.U' which is set to 1 if in safer mode and set + to 0 if in unsafe mode. + o An input encoding file for latin-5 (a.k.a. ISO 8859-9) has been added. Example use: diff --git a/doc/groff.texinfo b/doc/groff.texinfo index bad38eea..a115d4c8 100644 --- a/doc/groff.texinfo +++ b/doc/groff.texinfo @@ -5909,6 +5909,15 @@ This string-valued register returns the current input file name. @vindex .H Horizontal resolution in basic units. +@item \n[.U] +@cindex safer mode +@cindex mode, safer +@cindex unsafe mode +@cindex mode, unsafe +If @code{gtroff} is called with the @option{-U} command line option, the +number register @code{.U} is set to@tie{}1, and zero otherwise. +@xref{Groff Options}. + @item \n[.V] @cindex vertical resolution register (@code{.V}) @cindex resolution, vertical, register (@code{.V}) diff --git a/man/groff.man b/man/groff.man index 57adb3d6..74f26229 100644 --- a/man/groff.man +++ b/man/groff.man @@ -2,7 +2,7 @@ .ig groff.man -Last update: 07 Jan 2004 +Last update: 04 May 2004 This file is part of groff, the GNU roff type-setting system. @@ -3262,7 +3262,10 @@ The value of the parameters set by the second argument of the request. . .REG .u -Equal to 1 bin fill mode and 0 in nofill mode. +Equal to 1 in fill mode and 0 in nofill mode. +. +.REG .U +Equal to 1 in safer mode and 0 in unsafe mode. . .REG .v Current vertical line spacing. diff --git a/man/groff_diff.man b/man/groff_diff.man index a9a176a2..9254df1a 100644 --- a/man/groff_diff.man +++ b/man/groff_diff.man @@ -3,7 +3,7 @@ .ig groff_diff.man -Last update : 07 Jan 2004 +Last update : 04 May 2004 This file is part of groff, the GNU roff type-setting system. It is the source of the man-page groff_diff(7). @@ -2795,6 +2795,12 @@ Useful in conjunction with the register. . .TP +.B \[rs]n[.U] +Set to 1 if in safer mode and to 0 if in unsafe mode (as given with the +.B \-U +command line option). +. +.TP .B \[rs]n[.vpt] 1\~if vertical position traps are enabled, 0\~otherwise. . @@ -2932,7 +2938,7 @@ is the current year minus 1900. predefines a single (read/write) string-based register, .BR \[rs]*(.T , which contains the argument given to the -.B -T +.B \-T command line option, namely the current output device (for example, .I latin1 or @@ -2942,7 +2948,7 @@ Note that this is not the same as the (read-only) number register which is defined to be\~1 if .B troff is called with the -.B -T +.B \-T command line option, and zero otherwise. . This behaviour is different to UNIX troff. diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp index 6ed13970..b0234065 100644 --- a/src/roff/troff/env.cpp +++ b/src/roff/troff/env.cpp @@ -173,7 +173,8 @@ void environment::mark_last_line() { if (!widow_control || !pending_lines) return; - for (pending_output_line *p = pending_lines; p->next; p = p->next) + pending_output_line *p; + for (p = pending_lines; p->next; p = p->next) ; if (!p->no_fill) p->last_line = 1; diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp index 10037a03..6dbaad20 100644 --- a/src/roff/troff/input.cpp +++ b/src/roff/troff/input.cpp @@ -7336,6 +7336,7 @@ void init_input_requests() number_reg_dictionary.define(".g", new constant_reg("1")); number_reg_dictionary.define(".H", new constant_int_reg(&hresolution)); number_reg_dictionary.define(".R", new constant_reg("10000")); + number_reg_dictionary.define(".U", new constant_int_reg(&safer_flag)); number_reg_dictionary.define(".V", new constant_int_reg(&vresolution)); number_reg_dictionary.define(".warn", new constant_int_reg(&warning_mask)); extern const char *major_version; |