bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64469] [troff] `-o` with valid but inapplicable argument provokes


From: G. Branden Robinson
Subject: [bug #64469] [troff] `-o` with valid but inapplicable argument provokes incomprehensible output driver diagnostic
Date: Thu, 17 Oct 2024 20:42:34 -0400 (EDT)

Update of bug #64469 (group groff):

                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                 
         Planned Release:                    None => 1.24.0                 

    _______________________________________________________

Follow-up Comment #4:


commit 40644c648efc313eb818b89725787fe2a10ba773
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Oct 17 11:11:45 2024 -0500

    [troff]: Fix Savannah #64469 (`-o` out of bounds).
    
    [troff]: Better handle inapplicable or out-of-bounds (but still
    numerically valid) output page selection list (`-o` argument).
    
    * src/roff/troff/node.cpp: New global Boolean
      `was_any_page_in_output_list` tracks this datum; defaults false.
    
      (troff_output_file::trailer): When finishing up, don't write a
      "trailer" grout command (and vertical motion) if no page ever began.
      Insted, throw a warning in category `range`.
    
      (real_output_file::begin_page): Make `was_any_page_in_output_list`
      true if any page is written.
    
    Fixes <https://savannah.gnu.org/bugs/?64469>.  Thanks to Dave Kemper for
    the report.
    
    Exhibit:
    
    $ echo hello | ~/groff-stable/bin/groff -o 2
    grops:<standard input>:5: fatal error: 'V' command invalid before first
'p' command
    $ echo hello | ./build/test-groff -o 2 > /dev/null
    $ echo hello | ./build/test-groff -o 2 -wrange > /dev/null
    troff: warning: no pages in output page selection list




    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]