9 #include "wine/unicode.h"
10 #include "wine/undocshell.h"
12 #include "debugtools.h"
14 DEFAULT_DEBUG_CHANNEL(shell
);
16 #define isSlash(x) ((x)=='\\' || (x)=='/')
18 ########## Combining and Constructing paths ##########
21 /*************************************************************************
22 * PathAppendA [SHLWAPI.@]
25 * concat path lpszPath2 onto lpszPath1
28 * the resulting path is also canonicalized
30 BOOL WINAPI
PathAppendA(
34 TRACE("%s %s\n",lpszPath1
, lpszPath2
);
35 while (lpszPath2
[0]=='\\') lpszPath2
++;
36 PathCombineA(lpszPath1
,lpszPath1
,lpszPath2
);
40 /*************************************************************************
41 * PathAppendW [SHLWAPI.@]
43 BOOL WINAPI
PathAppendW(
47 TRACE("%s %s\n",debugstr_w(lpszPath1
), debugstr_w(lpszPath2
));
48 while (lpszPath2
[0]=='\\') lpszPath2
++;
49 PathCombineW(lpszPath1
,lpszPath1
,lpszPath2
);
53 /*************************************************************************
54 * PathCombineA [SHLWAPI.@]
57 * if lpszFile='.' skip it
58 * szDest can be equal to lpszFile. Thats why we use sTemp
61 * the resulting path is also canonicalized
63 LPSTR WINAPI
PathCombineA(
69 TRACE("%p %p->%s %p->%s\n",szDest
, lpszDir
, lpszDir
, lpszFile
, lpszFile
);
72 if (!lpszFile
|| !lpszFile
[0] || (lpszFile
[0]=='.' && !lpszFile
[1]) )
74 strcpy(szDest
,lpszDir
);
78 /* if lpszFile is a complete path don't care about lpszDir */
79 if (PathGetDriveNumberA(lpszFile
) != -1)
81 strcpy(szDest
,lpszFile
);
83 else if (lpszFile
[0] == '\\' )
85 strcpy(sTemp
,lpszDir
);
86 PathStripToRootA(sTemp
);
87 strcat(sTemp
,lpszFile
);
92 strcpy(sTemp
,lpszDir
);
93 PathAddBackslashA(sTemp
);
94 strcat(sTemp
,lpszFile
);
100 /*************************************************************************
101 * PathCombineW [SHLWAPI.@]
103 LPWSTR WINAPI
PathCombineW(
108 WCHAR sTemp
[MAX_PATH
];
109 TRACE("%p %p->%s %p->%s\n",szDest
, lpszDir
, debugstr_w(lpszDir
),
110 lpszFile
, debugstr_w(lpszFile
));
113 if (!lpszFile
|| !lpszFile
[0] || (lpszFile
[0]==(WCHAR
)'.' && !lpszFile
[1]) )
115 strcpyW(szDest
,lpszDir
);
119 /* if lpszFile is a complete path don't care about lpszDir */
120 if (PathGetDriveNumberW(lpszFile
) != -1)
122 strcpyW(szDest
,lpszFile
);
124 else if (lpszFile
[0] == (WCHAR
)'\\' )
126 strcpyW(sTemp
,lpszDir
);
127 PathStripToRootW(sTemp
);
128 strcatW(sTemp
,lpszFile
);
129 strcpyW(szDest
,sTemp
);
133 strcpyW(sTemp
,lpszDir
);
134 PathAddBackslashW(sTemp
);
135 strcatW(sTemp
,lpszFile
);
136 strcpyW(szDest
,sTemp
);
141 /*************************************************************************
142 * PathAddBackslashA [SHLWAPI.@]
145 * append \ if there is none
147 LPSTR WINAPI
PathAddBackslashA(LPSTR lpszPath
)
150 TRACE("%p->%s\n",lpszPath
,lpszPath
);
152 len
= strlen(lpszPath
);
153 if (len
&& lpszPath
[len
-1]!='\\')
155 lpszPath
[len
] = '\\';
156 lpszPath
[len
+1]= 0x00;
157 return lpszPath
+len
+1;
162 /*************************************************************************
163 * PathAddBackslashW [SHLWAPI.@]
165 LPWSTR WINAPI
PathAddBackslashW(LPWSTR lpszPath
)
168 TRACE("%p->%s\n",lpszPath
,debugstr_w(lpszPath
));
170 len
= strlenW(lpszPath
);
171 if (len
&& lpszPath
[len
-1]!=(WCHAR
)'\\')
173 lpszPath
[len
] = (WCHAR
)'\\';
174 lpszPath
[len
+1]= 0x00;
175 return lpszPath
+len
+1;
180 /*************************************************************************
181 * PathBuildRootA [SHLWAPI.@]
183 LPSTR WINAPI
PathBuildRootA(LPSTR lpszPath
, int drive
)
185 TRACE("%p %i\n",lpszPath
, drive
);
187 strcpy(lpszPath
,"A:\\");
192 /*************************************************************************
193 * PathBuildRootW [SHLWAPI.@]
195 LPWSTR WINAPI
PathBuildRootW(LPWSTR lpszPath
, int drive
)
197 TRACE("%p %i\n",debugstr_w(lpszPath
), drive
);
199 lstrcpyAtoW(lpszPath
,"A:\\");
205 Extracting Component Parts
208 /*************************************************************************
209 * PathFindFileNameA [SHLWAPI.@]
211 LPSTR WINAPI
PathFindFileNameA(LPCSTR lpszPath
)
213 LPCSTR lastSlash
= lpszPath
;
215 TRACE("%s\n",lpszPath
);
218 if ( isSlash(lpszPath
[0]) && lpszPath
[1])
219 lastSlash
= lpszPath
+1;
220 lpszPath
= CharNextA(lpszPath
);
222 return (LPSTR
)lastSlash
;
226 /*************************************************************************
227 * PathFindFileNameW [SHLWAPI.@]
229 LPWSTR WINAPI
PathFindFileNameW(LPCWSTR lpszPath
)
234 TRACE("%s\n",debugstr_w(wslash
));
237 if (((lpszPath
[0]=='\\') || (lpszPath
[0]==':')) && lpszPath
[1] && lpszPath
[1]!='\\')
239 lpszPath
= CharNextW(lpszPath
);
241 return (LPWSTR
)wslash
;
244 /*************************************************************************
245 * PathFindExtensionA [SHLWAPI.@]
248 * returns pointer to last . in last lpszPath component or at \0.
251 LPSTR WINAPI
PathFindExtensionA(LPCSTR lpszPath
)
253 LPCSTR lastpoint
= NULL
;
255 TRACE("%p %s\n",lpszPath
,lpszPath
);
259 if (*lpszPath
=='\\'||*lpszPath
==' ')
263 lpszPath
= CharNextA(lpszPath
);
265 return (LPSTR
)(lastpoint
?lastpoint
:lpszPath
);
268 /*************************************************************************
269 * PathFindExtensionW [SHLWAPI.@]
271 LPWSTR WINAPI
PathFindExtensionW(LPCWSTR lpszPath
)
273 LPCWSTR lastpoint
= NULL
;
275 TRACE("(%p %s)\n",lpszPath
,debugstr_w(lpszPath
));
279 if (*lpszPath
==(WCHAR
)'\\'||*lpszPath
==(WCHAR
)' ')
281 if (*lpszPath
==(WCHAR
)'.')
283 lpszPath
= CharNextW(lpszPath
);
285 return (LPWSTR
)(lastpoint
?lastpoint
:lpszPath
);
288 /*************************************************************************
289 * PathGetExtensionA [internal]
292 * exported by ordinal
293 * return value points to the first char after the dot
295 LPSTR WINAPI
PathGetExtensionA(LPCSTR lpszPath
)
297 TRACE("(%s)\n",lpszPath
);
299 lpszPath
= PathFindExtensionA(lpszPath
);
300 return (LPSTR
)(*lpszPath
?(lpszPath
+1):lpszPath
);
303 /*************************************************************************
304 * PathGetExtensionW [internal]
306 LPWSTR WINAPI
PathGetExtensionW(LPCWSTR lpszPath
)
308 TRACE("(%s)\n",debugstr_w(lpszPath
));
310 lpszPath
= PathFindExtensionW(lpszPath
);
311 return (LPWSTR
)(*lpszPath
?(lpszPath
+1):lpszPath
);
314 /*************************************************************************
315 * PathGetArgsA [SHLWAPI.@]
318 * look for next arg in string. handle "quoted" strings
319 * returns pointer to argument *AFTER* the space. Or to the \0.
324 LPSTR WINAPI
PathGetArgsA(LPCSTR lpszPath
)
328 TRACE("%s\n",lpszPath
);
332 if ((*lpszPath
==' ') && !qflag
)
333 return (LPSTR
)lpszPath
+1;
336 lpszPath
= CharNextA(lpszPath
);
338 return (LPSTR
)lpszPath
;
341 /*************************************************************************
342 * PathGetArgsW [SHLWAPI.@]
344 LPWSTR WINAPI
PathGetArgsW(LPCWSTR lpszPath
)
348 TRACE("%s\n",debugstr_w(lpszPath
));
352 if ((*lpszPath
==' ') && !qflag
)
353 return (LPWSTR
)lpszPath
+1;
356 lpszPath
= CharNextW(lpszPath
);
358 return (LPWSTR
)lpszPath
;
361 /*************************************************************************
362 * PathGetDriveNumberA [SHLWAPI.@]
364 int WINAPI
PathGetDriveNumberA(LPCSTR lpszPath
)
366 int chr
= tolower(lpszPath
[0]);
368 TRACE ("%s\n",debugstr_a(lpszPath
));
370 if (!lpszPath
|| lpszPath
[1]!=':' || chr
< 'a' || chr
> 'z') return -1;
371 return tolower(lpszPath
[0]) - 'a' ;
374 /*************************************************************************
375 * PathGetDriveNumberW [SHLWAPI.@]
377 int WINAPI
PathGetDriveNumberW(LPCWSTR lpszPath
)
379 int chr
= tolowerW(lpszPath
[0]);
381 TRACE ("%s\n",debugstr_w(lpszPath
));
383 if (!lpszPath
|| lpszPath
[1]!=':' || chr
< 'a' || chr
> 'z') return -1;
384 return tolowerW(lpszPath
[0]) - 'a' ;
387 /*************************************************************************
388 * PathRemoveFileSpecA [SHLWAPI.@]
391 * truncates passed argument to a valid path
392 * returns if the string was modified or not.
393 * "\foo\xx\foo"-> "\foo\xx"
397 BOOL WINAPI
PathRemoveFileSpecA(LPSTR lpszPath
)
399 LPSTR cutplace
= lpszPath
;
402 TRACE("%s\n",lpszPath
);
406 while (*lpszPath
== '\\') cutplace
= ++lpszPath
;
410 if(lpszPath
[0] == '\\') cutplace
= lpszPath
;
412 if(lpszPath
[0] == ':')
414 cutplace
= lpszPath
+ 1;
415 if (lpszPath
[1] == '\\') cutplace
++;
418 lpszPath
= CharNextA(lpszPath
);
419 if (!lpszPath
) break;
422 ret
= (*cutplace
!='\0');
428 /*************************************************************************
429 * PathRemoveFileSpecW [SHLWAPI.@]
431 BOOL WINAPI
PathRemoveFileSpecW(LPWSTR lpszPath
)
433 LPWSTR cutplace
= lpszPath
;
436 TRACE("%s\n",debugstr_w(lpszPath
));
440 while (*lpszPath
== '\\') cutplace
= ++lpszPath
;
444 if(lpszPath
[0] == '\\') cutplace
= lpszPath
;
446 if(lpszPath
[0] == ':')
448 cutplace
= lpszPath
+ 1;
449 if (lpszPath
[1] == '\\') cutplace
++;
452 lpszPath
= CharNextW(lpszPath
);
453 if (!lpszPath
) break;
456 ret
= (*cutplace
!='\0');
462 /*************************************************************************
463 * PathStripPathA [SHELLWAPI.@]
466 * removes the path from the beginning of a filename
468 void WINAPI
PathStripPathA(LPSTR lpszPath
)
470 LPSTR lpszFileName
= PathFindFileNameA(lpszPath
);
472 TRACE("%s\n", lpszPath
);
475 RtlMoveMemory(lpszPath
, lpszFileName
, strlen(lpszFileName
)+1);
478 /*************************************************************************
479 * PathStripPathW [SHELLWAPI.@]
481 void WINAPI
PathStripPathW(LPWSTR lpszPath
)
483 LPWSTR lpszFileName
= PathFindFileNameW(lpszPath
);
485 TRACE("%s\n", debugstr_w(lpszPath
));
487 RtlMoveMemory(lpszPath
, lpszFileName
, (lstrlenW(lpszFileName
)+1)*sizeof(WCHAR
));
490 /*************************************************************************
491 * PathStripToRootA [SHLWAPI.@]
493 BOOL WINAPI
PathStripToRootA(LPSTR lpszPath
)
495 TRACE("%s\n", lpszPath
);
497 if (!lpszPath
) return FALSE
;
498 while(!PathIsRootA(lpszPath
))
499 if (!PathRemoveFileSpecA(lpszPath
)) return FALSE
;
503 /*************************************************************************
504 * PathStripToRootW [SHLWAPI.@]
506 BOOL WINAPI
PathStripToRootW(LPWSTR lpszPath
)
508 TRACE("%s\n", debugstr_w(lpszPath
));
510 if (!lpszPath
) return FALSE
;
511 while(!PathIsRootW(lpszPath
))
512 if (!PathRemoveFileSpecW(lpszPath
)) return FALSE
;
516 /*************************************************************************
517 * PathRemoveArgsA [SHLWAPI.@]
520 void WINAPI
PathRemoveArgsA(LPSTR lpszPath
)
522 TRACE("%s\n",lpszPath
);
526 LPSTR lpszArgs
= PathGetArgsA(lpszPath
);
529 LPSTR lpszLastChar
= CharPrevA(lpszPath
, lpszArgs
);
530 if(*lpszLastChar
==' ') *lpszLastChar
= '\0';
535 /*************************************************************************
536 * PathRemoveArgsW [SHLWAPI.@]
538 void WINAPI
PathRemoveArgsW(LPWSTR lpszPath
)
540 TRACE("%s\n", debugstr_w(lpszPath
));
544 LPWSTR lpszArgs
= PathGetArgsW(lpszPath
);
547 LPWSTR lpszLastChar
= CharPrevW(lpszPath
, lpszArgs
);
548 if(*lpszLastChar
==' ') *lpszLastChar
= '\0';
553 /*************************************************************************
554 * PathRemoveExtensionA [SHLWAPI.@]
556 void WINAPI
PathRemoveExtensionA(LPSTR lpszPath
)
558 LPSTR lpszExtension
= PathFindExtensionA(lpszPath
);
560 TRACE("%s\n", lpszPath
);
562 if (lpszExtension
) *lpszExtension
='\0';
565 /*************************************************************************
566 * PathRemoveExtensionW [SHLWAPI.@]
568 void WINAPI
PathRemoveExtensionW(LPWSTR lpszPath
)
570 LPWSTR lpszExtension
= PathFindExtensionW(lpszPath
);
572 TRACE("%s\n", debugstr_w(lpszPath
));
574 if (lpszExtension
) *lpszExtension
='\0';
577 /*************************************************************************
578 * PathRemoveBackslashA [SHLWAPI.@]
580 * If the path ends in a backslash it is replaced by a NULL
581 * and the address of the NULL is returned
583 * the address of the last character is returned.
586 * "c:\": keep backslash
588 LPSTR WINAPI
PathRemoveBackslashA( LPSTR lpszPath
)
595 len
= strlen(lpszPath
);
596 szTemp
= CharPrevA(lpszPath
, lpszPath
+len
);
597 if (! PathIsRootA(lpszPath
))
599 if (*szTemp
== '\\') *szTemp
= '\0';
605 /*************************************************************************
606 * PathRemoveBackslashW [SHLWAPI.@]
608 LPWSTR WINAPI
PathRemoveBackslashW( LPWSTR lpszPath
)
611 LPWSTR szTemp
= NULL
;
615 len
= lstrlenW(lpszPath
);
616 szTemp
= CharPrevW(lpszPath
, lpszPath
+len
);
617 if (! PathIsRootW(lpszPath
))
619 if (*szTemp
== '\\') *szTemp
= '\0';
630 /*************************************************************************
631 * PathRemoveBlanksA [SHLWAPI.@]
634 * remove spaces from beginning and end of passed string
636 void WINAPI
PathRemoveBlanksA(LPSTR str
)
644 while (*x
==' ') x
= CharNextA(x
);
645 if (x
!=str
) strcpy(str
,x
);
647 while (*x
==' ') x
= CharPrevA(str
, x
);
648 if (*x
==' ') *x
='\0';
652 /*************************************************************************
653 * PathRemoveBlanksW [SHLWAPI.@]
655 void WINAPI
PathRemoveBlanksW(LPWSTR str
)
659 TRACE("%s\n",debugstr_w(str
));
663 while (*x
==' ') x
= CharNextW(x
);
664 if (x
!=str
) lstrcpyW(str
,x
);
665 x
=str
+lstrlenW(str
)-1;
666 while (*x
==' ') x
= CharPrevW(str
, x
);
667 if (*x
==' ') *x
='\0';
671 /*************************************************************************
672 * PathQuoteSpacesA [SHLWAPI.@]
675 LPSTR WINAPI
PathQuoteSpacesA(LPSTR lpszPath
)
677 TRACE("%s\n",lpszPath
);
679 if(StrChrA(lpszPath
,' '))
681 int len
= strlen(lpszPath
);
682 RtlMoveMemory(lpszPath
+1, lpszPath
, len
);
692 /*************************************************************************
693 * PathQuoteSpacesW [SHLWAPI.@]
695 LPWSTR WINAPI
PathQuoteSpacesW(LPWSTR lpszPath
)
697 TRACE("%s\n",debugstr_w(lpszPath
));
699 if(StrChrW(lpszPath
,' '))
701 int len
= lstrlenW(lpszPath
);
702 RtlMoveMemory(lpszPath
+1, lpszPath
, len
*sizeof(WCHAR
));
712 /*************************************************************************
713 * PathUnquoteSpacesA [SHLWAPI.@]
716 * unquote string (remove ")
718 VOID WINAPI
PathUnquoteSpacesA(LPSTR str
)
720 DWORD len
= lstrlenA(str
);
733 /*************************************************************************
734 * PathUnquoteSpacesW [SHLWAPI.@]
736 VOID WINAPI
PathUnquoteSpacesW(LPWSTR str
)
738 DWORD len
= strlenW(str
);
740 TRACE("%s\n",debugstr_w(str
));
751 /*************************************************************************
752 * PathParseIconLocationA [SHLWAPI.@]
754 int WINAPI
PathParseIconLocationA(LPSTR lpszPath
)
756 LPSTR lpstrComma
= strchr(lpszPath
, ',');
758 FIXME("%s stub\n", debugstr_a(lpszPath
));
760 if (lpstrComma
&& lpstrComma
[1])
763 /* return atoi(&lpstrComma[1]); FIXME */
766 PathUnquoteSpacesA(lpszPath
);
770 /*************************************************************************
771 * PathParseIconLocationW [SHLWAPI.@]
773 int WINAPI
PathParseIconLocationW(LPWSTR lpszPath
)
775 LPWSTR lpstrComma
= strchrW(lpszPath
, ',');
777 FIXME("%s stub\n", debugstr_w(lpszPath
));
779 if (lpstrComma
&& lpstrComma
[1])
782 /* return _wtoi(&lpstrComma[1]); FIXME */
784 PathUnquoteSpacesW(lpszPath
);
789 ########## cleaning and resolving paths ##########
792 /*************************************************************************
793 * PathFindOnPathA [SHLWAPI.@]
795 BOOL WINAPI
PathFindOnPathA(LPSTR sFile
, LPCSTR sOtherDirs
)
797 FIXME("%s %s\n",sFile
, sOtherDirs
);
801 /*************************************************************************
802 * PathFindOnPathW [SHLWAPI.@]
804 BOOL WINAPI
PathFindOnPathW(LPWSTR sFile
, LPCWSTR sOtherDirs
)
806 FIXME("%s %s\n",debugstr_w(sFile
), debugstr_w(sOtherDirs
));
810 /*************************************************************************
811 * PathCleanupSpecA [SHLWAPI.@]
813 DWORD WINAPI
PathCleanupSpecA(LPSTR x
, LPSTR y
)
815 FIXME("(%p %s, %p %s) stub\n",x
,debugstr_a(x
),y
,debugstr_a(y
));
819 /*************************************************************************
820 * PathCleanupSpecW [SHLWAPI.@]
822 DWORD WINAPI
PathCleanupSpecW(LPWSTR x
, LPWSTR y
)
824 FIXME("(%p %s, %p %s) stub\n",x
,debugstr_w(x
),y
,debugstr_w(y
));
828 /*************************************************************************
829 * PathCompactPathExA [SHLWAPI.@]
831 BOOL WINAPI
PathCompactPathExA(
837 FIXME("%p %s 0x%08x 0x%08lx\n", pszOut
, pszSrc
, cchMax
, dwFlags
);
841 /*************************************************************************
842 * PathCompactPathExW [SHLWAPI.@]
844 BOOL WINAPI
PathCompactPathExW(
850 FIXME("%p %s 0x%08x 0x%08lx\n", pszOut
, debugstr_w(pszSrc
), cchMax
, dwFlags
);
855 ########## Path Testing ##########
858 /*************************************************************************
859 * PathIsUNCA [SHLWAPI.@]
862 * PathIsUNC(char*path);
864 BOOL WINAPI
PathIsUNCA(LPCSTR lpszPath
)
866 TRACE("%s\n",lpszPath
);
868 return (lpszPath
&& (lpszPath
[0]=='\\') && (lpszPath
[1]=='\\'));
871 /*************************************************************************
872 * PathIsUNCW [SHLWAPI.@]
874 BOOL WINAPI
PathIsUNCW(LPCWSTR lpszPath
)
876 TRACE("%s\n",debugstr_w(lpszPath
));
878 return (lpszPath
&& (lpszPath
[0]=='\\') && (lpszPath
[1]=='\\'));
881 /*************************************************************************
882 * PathIsRelativeA [SHLWAPI.@]
884 BOOL WINAPI
PathIsRelativeA (LPCSTR lpszPath
)
886 TRACE("lpszPath=%s\n",lpszPath
);
888 return (lpszPath
&& (lpszPath
[0]!='\\' && lpszPath
[1]!=':'));
891 /*************************************************************************
892 * PathIsRelativeW [SHLWAPI.@]
894 BOOL WINAPI
PathIsRelativeW (LPCWSTR lpszPath
)
896 TRACE("lpszPath=%s\n",debugstr_w(lpszPath
));
898 return (lpszPath
&& (lpszPath
[0]!='\\' && lpszPath
[1]!=':'));
901 /*************************************************************************
902 * PathIsRootA [SHLWAPI.@]
905 * TRUE if the path points to a root directory
907 BOOL WINAPI
PathIsRootA(LPCSTR lpszPath
)
909 TRACE("%s\n",lpszPath
);
912 if (lpszPath
[1]==':' && lpszPath
[2]=='\\' && lpszPath
[3]=='\0')
916 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\0')
919 /* UNC "\\<computer>\<share>" */
920 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\\')
922 int foundbackslash
= 0;
926 if (*lpszPath
=='\\') foundbackslash
++;
927 lpszPath
= CharNextA(lpszPath
);
929 if (foundbackslash
<= 1)
935 /*************************************************************************
936 * PathIsRootW [SHLWAPI.@]
938 BOOL WINAPI
PathIsRootW(LPCWSTR lpszPath
)
940 TRACE("%s\n",debugstr_w(lpszPath
));
943 if (lpszPath
[1]==':' && lpszPath
[2]=='\\' && lpszPath
[3]=='\0')
947 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\0')
950 /* UNC "\\<computer>\<share>" */
951 if (lpszPath
[0]=='\\' && lpszPath
[1]=='\\')
953 int foundbackslash
= 0;
957 if (*lpszPath
=='\\') foundbackslash
++;
958 lpszPath
= CharNextW(lpszPath
);
960 if (foundbackslash
<= 1)
967 /*************************************************************************
968 * PathIsExeA [internal]
970 BOOL WINAPI
PathIsExeA (LPCSTR lpszPath
)
972 LPCSTR lpszExtension
= PathGetExtensionA(lpszPath
);
974 static char * lpszExtensions
[6] = {"exe", "com", "pid", "cmd", "bat", NULL
};
976 TRACE("path=%s\n",lpszPath
);
978 for(i
=0; lpszExtensions
[i
]; i
++)
979 if (!strcasecmp(lpszExtension
,lpszExtensions
[i
])) return TRUE
;
984 /*************************************************************************
985 * PathIsExeW [internal]
987 BOOL WINAPI
PathIsExeW (LPCWSTR lpszPath
)
989 LPCWSTR lpszExtension
= PathGetExtensionW(lpszPath
);
991 static WCHAR lpszExtensions
[6][4] =
992 {{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','d','\0'},
993 {'c','m','d','\0'}, {'b','a','t','\0'}, {'\0'} };
995 TRACE("path=%s\n",debugstr_w(lpszPath
));
997 for(i
=0; lpszExtensions
[i
]; i
++)
998 if (!strcmpiW(lpszExtension
,lpszExtensions
[i
])) return TRUE
;
1003 /*************************************************************************
1004 * PathIsDirectoryA [SHLWAPI.@]
1006 BOOL WINAPI
PathIsDirectoryA(LPCSTR lpszPath
)
1010 TRACE("%s\n", debugstr_a(lpszPath
));
1012 dwAttr
= GetFileAttributesA(lpszPath
);
1013 return (dwAttr
!= -1) ? dwAttr
& FILE_ATTRIBUTE_DIRECTORY
: 0;
1016 /*************************************************************************
1017 * PathIsDirectoryW [SHLWAPI.@]
1019 BOOL WINAPI
PathIsDirectoryW(LPCWSTR lpszPath
)
1023 TRACE("%s\n", debugstr_w(lpszPath
));
1025 dwAttr
= GetFileAttributesW(lpszPath
);
1026 return (dwAttr
!= -1) ? dwAttr
& FILE_ATTRIBUTE_DIRECTORY
: 0;
1029 /*************************************************************************
1030 * PathFileExistsA [SHLWAPI.@]
1033 * file_exists(char *fn);
1035 BOOL WINAPI
PathFileExistsA(LPCSTR lpszPath
)
1037 TRACE("%s\n",lpszPath
);
1038 return (GetFileAttributesA(lpszPath
)!=-1);
1041 /*************************************************************************
1042 * PathFileExistsW [SHLWAPI.@]
1044 BOOL WINAPI
PathFileExistsW(LPCWSTR lpszPath
)
1046 TRACE("%s\n",debugstr_w(lpszPath
));
1047 return (GetFileAttributesW(lpszPath
)!=-1);
1050 /*************************************************************************
1051 * PathMatchSingleMaskA [internal]
1054 * internal (used by PathMatchSpec)
1056 static BOOL
PathMatchSingleMaskA(LPCSTR name
, LPCSTR mask
)
1058 while (*name
&& *mask
&& *mask
!=';')
1064 if (PathMatchSingleMaskA(name
,mask
+1)) return 1; /* try substrings */
1068 if (toupper(*mask
)!=toupper(*name
) && *mask
!='?') return 0;
1069 name
= CharNextA(name
);
1070 mask
= CharNextA(mask
);
1074 while (*mask
=='*') mask
++;
1075 if (!*mask
|| *mask
==';') return 1;
1080 /*************************************************************************
1081 * PathMatchSingleMaskW [internal]
1083 static BOOL
PathMatchSingleMaskW(LPCWSTR name
, LPCWSTR mask
)
1085 while (*name
&& *mask
&& *mask
!=';')
1091 if (PathMatchSingleMaskW(name
,mask
+1)) return 1; /* try substrings */
1095 if (toupperW(*mask
)!=toupperW(*name
) && *mask
!='?') return 0;
1096 name
= CharNextW(name
);
1097 mask
= CharNextW(mask
);
1101 while (*mask
=='*') mask
++;
1102 if (!*mask
|| *mask
==';') return 1;
1106 /*************************************************************************
1107 * PathMatchSpecA [SHLWAPI.@]
1110 * used from COMDLG32
1112 BOOL WINAPI
PathMatchSpecA(LPCSTR name
, LPCSTR mask
)
1114 TRACE("%s %s\n",name
,mask
);
1116 if (!lstrcmpA( mask
, "*.*" )) return 1; /* we don't require a period */
1120 if (PathMatchSingleMaskA(name
,mask
)) return 1; /* helper function */
1121 while (*mask
&& *mask
!=';') mask
= CharNextA(mask
);
1125 while (*mask
==' ') mask
++; /* masks may be separated by "; " */
1131 /*************************************************************************
1132 * PathMatchSpecW [SHLWAPI.@]
1134 BOOL WINAPI
PathMatchSpecW(LPCWSTR name
, LPCWSTR mask
)
1137 TRACE("%s %s\n",debugstr_w(name
),debugstr_w(mask
));
1139 lstrcpyAtoW(stemp
,"*.*");
1140 if (!lstrcmpW( mask
, stemp
)) return 1; /* we don't require a period */
1144 if (PathMatchSingleMaskW(name
,mask
)) return 1; /* helper function */
1145 while (*mask
&& *mask
!=';') mask
= CharNextW(mask
);
1149 while (*mask
==' ') mask
++; /* masks may be separated by "; " */
1155 /*************************************************************************
1156 * PathIsSameRootA [SHLWAPI.@]
1159 * what to do with "\path" ??
1161 BOOL WINAPI
PathIsSameRootA(LPCSTR lpszPath1
, LPCSTR lpszPath2
)
1163 TRACE("%s %s\n", lpszPath1
, lpszPath2
);
1165 if (PathIsRelativeA(lpszPath1
) || PathIsRelativeA(lpszPath2
)) return FALSE
;
1168 if ( toupper(lpszPath1
[0])==toupper(lpszPath2
[0]) &&
1169 lpszPath1
[1]==':' && lpszPath2
[1]==':' &&
1170 lpszPath1
[2]=='\\' && lpszPath2
[2]=='\\')
1174 if (lpszPath1
[0]=='\\' && lpszPath2
[0]=='\\' &&
1175 lpszPath1
[1]=='\\' && lpszPath2
[1]=='\\')
1177 int pos
=2, bsfound
=0;
1178 while (lpszPath1
[pos
] && lpszPath2
[pos
] &&
1179 (lpszPath1
[pos
] == lpszPath2
[pos
]))
1181 if (lpszPath1
[pos
]=='\\') bsfound
++;
1182 if (bsfound
== 2) return TRUE
;
1183 pos
++; /* fixme: use CharNext*/
1185 return (lpszPath1
[pos
] == lpszPath2
[pos
]);
1190 /*************************************************************************
1191 * PathIsSameRootW [SHLWAPI.@]
1193 BOOL WINAPI
PathIsSameRootW(LPCWSTR lpszPath1
, LPCWSTR lpszPath2
)
1195 TRACE("%s %s\n", debugstr_w(lpszPath1
), debugstr_w(lpszPath2
));
1197 if (PathIsRelativeW(lpszPath1
) || PathIsRelativeW(lpszPath2
)) return FALSE
;
1200 if ( toupperW(lpszPath1
[0])==toupperW(lpszPath2
[0]) &&
1201 lpszPath1
[1]==':' && lpszPath2
[1]==':' &&
1202 lpszPath1
[2]=='\\' && lpszPath2
[2]=='\\')
1206 if (lpszPath1
[0]=='\\' && lpszPath2
[0]=='\\' &&
1207 lpszPath1
[1]=='\\' && lpszPath2
[1]=='\\')
1209 int pos
=2, bsfound
=0;
1210 while (lpszPath1
[pos
] && lpszPath2
[pos
] &&
1211 (lpszPath1
[pos
] == lpszPath2
[pos
]))
1213 if (lpszPath1
[pos
]=='\\') bsfound
++;
1214 if (bsfound
== 2) return TRUE
;
1215 pos
++;/* fixme: use CharNext*/
1217 return (lpszPath1
[pos
] == lpszPath2
[pos
]);
1222 /*************************************************************************
1225 BOOL WINAPI
PathIsURLA(LPCSTR lpstrPath
)
1229 static LPSTR SupportedProtocol
[] =
1230 {"http","https","ftp","gopher","file","mailto",NULL
};
1232 if(!lpstrPath
) return FALSE
;
1235 lpstrRes
= strchr(lpstrPath
,':');
1236 if(!lpstrRes
) return FALSE
;
1237 iSize
= lpstrRes
- lpstrPath
;
1239 while(SupportedProtocol
[i
])
1241 if (iSize
== strlen(SupportedProtocol
[i
]))
1242 if(!strncasecmp(lpstrPath
, SupportedProtocol
[i
], iSize
))
1250 /*************************************************************************
1253 BOOL WINAPI
PathIsURLW(LPCWSTR lpstrPath
)
1257 static WCHAR SupportedProtocol
[7][7] =
1258 {{'h','t','t','p','\0'},{'h','t','t','p','s','\0'},{'f','t','p','\0'},
1259 {'g','o','p','h','e','r','\0'},{'f','i','l','e','\0'},
1260 {'m','a','i','l','t','o','\0'},{0}};
1262 if(!lpstrPath
) return FALSE
;
1265 lpstrRes
= strchrW(lpstrPath
,':');
1266 if(!lpstrRes
) return FALSE
;
1267 iSize
= lpstrRes
- lpstrPath
;
1269 while(SupportedProtocol
[i
])
1271 if (iSize
== strlenW(SupportedProtocol
[i
]))
1272 if(!strncmpiW(lpstrPath
, SupportedProtocol
[i
], iSize
))
1281 /*************************************************************************
1282 * PathIsContentTypeA [SHLWAPI.@]
1284 BOOL WINAPI
PathIsContentTypeA(LPCSTR pszPath
, LPCSTR pszContentType
)
1286 FIXME("%s %s\n", pszPath
, pszContentType
);
1290 /*************************************************************************
1291 * PathIsContentTypeW [SHLWAPI.@]
1293 BOOL WINAPI
PathIsContentTypeW(LPCWSTR pszPath
, LPCWSTR pszContentType
)
1295 FIXME("%s %s\n", debugstr_w(pszPath
), debugstr_w(pszContentType
));
1299 /*************************************************************************
1300 * PathIsFileSpecA [SHLWAPI.@]
1302 BOOL WINAPI
PathIsFileSpecA(LPCSTR pszPath
)
1304 FIXME("%s\n", pszPath
);
1308 /*************************************************************************
1309 * PathIsFileSpecW [SHLWAPI.@]
1311 BOOL WINAPI
PathIsFileSpecW(LPCWSTR pszPath
)
1313 FIXME("%s\n", debugstr_w(pszPath
));
1317 /*************************************************************************
1318 * PathIsPrefixA [SHLWAPI.@]
1320 BOOL WINAPI
PathIsPrefixA(LPCSTR pszPrefix
, LPCSTR pszPath
)
1322 FIXME("%s %s\n", pszPrefix
, pszPath
);
1326 /*************************************************************************
1327 * PathIsPrefixW [SHLWAPI.@]
1329 BOOL WINAPI
PathIsPrefixW(LPCWSTR pszPrefix
, LPCWSTR pszPath
)
1331 FIXME("%s %s\n", debugstr_w(pszPrefix
), debugstr_w(pszPath
));
1335 /*************************************************************************
1336 * PathIsSystemFolderA [SHLWAPI.@]
1338 BOOL WINAPI
PathIsSystemFolderA(LPCSTR pszPath
, DWORD dwAttrb
)
1340 FIXME("%s 0x%08lx\n", pszPath
, dwAttrb
);
1344 /*************************************************************************
1345 * PathIsSystemFolderW [SHLWAPI.@]
1347 BOOL WINAPI
PathIsSystemFolderW(LPCWSTR pszPath
, DWORD dwAttrb
)
1349 FIXME("%s 0x%08lx\n", debugstr_w(pszPath
), dwAttrb
);
1353 /*************************************************************************
1354 * PathIsUNCServerA [SHLWAPI.@]
1356 BOOL WINAPI
PathIsUNCServerA(
1359 FIXME("%s\n", pszPath
);
1363 /*************************************************************************
1364 * PathIsUNCServerW [SHLWAPI.@]
1366 BOOL WINAPI
PathIsUNCServerW(
1369 FIXME("%s\n", debugstr_w(pszPath
));
1373 /*************************************************************************
1374 * PathIsUNCServerShareA [SHLWAPI.@]
1376 BOOL WINAPI
PathIsUNCServerShareA(
1379 FIXME("%s\n", pszPath
);
1383 /*************************************************************************
1384 * PathIsUNCServerShareW [SHLWAPI.@]
1386 BOOL WINAPI
PathIsUNCServerShareW(
1389 FIXME("%s\n", debugstr_w(pszPath
));
1393 /*************************************************************************
1394 * PathCanonicalizeA [SHLWAPI.@]
1397 * returnvalue, use CharNext
1400 BOOL WINAPI
PathCanonicalizeA(LPSTR pszBuf
, LPCSTR pszPath
)
1402 int OffsetMin
= 0, OffsetSrc
= 0, OffsetDst
= 0, LenSrc
= strlen(pszPath
);
1403 BOOL bModifyed
= FALSE
;
1405 TRACE("%p %s\n", pszBuf
, pszPath
);
1407 pszBuf
[OffsetDst
]='\0';
1409 /* keep the root of the path */
1410 if( LenSrc
&& (pszPath
[OffsetSrc
]=='\\'))
1412 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1414 else if ( (LenSrc
>= 2) && (pszPath
[OffsetSrc
+1] == ':'))
1416 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1417 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1418 if (LenSrc
&& (pszPath
[OffsetSrc
] == '\\'))
1420 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1421 if (LenSrc
== 1 && pszPath
[OffsetSrc
]=='.')
1424 OffsetSrc
++; LenSrc
--; bModifyed
= TRUE
;
1426 else if (LenSrc
== 2 && pszPath
[OffsetSrc
]=='.' && pszPath
[OffsetSrc
+1]=='.')
1429 OffsetSrc
+=2; LenSrc
-=2; bModifyed
= TRUE
;
1434 /* ".\" at the beginning of the path */
1435 if (LenSrc
>= 2 && pszPath
[OffsetSrc
]=='.' && pszPath
[OffsetSrc
+1]=='\\')
1437 OffsetSrc
+=2; LenSrc
-=2; bModifyed
= TRUE
;
1442 if((LenSrc
>=3) && (pszPath
[OffsetSrc
]=='\\') && (pszPath
[OffsetSrc
+1]=='.') && (pszPath
[OffsetSrc
+2]=='.'))
1444 /* "\.." found, go one deeper */
1445 while((OffsetDst
> OffsetMin
) && (pszBuf
[OffsetDst
]!='\\')) OffsetDst
--;
1446 OffsetSrc
+= 3; LenSrc
-= 3; bModifyed
= TRUE
;
1447 if(OffsetDst
== OffsetMin
&& pszPath
[OffsetSrc
]=='\\') OffsetSrc
++;
1448 pszBuf
[OffsetDst
] = '\0'; /* important for \..\.. */
1450 else if(LenSrc
>=2 && pszPath
[OffsetSrc
]=='\\' && pszPath
[OffsetSrc
+1]=='.' )
1452 /* "\." found, skip it */
1453 OffsetSrc
+= 2; LenSrc
-=2; bModifyed
= TRUE
;
1457 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; LenSrc
--;
1460 pszBuf
[OffsetDst
] = '\0';
1461 TRACE("-- %s %u\n", pszBuf
, bModifyed
);
1466 /*************************************************************************
1467 * PathCanonicalizeW [SHLWAPI.@]
1470 * returnvalue, use CharNext
1472 BOOL WINAPI
PathCanonicalizeW(LPWSTR pszBuf
, LPCWSTR pszPath
)
1474 int OffsetMin
= 0, OffsetSrc
= 0, OffsetDst
= 0, LenSrc
= lstrlenW(pszPath
);
1475 BOOL bModifyed
= FALSE
;
1477 TRACE("%p %s\n", pszBuf
, debugstr_w(pszPath
));
1479 pszBuf
[OffsetDst
]='\0';
1481 /* keep the root of the path */
1482 if( LenSrc
&& (pszPath
[OffsetSrc
]=='\\'))
1484 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1486 else if ( (LenSrc
>= 2) && (pszPath
[OffsetSrc
+1] == ':'))
1488 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1489 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1490 if (LenSrc
&& (pszPath
[OffsetSrc
] == '\\'))
1492 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; OffsetMin
++; LenSrc
--;
1493 if (LenSrc
== 1 && pszPath
[OffsetSrc
]=='.')
1496 OffsetSrc
++; LenSrc
--; bModifyed
= TRUE
;
1498 else if (LenSrc
== 2 && pszPath
[OffsetSrc
]=='.' && pszPath
[OffsetSrc
+1]=='.')
1501 OffsetSrc
+=2; LenSrc
-=2; bModifyed
= TRUE
;
1506 /* ".\" at the beginning of the path */
1507 if (LenSrc
>= 2 && pszPath
[OffsetSrc
]=='.' && pszPath
[OffsetSrc
+1]=='\\')
1509 OffsetSrc
+=2; LenSrc
-=2; bModifyed
= TRUE
;
1514 if((LenSrc
>=3) && (pszPath
[OffsetSrc
]=='\\') && (pszPath
[OffsetSrc
+1]=='.') && (pszPath
[OffsetSrc
+2]=='.'))
1516 /* "\.." found, go one deeper */
1517 while((OffsetDst
> OffsetMin
) && (pszBuf
[OffsetDst
]!='\\')) OffsetDst
--;
1518 OffsetSrc
+= 3; LenSrc
-= 3; bModifyed
= TRUE
;
1519 if(OffsetDst
== OffsetMin
&& pszPath
[OffsetSrc
]=='\\') OffsetSrc
++;
1520 pszBuf
[OffsetDst
] = '\0'; /* important for \..\.. */
1522 else if(LenSrc
>=2 && pszPath
[OffsetSrc
]=='\\' && pszPath
[OffsetSrc
+1]=='.' )
1524 /* "\." found, skip it */
1525 OffsetSrc
+= 2; LenSrc
-=2; bModifyed
= TRUE
;
1529 pszBuf
[OffsetDst
++] = pszPath
[OffsetSrc
++]; LenSrc
--;
1532 pszBuf
[OffsetDst
] = '\0';
1533 TRACE("-- %s %u\n", debugstr_w(pszBuf
), bModifyed
);
1537 /*************************************************************************
1538 * PathFindNextComponentA [SHLWAPI.@]
1543 * aa "" (pointer to traling NULL)
1544 * aa\ "" (pointer to traling NULL)
1545 * aa\\ "" (pointer to traling NULL)
1552 LPSTR WINAPI
PathFindNextComponentA(LPCSTR pszPath
)
1556 TRACE("%s\n", pszPath
);
1558 if(!pszPath
|| !*pszPath
) return NULL
;
1559 if(!(pos
= StrChrA(pszPath
, '\\')))
1560 return (LPSTR
) pszPath
+ strlen(pszPath
);
1562 if(pos
[0] == '\\') pos
++;
1566 /*************************************************************************
1567 * PathFindNextComponentW [SHLWAPI.@]
1569 LPWSTR WINAPI
PathFindNextComponentW(LPCWSTR pszPath
)
1573 TRACE("%s\n", debugstr_w(pszPath
));
1575 if(!pszPath
|| !*pszPath
) return NULL
;
1576 if (!(pos
= StrChrW(pszPath
, '\\')))
1577 return (LPWSTR
) pszPath
+ lstrlenW(pszPath
);
1579 if(pos
[0] == '\\') pos
++;
1583 /*************************************************************************
1584 * PathAddExtensionA [SHLWAPI.@]
1587 * it adds never a dot
1590 BOOL WINAPI
PathAddExtensionA(
1592 LPCSTR pszExtension
)
1596 if (*(PathFindExtensionA(pszPath
))) return FALSE
;
1598 if (!pszExtension
|| *pszExtension
=='\0')
1599 strcat(pszPath
, "exe");
1601 strcat(pszPath
, pszExtension
);
1607 /*************************************************************************
1608 * PathAddExtensionW [SHLWAPI.@]
1610 BOOL WINAPI
PathAddExtensionW(
1612 LPCWSTR pszExtension
)
1614 static const WCHAR ext
[] = { 'e','x','e',0 };
1618 if (*(PathFindExtensionW(pszPath
))) return FALSE
;
1620 if (!pszExtension
|| *pszExtension
=='\0')
1621 lstrcatW(pszPath
, ext
);
1623 lstrcatW(pszPath
, pszExtension
);
1629 /*************************************************************************
1630 * PathMakePrettyA [SHLWAPI.@]
1632 BOOL WINAPI
PathMakePrettyA(
1635 FIXME("%s\n", lpPath
);
1639 /*************************************************************************
1640 * PathMakePrettyW [SHLWAPI.@]
1642 BOOL WINAPI
PathMakePrettyW(
1645 FIXME("%s\n", debugstr_w(lpPath
));
1650 /*************************************************************************
1651 * PathCommonPrefixA [SHLWAPI.@]
1653 int WINAPI
PathCommonPrefixA(
1658 FIXME("%s %s %p\n", pszFile1
, pszFile2
, achPath
);
1662 /*************************************************************************
1663 * PathCommonPrefixW [SHLWAPI.@]
1665 int WINAPI
PathCommonPrefixW(
1670 FIXME("%s %s %p\n", debugstr_w(pszFile1
), debugstr_w(pszFile2
),achPath
);
1674 /*************************************************************************
1675 * PathCompactPathA [SHLWAPI.@]
1677 BOOL WINAPI
PathCompactPathA(HDC hDC
, LPSTR pszPath
, UINT dx
)
1679 FIXME("0x%08x %s 0x%08x\n", hDC
, pszPath
, dx
);
1683 /*************************************************************************
1684 * PathCompactPathW [SHLWAPI.@]
1686 BOOL WINAPI
PathCompactPathW(HDC hDC
, LPWSTR pszPath
, UINT dx
)
1688 FIXME("0x%08x %s 0x%08x\n", hDC
, debugstr_w(pszPath
), dx
);
1692 /*************************************************************************
1693 * PathGetCharTypeA [SHLWAPI.@]
1695 UINT WINAPI
PathGetCharTypeA(UCHAR ch
)
1701 /*************************************************************************
1702 * PathGetCharTypeW [SHLWAPI.@]
1704 UINT WINAPI
PathGetCharTypeW(WCHAR ch
)
1710 /*************************************************************************
1711 * PathMakeSystemFolderA [SHLWAPI.@]
1713 BOOL WINAPI
PathMakeSystemFolderA(LPCSTR pszPath
)
1715 FIXME("%s\n", pszPath
);
1719 /*************************************************************************
1720 * PathMakeSystemFolderW [SHLWAPI.@]
1722 BOOL WINAPI
PathMakeSystemFolderW(LPCWSTR pszPath
)
1724 FIXME("%s\n", debugstr_w(pszPath
));
1728 /*************************************************************************
1729 * PathRenameExtensionA [SHLWAPI.@]
1731 BOOL WINAPI
PathRenameExtensionA(LPSTR pszPath
, LPCSTR pszExt
)
1733 FIXME("%s %s\n", pszPath
, pszExt
);
1737 /*************************************************************************
1738 * PathRenameExtensionW [SHLWAPI.@]
1740 BOOL WINAPI
PathRenameExtensionW(LPWSTR pszPath
, LPCWSTR pszExt
)
1742 FIXME("%s %s\n", debugstr_w(pszPath
), debugstr_w(pszExt
));
1746 /*************************************************************************
1747 * PathSearchAndQualifyA [SHLWAPI.@]
1749 BOOL WINAPI
PathSearchAndQualifyA(
1754 FIXME("%s %s 0x%08x\n", pszPath
, pszBuf
, cchBuf
);
1758 /*************************************************************************
1759 * PathSearchAndQualifyW [SHLWAPI.@]
1761 BOOL WINAPI
PathSearchAndQualifyW(
1766 FIXME("%s %s 0x%08x\n", debugstr_w(pszPath
), debugstr_w(pszBuf
), cchBuf
);
1770 /*************************************************************************
1771 * PathSkipRootA [SHLWAPI.@]
1773 LPSTR WINAPI
PathSkipRootA(LPCSTR pszPath
)
1775 FIXME("%s\n", pszPath
);
1776 return (LPSTR
)pszPath
;
1779 /*************************************************************************
1780 * PathSkipRootW [SHLWAPI.@]
1782 LPWSTR WINAPI
PathSkipRootW(LPCWSTR pszPath
)
1784 FIXME("%s\n", debugstr_w(pszPath
));
1785 return (LPWSTR
)pszPath
;
1788 /*************************************************************************
1789 * PathCreateFromUrlA [SHLWAPI.@]
1791 HRESULT WINAPI
PathCreateFromUrlA(
1797 FIXME("%s %p %p 0x%08lx\n",
1798 pszUrl
, pszPath
, pcchPath
, dwFlags
);
1802 /*************************************************************************
1803 * PathCreateFromUrlW [SHLWAPI.@]
1805 HRESULT WINAPI
PathCreateFromUrlW(
1811 FIXME("%s %p %p 0x%08lx\n",
1812 debugstr_w(pszUrl
), pszPath
, pcchPath
, dwFlags
);
1816 /*************************************************************************
1817 * PathRelativePathToA [SHLWAPI.@]
1819 BOOL WINAPI
PathRelativePathToA(
1826 FIXME("%s %s 0x%08lx %s 0x%08lx\n",
1827 pszPath
, pszFrom
, dwAttrFrom
, pszTo
, dwAttrTo
);
1831 /*************************************************************************
1832 * PathRelativePathToW [SHLWAPI.@]
1834 BOOL WINAPI
PathRelativePathToW(
1841 FIXME("%s %s 0x%08lx %s 0x%08lx\n",
1842 debugstr_w(pszPath
), debugstr_w(pszFrom
), dwAttrFrom
, debugstr_w(pszTo
), dwAttrTo
);
1846 /*************************************************************************
1847 * PathUnmakeSystemFolderA [SHLWAPI.@]
1849 BOOL WINAPI
PathUnmakeSystemFolderA(LPCSTR pszPath
)
1851 FIXME("%s\n", pszPath
);
1855 /*************************************************************************
1856 * PathUnmakeSystemFolderW [SHLWAPI.@]
1858 BOOL WINAPI
PathUnmakeSystemFolderW(LPCWSTR pszPath
)
1860 FIXME("%s\n", debugstr_w(pszPath
));
1865 ########## special ##########
1868 /*************************************************************************
1869 * PathSetDlgItemPathA [SHLWAPI.@]
1872 * use PathCompactPath to make sure, the path fits into the control
1874 BOOL WINAPI
PathSetDlgItemPathA(HWND hDlg
, int id
, LPCSTR pszPath
)
1875 { TRACE("%x %x %s\n",hDlg
, id
, pszPath
);
1876 return SetDlgItemTextA(hDlg
, id
, pszPath
);
1879 /*************************************************************************
1880 * PathSetDlgItemPathW [SHLWAPI.@]
1882 BOOL WINAPI
PathSetDlgItemPathW(HWND hDlg
, int id
, LPCWSTR pszPath
)
1883 { TRACE("%x %x %s\n",hDlg
, id
, debugstr_w(pszPath
));
1884 return SetDlgItemTextW(hDlg
, id
, pszPath
);