wildcmp updated
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@98
This commit is contained in:
parent
487e9392d5
commit
59df83a32c
2 changed files with 4 additions and 2 deletions
|
@ -3,3 +3,4 @@
|
|||
- int10_writechar has been updated to move the cursor position.
|
||||
- changed the basedir routines to use the current working dir instead of argv[0]. This will fix and brake things :)
|
||||
- illegal command, now displays the command
|
||||
- wildcmp updated to be case insensitive
|
||||
|
|
|
@ -85,7 +85,8 @@ char *trim(char *str) {
|
|||
bool wildcmp(char *wild, char *string) {
|
||||
char *cp, *mp;
|
||||
while ((*string) && (*wild != '*')) {
|
||||
if ((*wild != *string) && (*wild != '?')) {
|
||||
if ((*upcase(wild) != *upcase(string)) && (*wild != '?')) {
|
||||
|
||||
return false;
|
||||
}
|
||||
wild++;
|
||||
|
@ -99,7 +100,7 @@ bool wildcmp(char *wild, char *string) {
|
|||
}
|
||||
mp = wild;
|
||||
cp = string+1;
|
||||
} else if ((*wild == *string) || (*wild == '?')) {
|
||||
} else if ((*upcase(wild) == *upcase(string)) || (*wild == '?')) {
|
||||
wild++;
|
||||
string++;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue