gbranden pushed a commit to branch master
in repository groff.
commit d8a4458977aa1a4cc80d2dc84b4bab230aeebccc
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Aug 28 20:22:58 2026 -0500
src/roff/troff/env.cpp: Slightly refactor.
* src/roff/troff/env.cpp (read_hyphenation_exception_word): Revise
code idiom to apply new member function `is_terminator()` on `token`
objects. Continues commit 9896f5d7c4, 19 April.
---
ChangeLog | 7 +++++++
src/roff/troff/env.cpp | 5 +----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f4845d31e..93f7d8032 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-08-28 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/env.cpp (read_hyphenation_exception_word):
+ Slightly refactor. Revise code idiom to apply new member
+ function `is_terminator()` on `token` objects. Continues commit
+ 9896f5d7c4, 19 April.
+
2026-07-27 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp: Revise `shift` request behavior;
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 94d106b5b..c5c31a746 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3970,10 +3970,7 @@ static bool read_hyphenation_exception_word(unsigned
char *word,
// Warn at most once per invalid word, not per request invocation.
bool is_word_valid = true;
bool was_warned = false;
- while ((i < WORD_MAX)
- && !tok.is_space()
- && !tok.is_newline()
- && !tok.is_eof()) {
+ while ((i < WORD_MAX) && !tok.is_space() && !tok.is_terminator()) {
charinfo *ci = tok.get_charinfo(false /* is_mandatory */);
if (ci != 0 /* nullptr */) {
hc = ci->get_hyphenation_code();
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit