Commit 3b5ab1b4 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Added _atodbl_l implementation.

parent 38bf8ac4
...@@ -986,6 +986,7 @@ int pf_printf_w(puts_clbk_w, void*, const MSVCRT_wchar_t*, MSVCRT__locale_t, ...@@ -986,6 +986,7 @@ int pf_printf_w(puts_clbk_w, void*, const MSVCRT_wchar_t*, MSVCRT__locale_t,
printf_arg arg_clbk_valist(void*, int, int, __ms_va_list*) DECLSPEC_HIDDEN; printf_arg arg_clbk_valist(void*, int, int, __ms_va_list*) DECLSPEC_HIDDEN;
#define MSVCRT_FLT_MIN 1.175494351e-38F #define MSVCRT_FLT_MIN 1.175494351e-38F
#define MSVCRT_DBL_MIN 2.2250738585072014e-308
#define MSVCRT__OVERFLOW 3 #define MSVCRT__OVERFLOW 3
#define MSVCRT__UNDERFLOW 4 #define MSVCRT__UNDERFLOW 4
...@@ -994,4 +995,9 @@ typedef struct ...@@ -994,4 +995,9 @@ typedef struct
float f; float f;
} MSVCRT__CRT_FLOAT; } MSVCRT__CRT_FLOAT;
typedef struct
{
double x;
} MSVCRT__CRT_DOUBLE;
#endif /* __WINE_MSVCRT_H */ #endif /* __WINE_MSVCRT_H */
...@@ -300,8 +300,8 @@ ...@@ -300,8 +300,8 @@
# stub _aligned_realloc_dbg(ptr long long str long) # stub _aligned_realloc_dbg(ptr long long str long)
@ cdecl _amsg_exit(long) @ cdecl _amsg_exit(long)
@ cdecl _assert(str str long) MSVCRT__assert @ cdecl _assert(str str long) MSVCRT__assert
@ stub _atodbl(ptr str) @ cdecl _atodbl(ptr str) MSVCRT__atodbl
# stub _atodbl_l(ptr str ptr) @ cdecl _atodbl_l(ptr str ptr) MSVCRT__atodbl_l
@ cdecl _atof_l(str ptr) MSVCRT__atof_l @ cdecl _atof_l(str ptr) MSVCRT__atof_l
@ 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
......
...@@ -455,6 +455,29 @@ int CDECL MSVCRT__atoflt_l( MSVCRT__CRT_FLOAT *value, char *str, MSVCRT__locale_ ...@@ -455,6 +455,29 @@ int CDECL MSVCRT__atoflt_l( MSVCRT__CRT_FLOAT *value, char *str, MSVCRT__locale_
} }
/********************************************************************* /*********************************************************************
* _atodbl_l (MSVCRT.@)
*/
int CDECL MSVCRT__atodbl_l(MSVCRT__CRT_DOUBLE *value, char *str, MSVCRT__locale_t locale)
{
int err;
value->x = strtod_helper(str, NULL, locale, &err);
if(isinf(value->x))
return MSVCRT__OVERFLOW;
if((value->x!=0 || err) && value->x>-MSVCRT_DBL_MIN && value->x<MSVCRT_DBL_MIN)
return MSVCRT__UNDERFLOW;
return 0;
}
/*********************************************************************
* _atodbl (MSVCRT.@)
*/
int CDECL MSVCRT__atodbl(MSVCRT__CRT_DOUBLE *value, char *str)
{
return MSVCRT__atodbl_l(value, str, NULL);
}
/*********************************************************************
* _strcoll_l (MSVCRT.@) * _strcoll_l (MSVCRT.@)
*/ */
int CDECL MSVCRT_strcoll_l( const char* str1, const char* str2, MSVCRT__locale_t locale ) int CDECL MSVCRT_strcoll_l( const char* str1, const char* str2, MSVCRT__locale_t locale )
......
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