Lines Matching defs:from
189 s_append(string *to, char *from)
193 if (from == NULL)
195 for (; *from; from++)
196 s_putc(to, (int)(unsigned int)*from);
207 * FILE *fp; stream to read from
282 s_tok(string *from, char *split)
284 char *splitend = strpbrk(from->ptr, split);
288 for (; from->ptr < splitend; ) {
289 s_putc(to, (int)(unsigned int)*from->ptr);
290 from->ptr++;
295 from->ptr += strspn(from->ptr, split);
299 else if (from->ptr[0]) {
300 string *to = s_clone(from);
301 while (*from->ptr)
302 from->ptr++;
381 * Get the next field from a string. The field is delimited by white space,
384 * string *from; string to parse
388 s_parse(string *from, string *to)
390 while (isspace(*from->ptr))
391 from->ptr++;
392 if (*from->ptr == '\0')
396 if (*from->ptr == '\'') {
397 from->ptr++;
398 for (; *from->ptr != '\'' && *from->ptr != '\0'; from->ptr++)
399 s_putc(to, (int)(unsigned int)*from->ptr);
400 if (*from->ptr == '\'')
401 from->ptr++;
402 } else if (*from->ptr == '"') {
403 from->ptr++;
404 for (; *from->ptr != '"' && *from->ptr != '\0'; from->ptr++)
405 s_putc(to, (int)(unsigned int)*from->ptr);
406 if (*from->ptr == '"')
407 from->ptr++;
409 for (; !isspace(*from->ptr) && *from->ptr != '\0'; from->ptr++)
410 s_putc(to, (int)(unsigned int)*from->ptr);