Make vlclient work with non-space whitespace separating arguments.
This also makes it cope with a trailing newline that fgets() gives us,
making this more intuitive to use.
Change-Id: Ida4da9f997ac073a5afa6c95e1b3cec180c18e1a
Reviewed-on: http://gerrit.openafs.org/2126
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
#endif
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
#include <afs/afsutil.h>
#include <rx/xdr.h>
*nargs = 0;
while (*line) {
register char *last = line;
- while (*line == ' ')
+ while (isspace(*line))
line++;
- if (*last == ' ')
+ if (isspace(*last))
*last = 0;
if (!*line)
break;
*args++ = line, (*nargs)++;
- while (*line && *line != ' ')
+ while (*line && !isspace(*line))
line++;
}
}