gbranden pushed a commit to branch master
in repository groff.

commit 1b06276de5ed90e77282fa77eaa552fdca655aa8
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Apr 17 07:23:54 2026 -0500

    src/roff/troff/env.cpp: Trivially refactor (2/3).
    
    * src/roff/troff/env.cpp: Rename `hyphen_trie` class's member function
      `read_patterns_file()` to `interpret_patterns_file()`.  We're pretty
      close to exclusive use of function names starting with "read_" for
      input stream reading operations; that is, interpretation of *roff
      language.  This change moves us closer to that goal.
    
      (class hyphen_trie): Update declaration.
    
      (hyphen_trie::read_patterns_file): Rename this...
      (hyphen_trie::interpret_patterns_file): ...to this.
    
      (read_hyphenation_patterns_from_file): Update call site.
---
 ChangeLog              | 13 +++++++++++++
 src/roff/troff/env.cpp | 13 +++++++------
 2 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 29596a21d..2166defb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2026-04-17  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/env.cpp: Trivially refactor.  Rename
+       `hyphen_trie` class's member function `read_patterns_file()` to
+       `interpret_patterns_file()`.  We're pretty close to exclusive
+       use of function names starting with "read_" for input stream
+       reading operations; that is, interpretation of *roff language.
+       This change moves us closer to that goal.
+       (class hyphen_trie): Update declaration.
+       (hyphen_trie::read_patterns_file): Rename this...
+       (hyphen_trie::interpret_patterns_file): ...to this.
+       (read_hyphenation_patterns_from_file): Update call site.
+
 2026-04-17  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.cpp (read_hyphenation_patterns_from_file):
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 3af1829be..67ff07e03 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3822,7 +3822,7 @@ public:
   hyphen_trie() {}
   ~hyphen_trie() {}
   void hyphenate(const char *, int, int *);
-  void read_patterns_file(const char *, bool, dictionary *);
+  void interpret_patterns_file(const char *, bool, dictionary *);
 };
 
 struct hyphenation_language {
@@ -4124,7 +4124,7 @@ static void print_hyphenation_exceptions_request() // .phw
   unsigned char *hypoint;
   // Pathologically, we could have a hyphenation point after every
   // character in a word except the last.  The word may have a trailing
-  // space; see `hyphen_trie::read_patterns_file()`.
+  // space; see `hyphen_trie::interpret_patterns_file()`.
   // C++11: constexpr
   static const size_t bufsz = WORD_MAX * 2;
   // C++03: char wordbuf[bufsz]();
@@ -4425,8 +4425,9 @@ fail:
   return c;
 }
 
-void hyphen_trie::read_patterns_file(const char *name, bool appending,
-                                    dictionary *ex)
+void hyphen_trie::interpret_patterns_file(const char *name,
+                                         bool appending,
+                                         dictionary *ex)
 {
   if (!appending)
     clear();
@@ -4864,8 +4865,8 @@ static void read_hyphenation_patterns_from_file(bool 
appending)
     if (0 /* nullptr */ == current_language)
       error("no current hyphenation language");
     else
-      current_language->patterns.read_patterns_file(filename, appending,
-       &current_language->exceptions);
+      current_language->patterns.interpret_patterns_file(filename,
+         appending, &current_language->exceptions);
   }
 }
 

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

Reply via email to