groff-commit
[Top][All Lists]
Advanced

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

[groff] 47/80: [troff]: Align with modern groff conventions.


From: G. Branden Robinson
Subject: [groff] 47/80: [troff]: Align with modern groff conventions.
Date: Sat, 30 Nov 2024 04:02:21 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit c3a78886e3e036a0f09c55ecf4c1d7e1ea3fb8d3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 27 22:07:03 2024 -0600

    [troff]: Align with modern groff conventions.
    
    * src/roff/troff/dictionary.cpp:
    * src/roff/troff/env.cpp:
    * src/roff/troff/mtsm.cpp:
    * src/roff/troff/reg.cpp: Add Autoconf "<config.h>"-inclusion
      boilerplate to these translation units.
    
    * src/roff/troff/env.cpp:
    * src/roff/troff/node.cpp: Include system library headers before local
      ones.
    
    Fix sloppy whitespace.
---
 ChangeLog                     | 14 ++++++++++++++
 src/roff/troff/dictionary.cpp |  5 ++++-
 src/roff/troff/env.cpp        | 20 ++++++++++----------
 src/roff/troff/mtsm.cpp       |  4 ++++
 src/roff/troff/node.cpp       |  5 ++---
 src/roff/troff/reg.cpp        | 12 ++++++------
 6 files changed, 40 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f5887497c..2eb000c9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-11-27  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [troff]: Align with modern groff conventions.
+
+       * src/roff/troff/dictionary.cpp:
+       * src/roff/troff/env.cpp:
+       * src/roff/troff/mtsm.cpp:
+       * src/roff/troff/reg.cpp: Add Autoconf "<config.h>"-inclusion
+       boilerplate to these translation units.
+
+       * src/roff/troff/env.cpp:
+       * src/roff/troff/node.cpp: Include system library headers before
+       local ones.
+
 2024-11-27  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [groff]: Align with modern groff conventions.
diff --git a/src/roff/troff/dictionary.cpp b/src/roff/troff/dictionary.cpp
index 6146751e4..0eade7be1 100644
--- a/src/roff/troff/dictionary.cpp
+++ b/src/roff/troff/dictionary.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2024 Free Software Foundation, Inc.
      Written by James Clark (jjc@jclark.com)
 
 This file is part of groff.
@@ -16,6 +16,9 @@ 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/>. */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include "troff.h"
 #include "dictionary.h"
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index d8ff4e0da..1545cfa83 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -16,6 +16,16 @@ 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/>. */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <errno.h> // errno
+#include <math.h> // ceil()
+
+#include <vector>
+#include <algorithm> // find()
+
 #include "troff.h"
 #include "dictionary.h"
 #include "hvunits.h"
@@ -32,16 +42,6 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
 #include "macropath.h"
 #include "input.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h> // errno
-#include <math.h> // ceil()
-
-#include <vector>
-#include <algorithm> // find()
-
 symbol default_family("T");
 
 enum { ADJUST_LEFT = 0,
diff --git a/src/roff/troff/mtsm.cpp b/src/roff/troff/mtsm.cpp
index addf0e89f..ce8552dbf 100644
--- a/src/roff/troff/mtsm.cpp
+++ b/src/roff/troff/mtsm.cpp
@@ -18,6 +18,10 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
 
 // mtsm: minimum troff state machine
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 extern bool want_html_debugging;
 
 #include "troff.h"
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 1af9639de..704a42826 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.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/>. */
 
-#include "troff.h"
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -25,6 +23,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
 #include <errno.h>
 #include <stdlib.h> // free(), malloc()
 
+#include "troff.h"
 #include "dictionary.h"
 #include "hvunits.h"
 #include "stringclass.h"
@@ -3666,7 +3665,7 @@ space_char_hmotion_node::space_char_hmotion_node(hunits 
i, color *c,
 }
 
 space_char_hmotion_node::space_char_hmotion_node(hunits i, color *c,
-                                                node *nxt)
+                                                node *nxt)
 : hmotion_node(i, c, 0, 0, nxt)
 {
 }
diff --git a/src/roff/troff/reg.cpp b/src/roff/troff/reg.cpp
index 14c5ad6fc..c22b088c2 100644
--- a/src/roff/troff/reg.cpp
+++ b/src/roff/troff/reg.cpp
@@ -16,18 +16,18 @@ 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/>. */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+
 #include "troff.h"
 #include "dictionary.h"
 #include "token.h"
 #include "request.h"
 #include "reg.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <assert.h> // assert()
-
 object_dictionary register_dictionary(101);
 
 bool reg::get_value(units * /*d*/)



reply via email to

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