[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 119/127: [eqn]: Boolify tab_box member variable `disabled`.
From: |
G. Branden Robinson |
Subject: |
[groff] 119/127: [eqn]: Boolify tab_box member variable `disabled`. |
Date: |
Mon, 10 Jul 2023 04:31:08 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 2caca3a61b11ef36595ea2942869787cbefd0a1d
Author: G. Branden Robinson <g.branden.robinson@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 08f04dd23..7a2afb004 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2023-05-25 G. Branden Robinson <g.branden.robinson@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.robinson@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();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 119/127: [eqn]: Boolify tab_box member variable `disabled`.,
G. Branden Robinson <=