goto step7;
cdcmd(int argc, char **argv){	const char *dest;	const char *path;	const char *p;	char c;	struct stat statb;	int flags;	flags = cdopt();	dest = *argptr;	if (!dest)		dest = bltinlookup(homestr);	else if (dest[0] == '-' && dest[1] == '\0') {		dest = bltinlookup("OLDPWD");		flags |= CD_PRINT;		goto step7;	}	if (!dest)		dest = nullstr;	if (*dest == '/')		goto step7;	if (*dest == '.') {		c = dest[1];dotdot:		switch (c) {		case '\0':		case '/':			goto step6;		case '.':			c = dest[2];			if (c != '.')				goto dotdot;		}	}	if (!*dest)		dest = ".";	if (!(path = bltinlookup("CDPATH"))) {step6:step7:		p = dest;		goto docd;	}	do {		c = *path;		p = padvance(&path, dest);		if (stat(p, &statb) >= 0 && S_ISDIR(statb.st_mode)) {			if (c && c != ':')				flags |= CD_PRINT;docd:			if (!docd(p, flags))				goto out;			break;		}	} while (path);	error("can't cd to %s", dest);	/* NOTREACHED */out:	if (flags & CD_PRINT)		out1fmt(snlfmt, curdir);	return 0;}