Commit e8e0917a authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

jscript: Enable compilation with long types.

parent 0b2fd915
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = jscript.dll
IMPORTS = oleaut32 ole32 user32 advapi32
......
......@@ -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;
}
......
......@@ -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;
}
}
......
......@@ -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");
}
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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");
......
......@@ -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;
}
......@@ -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))
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
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