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
4d73e10c
Commit
4d73e10c
authored
Sep 08, 2004
by
Diego Pettenò
Committed by
Alexandre Julliard
Sep 08, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support in UrlIs() for URLIS_DIRECTORY and URLIS_FILEURL flags.
parent
b5044621
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
url.c
dlls/shlwapi/url.c
+18
-5
No files found.
dlls/shlwapi/url.c
View file @
4d73e10c
...
...
@@ -1668,6 +1668,7 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
{
UNKNOWN_SHLWAPI_1
base
;
DWORD
res1
;
LPCSTR
last
;
switch
(
Urlis
)
{
...
...
@@ -1680,11 +1681,16 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
return
FALSE
;
return
TRUE
;
case
URLIS_FILEURL
:
return
!
StrCmpNA
(
"file://"
,
pszUrl
,
7
);
case
URLIS_DIRECTORY
:
last
=
pszUrl
+
strlen
(
pszUrl
)
-
1
;
return
(
last
>=
pszUrl
&&
(
*
last
==
'/'
||
*
last
==
'\\'
));
case
URLIS_URL
:
case
URLIS_NOHISTORY
:
case
URLIS_FILEURL
:
case
URLIS_APPLIABLE
:
case
URLIS_DIRECTORY
:
case
URLIS_HASQUERY
:
default:
FIXME
(
"(%s %d): stub
\n
"
,
debugstr_a
(
pszUrl
),
Urlis
);
...
...
@@ -1699,8 +1705,10 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
*/
BOOL
WINAPI
UrlIsW
(
LPCWSTR
pszUrl
,
URLIS
Urlis
)
{
static
const
WCHAR
stemp
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,
0
};
UNKNOWN_SHLWAPI_2
base
;
DWORD
res1
;
LPCWSTR
last
;
switch
(
Urlis
)
{
...
...
@@ -1708,16 +1716,21 @@ BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
base
.
size
=
24
;
res1
=
ParseURLW
(
pszUrl
,
&
base
);
if
(
res1
)
return
FALSE
;
/* invalid scheme */
if
((
*
base
.
ap2
==
L'/'
)
&&
(
*
(
base
.
ap2
+
1
)
==
L
'/'
))
if
((
*
base
.
ap2
==
'/'
)
&&
(
*
(
base
.
ap2
+
1
)
==
'/'
))
/* has scheme followed by 2 '/' */
return
FALSE
;
return
TRUE
;
case
URLIS_FILEURL
:
return
!
strncmpW
(
stemp
,
pszUrl
,
7
);
case
URLIS_DIRECTORY
:
last
=
pszUrl
+
strlenW
(
pszUrl
)
-
1
;
return
(
last
>=
pszUrl
&&
(
*
last
==
'/'
||
*
last
==
'\\'
));
case
URLIS_URL
:
case
URLIS_NOHISTORY
:
case
URLIS_FILEURL
:
case
URLIS_APPLIABLE
:
case
URLIS_DIRECTORY
:
case
URLIS_HASQUERY
:
default:
FIXME
(
"(%s %d): stub
\n
"
,
debugstr_w
(
pszUrl
),
Urlis
);
...
...
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