gbranden pushed a commit to branch master
in repository groff.

commit e2320484eeb2410d60312dfcba80148e1023844d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Jul 8 14:14:12 2025 -0500

    [troff]: Trivially refactor.
    
    ...continuing naming reform of functions that are troff request handlers
    such that their names end with `_request`, and of member functions that
    write class object data to the standard error stream to `dump`.
    
    * src/roff/troff/env.h (class environment): Rename public member
      function `print_env` to `dump` in declaration.
    
    * src/roff/troff/env.cpp (environment::print_env): Rename this...
      (environment::dump): ...to this in definition.
    
      (dump_environment_request): Update call sites.
    
      (print_nodes_from_input_line): Rename this...
      (dump_pending_output_line_request): ...to this.
    
      (init_env_requests): Track latter rename in handler setup.
---
 ChangeLog              | 18 ++++++++++++++++++
 src/roff/troff/env.cpp | 14 +++++++-------
 src/roff/troff/env.h   |  2 +-
 3 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1b9984bf7..b5ff3e841 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2025-07-08  G. Branden Robinson <[email protected]>
+
+       [troff]: Trivially refactor, continuing naming reform of
+       functions that are troff request handlers such that their names
+       end with `_request`, and of member functions that write class
+       object data to the standard error stream to `dump`.
+
+       * src/roff/troff/env.h (class environment): Rename public member
+       function `print_env` to `dump` in declaration.
+
+       * src/roff/troff/env.cpp (environment::print_env): Rename
+       this...
+       (environment::dump): ...to this in definition.
+       (dump_environment_request): Update call sites.
+       (print_nodes_from_input_line): Rename this...
+       (dump_pending_output_line_request): ...to this.
+       (init_env_requests): Track latter rename in handler setup.
+
 2025-07-08  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.cpp (environment::print_env): Tweak output;
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 4d49d455d..766ce6a96 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3488,7 +3488,7 @@ const char *environment::get_requested_point_size_string()
   return sptoa(curenv->get_requested_point_size());
 }
 
-void environment::print_env()
+void environment::dump()
 {
   // At the time this request is invoked, the following values are zero
   // or meaningless.
@@ -3640,10 +3640,10 @@ void environment::print_env()
 #endif /* WIDOW_CONTROL */
 }
 
-void print_env()
+void dump_environment_request()
 {
   errprint("Current Environment:\n");
-  curenv->print_env();
+  curenv->dump();
   dictionary_iterator iter(env_dictionary);
   symbol s;
   environment *e;
@@ -3651,7 +3651,7 @@ void print_env()
     assert(!s.is_null());
     errprint("Environment %1:\n", s.contents());
     if (e != curenv)
-      e->print_env();
+      e->dump();
     else
       errprint("  current\n");
   }
@@ -3659,7 +3659,7 @@ void print_env()
   skip_line();
 }
 
-static void print_nodes_from_input_line()
+static void dump_pending_output_line_request()
 {
   curenv->dump_pending_nodes();
   skip_line();
@@ -4324,8 +4324,8 @@ void init_env_requests()
   init_request("nh", no_hyphenate);
   init_request("nm", number_lines);
   init_request("nn", no_number);
-  init_request("pev", print_env);
-  init_request("pline", print_nodes_from_input_line);
+  init_request("pev", dump_environment_request);
+  init_request("pline", dump_pending_output_line_request);
   init_request("ps", point_size);
   init_request("pvs", post_vertical_spacing);
   init_request("rj", right_justify);
diff --git a/src/roff/troff/env.h b/src/roff/troff/env.h
index 9d9797134..a084da693 100644
--- a/src/roff/troff/env.h
+++ b/src/roff/troff/env.h
@@ -272,7 +272,7 @@ public:
   unsigned char get_no_break_control_character();
   bool set_no_break_control_character(unsigned char);
   statem *construct_state(bool has_only_eol);
-  void print_env();
+  void dump();
   void copy(const environment *);
   bool is_dummy() { return is_dummy_env; }
   bool is_empty();

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

Reply via email to