gbranden pushed a commit to branch master
in repository groff.

commit cd653e52fa399b41c04d680671c44ae7ec865b7e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 16 14:41:22 2026 -0600

    src/preproc/pic/lex.cpp: Boolify a member var.
    
    * src/preproc/pic/lex.cpp (class copy_thru_input): Demote `done` member
      variable from `int` to `bool`.
    
      (copy_thru_input::copy_thru_input): Update constructor initializer to
      use Boolean, not integer, literal.
    
      (copy_thru_input::get_line): Assign to `done` using Boolean, not
      integer, literal.
    
    Continues the long process of fixing Savannah #66672.
---
 ChangeLog               | 11 +++++++++++
 src/preproc/pic/lex.cpp |  6 +++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 278309aa6..80df02eb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2026-11-16  G. Branden Robinson <[email protected]>
+
+       * src/preproc/pic/lex.cpp (class copy_thru_input): Demote `done`
+       member variable from `int` to `bool`.
+       (copy_thru_input::copy_thru_input): Update constructor
+       initializer to use Boolean, not integer, literal.
+       (copy_thru_input::get_line): Assign to `done` using Boolean, not
+       integer, literal.
+
+       Continues the long process of fixing Savannah #66672.
+
 2026-11-16  G. Branden Robinson <[email protected]>
 
        * src/preproc/pic/lex.cpp (do_copy, copy_file_thru): Revise
diff --git a/src/preproc/pic/lex.cpp b/src/preproc/pic/lex.cpp
index c03990a1f..d37a5c732 100644
--- a/src/preproc/pic/lex.cpp
+++ b/src/preproc/pic/lex.cpp
@@ -1562,7 +1562,7 @@ void do_copy(const char *filename)
 }
 
 class copy_thru_input : public input {
-  int done;
+  bool done;
   char *body;
   char *until;
   const char *p;
@@ -1634,7 +1634,7 @@ int copy_rest_thru_input::inget()
 }
 
 copy_thru_input::copy_thru_input(const char *b, const char *u)
-: done(0)
+: done(false)
 {
   ap = 0 /* nullptr */;
   body = process_body(b);
@@ -1737,7 +1737,7 @@ int copy_thru_input::get_line()
     line += '\0';
   }
   if (until != 0 && argc > 0 && strcmp(&line[argv[0]], until) == 0) {
-    done = 1;
+    done = true;
     return 0;
   }
   return (argc > 0) || ('\n' == c);

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

Reply via email to