aboutsummaryrefslogtreecommitdiff
path: root/stdio-common
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-11-27 02:20:12 +0000
committerUlrich Drepper <drepper@redhat.com>2001-11-27 02:20:12 +0000
commitf4efd06825ba5fec62662be611d94335eff4f8f7 (patch)
tree213507c7d4adbab716e9e013101bcc32738e6eed /stdio-common
parent05957bbd9027ee879c141fecb28cd7813ffdb466 (diff)
downloadglibc-f4efd06825ba5fec62662be611d94335eff4f8f7.zip
glibc-f4efd06825ba5fec62662be611d94335eff4f8f7.tar.gz
glibc-f4efd06825ba5fec62662be611d94335eff4f8f7.tar.bz2
Update.
2001-11-26 Ulrich Drepper <drepper@redhat.com> * stdio-common/vfscanf.c: If incomplete nan of inf(inity) strings are found call conv_error and not input_error [PR libc/2669]. * math/bits/mathcalls.h: Mark ceil and floor as const. Reported by David Mosberger. 2001-11-21 Jim Meyering <meyering@lucent.com> * posix/regex.c (iswctype, mbrtowc, wcslen, wcscoll, wcrtomb) [_LIBC]: Define to be __-prefixed. Remove unnecessary duplication in `#ifdef _LIBC' blocks.
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/vfscanf.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 0b53d7e..b4b7d4d 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -1596,7 +1596,8 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
if (width == 0 || inchar () == EOF)
/* EOF is only an input error before we read any chars. */
conv_error ();
- if (! ISDIGIT (c) && TOLOWER (c) != L_('i'))
+ if (! ISDIGIT (c) && TOLOWER (c) != L_('i')
+ && TOLOWER (c) != L_('n'))
{
#ifdef COMPILE_WSCANF
if (c != decimal)
@@ -1654,12 +1655,12 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
/* Maybe "nan". */
ADDW (c);
if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('a'))
- input_error ();
+ conv_error ();
if (width > 0)
--width;
ADDW (c);
if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('n'))
- input_error ();
+ conv_error ();
if (width > 0)
--width;
ADDW (c);
@@ -1671,12 +1672,12 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
/* Maybe "inf" or "infinity". */
ADDW (c);
if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('n'))
- input_error ();
+ conv_error ();
if (width > 0)
--width;
ADDW (c);
if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('f'))
- input_error ();
+ conv_error ();
if (width > 0)
--width;
ADDW (c);
@@ -1691,25 +1692,25 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
ADDW (c);
if (width == 0 || inchar () == EOF
|| TOLOWER (c) != L_('n'))
- input_error ();
+ conv_error ();
if (width > 0)
--width;
ADDW (c);
if (width == 0 || inchar () == EOF
|| TOLOWER (c) != L_('i'))
- input_error ();
+ conv_error ();
if (width > 0)
--width;
ADDW (c);
if (width == 0 || inchar () == EOF
|| TOLOWER (c) != L_('t'))
- input_error ();
+ conv_error ();
if (width > 0)
--width;
ADDW (c);
if (width == 0 || inchar () == EOF
|| TOLOWER (c) != L_('y'))
- input_error ();
+ conv_error ();
if (width > 0)
--width;
ADDW (c);