10 date 90.04.05.15.31.43; author sources; state Exp;
15 date 90.04.05.14.48.52; author sources; state Exp;
20 date 90.02.06.12.59.16; author sources; state Exp;
25 date 90.02.06.12.58.59; author sources; state Exp;
39 @/* brkstring.c - break string into an array of strings */
41 static char ident[] = "@@(#)$Id:$";
47 static char *broken[MAXARGS+1]; /* array of substring start addresses */
50 char **brkstring (strg, brksep, brkterm)
52 register char *brksep,
59 sp = strg; /* scan string, replacing separators with
62 for (bi = 0; bi < MAXARGS; bi++) {
63 /* and entering start addrs in "broken" */
64 while (brkany (c = *sp, brksep))
66 if (!c || brkany (c, brkterm)) {
69 return broken; /* terminator found, finish up */
72 broken[bi] = sp; /* set next start addr */
73 while ((c = *++sp) && !brkany (c, brksep) && !brkany (c, brkterm))
76 broken[MAXARGS] = 0; /* reached limit of MAXARGS substrings */
82 static brkany (chr, strg) /* returns 1 if chr in strg, 0 otherwise */
89 for (sp = strg; *sp; sp++)
104 static char ident[] = "$Id:";