2012-10-15 08:25:55 +02:00
|
|
|
#include "cache.h"
|
|
|
|
#include "wildmatch.h"
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
if (!strcmp(argv[1], "wildmatch"))
|
2012-10-15 08:25:58 +02:00
|
|
|
return !!wildmatch(argv[3], argv[2], 0);
|
2012-10-15 08:25:55 +02:00
|
|
|
else if (!strcmp(argv[1], "iwildmatch"))
|
2012-10-15 08:25:58 +02:00
|
|
|
return !!wildmatch(argv[3], argv[2], FNM_CASEFOLD);
|
2012-10-15 08:25:55 +02:00
|
|
|
else if (!strcmp(argv[1], "fnmatch"))
|
|
|
|
return !!fnmatch(argv[3], argv[2], FNM_PATHNAME);
|
|
|
|
else
|
|
|
|
return 1;
|
|
|
|
}
|