msvcrt: Added _atoi_l implementation.

oldstable
Piotr Caban 2012-12-12 11:16:19 +01:00 committed by Alexandre Julliard
parent 3acb238f15
commit b5cf3057e9
5 changed files with 21 additions and 4 deletions

View File

@ -693,7 +693,7 @@
@ cdecl _atoflt_l(ptr str ptr) msvcrt._atoflt_l
@ cdecl -ret64 _atoi64(str) msvcrt._atoi64
@ stub _atoi64_l
@ stub _atoi_l
@ cdecl _atoi_l(str ptr) msvcrt._atoi_l
@ stub _atol_l
@ cdecl _atoldbl(ptr str) msvcrt._atoldbl
@ stub _atoldbl_l

View File

@ -349,7 +349,7 @@
@ cdecl _atoflt_l(ptr str ptr) msvcrt._atoflt_l
@ cdecl -ret64 _atoi64(str) msvcrt._atoi64
@ stub _atoi64_l
@ stub _atoi_l
@ cdecl _atoi_l(str ptr) msvcrt._atoi_l
@ stub _atol_l
@ cdecl _atoldbl(ptr str) msvcrt._atoldbl
@ stub _atoldbl_l

View File

@ -341,7 +341,7 @@
@ cdecl _atoflt_l(ptr str ptr) msvcrt._atoflt_l
@ cdecl -ret64 _atoi64(str) msvcrt._atoi64
@ stub _atoi64_l
@ stub _atoi_l
@ cdecl _atoi_l(str ptr) msvcrt._atoi_l
@ stub _atol_l
@ cdecl _atoldbl(ptr str) msvcrt._atoldbl
@ stub _atoldbl_l

View File

@ -306,7 +306,7 @@
@ cdecl _atoflt_l(ptr str ptr) MSVCRT__atoflt_l
@ cdecl -ret64 _atoi64(str) ntdll._atoi64
# stub -ret64 _atoi64_l(str ptr)
# stub _atoi_l(str ptr)
@ cdecl _atoi_l(str ptr) MSVCRT__atoi_l
# stub _atol_l(str ptr)
@ cdecl _atoldbl(ptr str) MSVCRT__atoldbl
# stub _atoldbl_l(ptr str ptr)

View File

@ -914,6 +914,23 @@ __int64 CDECL MSVCRT_strtoi64(const char *nptr, char **endptr, int base)
return MSVCRT_strtoi64_l(nptr, endptr, base, NULL);
}
/*********************************************************************
* _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.@)
*