/* V2I name comparison function: returns zero if 'name' matches cmp or cmp.*  */
int name_cmp(const char *name, const char *cmp)
/* V2I name comparison function: returns zero if 'name' matches cmp or cmp.*  */
int name_cmp(const char *name, const char *cmp)
{
    int len, ret;
    char c;
    len = strlen(cmp);
    if ((ret = strncmp(name, cmp, len)))
        return ret;
    c = name[len];
    if (!c || (c == '.'))
        return 0;
    return 1;
}