First try at implementing PathGetCharType().
This commit is contained in:
parent
8722373d9a
commit
784fd59e43
|
@ -1617,8 +1617,23 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR pszPath, UINT dx)
|
|||
*/
|
||||
UINT WINAPI PathGetCharTypeA(UCHAR ch)
|
||||
{
|
||||
FIXME("%c\n", ch);
|
||||
return 0;
|
||||
UINT flags = 0;
|
||||
|
||||
TRACE("%c\n", ch);
|
||||
|
||||
/* We could use them in filenames, but this would confuse 'ls' */
|
||||
if (iscntrl(ch))
|
||||
return GCT_INVALID;
|
||||
if ((ch == '*') || (ch=='?'))
|
||||
return GCT_WILD;
|
||||
if ((ch == '\\') || (ch=='/'))
|
||||
return GCT_SEPARATOR;
|
||||
flags = 0;
|
||||
/* all normal characters, no lower case letters */
|
||||
if ((ch > ' ') && (ch < 0x7f) && !islower(ch))
|
||||
flags |= GCT_SHORTCHAR;
|
||||
/* All other characters are valid in long filenames, even umlauts */
|
||||
return flags | GCT_LFNCHAR;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -1626,8 +1641,8 @@ UINT WINAPI PathGetCharTypeA(UCHAR ch)
|
|||
*/
|
||||
UINT WINAPI PathGetCharTypeW(WCHAR ch)
|
||||
{
|
||||
FIXME("%c\n", ch);
|
||||
return 0;
|
||||
FIXME("%c, using ascii version\n", ch);
|
||||
return PathGetCharTypeA(ch);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
|
|
@ -8,6 +8,13 @@ extern "C" {
|
|||
#endif /* defined(__cplusplus) */
|
||||
|
||||
|
||||
/* Mask returned by GetPathCharType */
|
||||
#define GCT_INVALID 0x0000
|
||||
#define GCT_LFNCHAR 0x0001
|
||||
#define GCT_SHORTCHAR 0x0002
|
||||
#define GCT_WILD 0x0004
|
||||
#define GCT_SEPARATOR 0x0008
|
||||
|
||||
/*
|
||||
* The URL_ defines were determined by trial and error. If they become
|
||||
* documented please check them and add the missing ones including:
|
||||
|
|
Loading…
Reference in New Issue