Commit abe0a4a7e6e0c8d9c7b8bdb55ade9535ec342578

Guillem Jover 2010-01-10T11:02:13

Reformat code to KNF

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;
 }