aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/vfscanf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-01-23 22:17:17 +0000
committerUlrich Drepper <drepper@redhat.com>1999-01-23 22:17:17 +0000
commit4caef86ca68a3fea8fab5398bedc5e0e6c0d222b (patch)
tree4ed5e6e23fb6d99df8761dc425adbb91405915fb /stdio-common/vfscanf.c
parent8831788577cda2e19e27e6f1a793339abb9711fa (diff)
downloadglibc-4caef86ca68a3fea8fab5398bedc5e0e6c0d222b.tar
glibc-4caef86ca68a3fea8fab5398bedc5e0e6c0d222b.tar.gz
glibc-4caef86ca68a3fea8fab5398bedc5e0e6c0d222b.tar.bz2
glibc-4caef86ca68a3fea8fab5398bedc5e0e6c0d222b.zip
Update.
1999-01-23 Ulrich Drepper <drepper@cygnus.com> * nss/nss_files/files-XXX.c (internal_getent): Make sure the buffer has at least two bytes (not one). Correct buflen parameter type. * nss/nss_files/files-alias.c (get_next_alias): Make sure buffer has at least two bytes. Use fgets_unlocked instead of fgets. * ctype/ctype.h: Don't user __tolower directly for tolower implementation. Use inline function which tests for the range first. Make _tolower equivalent to old tolower macros. Likewise for toupper. * ctype/ctype.c: Change tolower/toupper definition accordingly. * argp/argp-help.c: Use _tolower instead of tolower if possible. * inet/ether_aton_r.c: Likewise. * inet/ether_line.c: Likewise. * inet/rcmd.c: Likewise. * intl/l10nflist.c: Likewise. * locale/programs/ld-collate.c: Likewise. * locale/programs/linereader.c: Likewise. * locale/programs/localedef.c: Likewise. * nis/nss_nis/nis-alias.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * posix/regex.c: Likewise. * resolv/inet_net_pton.c: Likewise. * stdio-common/printf_fp.c: Likewise. * stdio-common/vfscanf.c: Likewise. * sysdeps/generic/strcasestr.c: Likewise. * math/bits/mathcalls.h: Fix typo.
Diffstat (limited to 'stdio-common/vfscanf.c')
-rw-r--r--stdio-common/vfscanf.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 174ecf523d..f05fc700dc 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -844,7 +844,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
ADDW (c);
c = inchar ();
- if (width != 0 && tolower (c) == 'x')
+ if (width != 0 && _tolower (c) == 'x')
{
if (base == 0)
base = 16;
@@ -883,9 +883,9 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
we must recognize "(nil)" as well. */
if (wpsize == 0 && read_pointer && (width < 0 || width >= 0)
&& c == '('
- && tolower (inchar ()) == 'n'
- && tolower (inchar ()) == 'i'
- && tolower (inchar ()) == 'l'
+ && _tolower (inchar ()) == 'n'
+ && _tolower (inchar ()) == 'i'
+ && _tolower (inchar ()) == 'l'
&& inchar () == ')')
/* We must produce the value of a NULL pointer. A single
'0' digit is enough. */
@@ -980,46 +980,46 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
negative = 0;
/* Take care for the special arguments "nan" and "inf". */
- if (tolower (c) == 'n')
+ if (_tolower (c) == 'n')
{
/* Maybe "nan". */
ADDW (c);
- if (inchar () == EOF || tolower (c) != 'a')
+ if (inchar () == EOF || _tolower (c) != 'a')
input_error ();
ADDW (c);
- if (inchar () == EOF || tolower (c) != 'n')
+ if (inchar () == EOF || _tolower (c) != 'n')
input_error ();
ADDW (c);
/* It is "nan". */
goto scan_float;
}
- else if (tolower (c) == 'i')
+ else if (_tolower (c) == 'i')
{
/* Maybe "inf" or "infinity". */
ADDW (c);
- if (inchar () == EOF || tolower (c) != 'n')
+ if (inchar () == EOF || _tolower (c) != 'n')
input_error ();
ADDW (c);
- if (inchar () == EOF || tolower (c) != 'f')
+ if (inchar () == EOF || _tolower (c) != 'f')
input_error ();
ADDW (c);
/* It is as least "inf". */
if (inchar () != EOF)
{
- if (tolower (c) == 'i')
+ if (_tolower (c) == 'i')
{
/* No we have to read the rest as well. */
ADDW (c);
- if (inchar () == EOF || tolower (c) != 'n')
+ if (inchar () == EOF || _tolower (c) != 'n')
input_error ();
ADDW (c);
- if (inchar () == EOF || tolower (c) != 'i')
+ if (inchar () == EOF || _tolower (c) != 'i')
input_error ();
ADDW (c);
- if (inchar () == EOF || tolower (c) != 't')
+ if (inchar () == EOF || _tolower (c) != 't')
input_error ();
ADDW (c);
- if (inchar () == EOF || tolower (c) != 'y')
+ if (inchar () == EOF || _tolower (c) != 'y')
input_error ();
ADDW (c);
}
@@ -1036,7 +1036,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
{
ADDW (c);
c = inchar ();
- if (tolower (c) == 'x')
+ if (_tolower (c) == 'x')
{
/* It is a number in hexadecimal format. */
ADDW (c);
@@ -1060,7 +1060,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
else if (got_e && wp[wpsize - 1] == exp_char
&& (c == '-' || c == '+'))
ADDW (c);
- else if (wpsize > 0 && !got_e && tolower (c) == exp_char)
+ else if (wpsize > 0 && !got_e && _tolower (c) == exp_char)
{
ADDW (exp_char);
got_e = got_dot = 1;