Reformat code to KNF
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
diff --git a/src/bsd_getopt.c b/src/bsd_getopt.c
index 1c878ed..a213d9b 100644
--- a/src/bsd_getopt.c
+++ b/src/bsd_getopt.c
@@ -29,13 +29,12 @@
int optreset = 0;
int
-bsd_getopt (int argc, char **argv, char *shortopts)
+bsd_getopt(int argc, char **argv, char *shortopts)
{
- if (optreset == 1)
- {
- optreset = 0;
- optind = 0;
- }
+ if (optreset == 1) {
+ optreset = 0;
+ optind = 0;
+ }
- return getopt (argc, argv, shortopts);
+ return getopt(argc, argv, shortopts);
}
diff --git a/src/err.c b/src/err.c
index c7bb416..d33f08e 100644
--- a/src/err.c
+++ b/src/err.c
@@ -29,44 +29,46 @@
#include <stdarg.h>
void
-warnc (int code, const char *format, ...)
+warnc(int code, const char *format, ...)
{
- int tmp = errno;
- va_list ap;
- va_start (ap, format);
+ int tmp = errno;
+ va_list ap;
- errno = code;
- warn (format, ap);
- errno = tmp;
+ va_start(ap, format);
- va_end (ap);
+ errno = code;
+ warn(format, ap);
+ errno = tmp;
+
+ va_end(ap);
}
void
-vwarnc (int code, const char *format, va_list ap)
+vwarnc(int code, const char *format, va_list ap)
{
- int tmp = errno;
+ int tmp = errno;
- errno = code;
- vwarn (format, ap);
- errno = tmp;
+ errno = code;
+ vwarn(format, ap);
+ errno = tmp;
}
void
-errc (int status, int code, const char *format, ...)
+errc(int status, int code, const char *format, ...)
{
- va_list ap;
- va_start (ap, format);
+ va_list ap;
+
+ va_start(ap, format);
- errno = code;
- err (status, format, ap);
+ errno = code;
+ err(status, format, ap);
- va_end (ap);
+ va_end(ap);
}
void
-verrc (int status, int code, const char *format, va_list ap)
+verrc(int status, int code, const char *format, va_list ap)
{
- errno = code;
- verr (status, format, ap);
+ errno = code;
+ verr(status, format, ap);
}
diff --git a/src/fgetln.c b/src/fgetln.c
index 317880d..9ccc1b9 100644
--- a/src/fgetln.c
+++ b/src/fgetln.c
@@ -32,7 +32,7 @@
#ifdef __GLIBC__
char *
-fgetln (FILE *stream, size_t *len)
+fgetln(FILE *stream, size_t *len)
{
static char *line = NULL;
static size_t line_len = 0;
diff --git a/src/progname.c b/src/progname.c
index 9415f17..0a47c22 100644
--- a/src/progname.c
+++ b/src/progname.c
@@ -33,13 +33,13 @@
static char *__progname = NULL;
char *
-getprogname ()
+getprogname()
{
- return __progname;
+ return __progname;
}
void
-setprogname (char *new)
+setprogname(char *new)
{
- __progname = new;
+ __progname = new;
}