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
4ae60c6f
Commit
4ae60c6f
authored
Mar 02, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Move strndupW implementation to header file.
parent
b0a9ddae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
16 deletions
+19
-16
http.c
dlls/urlmon/http.c
+4
-16
urlmon_main.h
dlls/urlmon/urlmon_main.h
+15
-0
No files found.
dlls/urlmon/http.c
View file @
4ae60c6f
...
...
@@ -219,18 +219,6 @@ static void CALLBACK HTTPPROTOCOL_InternetStatusCallback(
IInternetProtocolSink_ReportProgress
(
This
->
base
.
protocol_sink
,
ulStatusCode
,
(
LPWSTR
)
lpvStatusInformation
);
}
static
inline
LPWSTR
strndupW
(
LPCWSTR
string
,
int
len
)
{
LPWSTR
ret
=
NULL
;
if
(
string
&&
(
ret
=
heap_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
)))
!=
NULL
)
{
memcpy
(
ret
,
string
,
len
*
sizeof
(
WCHAR
));
ret
[
len
]
=
0
;
}
return
ret
;
}
/*
* Interface implementations
*/
...
...
@@ -345,10 +333,10 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
hres
=
MK_E_SYNTAX
;
goto
done
;
}
host
=
strndupW
(
url
.
lpszHostName
,
url
.
dwHostNameLength
);
path
=
strndupW
(
url
.
lpszUrlPath
,
url
.
dwUrlPathLength
);
user
=
strndupW
(
url
.
lpszUserName
,
url
.
dwUserNameLength
);
pass
=
strndupW
(
url
.
lpszPassword
,
url
.
dwPasswordLength
);
host
=
heap_
strndupW
(
url
.
lpszHostName
,
url
.
dwHostNameLength
);
path
=
heap_
strndupW
(
url
.
lpszUrlPath
,
url
.
dwUrlPathLength
);
user
=
heap_
strndupW
(
url
.
lpszUserName
,
url
.
dwUserNameLength
);
pass
=
heap_
strndupW
(
url
.
lpszPassword
,
url
.
dwPasswordLength
);
if
(
!
url
.
nPort
)
url
.
nPort
=
This
->
https
?
INTERNET_DEFAULT_HTTPS_PORT
:
INTERNET_DEFAULT_HTTP_PORT
;
...
...
dlls/urlmon/urlmon_main.h
View file @
4ae60c6f
...
...
@@ -133,6 +133,21 @@ static inline LPWSTR heap_strdupW(LPCWSTR str)
return
ret
;
}
static
inline
LPWSTR
heap_strndupW
(
LPCWSTR
str
,
int
len
)
{
LPWSTR
ret
=
NULL
;
if
(
str
)
{
ret
=
heap_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
if
(
ret
)
{
memcpy
(
ret
,
str
,
len
*
sizeof
(
WCHAR
));
ret
[
len
]
=
0
;
}
}
return
ret
;
}
static
inline
LPWSTR
heap_strdupAtoW
(
const
char
*
str
)
{
LPWSTR
ret
=
NULL
;
...
...
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