gbranden pushed a commit to branch master
in repository groff.
commit a2e7afe9d3e42ecf294ae6885b66bcbf1ca3581f
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Aug 31 18:42:31 2025 -0500
[troff]: "Asciify" xparent dummy nodes as nothing.
...suppressing non-actionable diagnostic message. (The output line
continuation escape sequence produces a transparent dummy node when
formatted.)
* src/roff/troff/node.h (class transparent_dummy_node): Declare
`asciify` member function, thus overriding base class.
* src/roff/troff/node.cpp (transparent_dummy_node::asciify): New member
function does "nothing" in the same way that those of
`line_start_node` and `vertical_size_node`s do: delete the `this`
object and return.
---
ChangeLog | 14 ++++++++++++++
src/roff/troff/node.cpp | 5 +++++
src/roff/troff/node.h | 1 +
3 files changed, 20 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 445c75fb4..ee6c35a02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2025-08-31 G. Branden Robinson <[email protected]>
+
+ [troff]: "Asciify" transparent dummy nodes as nothing,
+ suppressing non-actionable diagnostic message. (The output line
+ continuation escape sequence produces a transparent dummy node
+ when formatted.)
+
+ * src/roff/troff/node.h (class transparent_dummy_node): Declare
+ `asciify` member function, thus overriding base class.
+ * src/roff/troff/node.cpp (transparent_dummy_node::asciify): New
+ member function does "nothing" in the same way that those of
+ `line_start_node` and `vertical_size_node`s do: delete the
+ `this` object and return.
+
2025-08-31 G. Branden Robinson <[email protected]>
[troff]: "Asciify" dummy nodes as nothing, suppressing
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 95f0cfe2e..340c0f4b1 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4023,6 +4023,11 @@ void dummy_node::asciify(macro *)
delete this;
}
+void transparent_dummy_node::asciify(macro *)
+{
+ delete this;
+}
+
breakpoint *node::get_breakpoints(hunits /* width */, int /* nspaces */,
breakpoint *rest, bool /* is_inner */)
{
diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h
index f79204a33..165606da9 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -478,6 +478,7 @@ public:
class transparent_dummy_node : public node {
public:
transparent_dummy_node(node * nd = 0 /* nullptr */) : node(nd) {}
+ void asciify(macro *);
node *copy();
bool is_same_as(node *);
const char *type();
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit