gbranden pushed a commit to branch master
in repository groff.

commit e78ebe75037bca90ad7a55529e1b4ab0c55c8d56
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Aug 19 16:23:24 2024 -0500

    [troff]: Put fewer newlines on input stack. (1/2)
    
    * src/roff/troff/input.cpp (do_overstrike, do_bracket)
      (do_device_control): Stop pushing a newline onto the input stack when
      encountering one; this character can no longer serve double duty as a
      delimiter and a formattable newline.
---
 ChangeLog                |  7 +++++++
 src/roff/troff/input.cpp | 12 ------------
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f700723e5..ca4778c12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-08-19  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (do_overstrike, do_bracket)
+       (do_device_control): Stop pushing a newline onto the input stack
+       when encountering one; this character can no longer serve double
+       duty as a delimiter and a formattable newline.
+
 2024-08-19  G. Branden Robinson <[email protected]>
 
        [troff]: Fix Savannah #66113 (misleading `\B` diagnostic).
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index a7f57650d..f4c367e9e 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -1576,10 +1576,6 @@ node *do_overstrike() // \o
   }
   for (;;) {
     tok.next();
-    if (tok.is_newline()) {
-      input_stack::push(make_temp_iterator("\n"));
-      break;
-    }
     if (tok.is_newline() || tok.is_eof()) {
       // token::description() writes to static, class-wide storage, so
       // we must allocate a copy of it before issuing the next
@@ -1627,10 +1623,6 @@ static node *do_bracket() // \b
   }
   for (;;) {
     tok.next();
-    if (tok.is_newline()) {
-      input_stack::push(make_temp_iterator("\n"));
-      break;
-    }
     if (tok.is_newline() || tok.is_eof()) {
       // token::description() writes to static, class-wide storage, so
       // we must allocate a copy of it before issuing the next
@@ -5754,10 +5746,6 @@ static node *do_device_control() // \X
   macro mac;
   for (;;) {
     tok.next();
-    if (tok.is_newline()) {
-      input_stack::push(make_temp_iterator("\n"));
-      break;
-    }
     if (tok.is_newline() || tok.is_eof()) {
       // token::description() writes to static, class-wide storage, so
       // we must allocate a copy of it before issuing the next

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

Reply via email to