int match_ext(const char *filename, const char *extensions)

{

    const char *ext, *p;

    char ext1[32], *q;



    if(!filename)

        return 0;

    

    ext = strrchr(filename, '.');

    if (ext) {

        ext++;

        p = extensions;

        for(;;) {

            q = ext1;

            while (*p != '\0' && *p != ',') 

                *q++ = *p++;

            *q = '\0';

            if (!strcasecmp(ext1, ext)) 

                return 1;

            if (*p == '\0') 

                break;

            p++;

        }

    }

    return 0;

}

int match_ext(const char *filename, const char *extensions)

{

    const char *ext, *p;

    char ext1[32], *q;



    if(!filename)

        return 0;

    

    ext = strrchr(filename, '.');

    if (ext) {

        ext++;

        p = extensions;

        for(;;) {

            q = ext1;

            while (*p != '\0' && *p != ',') 

                *q++ = *p++;

            *q = '\0';

            if (!strcasecmp(ext1, ext)) 

                return 1;

            if (*p == '\0') 

                break;

            p++;

        }

    }

    return 0;

}

            while (*p != '\0' && *p != ',') 
int FUNC_0(const char *VAR_0, const char *VAR_1)

{

    const char *VAR_2, *VAR_3;

    char VAR_4[32], *VAR_5;



    if(!VAR_0)

        return 0;

    

    VAR_2 = strrchr(VAR_0, '.');

    if (VAR_2) {

        VAR_2++;

        VAR_3 = VAR_1;

        for(;;) {

            VAR_5 = VAR_4;

            while (*VAR_3 != '\0' && *VAR_3 != ',') 

                *VAR_5++ = *VAR_3++;

            *VAR_5 = '\0';

            if (!strcasecmp(VAR_4, VAR_2)) 

                return 1;

            if (*VAR_3 == '\0') 

                break;

            VAR_3++;

        }

    }

    return 0;

}

int FUNC_0(const char *VAR_0, const char *VAR_1)
{ const char *VAR_2, *VAR_3; char VAR_4[32], *VAR_5; if(!VAR_0)
return 0; VAR_2 = strrchr(VAR_0, '.'); if (VAR_2) { VAR_2++; VAR_3 = VAR_1; for(;;) { VAR_5 = VAR_4; while (*VAR_3 != '\0' && *VAR_3 != ',')
*VAR_5++ = *VAR_3++; *VAR_5 = '\0'; if (!strcasecmp(VAR_4, VAR_2))
return 1; if (*VAR_3 == '\0')
break; VAR_3++; } } return 0; }