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/sscanf.c')
-rw-r--r--newlib/libc/stdio/sscanf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/stdio/sscanf.c b/newlib/libc/stdio/sscanf.c
index 1aca40507..687f53edf 100644
--- a/newlib/libc/stdio/sscanf.c
+++ b/newlib/libc/stdio/sscanf.c
@@ -402,12 +402,13 @@ sscanf(str, fmt, va_alist)
va_list ap;
FILE f;
- f._flags = __SRD;
+ f._flags = __SRD | __SSTR;
f._bf._base = f._p = (unsigned char *) str;
f._bf._size = f._r = strlen (str);
f._read = eofread;
f._ub._base = NULL;
f._lb._base = NULL;
+ f._file = -1; /* No file. */
#ifdef _HAVE_STDC
va_start (ap, fmt);
#else
@@ -439,12 +440,13 @@ _sscanf_r(ptr, str, fmt, va_alist)
va_list ap;
FILE f;
- f._flags = __SRD;
+ f._flags = __SRD | __SSTR;
f._bf._base = f._p = (unsigned char *) str;
f._bf._size = f._r = strlen (str);
f._read = eofread;
f._ub._base = NULL;
f._lb._base = NULL;
+ f._file = -1; /* No file. */
#ifdef _HAVE_STDC
va_start (ap, fmt);
#else