(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
|
||||
islist(char *p)
|
||||
{
|
||||
int x;
|
||||
|
||||
x = 0;
|
||||
|
||||
while (*(p + x)) {
|
||||
if (!isdigit(*(p + x)) && (*(p + x) != '/'))
|
||||
for (; *p; p++) {
|
||||
if (!isdigit(*p) && *p != '/')
|
||||
return 0;
|
||||
|
||||
x++;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue