Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
70fceaa2
Commit
70fceaa2
authored
Jun 30, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use the standard C library names for the wide char functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cfc9da22
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
113 deletions
+72
-113
locale.c
dlls/ntdll/locale.c
+2
-2
ntdll.spec
dlls/ntdll/ntdll.spec
+30
-30
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+0
-41
wcstring.c
dlls/ntdll/wcstring.c
+40
-40
No files found.
dlls/ntdll/locale.c
View file @
70fceaa2
...
...
@@ -1467,7 +1467,7 @@ NTSTATUS WINAPI RtlUpcaseUnicodeToOemN( char *dst, DWORD dstlen, DWORD *reslen,
/*********************************************************************
* towlower (NTDLL.@)
*/
WCHAR
__cdecl
NTDLL_
towlower
(
WCHAR
ch
)
WCHAR
__cdecl
towlower
(
WCHAR
ch
)
{
if
(
ch
>=
0x100
)
return
ch
;
return
casemap
(
nls_info
.
LowerCaseTable
,
ch
);
...
...
@@ -1477,7 +1477,7 @@ WCHAR __cdecl NTDLL_towlower( WCHAR ch )
/*********************************************************************
* towupper (NTDLL.@)
*/
WCHAR
__cdecl
NTDLL_
towupper
(
WCHAR
ch
)
WCHAR
__cdecl
towupper
(
WCHAR
ch
)
{
if
(
nls_info
.
UpperCaseTable
)
return
casemap
(
nls_info
.
UpperCaseTable
,
ch
);
return
casemap_ascii
(
ch
);
...
...
dlls/ntdll/ntdll.spec
View file @
70fceaa2
...
...
@@ -1475,10 +1475,10 @@
@ cdecl _vsnwprintf(ptr long wstr ptr)
@ cdecl _vsnwprintf_s(ptr long long wstr ptr)
@ cdecl _vswprintf(ptr wstr ptr)
@ cdecl _wcsicmp(wstr wstr)
NTDLL__wcsicmp
@ cdecl _wcslwr(wstr)
NTDLL__wcslwr
@ cdecl _wcsnicmp(wstr wstr long)
NTDLL__wcsnicmp
@ cdecl _wcsupr(wstr)
NTDLL__wcsupr
@ cdecl _wcsicmp(wstr wstr)
@ cdecl _wcslwr(wstr)
@ cdecl _wcsnicmp(wstr wstr long)
@ cdecl _wcsupr(wstr)
@ cdecl _wtoi(wstr)
@ cdecl -ret64 _wtoi64(wstr)
@ cdecl _wtol(wstr)
...
...
@@ -1501,16 +1501,16 @@
@ cdecl ispunct(long)
@ cdecl isspace(long)
@ cdecl isupper(long)
@ cdecl iswalpha(long)
NTDLL_iswalpha
@ cdecl iswctype(long long)
NTDLL_iswctype
@ cdecl iswdigit(long)
NTDLL_iswdigit
@ cdecl iswlower(long)
NTDLL_iswlower
@ cdecl iswspace(long)
NTDLL_iswspace
@ cdecl iswxdigit(long)
NTDLL_iswxdigit
@ cdecl iswalpha(long)
@ cdecl iswctype(long long)
@ cdecl iswdigit(long)
@ cdecl iswlower(long)
@ cdecl iswspace(long)
@ cdecl iswxdigit(long)
@ cdecl isxdigit(long)
@ cdecl labs(long) NTDLL_abs
@ cdecl log(double) NTDLL_log
@ cdecl mbstowcs(ptr str long)
NTDLL_mbstowcs
@ cdecl mbstowcs(ptr str long)
@ cdecl memchr(ptr long long)
@ cdecl memcmp(ptr ptr long)
@ cdecl memcpy(ptr ptr long)
...
...
@@ -1544,30 +1544,30 @@
@ cdecl tan(double) NTDLL_tan
@ cdecl tolower(long)
@ cdecl toupper(long)
@ cdecl towlower(long)
NTDLL_towlower
@ cdecl towupper(long)
NTDLL_towupper
@ cdecl towlower(long)
@ cdecl towupper(long)
@ stdcall vDbgPrintEx(long long str ptr)
@ stdcall vDbgPrintExWithPrefix(str long long str ptr)
@ cdecl vsprintf(ptr str ptr)
@ cdecl vsprintf_s(ptr long str ptr)
@ cdecl vswprintf_s(ptr long wstr ptr)
@ cdecl wcscat(wstr wstr)
NTDLL_wcscat
@ cdecl wcschr(wstr long)
NTDLL_wcschr
@ cdecl wcscmp(wstr wstr)
NTDLL_wcscmp
@ cdecl wcscpy(ptr wstr)
NTDLL_wcscpy
@ cdecl wcscspn(wstr wstr)
NTDLL_wcscspn
@ cdecl wcslen(wstr)
NTDLL_wcslen
@ cdecl wcsncat(wstr wstr long)
NTDLL_wcsncat
@ cdecl wcsncmp(wstr wstr long)
NTDLL_wcsncmp
@ cdecl wcsncpy(ptr wstr long)
NTDLL_wcsncpy
@ cdecl wcspbrk(wstr wstr)
NTDLL_wcspbrk
@ cdecl wcsrchr(wstr long)
NTDLL_wcsrchr
@ cdecl wcsspn(wstr wstr)
NTDLL_wcsspn
@ cdecl wcsstr(wstr wstr)
NTDLL_wcsstr
@ cdecl wcstok(wstr wstr)
NTDLL_wcstok
@ cdecl wcstol(wstr ptr long)
NTDLL_wcstol
@ cdecl wcstombs(ptr ptr long)
NTDLL_wcstombs
@ cdecl wcstoul(wstr ptr long)
NTDLL_wcstoul
@ cdecl wcscat(wstr wstr)
@ cdecl wcschr(wstr long)
@ cdecl wcscmp(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscspn(wstr wstr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
@ cdecl wcspbrk(wstr wstr)
@ cdecl wcsrchr(wstr long)
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstok(wstr wstr)
@ cdecl wcstol(wstr ptr long)
@ cdecl wcstombs(ptr ptr long)
@ cdecl wcstoul(wstr ptr long)
##################
# Wine extensions
...
...
dlls/ntdll/ntdll_misc.h
View file @
70fceaa2
...
...
@@ -147,47 +147,6 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
#define InterlockedCompareExchange64(dest,xchg,cmp) RtlInterlockedCompareExchange64(dest,xchg,cmp)
#endif
/* string functions */
int
__cdecl
NTDLL__wcsicmp
(
LPCWSTR
str1
,
LPCWSTR
str2
);
int
__cdecl
NTDLL__wcsnicmp
(
LPCWSTR
str1
,
LPCWSTR
str2
,
size_t
n
);
int
__cdecl
NTDLL_wcscmp
(
LPCWSTR
str1
,
LPCWSTR
str2
);
int
__cdecl
NTDLL_wcsncmp
(
LPCWSTR
str1
,
LPCWSTR
str2
,
size_t
n
);
WCHAR
__cdecl
NTDLL_towlower
(
WCHAR
ch
);
WCHAR
__cdecl
NTDLL_towupper
(
WCHAR
ch
);
LPWSTR
__cdecl
NTDLL__wcslwr
(
LPWSTR
str
);
LPWSTR
__cdecl
NTDLL__wcsupr
(
LPWSTR
str
);
LPWSTR
__cdecl
NTDLL_wcscpy
(
LPWSTR
dst
,
LPCWSTR
src
);
LPWSTR
__cdecl
NTDLL_wcscat
(
LPWSTR
dst
,
LPCWSTR
src
);
LPWSTR
__cdecl
NTDLL_wcschr
(
LPCWSTR
str
,
WCHAR
ch
);
size_t
__cdecl
NTDLL_wcslen
(
LPCWSTR
str
);
size_t
__cdecl
NTDLL_wcscspn
(
LPCWSTR
str
,
LPCWSTR
reject
);
LPWSTR
__cdecl
NTDLL_wcsncat
(
LPWSTR
s1
,
LPCWSTR
s2
,
size_t
n
);
LPWSTR
__cdecl
NTDLL_wcsncpy
(
LPWSTR
s1
,
LPCWSTR
s2
,
size_t
n
);
LPWSTR
__cdecl
NTDLL_wcspbrk
(
LPCWSTR
str
,
LPCWSTR
accept
);
LPWSTR
__cdecl
NTDLL_wcsrchr
(
LPCWSTR
str
,
WCHAR
ch
);
size_t
__cdecl
NTDLL_wcsspn
(
LPCWSTR
str
,
LPCWSTR
accept
);
LPWSTR
__cdecl
NTDLL_wcsstr
(
LPCWSTR
str
,
LPCWSTR
sub
);
LPWSTR
__cdecl
NTDLL_wcstok
(
LPWSTR
str
,
LPCWSTR
delim
);
LONG
__cdecl
NTDLL_wcstol
(
LPCWSTR
s
,
LPWSTR
*
end
,
INT
base
);
ULONG
__cdecl
NTDLL_wcstoul
(
LPCWSTR
s
,
LPWSTR
*
end
,
INT
base
);
#define wcsicmp(s1,s2) NTDLL__wcsicmp(s1,s2)
#define wcsnicmp(s1,s2,n) NTDLL__wcsnicmp(s1,s2,n)
#define towupper(c) NTDLL_towupper(c)
#define wcslwr(s) NTDLL__wcslwr(s)
#define wcsupr(s) NTDLL__wcsupr(s)
#define wcscpy(d,s) NTDLL_wcscpy(d,s)
#define wcscat(d,s) NTDLL_wcscat(d,s)
#define wcschr(s,c) NTDLL_wcschr(s,c)
#define wcspbrk(s,a) NTDLL_wcspbrk(s,a)
#define wcsrchr(s,c) NTDLL_wcsrchr(s,c)
#define wcstoul(s,e,b) NTDLL_wcstoul(s,e,b)
#define wcslen(s) NTDLL_wcslen(s)
#define wcscspn(s,r) NTDLL_wcscspn(s,r)
#define wcsspn(s,a) NTDLL_wcsspn(s,a)
#define wcscmp(s1,s2) NTDLL_wcscmp(s1,s2)
#define wcsncmp(s1,s2,n) NTDLL_wcsncmp(s1,s2,n)
/* convert from straight ASCII to Unicode without depending on the current codepage */
static
inline
void
ascii_to_unicode
(
WCHAR
*
dst
,
const
char
*
src
,
size_t
len
)
{
...
...
dlls/ntdll/wcstring.c
View file @
70fceaa2
...
...
@@ -88,7 +88,7 @@ static const unsigned short wctypes[256] =
/*********************************************************************
* _wcsicmp (NTDLL.@)
*/
int
__cdecl
NTDLL_
_wcsicmp
(
LPCWSTR
str1
,
LPCWSTR
str2
)
int
__cdecl
_wcsicmp
(
LPCWSTR
str1
,
LPCWSTR
str2
)
{
for
(;;)
{
...
...
@@ -104,7 +104,7 @@ int __cdecl NTDLL__wcsicmp( LPCWSTR str1, LPCWSTR str2 )
/*********************************************************************
* _wcslwr (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
_wcslwr
(
LPWSTR
str
)
LPWSTR
__cdecl
_wcslwr
(
LPWSTR
str
)
{
WCHAR
*
ret
=
str
;
...
...
@@ -121,7 +121,7 @@ LPWSTR __cdecl NTDLL__wcslwr( LPWSTR str )
/*********************************************************************
* _wcsnicmp (NTDLL.@)
*/
int
__cdecl
NTDLL_
_wcsnicmp
(
LPCWSTR
str1
,
LPCWSTR
str2
,
size_t
n
)
int
__cdecl
_wcsnicmp
(
LPCWSTR
str1
,
LPCWSTR
str2
,
size_t
n
)
{
int
ret
=
0
;
for
(
;
n
>
0
;
n
--
,
str1
++
,
str2
++
)
...
...
@@ -137,7 +137,7 @@ int __cdecl NTDLL__wcsnicmp( LPCWSTR str1, LPCWSTR str2, size_t n )
/*********************************************************************
* _wcsupr (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
_wcsupr
(
LPWSTR
str
)
LPWSTR
__cdecl
_wcsupr
(
LPWSTR
str
)
{
WCHAR
*
ret
=
str
;
...
...
@@ -154,7 +154,7 @@ LPWSTR __cdecl NTDLL__wcsupr( LPWSTR str )
/***********************************************************************
* wcscpy (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
wcscpy
(
LPWSTR
dst
,
LPCWSTR
src
)
LPWSTR
__cdecl
wcscpy
(
LPWSTR
dst
,
LPCWSTR
src
)
{
WCHAR
*
p
=
dst
;
while
((
*
p
++
=
*
src
++
));
...
...
@@ -165,7 +165,7 @@ LPWSTR __cdecl NTDLL_wcscpy( LPWSTR dst, LPCWSTR src )
/***********************************************************************
* wcslen (NTDLL.@)
*/
size_t
__cdecl
NTDLL_
wcslen
(
LPCWSTR
str
)
size_t
__cdecl
wcslen
(
LPCWSTR
str
)
{
const
WCHAR
*
s
=
str
;
while
(
*
s
)
s
++
;
...
...
@@ -176,9 +176,9 @@ size_t __cdecl NTDLL_wcslen( LPCWSTR str )
/***********************************************************************
* wcscat (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
wcscat
(
LPWSTR
dst
,
LPCWSTR
src
)
LPWSTR
__cdecl
wcscat
(
LPWSTR
dst
,
LPCWSTR
src
)
{
NTDLL_wcscpy
(
dst
+
NTDLL_
wcslen
(
dst
),
src
);
wcscpy
(
dst
+
wcslen
(
dst
),
src
);
return
dst
;
}
...
...
@@ -186,7 +186,7 @@ LPWSTR __cdecl NTDLL_wcscat( LPWSTR dst, LPCWSTR src )
/*********************************************************************
* wcschr (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
wcschr
(
LPCWSTR
str
,
WCHAR
ch
)
LPWSTR
__cdecl
wcschr
(
LPCWSTR
str
,
WCHAR
ch
)
{
do
{
if
(
*
str
==
ch
)
return
(
WCHAR
*
)(
ULONG_PTR
)
str
;
}
while
(
*
str
++
);
return
NULL
;
...
...
@@ -196,7 +196,7 @@ LPWSTR __cdecl NTDLL_wcschr( LPCWSTR str, WCHAR ch )
/*********************************************************************
* wcscmp (NTDLL.@)
*/
int
__cdecl
NTDLL_
wcscmp
(
LPCWSTR
str1
,
LPCWSTR
str2
)
int
__cdecl
wcscmp
(
LPCWSTR
str1
,
LPCWSTR
str2
)
{
while
(
*
str1
&&
(
*
str1
==
*
str2
))
{
str1
++
;
str2
++
;
}
return
*
str1
-
*
str2
;
...
...
@@ -206,10 +206,10 @@ int __cdecl NTDLL_wcscmp( LPCWSTR str1, LPCWSTR str2 )
/*********************************************************************
* wcscspn (NTDLL.@)
*/
size_t
__cdecl
NTDLL_
wcscspn
(
LPCWSTR
str
,
LPCWSTR
reject
)
size_t
__cdecl
wcscspn
(
LPCWSTR
str
,
LPCWSTR
reject
)
{
const
WCHAR
*
ptr
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
if
(
NTDLL_
wcschr
(
reject
,
*
ptr
))
break
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
if
(
wcschr
(
reject
,
*
ptr
))
break
;
return
ptr
-
str
;
}
...
...
@@ -217,7 +217,7 @@ size_t __cdecl NTDLL_wcscspn( LPCWSTR str, LPCWSTR reject )
/*********************************************************************
* wcsncat (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
wcsncat
(
LPWSTR
s1
,
LPCWSTR
s2
,
size_t
n
)
LPWSTR
__cdecl
wcsncat
(
LPWSTR
s1
,
LPCWSTR
s2
,
size_t
n
)
{
LPWSTR
ret
=
s1
;
while
(
*
s1
)
s1
++
;
...
...
@@ -230,7 +230,7 @@ LPWSTR __cdecl NTDLL_wcsncat( LPWSTR s1, LPCWSTR s2, size_t n )
/*********************************************************************
* wcsncmp (NTDLL.@)
*/
int
__cdecl
NTDLL_
wcsncmp
(
LPCWSTR
str1
,
LPCWSTR
str2
,
size_t
n
)
int
__cdecl
wcsncmp
(
LPCWSTR
str1
,
LPCWSTR
str2
,
size_t
n
)
{
if
(
n
<=
0
)
return
0
;
while
((
--
n
>
0
)
&&
*
str1
&&
(
*
str1
==
*
str2
))
{
str1
++
;
str2
++
;
}
...
...
@@ -241,7 +241,7 @@ int __cdecl NTDLL_wcsncmp( LPCWSTR str1, LPCWSTR str2, size_t n )
/*********************************************************************
* wcsncpy (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
wcsncpy
(
LPWSTR
s1
,
LPCWSTR
s2
,
size_t
n
)
LPWSTR
__cdecl
wcsncpy
(
LPWSTR
s1
,
LPCWSTR
s2
,
size_t
n
)
{
WCHAR
*
ret
=
s1
;
while
(
n
--
>
0
)
if
(
!
(
*
s1
++
=
*
s2
++
))
break
;
...
...
@@ -253,9 +253,9 @@ LPWSTR __cdecl NTDLL_wcsncpy( LPWSTR s1, LPCWSTR s2, size_t n )
/*********************************************************************
* wcspbrk (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
wcspbrk
(
LPCWSTR
str
,
LPCWSTR
accept
)
LPWSTR
__cdecl
wcspbrk
(
LPCWSTR
str
,
LPCWSTR
accept
)
{
for
(
;
*
str
;
str
++
)
if
(
NTDLL_
wcschr
(
accept
,
*
str
))
return
(
WCHAR
*
)(
ULONG_PTR
)
str
;
for
(
;
*
str
;
str
++
)
if
(
wcschr
(
accept
,
*
str
))
return
(
WCHAR
*
)(
ULONG_PTR
)
str
;
return
NULL
;
}
...
...
@@ -263,7 +263,7 @@ LPWSTR __cdecl NTDLL_wcspbrk( LPCWSTR str, LPCWSTR accept )
/*********************************************************************
* wcsrchr (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
wcsrchr
(
LPCWSTR
str
,
WCHAR
ch
)
LPWSTR
__cdecl
wcsrchr
(
LPCWSTR
str
,
WCHAR
ch
)
{
WCHAR
*
ret
=
NULL
;
do
{
if
(
*
str
==
ch
)
ret
=
(
WCHAR
*
)(
ULONG_PTR
)
str
;
}
while
(
*
str
++
);
...
...
@@ -274,10 +274,10 @@ LPWSTR __cdecl NTDLL_wcsrchr( LPCWSTR str, WCHAR ch )
/*********************************************************************
* wcsspn (NTDLL.@)
*/
size_t
__cdecl
NTDLL_
wcsspn
(
LPCWSTR
str
,
LPCWSTR
accept
)
size_t
__cdecl
wcsspn
(
LPCWSTR
str
,
LPCWSTR
accept
)
{
const
WCHAR
*
ptr
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
if
(
!
NTDLL_
wcschr
(
accept
,
*
ptr
))
break
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
if
(
!
wcschr
(
accept
,
*
ptr
))
break
;
return
ptr
-
str
;
}
...
...
@@ -285,7 +285,7 @@ size_t __cdecl NTDLL_wcsspn( LPCWSTR str, LPCWSTR accept )
/*********************************************************************
* wcsstr (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
wcsstr
(
LPCWSTR
str
,
LPCWSTR
sub
)
LPWSTR
__cdecl
wcsstr
(
LPCWSTR
str
,
LPCWSTR
sub
)
{
while
(
*
str
)
{
...
...
@@ -301,7 +301,7 @@ LPWSTR __cdecl NTDLL_wcsstr( LPCWSTR str, LPCWSTR sub )
/*********************************************************************
* wcstok (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_
wcstok
(
LPWSTR
str
,
LPCWSTR
delim
)
LPWSTR
__cdecl
wcstok
(
LPWSTR
str
,
LPCWSTR
delim
)
{
static
LPWSTR
next
=
NULL
;
LPWSTR
ret
;
...
...
@@ -309,10 +309,10 @@ LPWSTR __cdecl NTDLL_wcstok( LPWSTR str, LPCWSTR delim )
if
(
!
str
)
if
(
!
(
str
=
next
))
return
NULL
;
while
(
*
str
&&
NTDLL_
wcschr
(
delim
,
*
str
))
str
++
;
while
(
*
str
&&
wcschr
(
delim
,
*
str
))
str
++
;
if
(
!*
str
)
return
NULL
;
ret
=
str
++
;
while
(
*
str
&&
!
NTDLL_
wcschr
(
delim
,
*
str
))
str
++
;
while
(
*
str
&&
!
wcschr
(
delim
,
*
str
))
str
++
;
if
(
*
str
)
*
str
++
=
0
;
next
=
str
;
return
ret
;
...
...
@@ -322,19 +322,19 @@ LPWSTR __cdecl NTDLL_wcstok( LPWSTR str, LPCWSTR delim )
/*********************************************************************
* wcstombs (NTDLL.@)
*/
INT
__cdecl
NTDLL_wcstombs
(
LPSTR
dst
,
LPCWSTR
src
,
INT
n
)
size_t
__cdecl
wcstombs
(
char
*
dst
,
const
WCHAR
*
src
,
size_t
n
)
{
DWORD
len
;
if
(
!
dst
)
{
RtlUnicodeToMultiByteSize
(
&
len
,
src
,
NTDLL_
wcslen
(
src
)
*
sizeof
(
WCHAR
)
);
RtlUnicodeToMultiByteSize
(
&
len
,
src
,
wcslen
(
src
)
*
sizeof
(
WCHAR
)
);
return
len
;
}
else
{
if
(
n
<=
0
)
return
0
;
RtlUnicodeToMultiByteN
(
dst
,
n
,
&
len
,
src
,
NTDLL_
wcslen
(
src
)
*
sizeof
(
WCHAR
)
);
RtlUnicodeToMultiByteN
(
dst
,
n
,
&
len
,
src
,
wcslen
(
src
)
*
sizeof
(
WCHAR
)
);
if
(
len
<
n
)
dst
[
len
]
=
0
;
}
return
len
;
...
...
@@ -344,7 +344,7 @@ INT __cdecl NTDLL_wcstombs( LPSTR dst, LPCWSTR src, INT n )
/*********************************************************************
* mbstowcs (NTDLL.@)
*/
INT
__cdecl
NTDLL_mbstowcs
(
LPWSTR
dst
,
LPCSTR
src
,
INT
n
)
size_t
__cdecl
mbstowcs
(
WCHAR
*
dst
,
const
char
*
src
,
size_t
n
)
{
DWORD
len
;
...
...
@@ -365,7 +365,7 @@ INT __cdecl NTDLL_mbstowcs( LPWSTR dst, LPCSTR src, INT n )
/*********************************************************************
* iswctype (NTDLL.@)
*/
INT
__cdecl
NTDLL_
iswctype
(
WCHAR
wc
,
unsigned
short
type
)
INT
__cdecl
iswctype
(
WCHAR
wc
,
unsigned
short
type
)
{
if
(
wc
>=
256
)
return
0
;
return
wctypes
[
wc
]
&
type
;
...
...
@@ -375,7 +375,7 @@ INT __cdecl NTDLL_iswctype( WCHAR wc, unsigned short type )
/*********************************************************************
* iswalpha (NTDLL.@)
*/
INT
__cdecl
NTDLL_
iswalpha
(
WCHAR
wc
)
INT
__cdecl
iswalpha
(
WCHAR
wc
)
{
if
(
wc
>=
256
)
return
0
;
return
wctypes
[
wc
]
&
(
C1_ALPHA
|
C1_UPPER
|
C1_LOWER
);
...
...
@@ -391,7 +391,7 @@ INT __cdecl NTDLL_iswalpha( WCHAR wc )
* TRUE: The unicode char wc is a digit.
* FALSE: Otherwise
*/
INT
__cdecl
NTDLL_
iswdigit
(
WCHAR
wc
)
INT
__cdecl
iswdigit
(
WCHAR
wc
)
{
if
(
wc
>=
256
)
return
0
;
return
wctypes
[
wc
]
&
C1_DIGIT
;
...
...
@@ -407,7 +407,7 @@ INT __cdecl NTDLL_iswdigit( WCHAR wc )
* TRUE: The unicode char wc is a lower case letter.
* FALSE: Otherwise
*/
INT
__cdecl
NTDLL_
iswlower
(
WCHAR
wc
)
INT
__cdecl
iswlower
(
WCHAR
wc
)
{
if
(
wc
>=
256
)
return
0
;
return
wctypes
[
wc
]
&
C1_LOWER
;
...
...
@@ -423,7 +423,7 @@ INT __cdecl NTDLL_iswlower( WCHAR wc )
* TRUE: The unicode char wc is a white space character.
* FALSE: Otherwise
*/
INT
__cdecl
NTDLL_
iswspace
(
WCHAR
wc
)
INT
__cdecl
iswspace
(
WCHAR
wc
)
{
if
(
wc
>=
256
)
return
0
;
return
wctypes
[
wc
]
&
C1_SPACE
;
...
...
@@ -439,7 +439,7 @@ INT __cdecl NTDLL_iswspace( WCHAR wc )
* TRUE: The unicode char wc is an extended digit.
* FALSE: Otherwise
*/
INT
__cdecl
NTDLL_
iswxdigit
(
WCHAR
wc
)
INT
__cdecl
iswxdigit
(
WCHAR
wc
)
{
if
(
wc
>=
256
)
return
0
;
return
wctypes
[
wc
]
&
C1_XDIGIT
;
...
...
@@ -469,14 +469,14 @@ static int wctoint( WCHAR c )
/*********************************************************************
* wcstol (NTDLL.@)
*/
LONG
__cdecl
NTDLL_
wcstol
(
LPCWSTR
s
,
LPWSTR
*
end
,
INT
base
)
__msvcrt_long
__cdecl
wcstol
(
LPCWSTR
s
,
LPWSTR
*
end
,
INT
base
)
{
BOOL
negative
=
FALSE
,
empty
=
TRUE
;
LONG
ret
=
0
;
if
(
base
<
0
||
base
==
1
||
base
>
36
)
return
0
;
if
(
end
)
*
end
=
(
WCHAR
*
)
s
;
while
(
NTDLL_
iswspace
(
*
s
))
s
++
;
while
(
iswspace
(
*
s
))
s
++
;
if
(
*
s
==
'-'
)
{
...
...
@@ -516,14 +516,14 @@ LONG __cdecl NTDLL_wcstol(LPCWSTR s, LPWSTR *end, INT base)
/*********************************************************************
* wcstoul (NTDLL.@)
*/
ULONG
__cdecl
NTDLL_
wcstoul
(
LPCWSTR
s
,
LPWSTR
*
end
,
INT
base
)
__msvcrt_ulong
__cdecl
wcstoul
(
LPCWSTR
s
,
LPWSTR
*
end
,
INT
base
)
{
BOOL
negative
=
FALSE
,
empty
=
TRUE
;
ULONG
ret
=
0
;
if
(
base
<
0
||
base
==
1
||
base
>
36
)
return
0
;
if
(
end
)
*
end
=
(
WCHAR
*
)
s
;
while
(
NTDLL_
iswspace
(
*
s
))
s
++
;
while
(
iswspace
(
*
s
))
s
++
;
if
(
*
s
==
'-'
)
{
...
...
@@ -816,7 +816,7 @@ __msvcrt_long __cdecl _wtol( LPCWSTR str )
ULONG
RunningTotal
=
0
;
BOOL
bMinus
=
FALSE
;
while
(
NTDLL_
iswspace
(
*
str
))
str
++
;
while
(
iswspace
(
*
str
))
str
++
;
if
(
*
str
==
'+'
)
{
str
++
;
...
...
@@ -877,7 +877,7 @@ LONGLONG __cdecl _wtoi64( LPCWSTR str )
ULONGLONG
RunningTotal
=
0
;
BOOL
bMinus
=
FALSE
;
while
(
NTDLL_
iswspace
(
*
str
))
str
++
;
while
(
iswspace
(
*
str
))
str
++
;
if
(
*
str
==
'+'
)
{
str
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment