gbranden pushed a commit to branch master
in repository groff.
commit bb6bb61d6556c9f5b1866f22744cfd97af93e1bd
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Apr 13 14:05:30 2026 -0500
src/roff/troff/env.cpp: Trivially refactor.
* src/roff/troff/env.cpp (class hyphen_trie): Demote type of
`read_patterns_file()` member function's second argument from `int` to
`bool`.
(hyphen_trie::read_patterns_file): Likewise, and rename it from
`append` to `appending`.
---
ChangeLog | 8 ++++++++
src/roff/troff/env.cpp | 6 +++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9f6fd686c..47d3ab5da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-04-13 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/env.cpp: Trivially refactor.
+ (class hyphen_trie): Demote type of `read_patterns_file()`
+ member function's second argument from `int` to `bool`.
+ (hyphen_trie::read_patterns_file): Likewise, and rename it from
+ `append` to `appending`.
+
2026-04-13 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp (has_arg): Trivially refactor.
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index d811833c3..5de43374d 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3818,7 +3818,7 @@ public:
hyphen_trie() {}
~hyphen_trie() {}
void hyphenate(const char *, int, int *);
- void read_patterns_file(const char *, int, dictionary *);
+ void read_patterns_file(const char *, bool, dictionary *);
};
struct hyphenation_language {
@@ -4404,10 +4404,10 @@ fail:
return c;
}
-void hyphen_trie::read_patterns_file(const char *name, int append,
+void hyphen_trie::read_patterns_file(const char *name, bool appending,
dictionary *ex)
{
- if (!append)
+ if (!appending)
clear();
char buf[WORD_MAX + 1];
for (int i = 0; i < WORD_MAX + 1; i++)
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit