(islist): Simplify.
This commit is contained in:
parent
e28851b8e9
commit
4074ab02f1
1 changed files with 2 additions and 9 deletions
|
@ -288,16 +288,9 @@ num_shipsatxy(coord x, coord y, int wantflags, int nowantflags)
|
||||||
int
|
int
|
||||||
islist(char *p)
|
islist(char *p)
|
||||||
{
|
{
|
||||||
int x;
|
for (; *p; p++) {
|
||||||
|
if (!isdigit(*p) && *p != '/')
|
||||||
x = 0;
|
|
||||||
|
|
||||||
while (*(p + x)) {
|
|
||||||
if (!isdigit(*(p + x)) && (*(p + x) != '/'))
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
x++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue