gbranden pushed a commit to branch master
in repository groff.

commit 7d5be80f92e0dea939e0e74f5998a8320dc157c3
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Aug 9 02:45:01 2024 -0500

    [troff]: Trivially refactor.
    
    * src/roff/troff/input.cpp (input_stack::get, process_input_stack):
      Trivially refactor.  Rename global `old_have_formattable_input` to
      `have_formattable_input_on_interrupted_line`.  Yes, this identifier is
      as long as your arm, but it has a highly specialized purpose and needs
      to be intelligible in context.
---
 ChangeLog                | 9 +++++++++
 src/roff/troff/input.cpp | 6 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a8c03101d..101205061 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-08-09  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (input_stack::get)
+       (process_input_stack): Trivially refactor.  Rename global
+       `old_have_formattable_input` to
+       `have_formattable_input_on_interrupted_line`.  Yes, this
+       identifier is as long as your arm, but it has a highly
+       specialized purpose and needs to be intelligible in context.
+
 2024-08-08  G. Branden Robinson <[email protected]>
 
        * tmac/doc-old.tmac: Migrate from font name "C" to "CR", fixing
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 61529276c..7a4426c16 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -117,7 +117,7 @@ static bool have_formattable_input = false;
 // Consider:
 //   \f[TB]\m[red]hello\c
 //   \f[]\m[]
-static bool old_have_formattable_input = false;
+static bool have_formattable_input_on_interrupted_line = false;
 
 bool device_has_tcommand = false;      // 't' output command supported
 static bool want_unsafe_requests = false;      // be safer by default
@@ -593,7 +593,7 @@ inline int input_stack::get(node **np)
 {
   int res = (top->ptr < top->eptr) ? *top->ptr++ : finish_get(np);
   if (res == '\n') {
-    old_have_formattable_input = have_formattable_input;
+    have_formattable_input_on_interrupted_line = have_formattable_input;
     have_formattable_input = false;
   }
   return res;
@@ -3046,7 +3046,7 @@ void process_input_stack()
       }
     case token::TOKEN_NEWLINE:
       {
-       if (bol && !old_have_formattable_input
+       if (bol && !have_formattable_input_on_interrupted_line
            && !curenv->get_prev_line_interrupted())
          trapping_blank_line();
        else {

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

Reply via email to