gbranden pushed a commit to branch master
in repository groff.
commit 602354f332a38f8c84e86c5e0384662c6bdb4f6d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Nov 24 11:42:14 2026 -0600
src/roff/troff/node.cpp: Trivially refactor.
* src/roff/troff/node.cpp (mount_font_at_position_request)
(assign_style_to_font_mounting_position_request): Rename local
variable `internal_name`, populated by `read_identifier()`, to `id`,
to dispel some of groff's maddeningly confusing legacy of naming.
---
ChangeLog | 8 ++++++++
src/roff/troff/node.cpp | 15 +++++++--------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 37d25c3a1..32085bce4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-11-24 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/node.cpp (mount_font_at_position_request)
+ (assign_style_to_font_mounting_position_request): Trivially
+ refactor. Rename local variable `internal_name`, populated by
+ `read_identifier()`, to `id`, to dispel some of groff's
+ maddeningly confusing legacy of naming.
+
2026-11-24 G. Branden Robinson <[email protected]>
* src/roff/troff/node.cpp (class font_info): Trivially refactor.
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index e795bcb37..e63e3c12a 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -6934,18 +6934,17 @@ static void mount_font_at_position_request() // .fp
if (n < 0)
error("font mounting position %1 is negative", n);
else {
- symbol internal_name
- = read_identifier(true /* want_diagnostic */);
- if (!internal_name.is_null()) {
+ symbol id = read_identifier(true /* want_diagnostic */);
+ if (!id.is_null()) {
symbol filename = read_long_identifier();
- if (!mount_font_at_position(internal_name, n, filename)) {
+ if (!mount_font_at_position(id, n, filename)) {
string msg;
if (filename != 0 /* nullptr */)
msg += (string(" from file '") + filename.contents()
+ string("'"));
msg += '\0';
error("cannot load font description '%1'%2 for mounting",
- internal_name.contents(), msg.contents());
+ id.contents(), msg.contents());
}
}
}
@@ -7061,10 +7060,10 @@ static void
assign_style_to_font_mounting_position_request() // .sty
warning(WARN_MISSING, "abstract style configuration request"
" expects a style name as second argument");
else {
- symbol internal_name
+ symbol id
= read_identifier(true /* want_diagnostic */);
- if (!internal_name.is_null())
- (void) mount_style(n, internal_name);
+ if (!id.is_null())
+ (void) mount_style(n, id);
}
}
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit