gbranden pushed a commit to branch master
in repository groff.
commit b350fa73e7c35ad259cff60b72bf408c74a8e031
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Apr 13 12:50:31 2026 -0500
[troff]: Trivially refactor (8/10).
* src/roff/troff/node.h (class font_family): Rename declaration of
`invalidate_fontno()` to
`invalidate_selected_font_mounting_position()`.
* src/roff/troff/node.cpp (font_family::invalidate_fontno): Rename
this...
(font_family::invalidate_selected_font_mounting_position): ...to this.
* src/roff/troff/node.cpp
(assign_font_and_file_name_to_mounting_position)
(mount_style): Update call sites.
---
ChangeLog | 11 +++++++++++
src/roff/troff/node.cpp | 6 +++---
src/roff/troff/node.h | 2 +-
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c97646d89..3adad3036 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,6 +81,17 @@
* src/roff/troff/env.cpp (environment::set_font)
(configure_underlining): Update call sites.
+ * src/roff/troff/node.h (class font_family): Rename declaration
+ of `invalidate_fontno()` to
+ `invalidate_selected_font_mounting_position()`.
+ * src/roff/troff/node.cpp (font_family::invalidate_fontno):
+ Rename this...
+ (font_family::invalidate_selected_font_mounting_position): ...to
+ this.
+ * src/roff/troff/node.cpp
+ (assign_font_and_file_name_to_mounting_position)
+ (mount_style): Update call sites.
+
2026-04-13 G. Branden Robinson <[email protected]>
* src/roff/troff/node.cpp: Refactor. Take one of
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index ca774f57c..7d6fc0775 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -6702,7 +6702,7 @@ static bool
assign_font_and_file_name_to_mounting_position(
else if (font_table[n] != 0 /* nullptr */)
delete font_table[n];
font_table[n] = new font_info(name, n, filename, fm);
- font_family::invalidate_fontno(n);
+ font_family::invalidate_selected_font_mounting_position(n);
return true;
}
@@ -6775,7 +6775,7 @@ bool mount_style(int n, symbol name)
delete font_table[n];
font_table[n] = new font_info(get_font_translation(name), n,
NULL_SYMBOL, 0);
- font_family::invalidate_fontno(n);
+ font_family::invalidate_selected_font_mounting_position(n);
return true;
}
@@ -6933,7 +6933,7 @@ font_family *lookup_family(symbol nm)
return f;
}
-void font_family::invalidate_fontno(int n)
+void font_family::invalidate_selected_font_mounting_position(int n)
{
assert(n >= 0 && n < font_table_size);
dictionary_iterator iter(family_dictionary);
diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h
index a52842d04..919920925 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -752,7 +752,7 @@ public:
font_family(symbol);
~font_family();
int resolve(int);
- static void invalidate_fontno(int);
+ static void invalidate_selected_font_mounting_position(int);
};
extern int resolve_current_font_to_mounting_position(environment *);
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit