gbranden pushed a commit to branch master
in repository groff.

commit 97c22ed30d3b624b89f243bb9335519b1dbf8f53
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jan 28 14:48:19 2026 -0600

    [troff]: Improve diagnostic message contents.
    
    * src/roff/troff/input.cpp (token::description): Refer to C0 control
      characters (that are valid as GNU troff input) and Basic Latin DEL
      (all unprintable) by their decimal code points, not by writing them
      out literally.
    
    Noted while working on Savannah #67978.
---
 ChangeLog                | 9 +++++++++
 src/roff/troff/input.cpp | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index df1316ed2..95f42af0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2026-01-28  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (token::description): Refer to C0
+       control characters (that are valid as GNU troff input) and Basic
+       Latin DEL (all unprintable) by their decimal code points, not by
+       writing them out literally.
+
+       Noted while working on Savannah #67978.
+
 2026-01-02  G. Branden Robinson <[email protected]>
 
        [troff]: Fix Savannah #64300.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 1594a80fa..ae92029ab 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -3013,7 +3013,7 @@ const char *token::description()
       (void) snprintf(buf, bufsz, "character \"%c\"", c);
       return buf;
     }
-    else if (c < 128) {
+    else if ((c > 31) && (c < 127)) {
       (void) snprintf(buf, bufsz, "character '%c'", c);
       return buf;
     }

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

Reply via email to