gbranden pushed a commit to branch master
in repository groff.

commit b039f8c3d1d2c00e3bb408768af2f8025b4c317c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Mar 29 22:51:05 2025 -0500

    [troff]: Drop warning diagnostic.
    
    * src/roff/troff/input.cpp (token::next): Drop warning diagnostic.  DWB
      troff accepts a negative argument to the `\N` escape sequence; so
      should we.  (Interestingly, it seems to be difficult or impossible to
      get Heirloom Doctools to emit a "trout" `N` command--some table maps
      negative character indices to special character names.  For instance,
      we expect `N-1` but get `Chy`.  If no mapping exists for `\N`'s
      argument, it emits _no_ trout command for the character.)
---
 ChangeLog                | 11 +++++++++++
 src/roff/troff/input.cpp |  5 -----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ec672384e..7c6421437 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,17 @@
        If none are found, use /bin/sh anyway and surrender to our
        run-time fate.
 
+2025-03-29  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (token::next): Drop warning
+       diagnostic.  DWB troff accepts a negative argument to the `\N`
+       escape sequence; so should we.  (Interestingly, it seems to be
+       difficult or impossible to get Heirloom Doctools to emit a
+       "trout" `N` command--some table maps negative character indices
+       to special character names.  For instance, we expect `N-1` but
+       get `Chy`.  If no mapping exists for `\N`'s argument, it emits
+       _no_ trout command for the character.)
+
 2025-03-29  G. Branden Robinson <[email protected]>
 
        * m4/groff.m4 (GROFF_PROG_SH_IS_POSIX_8_CONFORMING): Rename
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 0530e4df2..da3311fac 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -2425,11 +2425,6 @@ void token::next()
       case 'N':
        if (!read_delimited_number(&val, 0))
          break;
-       if (val < 0) {
-         warning(WARN_CHAR, "character with negative index %1 is"
-                 " invalid; ignoring", val);
-         break;
-       }
        type = TOKEN_INDEXED_CHAR;
        return;
       case 'o':

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

Reply via email to