summaryrefslogtreecommitdiff
path: root/stdio-common
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/printf.c4
-rw-r--r--stdio-common/scanf.c15
2 files changed, 7 insertions, 12 deletions
diff --git a/stdio-common/printf.c b/stdio-common/printf.c
index c92cd94d99..39f2a50a96 100644
--- a/stdio-common/printf.c
+++ b/stdio-common/printf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@ printf (const char *format, ...)
int done;
va_start (arg, format);
- done = vprintf (format, arg);
+ done = vfprintf (stdout, format, arg);
va_end (arg);
return done;
diff --git a/stdio-common/scanf.c b/stdio-common/scanf.c
index bb8a5ae8cb..d4eacbe4ed 100644
--- a/stdio-common/scanf.c
+++ b/stdio-common/scanf.c
@@ -19,15 +19,6 @@
#include <stdarg.h>
#include <stdio.h>
-/* The function `vscanf' is not defined in ISO C. Therefore we must
- use the protected form here. In stdio it is called `__vscanf' and
- in libio `_IO_vscanf'. */
-#ifdef USE_IN_LIBIO
-# include <libioP.h>
-# define VSCANF _IO_vscanf
-#else
-# define VSCANF __vscanf
-#endif
/* Read formatted input from stdin according to the format string FORMAT. */
/* VARARGS1 */
@@ -38,7 +29,11 @@ scanf (const char *format, ...)
int done;
va_start (arg, format);
- done = VSCANF (format, arg);
+#ifdef USE_IN_LIBIO
+ done = _IO_vfscanf (stdin, format, arg, NULL);
+#else
+ done = vfscanf (stdin, format, arg);
+#endif
va_end (arg);
return done;