Lines Matching full:fields
36 * split - divide a string into fields, like awk split()
38 * returns number of fields, including overflow
40 * fields[] list is not NULL-terminated
41 * nfields number of entries available in fields[]
45 split(char *string, char *fields[], int nfields, const char *sep) in split() argument
52 char **fp = fields; in split()
85 /* we have overflowed the fields vector -- just count them */ in split()
115 /* we have overflowed the fields vector -- just count them */ in split()
188 char *fields[MNF]; in main() local
197 (void) split(buf, fields, MNF, argv[2]); in main()
216 char *fields[NF]; in dosplit() local
219 nf = split(string, fields, NF, seps); in dosplit()
220 print(nf, NF, fields); in dosplit()
224 print(int nf, int nfp, char *fields) in print() argument
232 printf("\"%s\"%s", fields[fn], (fn+1 < nf) ? ", " : "\n"); in print()
309 char *fields[RNF+1]; in regress() local
317 fields[RNF] = NULL; in regress()
318 nf = split(buf, fields, RNF, tests[n].seps); in regress()
321 printf("split `%s' by `%s' gave %d fields, not %d\n", in regress()
324 } else if (fields[RNF] != NULL) { in regress()
329 f = fields[i]; in regress()
335 i, fields[i], tests[n].fi[i]); in regress()
341 print(nf, RNF, fields); in regress()