gbranden pushed a commit to branch master
in repository groff.
commit da083b2fc131f12a907adfa56e87330103af0e3f
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Apr 3 20:12:40 2026 -0500
src/roff/troff/reg.cpp: Improve diagnostic.
* src/roff/troff/reg.cpp (number_value_to_ascii): When diagnosing a
value beyond representatable Roman numeral range, disclose the
specific format demanded. Also tighten message wording.
---
ChangeLog | 7 +++++++
src/roff/troff/reg.cpp | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 69c9fa807..e48ec4c83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-04-03 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/reg.cpp (number_value_to_ascii): When
+ diagnosing a value beyond representatable Roman numeral range,
+ disclose the specific format demanded. Also tighten message
+ wording.
+
2026-04-01 G. Branden Robinson <[email protected]>
* src/roff/troff/env.cpp (print_hyphenation_exceptions): Skip
diff --git a/src/roff/troff/reg.cpp b/src/roff/troff/reg.cpp
index 587aad1bf..9c0505848 100644
--- a/src/roff/troff/reg.cpp
+++ b/src/roff/troff/reg.cpp
@@ -136,8 +136,8 @@ static const char *number_value_to_ascii(int value, char
format,
is_value_out_of_roman_numeral_range = true;
}
if (is_value_out_of_roman_numeral_range) {
- error("register value %1 is outside of range representable in"
- " 'i' or 'I' formats", n);
+ error("register value %1 is beyond range representable in"
+ " '%2' format", n, format);
return i_to_a(n);
}
const char *roman_numerals
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit