From d6b5b0cf8eeaf6027598ab1819e49a0f74974a9e Mon Sep 17 00:00:00 2001 From: Werner LEMBERG Date: Wed, 19 Jan 2005 06:50:30 +0000 Subject: [PATCH] * tmac/doc-common (Dd), tmac/doc-ditroff (gX, doc-setup-header): Remove dead code. * src/roff/troff/div.cpp (top_level_diversion::space): Protect against division by zero. --- ChangeLog | 10 ++++++++++ src/roff/troff/div.cpp | 5 +++-- tmac/doc-common | 4 ---- tmac/doc-ditroff | 6 ------ 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82db5718..d824c606 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-01-17 Ruslan Ermilov + + * tmac/doc-common (Dd), tmac/doc-ditroff (gX, doc-setup-header): + Remove dead code. + +2004-01-17 Werner LEMBERG + + * src/roff/troff/div.cpp (top_level_diversion::space): Protect + against division by zero. + 2005-01-13 Ruslan Ermilov * tmac/doc.tmac (Ef): Restore doc-curr-font and doc-curr-size. diff --git a/src/roff/troff/div.cpp b/src/roff/troff/div.cpp index 7ad7e4ca..f372239c 100644 --- a/src/roff/troff/div.cpp +++ b/src/roff/troff/div.cpp @@ -459,8 +459,9 @@ void top_level_diversion::space(vunits n, int forced) vunits next_trap_pos; trap *next_trap = find_next_trap(&next_trap_pos); vunits y = vertical_position + n; - curenv->seen_space += n.to_units() - / curenv->get_vertical_spacing().to_units(); + if (curenv->get_vertical_spacing().to_units()) + curenv->seen_space += n.to_units() + / curenv->get_vertical_spacing().to_units(); if (vertical_position_traps_flag && next_trap != 0 && y >= next_trap_pos) { vertical_position = next_trap_pos; nl_reg_contents = vertical_position.to_units(); diff --git a/tmac/doc-common b/tmac/doc-common index 88157ad1..38f13807 100644 --- a/tmac/doc-common +++ b/tmac/doc-common @@ -551,10 +551,6 @@ .ds doc-date-12 December . .de Dd -. \" XXX: why do we need gX? -. if "\*[doc-date-string]"" \ -. nr gX 1 -. . ie \n[.$] \{\ . ie (\n[.$] == 3) \ . ds doc-date-string \$1\~\$2 \$3 diff --git a/tmac/doc-ditroff b/tmac/doc-ditroff index 14be96b8..fbfa61bb 100644 --- a/tmac/doc-ditroff +++ b/tmac/doc-ditroff @@ -180,8 +180,6 @@ .ds Ba \f[R]|\f[] .ds Am & . -.nr gX 0 -. . .\" NS doc-header-string global string .\" NS the final string used for the manual page header @@ -203,12 +201,8 @@ . wh 0 doc-header . wh -1.25i doc-footer . -. if \n[gX] \ -. ds doc-command-name -. . br . -. nr gX 0 . e@ doc-end-macro .. . -- 2.11.4.GIT