e1 = s1;
for (i = skip_fields; i; i--) {
e1 = skip_whitespace(e1);
- while (*e1 && !isspace(*e1)) {
- ++e1;
- }
+ e1 = skip_non_whitespace(e1);
}
for (i = skip_chars; *e1 && i; i--) {
++e1;
current = skip_whitespace(*buffer);
if (*current != 0) {
start = current;
- while (!isspace(*current) && *current != 0) {
- current++;
- }
+ current = skip_non_whitespace(current);
*buffer = current;
}
return start;
// Grab next word. (Add dequote and envvar logic here)
end = start;
- while (*end && !isspace(*end)) end++;
+ end = skip_non_whitespace(end);
(*cmd)->argv[(*cmd)->argc++] = xstrndup(start, end-start);
// Allocate more space if there's no room for NULL terminator.