[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #55154] .tr has undocumented and inconsistent space-character restr
From: |
G. Branden Robinson |
Subject: |
[bug #55154] .tr has undocumented and inconsistent space-character restrictions |
Date: |
Thu, 11 Jul 2024 13:34:34 -0400 (EDT) |
Update of bug #55154 (group groff):
Assigned to: None => barx
_______________________________________________________
Follow-up Comment #14:
Try this patch:
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index b00f8377e..2c6cbbec7 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -2183,6 +2183,8 @@ void glyph_node::ascii_print(ascii_output_file *ascii)
ascii->outs(ci->nm.contents());
}
+// XXX: This and `composite_node::dump_node()` are identical. C++
+// presumably has several different solutions for this. Pick one.
void glyph_node::dump_node()
{
unsigned char c = ci->get_ascii_code();
@@ -4279,6 +4281,7 @@ public:
bool is_tag();
void vertical_extent(vunits *, vunits *);
vunits vertical_width();
+ void dump_node();
};
composite_node::composite_node(node *p, charinfo *c, tfont *t, statem *s,
@@ -4918,6 +4921,26 @@ void composite_node::tprint(troff_output_file *out)
out->right(track_kern);
}
+// XXX: This and `glyph_node::dump_node()` are identical. C++
+// presumably has several different solutions for this. Pick one.
+void composite_node::dump_node()
+{
+ unsigned char c = ci->get_ascii_code();
+ fprintf(stderr, "{type: %s, character: ", type());
+ if (c)
+ fprintf(stderr, "\"%c\"", c);
+ else
+ fprintf(stderr, "\"\\%s\"", ci->nm.contents());
+ fputs(", ", stderr);
+ if (push_state)
+ fprintf(stderr, "push_state, ");
+ if (state)
+ state->display_state();
+ fprintf(stderr, "diversion level: %d", div_nest_level);
+ fputs("}", stderr);
+ fflush(stderr);
+}
+
static node *make_composite_node(charinfo *s, environment *env)
{
int fontno = env_definite_font(env);
Here's your exhibit.
$ ./build/test-groff -z EXPERIMENTS/55154.tr
{type: line_start_node, diversion level: 0},
{type: glyph_node, character: "a", diversion level: 0},
{type: composite_node, character: "b", diversion level: 0},
{type: glyph_node, character: "c", diversion level: 0},
{type: word_space_node, diversion level: 0},
{type: glyph_node, character: "c", diversion level: 0},
{type: composite_node, character: "b", diversion level: 0},
{type: glyph_node, character: "a", diversion level: 0}
{type: line_start_node, diversion level: 0},
{type: glyph_node, character: "a", diversion level: 0},
{type: unbreakable_space_node, diversion level: 0},
{type: glyph_node, character: "c", diversion level: 0},
{type: word_space_node, diversion level: 0},
{type: glyph_node, character: "c", diversion level: 0},
{type: unbreakable_space_node, diversion level: 0},
{type: glyph_node, character: "a", diversion level: 0}
Assigning back to you because I'm not clear where we are on this, or whether
the foregoing illuminates anything.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55154>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
- [bug #55154] .tr has undocumented and inconsistent space-character restrictions,
G. Branden Robinson <=
Message not available
Message not available
Message not available
Message not available