aboutsummaryrefslogtreecommitdiff
path: root/wcsmbs
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs')
-rw-r--r--wcsmbs/isoc99_fwscanf.c7
-rw-r--r--wcsmbs/isoc99_swscanf.c3
-rw-r--r--wcsmbs/isoc99_vfwscanf.c9
-rw-r--r--wcsmbs/isoc99_vswscanf.c3
-rw-r--r--wcsmbs/isoc99_vwscanf.c9
-rw-r--r--wcsmbs/isoc99_wscanf.c7
6 files changed, 6 insertions, 32 deletions
diff --git a/wcsmbs/isoc99_fwscanf.c b/wcsmbs/isoc99_fwscanf.c
index 00b07dd48e..5829607916 100644
--- a/wcsmbs/isoc99_fwscanf.c
+++ b/wcsmbs/isoc99_fwscanf.c
@@ -21,20 +21,15 @@
#include <wchar.h>
/* Read formatted input from STREAM according to the format string FORMAT. */
-/* VARARGS2 */
int
__isoc99_fwscanf (FILE *stream, const wchar_t *format, ...)
{
va_list arg;
int done;
- _IO_acquire_lock_clear_flags2 (stream);
- stream->_flags2 |= _IO_FLAGS2_SCANF_STD;
-
va_start (arg, format);
- done = __vfwscanf_internal (stream, format, arg, 0);
+ done = __vfwscanf_internal (stream, format, arg, SCANF_ISOC99_A);
va_end (arg);
- _IO_release_lock (stream);
return done;
}
diff --git a/wcsmbs/isoc99_swscanf.c b/wcsmbs/isoc99_swscanf.c
index 40401d0aa1..f90e56d97f 100644
--- a/wcsmbs/isoc99_swscanf.c
+++ b/wcsmbs/isoc99_swscanf.c
@@ -28,10 +28,9 @@ __isoc99_swscanf (const wchar_t *s, const wchar_t *format, ...)
_IO_strfile sf;
struct _IO_wide_data wd;
FILE *f = _IO_strfile_readw (&sf, &wd, s);
- f->_flags2 |= _IO_FLAGS2_SCANF_STD;
va_start (arg, format);
- done = __vfwscanf_internal (f, format, arg, 0);
+ done = __vfwscanf_internal (f, format, arg, SCANF_ISOC99_A);
va_end (arg);
return done;
diff --git a/wcsmbs/isoc99_vfwscanf.c b/wcsmbs/isoc99_vfwscanf.c
index f70c6b596d..715d354b5a 100644
--- a/wcsmbs/isoc99_vfwscanf.c
+++ b/wcsmbs/isoc99_vfwscanf.c
@@ -20,16 +20,9 @@
#include <wchar.h>
/* Read formatted input from STREAM according to the format string FORMAT. */
-/* VARARGS2 */
int
__isoc99_vfwscanf (FILE *stream, const wchar_t *format, va_list args)
{
- int done;
-
- _IO_acquire_lock_clear_flags2 (stream);
- stream->_flags2 |= _IO_FLAGS2_SCANF_STD;
- done = __vfwscanf_internal (stream, format, args, 0);
- _IO_release_lock (stream);
- return done;
+ return __vfwscanf_internal (stream, format, args, SCANF_ISOC99_A);
}
libc_hidden_def (__isoc99_vfwscanf)
diff --git a/wcsmbs/isoc99_vswscanf.c b/wcsmbs/isoc99_vswscanf.c
index b91eb651a3..0d8ef7611a 100644
--- a/wcsmbs/isoc99_vswscanf.c
+++ b/wcsmbs/isoc99_vswscanf.c
@@ -33,7 +33,6 @@ __isoc99_vswscanf (const wchar_t *string, const wchar_t *format, va_list args)
_IO_strfile sf;
struct _IO_wide_data wd;
FILE *f = _IO_strfile_readw (&sf, &wd, string);
- f->_flags2 |= _IO_FLAGS2_SCANF_STD;
- return __vfwscanf_internal (f, format, args, 0);
+ return __vfwscanf_internal (f, format, args, SCANF_ISOC99_A);
}
libc_hidden_def (__isoc99_vswscanf)
diff --git a/wcsmbs/isoc99_vwscanf.c b/wcsmbs/isoc99_vwscanf.c
index eb22c8acae..3ac3182608 100644
--- a/wcsmbs/isoc99_vwscanf.c
+++ b/wcsmbs/isoc99_vwscanf.c
@@ -20,15 +20,8 @@
#include <wchar.h>
/* Read formatted input from STDIN according to the format string FORMAT. */
-/* VARARGS2 */
int
__isoc99_vwscanf (const wchar_t *format, va_list args)
{
- int done;
-
- _IO_acquire_lock_clear_flags2 (stdin);
- stdin->_flags2 |= _IO_FLAGS2_SCANF_STD;
- done = __vfwscanf_internal (stdin, format, args, 0);
- _IO_release_lock (stdin);
- return done;
+ return __vfwscanf_internal (stdin, format, args, SCANF_ISOC99_A);
}
diff --git a/wcsmbs/isoc99_wscanf.c b/wcsmbs/isoc99_wscanf.c
index 59f80d78fb..b9418f7912 100644
--- a/wcsmbs/isoc99_wscanf.c
+++ b/wcsmbs/isoc99_wscanf.c
@@ -22,20 +22,15 @@
/* Read formatted input from stdin according to the format string FORMAT. */
-/* VARARGS1 */
int
__isoc99_wscanf (const wchar_t *format, ...)
{
va_list arg;
int done;
- _IO_acquire_lock_clear_flags2 (stdin);
- stdin->_flags2 |= _IO_FLAGS2_SCANF_STD;
-
va_start (arg, format);
- done = __vfwscanf_internal (stdin, format, arg, 0);
+ done = __vfwscanf_internal (stdin, format, arg, SCANF_ISOC99_A);
va_end (arg);
- _IO_release_lock (stdin);
return done;
}