gbranden pushed a commit to branch master in repository groff. commit 58ebe1d0514fd1a5c0602d4bc190d3e1e78d97ac Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Fri Feb 21 15:23:41 2025 -0600
[troff]: Slightly refactor. Unpublish function that doesn't need to be visible outside its translation unit. * src/roff/troff/charinfo.h (get_charinfo_by_number): Move declaration from here... * src/roff/troff/input.cpp (get_charinfo_by_number): ...to here. Declare and define it as `static`. --- ChangeLog | 10 ++++++++++ src/roff/troff/charinfo.h | 1 - src/roff/troff/input.cpp | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 66920b408..0a0f85faf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2025-02-21 G. Branden Robinson <g.branden.robin...@gmail.com> + + [troff]: Unpublish function that doesn't need to be visible + outside its translation unit. + + * src/roff/troff/charinfo.h (get_charinfo_by_number): Move + declaration from here... + * src/roff/troff/input.cpp (get_charinfo_by_number): ...to here. + Declare and define it as `static`. + 2025-02-21 G. Branden Robinson <g.branden.robin...@gmail.com> [troff]: Trivially refactor; rename enumerator in `token` `enum` diff --git a/src/roff/troff/charinfo.h b/src/roff/troff/charinfo.h index fecd10347..05d785e91 100644 --- a/src/roff/troff/charinfo.h +++ b/src/roff/troff/charinfo.h @@ -116,7 +116,6 @@ public: charinfo *get_charinfo(symbol); extern charinfo *charset_table[]; -charinfo *get_charinfo_by_number(int); inline bool charinfo::overlaps_horizontally() { diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp index 2c401bb3b..d30862a36 100644 --- a/src/roff/troff/input.cpp +++ b/src/roff/troff/input.cpp @@ -8148,6 +8148,8 @@ void define_class() skip_line(); } +static charinfo *get_charinfo_by_number(int n); // forward declaration + charinfo *token::get_char(bool required) { if (type == TOKEN_CHAR) @@ -10209,7 +10211,7 @@ symbol UNNAMED_SYMBOL("---"); dictionary numbered_charinfo_dictionary(11); -charinfo *get_charinfo_by_number(int n) +static charinfo *get_charinfo_by_number(int n) { static charinfo *number_table[256]; _______________________________________________ groff-commit mailing list groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit