[PATCH 15/23] dlls/jscript: enable compilation with long types

Eric Pouech eric.pouech at gmail.com
Fri Feb 11 01:41:11 CST 2022


Signed-off-by: Eric Pouech <eric.pouech at gmail.com>

---
 dlls/jscript/Makefile.in    |    1 -
 dlls/jscript/activex.c      |    2 +-
 dlls/jscript/array.c        |    4 ++-
 dlls/jscript/dispex.c       |   56 ++++++++++++++++++++++---------------------
 dlls/jscript/engine.c       |   20 ++++++++-------
 dlls/jscript/error.c        |    2 +-
 dlls/jscript/global.c       |    2 +-
 dlls/jscript/jscript.c      |   38 +++++++++++++++--------------
 dlls/jscript/jscript_main.c |    4 ++-
 dlls/jscript/jsregexp.c     |    2 +-
 dlls/jscript/jsutils.c      |    4 ++-
 dlls/jscript/regexp.c       |    6 ++---
 dlls/jscript/string.c       |    6 ++---
 13 files changed, 73 insertions(+), 74 deletions(-)

diff --git a/dlls/jscript/Makefile.in b/dlls/jscript/Makefile.in
index 45d9856035e..3e019201eb8 100644
--- a/dlls/jscript/Makefile.in
+++ b/dlls/jscript/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
 MODULE    = jscript.dll
 IMPORTS   = oleaut32 ole32 user32 advapi32
 
diff --git a/dlls/jscript/activex.c b/dlls/jscript/activex.c
index 80a89b5ae89..42cb513dd64 100644
--- a/dlls/jscript/activex.c
+++ b/dlls/jscript/activex.c
@@ -156,7 +156,7 @@ static HRESULT ActiveXObject_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
 
     if(ctx->safeopt != (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER)
         && ctx->safeopt != INTERFACE_USES_DISPEX) {
-        FIXME("Unsupported safeopt %x\n", ctx->safeopt);
+        FIXME("Unsupported safeopt %lx\n", ctx->safeopt);
         return E_NOTIMPL;
     }
 
diff --git a/dlls/jscript/array.c b/dlls/jscript/array.c
index 56727f905f3..6ee18090207 100644
--- a/dlls/jscript/array.c
+++ b/dlls/jscript/array.c
@@ -122,7 +122,7 @@ static HRESULT Array_set_length(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t val
     DWORD i;
     HRESULT hres;
 
-    TRACE("%p %d\n", This, This->length);
+    TRACE("%p %ld\n", This, This->length);
 
     hres = to_number(ctx, value, &len);
     if(FAILED(hres))
@@ -701,7 +701,7 @@ static HRESULT Array_sort(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, unsigne
                 vtab[i] = jsval_undefined();
                 hres = S_OK;
             } else if(FAILED(hres)) {
-                WARN("Could not get elem %d: %08x\n", i, hres);
+                WARN("Could not get elem %ld: %08lx\n", i, hres);
                 break;
             }
         }
diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c
index 5e0955330e2..f8c3b5583db 100644
--- a/dlls/jscript/dispex.c
+++ b/dlls/jscript/dispex.c
@@ -346,7 +346,7 @@ static HRESULT ensure_prop_name(jsdisp_t *This, const WCHAR *name, DWORD create_
 
     hres = find_prop_name_prot(This, string_hash(name), name, &prop);
     if(SUCCEEDED(hres) && (!prop || prop->type == PROP_DELETED)) {
-        TRACE("creating prop %s flags %x\n", debugstr_w(name), create_flags);
+        TRACE("creating prop %s flags %lx\n", debugstr_w(name), create_flags);
 
         if(prop) {
             prop->type = PROP_JSVAL;
@@ -467,7 +467,7 @@ static HRESULT prop_get(jsdisp_t *This, dispex_prop_t *prop,  jsval_t *r)
     }
 
     if(FAILED(hres)) {
-        TRACE("fail %08x\n", hres);
+        TRACE("fail %08lx\n", hres);
         return hres;
     }
 
@@ -738,7 +738,7 @@ static ULONG WINAPI ScriptTypeInfo_AddRef(ITypeInfo *iface)
     ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface);
     LONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("(%p) ref=%ld\n", This, ref);
 
     return ref;
 }
@@ -749,7 +749,7 @@ static ULONG WINAPI ScriptTypeInfo_Release(ITypeInfo *iface)
     LONG ref = InterlockedDecrement(&This->ref);
     UINT i;
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("(%p) ref=%ld\n", This, ref);
 
     if (!ref)
     {
@@ -870,7 +870,7 @@ static HRESULT WINAPI ScriptTypeInfo_GetNames(ITypeInfo *iface, MEMBERID memid,
     HRESULT hr;
     UINT i = 0;
 
-    TRACE("(%p)->(%d %p %u %p)\n", This, memid, rgBstrNames, cMaxNames, pcNames);
+    TRACE("(%p)->(%ld %p %u %p)\n", This, memid, rgBstrNames, cMaxNames, pcNames);
 
     if (!rgBstrNames || !pcNames) return E_INVALIDARG;
     if (memid <= 0) return TYPE_E_ELEMENTNOTFOUND;
@@ -1001,7 +1001,7 @@ static HRESULT WINAPI ScriptTypeInfo_Invoke(ITypeInfo *iface, PVOID pvInstance,
     IDispatch *disp;
     HRESULT hr;
 
-    TRACE("(%p)->(%p %d %d %p %p %p %p)\n", This, pvInstance, memid, wFlags,
+    TRACE("(%p)->(%p %ld %d %p %p %p %p)\n", This, pvInstance, memid, wFlags,
           pDispParams, pVarResult, pExcepInfo, puArgErr);
 
     if (!pvInstance) return E_INVALIDARG;
@@ -1035,7 +1035,7 @@ static HRESULT WINAPI ScriptTypeInfo_GetDocumentation(ITypeInfo *iface, MEMBERID
     dispex_prop_t *var;
     HRESULT hr;
 
-    TRACE("(%p)->(%d %p %p %p %p)\n", This, memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
+    TRACE("(%p)->(%ld %p %p %p %p)\n", This, memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
 
     if (pBstrDocString) *pBstrDocString = NULL;
     if (pdwHelpContext) *pdwHelpContext = 0;
@@ -1086,7 +1086,7 @@ static HRESULT WINAPI ScriptTypeInfo_GetDllEntry(ITypeInfo *iface, MEMBERID memi
     ITypeInfo *disp_typeinfo;
     HRESULT hr;
 
-    TRACE("(%p)->(%d %d %p %p %p)\n", This, memid, invKind, pBstrDllName, pBstrName, pwOrdinal);
+    TRACE("(%p)->(%ld %d %p %p %p)\n", This, memid, invKind, pBstrDllName, pBstrName, pwOrdinal);
 
     if (pBstrDllName) *pBstrDllName = NULL;
     if (pBstrName) *pBstrName = NULL;
@@ -1107,7 +1107,7 @@ static HRESULT WINAPI ScriptTypeInfo_GetRefTypeInfo(ITypeInfo *iface, HREFTYPE h
     ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface);
     HRESULT hr;
 
-    TRACE("(%p)->(%x %p)\n", This, hRefType, ppTInfo);
+    TRACE("(%p)->(%lx %p)\n", This, hRefType, ppTInfo);
 
     if (!ppTInfo || (INT)hRefType < 0) return E_INVALIDARG;
 
@@ -1130,7 +1130,7 @@ static HRESULT WINAPI ScriptTypeInfo_AddressOfMember(ITypeInfo *iface, MEMBERID
     ITypeInfo *disp_typeinfo;
     HRESULT hr;
 
-    TRACE("(%p)->(%d %d %p)\n", This, memid, invKind, ppv);
+    TRACE("(%p)->(%ld %d %p)\n", This, memid, invKind, ppv);
 
     if (!ppv) return E_INVALIDARG;
     *ppv = NULL;
@@ -1163,7 +1163,7 @@ static HRESULT WINAPI ScriptTypeInfo_GetMops(ITypeInfo *iface, MEMBERID memid, B
     ITypeInfo *disp_typeinfo;
     HRESULT hr;
 
-    TRACE("(%p)->(%d %p)\n", This, memid, pBstrMops);
+    TRACE("(%p)->(%ld %p)\n", This, memid, pBstrMops);
 
     if (!pBstrMops) return E_INVALIDARG;
 
@@ -1268,7 +1268,7 @@ static HRESULT WINAPI ScriptTypeComp_Bind(ITypeComp *iface, LPOLESTR szName, ULO
     HRESULT hr;
     UINT i;
 
-    TRACE("(%p)->(%s %08x %d %p %p %p)\n", This, debugstr_w(szName), lHashVal,
+    TRACE("(%p)->(%s %08lx %d %p %p %p)\n", This, debugstr_w(szName), lHashVal,
           wFlags, ppTInfo, pDescKind, pBindPtr);
 
     if (!szName || !ppTInfo || !pDescKind || !pBindPtr)
@@ -1322,7 +1322,7 @@ static HRESULT WINAPI ScriptTypeComp_BindType(ITypeComp *iface, LPOLESTR szName,
     ITypeComp *disp_typecomp;
     HRESULT hr;
 
-    TRACE("(%p)->(%s %08x %p %p)\n", This, debugstr_w(szName), lHashVal, ppTInfo, ppTComp);
+    TRACE("(%p)->(%s %08lx %p %p)\n", This, debugstr_w(szName), lHashVal, ppTInfo, ppTComp);
 
     if (!szName || !ppTInfo || !ppTComp)
         return E_INVALIDARG;
@@ -1386,7 +1386,7 @@ static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
 {
     jsdisp_t *This = impl_from_IDispatchEx(iface);
     ULONG ref = --This->ref;
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("(%p) ref=%ld\n", This, ref);
     if(!ref)
         jsdisp_free(This);
     return ref;
@@ -1413,7 +1413,7 @@ static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LC
     ScriptTypeInfo *typeinfo;
     unsigned pos;
 
-    TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+    TRACE("(%p)->(%u %lu %p)\n", This, iTInfo, lcid, ppTInfo);
 
     if (iTInfo != 0) return DISP_E_BADINDEX;
 
@@ -1508,7 +1508,7 @@ static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid,
     UINT i;
     HRESULT hres;
 
-    TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+    TRACE("(%p)->(%s %p %u %lu %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
           lcid, rgDispId);
 
     if(cNames == 0)
@@ -1534,7 +1534,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
 {
     jsdisp_t *This = impl_from_IDispatchEx(iface);
 
-    TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+    TRACE("(%p)->(%ld %s %ld %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
           lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
 
     return IDispatchEx_InvokeEx(&This->IDispatchEx_iface, dispIdMember, lcid, wFlags,
@@ -1545,10 +1545,10 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
 {
     jsdisp_t *This = impl_from_IDispatchEx(iface);
 
-    TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid);
+    TRACE("(%p)->(%s %lx %p)\n", This, debugstr_w(bstrName), grfdex, pid);
 
     if(grfdex & ~(fdexNameCaseSensitive|fdexNameEnsure|fdexNameImplicit|FDEX_VERSION_MASK)) {
-        FIXME("Unsupported grfdex %x\n", grfdex);
+        FIXME("Unsupported grfdex %lx\n", grfdex);
         return E_NOTIMPL;
     }
 
@@ -1563,7 +1563,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
     jsexcept_t ei;
     HRESULT hres;
 
-    TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
+    TRACE("(%p)->(%lx %lx %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
 
     if(pvarRes)
         V_VT(pvarRes) = VT_EMPTY;
@@ -1689,10 +1689,10 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bst
     BOOL b;
     HRESULT hres;
 
-    TRACE("(%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex);
+    TRACE("(%p)->(%s %lx)\n", This, debugstr_w(bstrName), grfdex);
 
     if(grfdex & ~(fdexNameCaseSensitive|fdexNameEnsure|fdexNameImplicit|FDEX_VERSION_MASK))
-        FIXME("Unsupported grfdex %x\n", grfdex);
+        FIXME("Unsupported grfdex %lx\n", grfdex);
 
     hres = find_prop_name(This, string_hash(bstrName), bstrName, &prop);
     if(FAILED(hres))
@@ -1711,7 +1711,7 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID
     dispex_prop_t *prop;
     BOOL b;
 
-    TRACE("(%p)->(%x)\n", This, id);
+    TRACE("(%p)->(%lx)\n", This, id);
 
     prop = get_prop(This, id);
     if(!prop) {
@@ -1725,7 +1725,7 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID
 static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
 {
     jsdisp_t *This = impl_from_IDispatchEx(iface);
-    FIXME("(%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex);
+    FIXME("(%p)->(%lx %lx %p)\n", This, id, grfdexFetch, pgrfdex);
     return E_NOTIMPL;
 }
 
@@ -1734,7 +1734,7 @@ static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BS
     jsdisp_t *This = impl_from_IDispatchEx(iface);
     dispex_prop_t *prop;
 
-    TRACE("(%p)->(%x %p)\n", This, id, pbstrName);
+    TRACE("(%p)->(%lx %p)\n", This, id, pbstrName);
 
     prop = get_prop(This, id);
     if(!prop)
@@ -1752,7 +1752,7 @@ static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex,
     jsdisp_t *This = impl_from_IDispatchEx(iface);
     HRESULT hres = S_FALSE;
 
-    TRACE("(%p)->(%x %x %p)\n", This, grfdex, id, pid);
+    TRACE("(%p)->(%lx %lx %p)\n", This, grfdex, id, pid);
 
     if(id != DISPID_VALUE)
         hres = jsdisp_next_prop(This, id, JSDISP_ENUM_ALL, pid);
@@ -2048,7 +2048,7 @@ static HRESULT disp_invoke(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD f
     }
 
     if(hres == DISP_E_EXCEPTION) {
-        TRACE("DISP_E_EXCEPTION: %08x %s %s\n", ei.scode, debugstr_w(ei.bstrSource), debugstr_w(ei.bstrDescription));
+        TRACE("DISP_E_EXCEPTION: %08lx %s %s\n", ei.scode, debugstr_w(ei.bstrSource), debugstr_w(ei.bstrDescription));
         reset_ei(ctx->ei);
         ctx->ei->error = (SUCCEEDED(ei.scode) || ei.scode == DISP_E_EXCEPTION) ? E_FAIL : ei.scode;
         if(ei.bstrSource)
@@ -2608,7 +2608,7 @@ HRESULT jsdisp_define_property(jsdisp_t *obj, const WCHAR *name, property_desc_t
         return S_OK;
     }
 
-    TRACE("existing prop %s prop flags %x desc flags %x desc mask %x\n", debugstr_w(name),
+    TRACE("existing prop %s prop flags %lx desc flags %x desc mask %x\n", debugstr_w(name),
           prop->flags, desc->flags, desc->mask);
 
     if(!(prop->flags & PROPF_CONFIGURABLE)) {
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index ae002fc56e8..d894fbc10aa 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -837,7 +837,7 @@ static HRESULT interp_forin(script_ctx_t *ctx)
     id = get_number(stack_top(ctx));
 
     if(!stack_topn_exprval(ctx, 1, &prop_ref)) {
-        FIXME("invalid ref: %08x\n", prop_ref.u.hres);
+        FIXME("invalid ref: %08lx\n", prop_ref.u.hres);
         return E_FAIL;
     }
 
@@ -992,7 +992,7 @@ static HRESULT interp_pop_scope(script_ctx_t *ctx)
     if(ctx->call_ctx->scope->ref > 1) {
         HRESULT hres = detach_variable_object(ctx, ctx->call_ctx, FALSE);
         if(FAILED(hres))
-            ERR("Failed to detach variable object: %08x\n", hres);
+            ERR("Failed to detach variable object: %08lx\n", hres);
     }
 
     scope_pop(&ctx->call_ctx->scope);
@@ -1073,7 +1073,7 @@ static HRESULT interp_throw_ref(script_ctx_t *ctx)
 {
     const HRESULT arg = get_op_uint(ctx, 0);
 
-    TRACE("%08x\n", arg);
+    TRACE("%08lx\n", arg);
 
     return arg;
 }
@@ -1084,7 +1084,7 @@ static HRESULT interp_throw_type(script_ctx_t *ctx)
     jsstr_t *str = get_op_str(ctx, 1);
     const WCHAR *ptr;
 
-    TRACE("%08x %s\n", hres, debugstr_jsstr(str));
+    TRACE("%08lx %s\n", hres, debugstr_jsstr(str));
 
     ptr = jsstr_flatten(str);
     return ptr ? throw_error(ctx, hres, ptr) : E_OUTOFMEMORY;
@@ -1320,7 +1320,7 @@ static HRESULT interp_memberid(script_ctx_t *ctx)
             exprval_set_exception(&ref, JS_E_INVALID_PROPERTY);
             hres = S_OK;
         }else {
-            ERR("failed %08x\n", hres);
+            ERR("failed %08lx\n", hres);
             return hres;
         }
     }
@@ -2705,7 +2705,7 @@ static HRESULT interp_to_string(script_ctx_t *ctx)
     hres = to_string(ctx, v, &str);
     jsval_release(v);
     if(FAILED(hres)) {
-        WARN("failed %08x\n", hres);
+        WARN("failed %08lx\n", hres);
         return hres;
     }
 
@@ -2765,7 +2765,7 @@ static HRESULT interp_set_member(script_ctx_t *ctx)
         jsstr_release(get_string(namev));
     }
     if(FAILED(hres)) {
-        WARN("failed %08x\n", hres);
+        WARN("failed %08lx\n", hres);
         jsval_release(value);
         return hres;
     }
@@ -2913,7 +2913,7 @@ static void pop_call_frame(script_ctx_t *ctx)
     if(frame->scope && frame->scope->ref > 1) {
         HRESULT hres = detach_variable_object(ctx, frame, TRUE);
         if(FAILED(hres))
-            ERR("Failed to detach variable object: %08x\n", hres);
+            ERR("Failed to detach variable object: %08lx\n", hres);
     }
 
     if(frame->arguments_obj)
@@ -2984,7 +2984,7 @@ static HRESULT unwind_exception(script_ctx_t *ctx, HRESULT exception_hres)
         jsdisp_t *error_obj;
         jsval_t msg;
 
-        WARN("Exception %08x %s", exception_hres, debugstr_jsval(ei->valid_value ? ei->value : jsval_undefined()));
+        WARN("Exception %08lx %s", exception_hres, debugstr_jsval(ei->valid_value ? ei->value : jsval_undefined()));
         if(ei->valid_value && jsval_type(ei->value) == JSV_OBJECT) {
             error_obj = to_jsdisp(get_object(ei->value));
             if(error_obj) {
@@ -3125,7 +3125,7 @@ static HRESULT bind_event_target(script_ctx_t *ctx, function_code_t *func, jsdis
         hres = IBindEventHandler_BindHandler(target, func->name, (IDispatch*)&func_obj->IDispatchEx_iface);
         IBindEventHandler_Release(target);
         if(FAILED(hres))
-            WARN("BindEvent failed: %08x\n", hres);
+            WARN("BindEvent failed: %08lx\n", hres);
     }else {
         FIXME("No IBindEventHandler, not yet supported binding\n");
     }
diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c
index 49adaeb1242..26f41fd3e57 100644
--- a/dlls/jscript/error.c
+++ b/dlls/jscript/error.c
@@ -396,7 +396,7 @@ static jsstr_t *format_error_message(HRESULT error, const WCHAR *arg)
 HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
 {
     jsexcept_t *ei = ctx->ei;
-    TRACE("%08x\n", error);
+    TRACE("%08lx\n", error);
     reset_ei(ei);
     ei->error = error;
     if(str)
diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c
index c9a00d12f6f..d425c88dea9 100644
--- a/dlls/jscript/global.c
+++ b/dlls/jscript/global.c
@@ -160,7 +160,7 @@ HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned a
     TRACE("parsing %s\n", debugstr_jsval(argv[0]));
     hres = compile_script(ctx, src, 0, 0, NULL, NULL, TRUE, FALSE, frame ? frame->bytecode->named_item : NULL, &code);
     if(FAILED(hres)) {
-        WARN("parse (%s) failed: %08x\n", debugstr_jsval(argv[0]), hres);
+        WARN("parse (%s) failed: %08lx\n", debugstr_jsval(argv[0]), hres);
         return hres;
     }
 
diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c
index 160269cc3c9..8cf141d3990 100644
--- a/dlls/jscript/jscript.c
+++ b/dlls/jscript/jscript.c
@@ -139,7 +139,7 @@ static HRESULT retrieve_named_item_disp(IActiveScriptSite *site, named_item_t *i
 
     hr = IActiveScriptSite_GetItemInfo(site, item->name, SCRIPTINFO_IUNKNOWN, &unk, NULL);
     if(FAILED(hr)) {
-        WARN("GetItemInfo failed: %08x\n", hr);
+        WARN("GetItemInfo failed: %08lx\n", hr);
         return hr;
     }
 
@@ -215,7 +215,7 @@ static ULONG WINAPI JScriptError_AddRef(IActiveScriptError *iface)
     JScriptError *This = impl_from_IActiveScriptError(iface);
     LONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("(%p) ref=%ld\n", This, ref);
 
     return ref;
 }
@@ -225,7 +225,7 @@ static ULONG WINAPI JScriptError_Release(IActiveScriptError *iface)
     JScriptError *This = impl_from_IActiveScriptError(iface);
     LONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("(%p) ref=%ld\n", This, ref);
 
     if(!ref) {
         reset_ei(&This->ei);
@@ -355,7 +355,7 @@ HRESULT leave_script(script_ctx_t *ctx, HRESULT result)
         ei->error = result;
     }
     if(FAILED(result)) {
-        WARN("%08x\n", result);
+        WARN("%08lx\n", result);
         if(ctx->site && (error = heap_alloc(sizeof(*error)))) {
             HRESULT hres;
 
@@ -565,7 +565,7 @@ static ULONG WINAPI AXSite_AddRef(IServiceProvider *iface)
     AXSite *This = impl_from_IServiceProvider(iface);
     LONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("(%p) ref=%ld\n", This, ref);
 
     return ref;
 }
@@ -575,7 +575,7 @@ static ULONG WINAPI AXSite_Release(IServiceProvider *iface)
     AXSite *This = impl_from_IServiceProvider(iface);
     LONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("(%p) ref=%ld\n", This, ref);
 
     if(!ref)
     {
@@ -616,7 +616,7 @@ IUnknown *create_ax_site(script_ctx_t *ctx)
 
     hres = IActiveScriptSite_QueryInterface(ctx->site, &IID_IServiceProvider, (void**)&sp);
     if(FAILED(hres)) {
-        TRACE("Could not get IServiceProvider iface: %08x\n", hres);
+        TRACE("Could not get IServiceProvider iface: %08lx\n", hres);
     }
 
     ret = heap_alloc(sizeof(AXSite));
@@ -683,7 +683,7 @@ static ULONG WINAPI JScript_AddRef(IActiveScript *iface)
     JScript *This = impl_from_IActiveScript(iface);
     LONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("(%p) ref=%ld\n", This, ref);
 
     return ref;
 }
@@ -693,7 +693,7 @@ static ULONG WINAPI JScript_Release(IActiveScript *iface)
     JScript *This = impl_from_IActiveScript(iface);
     LONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", iface, ref);
+    TRACE("(%p) ref=%ld\n", iface, ref);
 
     if(!ref) {
         if(This->ctx && This->ctx->state != SCRIPTSTATE_CLOSED)
@@ -880,7 +880,7 @@ static HRESULT WINAPI JScript_AddNamedItem(IActiveScript *iface,
     IDispatch *disp = NULL;
     HRESULT hres;
 
-    TRACE("(%p)->(%s %x)\n", This, debugstr_w(pstrName), dwFlags);
+    TRACE("(%p)->(%s %lx)\n", This, debugstr_w(pstrName), dwFlags);
 
     if(This->thread_id != GetCurrentThreadId() || !This->ctx || This->ctx->state == SCRIPTSTATE_CLOSED)
         return E_UNEXPECTED;
@@ -890,7 +890,7 @@ static HRESULT WINAPI JScript_AddNamedItem(IActiveScript *iface,
 
         hres = IActiveScriptSite_GetItemInfo(This->site, pstrName, SCRIPTINFO_IUNKNOWN, &unk, NULL);
         if(FAILED(hres)) {
-            WARN("GetItemInfo failed: %08x\n", hres);
+            WARN("GetItemInfo failed: %08lx\n", hres);
             return hres;
         }
 
@@ -1064,7 +1064,7 @@ static HRESULT WINAPI JScriptParse_AddScriptlet(IActiveScriptParse *iface,
         BSTR *pbstrName, EXCEPINFO *pexcepinfo)
 {
     JScript *This = impl_from_IActiveScriptParse(iface);
-    FIXME("(%p)->(%s %s %s %s %s %s %s %u %x %p %p)\n", This, debugstr_w(pstrDefaultName),
+    FIXME("(%p)->(%s %s %s %s %s %s %s %lu %lx %p %p)\n", This, debugstr_w(pstrDefaultName),
           debugstr_w(pstrCode), debugstr_w(pstrItemName), debugstr_w(pstrSubItemName),
           debugstr_w(pstrEventName), debugstr_w(pstrDelimiter), wine_dbgstr_longlong(dwSourceContextCookie),
           ulStartingLineNumber, dwFlags, pbstrName, pexcepinfo);
@@ -1082,7 +1082,7 @@ static HRESULT WINAPI JScriptParse_ParseScriptText(IActiveScriptParse *iface,
     jsexcept_t ei;
     HRESULT hres;
 
-    TRACE("(%p)->(%s %s %p %s %s %u %x %p %p)\n", This, debugstr_w(pstrCode),
+    TRACE("(%p)->(%s %s %p %s %s %lu %lx %p %p)\n", This, debugstr_w(pstrCode),
           debugstr_w(pstrItemName), punkContext, debugstr_w(pstrDelimiter),
           wine_dbgstr_longlong(dwSourceContextCookie), ulStartingLine, dwFlags, pvarResult, pexcepinfo);
 
@@ -1185,7 +1185,7 @@ static HRESULT WINAPI JScriptParseProcedure_ParseProcedureText(IActiveScriptPars
     jsexcept_t ei;
     HRESULT hres;
 
-    TRACE("(%p)->(%s %s %s %s %p %s %s %u %x %p)\n", This, debugstr_w(pstrCode), debugstr_w(pstrFormalParams),
+    TRACE("(%p)->(%s %s %s %s %p %s %s %lu %lx %p)\n", This, debugstr_w(pstrCode), debugstr_w(pstrFormalParams),
           debugstr_w(pstrProcedureName), debugstr_w(pstrItemName), punkContext, debugstr_w(pstrDelimiter),
           wine_dbgstr_longlong(dwSourceContextCookie), ulStartingLineNumber, dwFlags, ppdisp);
 
@@ -1249,7 +1249,7 @@ static HRESULT WINAPI JScriptProperty_GetProperty(IActiveScriptProperty *iface,
         VARIANT *pvarIndex, VARIANT *pvarValue)
 {
     JScript *This = impl_from_IActiveScriptProperty(iface);
-    FIXME("(%p)->(%x %p %p)\n", This, dwProperty, pvarIndex, pvarValue);
+    FIXME("(%p)->(%lx %p %p)\n", This, dwProperty, pvarIndex, pvarValue);
     return E_NOTIMPL;
 }
 
@@ -1258,7 +1258,7 @@ static HRESULT WINAPI JScriptProperty_SetProperty(IActiveScriptProperty *iface,
 {
     JScript *This = impl_from_IActiveScriptProperty(iface);
 
-    TRACE("(%p)->(%x %s %s)\n", This, dwProperty, debugstr_variant(pvarIndex), debugstr_variant(pvarValue));
+    TRACE("(%p)->(%lx %s %s)\n", This, dwProperty, debugstr_variant(pvarIndex), debugstr_variant(pvarValue));
 
     if(pvarIndex)
         FIXME("unsupported pvarIndex\n");
@@ -1275,7 +1275,7 @@ static HRESULT WINAPI JScriptProperty_SetProperty(IActiveScriptProperty *iface,
         This->html_mode = (V_I4(pvarValue) & SCRIPTLANGUAGEVERSION_HTML) != 0;
         break;
     default:
-        FIXME("Unimplemented property %x\n", dwProperty);
+        FIXME("Unimplemented property %lx\n", dwProperty);
         return E_NOTIMPL;
     }
 
@@ -1336,7 +1336,7 @@ static HRESULT WINAPI JScriptSafety_SetInterfaceSafetyOptions(IObjectSafety *ifa
 {
     JScript *This = impl_from_IObjectSafety(iface);
 
-    TRACE("(%p)->(%s %x %x)\n", This, debugstr_guid(riid), dwOptionSetMask, dwEnabledOptions);
+    TRACE("(%p)->(%s %lx %lx)\n", This, debugstr_guid(riid), dwOptionSetMask, dwEnabledOptions);
 
     if(dwOptionSetMask & ~SUPPORTED_OPTIONS)
         return E_FAIL;
@@ -1383,7 +1383,7 @@ static HRESULT WINAPI VariantChangeType_ChangeType(IVariantChangeType *iface, VA
     VARIANT res;
     HRESULT hres;
 
-    TRACE("(%p)->(%p %s %x %s)\n", This, dst, debugstr_variant(src), lcid, debugstr_vt(vt));
+    TRACE("(%p)->(%p %s %lx %s)\n", This, dst, debugstr_variant(src), lcid, debugstr_vt(vt));
 
     if(!This->ctx) {
         FIXME("Object uninitialized\n");
diff --git a/dlls/jscript/jscript_main.c b/dlls/jscript/jscript_main.c
index 50ffd67521b..882c419ff83 100644
--- a/dlls/jscript/jscript_main.c
+++ b/dlls/jscript/jscript_main.c
@@ -158,7 +158,7 @@ static IClassFactory JScriptEncodeFactory = { &JScriptEncodeFactoryVtbl };
  */
 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
 {
-    TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv);
+    TRACE("(%p %ld %p)\n", hInstDLL, fdwReason, lpv);
 
     switch(fdwReason) {
     case DLL_PROCESS_ATTACH:
@@ -200,7 +200,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
  */
 HRESULT WINAPI DllCanUnloadNow(void)
 {
-    TRACE("() ref=%d\n", module_ref);
+    TRACE("() ref=%ld\n", module_ref);
 
     return module_ref ? S_FALSE : S_OK;
 }
diff --git a/dlls/jscript/jsregexp.c b/dlls/jscript/jsregexp.c
index 0dc4aa1806c..90663d3c12c 100644
--- a/dlls/jscript/jsregexp.c
+++ b/dlls/jscript/jsregexp.c
@@ -620,7 +620,7 @@ HRESULT create_regexp(script_ctx_t *ctx, jsstr_t *src, DWORD flags, jsdisp_t **r
     if(!str)
         return E_OUTOFMEMORY;
 
-    TRACE("%s %x\n", debugstr_wn(str, jsstr_length(src)), flags);
+    TRACE("%s %lx\n", debugstr_wn(str, jsstr_length(src)), flags);
 
     hres = alloc_regexp(ctx, NULL, &regexp);
     if(FAILED(hres))
diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c
index d3a41facc6c..6bc34daecd0 100644
--- a/dlls/jscript/jsutils.c
+++ b/dlls/jscript/jsutils.c
@@ -1000,7 +1000,7 @@ static ULONG WINAPI JSCaller_AddRef(IServiceProvider *iface)
     JSCaller *This = impl_from_IServiceProvider(iface);
     LONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("(%p) ref=%ld\n", This, ref);
 
     return ref;
 }
@@ -1010,7 +1010,7 @@ static ULONG WINAPI JSCaller_Release(IServiceProvider *iface)
     JSCaller *This = impl_from_IServiceProvider(iface);
     LONG ref = InterlockedIncrement(&This->ref);
 
-    TRACE("(%p) ref=%d\n", This, ref);
+    TRACE("(%p) ref=%ld\n", This, ref);
 
     if(!ref) {
         assert(!This->ctx);
diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c
index 14dd72c6bde..16f217bf32b 100644
--- a/dlls/jscript/regexp.c
+++ b/dlls/jscript/regexp.c
@@ -1935,7 +1935,7 @@ PushBackTrackState(REGlobalData *gData, REOp op,
     ptrdiff_t btincr = ((char *)result + sz) -
                        ((char *)gData->backTrackStack + btsize);
 
-    TRACE("\tBT_Push: %lu,%lu\n", (ULONG_PTR)parenIndex, (ULONG_PTR)parenCount);
+    TRACE("\tBT_Push: %Iu,%Iu\n", (ULONG_PTR)parenIndex, (ULONG_PTR)parenCount);
 
     JS_COUNT_OPERATION(gData->cx, JSOW_JUMP * (1 + parenCount));
     if (btincr > 0) {
@@ -2684,7 +2684,7 @@ ExecuteREBytecode(REGlobalData *gData, match_state_t *x)
 
               case REOP_LPAREN:
                 pc = ReadCompactIndex(pc, &parenIndex);
-                TRACE("[ %lu ]\n", (ULONG_PTR)parenIndex);
+                TRACE("[ %Iu ]\n", (ULONG_PTR)parenIndex);
                 assert(parenIndex < gData->regexp->parenCount);
                 if (parenIndex + 1 > parenSoFar)
                     parenSoFar = parenIndex + 1;
@@ -3047,7 +3047,7 @@ ExecuteREBytecode(REGlobalData *gData, match_state_t *x)
                 parenSoFar = curState->parenSoFar;
             }
 
-            TRACE("\tBT_Pop: %ld,%ld\n",
+            TRACE("\tBT_Pop: %Id,%Id\n",
                      (ULONG_PTR)backTrackData->parenIndex,
                      (ULONG_PTR)backTrackData->parenCount);
             continue;
diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c
index cca14cbbb95..4d65d6be959 100644
--- a/dlls/jscript/string.c
+++ b/dlls/jscript/string.c
@@ -1151,7 +1151,7 @@ static HRESULT String_split(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsi
                 hres = regexp_match_next(ctx, regexp, REM_NO_PARENS, jsstr, &match_ptr);
                 if(hres != S_OK)
                     break;
-                TRACE("got match %d %d\n", (int)(match_result.cp - match_result.match_len - str), match_result.match_len);
+                TRACE("got match %d %ld\n", (int)(match_result.cp - match_result.match_len - str), match_result.match_len);
                 if(!match_result.match_len) {
                     /* If an empty string is matched, prevent including any match in the result */
                     if(!length) {
@@ -1163,7 +1163,7 @@ static HRESULT String_split(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsi
                         hres = regexp_match_next(ctx, regexp, REM_NO_PARENS, jsstr, &match_ptr);
                         if(hres != S_OK)
                             break;
-                        TRACE("retried, got match %d %d\n", (int)(match_result.cp - match_result.match_len - str),
+                        TRACE("retried, got match %d %ld\n", (int)(match_result.cp - match_result.match_len - str),
                               match_result.match_len);
                     }
                     if(!match_result.match_len && match_result.cp == str + length)
@@ -1461,7 +1461,7 @@ static HRESULT String_trim(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsig
 
     hres = to_flat_string(ctx, jsval_disp(jsthis->u.disp), &jsstr, &str);
     if(FAILED(hres)) {
-        WARN("to_flat_string failed: %08x\n", hres);
+        WARN("to_flat_string failed: %08lx\n", hres);
         return hres;
     }
     len = jsstr_length(jsstr);




More information about the wine-devel mailing list