bugGNU roff - Bugs: bug #61520, grog (rewritten) falsely detects...

 
 

bug #61520: grog (rewritten) falsely detects refer(1) usage in xterm's ctlseqs.ms document

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Mon 22 Nov 2021 01:51:16 AM UTC
   
 
Category:  Utilities 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
   

Tue 23 Nov 2021 03:11:53 PM UTC, comment #1: 


commit c89f1a91651109bb27f25bc9b15c7db29e899723
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Nov 24 00:48:42 2021 +1100

    [grog]: Fix Savannah #61520.

    * src/utils/grog/grog.pl: Move hash `preprocessor_for_macro` to global
      scope since it is now mutable across `do_line` subroutine calls.

      (do_line): Adjust regex matching an end macro to work better.  Check
      names of macros being defined by the document; if they start with '['
      or ']', stop attempting to detect refer(1) usage, by deleting its key
      from the `preprocessor_for_macro` hash.

    Fixes <https://savannah.gnu.org/bugs/?61520>.


G. Branden Robinson <gbranden>
Group administrator
Mon 22 Nov 2021 01:51:16 AM UTC, original submission:  

ctlseqs.ms, a venerable old X11 ms document, defines many macros.

One of them is the following.


.de []
.nr w \w'\\$2'
.nr H \\n([Wu-\\nwu
.nr h \\nHu/2u
.\" do fancy box in troff
.ie t .ds \\$1 \(br\v'-1p'\(br\v'1p'\h'\\nhu'\\$2\h'\\nHu-\\nhu'\(br\l'-\\n([Wu\(ul'\v'-1p'\(br\l'-\\n([Wu\(rn'\v'1p'\*s
.el .ds \\$1 \\$2\*s
..


grog in groff 1.22.4 is not fooled by this.


$ grog ctlseqs.ms
groff -T ps -t -ms ctlseqs.ms


My rewritten grog(1), sadly, is.


$ ~/src/GIT/groff/build/grog ./ctlseqs.ms
groff -R -t -ms ./ctlseqs.ms


Fix this regression.

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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-23 gbranden StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code