diff options
author | wlemb <wlemb> | 2001-05-02 07:09:19 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2001-05-02 07:09:19 +0000 |
commit | 98381217de56fe6eb891e2b5de9a852c58ca8019 (patch) | |
tree | 678d164f16ca28511cf9b1e814d11cf95e5e1c7e /src | |
parent | 6c39b50cc0580a863c5581eef880bd3c3c588eb4 (diff) | |
download | groff-98381217de56fe6eb891e2b5de9a852c58ca8019.tar.gz |
Added `brp' request: This is p as a request.
* src/roff/troff/env.cc (environment::do_break): Add parameter
`spread'.
(do_break_request): New function (was `break_request').
(break_request): Calls `do_break_request'.
(break_spread_request): New; calls `do_break_request'.
(init_env_requests): Updated.
* src/roff/troff/env.h: Updated.
* NEWS, src/roff/troff/troff.man, man/groff.man: Document it.
* VERSION: Increased to 1.17.1.
* tmac/an-old.tmac: Fix minor compatibility mode issue.
* tmac/troffrc-end: Make it really work in compatibility mode.
Diffstat (limited to 'src')
-rw-r--r-- | src/roff/troff/env.cc | 19 | ||||
-rw-r--r-- | src/roff/troff/env.h | 2 | ||||
-rw-r--r-- | src/roff/troff/troff.man | 4 |
3 files changed, 20 insertions, 5 deletions
diff --git a/src/roff/troff/env.cc b/src/roff/troff/env.cc index 56f357c9..ca4881c2 100644 --- a/src/roff/troff/env.cc +++ b/src/roff/troff/env.cc @@ -2135,7 +2135,7 @@ void environment::add_html_tag_tabs() } } -void environment::do_break() +void environment::do_break(int spread) { if (curdiv == topdiv && topdiv->before_first_page) { topdiv->begin_page(); @@ -2146,7 +2146,7 @@ void environment::do_break() if (line) { line = new space_node(H0, line); // this is so that hyphenation works space_total++; - possibly_break_line(); + possibly_break_line(0, spread); } while (line != 0 && line->discardable()) { width_total -= line->width(); @@ -2185,17 +2185,27 @@ int environment::is_empty() return !current_tab && line == 0 && pending_lines == 0; } -void break_request() +void do_break_request(int spread) { while (!tok.newline() && !tok.eof()) tok.next(); if (break_flag) { - curenv->do_break(); + curenv->do_break(spread); curenv->add_html_tag(".br"); } tok.next(); } +void break_request() +{ + do_break_request(0); +} + +void break_spread_request() +{ + do_break_request(1); +} + void title() { if (curdiv == topdiv && topdiv->before_first_page) { @@ -3014,6 +3024,7 @@ void init_env_requests() init_request("cc", control_char); init_request("c2", no_break_control_char); init_request("br", break_request); + init_request("brp", break_spread_request); init_request("tl", title); init_request("ta", set_tabs); init_request("linetabs", line_tabs_request); diff --git a/src/roff/troff/env.h b/src/roff/troff/env.h index 256db512..89ff0416 100644 --- a/src/roff/troff/env.h +++ b/src/roff/troff/env.h @@ -275,7 +275,7 @@ public: void interrupt(); void spread() { spread_flag = 1; } void possibly_break_line(int start_here = 0, int forced = 0); - void do_break(); // .br + void do_break(int spread = 0); // .br void final_break(); void add_html_tag_eol(); void add_html_tag(const char *); diff --git a/src/roff/troff/troff.man b/src/roff/troff/troff.man index 7fe052b4..86d5ba40 100644 --- a/src/roff/troff/troff.man +++ b/src/roff/troff/troff.man @@ -810,6 +810,10 @@ Be sure not to confuse this with the .B br request. .TP +.B .brp +This is the same as +.BR \ep . +.TP .BI .cflags\ n\ c1\ c2\|.\|.\|. Characters .IR c1 , |