jscript: math.c added Math.log() function modified: dlls/jscript/math.c

Patrick Rudolph patrick1804 at web.de
Fri Dec 12 01:33:19 CST 2008


---
 dlls/jscript/math.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/dlls/jscript/math.c b/dlls/jscript/math.c
index c92ab0a..8f5bbb9 100644
--- a/dlls/jscript/math.c
+++ b/dlls/jscript/math.c
@@ -344,8 +344,23 @@ static HRESULT Math=5Ffloor(DispatchEx *dispex, LCID lc=
id, WORD flags, DISPPARAMS
 static HRESULT Math=5Flog(DispatchEx *dispex, LCID lcid, WORD flags, DISPPA=
RAMS *dp,
         VARIANT *retv, jsexcept=5Ft *ei, IServiceProvider *sp)
 {
-    FIXME("\n");
-    return E=5FNOTIMPL;
+   VARIANT v;
+    HRESULT hres;
+
+    TRACE("\n");
+
+    if(!arg=5Fcnt(dp)) {
+        FIXME("arg=5Fcnt =3D 0\n");
+        return E=5FNOTIMPL;
+    }
+
+    hres =3D to=5Fnumber(dispex->ctx, get=5Farg(dp, 0), ei, &v);
+    if(FAILED(hres))
+        return hres;
+
+    if(retv)
+        num=5Fset=5Fval(retv, log(num=5Fval(&v)));
+    return S=5FOK;
 }
=20
 /* ECMA-262 3rd Edition    15.8.2.11 */
--=20
1.5.6.3


=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Psssst! Schon vom neuen WEB.DE MultiMessenger geh=F6rt=3F=20
Der kann`s mit allen: http://www.produkte.web.de/messenger/=3Fdid=3D3123




More information about the wine-patches mailing list