gbranden pushed a commit to branch master
in repository groff.
commit d2497606ef27a3b5e02853340e84e93c5fb2620a
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Nov 19 23:51:38 2025 -0600
[troff]: Fix code style nit.
* src/roff/troff/env.cpp (add_hyphenation_exceptions): Parenthesize
formally complex expressions. Also break lengthy chain of
short-circuit operators across multiple lines, using indentation to
illuminate (lack of) nesting.
---
ChangeLog | 7 +++++++
src/roff/troff/env.cpp | 4 +++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index e9a5fb3a7..1371973d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-11-19 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/env.cpp (add_hyphenation_exceptions): Fix code
+ style nit; parenthesize formally complex expressions. Also
+ break lengthy chain of short-circuit operators across multiple
+ lines, using indentation to illuminate (lack of) nesting.
+
2025-11-20 G. Branden Robinson <[email protected]>
[troff]: Slightly refactor. Make the global function
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 67ea36bbf..0301c7760 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3845,7 +3845,9 @@ static void add_hyphenation_exceptions()
break;
int i = 0;
int npos = 0;
- while (i < WORD_MAX && !tok.is_space() && !tok.is_newline()
+ while ((i < WORD_MAX)
+ && !tok.is_space()
+ && !tok.is_newline()
&& !tok.is_eof()) {
charinfo *ci = tok.get_charinfo(true /* required */);
if (0 /* nullptr */ == ci) {
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit