1998-11-25 16:47:05 +00:00
|
|
|
/*
|
|
|
|
* Path Functions
|
|
|
|
*
|
|
|
|
* Many of this functions are in SHLWAPI.DLL also
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include <string.h>
|
|
|
|
#include <ctype.h>
|
1999-06-12 15:45:58 +00:00
|
|
|
#include "debugtools.h"
|
1998-11-25 16:47:05 +00:00
|
|
|
#include "winnls.h"
|
|
|
|
#include "winversion.h"
|
1999-07-25 12:23:15 +00:00
|
|
|
#include "winreg.h"
|
1999-01-23 14:12:48 +00:00
|
|
|
|
|
|
|
#include "shlobj.h"
|
1998-11-25 16:47:05 +00:00
|
|
|
#include "shell32_main.h"
|
1999-10-23 18:54:21 +00:00
|
|
|
#include "windef.h"
|
2000-02-20 18:43:44 +00:00
|
|
|
#include "options.h"
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
#include "wine/undocshell.h"
|
2000-06-13 01:10:29 +00:00
|
|
|
#include "wine/unicode.h"
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
#include "shlwapi.h"
|
1998-11-25 16:47:05 +00:00
|
|
|
|
2000-06-13 01:10:29 +00:00
|
|
|
DEFAULT_DEBUG_CHANNEL(shell);
|
1999-04-19 14:56:29 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
#define isSlash(x) ((x)=='\\' || (x)=='/')
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/*
|
2000-06-24 12:56:08 +00:00
|
|
|
########## Combining and Constructing paths ##########
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
*/
|
2000-02-20 18:43:44 +00:00
|
|
|
|
1998-11-25 16:47:05 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathAppendA [SHLWAPI.@]
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* concat path lpszPath2 onto lpszPath1
|
|
|
|
*
|
|
|
|
* FIXME
|
|
|
|
* the resulting path is also canonicalized
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
BOOL WINAPI PathAppendA(
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPSTR lpszPath1,
|
|
|
|
LPCSTR lpszPath2)
|
|
|
|
{
|
|
|
|
TRACE("%s %s\n",lpszPath1, lpszPath2);
|
|
|
|
while (lpszPath2[0]=='\\') lpszPath2++;
|
2000-06-24 12:56:08 +00:00
|
|
|
PathCombineA(lpszPath1,lpszPath1,lpszPath2);
|
|
|
|
return TRUE;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathAppendW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
BOOL WINAPI PathAppendW(
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPWSTR lpszPath1,
|
|
|
|
LPCWSTR lpszPath2)
|
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
TRACE("%s %s\n",debugstr_w(lpszPath1), debugstr_w(lpszPath2));
|
|
|
|
while (lpszPath2[0]=='\\') lpszPath2++;
|
|
|
|
PathCombineW(lpszPath1,lpszPath1,lpszPath2);
|
|
|
|
return TRUE;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathAppendAW [SHELL32.36]
|
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
BOOL WINAPI PathAppendAW(
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPVOID lpszPath1,
|
|
|
|
LPCVOID lpszPath2)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathAppendW(lpszPath1, lpszPath2);
|
|
|
|
return PathAppendA(lpszPath1, lpszPath2);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathCombineA [SHLWAPI.@]
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* if lpszFile='.' skip it
|
|
|
|
* szDest can be equal to lpszFile. Thats why we use sTemp
|
|
|
|
*
|
|
|
|
* FIXME
|
|
|
|
* the resulting path is also canonicalized
|
|
|
|
*/
|
|
|
|
LPSTR WINAPI PathCombineA(
|
|
|
|
LPSTR szDest,
|
|
|
|
LPCSTR lpszDir,
|
|
|
|
LPCSTR lpszFile)
|
|
|
|
{
|
|
|
|
char sTemp[MAX_PATH];
|
|
|
|
TRACE("%p %p->%s %p->%s\n",szDest, lpszDir, lpszDir, lpszFile, lpszFile);
|
|
|
|
|
|
|
|
|
|
|
|
if (!lpszFile || !lpszFile[0] || (lpszFile[0]=='.' && !lpszFile[1]) )
|
|
|
|
{
|
|
|
|
strcpy(szDest,lpszDir);
|
|
|
|
return szDest;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
/* if lpszFile is a complete path don't care about lpszDir */
|
2000-06-01 23:25:44 +00:00
|
|
|
if (PathGetDriveNumberA(lpszFile) != -1)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
|
|
|
strcpy(szDest,lpszFile);
|
|
|
|
}
|
2000-06-01 23:25:44 +00:00
|
|
|
else if (lpszFile[0] == '\\' )
|
|
|
|
{
|
|
|
|
strcpy(sTemp,lpszDir);
|
|
|
|
PathStripToRootA(sTemp);
|
|
|
|
strcat(sTemp,lpszFile);
|
|
|
|
strcpy(szDest,sTemp);
|
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
strcpy(sTemp,lpszDir);
|
|
|
|
PathAddBackslashA(sTemp);
|
|
|
|
strcat(sTemp,lpszFile);
|
|
|
|
strcpy(szDest,sTemp);
|
|
|
|
}
|
|
|
|
return szDest;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathCombineW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPWSTR WINAPI PathCombineW(
|
|
|
|
LPWSTR szDest,
|
|
|
|
LPCWSTR lpszDir,
|
|
|
|
LPCWSTR lpszFile)
|
|
|
|
{
|
|
|
|
WCHAR sTemp[MAX_PATH];
|
|
|
|
TRACE("%p %p->%s %p->%s\n",szDest, lpszDir, debugstr_w(lpszDir),
|
|
|
|
lpszFile, debugstr_w(lpszFile));
|
|
|
|
|
|
|
|
|
|
|
|
if (!lpszFile || !lpszFile[0] || (lpszFile[0]==(WCHAR)'.' && !lpszFile[1]) )
|
|
|
|
{
|
2000-06-13 01:10:29 +00:00
|
|
|
strcpyW(szDest,lpszDir);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return szDest;
|
|
|
|
}
|
1998-11-25 16:47:05 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/* if lpszFile is a complete path don't care about lpszDir */
|
2000-06-01 23:25:44 +00:00
|
|
|
if (PathGetDriveNumberW(lpszFile) != -1)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
2000-06-13 01:10:29 +00:00
|
|
|
strcpyW(szDest,lpszFile);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
2000-06-01 23:25:44 +00:00
|
|
|
else if (lpszFile[0] == (WCHAR)'\\' )
|
|
|
|
{
|
2000-06-13 01:10:29 +00:00
|
|
|
strcpyW(sTemp,lpszDir);
|
2000-06-01 23:25:44 +00:00
|
|
|
PathStripToRootW(sTemp);
|
2000-06-13 01:10:29 +00:00
|
|
|
strcatW(sTemp,lpszFile);
|
|
|
|
strcpyW(szDest,sTemp);
|
2000-06-01 23:25:44 +00:00
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
else
|
|
|
|
{
|
2000-06-13 01:10:29 +00:00
|
|
|
strcpyW(sTemp,lpszDir);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
PathAddBackslashW(sTemp);
|
2000-06-13 01:10:29 +00:00
|
|
|
strcatW(sTemp,lpszFile);
|
|
|
|
strcpyW(szDest,sTemp);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
return szDest;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
1998-11-25 16:47:05 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathCombineAW [SHELL32.37]
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPVOID WINAPI PathCombineAW(
|
|
|
|
LPVOID szDest,
|
|
|
|
LPCVOID lpszDir,
|
|
|
|
LPCVOID lpszFile)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathCombineW( szDest, lpszDir, lpszFile );
|
|
|
|
return PathCombineA( szDest, lpszDir, lpszFile );
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathAddBackslashA [SHLWAPI.@]
|
1998-11-25 16:47:05 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* append \ if there is none
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPSTR WINAPI PathAddBackslashA(LPSTR lpszPath)
|
|
|
|
{
|
|
|
|
int len;
|
|
|
|
TRACE("%p->%s\n",lpszPath,lpszPath);
|
|
|
|
|
|
|
|
len = strlen(lpszPath);
|
|
|
|
if (len && lpszPath[len-1]!='\\')
|
|
|
|
{
|
|
|
|
lpszPath[len] = '\\';
|
|
|
|
lpszPath[len+1]= 0x00;
|
|
|
|
return lpszPath+len+1;
|
|
|
|
}
|
|
|
|
return lpszPath+len;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathAddBackslashW [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
LPWSTR WINAPI PathAddBackslashW(LPWSTR lpszPath)
|
|
|
|
{
|
|
|
|
int len;
|
|
|
|
TRACE("%p->%s\n",lpszPath,debugstr_w(lpszPath));
|
|
|
|
|
2000-06-13 01:10:29 +00:00
|
|
|
len = strlenW(lpszPath);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
if (len && lpszPath[len-1]!=(WCHAR)'\\')
|
|
|
|
{
|
|
|
|
lpszPath[len] = (WCHAR)'\\';
|
|
|
|
lpszPath[len+1]= 0x00;
|
|
|
|
return lpszPath+len+1;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return lpszPath+len;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathAddBackslashAW [SHELL32.32]
|
|
|
|
*/
|
|
|
|
LPVOID WINAPI PathAddBackslashAW(LPVOID lpszPath)
|
|
|
|
{
|
|
|
|
if(VERSION_OsIsUnicode())
|
|
|
|
return PathAddBackslashW(lpszPath);
|
|
|
|
return PathAddBackslashA(lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathBuildRootA [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
LPSTR WINAPI PathBuildRootA(LPSTR lpszPath, int drive)
|
|
|
|
{
|
|
|
|
TRACE("%p %i\n",lpszPath, drive);
|
|
|
|
|
|
|
|
strcpy(lpszPath,"A:\\");
|
|
|
|
lpszPath[0]+=drive;
|
|
|
|
return lpszPath;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathBuildRootW [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive)
|
|
|
|
{
|
|
|
|
TRACE("%p %i\n",debugstr_w(lpszPath), drive);
|
|
|
|
|
|
|
|
lstrcpyAtoW(lpszPath,"A:\\");
|
|
|
|
lpszPath[0]+=drive;
|
|
|
|
return lpszPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathBuildRootAW [SHELL32.30]
|
|
|
|
*/
|
|
|
|
LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive)
|
|
|
|
{
|
|
|
|
if(VERSION_OsIsUnicode())
|
|
|
|
return PathBuildRootW(lpszPath, drive);
|
|
|
|
return PathBuildRootA(lpszPath, drive);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
Extracting Component Parts
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathFindFileNameA [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
LPSTR WINAPI PathFindFileNameA(LPCSTR lpszPath)
|
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
LPCSTR lastSlash = lpszPath;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
TRACE("%s\n",lpszPath);
|
|
|
|
while (*lpszPath)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
if ( isSlash(lpszPath[0]) && lpszPath[1])
|
|
|
|
lastSlash = lpszPath+1;
|
|
|
|
lpszPath = CharNextA(lpszPath);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
2000-06-24 12:56:08 +00:00
|
|
|
return (LPSTR)lastSlash;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathFindFileNameW [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
|
|
|
|
{
|
|
|
|
LPCWSTR wslash;
|
|
|
|
wslash = lpszPath;
|
|
|
|
|
|
|
|
TRACE("%s\n",debugstr_w(wslash));
|
|
|
|
while (lpszPath[0])
|
|
|
|
{
|
|
|
|
if (((lpszPath[0]=='\\') || (lpszPath[0]==':')) && lpszPath[1] && lpszPath[1]!='\\')
|
|
|
|
wslash = lpszPath+1;
|
2000-06-24 12:56:08 +00:00
|
|
|
lpszPath = CharNextW(lpszPath);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
return (LPWSTR)wslash;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathFindFileNameAW [SHELL32.34]
|
|
|
|
*/
|
|
|
|
LPVOID WINAPI PathFindFileNameAW(LPCVOID lpszPath)
|
|
|
|
{
|
|
|
|
if(VERSION_OsIsUnicode())
|
|
|
|
return PathFindFileNameW(lpszPath);
|
|
|
|
return PathFindFileNameA(lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathFindExtensionA [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* returns pointer to last . in last lpszPath component or at \0.
|
|
|
|
*/
|
|
|
|
|
|
|
|
LPSTR WINAPI PathFindExtensionA(LPCSTR lpszPath)
|
|
|
|
{
|
|
|
|
LPCSTR lastpoint = NULL;
|
|
|
|
|
|
|
|
TRACE("%p %s\n",lpszPath,lpszPath);
|
|
|
|
|
|
|
|
while (*lpszPath)
|
|
|
|
{
|
|
|
|
if (*lpszPath=='\\'||*lpszPath==' ')
|
|
|
|
lastpoint=NULL;
|
|
|
|
if (*lpszPath=='.')
|
|
|
|
lastpoint=lpszPath;
|
2000-06-24 12:56:08 +00:00
|
|
|
lpszPath = CharNextA(lpszPath);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
return (LPSTR)(lastpoint?lastpoint:lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathFindExtensionW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
|
|
|
|
{
|
|
|
|
LPCWSTR lastpoint = NULL;
|
|
|
|
|
|
|
|
TRACE("(%p %s)\n",lpszPath,debugstr_w(lpszPath));
|
|
|
|
|
|
|
|
while (*lpszPath)
|
|
|
|
{
|
|
|
|
if (*lpszPath==(WCHAR)'\\'||*lpszPath==(WCHAR)' ')
|
1998-11-25 16:47:05 +00:00
|
|
|
lastpoint=NULL;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
if (*lpszPath==(WCHAR)'.')
|
|
|
|
lastpoint=lpszPath;
|
2000-06-24 12:56:08 +00:00
|
|
|
lpszPath = CharNextW(lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return (LPWSTR)(lastpoint?lastpoint:lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathFindExtensionAW [SHELL32.31]
|
|
|
|
*/
|
|
|
|
LPVOID WINAPI PathFindExtensionAW(LPCVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathFindExtensionW(lpszPath);
|
|
|
|
return PathFindExtensionA(lpszPath);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetExtensionA [internal]
|
2000-03-24 20:46:04 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* exported by ordinal
|
|
|
|
* return value points to the first char after the dot
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPSTR WINAPI PathGetExtensionA(LPCSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("(%s)\n",lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
lpszPath = PathFindExtensionA(lpszPath);
|
|
|
|
return (LPSTR)(*lpszPath?(lpszPath+1):lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathGetExtensionW [internal]
|
|
|
|
*/
|
|
|
|
LPWSTR WINAPI PathGetExtensionW(LPCWSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("(%s)\n",debugstr_w(lpszPath));
|
|
|
|
|
|
|
|
lpszPath = PathFindExtensionW(lpszPath);
|
|
|
|
return (LPWSTR)(*lpszPath?(lpszPath+1):lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetExtensionAW [SHELL32.158]
|
|
|
|
*/
|
|
|
|
LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathGetExtensionW(lpszPath);
|
|
|
|
return PathGetExtensionA(lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetArgsA [SHLWAPI.@]
|
|
|
|
*
|
1998-11-25 16:47:05 +00:00
|
|
|
* NOTES
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* look for next arg in string. handle "quoted" strings
|
|
|
|
* returns pointer to argument *AFTER* the space. Or to the \0.
|
|
|
|
*
|
|
|
|
* FIXME
|
|
|
|
* quoting by '\'
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPSTR WINAPI PathGetArgsA(LPCSTR lpszPath)
|
|
|
|
{
|
|
|
|
BOOL qflag = FALSE;
|
1998-11-25 16:47:05 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
TRACE("%s\n",lpszPath);
|
|
|
|
|
|
|
|
while (*lpszPath)
|
|
|
|
{
|
|
|
|
if ((*lpszPath==' ') && !qflag)
|
|
|
|
return (LPSTR)lpszPath+1;
|
|
|
|
if (*lpszPath=='"')
|
|
|
|
qflag=!qflag;
|
2000-06-24 12:56:08 +00:00
|
|
|
lpszPath = CharNextA(lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return (LPSTR)lpszPath;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathGetArgsW [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
LPWSTR WINAPI PathGetArgsW(LPCWSTR lpszPath)
|
|
|
|
{
|
|
|
|
BOOL qflag = FALSE;
|
|
|
|
|
|
|
|
TRACE("%s\n",debugstr_w(lpszPath));
|
|
|
|
|
|
|
|
while (*lpszPath)
|
|
|
|
{
|
|
|
|
if ((*lpszPath==' ') && !qflag)
|
|
|
|
return (LPWSTR)lpszPath+1;
|
|
|
|
if (*lpszPath=='"')
|
|
|
|
qflag=!qflag;
|
2000-06-24 12:56:08 +00:00
|
|
|
lpszPath = CharNextW(lpszPath);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
return (LPWSTR)lpszPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetArgsAW [SHELL32.52]
|
|
|
|
*/
|
|
|
|
LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathGetArgsW(lpszPath);
|
|
|
|
return PathGetArgsA(lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetDriveNumberA [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
int WINAPI PathGetDriveNumberA(LPCSTR lpszPath)
|
|
|
|
{
|
|
|
|
int chr = tolower(lpszPath[0]);
|
|
|
|
|
|
|
|
TRACE ("%s\n",debugstr_a(lpszPath));
|
|
|
|
|
|
|
|
if (!lpszPath || lpszPath[1]!=':' || chr < 'a' || chr > 'z') return -1;
|
|
|
|
return tolower(lpszPath[0]) - 'a' ;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetDriveNumberW [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
int WINAPI PathGetDriveNumberW(LPCWSTR lpszPath)
|
|
|
|
{
|
2000-06-13 01:10:29 +00:00
|
|
|
int chr = tolowerW(lpszPath[0]);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
TRACE ("%s\n",debugstr_w(lpszPath));
|
|
|
|
|
|
|
|
if (!lpszPath || lpszPath[1]!=':' || chr < 'a' || chr > 'z') return -1;
|
2000-06-13 01:10:29 +00:00
|
|
|
return tolowerW(lpszPath[0]) - 'a' ;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetDriveNumber [SHELL32.57]
|
|
|
|
*/
|
|
|
|
int WINAPI PathGetDriveNumberAW(LPVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathGetDriveNumberW(lpszPath);
|
|
|
|
return PathGetDriveNumberA(lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveFileSpecA [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* truncates passed argument to a valid path
|
|
|
|
* returns if the string was modified or not.
|
|
|
|
* "\foo\xx\foo"-> "\foo\xx"
|
|
|
|
* "\" -> "\"
|
|
|
|
* "a:\foo" -> "a:\"
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathRemoveFileSpecA(LPSTR lpszPath)
|
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
LPSTR cutplace = lpszPath;
|
|
|
|
BOOL ret = FALSE;
|
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
TRACE("%s\n",lpszPath);
|
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
if(lpszPath)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
while (*lpszPath == '\\') cutplace = ++lpszPath;
|
|
|
|
|
|
|
|
while (*lpszPath)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
if(lpszPath[0] == '\\') cutplace = lpszPath;
|
|
|
|
|
|
|
|
if(lpszPath[0] == ':')
|
|
|
|
{
|
|
|
|
cutplace = lpszPath + 1;
|
|
|
|
if (lpszPath[1] == '\\') cutplace++;
|
|
|
|
lpszPath++;
|
|
|
|
}
|
|
|
|
lpszPath = CharNextA(lpszPath);
|
|
|
|
if (!lpszPath) break;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
2000-06-24 12:56:08 +00:00
|
|
|
|
|
|
|
ret = (*cutplace!='\0');
|
|
|
|
*cutplace = '\0';
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-06-24 12:56:08 +00:00
|
|
|
return ret;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveFileSpecW [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
|
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
LPWSTR cutplace = lpszPath;
|
|
|
|
BOOL ret = FALSE;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
TRACE("%s\n",debugstr_w(lpszPath));
|
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
if(lpszPath)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
while (*lpszPath == '\\') cutplace = ++lpszPath;
|
|
|
|
|
|
|
|
while (*lpszPath)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
if(lpszPath[0] == '\\') cutplace = lpszPath;
|
|
|
|
|
|
|
|
if(lpszPath[0] == ':')
|
|
|
|
{
|
|
|
|
cutplace = lpszPath + 1;
|
|
|
|
if (lpszPath[1] == '\\') cutplace++;
|
|
|
|
lpszPath++;
|
|
|
|
}
|
|
|
|
lpszPath = CharNextW(lpszPath);
|
|
|
|
if (!lpszPath) break;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
2000-06-24 12:56:08 +00:00
|
|
|
|
|
|
|
ret = (*cutplace!='\0');
|
|
|
|
*cutplace = '\0';
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
2000-06-24 12:56:08 +00:00
|
|
|
return ret;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveFileSpec [SHELL32.35]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathRemoveFileSpecW(lpszPath);
|
|
|
|
return PathRemoveFileSpecA(lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathStripPathA [SHELLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* removes the path from the beginning of a filename
|
|
|
|
*/
|
|
|
|
void WINAPI PathStripPathA(LPSTR lpszPath)
|
|
|
|
{
|
|
|
|
LPSTR lpszFileName = PathFindFileNameA(lpszPath);
|
|
|
|
|
|
|
|
TRACE("%s\n", lpszPath);
|
|
|
|
|
|
|
|
if(lpszFileName)
|
2000-06-13 03:45:52 +00:00
|
|
|
RtlMoveMemory(lpszPath, lpszFileName, strlen(lpszFileName)+1);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathStripPathW [SHELLWAPI.@]
|
|
|
|
*/
|
|
|
|
void WINAPI PathStripPathW(LPWSTR lpszPath)
|
|
|
|
{
|
|
|
|
LPWSTR lpszFileName = PathFindFileNameW(lpszPath);
|
|
|
|
|
|
|
|
TRACE("%s\n", debugstr_w(lpszPath));
|
|
|
|
if(lpszFileName)
|
2000-06-13 03:45:52 +00:00
|
|
|
RtlMoveMemory(lpszPath, lpszFileName, (lstrlenW(lpszFileName)+1)*sizeof(WCHAR));
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathStripPathAW [SHELL32.38]
|
|
|
|
*/
|
|
|
|
void WINAPI PathStripPathAW(LPVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathStripPathW(lpszPath);
|
|
|
|
return PathStripPathA(lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathStripToRootA [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathStripToRootA(LPSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("%s\n", lpszPath);
|
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
if (!lpszPath) return FALSE;
|
|
|
|
while(!PathIsRootA(lpszPath))
|
|
|
|
if (!PathRemoveFileSpecA(lpszPath)) return FALSE;
|
|
|
|
return TRUE;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathStripToRootW [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("%s\n", debugstr_w(lpszPath));
|
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
if (!lpszPath) return FALSE;
|
|
|
|
while(!PathIsRootW(lpszPath))
|
|
|
|
if (!PathRemoveFileSpecW(lpszPath)) return FALSE;
|
|
|
|
return TRUE;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathStripToRootAW [SHELL32.50]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathStripToRootAW(LPVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathStripToRootW(lpszPath);
|
|
|
|
return PathStripToRootA(lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveArgsA [SHLWAPI.@]
|
2000-06-13 03:45:52 +00:00
|
|
|
*
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
void WINAPI PathRemoveArgsA(LPSTR lpszPath)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
2000-06-13 03:45:52 +00:00
|
|
|
TRACE("%s\n",lpszPath);
|
2000-06-24 12:56:08 +00:00
|
|
|
|
|
|
|
if(lpszPath)
|
2000-06-13 03:45:52 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
LPSTR lpszArgs = PathGetArgsA(lpszPath);
|
|
|
|
if (!*lpszArgs)
|
|
|
|
{
|
|
|
|
LPSTR lpszLastChar = CharPrevA(lpszPath, lpszArgs);
|
|
|
|
if(*lpszLastChar==' ') *lpszLastChar = '\0';
|
|
|
|
}
|
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveArgsW [SHLWAPI.@]
|
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
|
|
|
TRACE("%s\n", debugstr_w(lpszPath));
|
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
if(lpszPath)
|
2000-06-13 03:45:52 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
LPWSTR lpszArgs = PathGetArgsW(lpszPath);
|
|
|
|
if (!*lpszArgs)
|
|
|
|
{
|
|
|
|
LPWSTR lpszLastChar = CharPrevW(lpszPath, lpszArgs);
|
|
|
|
if(*lpszLastChar==' ') *lpszLastChar = '\0';
|
|
|
|
}
|
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveArgsAW [SHELL32.251]
|
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
void WINAPI PathRemoveArgsAW(LPVOID lpszPath)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
2000-06-24 12:56:08 +00:00
|
|
|
PathRemoveArgsW(lpszPath);
|
|
|
|
PathRemoveArgsA(lpszPath);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveExtensionA [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
void WINAPI PathRemoveExtensionA(LPSTR lpszPath)
|
|
|
|
{
|
|
|
|
LPSTR lpszExtension = PathFindExtensionA(lpszPath);
|
|
|
|
|
|
|
|
TRACE("%s\n", lpszPath);
|
|
|
|
|
|
|
|
if (lpszExtension) *lpszExtension='\0';
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathRemoveExtensionW [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
|
|
|
|
{
|
|
|
|
LPWSTR lpszExtension = PathFindExtensionW(lpszPath);
|
|
|
|
|
|
|
|
TRACE("%s\n", debugstr_w(lpszPath));
|
|
|
|
|
|
|
|
if (lpszExtension) *lpszExtension='\0';
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveExtensionAW [SHELL32.250]
|
|
|
|
*/
|
|
|
|
void WINAPI PathRemoveExtensionAW(LPVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathRemoveExtensionW(lpszPath);
|
|
|
|
return PathRemoveExtensionA(lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveBackslashA [SHLWAPI.@]
|
|
|
|
*
|
|
|
|
* If the path ends in a backslash it is replaced by a NULL
|
|
|
|
* and the address of the NULL is returned
|
|
|
|
* Otherwise
|
|
|
|
* the address of the last character is returned.
|
|
|
|
*
|
2000-06-13 03:45:52 +00:00
|
|
|
* FIXME
|
|
|
|
* "c:\": keep backslash
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
*/
|
|
|
|
LPSTR WINAPI PathRemoveBackslashA( LPSTR lpszPath )
|
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
int len;
|
|
|
|
LPSTR szTemp = NULL;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
if(lpszPath)
|
|
|
|
{
|
|
|
|
len = strlen(lpszPath);
|
|
|
|
szTemp = CharPrevA(lpszPath, lpszPath+len);
|
|
|
|
if (! PathIsRootA(lpszPath))
|
|
|
|
{
|
|
|
|
if (*szTemp == '\\') *szTemp = '\0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return szTemp;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveBackslashW [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
LPWSTR WINAPI PathRemoveBackslashW( LPWSTR lpszPath )
|
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
int len;
|
|
|
|
LPWSTR szTemp = NULL;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
if(lpszPath)
|
|
|
|
{
|
|
|
|
len = lstrlenW(lpszPath);
|
|
|
|
szTemp = CharPrevW(lpszPath, lpszPath+len);
|
|
|
|
if (! PathIsRootW(lpszPath))
|
|
|
|
{
|
|
|
|
if (*szTemp == '\\') *szTemp = '\0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return szTemp;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
Path Manipulations
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetShortPathA [internal]
|
|
|
|
*/
|
|
|
|
LPSTR WINAPI PathGetShortPathA(LPSTR lpszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s stub\n", lpszPath);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetShortPathW [internal]
|
|
|
|
*/
|
|
|
|
LPWSTR WINAPI PathGetShortPathW(LPWSTR lpszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s stub\n", debugstr_w(lpszPath));
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetShortPathAW [SHELL32.92]
|
|
|
|
*/
|
|
|
|
LPVOID WINAPI PathGetShortPathAW(LPVOID lpszPath)
|
|
|
|
{
|
|
|
|
if(VERSION_OsIsUnicode())
|
|
|
|
return PathGetShortPathW(lpszPath);
|
|
|
|
return PathGetShortPathA(lpszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRemoveBlanksA [SHLWAPI.@]
|
1998-11-25 16:47:05 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* remove spaces from beginning and end of passed string
|
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
void WINAPI PathRemoveBlanksA(LPSTR str)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
|
|
|
LPSTR x = str;
|
|
|
|
|
1999-06-12 15:45:58 +00:00
|
|
|
TRACE("%s\n",str);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
if(str)
|
|
|
|
{
|
|
|
|
while (*x==' ') x = CharNextA(x);
|
|
|
|
if (x!=str) strcpy(str,x);
|
|
|
|
x=str+strlen(str)-1;
|
|
|
|
while (*x==' ') x = CharPrevA(str, x);
|
|
|
|
if (*x==' ') *x='\0';
|
|
|
|
}
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathRemoveBlanksW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
void WINAPI PathRemoveBlanksW(LPWSTR str)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
|
|
|
LPWSTR x = str;
|
|
|
|
|
1999-06-12 15:45:58 +00:00
|
|
|
TRACE("%s\n",debugstr_w(str));
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
if(str)
|
|
|
|
{
|
|
|
|
while (*x==' ') x = CharNextW(x);
|
|
|
|
if (x!=str) lstrcpyW(str,x);
|
|
|
|
x=str+lstrlenW(str)-1;
|
|
|
|
while (*x==' ') x = CharPrevW(str, x);
|
|
|
|
if (*x==' ') *x='\0';
|
|
|
|
}
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathRemoveBlanksAW [SHELL32.33]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
void WINAPI PathRemoveBlanksAW(LPVOID str)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
|
|
|
if(VERSION_OsIsUnicode())
|
2000-06-24 12:56:08 +00:00
|
|
|
PathRemoveBlanksW(str);
|
|
|
|
PathRemoveBlanksA(str);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathQuoteSpacesA [SHLWAPI.@]
|
1998-11-25 16:47:05 +00:00
|
|
|
*
|
|
|
|
*/
|
2000-06-13 03:45:52 +00:00
|
|
|
LPSTR WINAPI PathQuoteSpacesA(LPSTR lpszPath)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
2000-06-13 03:45:52 +00:00
|
|
|
TRACE("%s\n",lpszPath);
|
|
|
|
|
|
|
|
if(StrChrA(lpszPath,' '))
|
|
|
|
{
|
|
|
|
int len = strlen(lpszPath);
|
|
|
|
RtlMoveMemory(lpszPath+1, lpszPath, len);
|
|
|
|
*(lpszPath++) = '"';
|
|
|
|
lpszPath += len;
|
|
|
|
*(lpszPath++) = '"';
|
|
|
|
*(lpszPath) = '\0';
|
|
|
|
return --lpszPath;
|
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return 0;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathQuoteSpacesW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
2000-06-13 03:45:52 +00:00
|
|
|
LPWSTR WINAPI PathQuoteSpacesW(LPWSTR lpszPath)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
2000-06-13 03:45:52 +00:00
|
|
|
TRACE("%s\n",debugstr_w(lpszPath));
|
|
|
|
|
|
|
|
if(StrChrW(lpszPath,' '))
|
|
|
|
{
|
|
|
|
int len = lstrlenW(lpszPath);
|
|
|
|
RtlMoveMemory(lpszPath+1, lpszPath, len*sizeof(WCHAR));
|
|
|
|
*(lpszPath++) = '"';
|
|
|
|
lpszPath += len;
|
|
|
|
*(lpszPath++) = '"';
|
|
|
|
*(lpszPath) = '\0';
|
|
|
|
return --lpszPath;
|
|
|
|
}
|
|
|
|
return 0;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathQuoteSpacesAW [SHELL32.55]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
2000-06-13 03:45:52 +00:00
|
|
|
LPVOID WINAPI PathQuoteSpacesAW (LPVOID lpszPath)
|
1998-11-25 16:47:05 +00:00
|
|
|
{
|
|
|
|
if(VERSION_OsIsUnicode())
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return PathQuoteSpacesW(lpszPath);
|
|
|
|
return PathQuoteSpacesA(lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathUnquoteSpacesA [SHLWAPI.@]
|
1998-11-25 16:47:05 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* unquote string (remove ")
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
VOID WINAPI PathUnquoteSpacesA(LPSTR str)
|
|
|
|
{
|
|
|
|
DWORD len = lstrlenA(str);
|
|
|
|
|
|
|
|
TRACE("%s\n",str);
|
|
|
|
|
|
|
|
if (*str!='"')
|
|
|
|
return;
|
|
|
|
if (str[len-1]!='"')
|
|
|
|
return;
|
|
|
|
str[len-1]='\0';
|
|
|
|
lstrcpyA(str,str+1);
|
|
|
|
return;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathUnquoteSpacesW [SHLWAPI.@]
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
VOID WINAPI PathUnquoteSpacesW(LPWSTR str)
|
|
|
|
{
|
2000-06-13 01:10:29 +00:00
|
|
|
DWORD len = strlenW(str);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
TRACE("%s\n",debugstr_w(str));
|
|
|
|
|
|
|
|
if (*str!='"')
|
|
|
|
return;
|
|
|
|
if (str[len-1]!='"')
|
|
|
|
return;
|
|
|
|
str[len-1]='\0';
|
2000-06-13 01:10:29 +00:00
|
|
|
strcpyW(str,str+1);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathUnquoteSpacesAW [SHELL32.56]
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
VOID WINAPI PathUnquoteSpacesAW(LPVOID str)
|
|
|
|
{
|
|
|
|
if(VERSION_OsIsUnicode())
|
|
|
|
PathUnquoteSpacesW(str);
|
1998-12-11 11:06:50 +00:00
|
|
|
else
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
PathUnquoteSpacesA(str);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathParseIconLocationA [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
int WINAPI PathParseIconLocationA(LPSTR lpszPath)
|
|
|
|
{
|
|
|
|
LPSTR lpstrComma = strchr(lpszPath, ',');
|
1998-11-25 16:47:05 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
FIXME("%s stub\n", debugstr_a(lpszPath));
|
|
|
|
|
|
|
|
if (lpstrComma && lpstrComma[1])
|
|
|
|
{
|
|
|
|
lpstrComma[0]='\0';
|
|
|
|
/* return atoi(&lpstrComma[1]); FIXME */
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-06-13 03:45:52 +00:00
|
|
|
|
|
|
|
PathUnquoteSpacesA(lpszPath);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathParseIconLocationW [SHLWAPI.@]
|
|
|
|
*/
|
|
|
|
int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
|
|
|
|
{
|
2000-06-13 01:10:29 +00:00
|
|
|
LPWSTR lpstrComma = strchrW(lpszPath, ',');
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
FIXME("%s stub\n", debugstr_w(lpszPath));
|
1998-11-25 16:47:05 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
if (lpstrComma && lpstrComma[1])
|
|
|
|
{
|
|
|
|
lpstrComma[0]='\0';
|
|
|
|
/* return _wtoi(&lpstrComma[1]); FIXME */
|
1998-12-11 11:06:50 +00:00
|
|
|
}
|
2000-06-13 03:45:52 +00:00
|
|
|
PathUnquoteSpacesW(lpszPath);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return 0;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathParseIconLocationAW [SHELL32.249]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
int WINAPI PathParseIconLocationAW (LPVOID lpszPath)
|
|
|
|
{
|
|
|
|
if(VERSION_OsIsUnicode())
|
|
|
|
return PathParseIconLocationW(lpszPath);
|
|
|
|
return PathParseIconLocationA(lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/*
|
2000-06-24 12:56:08 +00:00
|
|
|
########## Path Testing ##########
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
*/
|
1998-11-25 16:47:05 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsUNCA [SHLWAPI.@]
|
1998-11-25 16:47:05 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* PathIsUNC(char*path);
|
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsUNCA(LPCSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("%s\n",lpszPath);
|
1998-12-01 08:55:13 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\'));
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsUNCW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("%s\n",debugstr_w(lpszPath));
|
1998-12-01 08:55:13 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return (lpszPath && (lpszPath[0]=='\\') && (lpszPath[1]=='\\'));
|
1998-12-01 08:55:13 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsUNCAW [SHELL32.39]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsUNCAW (LPCVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathIsUNCW( lpszPath );
|
|
|
|
return PathIsUNCA( lpszPath );
|
1998-12-01 08:55:13 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
1998-12-01 08:55:13 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsRelativeA [SHLWAPI.@]
|
1998-12-01 08:55:13 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsRelativeA (LPCSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("lpszPath=%s\n",lpszPath);
|
1998-12-01 08:55:13 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return (lpszPath && (lpszPath[0]!='\\' && lpszPath[1]!=':'));
|
1998-12-01 08:55:13 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsRelativeW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsRelativeW (LPCWSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("lpszPath=%s\n",debugstr_w(lpszPath));
|
1998-12-01 08:55:13 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return (lpszPath && (lpszPath[0]!='\\' && lpszPath[1]!=':'));
|
1998-12-01 08:55:13 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsRelativeAW [SHELL32.40]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsRelativeAW (LPCVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathIsRelativeW( lpszPath );
|
|
|
|
return PathIsRelativeA( lpszPath );
|
1998-12-01 08:55:13 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
1998-11-25 16:47:05 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsRootA [SHLWAPI.@]
|
|
|
|
*
|
|
|
|
* notes
|
|
|
|
* TRUE if the path points to a root directory
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsRootA(LPCSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("%s\n",lpszPath);
|
|
|
|
|
|
|
|
/* X:\ */
|
|
|
|
if (lpszPath[1]==':' && lpszPath[2]=='\\' && lpszPath[3]=='\0')
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* "\" */
|
|
|
|
if (lpszPath[0]=='\\' && lpszPath[1]=='\0')
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* UNC "\\<computer>\<share>" */
|
|
|
|
if (lpszPath[0]=='\\' && lpszPath[1]=='\\')
|
|
|
|
{
|
|
|
|
int foundbackslash = 0;
|
|
|
|
lpszPath += 2;
|
|
|
|
while (*lpszPath)
|
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
if (*lpszPath=='\\') foundbackslash++;
|
|
|
|
lpszPath = CharNextA(lpszPath);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
2000-06-13 03:45:52 +00:00
|
|
|
if (foundbackslash <= 1)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
1999-01-03 12:35:52 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsRootW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsRootW(LPCWSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("%s\n",debugstr_w(lpszPath));
|
|
|
|
|
|
|
|
/* X:\ */
|
|
|
|
if (lpszPath[1]==':' && lpszPath[2]=='\\' && lpszPath[3]=='\0')
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* "\" */
|
|
|
|
if (lpszPath[0]=='\\' && lpszPath[1]=='\0')
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* UNC "\\<computer>\<share>" */
|
|
|
|
if (lpszPath[0]=='\\' && lpszPath[1]=='\\')
|
|
|
|
{
|
|
|
|
int foundbackslash = 0;
|
|
|
|
lpszPath += 2;
|
|
|
|
while (*lpszPath)
|
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
if (*lpszPath=='\\') foundbackslash++;
|
|
|
|
lpszPath = CharNextW(lpszPath);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
2000-06-13 03:45:52 +00:00
|
|
|
if (foundbackslash <= 1)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
1999-01-03 12:35:52 +00:00
|
|
|
return FALSE;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
1999-01-03 12:35:52 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsRootAW [SHELL32.29]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsRootAW(LPCVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathIsRootW(lpszPath);
|
|
|
|
return PathIsRootA(lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsExeA [internal]
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsExeA (LPCSTR lpszPath)
|
|
|
|
{
|
|
|
|
LPCSTR lpszExtension = PathGetExtensionA(lpszPath);
|
|
|
|
int i = 0;
|
|
|
|
static char * lpszExtensions[6] = {"exe", "com", "pid", "cmd", "bat", NULL };
|
|
|
|
|
|
|
|
TRACE("path=%s\n",lpszPath);
|
|
|
|
|
|
|
|
for(i=0; lpszExtensions[i]; i++)
|
|
|
|
if (!strcasecmp(lpszExtension,lpszExtensions[i])) return TRUE;
|
|
|
|
|
|
|
|
return FALSE;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
1999-09-10 13:57:13 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsExeW [internal]
|
1999-09-10 13:57:13 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsExeW (LPCWSTR lpszPath)
|
1999-09-10 13:57:13 +00:00
|
|
|
{
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPCWSTR lpszExtension = PathGetExtensionW(lpszPath);
|
|
|
|
int i = 0;
|
|
|
|
static WCHAR lpszExtensions[6][4] =
|
|
|
|
{{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','d','\0'},
|
|
|
|
{'c','m','d','\0'}, {'b','a','t','\0'}, {'\0'} };
|
|
|
|
|
|
|
|
TRACE("path=%s\n",debugstr_w(lpszPath));
|
|
|
|
|
|
|
|
for(i=0; lpszExtensions[i]; i++)
|
2000-06-13 01:10:29 +00:00
|
|
|
if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
return FALSE;
|
1999-09-10 13:57:13 +00:00
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsExeAW [SHELL32.43]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsExeAW (LPCVOID path)
|
1999-09-10 13:57:13 +00:00
|
|
|
{
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathIsExeW (path);
|
|
|
|
return PathIsExeA(path);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsDirectoryA [SHLWAPI.@]
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsDirectoryA(LPCSTR lpszPath)
|
1999-09-10 13:57:13 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
DWORD dwAttr;
|
1998-11-25 16:47:05 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
TRACE("%s\n", debugstr_a(lpszPath));
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
dwAttr = GetFileAttributesA(lpszPath);
|
|
|
|
return (dwAttr != -1) ? dwAttr & FILE_ATTRIBUTE_DIRECTORY : 0;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsDirectoryW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
|
1999-09-10 13:57:13 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
DWORD dwAttr;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
TRACE("%s\n", debugstr_w(lpszPath));
|
1998-11-25 16:47:05 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
dwAttr = GetFileAttributesW(lpszPath);
|
|
|
|
return (dwAttr != -1) ? dwAttr & FILE_ATTRIBUTE_DIRECTORY : 0;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsDirectoryAW [SHELL32.159]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsDirectoryAW (LPCVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathIsDirectoryW (lpszPath);
|
|
|
|
return PathIsDirectoryA (lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathFileExistsA [SHLWAPI.@]
|
|
|
|
*
|
2000-03-24 20:46:04 +00:00
|
|
|
* NOTES
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* file_exists(char *fn);
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathFileExistsA(LPCSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("%s\n",lpszPath);
|
|
|
|
return (GetFileAttributesA(lpszPath)!=-1);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
1999-01-31 10:00:26 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathFileExistsW [SHLWAPI.@]
|
1999-01-31 10:00:26 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
|
|
|
|
{
|
|
|
|
TRACE("%s\n",debugstr_w(lpszPath));
|
|
|
|
return (GetFileAttributesW(lpszPath)!=-1);
|
1999-01-31 10:00:26 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathFileExistsAW [SHELL32.45]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathFileExistsW (lpszPath);
|
|
|
|
return PathFileExistsA (lpszPath);
|
1999-01-31 10:00:26 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathMatchSingleMaskA [internal]
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* internal (used by PathMatchSpec)
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
static BOOL PathMatchSingleMaskA(LPCSTR name, LPCSTR mask)
|
|
|
|
{
|
|
|
|
while (*name && *mask && *mask!=';')
|
|
|
|
{
|
|
|
|
if (*mask=='*')
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if (PathMatchSingleMaskA(name,mask+1)) return 1; /* try substrings */
|
|
|
|
} while (*name++);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (toupper(*mask)!=toupper(*name) && *mask!='?') return 0;
|
2000-06-24 12:56:08 +00:00
|
|
|
name = CharNextA(name);
|
|
|
|
mask = CharNextA(mask);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
if (!*name)
|
|
|
|
{
|
|
|
|
while (*mask=='*') mask++;
|
|
|
|
if (!*mask || *mask==';') return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
1999-01-31 10:00:26 +00:00
|
|
|
}
|
|
|
|
|
1998-11-25 16:47:05 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathMatchSingleMaskW [internal]
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask)
|
|
|
|
{
|
|
|
|
while (*name && *mask && *mask!=';')
|
|
|
|
{
|
|
|
|
if (*mask=='*')
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if (PathMatchSingleMaskW(name,mask+1)) return 1; /* try substrings */
|
|
|
|
} while (*name++);
|
|
|
|
return 0;
|
|
|
|
}
|
2000-06-13 01:10:29 +00:00
|
|
|
if (toupperW(*mask)!=toupperW(*name) && *mask!='?') return 0;
|
2000-06-24 12:56:08 +00:00
|
|
|
name = CharNextW(name);
|
|
|
|
mask = CharNextW(mask);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
if (!*name)
|
|
|
|
{
|
|
|
|
while (*mask=='*') mask++;
|
|
|
|
if (!*mask || *mask==';') return 1;
|
|
|
|
}
|
1998-11-25 16:47:05 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathMatchSpecA [SHLWAPI.@]
|
|
|
|
*
|
1998-11-25 16:47:05 +00:00
|
|
|
* NOTES
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* used from COMDLG32
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathMatchSpecA(LPCSTR name, LPCSTR mask)
|
|
|
|
{
|
|
|
|
TRACE("%s %s\n",name,mask);
|
1999-01-03 12:35:52 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
if (!lstrcmpA( mask, "*.*" )) return 1; /* we don't require a period */
|
1999-01-03 12:35:52 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
while (*mask)
|
|
|
|
{
|
|
|
|
if (PathMatchSingleMaskA(name,mask)) return 1; /* helper function */
|
2000-06-24 12:56:08 +00:00
|
|
|
while (*mask && *mask!=';') mask = CharNextA(mask);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
if (*mask==';')
|
|
|
|
{
|
|
|
|
mask++;
|
|
|
|
while (*mask==' ') mask++; /* masks may be separated by "; " */
|
|
|
|
}
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return 0;
|
1999-01-03 12:35:52 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathMatchSpecW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathMatchSpecW(LPCWSTR name, LPCWSTR mask)
|
|
|
|
{
|
|
|
|
WCHAR stemp[4];
|
|
|
|
TRACE("%s %s\n",debugstr_w(name),debugstr_w(mask));
|
1999-01-03 12:35:52 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
lstrcpyAtoW(stemp,"*.*");
|
|
|
|
if (!lstrcmpW( mask, stemp )) return 1; /* we don't require a period */
|
1999-01-03 12:35:52 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
while (*mask)
|
|
|
|
{
|
|
|
|
if (PathMatchSingleMaskW(name,mask)) return 1; /* helper function */
|
2000-06-24 12:56:08 +00:00
|
|
|
while (*mask && *mask!=';') mask = CharNextW(mask);
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
if (*mask==';')
|
|
|
|
{
|
|
|
|
mask++;
|
|
|
|
while (*mask==' ') mask++; /* masks may be separated by "; " */
|
|
|
|
}
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return 0;
|
1999-01-03 12:35:52 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathMatchSpecAW [SHELL32.46]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathMatchSpecW( name, mask );
|
|
|
|
return PathMatchSpecA( name, mask );
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
1998-11-25 16:47:05 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsSameRootA [SHLWAPI.@]
|
|
|
|
*
|
|
|
|
* FIXME
|
|
|
|
* what to do with "\path" ??
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsSameRootA(LPCSTR lpszPath1, LPCSTR lpszPath2)
|
|
|
|
{
|
|
|
|
TRACE("%s %s\n", lpszPath1, lpszPath2);
|
|
|
|
|
|
|
|
if (PathIsRelativeA(lpszPath1) || PathIsRelativeA(lpszPath2)) return FALSE;
|
|
|
|
|
|
|
|
/* usual path */
|
|
|
|
if ( toupper(lpszPath1[0])==toupper(lpszPath2[0]) &&
|
|
|
|
lpszPath1[1]==':' && lpszPath2[1]==':' &&
|
|
|
|
lpszPath1[2]=='\\' && lpszPath2[2]=='\\')
|
|
|
|
return TRUE;
|
1998-11-25 16:47:05 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/* UNC */
|
|
|
|
if (lpszPath1[0]=='\\' && lpszPath2[0]=='\\' &&
|
|
|
|
lpszPath1[1]=='\\' && lpszPath2[1]=='\\')
|
|
|
|
{
|
|
|
|
int pos=2, bsfound=0;
|
|
|
|
while (lpszPath1[pos] && lpszPath2[pos] &&
|
|
|
|
(lpszPath1[pos] == lpszPath2[pos]))
|
|
|
|
{
|
|
|
|
if (lpszPath1[pos]=='\\') bsfound++;
|
|
|
|
if (bsfound == 2) return TRUE;
|
2000-06-24 12:56:08 +00:00
|
|
|
pos++; /* fixme: use CharNext*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
return (lpszPath1[pos] == lpszPath2[pos]);
|
|
|
|
}
|
|
|
|
return FALSE;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsSameRootW [SHLWAPI.@]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsSameRootW(LPCWSTR lpszPath1, LPCWSTR lpszPath2)
|
|
|
|
{
|
|
|
|
TRACE("%s %s\n", debugstr_w(lpszPath1), debugstr_w(lpszPath2));
|
|
|
|
|
|
|
|
if (PathIsRelativeW(lpszPath1) || PathIsRelativeW(lpszPath2)) return FALSE;
|
|
|
|
|
|
|
|
/* usual path */
|
2000-06-13 01:10:29 +00:00
|
|
|
if ( toupperW(lpszPath1[0])==toupperW(lpszPath2[0]) &&
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
lpszPath1[1]==':' && lpszPath2[1]==':' &&
|
|
|
|
lpszPath1[2]=='\\' && lpszPath2[2]=='\\')
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* UNC */
|
|
|
|
if (lpszPath1[0]=='\\' && lpszPath2[0]=='\\' &&
|
|
|
|
lpszPath1[1]=='\\' && lpszPath2[1]=='\\')
|
|
|
|
{
|
|
|
|
int pos=2, bsfound=0;
|
|
|
|
while (lpszPath1[pos] && lpszPath2[pos] &&
|
|
|
|
(lpszPath1[pos] == lpszPath2[pos]))
|
|
|
|
{
|
|
|
|
if (lpszPath1[pos]=='\\') bsfound++;
|
|
|
|
if (bsfound == 2) return TRUE;
|
2000-06-24 12:56:08 +00:00
|
|
|
pos++;/* fixme: use CharNext*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
return (lpszPath1[pos] == lpszPath2[pos]);
|
|
|
|
}
|
|
|
|
return FALSE;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsSameRootAW [SHELL32.650]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathIsSameRootW(lpszPath1, lpszPath2);
|
|
|
|
return PathIsSameRootA(lpszPath1, lpszPath2);
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsURLA
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsURLA(LPCSTR lpstrPath)
|
|
|
|
{
|
|
|
|
LPSTR lpstrRes;
|
|
|
|
int iSize, i=0;
|
|
|
|
static LPSTR SupportedProtocol[] =
|
|
|
|
{"http","https","ftp","gopher","file","mailto",NULL};
|
|
|
|
|
|
|
|
if(!lpstrPath) return FALSE;
|
|
|
|
|
|
|
|
/* get protocol */
|
|
|
|
lpstrRes = strchr(lpstrPath,':');
|
|
|
|
if(!lpstrRes) return FALSE;
|
|
|
|
iSize = lpstrRes - lpstrPath;
|
|
|
|
|
|
|
|
while(SupportedProtocol[i])
|
|
|
|
{
|
|
|
|
if (iSize == strlen(SupportedProtocol[i]))
|
2000-06-13 03:45:52 +00:00
|
|
|
if(!strncasecmp(lpstrPath, SupportedProtocol[i], iSize))
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return TRUE;
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathIsURLW
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
|
|
|
|
{
|
|
|
|
LPWSTR lpstrRes;
|
|
|
|
int iSize, i=0;
|
|
|
|
static WCHAR SupportedProtocol[7][7] =
|
|
|
|
{{'h','t','t','p','\0'},{'h','t','t','p','s','\0'},{'f','t','p','\0'},
|
|
|
|
{'g','o','p','h','e','r','\0'},{'f','i','l','e','\0'},
|
|
|
|
{'m','a','i','l','t','o','\0'},{0}};
|
1999-01-03 12:35:52 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
if(!lpstrPath) return FALSE;
|
1999-01-03 12:35:52 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/* get protocol */
|
2000-06-13 01:10:29 +00:00
|
|
|
lpstrRes = strchrW(lpstrPath,':');
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
if(!lpstrRes) return FALSE;
|
|
|
|
iSize = lpstrRes - lpstrPath;
|
|
|
|
|
|
|
|
while(SupportedProtocol[i])
|
|
|
|
{
|
2000-06-13 01:10:29 +00:00
|
|
|
if (iSize == strlenW(SupportedProtocol[i]))
|
2000-06-13 03:45:52 +00:00
|
|
|
if(!strncmpiW(lpstrPath, SupportedProtocol[i], iSize))
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return TRUE;
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* IsLFNDriveA [SHELL32.119]
|
2000-03-24 20:46:04 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* exported by ordinal Name
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath)
|
2000-01-04 00:33:56 +00:00
|
|
|
{
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
DWORD fnlen;
|
|
|
|
|
|
|
|
if (!GetVolumeInformationA(lpszPath,NULL,0,NULL,&fnlen,NULL,NULL,0))
|
|
|
|
return FALSE;
|
|
|
|
return fnlen>12;
|
1999-01-03 12:35:52 +00:00
|
|
|
}
|
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* PathIsContentTypeA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsContentTypeA(LPCSTR pszPath, LPCSTR pszContentType)
|
|
|
|
{
|
|
|
|
FIXME("%s %s\n", pszPath, pszContentType);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsContentTypeW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsContentTypeW(LPCWSTR pszPath, LPCWSTR pszContentType)
|
|
|
|
{
|
|
|
|
FIXME("%s %s\n", debugstr_w(pszPath), debugstr_w(pszContentType));
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsFileSpecA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsFileSpecA(LPCSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", pszPath);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsFileSpecW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsFileSpecW(LPCWSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", debugstr_w(pszPath));
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsPrefixA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsPrefixA(LPCSTR pszPrefix, LPCSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s %s\n", pszPrefix, pszPath);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsPrefixW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsPrefixW(LPCWSTR pszPrefix, LPCWSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s %s\n", debugstr_w(pszPrefix), debugstr_w(pszPath));
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsSystemFolderA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsSystemFolderA(LPCSTR pszPath, DWORD dwAttrb)
|
|
|
|
{
|
|
|
|
FIXME("%s 0x%08lx\n", pszPath, dwAttrb);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsSystemFolderW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsSystemFolderW(LPCWSTR pszPath, DWORD dwAttrb)
|
|
|
|
{
|
|
|
|
FIXME("%s 0x%08lx\n", debugstr_w(pszPath), dwAttrb);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsUNCServerA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsUNCServerA(
|
|
|
|
LPCSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", pszPath);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsUNCServerW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsUNCServerW(
|
|
|
|
LPCWSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", debugstr_w(pszPath));
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsUNCServerShareA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsUNCServerShareA(
|
|
|
|
LPCSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", pszPath);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathIsUNCServerShareW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathIsUNCServerShareW(
|
|
|
|
LPCWSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", debugstr_w(pszPath));
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/*
|
2000-06-24 12:56:08 +00:00
|
|
|
########## Creating Something Unique ##########
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
*/
|
1998-11-25 16:47:05 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathMakeUniqueNameA [internal]
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathMakeUniqueNameA(
|
|
|
|
LPSTR lpszBuffer,
|
|
|
|
DWORD dwBuffSize,
|
|
|
|
LPCSTR lpszShortName,
|
|
|
|
LPCSTR lpszLongName,
|
|
|
|
LPCSTR lpszPathName)
|
|
|
|
{
|
|
|
|
FIXME("%p %lu %s %s %s stub\n",
|
|
|
|
lpszBuffer, dwBuffSize, debugstr_a(lpszShortName),
|
|
|
|
debugstr_a(lpszLongName), debugstr_a(lpszPathName));
|
|
|
|
return TRUE;
|
1998-11-25 16:47:05 +00:00
|
|
|
}
|
|
|
|
|
2000-04-06 20:21:16 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathMakeUniqueNameW [internal]
|
2000-04-06 20:21:16 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathMakeUniqueNameW(
|
|
|
|
LPWSTR lpszBuffer,
|
|
|
|
DWORD dwBuffSize,
|
|
|
|
LPCWSTR lpszShortName,
|
|
|
|
LPCWSTR lpszLongName,
|
|
|
|
LPCWSTR lpszPathName)
|
|
|
|
{
|
|
|
|
FIXME("%p %lu %s %s %s stub\n",
|
|
|
|
lpszBuffer, dwBuffSize, debugstr_w(lpszShortName),
|
|
|
|
debugstr_w(lpszLongName), debugstr_w(lpszPathName));
|
|
|
|
return TRUE;
|
2000-04-06 20:21:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathMakeUniqueNameAW [SHELL32.47]
|
2000-04-06 20:21:16 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathMakeUniqueNameAW(
|
|
|
|
LPVOID lpszBuffer,
|
|
|
|
DWORD dwBuffSize,
|
|
|
|
LPCVOID lpszShortName,
|
|
|
|
LPCVOID lpszLongName,
|
|
|
|
LPCVOID lpszPathName)
|
2000-04-06 20:21:16 +00:00
|
|
|
{
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathMakeUniqueNameW(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName);
|
|
|
|
return PathMakeUniqueNameA(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName);
|
2000-04-06 20:21:16 +00:00
|
|
|
}
|
|
|
|
|
1998-11-25 16:47:05 +00:00
|
|
|
/*************************************************************************
|
2000-03-24 20:46:04 +00:00
|
|
|
* PathYetAnotherMakeUniqueNameA [SHELL32.75]
|
1998-11-25 16:47:05 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* exported by ordinal
|
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathYetAnotherMakeUniqueNameA(
|
|
|
|
LPSTR lpszBuffer,
|
|
|
|
LPCSTR lpszPathName,
|
|
|
|
LPCSTR lpszShortName,
|
|
|
|
LPCSTR lpszLongName)
|
|
|
|
{
|
|
|
|
FIXME("(%p,%p, %p ,%p):stub.\n",
|
|
|
|
lpszBuffer, lpszPathName, lpszShortName, lpszLongName);
|
1998-11-25 16:47:05 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/*
|
2000-06-24 12:56:08 +00:00
|
|
|
########## cleaning and resolving paths ##########
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
*/
|
2000-03-24 20:46:04 +00:00
|
|
|
|
1998-12-01 08:55:13 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathFindOnPathA [SHELL32.145]
|
1998-12-01 08:55:13 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
BOOL WINAPI PathFindOnPathA(LPSTR sFile, LPCSTR sOtherDirs)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
|
|
|
FIXME("%s %s\n",sFile, sOtherDirs);
|
1998-12-01 08:55:13 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathFindOnPathW [SHELL32]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
BOOL WINAPI PathFindOnPathW(LPWSTR sFile, LPCWSTR sOtherDirs)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
|
|
|
FIXME("%s %s\n",debugstr_w(sFile), debugstr_w(sOtherDirs));
|
1998-12-01 08:55:13 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathFindOnPathAW [SHELL32]
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
1999-02-26 11:11:13 +00:00
|
|
|
BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs)
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
1999-02-26 11:11:13 +00:00
|
|
|
return PathFindOnPathW(sFile, sOtherDirs);
|
|
|
|
return PathFindOnPathA(sFile, sOtherDirs);
|
1998-12-01 08:55:13 +00:00
|
|
|
}
|
|
|
|
|
1998-11-25 16:47:05 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathCleanupSpecA [SHELL32.171]
|
1999-08-15 14:31:36 +00:00
|
|
|
*/
|
|
|
|
DWORD WINAPI PathCleanupSpecA(LPSTR x, LPSTR y)
|
|
|
|
{
|
1999-12-26 00:40:37 +00:00
|
|
|
FIXME("(%p %s, %p %s) stub\n",x,debugstr_a(x),y,debugstr_a(y));
|
1999-08-15 14:31:36 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* PathCleanupSpecA [SHELL32]
|
|
|
|
*/
|
1999-08-15 14:31:36 +00:00
|
|
|
DWORD WINAPI PathCleanupSpecW(LPWSTR x, LPWSTR y)
|
|
|
|
{
|
1999-12-26 00:40:37 +00:00
|
|
|
FIXME("(%p %s, %p %s) stub\n",x,debugstr_w(x),y,debugstr_w(y));
|
1999-08-15 14:31:36 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* PathCleanupSpecAW [SHELL32]
|
|
|
|
*/
|
1999-08-15 14:31:36 +00:00
|
|
|
DWORD WINAPI PathCleanupSpecAW (LPVOID x, LPVOID y)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathCleanupSpecW(x,y);
|
|
|
|
return PathCleanupSpecA(x,y);
|
|
|
|
}
|
|
|
|
|
1998-11-25 16:47:05 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathQualifyA [SHELL32]
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathQualifyA(LPCSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n",pszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathQualifyW [SHELL32]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathQualifyW(LPCWSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n",debugstr_w(pszPath));
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathQualifyAW [SHELL32]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathQualifyAW(LPCVOID pszPath)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathQualifyW(pszPath);
|
|
|
|
return PathQualifyA(pszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathResolveA [SHELL32.51]
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathResolveA(
|
|
|
|
LPSTR lpszPath,
|
|
|
|
LPCSTR *alpszPaths,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
FIXME("(%s,%p,0x%08lx),stub!\n",
|
|
|
|
lpszPath, *alpszPaths, dwFlags);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathResolveW [SHELL32]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathResolveW(
|
|
|
|
LPWSTR lpszPath,
|
|
|
|
LPCWSTR *alpszPaths,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
FIXME("(%s,%p,0x%08lx),stub!\n",
|
|
|
|
debugstr_w(lpszPath), debugstr_w(*alpszPaths), dwFlags);
|
1998-11-25 16:47:05 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathResolveAW [SHELL32]
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathResolveAW(
|
|
|
|
LPVOID lpszPath,
|
|
|
|
LPCVOID *alpszPaths,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return PathResolveW(lpszPath, (LPCWSTR*)alpszPaths, dwFlags);
|
|
|
|
return PathResolveA(lpszPath, (LPCSTR*)alpszPaths, dwFlags);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathProcessCommandA [SHELL32.653]
|
1998-11-25 16:47:05 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
HRESULT WINAPI PathProcessCommandA (
|
|
|
|
LPCSTR lpszPath,
|
|
|
|
LPSTR lpszBuff,
|
|
|
|
DWORD dwBuffSize,
|
|
|
|
DWORD dwFlags)
|
1999-07-10 11:56:34 +00:00
|
|
|
{
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
FIXME("%s %p 0x%04lx 0x%04lx stub\n",
|
|
|
|
lpszPath, lpszBuff, dwBuffSize, dwFlags);
|
|
|
|
lstrcpyA(lpszBuff, lpszPath);
|
1999-07-10 11:56:34 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* PathProcessCommandW
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI PathProcessCommandW (
|
|
|
|
LPCWSTR lpszPath,
|
|
|
|
LPWSTR lpszBuff,
|
|
|
|
DWORD dwBuffSize,
|
|
|
|
DWORD dwFlags)
|
1999-07-10 11:56:34 +00:00
|
|
|
{
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
FIXME("(%s, %p, 0x%04lx, 0x%04lx) stub\n",
|
|
|
|
debugstr_w(lpszPath), lpszBuff, dwBuffSize, dwFlags);
|
|
|
|
lstrcpyW(lpszBuff, lpszPath);
|
1998-11-25 16:47:05 +00:00
|
|
|
return 0;
|
|
|
|
}
|
1999-01-17 16:55:11 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* PathProcessCommandAW
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI PathProcessCommandAW (
|
|
|
|
LPCVOID lpszPath,
|
|
|
|
LPVOID lpszBuff,
|
|
|
|
DWORD dwBuffSize,
|
|
|
|
DWORD dwFlags)
|
1999-07-10 11:56:34 +00:00
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
return PathProcessCommandW(lpszPath, lpszBuff, dwBuffSize, dwFlags);
|
|
|
|
return PathProcessCommandA(lpszPath, lpszBuff, dwBuffSize, dwFlags);
|
|
|
|
}
|
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* PathCompactPathExA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathCompactPathExA(
|
|
|
|
LPSTR pszOut,
|
|
|
|
LPCSTR pszSrc,
|
|
|
|
UINT cchMax,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
FIXME("%p %s 0x%08x 0x%08lx\n", pszOut, pszSrc, cchMax, dwFlags);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathCompactPathExW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathCompactPathExW(
|
|
|
|
LPWSTR pszOut,
|
|
|
|
LPCWSTR pszSrc,
|
|
|
|
UINT cchMax,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
FIXME("%p %s 0x%08x 0x%08lx\n", pszOut, debugstr_w(pszSrc), cchMax, dwFlags);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/*
|
2000-06-24 12:56:08 +00:00
|
|
|
########## special ##########
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathSetDlgItemPathA
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* use PathCompactPath to make sure, the path fits into the control
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathSetDlgItemPathA(HWND hDlg, int id, LPCSTR pszPath)
|
|
|
|
{ TRACE("%x %x %s\n",hDlg, id, pszPath);
|
|
|
|
return SetDlgItemTextA(hDlg, id, pszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathSetDlgItemPathW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathSetDlgItemPathW(HWND hDlg, int id, LPCWSTR pszPath)
|
|
|
|
{ TRACE("%x %x %s\n",hDlg, id, debugstr_w(pszPath));
|
|
|
|
return SetDlgItemTextW(hDlg, id, pszPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathSetDlgItemPathAW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath)
|
|
|
|
{ if (VERSION_OsIsUnicode())
|
|
|
|
return PathSetDlgItemPathW(hDlg, id, pszPath);
|
|
|
|
return PathSetDlgItemPathA(hDlg, id, pszPath);
|
1999-07-10 11:56:34 +00:00
|
|
|
}
|
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
1999-01-17 16:55:11 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* SHGetSpecialFolderPathA [SHELL32.175]
|
1999-01-17 16:55:11 +00:00
|
|
|
*
|
|
|
|
* converts csidl to path
|
|
|
|
*/
|
1999-07-25 12:23:15 +00:00
|
|
|
|
|
|
|
static char * szSHFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
static char * szSHUserFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders";
|
2000-07-15 21:32:26 +00:00
|
|
|
#if 0
|
2000-06-24 12:56:08 +00:00
|
|
|
static char * szEnvUserProfile = "%USERPROFILE%";
|
|
|
|
static char * szEnvSystemRoot = "%SYSTEMROOT%";
|
2000-07-15 21:32:26 +00:00
|
|
|
#endif
|
1999-07-25 12:23:15 +00:00
|
|
|
|
|
|
|
BOOL WINAPI SHGetSpecialFolderPathA (
|
|
|
|
HWND hwndOwner,
|
|
|
|
LPSTR szPath,
|
|
|
|
DWORD csidl,
|
|
|
|
BOOL bCreate)
|
|
|
|
{
|
|
|
|
CHAR szValueName[MAX_PATH], szDefaultPath[MAX_PATH];
|
|
|
|
HKEY hRootKey, hKey;
|
|
|
|
BOOL bRelative = TRUE;
|
|
|
|
DWORD dwType, dwDisp, dwPathLen = MAX_PATH;
|
|
|
|
|
|
|
|
TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate);
|
|
|
|
|
|
|
|
/* build default values */
|
|
|
|
switch(csidl)
|
|
|
|
{
|
|
|
|
case CSIDL_APPDATA:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy (szValueName, "AppData");
|
|
|
|
strcpy (szDefaultPath, "AppData");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_COOKIES:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy (szValueName, "Cookies");
|
|
|
|
strcpy(szDefaultPath, "Cookies");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_DESKTOPDIRECTORY:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "Desktop");
|
|
|
|
strcpy(szDefaultPath, "Desktop");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_COMMON_DESKTOPDIRECTORY:
|
|
|
|
hRootKey = HKEY_LOCAL_MACHINE;
|
|
|
|
strcpy(szValueName, "Common Desktop");
|
|
|
|
strcpy(szDefaultPath, "Desktop");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_FAVORITES:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "Favorites");
|
|
|
|
strcpy(szDefaultPath, "Favorites");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_FONTS:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "Fonts");
|
|
|
|
strcpy(szDefaultPath, "Fonts");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_HISTORY:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "History");
|
|
|
|
strcpy(szDefaultPath, "History");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_NETHOOD:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "NetHood");
|
|
|
|
strcpy(szDefaultPath, "NetHood");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_INTERNET_CACHE:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "Cache");
|
|
|
|
strcpy(szDefaultPath, "Temporary Internet Files");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_PERSONAL:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "Personal");
|
|
|
|
strcpy(szDefaultPath, "My Own Files");
|
|
|
|
bRelative = FALSE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_PRINTHOOD:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "PrintHood");
|
|
|
|
strcpy(szDefaultPath, "PrintHood");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_PROGRAMS:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "Programs");
|
2000-01-04 00:33:56 +00:00
|
|
|
strcpy(szDefaultPath, "StartMenu\\Programs");
|
1999-07-25 12:23:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_COMMON_PROGRAMS:
|
|
|
|
hRootKey = HKEY_LOCAL_MACHINE;
|
|
|
|
strcpy(szValueName, "Common Programs");
|
|
|
|
strcpy(szDefaultPath, "");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_RECENT:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "Recent");
|
|
|
|
strcpy(szDefaultPath, "Recent");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_SENDTO:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "SendTo");
|
|
|
|
strcpy(szDefaultPath, "SendTo");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_STARTMENU:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "StartMenu");
|
|
|
|
strcpy(szDefaultPath, "StartMenu");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_COMMON_STARTMENU:
|
|
|
|
hRootKey = HKEY_LOCAL_MACHINE;
|
|
|
|
strcpy(szValueName, "Common StartMenu");
|
|
|
|
strcpy(szDefaultPath, "StartMenu");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_STARTUP:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "Startup");
|
|
|
|
strcpy(szDefaultPath, "StartMenu\\Programs\\Startup");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_COMMON_STARTUP:
|
|
|
|
hRootKey = HKEY_LOCAL_MACHINE;
|
|
|
|
strcpy(szValueName, "Common Startup");
|
|
|
|
strcpy(szDefaultPath, "StartMenu\\Programs\\Startup");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CSIDL_TEMPLATES:
|
|
|
|
hRootKey = HKEY_CURRENT_USER;
|
|
|
|
strcpy(szValueName, "Templates");
|
|
|
|
strcpy(szDefaultPath, "ShellNew");
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
ERR("folder unknown or not allowed\n");
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/* user shell folders */
|
|
|
|
if (RegCreateKeyExA(hRootKey,szSHUserFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE;
|
1999-01-17 16:55:11 +00:00
|
|
|
|
1999-07-25 12:23:15 +00:00
|
|
|
if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen))
|
|
|
|
{
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
RegCloseKey(hKey);
|
|
|
|
|
|
|
|
/* shell folders */
|
|
|
|
if (RegCreateKeyExA(hRootKey,szSHFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE;
|
|
|
|
|
|
|
|
if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen))
|
1999-07-25 12:23:15 +00:00
|
|
|
{
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
/* value not existing */
|
|
|
|
if (bRelative)
|
|
|
|
{
|
|
|
|
GetWindowsDirectoryA(szPath, MAX_PATH);
|
|
|
|
PathAddBackslashA(szPath);
|
|
|
|
strcat(szPath, szDefaultPath);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
strcpy(szPath, "C:\\"); /* fixme ??? */
|
|
|
|
strcat(szPath, szDefaultPath);
|
|
|
|
}
|
|
|
|
RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1);
|
1999-07-25 12:23:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
RegCloseKey(hKey);
|
1999-01-17 16:55:11 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
/* expand paths like %USERPROFILE% */
|
|
|
|
if (dwType == REG_EXPAND_SZ)
|
|
|
|
{
|
|
|
|
ExpandEnvironmentStringsA(szPath, szDefaultPath, MAX_PATH);
|
|
|
|
strcpy(szPath, szDefaultPath);
|
|
|
|
}
|
|
|
|
|
2000-06-13 03:45:52 +00:00
|
|
|
/* if we don't care about existing directorys we are ready */
|
|
|
|
if(csidl & CSIDL_FLAG_DONT_VERIFY) return TRUE;
|
|
|
|
|
|
|
|
if (PathFileExistsA(szPath)) return TRUE;
|
|
|
|
|
|
|
|
/* not existing but we not allowed to create it */
|
|
|
|
if (!bCreate) return FALSE;
|
|
|
|
|
|
|
|
if (!CreateDirectoryA(szPath,NULL))
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
{
|
2000-06-13 03:45:52 +00:00
|
|
|
ERR("Failed to create directory '%s'.\n", szPath);
|
|
|
|
return FALSE;
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
}
|
|
|
|
|
2000-06-13 03:45:52 +00:00
|
|
|
MESSAGE("Created not existing system directory '%s'\n", szPath);
|
1999-01-17 16:55:11 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SHGetSpecialFolderPathW
|
|
|
|
*/
|
1999-07-25 12:23:15 +00:00
|
|
|
BOOL WINAPI SHGetSpecialFolderPathW (
|
|
|
|
HWND hwndOwner,
|
|
|
|
LPWSTR szPath,
|
|
|
|
DWORD csidl,
|
|
|
|
BOOL bCreate)
|
|
|
|
{
|
|
|
|
char szTemp[MAX_PATH];
|
|
|
|
|
|
|
|
if (SHGetSpecialFolderPathA(hwndOwner, szTemp, csidl, bCreate))
|
|
|
|
{
|
|
|
|
lstrcpynAtoW(szPath, szTemp, MAX_PATH);
|
|
|
|
}
|
1999-01-17 16:55:11 +00:00
|
|
|
|
1999-07-25 12:23:15 +00:00
|
|
|
TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate);
|
1999-01-17 16:55:11 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* SHGetSpecialFolderPathAW
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
1999-07-25 12:23:15 +00:00
|
|
|
BOOL WINAPI SHGetSpecialFolderPathAW (
|
|
|
|
HWND hwndOwner,
|
|
|
|
LPVOID szPath,
|
|
|
|
DWORD csidl,
|
|
|
|
BOOL bCreate)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (VERSION_OsIsUnicode())
|
|
|
|
return SHGetSpecialFolderPathW (hwndOwner, szPath, csidl, bCreate);
|
|
|
|
return SHGetSpecialFolderPathA (hwndOwner, szPath, csidl, bCreate);
|
1999-01-17 16:55:11 +00:00
|
|
|
}
|
1999-10-23 18:54:21 +00:00
|
|
|
|
2000-06-13 03:45:52 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* SHGetFolderPathA [SHFOLDER.@]
|
|
|
|
*/
|
2000-06-23 15:47:36 +00:00
|
|
|
HRESULT WINAPI SHGetFolderPathA(
|
2000-06-13 03:45:52 +00:00
|
|
|
HWND hwndOwner,
|
|
|
|
int nFolder,
|
|
|
|
HANDLE hToken, /* FIXME: get paths for specific user */
|
|
|
|
DWORD dwFlags, /* FIXME: SHGFP_TYPE_CURRENT|SHGFP_TYPE_DEFAULT */
|
|
|
|
LPSTR pszPath)
|
|
|
|
{
|
|
|
|
return (SHGetSpecialFolderPathA(
|
|
|
|
hwndOwner,
|
|
|
|
pszPath,
|
|
|
|
CSIDL_FOLDER_MASK & nFolder,
|
|
|
|
CSIDL_FLAG_CREATE & nFolder )) ? S_OK : E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SHGetFolderPathW [SHFOLDER.@]
|
|
|
|
*/
|
2000-06-23 15:47:36 +00:00
|
|
|
HRESULT WINAPI SHGetFolderPathW(
|
2000-06-13 03:45:52 +00:00
|
|
|
HWND hwndOwner,
|
|
|
|
int nFolder,
|
|
|
|
HANDLE hToken,
|
|
|
|
DWORD dwFlags,
|
|
|
|
LPWSTR pszPath)
|
|
|
|
{
|
|
|
|
return (SHGetSpecialFolderPathW(
|
|
|
|
hwndOwner,
|
|
|
|
pszPath,
|
|
|
|
CSIDL_FOLDER_MASK & nFolder,
|
|
|
|
CSIDL_FLAG_CREATE & nFolder )) ? S_OK : E_FAIL;
|
|
|
|
}
|
|
|
|
|
2000-03-24 20:46:04 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathCanonicalizeA
|
1999-10-23 18:54:21 +00:00
|
|
|
*
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* FIXME
|
2000-06-24 12:56:08 +00:00
|
|
|
* returnvalue, use CharNext
|
1999-10-23 18:54:21 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
|
|
|
BOOL WINAPI PathCanonicalizeA(LPSTR pszBuf, LPCSTR pszPath)
|
1999-10-23 18:54:21 +00:00
|
|
|
{
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
int OffsetMin = 0, OffsetSrc = 0, OffsetDst = 0, LenSrc = strlen(pszPath);
|
|
|
|
BOOL bModifyed = FALSE;
|
|
|
|
|
|
|
|
TRACE("%p %s\n", pszBuf, pszPath);
|
1999-10-23 18:54:21 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
pszBuf[OffsetDst]='\0';
|
1999-10-23 18:54:21 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/* keep the root of the path */
|
|
|
|
if( LenSrc && (pszPath[OffsetSrc]=='\\'))
|
|
|
|
{
|
|
|
|
pszBuf[OffsetDst++] = pszPath[OffsetSrc++]; OffsetMin++; LenSrc--;
|
|
|
|
}
|
|
|
|
else if ( (LenSrc >= 2) && (pszPath[OffsetSrc+1] == ':'))
|
|
|
|
{
|
|
|
|
pszBuf[OffsetDst++] = pszPath[OffsetSrc++]; OffsetMin++; LenSrc--;
|
|
|
|
pszBuf[OffsetDst++] = pszPath[OffsetSrc++]; OffsetMin++; LenSrc--;
|
|
|
|
if (LenSrc && (pszPath[OffsetSrc] == '\\'))
|
|
|
|
{
|
|
|
|
pszBuf[OffsetDst++] = pszPath[OffsetSrc++]; OffsetMin++; LenSrc--;
|
|
|
|
if (LenSrc == 1 && pszPath[OffsetSrc]=='.')
|
|
|
|
{
|
|
|
|
/* C:\. */
|
|
|
|
OffsetSrc++; LenSrc--; bModifyed = TRUE;
|
|
|
|
}
|
|
|
|
else if (LenSrc == 2 && pszPath[OffsetSrc]=='.' && pszPath[OffsetSrc+1]=='.')
|
|
|
|
{
|
|
|
|
/* C:\.. */
|
|
|
|
OffsetSrc+=2; LenSrc-=2; bModifyed = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2000-01-04 00:33:56 +00:00
|
|
|
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
/* ".\" at the beginning of the path */
|
|
|
|
if (LenSrc >= 2 && pszPath[OffsetSrc]=='.' && pszPath[OffsetSrc+1]=='\\')
|
|
|
|
{
|
|
|
|
OffsetSrc+=2; LenSrc-=2; bModifyed = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
while ( LenSrc )
|
|
|
|
{
|
|
|
|
if((LenSrc>=3) && (pszPath[OffsetSrc]=='\\') && (pszPath[OffsetSrc+1]=='.') && (pszPath[OffsetSrc+2]=='.'))
|
|
|
|
{
|
|
|
|
/* "\.." found, go one deeper */
|
|
|
|
while((OffsetDst > OffsetMin) && (pszBuf[OffsetDst]!='\\')) OffsetDst--;
|
|
|
|
OffsetSrc += 3; LenSrc -= 3; bModifyed = TRUE;
|
|
|
|
if(OffsetDst == OffsetMin && pszPath[OffsetSrc]=='\\') OffsetSrc++;
|
|
|
|
pszBuf[OffsetDst] = '\0'; /* important for \..\.. */
|
|
|
|
}
|
|
|
|
else if(LenSrc>=2 && pszPath[OffsetSrc]=='\\' && pszPath[OffsetSrc+1]=='.' )
|
|
|
|
{
|
|
|
|
/* "\." found, skip it */
|
|
|
|
OffsetSrc += 2; LenSrc-=2; bModifyed = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pszBuf[OffsetDst++] = pszPath[OffsetSrc++]; LenSrc--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pszBuf[OffsetDst] = '\0';
|
|
|
|
TRACE("-- %s %u\n", pszBuf, bModifyed);
|
|
|
|
return bModifyed;
|
1999-10-23 18:54:21 +00:00
|
|
|
}
|
|
|
|
|
2000-02-20 18:43:44 +00:00
|
|
|
|
2000-02-26 18:46:03 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathCanonicalizeW
|
2000-02-26 18:46:03 +00:00
|
|
|
*
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* FIXME
|
2000-06-24 12:56:08 +00:00
|
|
|
* returnvalue, use CharNext
|
2000-02-26 18:46:03 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
BOOL WINAPI PathCanonicalizeW(LPWSTR pszBuf, LPCWSTR pszPath)
|
1999-10-23 18:54:21 +00:00
|
|
|
{
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
int OffsetMin = 0, OffsetSrc = 0, OffsetDst = 0, LenSrc = lstrlenW(pszPath);
|
|
|
|
BOOL bModifyed = FALSE;
|
|
|
|
|
|
|
|
TRACE("%p %s\n", pszBuf, debugstr_w(pszPath));
|
|
|
|
|
|
|
|
pszBuf[OffsetDst]='\0';
|
|
|
|
|
|
|
|
/* keep the root of the path */
|
|
|
|
if( LenSrc && (pszPath[OffsetSrc]=='\\'))
|
|
|
|
{
|
|
|
|
pszBuf[OffsetDst++] = pszPath[OffsetSrc++]; OffsetMin++; LenSrc--;
|
|
|
|
}
|
|
|
|
else if ( (LenSrc >= 2) && (pszPath[OffsetSrc+1] == ':'))
|
|
|
|
{
|
|
|
|
pszBuf[OffsetDst++] = pszPath[OffsetSrc++]; OffsetMin++; LenSrc--;
|
|
|
|
pszBuf[OffsetDst++] = pszPath[OffsetSrc++]; OffsetMin++; LenSrc--;
|
|
|
|
if (LenSrc && (pszPath[OffsetSrc] == '\\'))
|
|
|
|
{
|
|
|
|
pszBuf[OffsetDst++] = pszPath[OffsetSrc++]; OffsetMin++; LenSrc--;
|
|
|
|
if (LenSrc == 1 && pszPath[OffsetSrc]=='.')
|
|
|
|
{
|
|
|
|
/* C:\. */
|
|
|
|
OffsetSrc++; LenSrc--; bModifyed = TRUE;
|
|
|
|
}
|
|
|
|
else if (LenSrc == 2 && pszPath[OffsetSrc]=='.' && pszPath[OffsetSrc+1]=='.')
|
|
|
|
{
|
|
|
|
/* C:\.. */
|
|
|
|
OffsetSrc+=2; LenSrc-=2; bModifyed = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ".\" at the beginning of the path */
|
|
|
|
if (LenSrc >= 2 && pszPath[OffsetSrc]=='.' && pszPath[OffsetSrc+1]=='\\')
|
|
|
|
{
|
|
|
|
OffsetSrc+=2; LenSrc-=2; bModifyed = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
while ( LenSrc )
|
|
|
|
{
|
|
|
|
if((LenSrc>=3) && (pszPath[OffsetSrc]=='\\') && (pszPath[OffsetSrc+1]=='.') && (pszPath[OffsetSrc+2]=='.'))
|
|
|
|
{
|
|
|
|
/* "\.." found, go one deeper */
|
|
|
|
while((OffsetDst > OffsetMin) && (pszBuf[OffsetDst]!='\\')) OffsetDst--;
|
|
|
|
OffsetSrc += 3; LenSrc -= 3; bModifyed = TRUE;
|
|
|
|
if(OffsetDst == OffsetMin && pszPath[OffsetSrc]=='\\') OffsetSrc++;
|
|
|
|
pszBuf[OffsetDst] = '\0'; /* important for \..\.. */
|
|
|
|
}
|
|
|
|
else if(LenSrc>=2 && pszPath[OffsetSrc]=='\\' && pszPath[OffsetSrc+1]=='.' )
|
|
|
|
{
|
|
|
|
/* "\." found, skip it */
|
|
|
|
OffsetSrc += 2; LenSrc-=2; bModifyed = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pszBuf[OffsetDst++] = pszPath[OffsetSrc++]; LenSrc--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pszBuf[OffsetDst] = '\0';
|
|
|
|
TRACE("-- %s %u\n", debugstr_w(pszBuf), bModifyed);
|
|
|
|
return bModifyed;
|
1999-10-23 18:54:21 +00:00
|
|
|
}
|
2000-03-24 20:46:04 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathFindNextComponentA
|
2000-06-07 03:14:40 +00:00
|
|
|
*
|
2000-06-13 03:45:52 +00:00
|
|
|
* NOTES
|
|
|
|
* special cases:
|
|
|
|
* "" null
|
|
|
|
* aa "" (pointer to traling NULL)
|
|
|
|
* aa\ "" (pointer to traling NULL)
|
|
|
|
* aa\\ "" (pointer to traling NULL)
|
|
|
|
* aa\\bb bb
|
|
|
|
* aa\\\bb \bb
|
|
|
|
* c:\aa\ "aa\"
|
|
|
|
* \\aa aa
|
|
|
|
* \\aa\b aa\b
|
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPSTR WINAPI PathFindNextComponentA(LPCSTR pszPath)
|
1999-10-23 18:54:21 +00:00
|
|
|
{
|
2000-06-13 03:45:52 +00:00
|
|
|
LPSTR pos;
|
|
|
|
|
|
|
|
TRACE("%s\n", pszPath);
|
|
|
|
|
|
|
|
if(!pszPath || !*pszPath) return NULL;
|
|
|
|
if(!(pos = StrChrA(pszPath, '\\')))
|
|
|
|
return (LPSTR) pszPath + strlen(pszPath);
|
|
|
|
pos++;
|
|
|
|
if(pos[0] == '\\') pos++;
|
|
|
|
return pos;
|
1999-10-23 18:54:21 +00:00
|
|
|
}
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
|
2000-03-24 20:46:04 +00:00
|
|
|
/*************************************************************************
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
* PathFindNextComponentW
|
2000-03-24 20:46:04 +00:00
|
|
|
*/
|
Complete cleanup, bugfixes.
New: PathStripPath, PathMakeUniqueName, PathStripToRoot,
PathGetShortPath, PathParseIconLocation, PathRemoveExtension,
PathRemoveArgs, PathAppend, PathBuildRoot, PathCanonicalize,
PathFindNextComponent, PathRemoveFileSpec.
2000-04-28 20:23:46 +00:00
|
|
|
LPWSTR WINAPI PathFindNextComponentW(LPCWSTR pszPath)
|
1999-10-23 18:54:21 +00:00
|
|
|
{
|
2000-06-13 03:45:52 +00:00
|
|
|
LPWSTR pos;
|
|
|
|
|
|
|
|
TRACE("%s\n", debugstr_w(pszPath));
|
|
|
|
|
|
|
|
if(!pszPath || !*pszPath) return NULL;
|
|
|
|
if (!(pos = StrChrW(pszPath, '\\')))
|
|
|
|
return (LPWSTR) pszPath + lstrlenW(pszPath);
|
|
|
|
pos++;
|
|
|
|
if(pos[0] == '\\') pos++;
|
|
|
|
return pos;
|
1999-10-23 18:54:21 +00:00
|
|
|
}
|
2000-06-01 23:25:44 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathAddExtensionA
|
2000-06-24 12:56:08 +00:00
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* it adds never a dot
|
2000-06-01 23:25:44 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
BOOL WINAPI PathAddExtensionA(
|
|
|
|
LPSTR pszPath,
|
|
|
|
LPCSTR pszExtension)
|
|
|
|
{
|
|
|
|
if (*pszPath)
|
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
if (*(PathFindExtensionA(pszPath))) return FALSE;
|
|
|
|
|
|
|
|
if (!pszExtension || *pszExtension=='\0')
|
|
|
|
strcat(pszPath, "exe");
|
|
|
|
else
|
|
|
|
strcat(pszPath, pszExtension);
|
2000-06-01 23:25:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathAddExtensionW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathAddExtensionW(
|
|
|
|
LPWSTR pszPath,
|
|
|
|
LPCWSTR pszExtension)
|
|
|
|
{
|
|
|
|
static const WCHAR ext[] = { 'e','x','e',0 };
|
|
|
|
|
|
|
|
if (*pszPath)
|
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
if (*(PathFindExtensionW(pszPath))) return FALSE;
|
|
|
|
|
|
|
|
if (!pszExtension || *pszExtension=='\0')
|
|
|
|
lstrcatW(pszPath, ext);
|
|
|
|
else
|
|
|
|
lstrcatW(pszPath, pszExtension);
|
2000-06-01 23:25:44 +00:00
|
|
|
}
|
2000-06-24 12:56:08 +00:00
|
|
|
return TRUE;
|
2000-06-01 23:25:44 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathMakePrettyA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathMakePrettyA(
|
|
|
|
LPSTR lpPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", lpPath);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathMakePrettyW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathMakePrettyW(
|
|
|
|
LPWSTR lpPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", debugstr_w(lpPath));
|
2000-06-01 23:25:44 +00:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-06-24 12:56:08 +00:00
|
|
|
* PathCommonPrefixA
|
2000-06-01 23:25:44 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
int WINAPI PathCommonPrefixA(
|
|
|
|
LPCSTR pszFile1,
|
|
|
|
LPCSTR pszFile2,
|
|
|
|
LPSTR achPath)
|
2000-06-01 23:25:44 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
FIXME("%s %s %p\n", pszFile1, pszFile2, achPath);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathCommonPrefixW
|
|
|
|
*/
|
|
|
|
int WINAPI PathCommonPrefixW(
|
|
|
|
LPCWSTR pszFile1,
|
|
|
|
LPCWSTR pszFile2,
|
|
|
|
LPWSTR achPath)
|
|
|
|
{
|
|
|
|
FIXME("%s %s %p\n", debugstr_w(pszFile1), debugstr_w(pszFile2),achPath );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathCompactPathA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathCompactPathA(HDC hDC, LPSTR pszPath, UINT dx)
|
|
|
|
{
|
|
|
|
FIXME("0x%08x %s 0x%08x\n", hDC, pszPath, dx);
|
2000-06-01 23:25:44 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-06-24 12:56:08 +00:00
|
|
|
* PathCompactPathW
|
2000-06-01 23:25:44 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR pszPath, UINT dx)
|
2000-06-01 23:25:44 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
FIXME("0x%08x %s 0x%08x\n", hDC, debugstr_w(pszPath), dx);
|
2000-06-01 23:25:44 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-06-24 12:56:08 +00:00
|
|
|
* PathGetCharTypeA
|
2000-06-01 23:25:44 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
UINT WINAPI PathGetCharTypeA(UCHAR ch)
|
|
|
|
{
|
|
|
|
FIXME("%c\n", ch);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathGetCharTypeW
|
|
|
|
*/
|
|
|
|
UINT WINAPI PathGetCharTypeW(WCHAR ch)
|
|
|
|
{
|
|
|
|
FIXME("%c\n", ch);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-07-15 21:32:26 +00:00
|
|
|
* PathMakeSystemFolderA
|
2000-06-24 12:56:08 +00:00
|
|
|
*/
|
|
|
|
BOOL WINAPI PathMakeSystemFolderA(LPCSTR pszPath)
|
2000-06-01 23:25:44 +00:00
|
|
|
{
|
|
|
|
FIXME("%s\n", pszPath);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-06-24 12:56:08 +00:00
|
|
|
* PathMakeSystemFolderW
|
2000-06-01 23:25:44 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
BOOL WINAPI PathMakeSystemFolderW(LPCWSTR pszPath)
|
2000-06-01 23:25:44 +00:00
|
|
|
{
|
|
|
|
FIXME("%s\n", debugstr_w(pszPath));
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-06-24 12:56:08 +00:00
|
|
|
* PathRenameExtensionA
|
2000-06-01 23:25:44 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
BOOL WINAPI PathRenameExtensionA(LPSTR pszPath, LPCSTR pszExt)
|
2000-06-01 23:25:44 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
FIXME("%s %s\n", pszPath, pszExt);
|
|
|
|
return FALSE;
|
2000-06-01 23:25:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-06-24 12:56:08 +00:00
|
|
|
* PathRenameExtensionW
|
2000-06-01 23:25:44 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
BOOL WINAPI PathRenameExtensionW(LPWSTR pszPath, LPCWSTR pszExt)
|
2000-06-01 23:25:44 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
FIXME("%s %s\n", debugstr_w(pszPath), debugstr_w(pszExt));
|
|
|
|
return FALSE;
|
|
|
|
}
|
2000-06-13 03:45:52 +00:00
|
|
|
|
2000-06-24 12:56:08 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* PathSearchAndQualifyA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathSearchAndQualifyA(
|
|
|
|
LPCSTR pszPath,
|
|
|
|
LPSTR pszBuf,
|
|
|
|
UINT cchBuf)
|
|
|
|
{
|
|
|
|
FIXME("%s %s 0x%08x\n", pszPath, pszBuf, cchBuf);
|
|
|
|
return FALSE;
|
2000-06-13 03:45:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-06-24 12:56:08 +00:00
|
|
|
* PathSearchAndQualifyW
|
2000-06-13 03:45:52 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
BOOL WINAPI PathSearchAndQualifyW(
|
|
|
|
LPCWSTR pszPath,
|
|
|
|
LPWSTR pszBuf,
|
|
|
|
UINT cchBuf)
|
2000-06-13 03:45:52 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
FIXME("%s %s 0x%08x\n", debugstr_w(pszPath), debugstr_w(pszBuf), cchBuf);
|
|
|
|
return FALSE;
|
2000-06-13 03:45:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
2000-06-24 12:56:08 +00:00
|
|
|
* PathSkipRootA
|
2000-06-13 03:45:52 +00:00
|
|
|
*/
|
2000-06-24 12:56:08 +00:00
|
|
|
LPSTR WINAPI PathSkipRootA(LPCSTR pszPath)
|
2000-06-13 03:45:52 +00:00
|
|
|
{
|
2000-06-24 12:56:08 +00:00
|
|
|
FIXME("%s\n", pszPath);
|
|
|
|
return (LPSTR)pszPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathSkipRootW
|
|
|
|
*/
|
|
|
|
LPWSTR WINAPI PathSkipRootW(LPCWSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", debugstr_w(pszPath));
|
|
|
|
return (LPWSTR)pszPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathCreateFromUrlA
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI PathCreateFromUrlA(
|
|
|
|
LPCSTR pszUrl,
|
|
|
|
LPSTR pszPath,
|
|
|
|
LPDWORD pcchPath,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
FIXME("%s %p %p 0x%08lx\n",
|
|
|
|
pszUrl, pszPath, pcchPath, dwFlags);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathCreateFromUrlW
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI PathCreateFromUrlW(
|
|
|
|
LPCWSTR pszUrl,
|
|
|
|
LPWSTR pszPath,
|
|
|
|
LPDWORD pcchPath,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
FIXME("%s %p %p 0x%08lx\n",
|
|
|
|
debugstr_w(pszUrl), pszPath, pcchPath, dwFlags);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRelativePathToA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathRelativePathToA(
|
|
|
|
LPSTR pszPath,
|
|
|
|
LPCSTR pszFrom,
|
|
|
|
DWORD dwAttrFrom,
|
|
|
|
LPCSTR pszTo,
|
|
|
|
DWORD dwAttrTo)
|
|
|
|
{
|
|
|
|
FIXME("%s %s 0x%08lx %s 0x%08lx\n",
|
|
|
|
pszPath, pszFrom, dwAttrFrom, pszTo, dwAttrTo);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathRelativePathToW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathRelativePathToW(
|
|
|
|
LPWSTR pszPath,
|
|
|
|
LPCWSTR pszFrom,
|
|
|
|
DWORD dwAttrFrom,
|
|
|
|
LPCWSTR pszTo,
|
|
|
|
DWORD dwAttrTo)
|
|
|
|
{
|
|
|
|
FIXME("%s %s 0x%08lx %s 0x%08lx\n",
|
|
|
|
debugstr_w(pszPath), debugstr_w(pszFrom), dwAttrFrom, debugstr_w(pszTo), dwAttrTo);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathUnmakeSystemFolderA
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathUnmakeSystemFolderA(LPCSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", pszPath);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* PathUnmakeSystemFolderW
|
|
|
|
*/
|
|
|
|
BOOL WINAPI PathUnmakeSystemFolderW(LPCWSTR pszPath)
|
|
|
|
{
|
|
|
|
FIXME("%s\n", debugstr_w(pszPath));
|
|
|
|
return FALSE;
|
2000-06-01 23:25:44 +00:00
|
|
|
}
|