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
c913efa2
Commit
c913efa2
authored
Jun 14, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hardcode the location of config.sys, no need for a config parameter
for that.
parent
48a8f520
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
34 deletions
+12
-34
dosconf.c
dlls/winedos/dosconf.c
+12
-34
No files found.
dlls/winedos/dosconf.c
View file @
c913efa2
...
...
@@ -32,7 +32,6 @@
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "dosexe.h"
...
...
@@ -455,51 +454,30 @@ static void DOSCONF_Parse(char *menuname)
DOSCONF
*
DOSCONF_GetConfig
(
void
)
{
HKEY
hkey
;
char
*
fullname
;
WCHAR
filename
[
MAX_PATH
];
static
const
WCHAR
configW
[]
=
{
'c'
,
'o'
,
'n'
,
'f'
,
'i'
,
'g'
,
'.'
,
's'
,
'y'
,
's'
,
0
};
if
(
DOSCONF_loaded
)
return
&
DOSCONF_config
;
/* default value */
filename
[
0
]
=
'*'
;
filename
[
1
]
=
'\0'
;
/* look for config.sys at the root of the drive containing the windows dir */
GetWindowsDirectoryW
(
filename
,
MAX_PATH
);
strcpyW
(
filename
+
3
,
configW
);
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\wine */
if
(
!
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
wine"
,
&
hkey
))
if
((
fullname
=
wine_get_unix_file_name
(
filename
)))
{
DWORD
type
;
DWORD
count
=
sizeof
(
filename
);
RegQueryValueExW
(
hkey
,
configW
,
0
,
&
type
,
(
LPBYTE
)
filename
,
&
count
);
RegCloseKey
(
hkey
);
DOSCONF_fd
=
fopen
(
fullname
,
"r"
);
HeapFree
(
GetProcessHeap
(),
0
,
fullname
);
}
if
(
(
filename
[
0
]
!=
'*'
||
filename
[
1
]
!=
'\0'
)
&&
*
filename
!=
'\0'
)
if
(
DOSCONF_fd
)
{
char
*
fullname
;
if
((
fullname
=
wine_get_unix_file_name
(
filename
)))
{
DOSCONF_fd
=
fopen
(
fullname
,
"r"
);
HeapFree
(
GetProcessHeap
(),
0
,
fullname
);
}
if
(
DOSCONF_fd
)
{
DOSCONF_Parse
(
NULL
);
fclose
(
DOSCONF_fd
);
DOSCONF_fd
=
NULL
;
}
else
{
WARN
(
"Couldn't open config.sys file given as %s in"
" configuration file, section [wine]!
\n
"
,
debugstr_w
(
filename
)
);
}
DOSCONF_Parse
(
NULL
);
fclose
(
DOSCONF_fd
);
DOSCONF_fd
=
NULL
;
}
else
WARN
(
"Couldn't open %s
\n
"
,
debugstr_w
(
filename
)
);
DOSCONF_loaded
=
TRUE
;
return
&
DOSCONF_config
;
...
...
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