Commit b5cf3057 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Added _atoi_l implementation.

parent 3acb238f
...@@ -693,7 +693,7 @@ ...@@ -693,7 +693,7 @@
@ cdecl _atoflt_l(ptr str ptr) msvcrt._atoflt_l @ cdecl _atoflt_l(ptr str ptr) msvcrt._atoflt_l
@ cdecl -ret64 _atoi64(str) msvcrt._atoi64 @ cdecl -ret64 _atoi64(str) msvcrt._atoi64
@ stub _atoi64_l @ stub _atoi64_l
@ stub _atoi_l @ cdecl _atoi_l(str ptr) msvcrt._atoi_l
@ stub _atol_l @ stub _atol_l
@ cdecl _atoldbl(ptr str) msvcrt._atoldbl @ cdecl _atoldbl(ptr str) msvcrt._atoldbl
@ stub _atoldbl_l @ stub _atoldbl_l
......
...@@ -349,7 +349,7 @@ ...@@ -349,7 +349,7 @@
@ cdecl _atoflt_l(ptr str ptr) msvcrt._atoflt_l @ cdecl _atoflt_l(ptr str ptr) msvcrt._atoflt_l
@ cdecl -ret64 _atoi64(str) msvcrt._atoi64 @ cdecl -ret64 _atoi64(str) msvcrt._atoi64
@ stub _atoi64_l @ stub _atoi64_l
@ stub _atoi_l @ cdecl _atoi_l(str ptr) msvcrt._atoi_l
@ stub _atol_l @ stub _atol_l
@ cdecl _atoldbl(ptr str) msvcrt._atoldbl @ cdecl _atoldbl(ptr str) msvcrt._atoldbl
@ stub _atoldbl_l @ stub _atoldbl_l
......
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
@ cdecl _atoflt_l(ptr str ptr) msvcrt._atoflt_l @ cdecl _atoflt_l(ptr str ptr) msvcrt._atoflt_l
@ cdecl -ret64 _atoi64(str) msvcrt._atoi64 @ cdecl -ret64 _atoi64(str) msvcrt._atoi64
@ stub _atoi64_l @ stub _atoi64_l
@ stub _atoi_l @ cdecl _atoi_l(str ptr) msvcrt._atoi_l
@ stub _atol_l @ stub _atol_l
@ cdecl _atoldbl(ptr str) msvcrt._atoldbl @ cdecl _atoldbl(ptr str) msvcrt._atoldbl
@ stub _atoldbl_l @ stub _atoldbl_l
......
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
@ cdecl _atoflt_l(ptr str ptr) MSVCRT__atoflt_l @ cdecl _atoflt_l(ptr str ptr) MSVCRT__atoflt_l
@ cdecl -ret64 _atoi64(str) ntdll._atoi64 @ cdecl -ret64 _atoi64(str) ntdll._atoi64
# stub -ret64 _atoi64_l(str ptr) # stub -ret64 _atoi64_l(str ptr)
# stub _atoi_l(str ptr) @ cdecl _atoi_l(str ptr) MSVCRT__atoi_l
# stub _atol_l(str ptr) # stub _atol_l(str ptr)
@ cdecl _atoldbl(ptr str) MSVCRT__atoldbl @ cdecl _atoldbl(ptr str) MSVCRT__atoldbl
# stub _atoldbl_l(ptr str ptr) # stub _atoldbl_l(ptr str ptr)
......
...@@ -915,6 +915,23 @@ __int64 CDECL MSVCRT_strtoi64(const char *nptr, char **endptr, int base) ...@@ -915,6 +915,23 @@ __int64 CDECL MSVCRT_strtoi64(const char *nptr, char **endptr, int base)
} }
/********************************************************************* /*********************************************************************
* _atoi_l (MSVCRT.@)
*/
int MSVCRT__atoi_l(const char *str, MSVCRT__locale_t locale)
{
__int64 ret = MSVCRT_strtoi64_l(str, NULL, 10, locale);
if(ret > INT_MAX) {
ret = INT_MAX;
*MSVCRT__errno() = MSVCRT_ERANGE;
} else if(ret < INT_MIN) {
ret = INT_MIN;
*MSVCRT__errno() = MSVCRT_ERANGE;
}
return ret;
}
/*********************************************************************
* _strtoui64_l (MSVCRT.@) * _strtoui64_l (MSVCRT.@)
* *
* FIXME: locale parameter is ignored * FIXME: locale parameter is ignored
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment