gbranden pushed a commit to branch master
in repository groff.

commit d8c1abe243d61cbc0521e7b66c5ca990b9c3baa1
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Dec 17 16:56:15 2025 -0600

    src/roff/troff/input.cpp: Trivially refactor (1).
    
    * src/roff/troff/input.cpp (get_line_arg): Rename this...
      (read_line_rule_expression): ...to this.  Update forward declaration.
    
      (token:next): Update call site.
---
 ChangeLog                |  7 +++++++
 src/roff/troff/input.cpp | 12 +++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f7170e7ad..9c990f24a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-12-17  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (get_line_arg): Rename this...
+       (read_line_rule_expression): ...to this.  Update forward
+       declaration.
+       (token:next): Update call site.
+
 2025-12-17  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (token::is_usable_as_delimiter):
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 17cf93c5e..cc18fd9b6 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -177,7 +177,8 @@ static bool read_delimited_measurement(units *,
        unsigned char /* scaling unit */, units /* previous value */);
 static symbol read_input_until_terminator(bool /* required */,
                                          unsigned char /* end char */);
-static bool get_line_arg(units *res, unsigned char si, charinfo **cp);
+static bool read_line_rule_expression(units *res, unsigned char si,
+                                     charinfo **cp);
 static bool read_size(int *);
 static symbol read_delimited_identifier();
 static void init_registers();
@@ -2520,7 +2521,8 @@ void token::next()
       case 'L':
        {
          charinfo *s = 0 /* nullptr */;
-         if (!get_line_arg(&x, (cc == 'l' ? 'm': 'v'), &s))
+         if (!read_line_rule_expression(&x, (cc == 'l' ? 'm': 'v'),
+                                        &s))
            break;
          if (0 /* nullptr */ == s)
            s = lookup_charinfo(cc == 'l' ? "ru" : "br");
@@ -6022,7 +6024,11 @@ static bool read_delimited_measurement(units *n, 
unsigned char si)
 }
 
 // \l, \L
-static bool get_line_arg(units *n, unsigned char si, charinfo **cip)
+//
+// Here's some syntax unique to these escape sequences: a horizontal
+// measurment followed immediately by a character.
+static bool read_line_rule_expression(units *n, unsigned char si,
+                                     charinfo **cip)
 {
   assert(cip != 0 /* nullptr */);
   token start_token;

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

Reply via email to