25 |
#include "ansidecl.h" |
#include "ansidecl.h" |
26 |
#include "libiberty.h" |
#include "libiberty.h" |
27 |
|
|
28 |
#ifdef isspace |
#define ISBLANK(ch) ((ch) == ' ' || (ch) == '\t') |
|
#undef isspace |
|
|
#endif |
|
|
#define isspace(ch) ((ch) == ' ' || (ch) == '\t') |
|
29 |
|
|
30 |
/* Routines imported from standard C runtime libraries. */ |
/* Routines imported from standard C runtime libraries. */ |
31 |
|
|
32 |
#ifdef __STDC__ |
#ifdef __STDC__ |
33 |
|
|
34 |
#include <stddef.h> |
#include <stddef.h> |
35 |
extern void *memcpy (void *s1, const void *s2, size_t n); /* 4.11.2.1 */ |
#include <string.h> |
36 |
extern size_t strlen (const char *s); /* 4.11.6.3 */ |
#include <stdlib.h> |
|
extern void *malloc (size_t size); /* 4.10.3.3 */ |
|
|
extern void *realloc (void *ptr, size_t size); /* 4.10.3.4 */ |
|
|
extern void free (void *ptr); /* 4.10.3.2 */ |
|
|
extern char *strdup (const char *s); /* Non-ANSI */ |
|
37 |
|
|
38 |
#else /* !__STDC__ */ |
#else /* !__STDC__ */ |
39 |
|
|
224 |
do |
do |
225 |
{ |
{ |
226 |
/* Pick off argv[argc] */ |
/* Pick off argv[argc] */ |
227 |
while (isspace (*input)) |
while (ISBLANK (*input)) |
228 |
{ |
{ |
229 |
input++; |
input++; |
230 |
} |
} |
257 |
arg = copybuf; |
arg = copybuf; |
258 |
while (*input != EOS) |
while (*input != EOS) |
259 |
{ |
{ |
260 |
if (isspace (*input) && !squote && !dquote && !bsquote) |
if (ISBLANK (*input) && !squote && !dquote && !bsquote) |
261 |
{ |
{ |
262 |
break; |
break; |
263 |
} |
} |
323 |
argc++; |
argc++; |
324 |
argv[argc] = NULL; |
argv[argc] = NULL; |
325 |
|
|
326 |
while (isspace (*input)) |
while (ISBLANK (*input)) |
327 |
{ |
{ |
328 |
input++; |
input++; |
329 |
} |
} |