Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
98cfe58d
Commit
98cfe58d
authored
May 02, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed useless check for registry file version.
parent
abde7d0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
69 deletions
+11
-69
registry.c
misc/registry.c
+11
-69
No files found.
misc/registry.c
View file @
98cfe58d
...
...
@@ -1146,79 +1146,21 @@ static int _get_reg_type(void)
return
ret
;
}
#define WINE_REG_VER_ERROR -1
#define WINE_REG_VER_1 0
#define WINE_REG_VER_2 1
#define WINE_REG_VER_OLD 2
#define WINE_REG_VER_UNKNOWN 3
/* return the version of wine registry file [Internal] */
static
int
_get_wine_registry_file_format_version
(
LPCSTR
fn
)
{
FILE
*
f
;
char
tmp
[
50
];
int
ver
;
if
((
f
=
fopen
(
fn
,
"rt"
))
==
NULL
)
{
WARN
(
"Couldn't open %s for reading: %s
\n
"
,
fn
,
strerror
(
errno
));
return
WINE_REG_VER_ERROR
;
}
if
(
fgets
(
tmp
,
50
,
f
)
==
NULL
)
{
WARN
(
"Error reading %s: %s
\n
"
,
fn
,
strerror
(
errno
));
fclose
(
f
);
return
WINE_REG_VER_ERROR
;
}
fclose
(
f
);
if
(
sscanf
(
tmp
,
"WINE REGISTRY Version %d"
,
&
ver
)
!=
1
)
return
WINE_REG_VER_UNKNOWN
;
switch
(
ver
)
{
case
1
:
return
WINE_REG_VER_1
;
break
;
case
2
:
return
WINE_REG_VER_2
;
break
;
default:
return
WINE_REG_VER_UNKNOWN
;
}
}
/* load the registry file in wine format [Internal] */
static
void
load_wine_registry
(
HKEY
hkey
,
LPCSTR
fn
)
{
int
file_format
;
file_format
=
_get_wine_registry_file_format_version
(
fn
);
switch
(
file_format
)
{
case
WINE_REG_VER_1
:
WARN
(
"Unable to load registry file %s: old format which is no longer supported.
\n
"
,
fn
);
break
;
case
WINE_REG_VER_2
:
{
HANDLE
file
;
if
((
file
=
FILE_CreateFile
(
fn
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
0
,
TRUE
,
DRIVE_UNKNOWN
)))
{
SERVER_START_REQ
(
load_registry
)
{
req
->
hkey
=
hkey
;
req
->
file
=
file
;
wine_server_call
(
req
);
}
SERVER_END_REQ
;
CloseHandle
(
file
);
}
break
;
HANDLE
file
;
if
((
file
=
FILE_CreateFile
(
fn
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
0
,
TRUE
,
DRIVE_UNKNOWN
)))
{
SERVER_START_REQ
(
load_registry
)
{
req
->
hkey
=
hkey
;
req
->
file
=
file
;
wine_server_call
(
req
);
}
case
WINE_REG_VER_UNKNOWN
:
WARN
(
"Unable to load registry file %s: unknown format.
\n
"
,
fn
);
break
;
case
WINE_REG_VER_ERROR
:
break
;
SERVER_END_REQ
;
CloseHandle
(
file
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment