rval = 1;
traverse(argc, argv, options)	int argc, options;	char *argv[];{	FTS *ftsp;	FTSENT *p, *chp;	int ch_options;	if ((ftsp =	    fts_open(argv, options, f_nosort ? NULL : mastercmp)) == NULL)		err(1, NULL);	display(NULL, fts_children(ftsp, 0));	if (f_listdir)		return;	/*	 * If not recursing down this tree and don't need stat info, just get	 * the names.	 */	ch_options = !f_recursive && options & FTS_NOSTAT ? FTS_NAMEONLY : 0;	while ((p = fts_read(ftsp)) != NULL)		switch (p->fts_info) {		case FTS_DC:			warnx("%s: directory causes a cycle", p->fts_name);			break;		case FTS_DNR:		case FTS_ERR:			warnx("%s: %s", p->fts_name, strerror(p->fts_errno));			break;		case FTS_D:			if (p->fts_level != FTS_ROOTLEVEL &&			    p->fts_name[0] == '.' && !f_listdot)				break;			/*			 * If already output something, put out a newline as			 * a separator.  If multiple arguments, precede each			 * directory with its name.			 */			if (output)				(void)printf("\n%s:\n", p->fts_path);			else if (argc > 1) {				(void)printf("%s:\n", p->fts_path);				output = 1;			}			chp = fts_children(ftsp, ch_options);			display(p, chp);			if (!f_recursive && chp != NULL)				(void)fts_set(ftsp, p, FTS_SKIP);			break;		}	if (errno)		err(1, "fts_read");}