gbranden pushed a commit to branch master
in repository groff.
commit 31779973f363621967474f077035085f8cf6b9ee
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jun 4 09:00:39 2025 -0500
src/roff/troff/node.cpp: Clarify error diagnostic.
* src/roff/troff/node.cpp (mount_font_no_translate): Clarify error
diagnostic when the `fp` request is given a too-huge mounting
position; disclose both the rejected argument and value of the next
available font position.
---
ChangeLog | 7 +++++++
src/roff/troff/node.cpp | 4 +++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index fe8ec1551..e95bf7668 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -165,6 +165,13 @@
to `fn` to preƫmpt `-Wshadow` compiler warning with planned
refactoring of `class font`.
+2025-06-04 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/node.cpp (mount_font_no_translate): Clarify
+ error diagnostic when the `fp` request is given a too-huge
+ mounting position; disclose both the rejected argument and value
+ of the next available font position.
+
2025-06-04 G. Branden Robinson <[email protected]>
* src/roff/troff/node.cpp (mount_font_no_translate): Rename
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index debd8ddc5..a6bb1ff87 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -6527,7 +6527,9 @@ static bool mount_font_no_translate(int n, symbol name,
symbol filename,
return true;
if (n >= font_table_size) {
if ((n - font_table_size) > 1000) {
- error("font position too much larger than first unused position");
+ error("requested font mounting position %1 too much larger than"
+ " first unused position %2", n,
+ next_available_font_position());
return false;
}
grow_font_table(n);
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit