1#include"cache.h" 2 3intmain(int argc,char**argv) 4{ 5int i; 6for(i =2; i < argc; i++) { 7if(argv[i][0] =='/') 8die("Forward slash is not allowed at the beginning of the\n" 9"pattern because Windows does not like it. Use `XXX/' instead."); 10else if(!strncmp(argv[i],"XXX/",4)) 11 argv[i] +=3; 12} 13if(!strcmp(argv[1],"wildmatch")) 14return!!wildmatch(argv[3], argv[2], WM_PATHNAME, NULL); 15else if(!strcmp(argv[1],"iwildmatch")) 16return!!wildmatch(argv[3], argv[2], WM_PATHNAME | WM_CASEFOLD, NULL); 17else if(!strcmp(argv[1],"pathmatch")) 18return!!wildmatch(argv[3], argv[2],0, NULL); 19else 20return1; 21}