commit 827f8abd4b8d5722cd5e919a14ce71fba92cc843
parent 7b7b03f541ee7848cc5bd91b68077209f283e1e7
Author: Michael Constantine Dimopoulos <mk@mcdim.xyz>
Date: Wed, 11 Aug 2021 10:23:46 +0000
Updated nhance style
Diffstat:
M | enhance/nhan.c | | | 56 | ++++++++++++++++++++++++++++---------------------------- |
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/enhance/nhan.c b/enhance/nhan.c
@@ -1,9 +1,3 @@
-#include <stdlib.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-
/*
* nhance - Narthex enhancer
*
@@ -21,10 +15,38 @@
*
*/
+#include <stdlib.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
#define VERSION "v1.2"
#define BUFFER_SIZE 256
+
+static void
+help(char * exename)
+{
+ printf( "nhance - Narthex enhancer %s\n"
+ "By Michael C. Dim. <mk@mcdim.xyz>\n\n"
+
+ "-f Append full capitalization\n"
+ "-h Print this panel & exit\n"
+ "-v Print current version & exit\n\n"
+ "Usage: cat [FILENAME] | %s [OPTIONS]\n"
+ " %s [OPTIONS] [FILENAME]\n",
+ VERSION, exename, exename);
+ exit(EXIT_SUCCESS);
+}
+
+static void
+die(char * str)
+{
+ printf("%s\n", str);
+ exit(EXIT_SUCCESS);
+}
+
FILE *
save_stdin(FILE *f)
{
@@ -74,28 +96,6 @@ enhance(FILE *f, int full_upper)
}
}
-static void
-die(char * str)
-{
- printf("%s\n", str);
- exit(EXIT_SUCCESS);
-}
-
-static void
-help(char * exename)
-{
- printf( "nhance - Narthex enhancer %s\n"
- "By Michael C. Dim. <mk@mcdim.xyz>\n\n"
-
- "-f Append full capitalization\n"
- "-h Print this panel & exit\n"
- "-v Print current version & exit\n\n"
- "Usage: cat [FILENAME] | %s [OPTIONS]\n"
- " %s [OPTIONS] [FILENAME]\n",
- VERSION, exename, exename);
- exit(EXIT_SUCCESS);
-}
-
void
main(int argc, char* argv[])
{