25#define wcsnicmp _wcsnicmp
41#undef DEPRECATE_SUPPORTED
52#if (_WIN32_WINNT < _WIN32_WINNT_VISTA) || (DLL_EXPORT_VERSION < _WIN32_WINNT_VISTA)
54static inline size_t hacked_wcsnlen(
const wchar_t*
str,
size_t size)
59#define wcsnlen hacked_wcsnlen
77 return !
wcsnicmp(
string,
L"\\\\?\\UNC\\", 8 );
127 *next_segment =
next + 1;
132 *next_segment =
next;
148 else if (
path[0] ==
'\\' &&
path[1] ==
'\\')
151 else if (
path[0] ==
'\\')
173 const WCHAR *root_end;
178 if (!path_in || !path_out
184 if (path_out) *path_out =
NULL;
212 if (root_end) root_end =
buffer + (root_end - path_in);
256 if (
dst >
buffer &&
dst[-1] ==
'\\' && (!root_end ||
dst - 1 > root_end))
272 else if (
src[2] ==
'\\')
289 else if (
src[1] ==
'\\')
302 if (
src[0] ==
'\\')
src++;
368 SIZE_T combined_length, length2;
369 WCHAR *combined_path;
449 BOOL needs_termination;
459 if (endptr) *endptr =
NULL;
460 if (remaining) *remaining = 0;
464 if (!needs_termination)
507 has_dot = extension[0] ==
'.';
511 if (*existing_extension)
return S_FALSE;
514 dot_length = has_dot ? 0 : 1;
515 extension_length =
lstrlenW(extension);
520 if (!extension[0] || (extension[0] ==
'.' && !extension[1]))
return S_OK;
738 else if (*
path ==
'.')
750 *extension = lastpoint ? lastpoint :
path;
763 const WCHAR *root_end;
772 if (!root_end)
return FALSE;
778 if ((is_unc && !*
next) || (!is_unc && !*
next))
return TRUE;
793 else if (*root_end ==
'\\' && !root_end[1])
804 _In_ size_t path_size)
822 _In_ size_t path_size,
829 const WCHAR *root_end;
834 if (!path_size || !path_end || !free_size)
836 if (path_end) *path_end =
NULL;
837 if (free_size) *free_size = 0;
876 const WCHAR *extension;
916 if (root_end && root_end >
path && root_end[-1] ==
'\\'
986 else if (
path[0] ==
'\\' &&
path[1] ==
'\\' &&
path[2] !=
'?')
1040 const WCHAR *root_end;
1053 root_end = is_unc ?
path + 8 :
path + 3;
1059 segment_end =
path + (root_end -
path) - 1;
1067 segment_end =
path + (root_end -
path);
1068 if (!*segment_end)
return S_FALSE;
1093 else if (
path[0] ==
'\\' &&
path[1] ==
'\\' &&
path[2] !=
'?')
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static const WCHAR path1[]
static const WCHAR path2[]
#define _Inout_updates_(s)
#define _Outptr_opt_result_buffer_(s)
HRESULT WINAPI PathCchRemoveFileSpec(WCHAR *path, SIZE_T size)
HRESULT WINAPI PathCchAppendEx(WCHAR *path1, SIZE_T size, const WCHAR *path2, DWORD flags)
HRESULT WINAPI PathCchFindExtension(const WCHAR *path, SIZE_T size, const WCHAR **extension)
static BOOL is_prefixed_unc(const WCHAR *string)
HRESULT WINAPI PathCchStripPrefix(WCHAR *path, SIZE_T size)
HRESULT WINAPI PathCchCombine(WCHAR *out, SIZE_T size, const WCHAR *path1, const WCHAR *path2)
static BOOL is_prefixed_volume(const WCHAR *string)
static BOOL is_prefixed_disk(const WCHAR *string)
HRESULT WINAPI PathCchAddBackslashEx(WCHAR *path, SIZE_T size, WCHAR **endptr, SIZE_T *remaining)
HRESULT WINAPI PathCchAppend(WCHAR *path1, SIZE_T size, const WCHAR *path2)
HRESULT WINAPI PathCchCanonicalizeEx(WCHAR *out, SIZE_T size, const WCHAR *in, DWORD flags)
HRESULT WINAPI PathCchStripToRoot(WCHAR *path, SIZE_T size)
static BOOL is_drive_spec(const WCHAR *str)
HRESULT WINAPI PathCchRemoveExtension(WCHAR *path, SIZE_T size)
HRESULT WINAPI PathCchRenameExtension(WCHAR *path, SIZE_T size, const WCHAR *extension)
HRESULT WINAPI PathAllocCombine(const WCHAR *path1, const WCHAR *path2, DWORD flags, WCHAR **out)
BOOL WINAPI PathCchIsRoot(const WCHAR *path)
HRESULT WINAPI PathAllocCanonicalize(const WCHAR *path_in, DWORD flags, WCHAR **path_out)
HRESULT WINAPI PathCchAddExtension(WCHAR *path, SIZE_T size, const WCHAR *extension)
HRESULT WINAPI PathCchCanonicalize(WCHAR *out, SIZE_T size, const WCHAR *in)
BOOL WINAPI PathIsUNCEx(const WCHAR *path, const WCHAR **server)
static const WCHAR * get_root_end(const WCHAR *path)
HRESULT WINAPI PathCchAddBackslash(WCHAR *path, SIZE_T size)
HRESULT WINAPI PathCchRemoveBackslashEx(WCHAR *path, SIZE_T path_size, WCHAR **path_end, SIZE_T *free_size)
static BOOL get_next_segment(const WCHAR *next, const WCHAR **next_segment)
HRESULT WINAPI PathCchRemoveBackslash(WCHAR *path, SIZE_T path_size)
HRESULT WINAPI PathCchSkipRoot(const WCHAR *path, const WCHAR **root_end)
HRESULT WINAPI PathCchCombineEx(WCHAR *out, SIZE_T size, const WCHAR *path1, const WCHAR *path2, DWORD flags)
#define PATHCCH_ENSURE_TRAILING_SLASH
#define PATHCCH_FORCE_ENABLE_LONG_NAME_PROCESS
#define PATHCCH_ALLOW_LONG_PATHS
#define PATHCCH_ENSURE_IS_EXTENDED_LENGTH_PATH
#define PATHCCH_DO_NOT_NORMALIZE_SEGMENTS
#define PATHCCH_FORCE_DISABLE_LONG_NAME_PROCESS
static unsigned __int64 next
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
STRSAFEAPI StringCchLengthW(STRSAFE_LPCWSTR psz, size_t cchMax, size_t *pcchLength)
#define STRSAFE_E_INSUFFICIENT_BUFFER
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
static rfbScreenInfoPtr server
#define ERROR_FILENAME_EXCED_RANGE
#define HRESULT_FROM_WIN32(x)