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
94f08b10
Commit
94f08b10
authored
Dec 02, 2018
by
Alex Henrie
Committed by
Alexandre Julliard
Dec 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Turn several constants and variables into static constants.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
54d17b95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
url.c
dlls/shlwapi/url.c
+12
-14
No files found.
dlls/shlwapi/url.c
View file @
94f08b10
...
...
@@ -746,26 +746,24 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
* the last leaf starting from the '#'. Otherwise the '#' is not
* meaningful and just start looking from the end. */
if
((
work
=
strpbrkW
(
base
.
pszSuffix
+
sizeloc
,
fragquerystr
)))
{
const
WCHAR
htmlW
[]
=
{
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
const
int
len_htmlW
=
5
;
const
WCHAR
htmW
[]
=
{
'.'
,
'h'
,
't'
,
'm'
,
0
};
const
int
len_htmW
=
4
;
static
const
WCHAR
htmlW
[]
=
{
'.'
,
'h'
,
't'
,
'm'
,
'l'
};
static
const
WCHAR
htmW
[]
=
{
'.'
,
'h'
,
't'
,
'm'
};
if
(
*
work
==
'?'
||
base
.
nScheme
==
URL_SCHEME_HTTP
||
base
.
nScheme
==
URL_SCHEME_HTTPS
)
manual_search
=
TRUE
;
else
if
(
work
-
base
.
pszSuffix
>
len_htmW
)
{
work
-=
len_htmW
;
if
(
strncmpiW
(
work
,
htmW
,
len_htmW
)
==
0
)
else
if
(
work
-
base
.
pszSuffix
>
ARRAY_SIZE
(
htmW
)
)
{
work
-=
ARRAY_SIZE
(
htmW
)
;
if
(
strncmpiW
(
work
,
htmW
,
ARRAY_SIZE
(
htmW
)
)
==
0
)
manual_search
=
TRUE
;
work
+=
len_htmW
;
work
+=
ARRAY_SIZE
(
htmW
)
;
}
if
(
!
manual_search
&&
work
-
base
.
pszSuffix
>
len_htmlW
)
{
work
-=
len_htmlW
;
if
(
strncmpiW
(
work
,
htmlW
,
len_htmlW
)
==
0
)
work
-
base
.
pszSuffix
>
ARRAY_SIZE
(
htmlW
)
)
{
work
-=
ARRAY_SIZE
(
htmlW
)
;
if
(
strncmpiW
(
work
,
htmlW
,
ARRAY_SIZE
(
htmlW
)
)
==
0
)
manual_search
=
TRUE
;
work
+=
len_htmlW
;
work
+=
ARRAY_SIZE
(
htmlW
)
;
}
}
...
...
@@ -1734,11 +1732,11 @@ static HRESULT URL_GuessScheme(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut)
static
HRESULT
URL_CreateFromPath
(
LPCWSTR
pszPath
,
LPWSTR
pszUrl
,
LPDWORD
pcchUrl
)
{
static
const
WCHAR
file_colonW
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
0
};
static
const
WCHAR
three_slashesW
[]
=
{
'/'
,
'/'
,
'/'
,
0
};
DWORD
needed
;
HRESULT
ret
=
S_OK
;
WCHAR
*
pszNewUrl
;
WCHAR
file_colonW
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
0
};
WCHAR
three_slashesW
[]
=
{
'/'
,
'/'
,
'/'
,
0
};
PARSEDURLW
parsed_url
;
parsed_url
.
cbSize
=
sizeof
(
parsed_url
);
...
...
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