5 #define isspace(c) ((c)==' ' || (c)=='\t' || (c)=='\n')
7 /* Get the next field from a String. The field is delimited by white space,
8 * single or double quotes.
11 s_parse(String *from, String *to)
13 if (*from->ptr == '\0')
17 if (*from->ptr == '\'') {
19 for (;*from->ptr != '\'' && *from->ptr != '\0'; from->ptr++)
20 s_putc(to, *from->ptr);
21 if (*from->ptr == '\'')
23 } else if (*from->ptr == '"') {
25 for (;*from->ptr != '"' && *from->ptr != '\0'; from->ptr++)
26 s_putc(to, *from->ptr);
27 if (*from->ptr == '"')
30 for (;!isspace(*from->ptr) && *from->ptr != '\0'; from->ptr++)
31 s_putc(to, *from->ptr);
35 /* crunch trailing white */
36 while(isspace(*from->ptr))