gbranden pushed a commit to branch master
in repository groff.

commit 6bdfc7d654040be513528bc51c2a515feb75fc4f
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Apr 13 13:03:53 2026 -0500

    [troff]: Trivially refactor (10/10).
    
    * src/roff/troff/node.cpp (class troff_output_file): Rename declaration
      of `set_font()` to `select_font()`.
    
      (troff_output_file::set_font): Rename this...
      (troff_output_file::select_font): ...to this.
    
      (troff_output_file::start_device_extension)
      (troff_output_file::put_char_width): Update call sites.
---
 ChangeLog               |  7 +++++++
 src/roff/troff/node.cpp | 12 ++++++------
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7bde10188..03b2764e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -99,6 +99,13 @@
        (environment::select_font): ...to these.
        (select_font): Update call site.
 
+       * src/roff/troff/node.cpp (class troff_output_file): Rename
+       declaration of `set_font()` to `select_font()`.
+       (troff_output_file::set_font): Rename this...
+       (troff_output_file::select_font): ...to this.
+       (troff_output_file::start_device_extension)
+       (troff_output_file::put_char_width): 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 7d6fc0775..3f77e5faa 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -864,7 +864,7 @@ class troff_output_file : public real_output_file {
   void put(int i);
   void put(unsigned int i);
   void put(const char *s);
-  void set_font(tfont *tf);
+  void select_font(tfont *tf);
   void flush_tbuf();
 public:
   troff_output_file();
@@ -945,7 +945,7 @@ void troff_output_file::start_device_extension(tfont *tf, 
color *gcol,
                                               bool omit_command_prefix)
 {
   flush_tbuf();
-  set_font(tf);
+  select_font(tf);
   stroke_color(gcol);
   fill_color(fcol);
   do_motion();
@@ -1129,7 +1129,7 @@ void troff_output_file::put_char_width(charinfo *ci, 
tfont *tf,
     hpos += w.to_units() + kk;
     return;
   }
-  set_font(tf);
+  select_font(tf);
   unsigned char c = ci->get_ascii_code();
   if (0U == c) {
     stroke_color(gcol);
@@ -1207,7 +1207,7 @@ void troff_output_file::put_char(charinfo *ci, tfont *tf,
   flush_tbuf();
   if (!is_on())
     return;
-  set_font(tf);
+  select_font(tf);
   unsigned char c = ci->get_ascii_code();
   if (0U == c) {
     stroke_color(gcol);
@@ -1252,9 +1252,9 @@ void troff_output_file::put_char(charinfo *ci, tfont *tf,
   }
 }
 
-// set_font calls 'flush_tbuf' if necessary.
+// `select_font()` calls `flush_tbuf()` if necessary.
 
-void troff_output_file::set_font(tfont *tf)
+void troff_output_file::select_font(tfont *tf)
 {
   if (current_tfont == tf)
     return;

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to