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
case REG_DWORD_BIG_ENDIAN: /* Yes, this is correct! */
{
LPWSTR rest;
case REG_DWORD_BIG_ENDIAN: /* Yes, this is correct! */
{
LPWSTR rest;
val = strtoulW(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10);
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;
}
output_message(STRING_MISSING_INTEGER);
break;
}
static const WCHAR deleteW[] = {'d','e','l','e','t','e',0};
static const WCHAR queryW[] = {'q','u','e','r','y',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))
{
if (!lstrcmpiW(str, addW))
+ {
+ *op_help = STRING_ADD_USAGE;
if (!lstrcmpiW(str, deleteW))
if (!lstrcmpiW(str, deleteW))
+ {
+ *op_help = STRING_DELETE_USAGE;
if (!lstrcmpiW(str, queryW))
if (!lstrcmpiW(str, queryW))
+ {
+ *op_help = STRING_QUERY_USAGE;
return REG_INVALID;
}
int wmain(int argc, WCHAR *argvW[])
{
return REG_INVALID;
}
int wmain(int argc, WCHAR *argvW[])
{
+ 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};
BOOL show_op_help = FALSE;
static const WCHAR switchVAW[] = {'v','a',0};
static const WCHAR switchVEW[] = {'v','e',0};
- op = get_operation(argvW[1]);
+ op = get_operation(argvW[1], &op_help);
}
else if (show_op_help)
{
}
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);
ReactOS shares the following programs with Winehq.
reactos/base/applications/cmdutils/cscript # 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
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