forked from Imagelibrary/binutils-gdb
* 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).
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user