Andrew Nguyen : reg: Support the /h flag as a synonymous help flag.

Alexandre Julliard julliard at winehq.org
Wed Jul 1 09:28:09 CDT 2009


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

Author: Andrew Nguyen <arethusa26 at gmail.com>
Date:   Wed Jul  1 00:41:45 2009 -0500

reg: Support the /h flag as a synonymous help flag.

---

 programs/reg/reg.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index 9ebfd32..a538d81 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -352,6 +352,7 @@ int wmain(int argc, WCHAR *argvW[])
     static const WCHAR queryW[] = {'q','u','e','r','y',0};
     static const WCHAR slashDW[] = {'/','d',0};
     static const WCHAR slashFW[] = {'/','f',0};
+    static const WCHAR slashHW[] = {'/','h',0};
     static const WCHAR slashSW[] = {'/','s',0};
     static const WCHAR slashTW[] = {'/','t',0};
     static const WCHAR slashVW[] = {'/','v',0};
@@ -359,7 +360,8 @@ int wmain(int argc, WCHAR *argvW[])
     static const WCHAR slashVEW[] = {'/','v','e',0};
     static const WCHAR slashHelpW[] = {'/','?',0};
 
-    if (argc < 2 || !lstrcmpW(argvW[1], slashHelpW))
+    if (argc < 2 || !lstrcmpW(argvW[1], slashHelpW)
+                 || !lstrcmpiW(argvW[1], slashHW))
     {
         reg_message(STRING_USAGE);
         return 0;
@@ -375,7 +377,8 @@ int wmain(int argc, WCHAR *argvW[])
             reg_message(STRING_INVALID_CMDLINE);
             return 1;
         }
-        else if (argc == 3 && !lstrcmpW(argvW[2], slashHelpW))
+        else if (argc == 3 && (!lstrcmpW(argvW[2], slashHelpW) ||
+                               !lstrcmpiW(argvW[2], slashHW)))
         {
             reg_message(STRING_ADD_USAGE);
             return 0;
@@ -410,7 +413,8 @@ int wmain(int argc, WCHAR *argvW[])
             reg_message(STRING_INVALID_CMDLINE);
             return 1;
         }
-        else if (argc == 3 && !lstrcmpW(argvW[2], slashHelpW))
+        else if (argc == 3 && (!lstrcmpW(argvW[2], slashHelpW) ||
+                               !lstrcmpiW(argvW[2], slashHW)))
         {
             reg_message(STRING_DELETE_USAGE);
             return 0;
@@ -440,7 +444,8 @@ int wmain(int argc, WCHAR *argvW[])
             reg_message(STRING_INVALID_CMDLINE);
             return 1;
         }
-        else if (argc == 3 && !lstrcmpW(argvW[2], slashHelpW))
+        else if (argc == 3 && (!lstrcmpW(argvW[2], slashHelpW) ||
+                               !lstrcmpiW(argvW[2], slashHW)))
         {
             reg_message(STRING_QUERY_USAGE);
             return 0;




More information about the wine-cvs mailing list