gbranden pushed a commit to branch master
in repository groff.
commit d7b59df290a48ac76c3e13fcac88145b353cfe42
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Nov 28 15:59:40 2025 -0600
[troff]: Trivially refactor (read_delimited_name).
* src/roff/troff/input.cpp: Rename `get_delimited_name()` to
`read_delimited_name()` because it does not retrieve a property; it
advances the input stream pointer. Update declaration and definition.
(token::next): Update call site.
---
ChangeLog | 8 ++++++++
src/roff/troff/input.cpp | 6 +++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 31d93bd47..bd36ac1cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-11-28 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp: Trivially refactor. Rename
+ `get_delimited_name()` to `read_delimited_name()` because it
+ does not retrieve a property; it advances the input stream
+ pointer. Update declaration and definition.
+ (token::next): Update call site.
+
2025-11-23 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp (token::is_usable_as_delimiter): Use
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 86b9e6d0c..0ff52efd1 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -178,7 +178,7 @@ static bool read_delimited_number(units *, unsigned char,
units);
static symbol do_get_long_name(bool, char);
static bool get_line_arg(units *res, unsigned char si, charinfo **cp);
static bool read_size(int *);
-static symbol get_delimited_name();
+static symbol read_delimited_name();
static void init_registers();
static void trapping_blank_line();
@@ -2425,7 +2425,7 @@ void token::next()
case 'c':
goto ESCAPE_c;
case 'C':
- nm = get_delimited_name();
+ nm = read_delimited_name();
if (nm.is_null())
break;
type = TOKEN_SPECIAL_CHAR;
@@ -6138,7 +6138,7 @@ static bool read_size(int *x) // \s
}
}
-static symbol get_delimited_name()
+static symbol read_delimited_name()
{
token start_token;
start_token.next();
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit