6 #define isspace(c) ((c)==' ' || (c)=='\t' || (c)=='\n')
8 /* Get the next field from a String. The field is delimited by white space,
9 * single or double quotes.
12 s_parse(String *from, String *to)
14 if (*from->ptr == '\0')
18 if (*from->ptr == '\'') {
20 for (;*from->ptr != '\'' && *from->ptr != '\0'; from->ptr++)
21 s_putc(to, *from->ptr);
22 if (*from->ptr == '\'')
24 } else if (*from->ptr == '"') {
26 for (;*from->ptr != '"' && *from->ptr != '\0'; from->ptr++)
27 s_putc(to, *from->ptr);
28 if (*from->ptr == '"')
31 for (;!isspace(*from->ptr) && *from->ptr != '\0'; from->ptr++)
32 s_putc(to, *from->ptr);
36 /* crunch trailing white */
37 while(isspace(*from->ptr))