msvcrt: Add __STRINGTOLD_L and _atoldbl_l partial stubs.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-07-23 15:38:21 +02:00 committed by Alexandre Julliard
parent ddd43e0a80
commit 413e34df58
11 changed files with 51 additions and 37 deletions

View File

@ -9,7 +9,7 @@
@ cdecl _atoi_l(str ptr) ucrtbase._atoi_l
@ cdecl _atol_l(str ptr) ucrtbase._atol_l
@ cdecl _atoldbl(ptr str) ucrtbase._atoldbl
@ stub _atoldbl_l
@ cdecl _atoldbl_l(ptr str ptr) ucrtbase._atoldbl_l
@ cdecl -ret64 _atoll_l(str ptr) ucrtbase._atoll_l
@ cdecl _ecvt(double long ptr ptr) ucrtbase._ecvt
@ cdecl _ecvt_s(str long double long ptr ptr) ucrtbase._ecvt_s

View File

@ -187,7 +187,7 @@
@ cdecl _o__atoi_l(str ptr) ucrtbase._o__atoi_l
@ cdecl _o__atol_l(str ptr) ucrtbase._o__atol_l
@ cdecl _o__atoldbl(ptr str) ucrtbase._o__atoldbl
@ stub _o__atoldbl_l
@ cdecl _o__atoldbl_l(ptr str ptr) ucrtbase._o__atoldbl_l
@ cdecl -ret64 _o__atoll_l(str ptr) ucrtbase._o__atoll_l
@ cdecl _o__beep(long long) ucrtbase._o__beep
@ cdecl _o__beginthread(ptr long ptr) ucrtbase._o__beginthread

View File

@ -562,7 +562,7 @@
@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast
@ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid
@ cdecl __STRINGTOLD(ptr ptr str long)
@ stub __STRINGTOLD_L
@ cdecl __STRINGTOLD_L(ptr ptr str long ptr)
@ stub __TypeMatch
@ cdecl ___lc_codepage_func()
@ cdecl ___lc_collate_cp_func()
@ -701,7 +701,7 @@
@ cdecl _atoi_l(str ptr) MSVCRT__atoi_l
@ cdecl _atol_l(str ptr) MSVCRT__atol_l
@ cdecl _atoldbl(ptr str) MSVCRT__atoldbl
@ stub _atoldbl_l
@ cdecl _atoldbl_l(ptr str ptr) MSVCRT__atoldbl_l
@ cdecl _beep(long long) MSVCRT__beep
@ cdecl _beginthread(ptr long ptr)
@ cdecl _beginthreadex(ptr long ptr ptr long ptr)

View File

@ -889,7 +889,7 @@
@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast
@ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid
@ cdecl __STRINGTOLD(ptr ptr str long)
@ stub __STRINGTOLD_L
@ cdecl __STRINGTOLD_L(ptr ptr str long ptr)
@ stub __TypeMatch
@ cdecl ___lc_codepage_func()
@ cdecl ___lc_collate_cp_func()
@ -1049,7 +1049,7 @@
@ cdecl _atoi_l(str ptr) MSVCRT__atoi_l
@ cdecl _atol_l(str ptr) MSVCRT__atol_l
@ cdecl _atoldbl(ptr str) MSVCRT__atoldbl
@ stub _atoldbl_l
@ cdecl _atoldbl_l(ptr str ptr) MSVCRT__atoldbl_l
@ cdecl _beep(long long) MSVCRT__beep
@ cdecl _beginthread(ptr long ptr)
@ cdecl _beginthreadex(ptr long ptr ptr long ptr)

View File

@ -874,7 +874,7 @@
@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast
@ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid
@ cdecl __STRINGTOLD(ptr ptr str long)
@ stub __STRINGTOLD_L
@ cdecl __STRINGTOLD_L(ptr ptr str long ptr)
@ stub __TypeMatch
@ cdecl ___lc_codepage_func()
@ cdecl ___lc_collate_cp_func()
@ -1039,7 +1039,7 @@
@ cdecl _atoi_l(str ptr) MSVCRT__atoi_l
@ cdecl _atol_l(str ptr) MSVCRT__atol_l
@ cdecl _atoldbl(ptr str) MSVCRT__atoldbl
@ stub _atoldbl_l
@ cdecl _atoldbl_l(ptr str ptr) MSVCRT__atoldbl_l
@ cdecl -ret64 _atoll_l(str ptr) MSVCRT__atoll_l
@ cdecl _beep(long long) MSVCRT__beep
@ cdecl _beginthread(ptr long ptr)

View File

@ -868,7 +868,7 @@
@ cdecl __RTDynamicCast(ptr long ptr ptr long) msvcr120.__RTDynamicCast
@ cdecl __RTtypeid(ptr) msvcr120.__RTtypeid
@ cdecl __STRINGTOLD(ptr ptr str long) msvcr120.__STRINGTOLD
@ stub __STRINGTOLD_L
@ cdecl __STRINGTOLD_L(ptr ptr str long ptr) msvcr120.__STRINGTOLD_L
@ stub __TypeMatch
@ cdecl ___lc_codepage_func() msvcr120.___lc_codepage_func
@ cdecl ___lc_collate_cp_func() msvcr120.___lc_collate_cp_func
@ -1010,7 +1010,7 @@
@ cdecl _atoi_l(str ptr) msvcr120._atoi_l
@ cdecl _atol_l(str ptr) msvcr120._atol_l
@ cdecl _atoldbl(ptr str) msvcr120._atoldbl
@ stub _atoldbl_l
@ cdecl _atoldbl_l(ptr str ptr) msvcr120._atoldbl_l
@ cdecl -ret64 _atoll_l(str ptr) msvcr120._atoll_l
@ cdecl _byteswap_uint64(int64) msvcr120._byteswap_uint64
@ cdecl _byteswap_ulong(long) msvcr120._byteswap_ulong

View File

@ -196,7 +196,7 @@
@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast
@ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid
@ cdecl __STRINGTOLD(ptr ptr str long)
@ stub __STRINGTOLD_L
@ cdecl __STRINGTOLD_L(ptr ptr str long ptr)
@ stub __TypeMatch
@ cdecl ___lc_codepage_func()
@ cdecl ___lc_collate_cp_func()
@ -365,7 +365,7 @@
@ cdecl _atoi_l(str ptr) MSVCRT__atoi_l
@ cdecl _atol_l(str ptr) MSVCRT__atol_l
@ cdecl _atoldbl(ptr str) MSVCRT__atoldbl
@ stub _atoldbl_l
@ cdecl _atoldbl_l(ptr str ptr) MSVCRT__atoldbl_l
@ cdecl _beep(long long) MSVCRT__beep
@ cdecl _beginthread(ptr long ptr)
@ cdecl _beginthreadex(ptr long ptr ptr long ptr)

View File

@ -187,7 +187,7 @@
@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast
@ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid
@ cdecl __STRINGTOLD(ptr ptr str long)
@ stub __STRINGTOLD_L
@ cdecl __STRINGTOLD_L(ptr ptr str long ptr)
@ stub __TypeMatch
@ cdecl ___lc_codepage_func()
@ cdecl ___lc_collate_cp_func()
@ -349,7 +349,7 @@
@ cdecl _atoi_l(str ptr) MSVCRT__atoi_l
@ cdecl _atol_l(str ptr) MSVCRT__atol_l
@ cdecl _atoldbl(ptr str) MSVCRT__atoldbl
@ stub _atoldbl_l
@ cdecl _atoldbl_l(ptr str ptr) MSVCRT__atoldbl_l
@ cdecl _beep(long long) MSVCRT__beep
@ cdecl _beginthread(ptr long ptr)
@ cdecl _beginthreadex(ptr long ptr ptr long ptr)

View File

