gbranden pushed a commit to branch master in repository groff. commit f71053b973ee630d4549df9943592c55e3dd7012 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Thu Dec 7 19:10:43 2023 -0600
[troff]: Trivially refactor (rename hyph funcs). * src/roff/troff/env.cpp (do_hyphenation_patterns_file): Rename... (read_hyphenation_patterns_from_file): ...to this. (hyphenation_patterns_file, hyphenation_patterns_file_append): Update call sites. (hyphenation_patterns_file): Rename... (load_hyphenation_patterns_from_file): ...to this. (hyphenation_patterns_file_append): ...and this... (append_hyphenation_patterns_from_file): ... to this. (init_hyphen_requests): Update call sites. --- ChangeLog | 13 +++++++++++++ src/roff/troff/env.cpp | 14 +++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa734e5a3..7396c7345 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2023-12-07 G. Branden Robinson <g.branden.robin...@gmail.com> + + * src/roff/troff/env.cpp (do_hyphenation_patterns_file): + Rename... + (read_hyphenation_patterns_from_file): ...to this. + (hyphenation_patterns_file, hyphenation_patterns_file_append): + Update call sites. + (hyphenation_patterns_file): Rename... + (load_hyphenation_patterns_from_file): ...to this. + (hyphenation_patterns_file_append): ...and this... + (append_hyphenation_patterns_from_file): ... to this. + (init_hyphen_requests): Update call sites. + 2023-12-07 G. Branden Robinson <g.branden.robin...@gmail.com> * src/roff/troff/env.cpp (select_hyphenation_language): Demote diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp index 6930c1045..eb1583475 100644 --- a/src/roff/troff/env.cpp +++ b/src/roff/troff/env.cpp @@ -4165,7 +4165,7 @@ void hyphenate(hyphen_list *h, unsigned flags) } } -static void do_hyphenation_patterns_file(bool append) +static void read_hyphenation_patterns_from_file(bool append) { // TODO: Read a file name, not a groff identifier. symbol name = get_long_name(true /* required */); @@ -4180,7 +4180,7 @@ static void do_hyphenation_patterns_file(bool append) skip_line(); } -static void hyphenation_patterns_file() +static void load_hyphenation_patterns_from_file() { if (!has_arg()) { warning(WARN_MISSING, "hyphenation pattern load request expects" @@ -4188,10 +4188,10 @@ static void hyphenation_patterns_file() skip_line(); return; } - do_hyphenation_patterns_file(false /* append */); + read_hyphenation_patterns_from_file(false /* append */); } -static void hyphenation_patterns_file_append() +static void append_hyphenation_patterns_from_file() { if (!has_arg()) { warning(WARN_MISSING, "hyphenation pattern appendment request" @@ -4199,7 +4199,7 @@ static void hyphenation_patterns_file_append() skip_line(); return; } - do_hyphenation_patterns_file(true /* append */); + read_hyphenation_patterns_from_file(true /* append */); } class hyphenation_language_reg : public reg { @@ -4217,8 +4217,8 @@ void init_hyphen_requests() init_request("hw", add_hyphenation_exceptions); init_request("phw", print_hyphenation_exceptions); init_request("hla", select_hyphenation_language); - init_request("hpf", hyphenation_patterns_file); - init_request("hpfa", hyphenation_patterns_file_append); + init_request("hpf", load_hyphenation_patterns_from_file); + init_request("hpfa", append_hyphenation_patterns_from_file); register_dictionary.define(".hla", new hyphenation_language_reg); } _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit