gbranden pushed a commit to branch master
in repository groff.

commit e89dce5d1bd51f872f9f7cc392919269d57c55c9
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 16 14:44:07 2026 -0600

    src/preproc/pic/lex.cpp: Boolify.
    
    * src/preproc/pic/lex.cpp (get_delimited): Boolify.  Demote return type
      from `int` to `bool`.  Return Boolean, not integer, literals.
    
    Continues the long process of fixing Savannah #66672.
---
 ChangeLog               | 8 ++++++++
 src/preproc/pic/lex.cpp | 9 ++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 80df02eb8..627e824ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-11-16  G. Branden Robinson <[email protected]>
+
+       * src/preproc/pic/lex.cpp (get_delimited): Boolify.  Demote
+       return type from `int` to `bool`.  Return Boolean, not integer,
+       literals.
+
+       Continues the long process of fixing Savannah #66672.
+
 2026-11-16  G. Branden Robinson <[email protected]>
 
        * src/preproc/pic/lex.cpp (class copy_thru_input): Demote `done`
diff --git a/src/preproc/pic/lex.cpp b/src/preproc/pic/lex.cpp
index d37a5c732..7adcf41bc 100644
--- a/src/preproc/pic/lex.cpp
+++ b/src/preproc/pic/lex.cpp
@@ -1352,8 +1352,7 @@ static int get_token(bool want_macro_expansion = true)
   }
 }
 
-// TODO: boolify
-static int get_delimited()
+static bool get_delimited()
 {
   token_buffer.clear();
   int c = input_stack::get_char();
@@ -1361,7 +1360,7 @@ static int get_delimited()
     c = input_stack::get_char();
   if (EOF == c) {
     lex_error("missing delimiter");
-    return 0;
+    return false;
   }
   context_buffer = char(c);
   int had_newline = 0; // TODO: boolify
@@ -1372,7 +1371,7 @@ static int get_delimited()
     c = input_stack::get_char();
     if (EOF == c) {
       lex_error("missing closing delimiter");
-      return 0;
+      return false;
     }
     if ('\n' == c)
       had_newline = 1;
@@ -1419,7 +1418,7 @@ static int get_delimited()
       break;
     token_buffer += c;
   }
-  return 1;
+  return true;
 }
 
 static void do_define()

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

Reply via email to