diff options
author | DJ Delorie <dj@redhat.com> | 2000-12-08 16:37:01 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2000-12-08 16:37:01 +0000 |
commit | ac424eb32cfa4618d9c3b58276e950e2cc58c540 (patch) | |
tree | ce31655983ddde8e1e5bee9ddc4b332540e586bb /libiberty/fnmatch.c | |
parent | 39cd2525463aab63af6a9b111a01fb2b37e1733a (diff) | |
download | gdb-ac424eb32cfa4618d9c3b58276e950e2cc58c540.zip gdb-ac424eb32cfa4618d9c3b58276e950e2cc58c540.tar.gz gdb-ac424eb32cfa4618d9c3b58276e950e2cc58c540.tar.bz2 |
* safe-ctype.c: New file.
* Makefile.in (CFILES): Add safe-ctype.c.
(REQUIRED_OFILES): Add safe-ctype.o.
* argv.c: Define ISBLANK and use it, not isspace.
* basename.c, cplus-dem.c, fnmatch.c, pexecute.c, strtod.c,
strtol.c, strtoul.c: Include safe-ctype.h, not ctype.h. Use
uppercase ctype macros. Don't test ISUPPER(c)/ISLOWER(c)
before calling TOLOWER(c)/TOUPPER(c).
Diffstat (limited to 'libiberty/fnmatch.c')
-rw-r--r-- | libiberty/fnmatch.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libiberty/fnmatch.c b/libiberty/fnmatch.c index 0a9bfe6..68f3e26 100644 --- a/libiberty/fnmatch.c +++ b/libiberty/fnmatch.c @@ -45,8 +45,7 @@ Boston, MA 02111-1307, USA. */ #include <errno.h> #include <fnmatch.h> -#include <ctype.h> - +#include <safe-ctype.h> /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C @@ -74,8 +73,7 @@ fnmatch (pattern, string, flags) register const char *p = pattern, *n = string; register unsigned char c; -/* Note that this evalutes C many times. */ -#define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c)) +#define FOLD(c) ((flags & FNM_CASEFOLD) ? TOLOWER (c) : (c)) while ((c = *p++) != '\0') { |