bugGNU roff - Bugs: bug #59498, Unescaped wildcards in `strip.sed`

 
 

bug #59498: Unescaped wildcards in `strip.sed`

Submitter:  John Gardner <alhadis>
Submitted:  Sun 22 Nov 2020 08:13:12 AM UTC
   
 
Category:  Macro - others/general Severity:  3 - Normal
Item Group:  Warning/Suspicious behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 03 Jan 2021 10:47:44 PM UTC, comment #4: 

commit 8fc53e4fd397f210a210fa006eaa5bc8e8012044
Author: John Gardner <gardnerjohng@gmail.com>
Date:   Mon Jan 4 09:17:27 2021 +1100

    tmac/strip.sed: Escape '.' wildcard.
   
    * tmac/strip.sed: Escape '.' wildcard when matching lines using
      .as and .ds requests.
   
    Problem dates back to 058f72af832fc68488d33cd09ec819e5c560fa09, 23 March
    2001.
   
    Fixes <https://savannah.gnu.org/bugs/?59498>.

G. Branden Robinson <gbranden>
Group administrator
Mon 23 Nov 2020 04:39:05 AM UTC, comment #3: 

comment #2:

> The only change here is the escaping of the leading dot in the requests, right?


Yep. The change is literally just


sed -e '10,11 s|/|/\\|'


... but I'm new to Savannah and have no idea how I'd go about submitting a PR for such a trivial fix, so I'm filing a bug report instead. :)

comment #2:

> Technically, one of them is for .ds and .as requests only, and the other is for the the complement of that set.  :)


Aye, but it was too cumbersome to say "match and not match .ds and .as requests", not to mention confusing as hell. ;)

John Gardner <alhadis>
Sun 22 Nov 2020 04:07:42 PM UTC, comment #2: 

The only change here is the escaping of the leading dot in the requests, right?

original submission:

> `strip.sed` contains two lines which, given their context, seem meant for `.ds` and `.as` requests only:


Technically, one of them is for .ds and .as requests only, and the other is for the the complement of that set.  :)

G. Branden Robinson <gbranden>
Group administrator
Sun 22 Nov 2020 03:57:15 PM UTC, comment #1: 

  See #53314 for more about this.

  See $55091 about general stripping.

  I have regularly stripped following tmac-files and put them into the
directory "build/s-tmac":

total 152
  1801 Nov 18 17:41 an-ext.tmac
 11790 Nov 18 17:41 an-old.tmac
   478 Nov 18 17:41 devtag.tmac
 23441 Nov 18 17:41 dvi.tmac
 15940 Nov 18 17:41 html.tmac
  7839 Nov 18 17:41 pdf.tmac
 20080 Nov 18 17:41 ps.tmac
 28551 Nov 18 17:41 s.tmac
  5032 Nov 18 17:41 tty-char.tmac
  1375 Nov 18 17:41 tty.tmac
   115 Nov 18 17:41 unicode.tmac
 19918 Nov 18 17:41 www.tmac

  I use them in "test-[ng]roff" and thus also in "man".

Bjarni Ingi Gislason <bjarniig>
Sun 22 Nov 2020 08:13:12 AM UTC, original submission:  

`strip.sed` contains two lines which, given their context, seem meant for `.ds` and `.as` requests only:


  /.[ad]s/!s/[         ]*\\"//
  /.[ad]s/s/\([^         ]*\)\\"/\1/


This should, of course, be:


  /\.[ad]s/!s/[         ]*\\"//
  /\.[ad]s/s/\([^         ]*\)\\"/\1/


John Gardner <alhadis>

 

(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 (Posted a comment)
  • -email is unavailable- added by bjarniig (Posted a comment)
  • -email is unavailable- added by alhadis (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-03 gbranden Planned ReleaseNone 1.23.0
    2021-01-03 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2021-01-03 gbranden StatusNeed Info In Progress
    2020-11-22 gbranden StatusNone Need Info
        Assigned toNone gbranden

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code