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
990ea44e
Commit
990ea44e
authored
Nov 04, 2004
by
Aric Stewart
Committed by
Alexandre Julliard
Nov 04, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of PathCleanupSpec.
parent
ac815f5a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
13 deletions
+77
-13
shell32.spec
dlls/shell32/shell32.spec
+1
-1
shellpath.c
dlls/shell32/shellpath.c
+69
-4
undocshell.h
dlls/shell32/undocshell.h
+0
-8
shlobj.h
include/shlobj.h
+7
-0
No files found.
dlls/shell32/shell32.spec
View file @
990ea44e
...
...
@@ -162,7 +162,7 @@
168 stdcall SHCreatePropSheetExtArray(long str long)
169 stdcall SHDestroyPropSheetExtArray(long)
170 stdcall SHReplaceFromPropSheetExtArray(long long long long)
171 stdcall PathCleanupSpec(ptr ptr)
PathCleanupSpecAW
171 stdcall PathCleanupSpec(ptr ptr)
172 stdcall SHCreateLinks(long str ptr long ptr)
173 stdcall SHValidateUNC(long long long)
174 stdcall SHCreateShellFolderViewEx (ptr ptr)
...
...
dlls/shell32/shellpath.c
View file @
990ea44e
...
...
@@ -558,11 +558,76 @@ BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs)
/*************************************************************************
* PathCleanupSpec [SHELL32.171]
*
* lpszFile is changed in place.
*/
DWORD
WINAPI
PathCleanupSpecAW
(
LPCVOID
x
,
LPVOID
y
)
int
WINAPI
PathCleanupSpec
(
LPCWSTR
lpszPathW
,
LPWSTR
lpszFileW
)
{
FIXME
(
"(%p, %p) stub
\n
"
,
x
,
y
);
return
TRUE
;
int
i
=
0
;
DWORD
rc
=
0
;
int
length
=
0
;
if
(
SHELL_OsIsUnicode
())
{
LPWSTR
p
=
lpszFileW
;
TRACE
(
"Cleanup %s
\n
"
,
debugstr_w
(
lpszFileW
));
if
(
lpszPathW
)
length
=
strlenW
(
lpszPathW
);
while
(
*
p
)
{
int
gct
=
PathGetCharTypeW
(
*
p
);
if
(
gct
==
GCT_INVALID
||
gct
==
GCT_WILD
||
gct
==
GCT_SEPARATOR
)
{
lpszFileW
[
i
]
=
'-'
;
rc
|=
PCS_REPLACEDCHAR
;
}
else
lpszFileW
[
i
]
=*
p
;
i
++
;
p
++
;
if
(
length
+
i
==
MAX_PATH
)
{
rc
|=
PCS_FATAL
|
PCS_PATHTOOLONG
;
break
;
}
}
lpszFileW
[
i
]
=
0
;
}
else
{
LPSTR
lpszFileA
=
(
LPSTR
)
lpszFileW
;
LPCSTR
lpszPathA
=
(
LPSTR
)
lpszPathW
;
LPSTR
p
=
lpszFileA
;
TRACE
(
"Cleanup %s
\n
"
,
debugstr_a
(
lpszFileA
));
if
(
lpszPathA
)
length
=
strlen
(
lpszPathA
);
while
(
*
p
)
{
int
gct
=
PathGetCharTypeA
(
*
p
);
if
(
gct
==
GCT_INVALID
||
gct
==
GCT_WILD
||
gct
==
GCT_SEPARATOR
)
{
lpszFileA
[
i
]
=
'-'
;
rc
|=
PCS_REPLACEDCHAR
;
}
else
lpszFileA
[
i
]
=*
p
;
i
++
;
p
++
;
if
(
length
+
i
==
MAX_PATH
)
{
rc
|=
PCS_FATAL
|
PCS_PATHTOOLONG
;
break
;
}
}
lpszFileA
[
i
]
=
0
;
}
return
rc
;
}
/*************************************************************************
...
...
@@ -1182,7 +1247,7 @@ static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath)
{
HRESULT
hr
;
WCHAR
resourcePath
[
MAX_PATH
];
LPCWSTR
pDefaultPath
;
LPCWSTR
pDefaultPath
=
NULL
;
TRACE
(
"0x%02x,%p
\n
"
,
folder
,
pszPath
);
...
...
dlls/shell32/undocshell.h
View file @
990ea44e
...
...
@@ -429,14 +429,6 @@ BOOL WINAPI PathYetAnotherMakeUniqueName(
LPCWSTR
lpszShortName
,
LPCWSTR
lpszLongName
);
/* PathCleanupSpec return values */
#define PCS_REPLACEDCHARS 0x00000001
#define PCS_REMOVEDCHARS 0x00000002
#define PCS_SHORTENED 0x00000004
#define PCS_PATHTOOLONG 0x80000008
DWORD
WINAPI
PathCleanupSpecAW
(
LPCVOID
lpszPath
,
LPVOID
lpszFile
);
BOOL
WINAPI
PathQualifyA
(
LPCSTR
path
);
BOOL
WINAPI
PathQualifyW
(
LPCWSTR
path
);
#define PathQualify WINELIB_NAME_AW(PathQualify)
...
...
include/shlobj.h
View file @
990ea44e
...
...
@@ -62,6 +62,13 @@ int WINAPI RestartDialogEx(HWND,LPCWSTR,DWORD,DWORD);
BOOL
WINAPI
SHObjectProperties
(
HWND
,
UINT
,
LPCWSTR
,
LPCWSTR
);
#define PCS_FATAL 0x80000000
#define PCS_REPLACEDCHAR 0x00000001
#define PCS_REMOVEDCHAR 0x00000002
#define PCS_TRUNCATED 0x00000004
#define PCS_PATHTOOLONG 0x00000008
int
WINAPI
PathCleanupSpec
(
LPCWSTR
pszDir
,
LPWSTR
pszSpec
);
/*****************************************************************************
* Predeclare interfaces
...
...
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