10 #include "wine/unicode.h"
15 #define NO_SHLWAPI_STREAM
17 #include "debugtools.h"
20 DEFAULT_DEBUG_CHANNEL(shell
);
22 INT __cdecl
_wtoi(LPWSTR string
);
24 #define isSlash(x) ((x)=='\\' || (x)=='/')
26 ########## Combining and Constructing paths ##########
29 /*************************************************************************
30 * PathAppendA [SHLWAPI.@]
33 * concat path lpszPath2 onto lpszPath1
36 * the resulting path is also canonicalized
38 BOOL WINAPI
PathAppendA(
42 TRACE("%s %s\n",lpszPath1
, lpszPath2
);
43 while (lpszPath2
[0]=='\\') lpszPath2
++;
44 PathCombineA(lpszPath1
,lpszPath1
,lpszPath2
);
48 /*************************************************************************
49 * PathAppendW [SHLWAPI.@]
51 BOOL WINAPI
PathAppendW(
55 TRACE("%s %s\n",debugstr_w(lpszPath1
), debugstr_w(lpszPath2
));
56 while (lpszPath2
[0]=='\\') lpszPath2
++;
57 PathCombineW(lpszPath1
,lpszPath1
,lpszPath2
);
61 /*************************************************************************
62 * PathCombineA [SHLWAPI.@]
65 * if lpszFile='.' skip it
66 * szDest can be equal to lpszFile. Thats why we use sTemp
69 * the resulting path is also canonicalized
71 LPSTR WINAPI
PathCombineA(
77 TRACE("%p %p->%s %p->%s\n",szDest
, lpszDir
, lpszDir
, lpszFile
, lpszFile
);
80 if (!lpszFile
|| !lpszFile
[0] || (lpszFile
[0]=='.' && !lpszFile
[1]) )
82 strcpy(szDest
,lpszDir
);
86 /* if lpszFile is a complete path don't care about lpszDir */
87 if (PathGetDriveNumberA(lpszFile
) != -1)
89 strcpy(szDest
,lpszFile
);
91 else if (lpszFile
[0] == '\\' )
93 strcpy(sTemp
,lpszDir
);
94 PathStripToRootA(sTemp
);
95 strcat(sTemp
,lpszFile
);
100 strcpy(sTemp
,lpszDir
);
101 PathAddBackslashA(sTemp
);
102 strcat(sTemp
,lpszFile
);
103 strcpy(szDest
,sTemp
);
108 /*************************************************************************
109 * PathCombineW [SHLWAPI.@]
111 LPWSTR WINAPI
PathCombineW(
116 WCHAR sTemp
[MAX_PATH
];
117 TRACE("%p %p->%s %p->%s\n",szDest
, lpszDir
, debugstr_w(lpszDir
),
118 lpszFile
, debugstr_w(lpszFile
));
121 if (!lpszFile
|| !lpszFile
[0] || (lpszFile
[0]==(WCHAR
)'.' && !lpszFile
[1]) )
123 strcpyW(szDest
,lpszDir
);
127 /* if lpszFile is a complete path don't care about lpszDir */
128 if (PathGetDriveNumberW(lpszFile
) != -1)
130 strcpyW(szDest
,lpszFile
);
132 else if (lpszFile
[0] == (WCHAR
)'\\' )
134 strcpyW(sTemp
,lpszDir
);
135 PathStripToRootW(sTemp
);
136 strcatW(sTemp
,lpszFile
);
137 strcpyW(szDest
,sTemp
);
141 strcpyW(sTemp
,lpszDir
);
142 PathAddBackslashW(sTemp
);
143 strcatW(sTemp
,lpszFile
);
144 strcpyW(szDest
,sTemp
);
149 /*************************************************************************
150 * PathAddBackslashA [SHLWAPI.@]
153 * append \ if there is none
155 LPSTR WINAPI
PathAddBackslashA(LPSTR lpszPath
)
158 TRACE("%p->%s\n",lpszPath
,lpszPath
);
160 len
= strlen(lpszPath
);
161 if (len
&& lpszPath
[len
-1]!='\\')
163 lpszPath
[len
] = '\\';
164 lpszPath
[len
+1]= 0x00;
165 return lpszPath
+len
+1;
170 /*************************************************************************
171 * PathAddBackslashW [SHLWAPI.@]
173 LPWSTR WINAPI
PathAddBackslashW(LPWSTR lpszPath
)
176 TRACE("%p->%s\n",lpszPath
,debugstr_w(lpszPath
));
178 len
= strlenW(lpszPath
);
179 if (len
&& lpszPath
[len
-1]!=(WCHAR
)'\\')
181 lpszPath
[len
] = (WCHAR
)'\\';
182 lpszPath
[len
+1]= 0x00;
183 return lpszPath
+len
+1;
188 /*************************************************************************
189 * PathBuildRootA [SHLWAPI.@]
191 LPSTR WINAPI
PathBuildRootA(LPSTR lpszPath
, int drive
)
193 TRACE("%p %i\n",lpszPath
, drive
);
195 strcpy(lpszPath
,"A:\\");
200 /*************************************************************************
201 * PathBuildRootW [SHLWAPI.@]
203 LPWSTR WINAPI
PathBuildRootW(LPWSTR lpszPath
, int drive
)
205 lpszPath
[0] = 'A' + drive
;
209 TRACE("%p %i\n",debugstr_w(lpszPath
), drive
);
214 Extracting Component Parts
217 /*************************************************************************
218 * PathFindFileNameA [SHLWAPI.@]
220 LPSTR WINAPI
PathFindFileNameA(LPCSTR lpszPath
)
222 LPCSTR lastSlash
= lpszPath
;
224 TRACE("%s\n",lpszPath
);
227 if ( isSlash(lpszPath
[0]) && lpszPath
[1])
228 lastSlash
= lpszPath
+1;
229 lpszPath
= CharNextA(lpszPath
);
231 return (LPSTR
)lastSlash
;
235 /*************************************************************************
236 * PathFindFileNameW [SHLWAPI.@]
238 LPWSTR WINAPI
PathFindFileNameW(LPCWSTR lpszPath
)
243 TRACE("%s\n",debugstr_w(wslash
));
246 if (((lpszPath
[0]=='\\') || (lpszPath
[0]==':')) && lpszPath
[1] && lpszPath
[1]!='\\')
248 lpszPath
= CharNextW(lpszPath
);
250 return (LPWSTR
)wslash
;
253 /*************************************************************************
254 * PathFindExtensionA [SHLWAPI.@]
257 * returns pointer to last . in last lpszPath component or at \0.
260 LPSTR WINAPI
PathFindExtensionA(LPCSTR lpszPath
)
262 LPCSTR lastpoint
= NULL
;
264 TRACE("%p %s\n",lpszPath
,lpszPath
);
268 if (*lpszPath
=='\\'||*lpszPath
==' ')
272 lpszPath
= CharNextA(lpszPath
);
274 return (LPSTR
)(lastpoint
?lastpoint
:lpszPath
);
277 /*************************************************************************
278 * PathFindExtensionW [SHLWAPI.@]
280 LPWSTR WINAPI
PathFindExtensionW(LPCWSTR lpszPath
)
282 LPCWSTR lastpoint
= NULL
;
284 TRACE("(%p %s)\n",lpszPath
,debugstr_w(lpszPath
));
288 if (*lpszPath
==(WCHAR
)'\\'||*lpszPath
==(WCHAR
)' ')
290 if (*lpszPath
==(WCHAR
)'.')
292 lpszPath
= CharNextW(lpszPath
);
294 return (LPWSTR
)(lastpoint
?lastpoint
:lpszPath
);
297 /*************************************************************************
298 * PathGetArgsA [SHLWAPI.@]
301 * look for next arg in string. handle "quoted" strings
302 * returns pointer to argument *AFTER* the space. Or to the \0.
307 LPSTR WINAPI
PathGetArgsA(LPCSTR lpszPath
)
311 TRACE("%s\n",lpszPath
);
315 if ((*lpszPath
==' ') && !qflag
)
316 return (LPSTR
)lpszPath
+1;
319 lpszPath
= CharNextA(lpszPath
);
321 return (LPSTR
)lpszPath
;
324 /*************************************************************************
325 * PathGetArgsW [SHLWAPI.@]
327 LPWSTR WINAPI
PathGetArgsW(LPCWSTR lpszPath
)
331 TRACE("%s\n",debugstr_w(lpszPath
));
335 if ((*lpszPath
==' ') && !qflag
)
336 return (LPWSTR
)lpszPath
+1;
339 lpszPath
= CharNextW(lpszPath
);
341 return (LPWSTR
)lpszPath
;
344 /*************************************************************************
345 * PathGetDriveNumberA [SHLWAPI.@]
347 int WINAPI
PathGetDriveNumberA(LPCSTR lpszPath
)
349 int chr
= tolower(lpszPath
[0]);
351 TRACE ("%s\n",debugstr_a(lpszPath
));
353 if (!lpszPath
|| lpszPath
[1]!=':' || chr
< 'a' || chr
> 'z') return -1;
354 return tolower(lpszPath
[0]) - 'a' ;
357 /*************************************************************************
358 * PathGetDriveNumberW [SHLWAPI.@]
360 int WINAPI
PathGetDriveNumberW(LPCWSTR lpszPath
)
362 int chr
= tolowerW(lpszPath
[0]);
364 TRACE ("%s\n",debugstr_w(lpszPath
));
366 if (!lpszPath
|| lpszPath
[1]!=':' || chr
< 'a' || chr
> 'z') return -1;
367 return tolowerW(lpszPath
[0]) - 'a' ;
370 /*************************************************************************
371 * PathRemoveFileSpecA [SHLWAPI.@]
374 * truncates passed argument to a valid path
375 * returns if the string was modified or not.
376 * "\foo\xx\foo"-> "\foo\xx"
380 BOOL WINAPI
PathRemoveFileSpecA(LPSTR lpszPath
)
382 LPSTR cutplace
= lpszPath
;
385 TRACE("%s\n",lpszPath
);
389 while (*lpszPath
== '\\') cutplace
= ++lpszPath
;
393 if(lpszPath
[0] == '\\') cutplace
= lpszPath
;
395 if(lpszPath
[0] == ':')
397 cutplace
= lpszPath
+ 1;
398 if (lpszPath
[1] == '\\') cutplace
++;
401 lpszPath
= CharNextA(lpszPath
);
402 if (!lpszPath
) break;
405 ret
= (*cutplace
!='\0');
411 /*************************************************************************
412 * PathRemoveFileSpecW [SHLWAPI.@]
414 BOOL WINAPI
PathRemoveFileSpecW(LPWSTR lpszPath
)
416 LPWSTR cutplace
= lpszPath
;
419 TRACE("%s\n",debugstr_w(lpszPath
));
423 while (*lpszPath
== '\\') cutplace
= ++lpszPath
;
427 if(lpszPath
[0] == '\\') cutplace
= lpszPath
;
429 if(lpszPath
[0] == ':')
431 cutplace
= lpszPath
+ 1;
432 if (lpszPath
[1] == '\\') cutplace
++;
435 lpszPath
= CharNextW(lpszPath
);
436 if (!lpszPath
) break;
439 ret
= (*cutplace
!='\0');
445 /*************************************************************************
446 * PathStripPathA [SHLWAPI.@]
449 * removes the path from the beginning of a filename
451 void WINAPI
PathStripPathA(LPSTR lpszPath
)
453 LPSTR lpszFileName
= PathFindFileNameA(lpszPath
);
455 TRACE("%s\n", lpszPath
);
458 RtlMoveMemory(lpszPath
, lpszFileName
, strlen(lpszFileName
)+1);
461 /*************************************************************************
462 * PathStripPathW [SHLWAPI.@]
464 void WINAPI
PathStripPathW(LPWSTR lpszPath
)
466 LPWSTR lpszFileName
= PathFindFileNameW(lpszPath
);
468 TRACE("%s\n", debugstr_w(lpszPath
));
470 RtlMoveMemory(lpszPath
, lpszFileName
, (strlenW(lpszFileName
)+1)*sizeof(WCHAR
));
473 /*************************************************************************
474 * PathStripToRootA [SHLWAPI.@]
476 BOOL WINAPI
PathStripToRootA(LPSTR lpszPath
)
478 TRACE("%s\n", lpszPath
);
480 if (!lpszPath
) return FALSE
;
481 while(!PathIsRootA(lpszPath
))
482 if (!PathRemoveFileSpecA(lpszPath
)) return FALSE
;
486 /*************************************************************************
487 * PathStripToRootW [SHLWAPI.@]
489 BOOL WINAPI
PathStripToRootW(LPWSTR lpszPath
)
491 TRACE("%s\n", debugstr_w(lpszPath
));
493 if (!lpszPath
) return FALSE
;
494 while(!PathIsRootW(lpszPath
))
495 if (!PathRemoveFileSpecW(lpszPath
)) return FALSE
;
499 /*************************************************************************
500 * PathRemoveArgsA [SHLWAPI.@]
503 void WINAPI
PathRemoveArgsA(LPSTR lpszPath
)
505 TRACE("%s\n",lpszPath
);
509 LPSTR lpszArgs
= PathGetArgsA(lpszPath
);
512 LPSTR lpszLastChar
= CharPrevA(lpszPath
, lpszArgs
);
513 if(*lpszLastChar
==' ') *lpszLastChar
= '\0';
518 /*************************************************************************
519 * PathRemoveArgsW [SHLWAPI.@]
521 void WINAPI
PathRemoveArgsW(LPWSTR lpszPath
)
523 TRACE("%s\n", debugstr_w(lpszPath
));
527 LPWSTR lpszArgs
= PathGetArgsW(lpszPath
);
530 LPWSTR lpszLastChar
= CharPrevW(lpszPath
, lpszArgs
);
531 if(*lpszLastChar
==' ') *lpszLastChar
= '\0';
536 /*************************************************************************
537 * PathRemoveExtensionA [SHLWAPI.@]
539 void WINAPI
PathRemoveExtensionA(LPSTR lpszPath
)
541 LPSTR lpszExtension
= PathFindExtensionA(lpszPath
);
543 TRACE("%s\n", lpszPath
);
545 if (lpszExtension
) *lpszExtension
='\0';
548 /*************************************************************************
549 * PathRemoveExtensionW [SHLWAPI.@]
551 void WINAPI
PathRemoveExtensionW(LPWSTR lpszPath
)
553 LPWSTR lpszExtension
= PathFindExtensionW(lpszPath
);
555 TRACE("%s\n", debugstr_w(lpszPath
));
557 if (lpszExtension
) *lpszExtension
='\0';
560 /*************************************************************************
561 * PathRemoveBackslashA [SHLWAPI.@]
563 * If the path ends in a backslash it is replaced by a NULL
564 * and the address of the NULL is returned
566 * the address of the last character is returned.
569 * "c:\": keep backslash
571 LPSTR WINAPI
PathRemoveBackslashA( LPSTR lpszPath
)
578 len
= strlen(lpszPath
);
579 szTemp
= CharPrevA(lpszPath
, lpszPath
+len
);
580 if (! PathIsRootA(lpszPath
))
582 if (*szTemp
== '\\') *szTemp
= '\0';
588 /*************************************************************************
589 * PathRemoveBackslashW [SHLWAPI.@]
591 LPWSTR WINAPI
PathRemoveBackslashW( LPWSTR lpszPath
)
594 LPWSTR szTemp
= NULL
;
598 len
= strlenW(lpszPath
);
599 szTemp
= CharPrevW(lpszPath
, lpszPath
+len
);
600 if (! PathIsRootW(lpszPath
))
602 if (*szTemp
== '\\') *szTemp
= '\0';
613 /*************************************************************************
614 * PathRemoveBlanksA [SHLWAPI.@]
617 * remove spaces from beginning and end of passed string
619 void WINAPI
PathRemoveBlanksA(LPSTR str
)
627 while (*x
==' ') x
= CharNextA(x
);
628 if (x
!=str
) strcpy(str
,x
);
630 while (*x
==' ') x
= CharPrevA(str
, x
);
631 if (*x
==' ') *x
='\0';
635 /*************************************************************************
636 * PathRemoveBlanksW [SHLWAPI.@]
638 void WINAPI
PathRemoveBlanksW(LPWSTR str
)
642 TRACE("%s\n",debugstr_w(str
));
646 while (*x
==' ') x
= CharNextW(x
);
647 if (x
!=str
) strcpyW(str
,x
);
648 x
=str
+strlenW(str
)-1;
649 while (*x
==' ') x
= CharPrevW(str
, x
);
650 if (*x
==' ') *x
='\0';
654 /*************************************************************************
655 * PathQuoteSpacesA [SHLWAPI.@]
658 LPSTR WINAPI
PathQuoteSpacesA(LPSTR lpszPath
)
660 TRACE("%s\n",lpszPath
);
662 if(StrChrA(lpszPath
,' '))
664 int len
= strlen(lpszPath
);
665 RtlMoveMemory(lpszPath
+1, lpszPath
, len
);
675 /*************************************************************************
676 * PathQuoteSpacesW [SHLWAPI.@]
678 LPWSTR WINAPI
PathQuoteSpacesW(LPWSTR lpszPath
)
680 TRACE("%s\n",debugstr_w(lpszPath
));
682 if(StrChrW(lpszPath
,' '))
684 int len
= strlenW(lpszPath
);
685 RtlMoveMemory(lpszPath
+1, lpszPath
, len
*sizeof(WCHAR
));
695 /*************************************************************************
696 * PathUnquoteSpacesA [SHLWAPI.@]
699 * unquote string (remove ")
701 VOID WINAPI
PathUnquoteSpacesA(LPSTR str
)
703 DWORD len
= strlen(str
);
716 /*************************************************************************
717 * PathUnquoteSpacesW [SHLWAPI.@]
719 VOID WINAPI
PathUnquoteSpacesW(LPWSTR str
)
721 DWORD len
= strlenW(str
);
723 TRACE("%s\n",debugstr_w(str
));
734 /*************************************************************************
735 * PathParseIconLocationA [SHLWAPI.@]
737 int WINAPI
PathParseIconLocationA(LPSTR lpszPath
)
739 LPSTR lpstrComma
= strchr(lpszPath
, ',');
742 TRACE("%s\n", debugstr_a(lpszPath
));
744 if (lpstrComma
&& lpstrComma
[1])
747 ret
= atoi(&lpstrComma
[1]);
750 PathUnquoteSpacesA(lpszPath
);
754 /*************************************************************************
755 * PathParseIconLocationW [SHLWAPI.@]
757 int WINAPI
PathParseIconLocationW(LPWSTR lpszPath
)
759 LPWSTR lpstrComma
= strchrW(lpszPath
, ',');
762 TRACE("%s\n", debugstr_w(lpszPath
));
764 if (lpstrComma
&& lpstrComma
[1])
767 ret
= _wtoi(&lpstrComma
[1]);
769 PathUnquoteSpacesW(lpszPath
);
774 ########## cleaning and resolving paths ##########
777 /*************************************************************************
778 * PathFindOnPathA [SHLWAPI.@]
780 BOOL WINAPI
PathFindOnPathA(LPSTR sFile
, LPCSTR
*sOtherDirs
)
782 FIXME("%s %p\n",sFile
, sOtherDirs
);
786 /*************************************************************************
787 * PathFindOnPathW [SHLWAPI.@]
789 BOOL WINAPI
PathFindOnPathW(LPWSTR sFile
, LPCWSTR
*sOtherDirs
)
791 FIXME("%s %p\n",debugstr_w(sFile
), sOtherDirs
);
795 /*************************************************************************
796 * PathCompactPathExA [SHLWAPI.@]
798 BOOL WINAPI
PathCompactPathExA(
804 FIXME("%p %s 0x%08x 0x%08lx\n", pszOut
, pszSrc
, cchMax
, dwFlags
);
808 /*************************************************************************
809 * PathCompactPathExW [SHLWAPI.@]
811 BOOL WINAPI
PathCompactPathExW(
817 FIXME("%p %s 0x%08x 0x%08lx\n", pszOut
, debugstr_w(pszSrc
), cchMax
, dwFlags
);
822 ########## Path Testing ##########
825 /*************************************************************************
826 * PathIsUNCA [SHLWAPI.@]
829 * PathIsUNC(char*path);
831 BOOL WINAPI
PathIsUNCA(LPCSTR lpszPath
)
833 TRACE("%s\n",lpszPath
);
835 return (lpszPath
&& (lpszPath
[0]=='\\') && (lpszPath
[1]=='\\'));
838 /*************************************************************************
839 * PathIsUNCW [SHLWAPI.@]
841 BOOL WINAPI
PathIsUNCW(LPCWSTR lpszPath
)
843 TRACE("%s\n",debugstr_w(lpszPath
));
845 return (lpszPath
&& (lpszPath
[0]=='\\') && (lpszPath
[1]=='\\'));
848 /*************************************************************************
849 * PathIsRelativeA [SHLWAPI.@]
851 BOOL WINAPI
PathIsRelativeA (LPCSTR lpszPath
)
853 TRACE("lpszPath=%s\n",lpszPath
);
855 return (lpszPath
&& (lpszPath
[0]!='\\' && lpszPath
[1]!=':'));
858 /*************************************************************************
859 * PathIsRelativeW [SHLWAPI.@]
861 BOOL WINAPI
PathIsRelativeW (LPCWSTR lpszPath
)
863 TRACE("lpszPath=%s\n",debugstr_w(lpszPath
));
865 return (lpszPath
&& (lpszPath
[0]!='\\' && lpszPath
[1]!=':'));
868 /*************************************************************************
869 * PathIsRootA [SHLWAPI.@]
872 * TRUE if the path points to a root directory
874 BOOL WINAPI
PathIsRootA(LPCSTR lpszPath
)
876 TRACE("%s\n",lpszPath
);
879 if (lpszPath
[1]==':' && lpszPath
[2]=='\\' && lpszPath
[3]=='\0')
883 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\0')
886 /* UNC "\\<computer>\<share>" */
887 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\\')
889 int foundbackslash
= 0;
893 if (*lpszPath
=='\\') foundbackslash
++;
894 lpszPath
= CharNextA(lpszPath
);
896 if (foundbackslash
<= 1)
902 /*************************************************************************
903 * PathIsRootW [SHLWAPI.@]
905 BOOL WINAPI
PathIsRootW(LPCWSTR lpszPath
)
907 TRACE("%s\n",debugstr_w(lpszPath
));
910 if (lpszPath
[1]==':' && lpszPath
[2]=='\\' && lpszPath
[3]=='\0')
914 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\0')
917 /* UNC "\\<computer>\<share>" */
918 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\\')
920 int foundbackslash
= 0;
924 if (*lpszPath
=='\\') foundbackslash
++;
925 lpszPath
= CharNextW(lpszPath
);
927 if (foundbackslash
<= 1)
934 /*************************************************************************
935 * PathIsDirectoryA [SHLWAPI.@]
937 BOOL WINAPI
PathIsDirectoryA(LPCSTR lpszPath
)
941 TRACE("%s\n", debugstr_a(lpszPath
));
943 dwAttr
= GetFileAttributesA(lpszPath
);
944 return (dwAttr
!= -1) ? dwAttr
& FILE_ATTRIBUTE_DIRECTORY
: 0;
947 /*************************************************************************
948 * PathIsDirectoryW [SHLWAPI.@]
950 BOOL WINAPI
PathIsDirectoryW(LPCWSTR lpszPath
)
954 TRACE("%s\n", debugstr_w(lpszPath
));
956 dwAttr
= GetFileAttributesW(lpszPath
);
957 return (dwAttr
!= -1) ? dwAttr
& FILE_ATTRIBUTE_DIRECTORY
: 0;
960 /*************************************************************************
961 * PathFileExistsA [SHLWAPI.@]
964 * file_exists(char *fn);
966 BOOL WINAPI
PathFileExistsA(LPCSTR lpszPath
)
968 TRACE("%s\n",lpszPath
);
969 return (GetFileAttributesA(lpszPath
)!=-1);
972 /*************************************************************************
973 * PathFileExistsW [SHLWAPI.@]
975 BOOL WINAPI
PathFileExistsW(LPCWSTR lpszPath
)
977 TRACE("%s\n",debugstr_w(lpszPath
));
978 return (GetFileAttributesW(lpszPath
)!=-1);
981 /*************************************************************************
982 * PathMatchSingleMaskA [internal]
985 * internal (used by PathMatchSpec)
987 static BOOL
PathMatchSingleMaskA(LPCSTR name
, LPCSTR mask
)
989 while (*name
&& *mask
&& *mask
!=';')
995 if (PathMatchSingleMaskA(name
,mask
+1)) return 1; /* try substrings */
999 if (toupper(*mask
)!=toupper(*name
) && *mask
!='?') return 0;
1000 name
= CharNextA(name
);
1001 mask
= CharNextA(mask
);
1005 while (*mask
=='*') mask
++;
1006 if (!*mask
|| *mask
==';') return 1;
1011 /*************************************************************************
1012 * PathMatchSingleMaskW [internal]
1014 static BOOL
PathMatchSingleMaskW(LPCWSTR name
, LPCWSTR mask
)
1016 while (*name
&& *mask
&& *mask
!=';')
1022 if (PathMatchSingleMaskW(name
,mask
+1)) return 1; /* try substrings */
1026 if (toupperW(*mask
)!=toupperW(*name
) && *mask
!='?') return 0;
1027 name
= CharNextW(name
);
1028 mask
= CharNextW(mask
);
1032 while (*mask
=='*') mask
++;
1033 if (!*mask
|| *mask
==';') return 1;
1037 /*************************************************************************
1038 * PathMatchSpecA [SHLWAPI.@]
1041 * used from COMDLG32
1043 BOOL WINAPI
PathMatchSpecA(LPCSTR name
, LPCSTR mask
)
1045 TRACE("%s %s\n",name
,mask
);
1047 if (!lstrcmpA( mask
, "*.*" )) return 1; /* we don't require a period */
1051 if (PathMatchSingleMaskA(name
,mask
)) return 1; /* helper function */
1052 while (*mask
&& *mask
!=';') mask
= CharNextA(mask
);
1056 while (*mask
==' ') mask
++; /* masks may be separated by "; " */
1062 /*************************************************************************
1063 * PathMatchSpecW [SHLWAPI.@]
1065 BOOL WINAPI
PathMatchSpecW(LPCWSTR name
, LPCWSTR mask
)
1067 static const WCHAR stemp
[] = { '*','.','*',0 };
1068 TRACE("%s %s\n",debugstr_w(name
),debugstr_w(mask
));
1070 if (!lstrcmpW( mask
, stemp
)) return 1; /* we don't require a period */
1074 if (PathMatchSingleMaskW(name
,mask
)) return 1; /* helper function */
1075 while (*mask
&& *mask
!=';') mask
= CharNextW(mask
);
1079 while (*mask
==' ') mask
++; /* masks may be separated by "; " */
1085 /*************************************************************************
1086 * PathIsSameRootA [SHLWAPI.@]
1089 * what to do with "\path" ??
1091 BOOL WINAPI
PathIsSameRootA(LPCSTR lpszPath1
, LPCSTR lpszPath2
)
1093 TRACE("%s %s\n", lpszPath1
, lpszPath2
);
1095 if (PathIsRelativeA(lpszPath1
) || PathIsRelativeA(lpszPath2
)) return FALSE
;
1098 if ( toupper(lpszPath1
[0])==toupper(lpszPath2
[0]) &&
1099 lpszPath1
[1]==':' && lpszPath2
[1]==':' &&
1100 lpszPath1
[2]=='\\' && lpszPath2
[2]=='\\')
1104 if (lpszPath1
[0]=='\\' && lpszPath2
[0]=='\\' &&
1105 lpszPath1
[1]=='\\' && lpszPath2
[1]=='\\')
1107 int pos
=2, bsfound
=0;
1108 while (lpszPath1
[pos
] && lpszPath2
[pos
] &&
1109 (lpszPath1
[pos
] == lpszPath2
[pos
]))
1111 if (lpszPath1
[pos
]=='\\') bsfound
++;
1112 if (bsfound
== 2) return TRUE
;
1113 pos
++; /* fixme: use CharNext*/
1115 return (lpszPath1
[pos
] == lpszPath2
[pos
]);
1120 /*************************************************************************
1121 * PathIsSameRootW [SHLWAPI.@]
1123 BOOL WINAPI
PathIsSameRootW(LPCWSTR lpszPath1
, LPCWSTR lpszPath2
)
1125 TRACE("%s %s\n", debugstr_w(lpszPath1
), debugstr_w(lpszPath2
));
1127 if (PathIsRelativeW(lpszPath1
) || PathIsRelativeW(lpszPath2
)) return FALSE
;
1130 if ( toupperW(lpszPath1
[0])==toupperW(lpszPath2
[0]) &&
1131 lpszPath1
[1]==':' && lpszPath2
[1]==':' &&
1132 lpszPath1
[2]=='\\' && lpszPath2
[2]=='\\')
1136 if (lpszPath1
[0]=='\\' && lpszPath2
[0]=='\\' &&
1137 lpszPath1
[1]=='\\' && lpszPath2
[1]=='\\')
1139 int pos
=2, bsfound
=0;
1140 while (lpszPath1
[pos
] && lpszPath2
[pos
] &&
1141 (lpszPath1
[pos
] == lpszPath2
[pos
]))
1143 if (lpszPath1
[pos
]=='\\') bsfound
++;
1144 if (bsfound
== 2) return TRUE
;
1145 pos
++;/* fixme: use CharNext*/
1147 return (lpszPath1
[pos
] == lpszPath2
[pos
]);
1152 /*************************************************************************
1153 * PathIsURLA (SHLWAPI.@)
1155 BOOL WINAPI
PathIsURLA(LPCSTR lpstrPath
)
1157 UNKNOWN_SHLWAPI_1 base
;
1160 if (!lpstrPath
|| !*lpstrPath
) return FALSE
;
1164 res1
= SHLWAPI_1(lpstrPath
, &base
);
1165 return (base
.fcncde
) ? TRUE
: FALSE
;
1168 /*************************************************************************
1169 * PathIsURLW (SHLWAPI.@)
1171 BOOL WINAPI
PathIsURLW(LPCWSTR lpstrPath
)
1173 UNKNOWN_SHLWAPI_2 base
;
1176 if (!lpstrPath
|| !*lpstrPath
) return FALSE
;
1180 res1
= SHLWAPI_2(lpstrPath
, &base
);
1181 return (base
.fcncde
) ? TRUE
: FALSE
;
1185 /*************************************************************************
1186 * PathIsContentTypeA [SHLWAPI.@]
1188 BOOL WINAPI
PathIsContentTypeA(LPCSTR pszPath
, LPCSTR pszContentType
)
1190 FIXME("%s %s\n", pszPath
, pszContentType
);
1194 /*************************************************************************
1195 * PathIsContentTypeW [SHLWAPI.@]
1197 BOOL WINAPI
PathIsContentTypeW(LPCWSTR pszPath
, LPCWSTR pszContentType
)
1199 FIXME("%s %s\n", debugstr_w(pszPath
), debugstr_w(pszContentType
));
1203 /*************************************************************************
1204 * PathIsFileSpecA [SHLWAPI.@]
1206 BOOL WINAPI
PathIsFileSpecA(LPCSTR pszPath
)
1208 FIXME("%s\n", pszPath
);
1212 /*************************************************************************
1213 * PathIsFileSpecW [SHLWAPI.@]
1215 BOOL WINAPI
PathIsFileSpecW(LPCWSTR pszPath
)
1217 FIXME("%s\n", debugstr_w(pszPath
));
1221 /*************************************************************************
1222 * PathIsPrefixA [SHLWAPI.@]
1224 BOOL WINAPI
PathIsPrefixA(LPCSTR pszPrefix
, LPCSTR pszPath
)
1226 FIXME("%s %s\n", pszPrefix
, pszPath
);
1230 /*************************************************************************
1231 * PathIsPrefixW [SHLWAPI.@]
1233 BOOL WINAPI
PathIsPrefixW(LPCWSTR pszPrefix
, LPCWSTR pszPath
)
1235 FIXME("%s %s\n", debugstr_w(pszPrefix
), debugstr_w(pszPath
));
1239 /*************************************************************************
1240 * PathIsSystemFolderA [SHLWAPI.@]
1242 BOOL WINAPI
PathIsSystemFolderA(LPCSTR pszPath
, DWORD dwAttrb
)
1244 FIXME("%s 0x%08lx\n", pszPath
, dwAttrb
);
1248 /*************************************************************************
1249 * PathIsSystemFolderW [SHLWAPI.@]
1251 BOOL WINAPI
PathIsSystemFolderW(LPCWSTR pszPath
, DWORD dwAttrb
)
1253 FIXME("%s 0x%08lx\n", debugstr_w(pszPath
), dwAttrb
);
1257 /*************************************************************************
1258 * PathIsUNCServerA [SHLWAPI.@]
1260 BOOL WINAPI
PathIsUNCServerA(
1263 TRACE("%s\n", debugstr_a(lpszPath
));
1264 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\\')
1266 int foundbackslash
= 0;
1270 if (*lpszPath
=='\\') foundbackslash
++;
1271 lpszPath
= CharNextA(lpszPath
);
1273 if (foundbackslash
== 0)
1279 /*************************************************************************
1280 * PathIsUNCServerW [SHLWAPI.@]
1282 BOOL WINAPI
PathIsUNCServerW(
1285 TRACE("%s\n", debugstr_w(lpszPath
));
1286 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\\')
1288 int foundbackslash
= 0;
1292 if (*lpszPath
=='\\') foundbackslash
++;
1293 lpszPath
= CharNextW(lpszPath
);
1295 if (foundbackslash
== 0)
1301 /*************************************************************************
1302 * PathIsUNCServerShareA [SHLWAPI.@]
1304 BOOL WINAPI
PathIsUNCServerShareA(
1307 TRACE("%s\n", debugstr_a(lpszPath
));
1308 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\\')
1310 int foundbackslash
= 0;
1314 if (*lpszPath
=='\\') foundbackslash
++;
1315 lpszPath
= CharNextA(lpszPath
);
1317 if (foundbackslash
== 1)
1323 /*************************************************************************
1324 * PathIsUNCServerShareW [SHLWAPI.@]
1326 BOOL WINAPI
PathIsUNCServerShareW(
1329 TRACE("%s\n", debugstr_w(lpszPath
));
1330 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\\')
1332 int foundbackslash
= 0;
1336 if (*lpszPath
=='\\') foundbackslash
++;
1337 lpszPath
= CharNextW(lpszPath
);
1339 if (foundbackslash
== 1)
1345 /*************************************************************************
1346 * PathCanonicalizeA [SHLWAPI.@]
1349 * returnvalue, use CharNext
1352 BOOL WINAPI
PathCanonicalizeA(LPSTR pszBuf
, LPCSTR pszPath
)
1354 int OffsetMin
= 0, OffsetSrc
= 0, OffsetDst
= 0, LenSrc
= strlen(pszPath
);
1355 BOOL bModifyed
= FALSE
;
1357 TRACE("%p %s\n", pszBuf
, pszPath
);
1359 pszBuf
[OffsetDst
]='\0';
1361 /* keep the root of the path */
1362 if( LenSrc
&& (pszPath
[OffsetSrc
]=='\\'))
1364 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1366 else if ( (LenSrc
>= 2) && (pszPath
[OffsetSrc
+1] == ':'))
1368 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1369 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1370 if (LenSrc
&& (pszPath
[OffsetSrc
] == '\\'))
1372 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1373 if (LenSrc
== 1 && pszPath
[OffsetSrc
]=='.')
1376 OffsetSrc
++; LenSrc
--; bModifyed
= TRUE
;
1378 else if (LenSrc
== 2 && pszPath
[OffsetSrc
]=='.' && pszPath
[OffsetSrc
+1]=='.')
1381 OffsetSrc
+=2; LenSrc
-=2; bModifyed
= TRUE
;
1386 /* ".\" at the beginning of the path */
1387 if (LenSrc
>= 2 && pszPath
[OffsetSrc
]=='.' && pszPath
[OffsetSrc
+1]=='\\')
1389 OffsetSrc
+=2; LenSrc
-=2; bModifyed
= TRUE
;
1394 if((LenSrc
>=3) && (pszPath
[OffsetSrc
]=='\\') && (pszPath
[OffsetSrc
+1]=='.') && (pszPath
[OffsetSrc
+2]=='.'))
1396 /* "\.." found, go one deeper */
1397 while((OffsetDst
> OffsetMin
) && (pszBuf
[OffsetDst
]!='\\')) OffsetDst
--;
1398 OffsetSrc
+= 3; LenSrc
-= 3; bModifyed
= TRUE
;
1399 if(OffsetDst
== OffsetMin
&& pszPath
[OffsetSrc
]=='\\') OffsetSrc
++;
1400 pszBuf
[OffsetDst
] = '\0'; /* important for \..\.. */
1402 else if(LenSrc
>=2 && pszPath
[OffsetSrc
]=='\\' && pszPath
[OffsetSrc
+1]=='.' )
1404 /* "\." found, skip it */
1405 OffsetSrc
+= 2; LenSrc
-=2; bModifyed
= TRUE
;
1409 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; LenSrc
--;
1412 pszBuf
[OffsetDst
] = '\0';
1413 TRACE("-- %s %u\n", pszBuf
, bModifyed
);
1418 /*************************************************************************
1419 * PathCanonicalizeW [SHLWAPI.@]
1422 * returnvalue, use CharNext
1424 BOOL WINAPI
PathCanonicalizeW(LPWSTR pszBuf
, LPCWSTR pszPath
)
1426 int OffsetMin
= 0, OffsetSrc
= 0, OffsetDst
= 0, LenSrc
= strlenW(pszPath
);
1427 BOOL bModifyed
= FALSE
;
1429 TRACE("%p %s\n", pszBuf
, debugstr_w(pszPath
));
1431 pszBuf
[OffsetDst
]='\0';
1433 /* keep the root of the path */
1434 if( LenSrc
&& (pszPath
[OffsetSrc
]=='\\'))
1436 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1438 else if ( (LenSrc
>= 2) && (pszPath
[OffsetSrc
+1] == ':'))
1440 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1441 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1442 if (LenSrc
&& (pszPath
[OffsetSrc
] == '\\'))
1444 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1445 if (LenSrc
== 1 && pszPath
[OffsetSrc
]=='.')
1448 OffsetSrc
++; LenSrc
--; bModifyed
= TRUE
;
1450 else if (LenSrc
== 2 && pszPath
[OffsetSrc
]=='.' && pszPath
[OffsetSrc
+1]=='.')
1453 OffsetSrc
+=2; LenSrc
-=2; bModifyed
= TRUE
;
1458 /* ".\" at the beginning of the path */
1459 if (LenSrc
>= 2 && pszPath
[OffsetSrc
]=='.' && pszPath
[OffsetSrc
+1]=='\\')
1461 OffsetSrc
+=2; LenSrc
-=2; bModifyed
= TRUE
;
1466 if((LenSrc
>=3) && (pszPath
[OffsetSrc
]=='\\') && (pszPath
[OffsetSrc
+1]=='.') && (pszPath
[OffsetSrc
+2]=='.'))
1468 /* "\.." found, go one deeper */
1469 while((OffsetDst
> OffsetMin
) && (pszBuf
[OffsetDst
]!='\\')) OffsetDst
--;
1470 OffsetSrc
+= 3; LenSrc
-= 3; bModifyed
= TRUE
;
1471 if(OffsetDst
== OffsetMin
&& pszPath
[OffsetSrc
]=='\\') OffsetSrc
++;
1472 pszBuf
[OffsetDst
] = '\0'; /* important for \..\.. */
1474 else if(LenSrc
>=2 && pszPath
[OffsetSrc
]=='\\' && pszPath
[OffsetSrc
+1]=='.' )
1476 /* "\." found, skip it */
1477 OffsetSrc
+= 2; LenSrc
-=2; bModifyed
= TRUE
;
1481 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; LenSrc
--;
1484 pszBuf
[OffsetDst
] = '\0';
1485 TRACE("-- %s %u\n", debugstr_w(pszBuf
), bModifyed
);
1489 /*************************************************************************
1490 * PathFindNextComponentA [SHLWAPI.@]
1495 * aa "" (pointer to traling NULL)
1496 * aa\ "" (pointer to traling NULL)
1497 * aa\\ "" (pointer to traling NULL)
1504 LPSTR WINAPI
PathFindNextComponentA(LPCSTR pszPath
)
1508 TRACE("%s\n", pszPath
);
1510 if(!pszPath
|| !*pszPath
) return NULL
;
1511 if(!(pos
= StrChrA(pszPath
, '\\')))
1512 return (LPSTR
) pszPath
+ strlen(pszPath
);
1514 if(pos
[0] == '\\') pos
++;
1518 /*************************************************************************
1519 * PathFindNextComponentW [SHLWAPI.@]
1521 LPWSTR WINAPI
PathFindNextComponentW(LPCWSTR pszPath
)
1525 TRACE("%s\n", debugstr_w(pszPath
));
1527 if(!pszPath
|| !*pszPath
) return NULL
;
1528 if (!(pos
= StrChrW(pszPath
, '\\')))
1529 return (LPWSTR
) pszPath
+ strlenW(pszPath
);
1531 if(pos
[0] == '\\') pos
++;
1535 /*************************************************************************
1536 * PathAddExtensionA [SHLWAPI.@]
1539 * it adds never a dot
1542 BOOL WINAPI
PathAddExtensionA(
1544 LPCSTR pszExtension
)
1548 if (*(PathFindExtensionA(pszPath
))) return FALSE
;
1550 if (!pszExtension
|| *pszExtension
=='\0')
1551 strcat(pszPath
, "exe");
1553 strcat(pszPath
, pszExtension
);
1559 /*************************************************************************
1560 * PathAddExtensionW [SHLWAPI.@]
1562 BOOL WINAPI
PathAddExtensionW(
1564 LPCWSTR pszExtension
)
1566 static const WCHAR ext
[] = { 'e','x','e',0 };
1570 if (*(PathFindExtensionW(pszPath
))) return FALSE
;
1572 if (!pszExtension
|| *pszExtension
=='\0')
1573 strcatW(pszPath
, ext
);
1575 strcatW(pszPath
, pszExtension
);
1581 /*************************************************************************
1582 * PathMakePrettyA [SHLWAPI.@]
1584 BOOL WINAPI
PathMakePrettyA(
1587 FIXME("%s\n", lpPath
);
1591 /*************************************************************************
1592 * PathMakePrettyW [SHLWAPI.@]
1594 BOOL WINAPI
PathMakePrettyW(
1597 FIXME("%s\n", debugstr_w(lpPath
));
1602 /*************************************************************************
1603 * PathCommonPrefixA [SHLWAPI.@]
1605 int WINAPI
PathCommonPrefixA(
1610 FIXME("%s %s %p\n", pszFile1
, pszFile2
, achPath
);
1614 /*************************************************************************
1615 * PathCommonPrefixW [SHLWAPI.@]
1617 int WINAPI
PathCommonPrefixW(
1622 FIXME("%s %s %p\n", debugstr_w(pszFile1
), debugstr_w(pszFile2
),achPath
);
1626 /*************************************************************************
1627 * PathCompactPathA [SHLWAPI.@]
1629 BOOL WINAPI
PathCompactPathA(HDC hDC
, LPSTR pszPath
, UINT dx
)
1631 FIXME("0x%08x %s 0x%08x\n", hDC
, pszPath
, dx
);
1635 /*************************************************************************
1636 * PathCompactPathW [SHLWAPI.@]
1638 BOOL WINAPI
PathCompactPathW(HDC hDC
, LPWSTR pszPath
, UINT dx
)
1640 FIXME("0x%08x %s 0x%08x\n", hDC
, debugstr_w(pszPath
), dx
);
1644 /*************************************************************************
1645 * PathGetCharTypeA [SHLWAPI.@]
1647 UINT WINAPI
PathGetCharTypeA(UCHAR ch
)
1653 /* We could use them in filenames, but this would confuse 'ls' */
1656 if ((ch
== '*') || (ch
=='?'))
1658 if ((ch
== '\\') || (ch
=='/'))
1659 return GCT_SEPARATOR
;
1661 /* all normal characters, no lower case letters */
1662 if ((ch
> ' ') && (ch
< 0x7f) && !islower(ch
))
1663 flags
|= GCT_SHORTCHAR
;
1664 /* All other characters are valid in long filenames, even umlauts */
1665 return flags
| GCT_LFNCHAR
;
1668 /*************************************************************************
1669 * PathGetCharTypeW [SHLWAPI.@]
1671 UINT WINAPI
PathGetCharTypeW(WCHAR ch
)
1673 FIXME("%c, using ascii version\n", ch
);
1674 return PathGetCharTypeA(ch
);
1677 /*************************************************************************
1678 * PathMakeSystemFolderA [SHLWAPI.@]
1680 BOOL WINAPI
PathMakeSystemFolderA(LPCSTR pszPath
)
1682 FIXME("%s\n", pszPath
);
1686 /*************************************************************************
1687 * PathMakeSystemFolderW [SHLWAPI.@]
1689 BOOL WINAPI
PathMakeSystemFolderW(LPCWSTR pszPath
)
1691 FIXME("%s\n", debugstr_w(pszPath
));
1695 /*************************************************************************
1696 * PathRenameExtensionA [SHLWAPI.@]
1698 BOOL WINAPI
PathRenameExtensionA(LPSTR pszPath
, LPCSTR pszExt
)
1700 LPSTR pszExtension
= PathFindExtensionA(pszPath
);
1702 if (!pszExtension
) return FALSE
;
1703 if (pszExtension
-pszPath
+ strlen(pszExt
) > MAX_PATH
) return FALSE
;
1705 strcpy(pszExtension
, pszExt
);
1706 TRACE("%s\n", pszPath
);
1710 /*************************************************************************
1711 * PathRenameExtensionW [SHLWAPI.@]
1713 BOOL WINAPI
PathRenameExtensionW(LPWSTR pszPath
, LPCWSTR pszExt
)
1715 LPWSTR pszExtension
= PathFindExtensionW(pszPath
);
1717 if (!pszExtension
) return FALSE
;
1718 if (pszExtension
-pszPath
+ strlenW(pszExt
) > MAX_PATH
) return FALSE
;
1720 strcpyW(pszExtension
, pszExt
);
1721 TRACE("%s\n", debugstr_w(pszPath
));
1725 /*************************************************************************
1726 * PathSearchAndQualifyA [SHLWAPI.@]
1728 BOOL WINAPI
PathSearchAndQualifyA(
1733 FIXME("%s %s 0x%08x\n", pszPath
, pszBuf
, cchBuf
);
1737 /*************************************************************************
1738 * PathSearchAndQualifyW [SHLWAPI.@]
1740 BOOL WINAPI
PathSearchAndQualifyW(
1745 FIXME("%s %s 0x%08x\n", debugstr_w(pszPath
), debugstr_w(pszBuf
), cchBuf
);
1749 /*************************************************************************
1750 * PathSkipRootA [SHLWAPI.@]
1752 LPSTR WINAPI
PathSkipRootA(LPCSTR pszPath
)
1754 FIXME("%s\n", pszPath
);
1755 return (LPSTR
)pszPath
;
1758 /*************************************************************************
1759 * PathSkipRootW [SHLWAPI.@]
1761 LPWSTR WINAPI
PathSkipRootW(LPCWSTR pszPath
)
1763 FIXME("%s\n", debugstr_w(pszPath
));
1764 return (LPWSTR
)pszPath
;
1767 /*************************************************************************
1768 * PathCreateFromUrlA [SHLWAPI.@]
1770 HRESULT WINAPI
PathCreateFromUrlA(
1776 FIXME("%s %p %p 0x%08lx\n",
1777 pszUrl
, pszPath
, pcchPath
, dwFlags
);
1781 /*************************************************************************
1782 * PathCreateFromUrlW [SHLWAPI.@]
1784 HRESULT WINAPI
PathCreateFromUrlW(
1790 FIXME("%s %p %p 0x%08lx\n",
1791 debugstr_w(pszUrl
), pszPath
, pcchPath
, dwFlags
);
1795 /*************************************************************************
1796 * PathRelativePathToA [SHLWAPI.@]
1798 BOOL WINAPI
PathRelativePathToA(
1805 FIXME("%s %s 0x%08lx %s 0x%08lx\n",
1806 pszPath
, pszFrom
, dwAttrFrom
, pszTo
, dwAttrTo
);
1810 /*************************************************************************
1811 * PathRelativePathToW [SHLWAPI.@]
1813 BOOL WINAPI
PathRelativePathToW(
1820 FIXME("%s %s 0x%08lx %s 0x%08lx\n",
1821 debugstr_w(pszPath
), debugstr_w(pszFrom
), dwAttrFrom
, debugstr_w(pszTo
), dwAttrTo
);
1825 /*************************************************************************
1826 * PathUnmakeSystemFolderA [SHLWAPI.@]
1828 BOOL WINAPI
PathUnmakeSystemFolderA(LPCSTR pszPath
)
1830 FIXME("%s\n", pszPath
);
1834 /*************************************************************************
1835 * PathUnmakeSystemFolderW [SHLWAPI.@]
1837 BOOL WINAPI
PathUnmakeSystemFolderW(LPCWSTR pszPath
)
1839 FIXME("%s\n", debugstr_w(pszPath
));
1844 ########## special ##########
1847 /*************************************************************************
1848 * PathSetDlgItemPathA [SHLWAPI.@]
1851 * use PathCompactPath to make sure, the path fits into the control
1853 BOOL WINAPI
PathSetDlgItemPathA(HWND hDlg
, int id
, LPCSTR pszPath
)
1854 { TRACE("%x %x %s\n",hDlg
, id
, pszPath
);
1855 return SetDlgItemTextA(hDlg
, id
, pszPath
);
1858 /*************************************************************************
1859 * PathSetDlgItemPathW [SHLWAPI.@]
1861 BOOL WINAPI
PathSetDlgItemPathW(HWND hDlg
, int id
, LPCWSTR pszPath
)
1862 { TRACE("%x %x %s\n",hDlg
, id
, debugstr_w(pszPath
));
1863 return SetDlgItemTextW(hDlg
, id
, pszPath
);