[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 11/14: [troff]: Remove `DEBUGGING` preprocessor cruft.
From: |
G. Branden Robinson |
Subject: |
[groff] 11/14: [troff]: Remove `DEBUGGING` preprocessor cruft. |
Date: |
Wed, 1 Dec 2021 13:06:17 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 1cca91f4f04a09bdaf022fbc93575fd16f520092
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Nov 27 23:05:11 2021 +1100
[troff]: Remove `DEBUGGING` preprocessor cruft.
* src/roff/troff/input.cpp:
* src/roff/troff/mtsm.cpp: Stop defining `DEBUGGING` preprocessor macro
(as empty).
* src/roff/troff/input.cpp: Give `DEBUG_OPTION` an empty string value if
the former is undefined, so the `getopt_long()` call will compile.
Fixes <https://savannah.gnu.org/bugs/?61436>. Thanks to Bjarni Ingi
Gislason for the report.
Also update editor aid comments; drop old style Emacs file-local
variable setting.
---
ChangeLog | 15 +++++++++++++++
src/roff/troff/input.cpp | 4 ++--
src/roff/troff/mtsm.cpp | 9 +++++++--
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f912eba..eaf570b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2021-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [troff]: Remove `DEBUGGING` preprocessor cruft.
+
+ * src/roff/troff/input.cpp:
+ * src/roff/troff/mtsm.cpp: Stop defining `DEBUGGING`
+ preprocessor macro (as empty).
+
+ * src/roff/troff/input.cpp: Give `DEBUG_OPTION` an empty string
+ value if the former is undefined, so the `getopt_long()` call
+ will compile.
+
+ Fixes <https://savannah.gnu.org/bugs/?61436>. Thanks to Bjarni
+ Ingi Gislason for the report.
+
2021-11-26 G. Branden Robinson <g.branden.robinson@gmail.com>
[tbl]: Slightly refactor table format column modifier `p` and
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index e0eb329..2c97b2f 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -16,8 +16,6 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#define DEBUGGING
-
#include "troff.h"
#include "dictionary.h"
#include "hvunits.h"
@@ -8030,6 +8028,8 @@ int main(int argc, char **argv)
};
#if defined(DEBUGGING)
#define DEBUG_OPTION "D"
+#else
+#define DEBUG_OPTION ""
#endif
while ((c = getopt_long(argc, argv,
"abciI:vw:W:zCEf:m:n:o:r:d:F:M:T:tqs:RU"
diff --git a/src/roff/troff/mtsm.cpp b/src/roff/troff/mtsm.cpp
index 7f1b26f..6bddf6d 100644
--- a/src/roff/troff/mtsm.cpp
+++ b/src/roff/troff/mtsm.cpp
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 2003-2020 Free Software Foundation, Inc.
Written by Gaius Mulley (gaius@glam.ac.uk)
@@ -17,7 +16,7 @@ for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#define DEBUGGING
+// mtsm: minimum troff state machine
extern int debug_state;
@@ -634,3 +633,9 @@ units state_set::val(units_value_state)
{
return unitsset;
}
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 11/14: [troff]: Remove `DEBUGGING` preprocessor cruft.,
G. Branden Robinson <=