gbranden pushed a commit to branch master
in repository groff.

commit 0ee1db0ef193e9a4659d8097cc944a285ff3b4a5
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Mar 25 23:15:27 2026 -0500

    [libgroff]: Improve internal organization (1/4).
    
    * src/include/error.h: Declare `fatal_error_exit()` here...
    * src/libs/libgroff/error.cpp: ...instead of here.
---
 ChangeLog                   | 5 +++++
 src/include/error.h         | 3 +++
 src/libs/libgroff/error.cpp | 3 +--
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a488774c6..aaec72d87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,11 @@
        * src/devices/grops/ps.cpp: Drop unnecessary preprocessor
        inclusions of "paper.h" header file.
 
+2026-03-25  G. Branden Robinson <[email protected]>
+
+       * src/include/error.h: Declare `fatal_error_exit()` here...
+       * src/libs/libgroff/error.cpp: ...instead of here.
+
 2026-03-25  G. Branden Robinson <[email protected]>
 
        * src/devices/grops/ps.cpp (is_ascii): Fix code style nit.
diff --git a/src/include/error.h b/src/include/error.h
index 71e4421f3..db6c1eb95 100644
--- a/src/include/error.h
+++ b/src/include/error.h
@@ -17,6 +17,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/>. */
 
+// libgroff/error.cpp
 void fatal_with_file_and_line(const char *, int, const char *,
                              const errarg & = empty_errarg,
                              const errarg & = empty_errarg,
@@ -57,6 +58,8 @@ void debug(const char *,
           const errarg & = empty_errarg,
           const errarg & = empty_errarg);
 
+// libgroff/fatal.cpp
+void fatal_error_exit();
 
 extern "C" const char *program_name;
 extern int current_lineno;
diff --git a/src/libs/libgroff/error.cpp b/src/libs/libgroff/error.cpp
index fe7426281..51ba399a0 100644
--- a/src/libs/libgroff/error.cpp
+++ b/src/libs/libgroff/error.cpp
@@ -24,11 +24,10 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "errarg.h"
 #include "error.h"
 
-extern void fatal_error_exit();
-
 enum error_type { DEBUG, WARNING, ERROR, FATAL };
 
 static void do_error_with_file_and_line(const char *filename,

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to