gbranden pushed a commit to branch master
in repository groff.
commit 99e48484845ce6786de84b6e9af158280541ed7d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Dec 7 20:27:40 2025 -0600
src/roff/troff/input.cpp: Trivially refactor.
* src/roff/troff/input.cpp: Rename `read_delimited_name()` to
`read_delimited_identifier()`. This function isn't actually used for
"names" (identifiers of macros, strings, and diversions), but, at
present, only for special character or class identifiers. But its
operation is sufficiently general to handle any GNU troff identifier.
(read_delimited_name): Rename declaration and definition from this...
(read_delimited_identifier): ...to this.
(token::next): Update call site.
---
ChangeLog | 13 +++++++++++++
src/roff/troff/input.cpp | 6 +++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7b8a4ecc9..fe2454b6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2025-12-07 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp: Trivially refactor. Rename
+ `read_delimited_name()` to `read_delimited_identifier()`. This
+ function isn't actually used for "names" (identifiers of macros,
+ strings, and diversions), but, at present, only for special
+ character or class identifiers. But its operation is
+ sufficiently general to handle any GNU troff identifier.
+ (read_delimited_name): Rename declaration and definition from
+ this...
+ (read_delimited_identifier): ...to this.
+ (token::next): Update call site.
+
2025-12-07 G. Branden Robinson <[email protected]>
* tmac/ja.tmac:
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 19f344697..4a7a07a19 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -180,7 +180,7 @@ static bool read_delimited_measurement(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 read_delimited_name();
+static symbol read_delimited_identifier();
static void init_registers();
static void trapping_blank_line();
@@ -2429,7 +2429,7 @@ void token::next()
case 'c':
goto ESCAPE_c;
case 'C':
- nm = read_delimited_name();
+ nm = read_delimited_identifier();
if (nm.is_null())
break;
type = TOKEN_SPECIAL_CHAR;
@@ -6167,7 +6167,7 @@ static bool read_size(int *x) // \s
}
}
-static symbol read_delimited_name()
+static symbol read_delimited_identifier()
{
token start_token;
start_token.next();
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit