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
4870355a
Commit
4870355a
authored
Jul 20, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved creating nsIFile to separated function.
parent
bbf2cce1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
nsembed.c
dlls/mshtml/nsembed.c
+17
-12
No files found.
dlls/mshtml/nsembed.c
View file @
4870355a
...
@@ -79,6 +79,20 @@ static ATOM nscontainer_class;
...
@@ -79,6 +79,20 @@ static ATOM nscontainer_class;
static
WCHAR
gecko_path
[
MAX_PATH
];
static
WCHAR
gecko_path
[
MAX_PATH
];
static
unsigned
gecko_path_len
;
static
unsigned
gecko_path_len
;
static
nsresult
create_nsfile
(
const
PRUnichar
*
path
,
nsIFile
**
ret
)
{
nsAString
str
;
nsresult
nsres
;
nsAString_InitDepend
(
&
str
,
path
);
nsres
=
NS_NewLocalFile
(
&
str
,
FALSE
,
ret
);
nsAString_Finish
(
&
str
);
if
(
NS_FAILED
(
nsres
))
WARN
(
"NS_NewLocalFile failed: %08x
\n
"
,
nsres
);
return
nsres
;
}
static
nsresult
NSAPI
nsDirectoryServiceProvider_QueryInterface
(
nsIDirectoryServiceProvider
*
iface
,
static
nsresult
NSAPI
nsDirectoryServiceProvider_QueryInterface
(
nsIDirectoryServiceProvider
*
iface
,
nsIIDRef
riid
,
void
**
result
)
nsIIDRef
riid
,
void
**
result
)
{
{
...
@@ -113,7 +127,6 @@ static nsresult create_profile_directory(void)
...
@@ -113,7 +127,6 @@ static nsresult create_profile_directory(void)
static
const
WCHAR
wine_geckoW
[]
=
{
'\\'
,
'w'
,
'i'
,
'n'
,
'e'
,
'_'
,
'g'
,
'e'
,
'c'
,
'k'
,
'o'
,
0
};
static
const
WCHAR
wine_geckoW
[]
=
{
'\\'
,
'w'
,
'i'
,
'n'
,
'e'
,
'_'
,
'g'
,
'e'
,
'c'
,
'k'
,
'o'
,
0
};
WCHAR
path
[
MAX_PATH
+
sizeof
(
wine_geckoW
)
/
sizeof
(
WCHAR
)];
WCHAR
path
[
MAX_PATH
+
sizeof
(
wine_geckoW
)
/
sizeof
(
WCHAR
)];
nsAString
str
;
cpp_bool
exists
;
cpp_bool
exists
;
nsresult
nsres
;
nsresult
nsres
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -125,13 +138,9 @@ static nsresult create_profile_directory(void)
...
@@ -125,13 +138,9 @@ static nsresult create_profile_directory(void)
}
}
strcatW
(
path
,
wine_geckoW
);
strcatW
(
path
,
wine_geckoW
);
nsAString_InitDepend
(
&
str
,
path
);
nsres
=
create_nsfile
(
path
,
&
profile_directory
);
nsres
=
NS_NewLocalFile
(
&
str
,
FALSE
,
&
profile_directory
);
if
(
NS_FAILED
(
nsres
))
nsAString_Finish
(
&
str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"NS_NewLocalFile failed: %08x
\n
"
,
nsres
);
return
nsres
;
return
nsres
;
}
nsres
=
nsIFile_Exists
(
profile_directory
,
&
exists
);
nsres
=
nsIFile_Exists
(
profile_directory
,
&
exists
);
if
(
NS_FAILED
(
nsres
))
{
if
(
NS_FAILED
(
nsres
))
{
...
@@ -525,16 +534,12 @@ static void set_preferences(void)
...
@@ -525,16 +534,12 @@ static void set_preferences(void)
static
BOOL
init_xpcom
(
const
PRUnichar
*
gre_path
)
static
BOOL
init_xpcom
(
const
PRUnichar
*
gre_path
)
{
{
nsIComponentRegistrar
*
registrar
=
NULL
;
nsIComponentRegistrar
*
registrar
=
NULL
;
nsAString
path
;
nsIFile
*
gre_dir
;
nsIFile
*
gre_dir
;
WCHAR
*
ptr
;
WCHAR
*
ptr
;
nsresult
nsres
;
nsresult
nsres
;
nsAString_InitDepend
(
&
path
,
gre_path
);
nsres
=
create_nsfile
(
gre_path
,
&
gre_dir
);
nsres
=
NS_NewLocalFile
(
&
path
,
FALSE
,
&
gre_dir
);
nsAString_Finish
(
&
path
);
if
(
NS_FAILED
(
nsres
))
{
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"NS_NewLocalFile failed: %08x
\n
"
,
nsres
);
FreeLibrary
(
xul_handle
);
FreeLibrary
(
xul_handle
);
return
FALSE
;
return
FALSE
;
}
}
...
...
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