gbranden pushed a commit to branch master
in repository groff.
commit 8c150c9138c5788d69ced8c12424c4d57b0a11e4
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Mar 25 14:00:24 2026 -0500
Improve "driver.h" header file discipline.
* src/include/driver.h: Drop preprocessor inclusion of "geometry.h" from
here, and add it where it's needed...
* src/devices/grodvi/dvi.cpp:
* src/devices/grolj4/lj4.cpp:
* src/devices/grops/ps.cpp:
* src/libs/libgroff/geometry.cpp: ...here.
---
ChangeLog | 9 +++++++++
src/devices/grodvi/dvi.cpp | 1 +
src/devices/grolj4/lj4.cpp | 1 +
src/devices/grops/ps.cpp | 1 +
src/include/driver.h | 1 -
src/libs/libgroff/geometry.cpp | 2 ++
src/roff/troff/node.cpp | 2 +-
7 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 04acf2a75..8c4a7c7a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,15 @@
* src/devices/grops/ps.cpp: Drop unnecessary preprocessor
inclusions of "paper.h" header file.
+2026-03-25 G. Branden Robinson <[email protected]>
+
+ * src/include/driver.h: Drop preprocessor inclusion of
+ "geometry.h" from here, and add it where it's needed...
+ * src/devices/grodvi/dvi.cpp:
+ * src/devices/grolj4/lj4.cpp:
+ * src/devices/grops/ps.cpp:
+ * src/libs/libgroff/geometry.cpp: ...here.
+
2026-03-25 G. Branden Robinson <[email protected]>
* src/libs/libgroff/error.cpp: Drop `extern` declaration of
diff --git a/src/devices/grodvi/dvi.cpp b/src/devices/grodvi/dvi.cpp
index 52cd78fd4..b9951e2ca 100644
--- a/src/devices/grodvi/dvi.cpp
+++ b/src/devices/grodvi/dvi.cpp
@@ -33,6 +33,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#include <getopt.h> // getopt_long()
#include "driver.h"
+#include "geometry.h" // adjust_arc_center()
#include "nonposix.h"
extern "C" const char *Version_string;
diff --git a/src/devices/grolj4/lj4.cpp b/src/devices/grolj4/lj4.cpp
index 8c5217e6b..36e1c7c16 100644
--- a/src/devices/grolj4/lj4.cpp
+++ b/src/devices/grolj4/lj4.cpp
@@ -52,6 +52,7 @@ X command to include bitmap graphics
#include "cset.h" // csdigit()
#include "driver.h"
+#include "geometry.h" // adjust_arc_center()
#include "lib.h" // array_size(), PI
extern "C" const char *Version_string;
diff --git a/src/devices/grops/ps.cpp b/src/devices/grops/ps.cpp
index fbce5e4e6..98f5c3834 100644
--- a/src/devices/grops/ps.cpp
+++ b/src/devices/grops/ps.cpp
@@ -52,6 +52,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#include "cset.h"
#include "curtime.h"
#include "driver.h"
+#include "geometry.h" // adjust_arc_center()
#include "stringclass.h"
#include "ps.h"
diff --git a/src/include/driver.h b/src/include/driver.h
index c2ac36d6b..29ac66ca0 100644
--- a/src/include/driver.h
+++ b/src/include/driver.h
@@ -20,7 +20,6 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#include "error.h"
#include "font.h"
#include "printer.h"
-#include "geometry.h"
void do_file(const char *);
diff --git a/src/libs/libgroff/geometry.cpp b/src/libs/libgroff/geometry.cpp
index f677d91cc..cc964487a 100644
--- a/src/libs/libgroff/geometry.cpp
+++ b/src/libs/libgroff/geometry.cpp
@@ -25,6 +25,8 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <math.h>
+#include "geometry.h"
+
#undef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index e4ea93d2f..b7137da31 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -40,7 +40,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#include "font.h"
#include "charinfo.h"
#include "input.h"
-#include "geometry.h"
+#include "geometry.h" // adjust_arc_center()
#include "json-encode.h" // json_encode_char()
#include "posix.h"
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit