gbranden pushed a commit to branch master
in repository groff.

commit d8beb70ee52dfb56cd19b361421a36152a4c9d6d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jan 15 21:04:57 2025 -0600

    [grolj4]: Migrate `isdigit()` to `csdigit()`.
    
    * src/devices/grolj4/lj4.cpp (main): Use "libgroff.a"'s facility for
      determining character class membership, to conform with the rest of
      the code base.  Include relevant header file, "cset.h".
---
 ChangeLog                  | 8 ++++++++
 src/devices/grolj4/lj4.cpp | 8 +++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1c4057b01..4120d5337 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-01-15  G. Branden Robinson <[email protected]>
+
+       [grolj4]: Migrate `isdigit()` to `csdigit()`.
+
+       * src/devices/grolj4/lj4.cpp (main): Use "libgroff.a"'s facility
+       for determining character class membership, to conform with the
+       rest of the code base.
+
 2025-01-15  G. Branden Robinson <[email protected]>
 
        [grohtml]: Migrate `isspace()` to `csspace()`.
diff --git a/src/devices/grolj4/lj4.cpp b/src/devices/grolj4/lj4.cpp
index e830026b2..af174343f 100644
--- a/src/devices/grolj4/lj4.cpp
+++ b/src/devices/grolj4/lj4.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2025 Free Software Foundation, Inc.
      Written by James Clark ([email protected])
 
 This file is part of groff.
@@ -43,9 +43,11 @@ X command to include bitmap graphics
 
 #include <getopt.h> // getopt_long()
 
-#include "driver.h"
 #include "nonposix.h"
 
+#include "cset.h" // csdigit()
+#include "driver.h"
+
 extern "C" const char *Version_string;
 
 static struct {
@@ -635,7 +637,7 @@ int main(int argc, char **argv)
       // ignore include search path
       break;
     case 'd':
-      if (!isdigit(*optarg))   // this ugly hack prevents -d without
+      if (!csdigit(*optarg))   // this ugly hack prevents -d without
        optind--;               //  args from messing up the arg list
       duplex_flag = atoi(optarg);
       if (duplex_flag != 1 && duplex_flag != 2) {

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

Reply via email to