bugGNU roff - Bugs: bug #64233, [troff] make requests' treatment...

 
 

bug #64233: [troff] make requests' treatment of Boolean arguments more consistent

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Mon 22 May 2023 05:32:39 AM UTC
   
 
Category:  Core Severity:  1 - Wish
Item Group:  Feature change Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 20 Feb 2024 04:36:04 AM UTC, comment #1: 

"I was back at the flat so quick that I nearly met myself coming out." — P. G. Wodehouse

In groff development, I suppose, 9 months is speedy.

(The truth is, I'd forgotten I filed this.)


commit d592ab9e3d3f9efeacece25ed8b03676031bd02e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Feb 11 10:21:25 2024 -0600

    [troff]: Alter color, cp, linetabs, vpt requests.

    [troff]: The `color`, `cp`, `linetabs`, and `vpt` requests now interpret
    arguments with negative values as instructions to disable the
    corresponding feature, using the *roff integer-to-Boolean conversion
    idiom instead of the C/C++ one.  Thus, if you invoke these requests with
    a register interpolation, the outcome agrees with an `if` test of the
    register's value.

    * src/roff/troff/div.cpp (vertical_position_traps):
    * src/roff/troff/env.cpp (widow_control_request) [WIDOW_CONTROL]
      (line_tabs_request):
    * src/roff/troff/input.cpp (activate_color, compatible): Do it.

    * doc/groff.texi.in (Tabs and Fields, Colors, Vertical Position Traps)
      (Compatibility Mode):
    * man/groff.7.man (Syntax reference conventions)
      (Request short reference):
    * man/groff_diff.7.man (New requests): Document it.


G. Branden Robinson <gbranden>
Group administrator
Mon 22 May 2023 05:32:39 AM UTC, original submission:  

In *roff, negative values are false when interpreted in a Boolean context.

But there are some nitty exceptions.


.color 0
.tm \n[.color]
0
.color -1
.tm \n[.color]
1


Explore making this more consistent.

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

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-20 gbranden Severity3 - Normal 1 - Wish
        Item GroupWarning/Suspicious behaviour Feature change
        StatusNone Fixed
        Assigned toNone gbranden
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0
    2023-05-22 gbranden Item GroupNone Warning/Suspicious behaviour

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code