gbranden pushed a commit to branch master
in repository groff.

commit e7d4b699ecfb72cea091c447f77c4fb6f8d12974
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Aug 19 10:39:42 2024 -0500

    [troff]: Boolify and rename `backtrace_flag`.
    
    Boolify and rename `backtrace_flag`, demoting it from `int` to
    `bool` and calling it `want_backtraces`.  Initialize and assign to it
    using Boolean, not integer, literals.
    
    * src/roff/troff/input.cpp (main, do_error): Do it.
---
 ChangeLog                | 8 ++++++++
 src/roff/troff/input.cpp | 6 +++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a846b59dd..1efd39546 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-08-19  G. Branden Robinson <[email protected]>
+
+       [troff]: Boolify and rename `backtrace_flag`, demoting it from
+       `int` to `bool` and calling it `want_backtraces`.  Initialize
+       and assign to it using Boolean, not integer, literals.
+
+       * src/roff/troff/input.cpp (main, do_error): Do it.
+
 2024-08-19  G. Branden Robinson <[email protected]>
 
        [troff]: Boolify and rename `class_flag`, demoting it from `int`
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index b9159d2be..c7ed0922a 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -89,7 +89,7 @@ token tok;
 bool want_break = false;
 bool using_character_classes = false;
 bool want_color_output = true;
-static int backtrace_flag = 0;
+static bool want_backtraces = false;
 char *pipe_command = 0 /* nullptr */;
 charinfo *charset_table[256];
 unsigned char hpf_code_table[256];
@@ -8492,7 +8492,7 @@ int main(int argc, char **argv)
       iflag = 1;
       break;
     case 'b':
-      backtrace_flag = 1;
+      want_backtraces = true;
       break;
     case 'a':
       want_abstract_output = true;
@@ -9161,7 +9161,7 @@ static void do_error(error_type type,
   int lineno;
   if (inhibit_errors && (type < FATAL))
     return;
-  if (backtrace_flag)
+  if (want_backtraces)
     input_stack::backtrace();
   if (!get_file_line(&filename, &lineno))
     filename = 0 /* nullptr */;

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

Reply via email to