gbranden pushed a commit to branch master
in repository groff.
commit 1a9af9ef8e74f2ee978b792dc63e050cf7f6c1fd
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Mar 14 22:55:27 2025 -0500
[troff]: Improve scaling unit warning diagnostic.
* src/roff/troff/number.cpp (is_valid_term): When warning of an invalid
scaling unit, report the character encountered.
---
ChangeLog | 5 +++++
src/roff/troff/number.cpp | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3f526ba2b..9ab7041a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-03-14 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/number.cpp (is_valid_term): When warning of an
+ invalid scaling unit, report the character encountered.
+
2025-03-14 Deri James <[email protected]>
[gropdf]: .pdfhref M fails with no -N/-D flag
diff --git a/src/roff/troff/number.cpp b/src/roff/troff/number.cpp
index f0b231cb3..c15129119 100644
--- a/src/roff/troff/number.cpp
+++ b/src/roff/troff/number.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 1989-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2025 Free Software Foundation, Inc.
Written by James Clark ([email protected])
This file is part of groff.
@@ -538,7 +538,7 @@ static bool is_valid_term(units *u, int scaling_unit,
&& (strchr(SCALING_UNITS, c) != 0 /* nullptr */)) {
switch (scaling_unit) {
case 0:
- warning(WARN_SCALE, "scaling unit invalid in context");
+ warning(WARN_SCALE, "scaling unit '%1' invalid in context", c);
break;
case 'f':
if (c != 'f' && c != 'u') {
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit