rmatch
int rmatch(const char *, const char *, int);
if (rmatch(p, s, 0) == tvs[i].result) {
if (rmatch(r->pattern, p, r->leadingdir) == 0)