/* str2vec.c - string to vector */
static char *rcsid
= "$Header: /f/osi/compat/RCS/str2vec.c,v 7.3 91/02/22 09:16:01 mrose Interim $";
* $Header: /f/osi/compat/RCS/str2vec.c,v 7.3 91/02/22 09:16:01 mrose Interim $
* Revision 7.3 91/02/22 09:16:01 mrose
* Revision 7.2 90/12/23 18:39:41 mrose
* Revision 7.1 90/11/21 11:30:02 mrose
* Revision 7.0 89/11/23 21:23:39 mrose
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
int str2vecX (s
, vec
, nmask
, mask
, brk
, docomma
)
char comma
= docomma
? ',' : ' ';
for (i
= 0; i
<= NVEC
;) {
while (isspace ((u_char
) *s
) || *s
== comma
)
for (vec
[i
++] = ++s
; *s
!= NULL
&& *s
!= '"'; s
++)
(void) strcpy (s
- 1, s
);
if (*s
== QUOTE
&& *++s
!= '"')
for (s
++; *s
!= NULL
&& *s
!= brk
; s
++)
for (s
++; *s
!= NULL
&& !isspace ((u_char
) *s
) && *s
!= comma
; s
++)