*** empty log message ***
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@907 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
7e1ab9e29b
commit
cd404b7477
1 changed files with 0 additions and 35 deletions
|
@ -335,41 +335,6 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//1 if match
|
|
||||||
//FIXME: make windows like - *.* becomes *
|
|
||||||
int wildcmp(char *wild, char *string) {
|
|
||||||
char *cp, *mp;
|
|
||||||
|
|
||||||
while ((*string) && (*wild != '*')) {
|
|
||||||
if ((*wild != *string) && (*wild != '?')) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
wild++;
|
|
||||||
string++;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (*string) {
|
|
||||||
if (*wild == '*') {
|
|
||||||
if (!*++wild) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
mp = wild;
|
|
||||||
cp = string+1;
|
|
||||||
} else if ((*wild == *string) || (*wild == '?')) {
|
|
||||||
wild++;
|
|
||||||
string++;
|
|
||||||
} else {
|
|
||||||
wild = mp;
|
|
||||||
string = cp++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while (*wild == '*') {
|
|
||||||
wild++;
|
|
||||||
}
|
|
||||||
return !*wild;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int Sys_EnumerateFiles (char *gpath, char *match, int (*func)(char *, int, void *), void *parm)
|
int Sys_EnumerateFiles (char *gpath, char *match, int (*func)(char *, int, void *), void *parm)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue