Update of bug #67711 (group groff):
Status: Need Info => In Progress
Assigned to: barx => gbranden
_______________________________________________________
Follow-up Comment #14:
I expect to resolve this in my next push.
This change might help us root-cause bug #67571.
Even if not, it's still worth doing.
commit 308c00f53d1ae9622e5e26c90e5885e4d4c9b1a2
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 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
