Update of bug #66815 (group groff):
Status: Fixed => None
Open/Closed: Closed => Open
_______________________________________________________
Follow-up Comment #6:
Hmm, this may be a record for regressing a fix.
$ printf '\\Z@abc\\h#6n#@def\n' | ./build/test-groff -a
<beginning of page>
def
$ git bisect bad
d667af72e162c3ef269f7da269ab75f186ad9e4c is the first bad commit
commit d667af72e162c3ef269f7da269ab75f186ad9e4c
Author: G. Branden Robinson <[email protected]>
Date: Wed Feb 26 04:40:23 2025 -0600
[troff]: Improve `node` types' const-correctness.
* src/roff/troff/node.{h,cpp}: Improve `const`-correctness of
`ascii_output_file` class and related helper functions.
* src/roff/troff/node.h (struct node, class space_node)
(class hmotion_node, class space_char_hmotion_node)
(class zero_width_node, class left_italic_corrected_node): Mark
`ascii_print()` member functions' `ascii_output_file` pointer argument
as `const`.
* src/roff/troff/node.cpp (class ascii_output_file): Declare `outc()`
and `outs()` member functions as `const` (for our C-only readers, this
means they don't mutate the object upon which they're called).
(ascii_output_file::outc, ascii_output_file::outs): Mark them as
`const` in corresponding definitions.
(class glyph_node, class ligature_node, class kern_pair_node)
(class dbreak_node, class glyph_node, class ligature_node)
(class italic_corrected_node, class break_char_node)
(class composite_node): Mark `ascii_print()` member functions'
`ascii_output_file` pointer argument as `const`.
(italic_corrected_node::ascii_print)
(break_char_node::ascii_print, dbreak_node::ascii_print)
(kern_pair_node::ascii_print, node::ascii_print)
(space_node::ascii_print, hmotion_node::ascii_print)
(space_char_hmotion_node::ascii_print)
(zero_width_node::ascii_print, composite_node::ascii_print)
(left_italic_corrected_node::ascii_print): Mark them as `const` in
corresponding definitions.
(ascii_print_node_list, ascii_print_reverse_node_list): Mark
`ascii_output_file` pointer argument as `const`.
ChangeLog | 33 ++++++++++++++++++++++++++++++
src/roff/troff/node.cpp | 54
+++++++++++++++++++++++++------------------------
src/roff/troff/node.h | 12 +++++------
3 files changed, 67 insertions(+), 32 deletions(-)
I'll see if I can fix it. I have a more ambitious refactoring in mind that I
hope will comprehensively address the issue I raised in comment #5.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66815>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
