gbranden pushed a commit to branch branden-2023-07-05 in repository groff. commit 132cd1acfd63caddbfea9d9cd826c4420257f46c Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Thu May 25 12:55:40 2023 -0500
[eqn]: Boolify tab_box member variable `disabled`. [eqn]: Trivially refactor. Boolify `tab_box` member variable `disabled`. * src/preproc/eqn/box.cpp (tab_box::tab_box, tab_box::check_tabs): * src/preproc/eqn/box.h (class tab_box): Do it. * src/preproc/eqn/box.cpp (tab_box::check_tabs): Also recast diagnostic message to clarify what "level" we're talking about: it's lexical. Which, sadly, probably won't help any but CS/SWeng people... --- ChangeLog | 14 ++++++++++++++ src/preproc/eqn/box.cpp | 6 +++--- src/preproc/eqn/box.h | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02281539f..cb66ae578 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2023-05-25 G. Branden Robinson <g.branden.robin...@gmail.com> + + [eqn]: Trivially refactor. Boolify `tab_box` member variable + `disabled`. + + * src/preproc/eqn/box.cpp (tab_box::tab_box) + (tab_box::check_tabs): + * src/preproc/eqn/box.h (class tab_box): Do it. + + * src/preproc/eqn/box.cpp (tab_box::check_tabs): Also recast + diagnostic message to clarify what "level" we're talking about: + it's lexical. Which, sadly, probably won't help any but + CS/SWeng people... + 2023-05-25 G. Branden Robinson <g.branden.robin...@gmail.com> [troff]: Validate a font family before trying to use it. diff --git a/src/preproc/eqn/box.cpp b/src/preproc/eqn/box.cpp index 4519bcd48..459e24ef6 100644 --- a/src/preproc/eqn/box.cpp +++ b/src/preproc/eqn/box.cpp @@ -573,7 +573,7 @@ void quoted_text_box::output() } } -tab_box::tab_box() : disabled(0) +tab_box::tab_box() : disabled(false) { } @@ -588,8 +588,8 @@ void tab_box::output() void tab_box::check_tabs(int level) { if (level > 0) { - error("tabs allowed only at outermost level"); - disabled = 1; + error("tabs allowed only at outermost lexical level"); + disabled = true; } } diff --git a/src/preproc/eqn/box.h b/src/preproc/eqn/box.h index 93277f3c0..079fd03cd 100644 --- a/src/preproc/eqn/box.h +++ b/src/preproc/eqn/box.h @@ -197,7 +197,7 @@ public: }; class tab_box : public box { - int disabled; + bool disabled; public: tab_box(); void output(); _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit