2 #undef USE_WILDMATCH /* We need real fnmatch implementation here */
7 int main(int argc
, char **argv
)
10 for (i
= 2; i
< argc
; i
++) {
11 if (argv
[i
][0] == '/')
12 die("Forward slash is not allowed at the beginning of the\n"
13 "pattern because Windows does not like it. Use `XXX/' instead.");
14 else if (!strncmp(argv
[i
], "XXX/", 4))
17 if (!strcmp(argv
[1], "wildmatch"))
18 return !!wildmatch(argv
[3], argv
[2], WM_PATHNAME
, NULL
);
19 else if (!strcmp(argv
[1], "iwildmatch"))
20 return !!wildmatch(argv
[3], argv
[2], WM_PATHNAME
| WM_CASEFOLD
, NULL
);
21 else if (!strcmp(argv
[1], "pathmatch"))
22 return !!wildmatch(argv
[3], argv
[2], 0, NULL
);
23 else if (!strcmp(argv
[1], "fnmatch"))
24 return !!fnmatch(argv
[3], argv
[2], FNM_PATHNAME
);