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

                 Summary: [troff] `stringup` and `stringdown` requests format
excess arguments
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Sun 16 Aug 2026 07:10:51 PM UTC
                Category: Core
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: In Progress
                 Privacy: Public
             Assigned to: gbranden
             Open/Closed: Open
         Discussion Lock: Unlocked
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sun 16 Aug 2026 07:10:51 PM UTC By: G. Branden Robinson <gbranden>
[https://lists.gnu.org/archive/html/groff/2026-08/msg00058.html Reported by
Ingo Schwarze to the _groff_ list.]


G. Branden Robinson wrote on Sun, Aug 09, 2026 at 03:35:57AM -0500:

> I look forward to seeing the new requests I've added since groff
> 1.22.4 show up.  ;-)
> 
> stringup
> stringdown

i just implemented these two, see the commit appended below.

With groff-1.24, i see one detail of behaviour that feels at least
somewhat ugly to me, arguably even buggy.

The .stringup request is documented to accept exactly one argument.
However, when i append additional bogus arguments, those sneak
through verbatim to the output stream, at the place of the request,
even though the request is not documented to produce output.

For example, with groff-1.24, the input

  .ds mynm content
  .stringup mynm trailing garbage
  \*[mynm]

produces this output for me:

  trailing garbage CONTENT

Groff prints no wraning or error message.

In mandoc, i chose to instead only print

  CONTENT

to standard output and the following to standard error output:

  mandoc: stringup_bad.in:7:16: ERROR: skipping excess arguments: \
          stringup ... trailing garbage


Ingo's right.

Looking at the code, the requests were born with this defect.  I didn't
understand GNU _troff_'s lexical analysis process as well back then as I do
now.

Fix in progress.







    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature

Reply via email to