Piotr Caban : msvcp90: Added _Stodx implementation.
Module: wine Branch: master Commit: 1e4d0c4fbf17513a83f4e405cf59d879d8aca212 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1e4d0c4fbf17513a83f4e405cf... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jun 20 13:14:37 2012 +0200 msvcp90: Added _Stodx implementation. --- dlls/msvcp90/locale.c | 26 ++++++++++++++++++++++++++ dlls/msvcp90/msvcp90.spec | 8 ++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index e415807..1330d17 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -24,6 +24,7 @@ #include "locale.h" #include "errno.h" #include "limits.h" +#include "math.h" #include "wine/list.h" @@ -3871,6 +3872,31 @@ basic_string_wchar* __thiscall numpunct_wchar_truename(const numpunct_wchar *thi return call_numpunct_wchar_do_truename(this, ret); } +double __cdecl _Stod(const char *buf, char **buf_end, LONG exp) +{ + double ret = strtod(buf, buf_end); + + if(exp) + ret *= pow(10, exp); + return ret; +} + +double __cdecl _Stodx(const char *buf, char **buf_end, LONG exp, int *err) +{ + double ret; + + *err = *_errno(); + *_errno() = 0; + ret = _Stod(buf, buf_end, exp); + if(*_errno()) { + *err = *_errno(); + }else { + *_errno() = *err; + *err = 0; + } + return ret; +} + /* ?id@?$num_get(a)_WV?$istreambuf_iterator(a)_WU?$char_traits(a)_W@std@@@std@@@std@@2V0locale(a)2@A */ locale_id num_get_wchar_id = {0}; /* ?id@?$num_get(a)GV?$istreambuf_iterator(a)GU?$char_traits(a)G@std@@@std@@@std@@2V0locale(a)2@A */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index a5976e1..3d15518 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5783,12 +5783,12 @@ # extern _Rteps @ stub _Sinh @ extern _Snan -@ stub _Stod -@ stub _Stodx +@ cdecl _Stod(ptr ptr long) +@ cdecl _Stodx(ptr ptr long ptr) @ stub _Stof @ stub _Stofx -@ stub _Stold -@ stub _Stoldx +@ cdecl _Stold(ptr ptr long) _Stod +@ cdecl _Stoldx(ptr ptr long ptr) _Stodx @ stub _Stoll @ stub _Stollx @ stub _Stolx
participants (1)
-
Alexandre Julliard