[WINESYNC] reg: Move 'import' syntax checks to reg_import().

Signed-off-by: Hugh McMaster <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id 4cbf47054fc7d95bcbab368fa53fc71908472309 by Hugh McMaster <[email protected]>
This commit is contained in:
winesync
2022-06-19 13:06:30 +02:00
committed by Thomas Csovcsity
parent f16c791548
commit b4d8b76a2f
4 changed files with 14 additions and 12 deletions
+11 -2
View File
@@ -983,13 +983,22 @@ cleanup:
return NULL;
}
int reg_import(const WCHAR *filename)
int reg_import(int argc, WCHAR *argvW[])
{
WCHAR *filename, *pos;
FILE *fp;
static const WCHAR rb_mode[] = {'r','b',0};
BYTE s[2];
struct parser parser;
WCHAR *pos;
if (argc > 3)
{
output_message(STRING_INVALID_SYNTAX);
output_message(STRING_FUNC_HELP, wcsupr(argvW[1]));
return 1;
}
filename = argvW[2];
fp = _wfopen(filename, rb_mode);
if (!fp)
+1 -8
View File
@@ -390,15 +390,8 @@ int __cdecl wmain(int argc, WCHAR *argvW[])
return 0;
}
if (op == REG_IMPORT && argc > 3)
{
output_message(STRING_INVALID_SYNTAX);
output_message(STRING_FUNC_HELP, wcsupr(argvW[1]));
return 1;
}
if (op == REG_IMPORT)
return reg_import(argvW[2]);
return reg_import(argc, argvW);
if (op == REG_EXPORT)
return reg_export(argc, argvW);
+1 -1
View File
@@ -56,7 +56,7 @@ int reg_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name,
int reg_export(int argc, WCHAR *argv[]);
/* import.c */
int reg_import(const WCHAR *filename);
int reg_import(int argc, WCHAR *argvW[]);
/* query.c */
int reg_query(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name,
+1 -1
View File
@@ -4,4 +4,4 @@ directories:
files:
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
tags:
wine: 8801118e384b7388a0fa5c43b5540bfd7f257ab6
wine: 4cbf47054fc7d95bcbab368fa53fc71908472309