@ -336,7 +336,7 @@
@ cdecl _atoi_l(str ptr) MSVCRT__atoi_l
@ cdecl _atol_l(str ptr) MSVCRT__atol_l
@ cdecl _atoldbl(ptr str) MSVCRT__atoldbl
# stub _atoldbl_l(ptr str ptr)
@ cdecl _atoldbl_l(ptr str ptr) MSVCRT__atoldbl_l
@ cdecl _beep(long long) MSVCRT__beep
@ cdecl _beginthread (ptr long ptr)
@ cdecl _beginthreadex (ptr long ptr ptr long ptr)

View File

@ -1233,18 +1233,18 @@ MSVCRT_size_t CDECL MSVCRT_strxfrm( char *dest, const char *src, MSVCRT_size_t l
}
/********************************************************************
* _atoldbl (MSVCRT.@)
* __STRINGTOLD_L (MSVCR80.@)
*/
int CDECL MSVCRT__atoldbl(MSVCRT__LDOUBLE *value, const char *str)
int CDECL __STRINGTOLD_L( MSVCRT__LDOUBLE *value, char **endptr,
const char *str, int flags, MSVCRT__locale_t locale )
{
/* FIXME needs error checking for huge/small values */
#ifdef HAVE_STRTOLD
long double ld;
TRACE("str %s value %p\n",str,value);
FIXME("%p %p %s %x %p partial stub\n", value, endptr, str, flags, locale );
ld = strtold(str,0);
memcpy(value, &ld, 10);
#else
FIXME("stub, str %s value %p\n",str,value);
FIXME("%p %p %s %x stub\n", value, endptr, str, flags );
#endif
return 0;
}
@ -1254,15 +1254,29 @@ int CDECL MSVCRT__atoldbl(MSVCRT__LDOUBLE *value, const char *str)
*/
int CDECL __STRINGTOLD( MSVCRT__LDOUBLE *value, char **endptr, const char *str, int flags )
{
#ifdef HAVE_STRTOLD
long double ld;
FIXME("%p %p %s %x partial stub\n", value, endptr, str, flags );
ld = strtold(str,0);
memcpy(value, &ld, 10);
#else
FIXME("%p %p %s %x stub\n", value, endptr, str, flags );
#endif
return 0;
return __STRINGTOLD_L( value, endptr, str, flags, NULL );
}
/********************************************************************
* _atoldbl_l (MSVCRT.@)
*/
int CDECL MSVCRT__atoldbl_l( MSVCRT__LDOUBLE *value, const char *str, MSVCRT__locale_t locale )
{
char *endptr;
switch(__STRINGTOLD_L( value, &endptr, str, 0, locale ))
{
case 1: return MSVCRT__UNDERFLOW;
case 2: return MSVCRT__OVERFLOW;
default: return 0;
}
}
/********************************************************************
* _atoldbl (MSVCRT.@)
*/
int CDECL MSVCRT__atoldbl(MSVCRT__LDOUBLE *value, const char *str)
{
return MSVCRT__atoldbl_l( value, str, NULL );
}
/*********************************************************************

View File

@ -200,7 +200,7 @@
@ cdecl _atoi_l(str ptr) MSVCRT__atoi_l
@ cdecl _atol_l(str ptr) MSVCRT__atol_l
@ cdecl _atoldbl(ptr str) MSVCRT__atoldbl
@ stub _atoldbl_l
@ cdecl _atoldbl_l(ptr str ptr) MSVCRT__atoldbl_l
@ cdecl -ret64 _atoll_l(str ptr) MSVCRT__atoll_l
@ cdecl _beep(long long) MSVCRT__beep
@ cdecl _beginthread(ptr long ptr)
@ -851,7 +851,7 @@
@ cdecl _o__atoi_l(str ptr) MSVCRT__atoi_l
@ cdecl _o__atol_l(str ptr) MSVCRT__atol_l
@ cdecl _o__atoldbl(ptr str) MSVCRT__atoldbl
@ stub _o__atoldbl_l
@ cdecl _o__atoldbl_l(ptr str ptr) MSVCRT__atoldbl_l
@ cdecl -ret64 _o__atoll_l(str ptr) MSVCRT__atoll_l
@ cdecl _o__beep(long long) MSVCRT__beep
@ cdecl _o__beginthread(ptr long ptr) _beginthread