#include <precomp.h>
#include <tchar.h>
#include <mbctype.h>
Go to the source code of this file.
◆ _FAILURE
◆ _SUCCESS
◆ _tsplitpath_x()
Definition at line 38 of file _tsplitpath_x.h.
45{
46 const _TCHAR *
src, *dir_start, *file_start = 0, *ext_start = 0;
48#if !IS_SECAPI
51#endif
52
53#if IS_SECAPI
54
57 ((
dir !=
NULL) && (dir_size == 0)) ||
58 ((fname !=
NULL) && (fname_size == 0)) ||
60 {
62 return -1;
63 }
64#endif
65
66
69 if (fname) fname[0] = '\0';
71
72#if WINVER >= 0x600
73
75 {
76#ifndef _LIBCNT_
78#endif
80 }
81#endif
82
84
85#if WINVER == 0x600
86
87 if ((
path[0] ==
'\\') && (
path[1] ==
'\\') &&
89#endif
90
92
93
95 {
96 if (
drive && (drive_size >= 3))
97 {
101 }
103 }
104
105
107 while (*
path !=
'\0')
108 {
109#if !defined(_UNICODE) && !defined(_LIBCNT_)
110
112 {
113
114 if (
path[1] == 0)
break;
115
116
118 continue;
119 }
120#endif
121
122 if ((*
path ==
'\\') || (*
path ==
'/')) file_start =
path + 1;
125 }
126
127
128 if (!file_start)
129 file_start = dir_start;
130 if (!ext_start || (ext_start < file_start))
132
134 {
136 count = dir_size - 1;
139 }
140
141 if (fname)
142 {
144 count = fname_size - 1;
145 while (
src < ext_start &&
count--) *fname++ = *
src++;
146 *fname = '\0';
147 }
148
150 {
155 }
156
158}
static const WCHAR *const ext[]
GLuint GLuint GLsizei count
#define MSVCRT_CHECK_PMT(x)
int __cdecl _ismbblead(unsigned int)
#define _Analysis_assume_(expr)
errno_t __cdecl _set_errno(_In_ int _Value)