summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-05-28 17:03:12 +0000
committeralfred <alfred@FreeBSD.org>2002-05-28 17:03:12 +0000
commit1ee311b26d7122f860fe940db6ce46968981a9a3 (patch)
tree96c195652047b452e756960d6bdfc6786443c564 /lib/libc/stdio
parentae40c00e1724fe7d6584623e3a953b6b44fc741f (diff)
downloadFreeBSD-src-1ee311b26d7122f860fe940db6ce46968981a9a3.zip
FreeBSD-src-1ee311b26d7122f860fe940db6ce46968981a9a3.tar.gz
Assume __STDC__, remove non-__STDC__ code.
Submitted by: keramida
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/asprintf.c15
-rw-r--r--lib/libc/stdio/fprintf.c15
-rw-r--r--lib/libc/stdio/fscanf.c20
-rw-r--r--lib/libc/stdio/funopen.c4
-rw-r--r--lib/libc/stdio/fvwrite.h4
-rw-r--r--lib/libc/stdio/printf.c14
-rw-r--r--lib/libc/stdio/scanf.c15
-rw-r--r--lib/libc/stdio/snprintf.c17
-rw-r--r--lib/libc/stdio/sprintf.c15
-rw-r--r--lib/libc/stdio/sscanf.c16
-rw-r--r--lib/libc/stdio/vfprintf.c4
-rw-r--r--lib/libc/stdio/vfscanf.c4
12 files changed, 2 insertions, 141 deletions
diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c
index 276f86f..57116e6 100644
--- a/lib/libc/stdio/asprintf.c
+++ b/lib/libc/stdio/asprintf.c
@@ -33,33 +33,18 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "local.h"
int
-#if __STDC__
asprintf(char **str, char const *fmt, ...)
-#else
-asprintf(str, fmt, va_alist)
- char **str;
- const char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
FILE f;
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
f._file = -1;
f._flags = __SWR | __SSTR | __SALC;
f._bf._base = f._p = (unsigned char *)malloc(128);
diff --git a/lib/libc/stdio/fprintf.c b/lib/libc/stdio/fprintf.c
index 53c1328..55ae1d5 100644
--- a/lib/libc/stdio/fprintf.c
+++ b/lib/libc/stdio/fprintf.c
@@ -41,30 +41,15 @@ static char sccsid[] = "@(#)fprintf.c 8.1 (Berkeley) 6/4/93";
__FBSDID("$FreeBSD$");
#include <stdio.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
int
-#if __STDC__
fprintf(FILE *fp, const char *fmt, ...)
-#else
-fprintf(fp, fmt, va_alist)
- FILE *fp;
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
ret = vfprintf(fp, fmt, ap);
va_end(ap);
return (ret);
diff --git a/lib/libc/stdio/fscanf.c b/lib/libc/stdio/fscanf.c
index e147e79..1c376a8 100644
--- a/lib/libc/stdio/fscanf.c
+++ b/lib/libc/stdio/fscanf.c
@@ -42,33 +42,17 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
#include <stdio.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "un-namespace.h"
#include "libc_private.h"
-#if __STDC__
int
-fscanf(FILE *fp, char const *fmt, ...) {
- int ret;
- va_list ap;
-
- va_start(ap, fmt);
-#else
-int
-fscanf(fp, fmt, va_alist)
- FILE *fp;
- char *fmt;
- va_dcl
+fscanf(FILE *fp, char const *fmt, ...)
{
int ret;
va_list ap;
- va_start(ap);
-#endif
+ va_start(ap, fmt);
FLOCKFILE(fp);
ret = __svfscanf(fp, fmt, ap);
va_end(ap);
diff --git a/lib/libc/stdio/funopen.c b/lib/libc/stdio/funopen.c
index 28da521..459cd5c 100644
--- a/lib/libc/stdio/funopen.c
+++ b/lib/libc/stdio/funopen.c
@@ -49,11 +49,7 @@ FILE *
funopen(cookie, readfn, writefn, seekfn, closefn)
const void *cookie;
int (*readfn)(), (*writefn)();
-#if __STDC__
fpos_t (*seekfn)(void *cookie, fpos_t off, int whence);
-#else
- fpos_t (*seekfn)();
-#endif
int (*closefn)();
{
FILE *fp;
diff --git a/lib/libc/stdio/fvwrite.h b/lib/libc/stdio/fvwrite.h
index e55341b..df59bf0 100644
--- a/lib/libc/stdio/fvwrite.h
+++ b/lib/libc/stdio/fvwrite.h
@@ -50,8 +50,4 @@ struct __suio {
int uio_resid;
};
-#if __STDC__ || c_plusplus
extern int __sfvwrite(FILE *, struct __suio *);
-#else
-extern int __sfvwrite();
-#endif
diff --git a/lib/libc/stdio/printf.c b/lib/libc/stdio/printf.c
index 1d24931..bd7d16c 100644
--- a/lib/libc/stdio/printf.c
+++ b/lib/libc/stdio/printf.c
@@ -41,29 +41,15 @@ static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 6/4/93";
__FBSDID("$FreeBSD$");
#include <stdio.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
int
-#if __STDC__
printf(char const *fmt, ...)
-#else
-printf(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
ret = vfprintf(stdout, fmt, ap);
va_end(ap);
return (ret);
diff --git a/lib/libc/stdio/scanf.c b/lib/libc/stdio/scanf.c
index 98cd4e2..990c9b0 100644
--- a/lib/libc/stdio/scanf.c
+++ b/lib/libc/stdio/scanf.c
@@ -42,32 +42,17 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
#include <stdio.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "un-namespace.h"
#include "libc_private.h"
-#if __STDC__
int
scanf(char const *fmt, ...)
-#else
-int
-scanf(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
FLOCKFILE(stdin);
ret = __svfscanf(stdin, fmt, ap);
FUNLOCKFILE(stdin);
diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c
index 0a09bac..e3e71f2 100644
--- a/lib/libc/stdio/snprintf.c
+++ b/lib/libc/stdio/snprintf.c
@@ -42,25 +42,12 @@ __FBSDID("$FreeBSD$");
#include <limits.h>
#include <stdio.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "local.h"
-#if __STDC__
int
snprintf(char *str, size_t n, char const *fmt, ...)
-#else
-int
-snprintf(str, n, fmt, va_alist)
- char *str;
- size_t n;
- char *fmt;
- va_dcl
-#endif
{
size_t on;
int ret;
@@ -72,11 +59,7 @@ snprintf(str, n, fmt, va_alist)
n--;
if (n > INT_MAX)
n = INT_MAX;
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
f._file = -1;
f._flags = __SWR | __SSTR;
f._bf._base = f._p = (unsigned char *)str;
diff --git a/lib/libc/stdio/sprintf.c b/lib/libc/stdio/sprintf.c
index 075ac63..7b81c1f 100644
--- a/lib/libc/stdio/sprintf.c
+++ b/lib/libc/stdio/sprintf.c
@@ -41,23 +41,12 @@ static char sccsid[] = "@(#)sprintf.c 8.1 (Berkeley) 6/4/93";
__FBSDID("$FreeBSD$");
#include <stdio.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <limits.h>
#include "local.h"
int
-#if __STDC__
sprintf(char *str, char const *fmt, ...)
-#else
-sprintf(str, fmt, va_alist)
- char *str;
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
@@ -67,11 +56,7 @@ sprintf(str, fmt, va_alist)
f._flags = __SWR | __SSTR;
f._bf._base = f._p = (unsigned char *)str;
f._bf._size = f._w = INT_MAX;
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
ret = __vfprintf(&f, fmt, ap);
va_end(ap);
*f._p = 0;
diff --git a/lib/libc/stdio/sscanf.c b/lib/libc/stdio/sscanf.c
index 5a9ada6..d988326 100644
--- a/lib/libc/stdio/sscanf.c
+++ b/lib/libc/stdio/sscanf.c
@@ -42,11 +42,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <string.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "local.h"
static int eofread(void *, char *, int);
@@ -62,16 +58,8 @@ eofread(cookie, buf, len)
return (0);
}
-#if __STDC__
int
sscanf(const char *str, char const *fmt, ...)
-#else
-int
-sscanf(str, fmt, va_alist)
- char *str;
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
@@ -87,11 +75,7 @@ sscanf(str, fmt, va_alist)
f._lb._base = NULL;
f._extra = &extra;
INITEXTRA(&f);
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
ret = __svfscanf(&f, fmt, ap);
va_end(ap);
return (ret);
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index b723c67..55fc82c 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -58,11 +58,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "un-namespace.h"
#include "libc_private.h"
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c
index a31d6ad0..e329eed 100644
--- a/lib/libc/stdio/vfscanf.c
+++ b/lib/libc/stdio/vfscanf.c
@@ -46,11 +46,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <string.h>
#include "un-namespace.h"
OpenPOWER on IntegriCloud