URL:
  <https://savannah.gnu.org/bugs/?66863>

                 Summary: [troff] `cf` and `trf` requests broken since commit
f087165933
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Mon 03 Mar 2025 05:45:44 AM UTC
                Category: Core
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: Confirmed
                 Privacy: Public
             Assigned to: gbranden
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 03 Mar 2025 05:45:44 AM UTC By: G. Branden Robinson <gbranden>
I had another screwup back in December.

This looks like another off-by-one error with the input stream pointer.  If
so, it's an easy fix.

A regression test would be nice.


$ cat ATTIC/trf-fodder 
# this is a grout comment
$ printf 'hello\n.trf ATTIC/trf-fodder\nworld\n' | ./build/test-groff -a |
grep -Fx orld && echo BAD
$ printf 'hello\n.cf ATTIC/trf-fodder\nworld\n' | ./build/test-groff -Ua |
grep -Fx orld && echo BAD
$ git bisect good
f0871659336bece1831c0de3b099d67f70e81bf5 is the first bad commit
commit f0871659336bece1831c0de3b099d67f70e81bf5
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
Date:   Sat Dec 7 09:51:55 2024 -0600

    [troff]: `cf`, `trf` now accept spacey file names.
    
    The `cf` and `trf` requests now accept leading and embedded spaces in
    their "file" arguments, just like `so`.
    
    * src/roff/troff/input.cpp (copy_file, transparent_file): Gather the
      argument with `read_string()` (which reads a potentially spaceful
      argument including a discardable leading double quote), not
      `get_long_name()` (which reads a GNU troff identifier).  Call
      `tok.next()` afterwards.
    
    * doc/groff.texi.in (I/O):
    * man/groff_diff.7.man (New requests, Altered requests): Document it.
    
    * NEWS: Update existing items.
    
    A more general revision to groff(7) will follow.

 ChangeLog                | 17 +++++++++++++++++
 NEWS                     |  9 +++++----
 doc/groff.texi.in        |  4 ++--
 man/groff_diff.7.man     | 15 ++++++++++++++-
 src/roff/troff/input.cpp | 25 +++++++++++--------------
 5 files changed, 49 insertions(+), 21 deletions(-)









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66863>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to