gbranden pushed a commit to branch master
in repository groff.

commit 4cd00cc90206308fb8c9166aacae7627644a0139
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 16 14:49:42 2026 -0600

    src/preproc/pic/lex.cpp: Boolify member function.
    
    * src/preproc/pic/lex.cpp (class copy_thru_input): Boolify `get_line()`
      member function.  Demote return type from `int` to `bool`.
    
      (copy_thru_input::get_line): Return Boolean, not integer, literals.
    
    Continues the long process of fixing Savannah #66672.
---
 ChangeLog               | 10 ++++++++++
 src/preproc/pic/lex.cpp |  8 ++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 627e824ce..ca845fb3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2026-11-16  G. Branden Robinson <[email protected]>
+
+       * src/preproc/pic/lex.cpp (class copy_thru_input): Boolify
+       `get_line()` member function.  Demote return type from `int` to
+       `bool`.
+       (copy_thru_input::get_line): 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 (get_delimited): Boolify.  Demote
diff --git a/src/preproc/pic/lex.cpp b/src/preproc/pic/lex.cpp
index 7adcf41bc..963cdfa84 100644
--- a/src/preproc/pic/lex.cpp
+++ b/src/preproc/pic/lex.cpp
@@ -1569,7 +1569,7 @@ class copy_thru_input : public input {
   int argv[pic_macro_maximum_arg_count];
   size_t argc;
   string line;
-  int get_line();
+  bool get_line();
   virtual int inget() = 0;
 public:
   copy_thru_input(const char *b, const char *u);
@@ -1710,10 +1710,10 @@ int copy_thru_input::peek()
   return EOF;
 }
 
-int copy_thru_input::get_line()
+bool copy_thru_input::get_line()
 {
   if (done)
-    return 0;
+    return false;
   line.clear();
   argc = 0;
   int c = inget();
@@ -1737,7 +1737,7 @@ int copy_thru_input::get_line()
   }
   if (until != 0 && argc > 0 && strcmp(&line[argv[0]], until) == 0) {
     done = true;
-    return 0;
+    return false;
   }
   return (argc > 0) || ('\n' == c);
 }

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

Reply via email to