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
af2bc15e
Commit
af2bc15e
authored
Nov 02, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implemented _itow_s.
parent
347049bc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
4 deletions
+81
-4
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
string.c
dlls/msvcrt/string.c
+77
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
af2bc15e
...
...
@@ -836,7 +836,7 @@
@ cdecl _itoa(long ptr long) msvcrt._itoa
@ cdecl _itoa_s(long ptr long long) msvcrt._itoa_s
@ cdecl _itow(long ptr long) msvcrt._itow
@
stub
_itow_s
@
cdecl _itow_s(long ptr long long) msvcrt.
_itow_s
@ cdecl _j0(double) msvcrt._j0
@ cdecl _j1(double) msvcrt._j1
@ cdecl _jn(long double) msvcrt._jn
...
...
dlls/msvcr80/msvcr80.spec
View file @
af2bc15e
...
...
@@ -682,7 +682,7 @@
@ cdecl _itoa(long ptr long) msvcrt._itoa
@ cdecl _itoa_s(long ptr long long) msvcrt._itoa_s
@ cdecl _itow(long ptr long) msvcrt._itow
@
stub
_itow_s
@
cdecl _itow_s(long ptr long long) msvcrt.
_itow_s
@ cdecl _j0(double) msvcrt._j0
@ cdecl _j1(double) msvcrt._j1
@ cdecl _jn(long double) msvcrt._jn
...
...
dlls/msvcr90/msvcr90.spec
View file @
af2bc15e
...
...
@@ -670,7 +670,7 @@
@ cdecl _itoa(long ptr long) msvcrt._itoa
@ cdecl _itoa_s(long ptr long long) msvcrt._itoa_s
@ cdecl _itow(long ptr long) msvcrt._itow
@
stub
_itow_s
@
cdecl _itow_s(long ptr long long) msvcrt.
_itow_s
@ cdecl _j0(double) msvcrt._j0
@ cdecl _j1(double) msvcrt._j1
@ cdecl _jn(long double) msvcrt._jn
...
...
dlls/msvcrt/msvcrt.spec
View file @
af2bc15e
...
...
@@ -611,7 +611,7 @@
@ cdecl _itoa(long ptr long) ntdll._itoa
@ cdecl _itoa_s(long ptr long long)
@ cdecl _itow(long ptr long) ntdll._itow
# stub _itow_s
@ cdecl _itow_s(long ptr long long)
@ cdecl _j0(double)
@ cdecl _j1(double)
@ cdecl _jn(long double)
...
...
dlls/msvcrt/string.c
View file @
af2bc15e
...
...
@@ -746,6 +746,83 @@ int CDECL _itoa_s(int value, char *str, MSVCRT_size_t size, int radix)
}
/*********************************************************************
* _itow_s (MSVCRT.@)
*/
int
CDECL
_itow_s
(
int
value
,
MSVCRT_wchar_t
*
str
,
MSVCRT_size_t
size
,
int
radix
)
{
unsigned
int
val
,
digit
;
int
is_negative
;
MSVCRT_wchar_t
buffer
[
33
],
*
pos
;
size_t
len
;
if
(
!
MSVCRT_CHECK_PMT
(
str
!=
NULL
)
||
!
MSVCRT_CHECK_PMT
(
size
>
0
)
||
!
MSVCRT_CHECK_PMT
(
radix
>=
2
)
||
!
MSVCRT_CHECK_PMT
(
radix
<=
36
))
{
if
(
str
&&
size
)
str
[
0
]
=
'\0'
;
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
MSVCRT_EINVAL
;
}
if
(
value
<
0
&&
radix
==
10
)
{
is_negative
=
1
;
val
=
-
value
;
}
else
{
is_negative
=
0
;
val
=
value
;
}
pos
=
buffer
+
32
;
*
pos
=
'\0'
;
do
{
digit
=
val
%
radix
;
val
/=
radix
;
if
(
digit
<
10
)
*--
pos
=
'0'
+
digit
;
else
*--
pos
=
'a'
+
digit
-
10
;
}
while
(
val
!=
0
);
if
(
is_negative
)
*--
pos
=
'-'
;
len
=
buffer
+
33
-
pos
;
if
(
len
>
size
)
{
size_t
i
;
MSVCRT_wchar_t
*
p
=
str
;
/* Copy the temporary buffer backwards up to the available number of
* characters. Don't copy the negative sign if present. */
if
(
is_negative
)
{
p
++
;
size
--
;
}
for
(
pos
=
buffer
+
31
,
i
=
0
;
i
<
size
;
i
++
)
*
p
++
=
*
pos
--
;
MSVCRT_INVALID_PMT
(
"str[size] is too small"
);
str
[
0
]
=
'\0'
;
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
return
MSVCRT_ERANGE
;
}
memcpy
(
str
,
pos
,
len
*
sizeof
(
MSVCRT_wchar_t
));
return
0
;
}
/*********************************************************************
* _ui64toa_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__ui64toa_s
(
unsigned
__int64
value
,
char
*
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