mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
[WINESYNC] reg: Allow /reg:32 and /reg:64 switches to be passed via the command line.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44755 Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 2b900e1c38d9bed0901ea036488e896e6df0cbe9 by Hugh McMaster <hugh.mcmaster@outlook.com> manual adjustment needed
This commit is contained in:
parent
9cf114d789
commit
b6bc8e1371
9 changed files with 32 additions and 5 deletions
|
@ -235,6 +235,8 @@ int reg_add(int argc, WCHAR *argvW[])
|
||||||
value_empty = TRUE;
|
value_empty = TRUE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (!lstrcmpiW(str, L"reg:32") || !lstrcmpiW(str, L"reg:64"))
|
||||||
|
continue;
|
||||||
else if (!str[0] || str[1])
|
else if (!str[0] || str[1])
|
||||||
goto invalid;
|
goto invalid;
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,8 @@ int reg_delete(int argc, WCHAR *argvW[])
|
||||||
value_empty = TRUE;
|
value_empty = TRUE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (!lstrcmpiW(str, L"reg:32") || !lstrcmpiW(str, L"reg:64"))
|
||||||
|
continue;
|
||||||
else if (!str[0] || str[1])
|
else if (!str[0] || str[1])
|
||||||
goto invalid;
|
goto invalid;
|
||||||
|
|
||||||
|
|
|
@ -368,6 +368,8 @@ int reg_export(int argc, WCHAR *argvW[])
|
||||||
|
|
||||||
if (is_char(*str, 'y') && !str[1])
|
if (is_char(*str, 'y') && !str[1])
|
||||||
overwrite_file = TRUE;
|
overwrite_file = TRUE;
|
||||||
|
else if (!lstrcmpiW(str, L"reg:32") || !lstrcmpiW(str, L"reg:64"))
|
||||||
|
continue;
|
||||||
else
|
else
|
||||||
goto invalid;
|
goto invalid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -978,11 +978,19 @@ int reg_import(int argc, WCHAR *argvW[])
|
||||||
BYTE s[2];
|
BYTE s[2];
|
||||||
struct parser parser;
|
struct parser parser;
|
||||||
|
|
||||||
if (argc > 3)
|
if (argc > 4) goto invalid;
|
||||||
|
|
||||||
|
if (argc == 4)
|
||||||
{
|
{
|
||||||
output_message(STRING_INVALID_SYNTAX);
|
WCHAR *str = argvW[3];
|
||||||
output_message(STRING_FUNC_HELP, wcsupr(argvW[1]));
|
|
||||||
return 1;
|
if (*str != '/' && *str != '-')
|
||||||
|
goto invalid;
|
||||||
|
|
||||||
|
str++;
|
||||||
|
|
||||||
|
if (lstrcmpiW(str, L"reg:32") && lstrcmpiW(str, L"reg:64"))
|
||||||
|
goto invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
filename = argvW[2];
|
filename = argvW[2];
|
||||||
|
@ -1032,4 +1040,9 @@ int reg_import(int argc, WCHAR *argvW[])
|
||||||
error:
|
error:
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
invalid:
|
||||||
|
output_message(STRING_INVALID_SYNTAX);
|
||||||
|
output_message(STRING_FUNC_HELP, wcsupr(argvW[1]));
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,4 +148,8 @@ STRINGTABLE
|
||||||
STRING_OVERWRITE_FILE, "The file '%1' already exists. Do you want to overwrite it?"
|
STRING_OVERWRITE_FILE, "The file '%1' already exists. Do you want to overwrite it?"
|
||||||
STRING_KEY_NONEXIST, "reg: Unable to find the specified registry key\n"
|
STRING_KEY_NONEXIST, "reg: Unable to find the specified registry key\n"
|
||||||
STRING_KEY_IMPORT_FAILED, "reg: Unable to import the registry key '%1'\n"
|
STRING_KEY_IMPORT_FAILED, "reg: Unable to import the registry key '%1'\n"
|
||||||
|
STRING_REG_VIEW_USAGE, " /reg:32\n\
|
||||||
|
\ Access the registry using the 32-bit view.\n\n\
|
||||||
|
\ /reg:64\n\
|
||||||
|
\ Access the registry using the 64-bit view.\n\n"
|
||||||
}
|
}
|
||||||
|
|
|
@ -347,6 +347,8 @@ int reg_query(int argc, WCHAR *argvW[])
|
||||||
value_empty = TRUE;
|
value_empty = TRUE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (!lstrcmpiW(str, L"reg:32") || !lstrcmpiW(str, L"reg:64"))
|
||||||
|
continue;
|
||||||
else if (!str[0] || str[1])
|
else if (!str[0] || str[1])
|
||||||
goto invalid;
|
goto invalid;
|
||||||
|
|
||||||
|
|
|
@ -338,6 +338,7 @@ int __cdecl wmain(int argc, WCHAR *argvW[])
|
||||||
if (is_help_switch(argvW[2]))
|
if (is_help_switch(argvW[2]))
|
||||||
{
|
{
|
||||||
output_message(op_help);
|
output_message(op_help);
|
||||||
|
output_message(STRING_REG_VIEW_USAGE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,3 +63,4 @@
|
||||||
#define STRING_OVERWRITE_FILE 138
|
#define STRING_OVERWRITE_FILE 138
|
||||||
#define STRING_KEY_NONEXIST 139
|
#define STRING_KEY_NONEXIST 139
|
||||||
#define STRING_KEY_IMPORT_FAILED 140
|
#define STRING_KEY_IMPORT_FAILED 140
|
||||||
|
#define STRING_REG_VIEW_USAGE 141
|
||||||
|
|
|
@ -4,4 +4,4 @@ directories:
|
||||||
files:
|
files:
|
||||||
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
|
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
|
||||||
tags:
|
tags:
|
||||||
wine: 010cb1b4057550b2eb6c371db5ba5a8d11ef337e
|
wine: 2b900e1c38d9bed0901ea036488e896e6df0cbe9
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue