gbranden pushed a commit to branch master
in repository groff.
commit 180659ec5694b924b6fa2d25f20386d68b70f002
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Mar 17 13:36:32 2025 -0500
src/roff/troff/mtsm.h: Rationalize "#include"s.
* src/roff/troff/mtsm.h: Rationalize "#include"s. Include C standard
library and libgroff header files we require. Annotate why we don't
"#include" a GNU troff header file.
Add editor aid comments.
---
ChangeLog | 6 ++++++
src/roff/troff/mtsm.h | 17 ++++++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 7e5ad6ad8..64f7cb3c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-03-17 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/mtsm.h: Rationalize "#include"s. Include C
+ standard library and libgroff header files we require. Annotate
+ why we don't "#include" a GNU troff header file.
+
2025-03-17 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp (set_hyphenation_codes): Use
diff --git a/src/roff/troff/mtsm.h b/src/roff/troff/mtsm.h
index 5345d79aa..502a571f9 100644
--- a/src/roff/troff/mtsm.h
+++ b/src/roff/troff/mtsm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2024 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2025 Free Software Foundation, Inc.
*
* mtsm.h
*
@@ -24,8 +24,17 @@ 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/>. */
+#include <stdio.h> // FILE
+
#include <stack>
+#include "stringclass.h" // string
+
+// groff doesn't yet use include guards, so until it does, any source
+// file needing symbols from this one must #include "hvunits.h" first.
+//
+//#include "hvunits.h" // hunits, units
+
struct int_value {
int value;
int is_known;
@@ -156,3 +165,9 @@ public:
void add(units_value_state, int);
units val(units_value_state);
};
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit