Commit abe0a4a7 authored by Guillem Jover's avatar Guillem Jover

Reformat code to KNF

parent 2872bfa1
......@@ -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);
}
......@@ -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);
}
......@@ -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;
......
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment