[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 52/80: [tfmtodit]: Align with modern groff conventions.
From: |
G. Branden Robinson |
Subject: |
[groff] 52/80: [tfmtodit]: Align with modern groff conventions. |
Date: |
Sat, 30 Nov 2024 04:02:24 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 1670883ff20963b44f1efa776ae4cdab79de9f2d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Nov 29 22:37:44 2024 -0600
[tfmtodit]: Align with modern groff conventions.
* src/utils/tfmtodit/tfmtodit.cpp: Include system library headers before
local ones.
(main): Use standard symbol `EXIT_SUCCESS` instead of `0` literal.
---
ChangeLog | 9 +++++++++
src/utils/tfmtodit/tfmtodit.cpp | 12 ++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a2a8cfae2..6a03e4bff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [tfmtodit]: Align with modern groff conventions.
+
+ * src/utils/tfmtodit/tfmtodit.cpp: Include system library
+ headers before local ones.
+ (main): Use standard symbol `EXIT_SUCCESS` instead of `0`
+ literal.
+
2024-11-29 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/utils/tfmtodit/tfmtodit.cpp (main): Exit with status 2,
diff --git a/src/utils/tfmtodit/tfmtodit.cpp b/src/utils/tfmtodit/tfmtodit.cpp
index b5fdac73c..155e5e160 100644
--- a/src/utils/tfmtodit/tfmtodit.cpp
+++ b/src/utils/tfmtodit/tfmtodit.cpp
@@ -46,16 +46,16 @@ This need only be done for a font for which math_fitting is
false;
When it's true, the left_correction and subscript_correction should
both be zero. */
-#include "lib.h"
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include "lib.h"
+
#include <assert.h>
#include <errno.h>
-#include <math.h>
-#include <stdlib.h>
+#include <math.h> // atan2()
+#include <stdlib.h> // exit(), EXIT_SUCCESS, strtol()
#include "errarg.h"
#include "error.h"
@@ -723,12 +723,12 @@ int main(int argc, char **argv)
case 'v':
{
printf("GNU tfmtodit (groff) version %s\n", Version_string);
- exit(0);
+ exit(EXIT_SUCCESS);
break;
}
case CHAR_MAX + 1: // --help
usage(stdout);
- exit(0);
+ exit(EXIT_SUCCESS);
break;
case '?':
error("unrecognized command-line option '%1'", char(optopt));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 52/80: [tfmtodit]: Align with modern groff conventions.,
G. Branden Robinson <=