```
while (token != NULL && (length=strlen(token))==0) {
  token = strtok (NULL, delimiters);
}
```
Why are you assigning to length? Is it ever used?