gbranden pushed a commit to branch master
in repository groff.

commit 6038ee68eb4ecaa252d0b26ff0009f4d177492ed
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Aug 31 19:37:31 2025 -0500

    [troff]: "Asciify" device ext nodes as nothing.
    
    ...suppressing non-actionable diagnostic message.  (Device extension
    nodes are produced by the `device` and `devicem` requests, and the `\X`
    and `\Y` escape sequences.)
    
    * src/roff/troff/node.h (class device_extension_node): Declare `asciify`
      member function, thus overriding base class.
    
    * src/roff/troff/node.cpp (device_extension_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 39fe63e1c..ffec8515e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2025-08-31  G. Branden Robinson <[email protected]>
+
+       [troff]: "Asciify" device extension nodes as nothing,
+       suppressing non-actionable diagnostic message.  (Device
+       extension nodes are produced by the `device` and `devicem`
+       requests, and the `\X` and `\Y` escape sequences.)
+
+       * src/roff/troff/node.h (class device_extension_node): Declare
+       `asciify` member function, thus overriding base class.
+       * src/roff/troff/node.cpp (device_extension_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" tag nodes as nothing, suppressing
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 737316e0a..8b5e2980a 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4033,6 +4033,11 @@ void tag_node::asciify(macro *)
   delete this;
 }
 
+void device_extension_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 f92c4b940..c7321a319 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -589,6 +589,7 @@ public:
                        color * /* gcol */, color * /* fcol */,
                        statem * /* s */, int divlevel,
                        bool /* lacks_command_prefix */ = false);
+  void asciify(macro *);
   node *copy();
   void tprint(troff_output_file *);
   bool is_same_as(node *);

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to