}
amatch(s, p)					/* quote in p */	register char *s;	register u_char *p;{	register int scc;	int ok, lc;	char *spathp;	struct stat stb;	int c, cc;	expany = 1;	for (;;) {		scc = *s++;		switch (c = *p++) {		case '{':			return (execbrc((u_char *)p - 1, (u_char *)s - 1));		case '[':			ok = 0;			lc = 077777;			while (cc = *p++) {				if (cc == ']') {					if (ok)						break;					return (0);				}				if (cc == QUOTECHAR) cc = *p++;				if (cc == '-') {					if (lc <= scc && scc <= (int)*p++)						ok++;				} else					if (scc == (lc = cc))						ok++;			}			if (cc == 0) {				yyerror("Missing ']'");				return (0);			}			continue;		case '*':			if (!*p)				return (1);			if (*p == '/') {				p++;				goto slash;			}			for (s--; *s; s++)				if (amatch(s, p))					return (1);			return (0);		case CNULL:			return (scc == CNULL);		default:			if (c != scc)				return (0);			continue;		case '?':			if (scc == CNULL)				return (0);			continue;		case '/':			if (scc)				return (0);slash:			s = entp;			spathp = pathp;			while (*s)				addpath(*s++);			addpath('/');			if (stat(path, &stb) == 0 && S_ISDIR(stb.st_mode))				if (*p == CNULL) {					if (which & E_TILDE)						Cat((u_char *)path, 						    (u_char *)"");					else						Cat((u_char *)tilde, 						    (u_char *)tpathp);				} else					expsh(p);			pathp = spathp;			*pathp = CNULL;			return (0);		}	}}