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
5d303100
Commit
5d303100
authored
Jan 10, 2005
by
Rein Klazes
Committed by
Alexandre Julliard
Jan 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If the argument is a local file, pass its Unix name to the browser.
parent
94ce2445
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
main.c
programs/winebrowser/main.c
+21
-1
No files found.
programs/winebrowser/main.c
View file @
5d303100
...
...
@@ -32,6 +32,8 @@
#include <stdlib.h>
#include <errno.h>
typedef
LPSTR
(
*
wine_get_unix_file_name_t
)
(
LPCWSTR
dos
);
/*****************************************************************************
* Main entry point. This is a console application so we have a main() not a
* winmain().
...
...
@@ -42,10 +44,28 @@ int main (int argc, char *argv[])
DWORD
maxLength
;
CHAR
szBrowsers
[
256
];
DWORD
type
;
CHAR
*
defaultBrowsers
=
"mozilla,netscape,konqueror,galeon,opera,dillo"
;
CHAR
*
defaultBrowsers
=
"mozilla,firefox,netscape,konqueror,galeon,opera,dillo"
;
char
*
browser
;
HKEY
hkey
;
LONG
r
;
wine_get_unix_file_name_t
wine_get_unix_file_name_ptr
;
/* check if the argument is a local file */
wine_get_unix_file_name_ptr
=
(
wine_get_unix_file_name_t
)
GetProcAddress
(
GetModuleHandle
(
"KERNEL32"
),
"wine_get_unix_file_name"
);
if
(
wine_get_unix_file_name_ptr
==
NULL
)
{
fprintf
(
stderr
,
"%s: cannot get the address of "
"'wine_get_unix_file_name'
\n
"
,
argv
[
0
]);
}
else
{
WCHAR
dospathW
[
MAX_PATH
];
char
*
p
;
MultiByteToWideChar
(
CP_ACP
,
0
,
argv
[
1
],
-
1
,
dospathW
,
MAX_PATH
);
if
((
p
=
wine_get_unix_file_name_ptr
(
dospathW
)))
{
struct
stat
dummy
;
if
(
stat
(
p
,
&
dummy
)
>=
0
)
argv
[
1
]
=
p
;
}
}
maxLength
=
sizeof
(
szBrowsers
);
...
...
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