usr.sbin/timed/timedc/timedc.c
/*
 * Slice a string up into argc/argv.
 */
Slice a string up into argc/argv.
Slice a string up into argc / argv .
void
makeargv()
{
	register char *cp;
	register char **argp = margv;
	margc = 0;
	for (cp = cmdline; *cp;) {
		while (isspace(*cp))
			cp++;
		if (*cp == '\0')
			break;
		*argp++ = cp;
		margc += 1;
		while (*cp != '\0' && !isspace(*cp))
			cp++;
		if (*cp == '\0')
			break;
		*cp++ = '\0';
	}
	*argp++ = 0;
}
void makeargv ( ) { register char * cp ; register char * * argp = margv ; margc = 0 ; for ( cp = cmdline ; * cp ; ) { while ( isspace ( * cp ) ) cp ++ ; if ( * cp == ' \0 ' ) break ; * argp ++ = cp ; margc += 1 ; while ( * cp != ' \0 ' && ! isspace ( * cp ) ) cp ++ ; if ( * cp == ' \0 ' ) break ; * cp ++ = ' \0 ' ; } * argp ++ = 0 ; }
Slice a string up into argc/argv.
Slice a string up into argc / argv .