Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a15c55e6
Commit
a15c55e6
authored
Jun 29, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add strlwr_s and wcslwr_s.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b44ebda3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
8 deletions
+39
-8
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-0
string.c
dlls/ntdll/string.c
+19
-2
wcstring.c
dlls/ntdll/wcstring.c
+18
-6
No files found.
dlls/ntdll/ntdll.spec
View file @
a15c55e6
...
...
@@ -1521,6 +1521,7 @@
@ cdecl _strcmpi(str str) _stricmp
@ cdecl _stricmp(str str)
@ cdecl _strlwr(str)
@ cdecl _strlwr_s(str long)
@ cdecl _strnicmp(str str long)
@ cdecl _strupr(str)
@ cdecl _tolower(long)
...
...
@@ -1536,6 +1537,7 @@
@ cdecl _vswprintf(ptr wstr ptr)
@ cdecl _wcsicmp(wstr wstr)
@ cdecl _wcslwr(wstr)
@ cdecl _wcslwr_s(wstr long)
@ cdecl _wcsnicmp(wstr wstr long)
@ cdecl _wcsupr(wstr)
@ cdecl _wtoi(wstr)
...
...
dlls/ntdll/string.c
View file @
a15c55e6
...
...
@@ -444,7 +444,7 @@ errno_t __cdecl strncpy_s( char *dst, size_t len, const char *src, size_t count
*/
size_t
__cdecl
strnlen
(
const
char
*
str
,
size_t
len
)
{
const
char
*
s
=
str
;
const
char
*
s
;
for
(
s
=
str
;
len
&&
*
s
;
s
++
,
len
--
)
;
return
s
-
str
;
}
...
...
@@ -620,12 +620,29 @@ LPSTR __cdecl _strupr( LPSTR str )
LPSTR
__cdecl
_strlwr
(
LPSTR
str
)
{
LPSTR
ret
=
str
;
for
(
;
*
str
;
str
++
)
*
str
=
tolower
(
*
str
)
;
for
(
;
*
str
;
str
++
)
if
(
*
str
>=
'A'
&&
*
str
<=
'Z'
)
*
str
+=
'a'
-
'A'
;
return
ret
;
}
/*********************************************************************
* _strlwr_s (NTDLL.@)
*/
errno_t
__cdecl
_strlwr_s
(
char
*
str
,
size_t
len
)
{
if
(
!
str
)
return
EINVAL
;
if
(
strnlen
(
str
,
len
)
==
len
)
{
*
str
=
0
;
return
EINVAL
;
}
_strlwr
(
str
);
return
0
;
}
/*********************************************************************
* toupper (NTDLL.@)
*/
int
__cdecl
toupper
(
int
c
)
...
...
dlls/ntdll/wcstring.c
View file @
a15c55e6
...
...
@@ -108,14 +108,26 @@ int __cdecl _wcsicmp( LPCWSTR str1, LPCWSTR str2 )
LPWSTR
__cdecl
_wcslwr
(
LPWSTR
str
)
{
WCHAR
*
ret
=
str
;
for
(
;
*
str
;
str
++
)
if
(
*
str
>=
'A'
&&
*
str
<=
'Z'
)
*
str
+=
'a'
-
'A'
;
return
ret
;
}
while
(
*
str
)
/*********************************************************************
* _wcslwr_s (NTDLL.@)
*/
errno_t
__cdecl
_wcslwr_s
(
wchar_t
*
str
,
size_t
len
)
{
if
(
!
str
)
return
EINVAL
;
if
(
wcsnlen
(
str
,
len
)
==
len
)
{
WCHAR
ch
=
*
str
;
if
(
ch
>=
'A'
&&
ch
<=
'Z'
)
ch
+=
32
;
*
str
++
=
ch
;
*
str
=
0
;
return
EINVAL
;
}
return
ret
;
_wcslwr
(
str
);
return
0
;
}
...
...
@@ -380,7 +392,7 @@ errno_t __cdecl wcsncpy_s( wchar_t *dst, size_t len, const wchar_t *src, size_t
*/
size_t
__cdecl
wcsnlen
(
const
WCHAR
*
str
,
size_t
len
)
{
const
WCHAR
*
s
=
str
;
const
WCHAR
*
s
;
for
(
s
=
str
;
len
&&
*
s
;
s
++
,
len
--
)
;
return
s
-
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