Commit 82246874 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit: Merge processRegLinesA/W() into their caller.

parent e8f0a8b3
......@@ -745,22 +745,6 @@ cleanup:
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 size_t size;
......@@ -830,17 +814,6 @@ cleanup:
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.
* Resizes the buffer if necessary.
......@@ -1346,10 +1319,16 @@ BOOL import_registry_file(FILE* reg_file)
return reg_version == REG_VERSION_FUZZY;
}
if (is_unicode)
return processRegLinesW(reg_file, get_lineW);
else
return processRegLinesA(reg_file, get_lineA, reg_version);
while ((line = get_line(reg_file)))
{
if (reg_version == REG_VERSION_31)
processRegEntry31(line);
else
processRegEntry(line, is_unicode);
}
closeKey();
return TRUE;
}
/******************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment