gbranden pushed a commit to branch master
in repository groff.
commit 8d450c650bf4b77fd6b0db97f78c5764c54b9300
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat May 6 20:37:58 2023 -0500
[troff]: Revise output warning diagnostic format.
* src/roff/troff/input.cpp (do_error): For the `OUTPUT_WARNING` value of
the `error_type` enum, spell out the words "page" and "diversion"
instead of abbreviating them, and place the diversion information (if
present) in parentheses.
---
ChangeLog | 9 +++++++++
src/roff/troff/input.cpp | 10 ++++++----
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6bd54a82b..29a9a8803 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-05-06 G. Branden Robinson <[email protected]>
+
+ [troff]: Revise output warning diagnostic format.
+
+ * src/roff/troff/input.cpp (do_error): For the `OUTPUT_WARNING`
+ value of the `error_type` enum, spell out the words "page" and
+ "diversion" instead of abbreviating them, and place the
+ diversion information (if present) in parentheses.
+
2023-05-02 G. Branden Robinson <[email protected]>
[troff]: Trivially refactor.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index a19935d20..59d9c2274 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8815,14 +8815,16 @@ static void do_error(error_type type,
fputs("debug: ", stderr);
break;
case OUTPUT_WARNING:
- double fromtop = topdiv->get_vertical_position().to_units() / warn_scale;
- fprintf(stderr, "warning [p %d, %.1f%c",
+ double fromtop = topdiv->get_vertical_position().to_units() \
+ / warn_scale;
+ fprintf(stderr, "warning [page %d, %.1f%c",
topdiv->get_page_number(), fromtop, warn_scaling_indicator);
if (topdiv != curdiv) {
double fromtop1 = curdiv->get_vertical_position().to_units()
/ warn_scale;
- fprintf(stderr, ", div '%s', %.1f%c",
- curdiv->get_diversion_name(), fromtop1, warn_scaling_indicator);
+ fprintf(stderr, " (diversion '%s', %.1f%c)",
+ curdiv->get_diversion_name(), fromtop1,
+ warn_scaling_indicator);
}
fprintf(stderr, "]: ");
break;
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit