regedit: Merge processRegLinesA/W() into their caller.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e8f0a8b38b
commit
82246874d2
|
@ -745,22 +745,6 @@ cleanup:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL processRegLinesA(FILE *fp, WCHAR *(*get_line)(FILE *), int reg_version)
|
|
||||||
{
|
|
||||||
WCHAR *line;
|
|
||||||
|
|
||||||
while ((line = get_line(fp)))
|
|
||||||
{
|
|
||||||
if (reg_version == REG_VERSION_31)
|
|
||||||
processRegEntry31(line);
|
|
||||||
else
|
|
||||||
processRegEntry(line, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
closeKey();
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static WCHAR *get_lineW(FILE *fp)
|
static WCHAR *get_lineW(FILE *fp)
|
||||||
{
|
{
|
||||||
static size_t size;
|
static size_t size;
|
||||||
|
@ -830,17 +814,6 @@ cleanup:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL processRegLinesW(FILE *fp, WCHAR *(*get_line)(FILE *))
|
|
||||||
{
|
|
||||||
WCHAR *line;
|
|
||||||
|
|
||||||
while ((line = get_line(fp)))
|
|
||||||
processRegEntry(line, TRUE);
|
|
||||||
|
|
||||||
closeKey();
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Checks whether the buffer has enough room for the string or required size.
|
* Checks whether the buffer has enough room for the string or required size.
|
||||||
* Resizes the buffer if necessary.
|
* Resizes the buffer if necessary.
|
||||||
|
@ -1346,10 +1319,16 @@ BOOL import_registry_file(FILE* reg_file)
|
||||||
return reg_version == REG_VERSION_FUZZY;
|
return reg_version == REG_VERSION_FUZZY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_unicode)
|
while ((line = get_line(reg_file)))
|
||||||
return processRegLinesW(reg_file, get_lineW);
|
{
|
||||||
else
|
if (reg_version == REG_VERSION_31)
|
||||||
return processRegLinesA(reg_file, get_lineA, reg_version);
|
processRegEntry31(line);
|
||||||
|
else
|
||||||
|
processRegEntry(line, is_unicode);
|
||||||
|
}
|
||||||
|
|
||||||
|
closeKey();
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue