Trey Hunner : cmd: Add support for 'if /i'.

Alexandre Julliard julliard at winehq.org
Tue Feb 2 10:45:29 CST 2010


Module: wine
Branch: master
Commit: afb374b7aa3f16b4e0de574314bef11b597a4363
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=afb374b7aa3f16b4e0de574314bef11b597a4363

Author: Trey Hunner <treyhunner at gmail.com>
Date:   Tue Feb  2 01:09:06 2010 -0800

cmd: Add support for 'if /i'.

---

 programs/cmd/builtins.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 2c2761d..c63360b 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -1277,6 +1277,7 @@ void WCMD_if (WCHAR *p, CMD_LIST **cmdList) {
   static const WCHAR existW[]  = {'e','x','i','s','t','\0'};
   static const WCHAR defdW[]   = {'d','e','f','i','n','e','d','\0'};
   static const WCHAR eqeqW[]   = {'=','=','\0'};
+  static const WCHAR parmI[]   = {'/','I','\0'};
 
   if (!lstrcmpiW (param1, notW)) {
     negate = 1;
@@ -1305,7 +1306,12 @@ void WCMD_if (WCHAR *p, CMD_LIST **cmdList) {
   }
   else if ((s = strstrW (p, eqeqW))) {
     s += 2;
-    if (!lstrcmpiW (condition, WCMD_parameter (s, 0, NULL))) test = 1;
+    if (strstrW (quals, parmI) == NULL) {
+        if (!lstrcmpW (condition, WCMD_parameter (s, 0, NULL))) test = 1;
+    }
+    else {
+        if (!lstrcmpiW (condition, WCMD_parameter (s, 0, NULL))) test = 1;
+    }
     WCMD_parameter (s, 1, &command);
   }
   else {




More information about the wine-cvs mailing list