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
beca1d73
Commit
beca1d73
authored
Nov 15, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implemented _i64to[aw]_s.
parent
28884a8f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
164 additions
and
8 deletions
+164
-8
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+2
-2
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+2
-2
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+2
-2
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-2
string.c
dlls/msvcrt/string.c
+156
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
beca1d73
...
...
@@ -731,9 +731,9 @@
@ cdecl _hypot(double double) msvcrt._hypot
@ cdecl _hypotf(float float) msvcrt._hypotf
@ cdecl _i64toa(int64 ptr long) msvcrt._i64toa
@
stub
_i64toa_s
@
cdecl _i64toa_s(int64 ptr long long) msvcrt.
_i64toa_s
@ cdecl _i64tow(int64 ptr long) msvcrt._i64tow
@
stub
_i64tow_s
@
cdecl _i64tow_s(int64 ptr long long) msvcrt.
_i64tow_s
@ stub _initptd
@ cdecl _initterm(ptr ptr) msvcrt._initterm
@ cdecl _initterm_e(ptr ptr) msvcr90._initterm_e
...
...
dlls/msvcr80/msvcr80.spec
View file @
beca1d73
...
...
@@ -578,9 +578,9 @@
@ cdecl _hypot(double double) msvcrt._hypot
@ cdecl _hypotf(float float) msvcrt._hypotf
@ cdecl _i64toa(int64 ptr long) msvcrt._i64toa
@
stub
_i64toa_s
@
cdecl _i64toa_s(int64 ptr long long) msvcrt.
_i64toa_s
@ cdecl _i64tow(int64 ptr long) msvcrt._i64tow
@
stub
_i64tow_s
@
cdecl _i64tow_s(int64 ptr long long) msvcrt.
_i64tow_s
@ stub _initptd
@ cdecl _initterm(ptr ptr) msvcrt._initterm
@ cdecl _initterm_e(ptr ptr) msvcr90._initterm_e
...
...
dlls/msvcr90/msvcr90.spec
View file @
beca1d73
...
...
@@ -566,9 +566,9 @@
@ cdecl _hypot(double double) msvcrt._hypot
@ cdecl _hypotf(float float) msvcrt._hypotf
@ cdecl _i64toa(int64 ptr long) msvcrt._i64toa
@
stub
_i64toa_s
@
cdecl _i64toa_s(int64 ptr long long) msvcrt.
_i64toa_s
@ cdecl _i64tow(int64 ptr long) msvcrt._i64tow
@
stub
_i64tow_s
@
cdecl _i64tow_s(int64 ptr long long) msvcrt.
_i64tow_s
@ stub _initptd
@ cdecl _initterm(ptr ptr) msvcrt._initterm
@ cdecl _initterm_e(ptr ptr)
...
...
dlls/msvcrt/msvcrt.spec
View file @
beca1d73
...
...
@@ -515,9 +515,9 @@
@ cdecl _hypot(double double)
@ cdecl _hypotf(float float)
@ cdecl _i64toa(int64 ptr long) ntdll._i64toa
# stub
_i64toa_s
@ cdecl _i64toa_s(int64 ptr long long)
_i64toa_s
@ cdecl _i64tow(int64 ptr long) ntdll._i64tow
# stub
_i64tow_s
@ cdecl _i64tow_s(int64 ptr long long)
_i64tow_s
@ cdecl _initterm(ptr ptr)
# stub _initterm_e
@ stub _inp #(long) -i386
...
...
dlls/msvcrt/string.c
View file @
beca1d73
...
...
@@ -972,6 +972,162 @@ int CDECL _ultoa_s(MSVCRT_ulong value, char *str, MSVCRT_size_t size, int radix)
return
0
;
}
/*********************************************************************
* _i64toa_s (MSVCRT.@)
*/
int
CDECL
_i64toa_s
(
__int64
value
,
char
*
str
,
MSVCRT_size_t
size
,
int
radix
)
{
unsigned
__int64
val
;
unsigned
int
digit
;
int
is_negative
;
char
buffer
[
65
],
*
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
+
64
;
*
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
+
65
-
pos
;
if
(
len
>
size
)
{
size_t
i
;
char
*
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
+
63
,
i
=
0
;
i
<
size
;
i
++
)
*
p
++
=
*
pos
--
;
str
[
0
]
=
'\0'
;
MSVCRT_INVALID_PMT
(
"str[size] is too small"
);
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
return
MSVCRT_ERANGE
;
}
memcpy
(
str
,
pos
,
len
);
return
0
;
}
/*********************************************************************
* _i64tow_s (MSVCRT.@)
*/
int
CDECL
_i64tow_s
(
__int64
value
,
MSVCRT_wchar_t
*
str
,
MSVCRT_size_t
size
,
int
radix
)
{
unsigned
__int64
val
;
unsigned
int
digit
;
int
is_negative
;
MSVCRT_wchar_t
buffer
[
65
],
*
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
+
64
;
*
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
+
65
-
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
+
63
,
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
;
}
#define I10_OUTPUT_MAX_PREC 21
/* Internal structure used by $I10_OUTPUT */
struct
_I10_OUTPUT_DATA
{
...
...
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