/* matchstar: leftmost longest search for c*re */
int matchstar(int c, char *re, char *text)
{
char *t;
for (t = text; *t != '\0' && (*t == c || c == '.'); t++)
;
do { /* * matches zero or more */
if (matchhere(re, t))
return 1;
} while (t-- > text);
return 0;
}