bugGNU roff - Bugs: bug #60140, tbl: disables line numbering after...

 
 

bug #60140: tbl: disables line numbering after tables

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Sun 28 Feb 2021 07:39:58 AM UTC
   
 
Category:  Preprocessor tbl Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 30 Nov 2022 12:32:19 PM UTC, 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.


G. Branden Robinson <gbranden>
Group administrator
Tue 29 Nov 2022 11:50:21 AM UTC, comment #1: 

I forgot that I had bellyached about this before.

I have a fix for this in progress.

https://lists.gnu.org/archive/html/groff/2022-11/msg00180.html

G. Branden Robinson <gbranden>
Group administrator
Sun 28 Feb 2021 07:39:58 AM UTC, original submission:  

Input:

.nm 1
foo
.TS
l.
bar
.TE
baz


Expected output:

  1 foo
  2 bar
  3 baz


Actual output:

  1 foo
  2 bar
baz


Affects groff 1.22.4, and (I suspect) every groff release going back to 2011 at least.

G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-11-30 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2022-11-29 gbranden StatusNone In Progress
        Planned ReleaseNone 1.23.0

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code