static char sccsid
[] = "@(#)getargs.c 5.3 (Berkeley) %G%";
* getargs - this routine will generate a vector of
* pointers (arps) to the substrings in string "s".
* Each substring is separated by blanks and/or tabs.
* If FANCYARGS is defined, you get the following:
* Strings containing blanks may be specified by quoting,
* in a manner similar to using the shell.
* Control characters are entered by ^X where X is any
* character; ^? gets you a rubout and ^^ is a real ^.
* Warning (rti!trt): I doubt FANCYARGS is wise, since getargs
* is used all over the place. Its features may be useful
* but a separate fancy_getargs() should be called instead.
* return - the number of subfields, or -1 if >= maxargs.
getargs(s
, arps
, maxargs
)
while (*s
== ' ' || *s
== '\t')
while (*s
!= '\0' && *s
!= ' '
&& *s
!= '\t' && *s
!= '\n')
while (*s
== ' ' || *s
== '\t')
if (*s
== '\n' || *s
== '\0')
while(*s
!= '\0' && *s
!= '\n') {
if (qchar
== 0 && (*s
== ' ' || *s
== '\t')) {