Update of bug #67711 (group groff):
Status: In Progress => Fixed
Open/Closed: Open => Closed
Planned Release: None => 1.24.0
_______________________________________________________
Follow-up Comment #19:
commit 88a864ffbd1e3691ea2f99212970e33e4b544909
Author: G. Branden Robinson <[email protected]>
Date: Wed Dec 3 17:40:39 2025 -0600
[troff]: Fix Savannah #67711.
Describe character (classes) better. Character classes have one more
property beyond their name, and lists of ranges and nested classes: a
set of character flags that the formatter bitwise "or"s with any
character members of the class (recursively). However, the computation
of flags applicable to a character has been done lazily almost from the
time the character class feature was first implemented, presumably to
keep a `cflags` request on a highly populated character class from
taking a lot of time. Improve the output of `pchar` accordingly. When
reporting properties of a character class, report the flags associated
with it. When reporting properties of a character, if it is a member of
any class, compute its "effective" character flags and report them in
distinction to its "inherent" character flags if they differ. Then,
revert the lazy computation of the effective character flags so that the
`pchar` request has no visible effect on formatter state; we want this
property for debugging documents, avoiding Heisenbugs.
* roff/troff/charinfo.h (class charinfo): Declare new `describe_flags()`
member function returning `void`.
* src/roff/troff/input.cpp (charinfo::describe_flags): Refactor the
tedious flags-to-English logic from `charinfo::dump_flags()` into this
new member function, since we might need to perform this translation
more than once when dumping a character's properties.
(charinfo::describe_flags): Strip out flags-to-English translation as
above. For a character per se (not a class), report assigned
character flags thereto as "inherent". Then save them, do the lazy
computation that normally occurs when formatting a character, report
the combination as the "effective flags" if they differ, and restore
the saved flags.
(charinfo::dump): Call `dump_flags()` on character classes.
Fixes <https://savannah.gnu.org/bugs/?67711>. Thanks to Dave Kemper for
prompting me to better understand this aspect of GNU troff's design.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67711>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
