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