Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
91704df4
Commit
91704df4
authored
Sep 25, 2004
by
Huw Davies
Committed by
Alexandre Julliard
Sep 25, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement PathSearchAndQualify.
parent
707a1070
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
4 deletions
+62
-4
path.c
dlls/shlwapi/path.c
+10
-4
path.c
dlls/shlwapi/tests/path.c
+52
-0
No files found.
dlls/shlwapi/path.c
View file @
91704df4
...
...
@@ -3115,8 +3115,11 @@ BOOL WINAPI PathRenameExtensionW(LPWSTR lpszPath, LPCWSTR lpszExt)
*/
BOOL
WINAPI
PathSearchAndQualifyA
(
LPCSTR
lpszPath
,
LPSTR
lpszBuf
,
UINT
cchBuf
)
{
FIXME
(
"(%s,%p,0x%08x)-stub
\n
"
,
debugstr_a
(
lpszPath
),
lpszBuf
,
cchBuf
);
return
FALSE
;
TRACE
(
"(%s,%p,0x%08x)
\n
"
,
debugstr_a
(
lpszPath
),
lpszBuf
,
cchBuf
);
if
(
SearchPathA
(
NULL
,
lpszPath
,
NULL
,
cchBuf
,
lpszBuf
,
NULL
))
return
TRUE
;
return
!!
GetFullPathNameA
(
lpszPath
,
cchBuf
,
lpszBuf
,
NULL
);
}
/*************************************************************************
...
...
@@ -3126,8 +3129,11 @@ BOOL WINAPI PathSearchAndQualifyA(LPCSTR lpszPath, LPSTR lpszBuf, UINT cchBuf)
*/
BOOL
WINAPI
PathSearchAndQualifyW
(
LPCWSTR
lpszPath
,
LPWSTR
lpszBuf
,
UINT
cchBuf
)
{
FIXME
(
"(%s,%p,0x%08x)-stub
\n
"
,
debugstr_w
(
lpszPath
),
lpszBuf
,
cchBuf
);
return
FALSE
;
TRACE
(
"(%s,%p,0x%08x)
\n
"
,
debugstr_w
(
lpszPath
),
lpszBuf
,
cchBuf
);
if
(
SearchPathW
(
NULL
,
lpszPath
,
NULL
,
cchBuf
,
lpszBuf
,
NULL
))
return
TRUE
;
return
!!
GetFullPathNameW
(
lpszPath
,
cchBuf
,
lpszBuf
,
NULL
);
}
/*************************************************************************
...
...
dlls/shlwapi/tests/path.c
View file @
91704df4
...
...
@@ -293,6 +293,56 @@ static void test_UrlCombine(void)
}
}
static
void
test_PathSearchAndQualify
(
void
)
{
WCHAR
path1
[]
=
{
'c'
,
':'
,
'\\'
,
'f'
,
'o'
,
'o'
,
0
};
WCHAR
expect1
[]
=
{
'c'
,
':'
,
'\\'
,
'f'
,
'o'
,
'o'
,
0
};
WCHAR
path2
[]
=
{
'c'
,
':'
,
'f'
,
'o'
,
'o'
,
0
};
WCHAR
c_drive
[]
=
{
'c'
,
':'
,
0
};
WCHAR
foo
[]
=
{
'f'
,
'o'
,
'o'
,
0
};
WCHAR
path3
[]
=
{
'\\'
,
'f'
,
'o'
,
'o'
,
0
};
WCHAR
winini
[]
=
{
'w'
,
'i'
,
'n'
,
'.'
,
'i'
,
'n'
,
'i'
,
0
};
WCHAR
out
[
MAX_PATH
];
WCHAR
cur_dir
[
MAX_PATH
];
WCHAR
dot
[]
=
{
'.'
,
0
};
/* c:\foo */
ok
(
PathSearchAndQualifyW
(
path1
,
out
,
MAX_PATH
)
!=
0
,
"PathSearchAndQualify rets 0
\n
"
);
ok
(
!
lstrcmpiW
(
out
,
expect1
),
"strings don't match
\n
"
);
/* c:foo */
ok
(
PathSearchAndQualifyW
(
path2
,
out
,
MAX_PATH
)
!=
0
,
"PathSearchAndQualify rets 0
\n
"
);
GetFullPathNameW
(
c_drive
,
MAX_PATH
,
cur_dir
,
NULL
);
PathAddBackslashW
(
cur_dir
);
strcatW
(
cur_dir
,
foo
);
ok
(
!
lstrcmpiW
(
out
,
cur_dir
),
"strings don't match
\n
"
);
/* foo */
ok
(
PathSearchAndQualifyW
(
foo
,
out
,
MAX_PATH
)
!=
0
,
"PathSearchAndQualify rets 0
\n
"
);
GetFullPathNameW
(
dot
,
MAX_PATH
,
cur_dir
,
NULL
);
PathAddBackslashW
(
cur_dir
);
strcatW
(
cur_dir
,
foo
);
ok
(
!
lstrcmpiW
(
out
,
cur_dir
),
"strings don't match
\n
"
);
/* \foo */
ok
(
PathSearchAndQualifyW
(
path3
,
out
,
MAX_PATH
)
!=
0
,
"PathSearchAndQualify rets 0
\n
"
);
GetFullPathNameW
(
dot
,
MAX_PATH
,
cur_dir
,
NULL
);
strcpyW
(
cur_dir
+
2
,
path3
);
ok
(
!
lstrcmpiW
(
out
,
cur_dir
),
"strings don't match
\n
"
);
/* win.ini */
ok
(
PathSearchAndQualifyW
(
winini
,
out
,
MAX_PATH
)
!=
0
,
"PathSearchAndQualify rets 0
\n
"
);
if
(
!
SearchPathW
(
NULL
,
winini
,
NULL
,
MAX_PATH
,
cur_dir
,
NULL
))
GetFullPathNameW
(
winini
,
MAX_PATH
,
cur_dir
,
NULL
);
ok
(
!
lstrcmpiW
(
out
,
cur_dir
),
"strings don't match
\n
"
);
}
START_TEST
(
path
)
{
test_UrlHash
();
...
...
@@ -300,4 +350,6 @@ START_TEST(path)
test_UrlCanonicalize
();
test_UrlEscape
();
test_UrlCombine
();
test_PathSearchAndQualify
();
}
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