gbranden pushed a commit to branch branden-2023-07-05 in repository groff. commit 096beff1ce142aa5644b5b048aaa8c166b092873 Author: G. Branden Robinson <g.branden.robin...@gmail.com> 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 8b464eff9..b13619246 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2023-05-06 G. Branden Robinson <g.branden.robin...@gmail.com> + + [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 <g.branden.robin...@gmail.com> [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 Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit