cgetmatch
int cgetmatch(const char *, const char *);
if (depth == 0 && toprec != NULL && cgetmatch(toprec, name) == 0) {
if (cgetmatch(record, name) == 0) {
if (cgetmatch(bp,rp_name) != 0)