18 |
|
badarg( /* check argument list */ |
19 |
|
int ac, |
20 |
|
char **av, |
21 |
< |
char *fl |
21 |
> |
const char *fl |
22 |
|
) |
23 |
|
{ |
24 |
|
int i; |
32 |
|
s = *av; |
33 |
|
switch (*fl) { |
34 |
|
case 's': /* string */ |
35 |
< |
while (*s == ' ') |
35 |
> |
while (isspace(*s)) |
36 |
|
++s; |
37 |
< |
if (!*s) |
38 |
< |
return(i); |
39 |
< |
do |
40 |
< |
if (!isprint(*s)) |
41 |
< |
return(i); |
42 |
< |
while (*++s); |
37 |
> |
if (!isprint(*s)) |
38 |
> |
return(i); |
39 |
> |
while (isprint(*s) | isspace(*s)) |
40 |
> |
++s; |
41 |
> |
if (*s) |
42 |
> |
return(i); |
43 |
|
break; |
44 |
|
case 'i': /* integer */ |
45 |
|
if (!isintd(s, " \t\r\n")) |