From 97530e28e08f59f3cf4ad01b2f58ac00a24e32ee Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Fri, 18 Oct 2002 09:01:59 +0000 Subject: [PATCH] Removed wildcmp, replaced by new function in drives.cpp Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@332 --- src/misc/support.cpp | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/src/misc/support.cpp b/src/misc/support.cpp index 1aeb55e9..689d3990 100644 --- a/src/misc/support.cpp +++ b/src/misc/support.cpp @@ -82,49 +82,6 @@ char *trim(char *str) { return ltrim(str); } -bool wildcmp(char *wild, char *string) -{ - // special case - Everything goes through - if (strcmp(wild,"*")==0) return true; - - while (*wild) { - if (*wild=='*') { - // Any other chars after that ? - if ((wild[1]!=0) && (wild[1]!='.')) { - // search string - while ((*string) && (*string!='.')) { - // thats the char ? then exit - if (toupper(*string)==toupper(wild[1])) break; - string++; - }; - - } else { - // skip to extension or end - while (*string && (*string!='.')) string++; - } - wild++; - - } else if (*string=='.') { - // only valid : '?' & '*' - while (*wild && (*wild!='.')) { - if ((*wild!='?') && (*wild!='*')) return false; - wild++; - } - if (*wild) wild++; - string++; - - } else if ((*wild!='?') && (toupper(*string)!=toupper(*wild))) { - // no match - return false; - - } else { - wild++; - string++; - } - } - - return ((*string==0) && (*wild==0)); -}; bool ScanCMDBool(char * cmd,char * check) { char * scan=cmd;size_t c_len=strlen(check);