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
4e269f75
Commit
4e269f75
authored
Jun 30, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add _ui64toa_s.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c45abb8a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-0
string.c
dlls/ntdll/string.c
+45
-0
No files found.
dlls/ntdll/ntdll.spec
View file @
4e269f75
...
...
@@ -1531,9 +1531,11 @@
@ cdecl _tolower(long)
@ cdecl _toupper(long)
@ cdecl _ui64toa(int64 ptr long)
@ cdecl _ui64toa_s(int64 ptr long long)
@ cdecl _ui64tow(int64 ptr long)
@ cdecl _ui64tow_s(int64 ptr long long)
@ cdecl _ultoa(long ptr long)
@ cdecl _ultoa_s(long ptr long long)
@ cdecl _ultow(long ptr long)
@ cdecl _ultow_s(long ptr long long)
@ cdecl -norelay _vsnprintf(ptr long str ptr)
...
...
dlls/ntdll/string.c
View file @
4e269f75
...
...
@@ -1214,6 +1214,51 @@ char * __cdecl _i64toa(
/*********************************************************************
* _ui64toa_s (NTDLL.@)
*/
errno_t
__cdecl
_ui64toa_s
(
unsigned
__int64
value
,
char
*
str
,
size_t
size
,
int
radix
)
{
char
buffer
[
65
],
*
pos
;
if
(
!
str
||
!
size
)
return
EINVAL
;
if
(
radix
<
2
||
radix
>
36
)
{
str
[
0
]
=
0
;
return
EINVAL
;
}
pos
=
buffer
+
64
;
*
pos
=
0
;
do
{
int
digit
=
value
%
radix
;
value
=
value
/
radix
;
if
(
digit
<
10
)
*--
pos
=
'0'
+
digit
;
else
*--
pos
=
'a'
+
digit
-
10
;
}
while
(
value
!=
0
);
if
(
buffer
-
pos
+
65
>
size
)
{
str
[
0
]
=
0
;
return
ERANGE
;
}
memcpy
(
str
,
pos
,
buffer
-
pos
+
65
);
return
0
;
}
/*********************************************************************
* _ultoa_s (NTDLL.@)
*/
errno_t
__cdecl
_ultoa_s
(
__msvcrt_ulong
value
,
char
*
str
,
size_t
size
,
int
radix
)
{
return
_ui64toa_s
(
value
,
str
,
size
,
radix
);
}
/*********************************************************************
* _atoi64 (NTDLL.@)
*
* Convert a string to a large integer.
...
...
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