summaryrefslogtreecommitdiff
path: root/libiberty/argv.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2000-12-08 16:37:01 +0000
committerDJ Delorie <dj@redhat.com>2000-12-08 16:37:01 +0000
commitac424eb32cfa4618d9c3b58276e950e2cc58c540 (patch)
treece31655983ddde8e1e5bee9ddc4b332540e586bb /libiberty/argv.c
parent39cd2525463aab63af6a9b111a01fb2b37e1733a (diff)
* 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.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libiberty/argv.c b/libiberty/argv.c
index f596ffd011..7aec9c04cf 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++;
}