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
6226be36
Commit
6226be36
authored
Mar 27, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Update some string functions prototypes to match msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fd7e5741
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
12 deletions
+36
-12
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+25
-2
wcstring.c
dlls/ntdll/wcstring.c
+11
-10
No files found.
dlls/ntdll/ntdll_misc.h
View file @
6226be36
...
...
@@ -271,6 +271,29 @@ NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*);
void
WINAPI
LdrInitializeThunk
(
CONTEXT
*
,
void
**
,
ULONG_PTR
,
ULONG_PTR
);
/* string functions */
int
__cdecl
NTDLL_tolower
(
int
c
);
int
__cdecl
_stricmp
(
LPCSTR
str1
,
LPCSTR
str2
);
int
__cdecl
NTDLL_tolower
(
int
c
);
int
__cdecl
_stricmp
(
LPCSTR
str1
,
LPCSTR
str2
);
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
);
#endif
dlls/ntdll/wcstring.c
View file @
6226be36
...
...
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winnls.h"
#include "winternl.h"
#include "ntdll_misc.h"
static
const
unsigned
short
wctypes
[
256
]
=
{
...
...
@@ -89,7 +90,7 @@ static const unsigned short wctypes[256] =
/*********************************************************************
* _wcsicmp (NTDLL.@)
*/
INT
__cdecl
NTDLL__wcsicmp
(
LPCWSTR
str1
,
LPCWSTR
str2
)
int
__cdecl
NTDLL__wcsicmp
(
LPCWSTR
str1
,
LPCWSTR
str2
)
{
for
(;;)
{
...
...
@@ -122,7 +123,7 @@ LPWSTR __cdecl NTDLL__wcslwr( LPWSTR str )
/*********************************************************************
* _wcsnicmp (NTDLL.@)
*/
INT
__cdecl
NTDLL__wcsnicmp
(
LPCWSTR
str1
,
LPCWSTR
str2
,
INT
n
)
int
__cdecl
NTDLL__wcsnicmp
(
LPCWSTR
str1
,
LPCWSTR
str2
,
size_t
n
)
{
int
ret
=
0
;
for
(
;
n
>
0
;
n
--
,
str1
++
,
str2
++
)
...
...
@@ -166,7 +167,7 @@ LPWSTR __cdecl NTDLL_wcscpy( LPWSTR dst, LPCWSTR src )
/***********************************************************************
* wcslen (NTDLL.@)
*/
INT
__cdecl
NTDLL_wcslen
(
LPCWSTR
str
)
size_t
__cdecl
NTDLL_wcslen
(
LPCWSTR
str
)
{
const
WCHAR
*
s
=
str
;
while
(
*
s
)
s
++
;
...
...
@@ -197,7 +198,7 @@ LPWSTR __cdecl NTDLL_wcschr( LPCWSTR str, WCHAR ch )
/*********************************************************************
* wcscmp (NTDLL.@)
*/
INT
__cdecl
NTDLL_wcscmp
(
LPCWSTR
str1
,
LPCWSTR
str2
)
int
__cdecl
NTDLL_wcscmp
(
LPCWSTR
str1
,
LPCWSTR
str2
)
{
while
(
*
str1
&&
(
*
str1
==
*
str2
))
{
str1
++
;
str2
++
;
}
return
*
str1
-
*
str2
;
...
...
@@ -207,7 +208,7 @@ INT __cdecl NTDLL_wcscmp( LPCWSTR str1, LPCWSTR str2 )
/*********************************************************************
* wcscspn (NTDLL.@)
*/
INT
__cdecl
NTDLL_wcscspn
(
LPCWSTR
str
,
LPCWSTR
reject
)
size_t
__cdecl
NTDLL_wcscspn
(
LPCWSTR
str
,
LPCWSTR
reject
)
{
const
WCHAR
*
ptr
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
if
(
NTDLL_wcschr
(
reject
,
*
ptr
))
break
;
...
...
@@ -218,7 +219,7 @@ INT __cdecl NTDLL_wcscspn( LPCWSTR str, LPCWSTR reject )
/*********************************************************************
* wcsncat (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_wcsncat
(
LPWSTR
s1
,
LPCWSTR
s2
,
INT
n
)
LPWSTR
__cdecl
NTDLL_wcsncat
(
LPWSTR
s1
,
LPCWSTR
s2
,
size_t
n
)
{
LPWSTR
ret
=
s1
;
while
(
*
s1
)
s1
++
;
...
...
@@ -231,7 +232,7 @@ LPWSTR __cdecl NTDLL_wcsncat( LPWSTR s1, LPCWSTR s2, INT n )
/*********************************************************************
* wcsncmp (NTDLL.@)
*/
INT
__cdecl
NTDLL_wcsncmp
(
LPCWSTR
str1
,
LPCWSTR
str2
,
INT
n
)
int
__cdecl
NTDLL_wcsncmp
(
LPCWSTR
str1
,
LPCWSTR
str2
,
size_t
n
)
{
if
(
n
<=
0
)
return
0
;
while
((
--
n
>
0
)
&&
*
str1
&&
(
*
str1
==
*
str2
))
{
str1
++
;
str2
++
;
}
...
...
@@ -242,7 +243,7 @@ INT __cdecl NTDLL_wcsncmp( LPCWSTR str1, LPCWSTR str2, INT n )
/*********************************************************************
* wcsncpy (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_wcsncpy
(
LPWSTR
s1
,
LPCWSTR
s2
,
INT
n
)
LPWSTR
__cdecl
NTDLL_wcsncpy
(
LPWSTR
s1
,
LPCWSTR
s2
,
size_t
n
)
{
WCHAR
*
ret
=
s1
;
while
(
n
--
>
0
)
if
(
!
(
*
s1
++
=
*
s2
++
))
break
;
...
...
@@ -264,7 +265,7 @@ LPWSTR __cdecl NTDLL_wcspbrk( LPCWSTR str, LPCWSTR accept )
/*********************************************************************
* wcsrchr (NTDLL.@)
*/
LPWSTR
__cdecl
NTDLL_wcsrchr
(
LPWSTR
str
,
WCHAR
ch
)
LPWSTR
__cdecl
NTDLL_wcsrchr
(
LP
C
WSTR
str
,
WCHAR
ch
)
{
WCHAR
*
ret
=
NULL
;
do
{
if
(
*
str
==
ch
)
ret
=
(
WCHAR
*
)(
ULONG_PTR
)
str
;
}
while
(
*
str
++
);
...
...
@@ -275,7 +276,7 @@ LPWSTR __cdecl NTDLL_wcsrchr( LPWSTR str, WCHAR ch )
/*********************************************************************
* wcsspn (NTDLL.@)
*/
INT
__cdecl
NTDLL_wcsspn
(
LPCWSTR
str
,
LPCWSTR
accept
)
size_t
__cdecl
NTDLL_wcsspn
(
LPCWSTR
str
,
LPCWSTR
accept
)
{
const
WCHAR
*
ptr
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
if
(
!
NTDLL_wcschr
(
accept
,
*
ptr
))
break
;
...
...
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