[WMIC] Sync with Wine Staging 2.2. Dedicated to Hermès. CORE-12823
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 26 Feb 2017 16:29:54 +0000 (16:29 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 26 Feb 2017 16:29:54 +0000 (16:29 +0000)
b21f4d0 wmic: Improve cmd line parser and add support for path command.

svn path=/trunk/; revision=73933

reactos/base/applications/cmdutils/wmic/lang/de-DE.rc
reactos/base/applications/cmdutils/wmic/lang/en-US.rc
reactos/base/applications/cmdutils/wmic/lang/ro-RO.rc
reactos/base/applications/cmdutils/wmic/lang/ru-RU.rc
reactos/base/applications/cmdutils/wmic/lang/sq-AL.rc
reactos/base/applications/cmdutils/wmic/lang/zh-CN.rc
reactos/base/applications/cmdutils/wmic/lang/zh-TW.rc
reactos/base/applications/cmdutils/wmic/main.c
reactos/media/doc/README.WINE

index 76082a4..2d5424e 100644 (file)
@@ -5,5 +5,5 @@ STRINGTABLE
     STRING_CMDLINE_NOT_SUPPORTED, "Fehler: Befehlszeile nicht unterstützt\n"
     STRING_ALIAS_NOT_FOUND, "Fehler: Alias nicht gefunden\n"
     STRING_INVALID_QUERY, "Fehler: Ungültige Abfrage\n"
-    STRING_INVALID_PATH, "Invalid syntax for PATH\n"
+    STRING_INVALID_PATH, "Error: Invalid syntax for PATH\n"
 }
index 275a99d..31c44ee 100644 (file)
@@ -5,5 +5,5 @@ STRINGTABLE
     STRING_CMDLINE_NOT_SUPPORTED, "Error: Command line not supported\n"
     STRING_ALIAS_NOT_FOUND, "Error: Alias not found\n"
     STRING_INVALID_QUERY, "Error: Invalid query\n"
-    STRING_INVALID_PATH, "Invalid syntax for PATH\n"
+    STRING_INVALID_PATH, "Error: Invalid syntax for PATH\n"
 }
index 11c101e..9ce4b8f 100644 (file)
@@ -7,5 +7,5 @@ STRINGTABLE
     STRING_CMDLINE_NOT_SUPPORTED, "Eroare: Comandă nerecunoscută.\n"
     STRING_ALIAS_NOT_FOUND, "Eroare: Alias necunoscut.\n"
     STRING_INVALID_QUERY, "Eroare: Cerere nevalidă.\n"
-    STRING_INVALID_PATH, "Conținutul din «PATH» este sintactic nevalid.\n"
+    STRING_INVALID_PATH, "Eroare: Conținutul din «PATH» este sintactic nevalid.\n"
 }
index 46bc759..230437e 100644 (file)
@@ -5,5 +5,5 @@ STRINGTABLE
     STRING_CMDLINE_NOT_SUPPORTED, "Ошибка: Командная строка не поддерживается\n"
     STRING_ALIAS_NOT_FOUND, "Ошибка: Псевдоним не найден\n"
     STRING_INVALID_QUERY, "Ошибка: Неверный запрос\n"
-    STRING_INVALID_PATH, "Неверный синтаксис PATH\n"
+    STRING_INVALID_PATH, "Ð\9eÑ\88ибка: Ð\9dевеÑ\80нÑ\8bй Ñ\81инÑ\82акÑ\81иÑ\81 PATH\n"
 }
index 72fe2c1..d70f8ed 100644 (file)
@@ -9,5 +9,5 @@ STRINGTABLE
     STRING_CMDLINE_NOT_SUPPORTED, "Gabim: Linja e komandave jo e mbështetur\n"
     STRING_ALIAS_NOT_FOUND, "Gabim: Pseudonimi nuk u gjend\n"
     STRING_INVALID_QUERY, "Gabim: Kërkim pa vlere\n"
-    STRING_INVALID_PATH, "Invalid syntax for PATH\n"
+    STRING_INVALID_PATH, "Error: Invalid syntax for PATH\n"
 }
index 525ab38..44535ea 100644 (file)
@@ -7,5 +7,5 @@ STRINGTABLE
     STRING_CMDLINE_NOT_SUPPORTED, "错误: 不支持的命令行\n"
     STRING_ALIAS_NOT_FOUND, "错误: 别名未找到\n"
     STRING_INVALID_QUERY, "错误: 无效的查询\n"
-    STRING_INVALID_PATH, "Invalid syntax for PATH\n"
+    STRING_INVALID_PATH, "Error: Invalid syntax for PATH\n"
 }
index bdd6653..cb3a061 100644 (file)
@@ -7,5 +7,5 @@ STRINGTABLE
     STRING_CMDLINE_NOT_SUPPORTED, "錯誤: 不支援的命令列\n"
     STRING_ALIAS_NOT_FOUND, "錯誤: 別名未找到\n"
     STRING_INVALID_QUERY, "錯誤: 無效的查詢\n"
-    STRING_INVALID_PATH, "Invalid syntax for PATH\n"
+    STRING_INVALID_PATH, "Error: Invalid syntax for PATH\n"
 }
\ No newline at end of file
index e84aa8f..ad7c8d9 100644 (file)
@@ -252,16 +252,11 @@ int wmain(int argc, WCHAR *argv[])
     static const WCHAR pathW[] = {'p','a','t','h',0};
     static const WCHAR classW[] = {'c','l','a','s','s',0};
     static const WCHAR contextW[] = {'c','o','n','t','e','x','t',0};
-
-    const WCHAR *class;
-    const WCHAR *value;
+    const WCHAR *class, *value;
     int i;
 
-    if (argc == 1)
-        goto not_supported;
-
     for (i = 1; i < argc && argv[i][0] == '/'; i++)
-        WINE_FIXME("command line switch %s not supported\n", debugstr_w(argv[i]));
+        WINE_FIXME( "command line switch %s not supported\n", debugstr_w(argv[i]) );
 
     if (i >= argc)
         goto not_supported;
@@ -271,13 +266,15 @@ int wmain(int argc, WCHAR *argv[])
     {
         return 0;
     }
-    else if (!strcmpiW( argv[i], classW) ||
-             !strcmpiW( argv[i], contextW))
+
+    if (!strcmpiW( argv[i], classW) ||
+        !strcmpiW( argv[i], contextW ))
     {
-        WINE_FIXME("command %s not supported\n", debugstr_w(argv[i]));
+        WINE_FIXME( "command %s not supported\n", debugstr_w(argv[i]) );
         goto not_supported;
     }
-    else if (!strcmpiW( argv[i], pathW))
+
+    if (!strcmpiW( argv[i], pathW ))
     {
         if (++i >= argc)
         {
@@ -299,7 +296,7 @@ int wmain(int argc, WCHAR *argv[])
     if (++i >= argc)
         goto not_supported;
 
-    if (!strcmpiW( argv[i], getW))
+    if (!strcmpiW( argv[i], getW ))
     {
         if (++i >= argc)
             goto not_supported;
index dbffd65..da01487 100644 (file)
@@ -230,7 +230,7 @@ reactos/base/applications/cmdutils/cscript  # Synced to WineStaging-1.9.11
 reactos/base/applications/cmdutils/reg      # Synced to WineStaging-2.2
 reactos/base/applications/cmdutils/schtasks # Synced to WineStaging-1.9.14
 reactos/base/applications/cmdutils/taskkill # Synced to WineStaging-1.9.11
-reactos/base/applications/cmdutils/wmic     # Synced to WineStaging-1.9.11
+reactos/base/applications/cmdutils/wmic     # Synced to WineStaging-2.2
 reactos/base/applications/cmdutils/wscript  # Synced to WineStaging-1.9.16
 reactos/base/applications/cmdutils/xcopy    # Synced to WineStaging-1.9.11
 reactos/base/applications/games/winmine     # Synced to WineStaging-1.9.16 with our own resources.