summaryrefslogtreecommitdiffstats
path: root/sys/lib/libsa/printf.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2002-03-15 18:19:52 +0000
committermillert <millert@openbsd.org>2002-03-15 18:19:52 +0000
commit28afbff99ec10f63540b43942c680ec7abbf823d (patch)
tree5a63b85b7a06f31bd641e6093f7566373a3534aa /sys/lib/libsa/printf.c
parentKill some #if __STDC__ used with 8bit function args; we live in an ANSI world (diff)
downloadwireguard-openbsd-28afbff99ec10f63540b43942c680ec7abbf823d.tar.xz
wireguard-openbsd-28afbff99ec10f63540b43942c680ec7abbf823d.zip
Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.
Diffstat (limited to 'sys/lib/libsa/printf.c')
-rw-r--r--sys/lib/libsa/printf.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/sys/lib/libsa/printf.c b/sys/lib/libsa/printf.c
index 4dfe0ea69de..b3ea67de348 100644
--- a/sys/lib/libsa/printf.c
+++ b/sys/lib/libsa/printf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printf.c,v 1.16 2002/03/14 03:16:10 millert Exp $ */
+/* $OpenBSD: printf.c,v 1.17 2002/03/15 18:19:52 millert Exp $ */
/* $NetBSD: printf.c,v 1.10 1996/11/30 04:19:21 gwr Exp $ */
/*-
@@ -61,11 +61,7 @@
#include <sys/cdefs.h>
#include <sys/types.h>
-#ifdef __STDC__
#include <machine/stdarg.h>
-#else
-#include <machine/varargs.h>
-#endif
#include "stand.h"
@@ -84,21 +80,12 @@ sputchar(c)
}
void
-#ifdef __STDC__
sprintf(char *buf, const char *fmt, ...)
-#else
-sprintf(buf, fmt, va_alist)
- char *buf, *fmt;
-#endif
{
va_list ap;
sbuf = buf;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
kdoprnt(sputchar, fmt, ap);
va_end(ap);
*sbuf = '\0';
@@ -106,20 +93,11 @@ sprintf(buf, fmt, va_alist)
#endif /* NO_SPRINTF */
void
-#ifdef __STDC__
printf(const char *fmt, ...)
-#else
-printf(fmt, va_alist)
- char *fmt;
-#endif
{
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
kdoprnt(putchar, fmt, ap);
va_end(ap);
}