From 59df83a32c09630ebc465e857d553ed3797f3fa0 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 30 Jul 2002 12:07:08 +0000 Subject: [PATCH] wildcmp updated Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@98 --- ChangeLog | 1 + src/misc/support.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe845bdc..15ed52ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/misc/support.cpp b/src/misc/support.cpp index 1348dc71..ba3124c9 100644 --- a/src/misc/support.cpp +++ b/src/misc/support.cpp @@ -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 {