gbranden pushed a commit to branch master
in repository groff.
commit 6ad5fe14d987be2aee1fb844a73f36fda436b49e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Nov 20 12:26:53 2025 -0600
[troff]: Slightly refactor.
* src/roff/troff/input.cpp (print_character_request): Delay gathering of
the current token's `charinfo` until we absolutely need it.
---
ChangeLog | 6 ++++++
src/roff/troff/input.cpp | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1d78729a3..d3a9cad55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-11-20 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (print_character_request): Slightly
+ refactor; delay gathering of the current token's `charinfo`
+ until we absolutely need it.
+
2025-11-20 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 8cf444790..3b8ab5d9e 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -5018,13 +5018,13 @@ static void print_character_request()
charinfo *ci;
do {
tok.skip_spaces();
- ci = tok.get_charinfo(false /* required */,
- true /* suppress creation */);
if (!tok.is_character()) {
error("character report request expects characters or character"
" classes as arguments; got %1", tok.description());
break;
}
+ ci = tok.get_charinfo(false /* required */,
+ true /* suppress creation */);
if (0 /* nullptr */ == ci)
warning(WARN_CHAR, "%1 is not defined", tok.description());
else {
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit