groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 13/18: [tbl]: Rationalize header inclusion.


From: G. Branden Robinson
Subject: [groff] 13/18: [tbl]: Rationalize header inclusion.
Date: Sun, 5 Jan 2025 05:22:15 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 9fe49dcee64de9a0d117b482960738d9858bf8ac
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Jan 2 07:24:01 2025 -0600

    [tbl]: Rationalize header inclusion.
    
    * src/preproc/tbl/table.h: Drop inclusion of system headers, relocating
      applicable ones...
    
    * src/preproc/tbl/main.cpp:
    * src/preproc/tbl/table.cpp: ...here.
---
 ChangeLog                 | 9 +++++++++
 src/preproc/tbl/main.cpp  | 8 ++++++++
 src/preproc/tbl/table.cpp | 3 +++
 src/preproc/tbl/table.h   | 4 ----
 4 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 78afbb202..ba00b9c53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2025-01-02  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [tbl]: Rationalize header inclusion.
+
+       * src/preproc/tbl/table.h: Drop inclusion of system headers,
+       relocating applicable ones...
+       * src/preproc/tbl/main.cpp:
+       * src/preproc/tbl/table.cpp: ...here.
+
 2025-01-02  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/tbl/main.cpp (process_input_file, process_format)
diff --git a/src/preproc/tbl/main.cpp b/src/preproc/tbl/main.cpp
index 1c648986d..f8b95749d 100644
--- a/src/preproc/tbl/main.cpp
+++ b/src/preproc/tbl/main.cpp
@@ -20,6 +20,14 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
 #include <config.h>
 #endif
 
+#include <assert.h>
+#include <errno.h>
+#include <stdlib.h> // EXIT_SUCCESS, exit()
+#include <stdio.h> // EOF, FILE, fclose(), ferror(), fflush(), fopen(),
+                  // fprintf(), fputs(), getc(), printf(), putchar(),
+                  // setbuf(), stderr, stdin, stdout, ungetc()
+#include <string.h> // strerror()
+
 #include <getopt.h> // getopt_long()
 
 #include "table.h"
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index f891db881..4f87d1ac6 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -20,6 +20,9 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
 #include <config.h>
 #endif
 
+#include <stdio.h> // fputs(), fwrite(), putchar(), stdout
+#include <stdlib.h> // free()
+
 #include "table.h"
 
 #define BAR_HEIGHT ".25m"
diff --git a/src/preproc/tbl/table.h b/src/preproc/tbl/table.h
index 1d737c317..2c140519f 100644
--- a/src/preproc/tbl/table.h
+++ b/src/preproc/tbl/table.h
@@ -18,10 +18,6 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
 
 #include "lib.h"
 
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
 #include "cset.h"
 #include "cmap.h"
 #include "stringclass.h"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]