[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 42/80: [preconv]: Align with modern groff conventions.
From: |
G. Branden Robinson |
Subject: |
[groff] 42/80: [preconv]: Align with modern groff conventions. |
Date: |
Sat, 30 Nov 2024 04:02:20 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit c7c57f57a9960b5be7dfad2e56fe52c3e22c40a4
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 27 21:39:54 2024 -0600
[preconv]: Align with modern groff conventions.
* src/preproc/preconv/preconv.cpp: Include system library headers before
local ones.
---
ChangeLog | 7 +++++++
src/preproc/preconv/preconv.cpp | 34 ++++++++++++++++++----------------
2 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 25151a9c8..e6711cfff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [preconv]: Align with modern groff conventions.
+
+ * src/preproc/preconv/preconv.cpp: Include system library
+ headers before local ones.
+
2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
[pre-grohtml]: Align with modern groff conventions.
diff --git a/src/preproc/preconv/preconv.cpp b/src/preproc/preconv/preconv.cpp
index dbf7b188f..b2ba6f08c 100644
--- a/src/preproc/preconv/preconv.cpp
+++ b/src/preproc/preconv/preconv.cpp
@@ -16,38 +16,40 @@ 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 "lib.h"
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <assert.h>
-#include <stdlib.h>
#include <errno.h>
-#include <sys/stat.h>
+#if HAVE_ICONV
+# include <iconv.h> // iconv(), iconv_close(), iconv_open()
+# ifdef WORDS_BIGENDIAN
+# define UNICODE "UTF-32BE"
+# else
+# define UNICODE "UTF-32LE"
+# endif
+#endif
+#include <locale.h> // setlocale()
+#include <stdio.h> // EOF, FILE, fclose(), ferror(), fflush(), fileno(),
+ // fread(), fseek(), ftell(), getc(), rewind(),
+ // stderr, stdin, stdout, ungetc()
+#include <stdlib.h> // exit(), EXIT_SUCCESS
+#include <string.h> // sterror()
+#include <sys/stat.h> // fstat(), stat
#ifdef HAVE_UCHARDET
#include <uchardet/uchardet.h>
#endif
+#include "lib.h"
+
#include "errarg.h"
#include "error.h"
#include "localcharset.h"
#include "nonposix.h"
-#include "stringclass.h"
+#include "stringclass.h" // must precede lf.h
#include "lf.h"
-#include <locale.h>
-
-#if HAVE_ICONV
-# include <iconv.h>
-# ifdef WORDS_BIGENDIAN
-# define UNICODE "UTF-32BE"
-# else
-# define UNICODE "UTF-32LE"
-# endif
-#endif
-
#define MAX_VAR_LEN 100
extern "C" const char *Version_string;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 42/80: [preconv]: Align with modern groff conventions.,
G. Branden Robinson <=