mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 07:26:47 +00:00
[REG] Sync with Wine Staging 2.2. CORE-12823
68c1765 reg: Simplify help handling by removing an if-else if-else block. 8a8a753 reg: Fix dword conversion on 64-bit operating systems. svn path=/trunk/; revision=73931
This commit is contained in:
parent
95668db524
commit
37073ed5e2
|
@ -255,9 +255,9 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW
|
|||
case REG_DWORD_BIG_ENDIAN: /* Yes, this is correct! */
|
||||
{
|
||||
LPWSTR rest;
|
||||
DWORD val;
|
||||
unsigned long val;
|
||||
val = strtoulW(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10);
|
||||
if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE)) {
|
||||
if (*rest || data[0] == '-' || (val == ~0u && errno == ERANGE) || val > ~0u) {
|
||||
output_message(STRING_MISSING_INTEGER);
|
||||
break;
|
||||
}
|
||||
|
@ -908,23 +908,32 @@ static const WCHAR addW[] = {'a','d','d',0};
|
|||
static const WCHAR deleteW[] = {'d','e','l','e','t','e',0};
|
||||
static const WCHAR queryW[] = {'q','u','e','r','y',0};
|
||||
|
||||
static enum operations get_operation(const WCHAR *str)
|
||||
static enum operations get_operation(const WCHAR *str, int *op_help)
|
||||
{
|
||||
if (!lstrcmpiW(str, addW))
|
||||
{
|
||||
*op_help = STRING_ADD_USAGE;
|
||||
return REG_ADD;
|
||||
}
|
||||
|
||||
if (!lstrcmpiW(str, deleteW))
|
||||
{
|
||||
*op_help = STRING_DELETE_USAGE;
|
||||
return REG_DELETE;
|
||||
}
|
||||
|
||||
if (!lstrcmpiW(str, queryW))
|
||||
{
|
||||
*op_help = STRING_QUERY_USAGE;
|
||||
return REG_QUERY;
|
||||
}
|
||||
|
||||
return REG_INVALID;
|
||||
}
|
||||
|
||||
int wmain(int argc, WCHAR *argvW[])
|
||||
{
|
||||
int i, op, ret;
|
||||
int i, op, op_help, ret;
|
||||
BOOL show_op_help = FALSE;
|
||||
static const WCHAR switchVAW[] = {'v','a',0};
|
||||
static const WCHAR switchVEW[] = {'v','e',0};
|
||||
|
@ -945,7 +954,7 @@ int wmain(int argc, WCHAR *argvW[])
|
|||
return 0;
|
||||
}
|
||||
|
||||
op = get_operation(argvW[1]);
|
||||
op = get_operation(argvW[1], &op_help);
|
||||
|
||||
if (op == REG_INVALID)
|
||||
{
|
||||
|
@ -965,12 +974,7 @@ int wmain(int argc, WCHAR *argvW[])
|
|||
}
|
||||
else if (show_op_help)
|
||||
{
|
||||
if (op == REG_ADD)
|
||||
output_message(STRING_ADD_USAGE);
|
||||
else if (op == REG_DELETE)
|
||||
output_message(STRING_DELETE_USAGE);
|
||||
else
|
||||
output_message(STRING_QUERY_USAGE);
|
||||
output_message(op_help);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ reactos/win32ss/printing/monitors/localmon/ui/ # Synced to WineStaging-1.9.11 (
|
|||
ReactOS shares the following programs with Winehq.
|
||||
|
||||
reactos/base/applications/cmdutils/cscript # Synced to WineStaging-1.9.11
|
||||
reactos/base/applications/cmdutils/reg # Synced to WineStaging-1.9.16
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue