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/argv.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/argv.c')
-rw-r--r-- | libiberty/argv.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libiberty/argv.c b/libiberty/argv.c index f596ffd..7aec9c0 100644 --- a/libiberty/argv.c +++ b/libiberty/argv.c @@ -25,10 +25,7 @@ Boston, MA 02111-1307, USA. */ #include "ansidecl.h" #include "libiberty.h" -#ifdef isspace -#undef isspace -#endif -#define isspace(ch) ((ch) == ' ' || (ch) == '\t') +#define ISBLANK(ch) ((ch) == ' ' || (ch) == '\t') /* Routines imported from standard C runtime libraries. */ @@ -227,7 +224,7 @@ char *input; do { /* Pick off argv[argc] */ - while (isspace (*input)) + while (ISBLANK (*input)) { input++; } @@ -260,7 +257,7 @@ char *input; arg = copybuf; while (*input != EOS) { - if (isspace (*input) && !squote && !dquote && !bsquote) + if (ISBLANK (*input) && !squote && !dquote && !bsquote) { break; } @@ -326,7 +323,7 @@ char *input; argc++; argv[argc] = NULL; - while (isspace (*input)) + while (ISBLANK (*input)) { input++; } |