Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/scanf.c')
-rw-r--r--newlib/libc/stdio/scanf.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/newlib/libc/stdio/scanf.c b/newlib/libc/stdio/scanf.c
index cf1472ba7..de8e038fc 100644
--- a/newlib/libc/stdio/scanf.c
+++ b/newlib/libc/stdio/scanf.c
@@ -16,30 +16,30 @@
*/
#include <_ansi.h>
-#include <reent.h>
#include <stdio.h>
+#include "local.h"
+
#ifdef _HAVE_STDC
#include <stdarg.h>
#else
#include <varargs.h>
#endif
-#include "local.h"
#ifndef _REENT_ONLY
int
#ifdef _HAVE_STDC
-scanf(_CONST char *fmt, ...)
+scanf (const char *fmt, ...)
#else
-scanf(fmt, va_alist)
- char *fmt;
- va_dcl
+scanf (fmt, va_alist)
+ char *fmt;
+ va_dcl
#endif
{
int ret;
va_list ap;
- _REENT_SMALL_CHECK_INIT (_REENT);
+ _REENT_SMALL_CHECK_INIT(_stdin_r (_REENT));
#ifdef _HAVE_STDC
va_start (ap, fmt);
#else
@@ -54,18 +54,18 @@ scanf(fmt, va_alist)
int
#ifdef _HAVE_STDC
-_scanf_r(struct _reent *ptr, _CONST char *fmt, ...)
+_scanf_r (struct _reent *ptr, const char *fmt, ...)
#else
-_scanf_r(ptr, fmt, va_alist)
- struct _reent *ptr;
- char *fmt;
- va_dcl
+_scanf_r (ptr, fmt, va_alist)
+ struct _reent *ptr;
+ char *fmt;
+ va_dcl
#endif
{
int ret;
va_list ap;
- _REENT_SMALL_CHECK_INIT (ptr);
+ _REENT_SMALL_CHECK_INIT(_stdin_r (ptr));
#ifdef _HAVE_STDC
va_start (ap, fmt);
#else
@@ -76,3 +76,4 @@ _scanf_r(ptr, fmt, va_alist)
return (ret);
}
+