[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #60140] tbl: disables line numbering after tables
From: |
G. Branden Robinson |
Subject: |
[bug #60140] tbl: disables line numbering after tables |
Date: |
Wed, 30 Nov 2022 07:32:19 -0500 (EST) |
Update of bug #60140 (project groff):
Status: In Progress => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #2:
commit 2d2bb4749aa2b490bb7f6275fa45eff97aeca31b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Tue Nov 29 07:46:59 2022 -0600
[tbl]: Regression-test Savannah #61040.
* src/preproc/tbl/tests/save-and-restore-line-numbering.sh: Do it.
* src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
Test fails at this commit.
commit 950f92e25f3f446d9e4d4560e1563c5944839d8a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Mon Nov 28 02:53:16 2022 -0600
[tbl]: Fix Savannah #61040.
[tbl]: Suppress line numbering when formatting tables, and restore it
afterward.
* src/preproc/tbl/table.cpp: Revert much of commit b69062693's
(2011-07-20) changes to this file. They were too complex for me to
understand, and permitted Savannah #61040 to persist (or caused it).
(ROW_START_LINE_REG, ROW_SAVE_LINE_REG, ROW_MAX_LINE_REG)
(REPEATED_NM_SET_MACRO, REPEATED_NM_SUS_MACRO): Drop preprocessor
macros.
(SAVED_NUMBERING_LINENO, SAVED_NUMBERING_SUPPRESSION_COUNT): Add new
preprocessor macros.
(table::init_output, table::print_single_hline)
(table::print_double_hline, table::define_bottom_macro)
(table::do_row, table::do_top, table::do_bottom): Drop old logic.
(table::init_output): When the table begins, save the current line
number register `ln` and the count of remaining lines to be suppressed
(the new `.nn` register). Then suppress numbering for the next 2
billion+ lines of output, with a groveling apology to the elegance
police.
(table::do_bottom): Restore saved value of `.nn`. If numbering was
active (even if suppressed), restore it with `nm` request. If it
wasn't, disable it, in case it was turned on inside the table region.
Fixes <https://savannah.gnu.org/bugs/?61040>. Thanks to Hans Bezemer
for noting the practical significance of this bug.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60140>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/