mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
msvcrt: Added _atodbl_l implementation.
This commit is contained in:
parent
38bf8ac44b
commit
3b5ab1b48f
@ -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;
|
||||
|
||||
#define MSVCRT_FLT_MIN 1.175494351e-38F
|
||||
#define MSVCRT_DBL_MIN 2.2250738585072014e-308
|
||||
#define MSVCRT__OVERFLOW 3
|
||||
#define MSVCRT__UNDERFLOW 4
|
||||
|
||||
@ -994,4 +995,9 @@ typedef struct
|
||||
float f;
|
||||
} MSVCRT__CRT_FLOAT;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double x;
|
||||
} MSVCRT__CRT_DOUBLE;
|
||||
|
||||
#endif /* __WINE_MSVCRT_H */
|
||||
|
@ -300,8 +300,8 @@
|
||||
# stub _aligned_realloc_dbg(ptr long long str long)
|
||||
@ cdecl _amsg_exit(long)
|
||||
@ cdecl _assert(str str long) MSVCRT__assert
|
||||
@ stub _atodbl(ptr str)
|
||||
# stub _atodbl_l(ptr str ptr)
|
||||
@ cdecl _atodbl(ptr str) MSVCRT__atodbl
|
||||
@ cdecl _atodbl_l(ptr str ptr) MSVCRT__atodbl_l
|
||||
@ cdecl _atof_l(str ptr) MSVCRT__atof_l
|
||||
@ cdecl _atoflt_l(ptr str ptr) MSVCRT__atoflt_l
|
||||
@ cdecl -ret64 _atoi64(str) ntdll._atoi64
|
||||
|
@ -454,6 +454,29 @@ int CDECL MSVCRT__atoflt_l( MSVCRT__CRT_FLOAT *value, char *str, MSVCRT__locale_
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _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.@)
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user