Commit 83bc5d4b authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

krnl386.exe16: Enable compilation with long types.

parent 2dcfe064
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = krnl386.exe16
IMPORTLIB = kernel
DELAYIMPORTS = user32
......
......@@ -487,7 +487,7 @@ LPVOID DOSMEM_MapRealToLinear(DWORD x)
LPVOID lin;
lin = DOSMEM_dosmem + HIWORD(x) * 16 + LOWORD(x);
TRACE_(selector)("(0x%08x) returns %p.\n", x, lin );
TRACE_(selector)("(0x%08lx) returns %p.\n", x, lin );
return lin;
}
......
......@@ -418,7 +418,7 @@ LONG WINAPI WIN16_hread( HFILE16 hFile, SEGPTR buffer, LONG count )
{
LONG maxlen;
TRACE("%d %08x %d\n", hFile, (DWORD)buffer, count );
TRACE("%d %08lx %ld\n", hFile, (DWORD)buffer, count );
/* Some programs pass a count larger than the allocated buffer */
maxlen = GetSelectorLimit16( SELECTOROF(buffer) ) - OFFSETOF(buffer) + 1;
......
......@@ -198,7 +198,7 @@ HGLOBAL16 GLOBAL_Alloc( UINT16 flags, DWORD size, HGLOBAL16 hOwner, unsigned cha
HGLOBAL16 handle;
DWORD align = 0x1f;
TRACE("%d flags=%04x\n", size, flags );
TRACE("%ld flags=%04x\n", size, flags );
/* If size is 0, create a discarded block */
......@@ -275,7 +275,7 @@ HGLOBAL16 WINAPI GlobalReAlloc16(
WORD sel = GlobalHandleToSel16( handle );
HANDLE heap = get_win16_heap();
TRACE("%04x %d flags=%04x\n",
TRACE("%04x %ld flags=%04x\n",
handle, size, flags );
if (!handle) return 0;
......@@ -327,7 +327,7 @@ HGLOBAL16 WINAPI GlobalReAlloc16(
ptr = pArena->base;
oldsize = pArena->size;
TRACE("oldbase %p oldsize %08x newsize %08x\n", ptr,oldsize,size);
TRACE("oldbase %p oldsize %08lx newsize %08lx\n", ptr,oldsize,size);
if (ptr && (size == oldsize)) return handle; /* Nothing to do */
if (pArena->flags & GA_DOSMEM)
......@@ -453,7 +453,7 @@ HGLOBAL16 WINAPI GlobalFree16(
SEGPTR WINAPI K32WOWGlobalLock16( HGLOBAL16 handle )
{
WORD sel = GlobalHandleToSel16( handle );
TRACE("(%04x) -> %08x\n", handle, MAKELONG( 0, sel ) );
TRACE("(%04x) -> %08lx\n", handle, MAKELONG( 0, sel ) );
if (handle)
{
......
......@@ -385,7 +385,7 @@ static DWORD INSTR_inport( WORD port, int size, CONTEXT *context )
(WORD)context->SegCs, LOWORD(context->Eip));
break;
case 4:
TRACE_(io)( "0x%x < %08x @ %04x:%04x\n", port, res,
TRACE_(io)( "0x%x < %08lx @ %04x:%04x\n", port, res,
(WORD)context->SegCs, LOWORD(context->Eip));
break;
}
......@@ -416,7 +416,7 @@ static void INSTR_outport( WORD port, int size, DWORD val, CONTEXT *context )
(WORD)context->SegCs, LOWORD(context->Eip));
break;
case 4:
TRACE_(io)("0x%x > %08x @ %04x:%04x\n", port, val,
TRACE_(io)("0x%x > %08lx @ %04x:%04x\n", port, val,
(WORD)context->SegCs, LOWORD(context->Eip));
break;
}
......@@ -523,7 +523,7 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
switch (instr[2])
{
case 0xc0:
FIXME("mov %%eax, %%cr0 at 0x%08x, EAX=0x%08x\n",
FIXME("mov %%eax, %%cr0 at 0x%08lx, EAX=0x%08lx\n",
context->Eip,context->Eax );
context->Eip += prefixlen+3;
return ExceptionContinueExecution;
......@@ -546,12 +546,12 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
* bit 7: PGE Enable global pages
* bit 8: PCE Enable performance counters at IPL3
*/
FIXME("mov %%cr4, %%eax at 0x%08x\n",context->Eip);
FIXME("mov %%cr4, %%eax at 0x%08lx\n",context->Eip);
context->Eax = 0;
context->Eip += prefixlen+3;
return ExceptionContinueExecution;
case 0xc0: /* mov %cr0, %eax */
FIXME("mov %%cr0, %%eax at 0x%08x\n",context->Eip);
FIXME("mov %%cr0, %%eax at 0x%08lx\n",context->Eip);
context->Eax = 0x10; /* FIXME: set more bits ? */
context->Eip += prefixlen+3;
return ExceptionContinueExecution;
......@@ -564,12 +564,12 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
switch (instr[2])
{
case 0xc8: /* mov %dr1, %eax */
TRACE("mov %%dr1, %%eax at 0x%08x\n",context->Eip);
TRACE("mov %%dr1, %%eax at 0x%08lx\n",context->Eip);
context->Eax = context->Dr1;
context->Eip += prefixlen+3;
return ExceptionContinueExecution;
case 0xf8: /* mov %dr7, %eax */
TRACE("mov %%dr7, %%eax at 0x%08x\n",context->Eip);
TRACE("mov %%dr7, %%eax at 0x%08lx\n",context->Eip);
context->Eax = 0x400;
context->Eip += prefixlen+3;
return ExceptionContinueExecution;
......
......@@ -39,8 +39,8 @@ BOOL DOSVM_RawRead(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL f
WCHAR root[] = {'\\','\\','.','\\','A',':',0};
HANDLE h;
TRACE( "abs diskread, drive %d, sector %d, "
"count %d, buffer %p\n",
TRACE( "abs diskread, drive %d, sector %ld, "
"count %ld, buffer %p\n",
drive, begin, nr_sect, dataptr );
root[4] += drive;
......
......@@ -39,8 +39,8 @@ BOOL DOSVM_RawWrite(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL
HANDLE h;
DWORD w;
TRACE( "abs diskwrite, drive %d, sector %d, "
"count %d, buffer %p\n",
TRACE( "abs diskwrite, drive %d, sector %ld, "
"count %ld, buffer %p\n",
drive, begin, nr_sect, dataptr );
root[4] += drive;
......
......@@ -566,7 +566,7 @@ static void MSCDEX_Request(BYTE *driver_request)
ERR("CD-ROM driver: unsupported addressing mode !!\n");
Error = 0x0c;
}
TRACE(" ----> HEAD LOCATION <%d>\n", PTR_AT(io_stru, 2, DWORD));
TRACE(" ----> HEAD LOCATION <%ld>\n", PTR_AT(io_stru, 2, DWORD));
break;
case 4: /* Audio channel info */
......@@ -598,13 +598,13 @@ static void MSCDEX_Request(BYTE *driver_request)
* 0 see below (Door closed/opened)
*/
if (!present) PTR_AT(io_stru, 1, DWORD) |= 1;
TRACE(" ----> DEVICE STATUS <0x%08x>\n", PTR_AT(io_stru, 1, DWORD));
TRACE(" ----> DEVICE STATUS <0x%08lx>\n", PTR_AT(io_stru, 1, DWORD));
break;
case 8: /* Volume size */
PTR_AT(io_stru, 1, DWORD) = FRAME_OF_TOC(toc, toc.LastTrack + 1) -
FRAME_OF_TOC(toc, toc.FirstTrack) - 1;
TRACE(" ----> VOLUME SIZE <%d>\n", PTR_AT(io_stru, 1, DWORD));
TRACE(" ----> VOLUME SIZE <%ld>\n", PTR_AT(io_stru, 1, DWORD));
break;
case 9: /* media changed ? */
......@@ -619,7 +619,7 @@ static void MSCDEX_Request(BYTE *driver_request)
MSCDEX_StoreMSF(FRAME_OF_TOC(toc, toc.LastTrack + 1) -
FRAME_OF_TOC(toc, toc.FirstTrack) - 1, io_stru + 3);
TRACE(" ----> AUDIO DISK INFO <%d-%d/%08x>\n",
TRACE(" ----> AUDIO DISK INFO <%d-%d/%08lx>\n",
io_stru[1], io_stru[2], PTR_AT(io_stru, 3, DWORD));
break;
......@@ -632,7 +632,7 @@ static void MSCDEX_Request(BYTE *driver_request)
PTR_AT(io_stru, 2, DWORD) = 0;
io_stru[6] = 0;
}
TRACE(" ----> AUDIO TRACK INFO[%d] = [%08x:%d]\n",
TRACE(" ----> AUDIO TRACK INFO[%d] = [%08lx:%d]\n",
io_stru[1], PTR_AT(io_stru, 2, DWORD), io_stru[6]);
break;
......@@ -675,7 +675,7 @@ static void MSCDEX_Request(BYTE *driver_request)
PTR_AT(io_stru, 3, DWORD) = FRAME_OF_TOC(toc, toc.FirstTrack);
PTR_AT(io_stru, 7, DWORD) = FRAME_OF_TOC(toc, toc.LastTrack + 1);
}
TRACE("Audio status info: status=%04x startLoc=%d endLoc=%d\n",
TRACE("Audio status info: status=%04x startLoc=%ld endLoc=%ld\n",
PTR_AT(io_stru, 1, WORD), PTR_AT(io_stru, 3, DWORD), PTR_AT(io_stru, 7, DWORD));
break;
......@@ -766,7 +766,7 @@ static void MSCDEX_Request(BYTE *driver_request)
at = PTR_AT(driver_request, 20, DWORD);
TRACE(" --> SEEK AUDIO mode :<0x%02X>, [%d]\n", driver_request[13], at);
TRACE(" --> SEEK AUDIO mode :<0x%02X>, [%ld]\n", driver_request[13], at);
switch (driver_request[13]) {
case 1: /* Red book addressing mode = 0:m:s:f */
......@@ -800,7 +800,7 @@ static void MSCDEX_Request(BYTE *driver_request)
beg = end = PTR_AT(driver_request, 14, DWORD);
end += PTR_AT(driver_request, 18, DWORD);
TRACE(" --> PLAY AUDIO mode :<0x%02X>, [%d-%d]\n", driver_request[13], beg, end);
TRACE(" --> PLAY AUDIO mode :<0x%02X>, [%ld-%ld]\n", driver_request[13], beg, end);
switch (driver_request[13]) {
case 1:
......@@ -941,7 +941,7 @@ static void MSCDEX_Handler(CONTEXT* context)
if (!driver_request) {
/* FIXME - to be deleted ?? */
ERR("ES:BX==0 ! SEGFAULT ?\n");
ERR("-->BX=0x%04x, ES=0x%04x, DS=0x%04x, CX=0x%04x\n",
ERR("-->BX=0x%04x, ES=0x%04lx, DS=0x%04lx, CX=0x%04x\n",
BX_reg(context), context->SegEs, context->SegDs, CX_reg(context));
driver_request[4] |= 0x80;
driver_request[3] = 5; /* bad request length */
......
......@@ -63,7 +63,7 @@ static LPVOID DPMI_xalloc( DWORD len )
if (!xflag && (lastvalloced<oldlastv))
{
/* wrapped */
FIXME( "failed to allocate linearly growing memory (%u bytes), "
FIXME( "failed to allocate linearly growing memory (%lu bytes), "
"using non-linear growing...\n", len );
xflag++;
}
......@@ -75,7 +75,7 @@ static LPVOID DPMI_xalloc( DWORD len )
xflag++;
if ((xflag==2) && (lastvalloced < oldlastv)) {
FIXME( "failed to allocate any memory of %u bytes!\n", len );
FIXME( "failed to allocate any memory of %lu bytes!\n", len );
return NULL;
}
}
......@@ -253,7 +253,7 @@ void WINAPI DOSVM_Int31Handler( CONTEXT *context )
{
DWORD base = MAKELONG( DX_reg(context), CX_reg(context) );
WORD sel = BX_reg(context);
TRACE( "set selector base address (0x%04x,0x%08x)\n", sel, base );
TRACE( "set selector base address (0x%04x,0x%08lx)\n", sel, base );
/* check if Win16 app wants to access lower 64K of DOS memory */
if (base < 0x10000) DOSMEM_MapDosLayout();
......@@ -265,7 +265,7 @@ void WINAPI DOSVM_Int31Handler( CONTEXT *context )
case 0x0008: /* Set selector limit */
{
DWORD limit = MAKELONG( DX_reg(context), CX_reg(context) );
TRACE( "set selector limit (0x%04x,0x%08x)\n",
TRACE( "set selector limit (0x%04x,0x%08lx)\n",
BX_reg(context), limit );
SetSelectorLimit16( BX_reg(context), limit );
}
......@@ -385,7 +385,7 @@ void WINAPI DOSVM_Int31Handler( CONTEXT *context )
break;
case 0x0205: /* Set protected mode interrupt vector */
TRACE("set protected mode interrupt handler (0x%02x,0x%04x:0x%08x)\n",
TRACE("set protected mode interrupt handler (0x%02x,0x%04x:0x%08lx)\n",
BL_reg(context), CX_reg(context), context->Edx);
{
FARPROC16 handler;
......@@ -497,7 +497,7 @@ void WINAPI DOSVM_Int31Handler( CONTEXT *context )
DWORD size = MAKELONG( CX_reg(context), BX_reg(context) );
BYTE *ptr;
TRACE( "allocate memory block (%u bytes)\n", size );
TRACE( "allocate memory block (%lu bytes)\n", size );
ptr = DPMI_xalloc( size );
if (!ptr)
......@@ -518,7 +518,7 @@ void WINAPI DOSVM_Int31Handler( CONTEXT *context )
case 0x0502: /* Free memory block */
{
DWORD handle = MAKELONG( DI_reg(context), SI_reg(context) );
TRACE( "free memory block (0x%08x)\n", handle );
TRACE( "free memory block (0x%08lx)\n", handle );
DPMI_xfree( (void *)handle );
}
break;
......@@ -529,7 +529,7 @@ void WINAPI DOSVM_Int31Handler( CONTEXT *context )
DWORD handle = MAKELONG( DI_reg(context), SI_reg(context) );
BYTE *ptr;
TRACE( "resize memory block (0x%08x, %u bytes)\n", handle, size );
TRACE( "resize memory block (0x%08lx, %lu bytes)\n", handle, size );
ptr = DPMI_xrealloc( (void *)handle, size );
if (!ptr)
......@@ -591,7 +591,7 @@ void WINAPI DOSVM_Int31Handler( CONTEXT *context )
break;
case 0x0800: /* Physical address mapping */
FIXME( "physical address mapping (0x%08x) - unimplemented\n",
FIXME( "physical address mapping (0x%08lx) - unimplemented\n",
MAKELONG(CX_reg(context),BX_reg(context)) );
break;
......
......@@ -241,10 +241,10 @@ static void DOSVM_HardwareInterruptPM( CONTEXT *context, BYTE intnum )
*/
BOOL DOSVM_EmulateInterruptPM( CONTEXT *context, BYTE intnum )
{
TRACE_(relay)("\1Call DOS int 0x%02x ret=%04x:%08x\n"
" eax=%08x ebx=%08x ecx=%08x edx=%08x\n"
" esi=%08x edi=%08x ebp=%08x esp=%08x\n"
" ds=%04x es=%04x fs=%04x gs=%04x ss=%04x flags=%08x\n",
TRACE_(relay)("\1Call DOS int 0x%02x ret=%04lx:%08lx\n"
" eax=%08lx ebx=%08lx ecx=%08lx edx=%08lx\n"
" esi=%08lx edi=%08lx ebp=%08lx esp=%08lx\n"
" ds=%04lx es=%04lx fs=%04lx gs=%04lx ss=%04lx flags=%08lx\n",
intnum, context->SegCs, context->Eip,
context->Eax, context->Ebx, context->Ecx, context->Edx,
context->Esi, context->Edi, context->Ebp, context->Esp,
......@@ -262,7 +262,7 @@ BOOL DOSVM_EmulateInterruptPM( CONTEXT *context, BYTE intnum )
if (intnum != context->Eip / DOSVM_STUB_PM16)
WARN( "interrupt stub has been modified "
"(interrupt is %02x, interrupt stub is %02x)\n",
"(interrupt is %02x, interrupt stub is %02lx)\n",
intnum, context->Eip/DOSVM_STUB_PM16 );
TRACE( "builtin interrupt %02x has been branched to\n", intnum );
......@@ -555,7 +555,7 @@ static void WINAPI DOSVM_Int1aHandler( CONTEXT *context )
SET_CX( context, HIWORD(data->Ticks) );
SET_DX( context, LOWORD(data->Ticks) );
SET_AL( context, 0 ); /* FIXME: midnight flag is unsupported */
TRACE( "GET SYSTEM TIME - ticks=%d\n", data->Ticks );
TRACE( "GET SYSTEM TIME - ticks=%ld\n", data->Ticks );
}
break;
......
......@@ -177,7 +177,7 @@ static void set_timer(unsigned timer)
/* speaker on ? */
if ((parport_8255[1] & 3) == 3)
{
TRACE("Beep (freq: %d) !\n", 1193180 / val);
TRACE("Beep (freq: %ld) !\n", 1193180 / val);
Beep(1193180 / val, 20);
}
break;
......@@ -329,7 +329,7 @@ DWORD DOSVM_inport( int port, int size )
*/
void DOSVM_outport( int port, int size, DWORD value )
{
TRACE("IO: 0x%x (%d-byte value) to port 0x%04x\n", value, size, port );
TRACE("IO: 0x%lx (%d-byte value) to port 0x%04x\n", value, size, port );
DOSMEM_InitDosMemory();
......
......@@ -653,11 +653,11 @@ DWORD WINAPI MapProcessHandle( HANDLE hProcess )
*/
void WINAPI SetProcessDword( DWORD dwProcessID, INT offset, DWORD value )
{
TRACE("(%d, %d)\n", dwProcessID, offset );
TRACE("(%ld, %d)\n", dwProcessID, offset );
if (dwProcessID && dwProcessID != GetCurrentProcessId())
{
ERR("%d: process %x not accessible\n", offset, dwProcessID);
ERR("%d: process %lx not accessible\n", offset, dwProcessID);
return;
}
......@@ -697,11 +697,11 @@ DWORD WINAPI GetProcessDword( DWORD dwProcessID, INT offset )
DWORD x, y;
STARTUPINFOW siw;
TRACE("(%d, %d)\n", dwProcessID, offset );
TRACE("(%ld, %d)\n", dwProcessID, offset );
if (dwProcessID && dwProcessID != GetCurrentProcessId())
{
ERR("%d: process %x not accessible\n", offset, dwProcessID);
ERR("%d: process %lx not accessible\n", offset, dwProcessID);
return 0;
}
......@@ -808,7 +808,7 @@ DWORD WINAPI WaitForMultipleObjectsEx16( DWORD count, const HANDLE *handles,
*/
VOID WINAPI VWin32_BoostThreadGroup( DWORD threadId, INT boost )
{
FIXME("(0x%08x,%d): stub\n", threadId, boost);
FIXME("(0x%08lx,%d): stub\n", threadId, boost);
}
......@@ -817,7 +817,7 @@ VOID WINAPI VWin32_BoostThreadGroup( DWORD threadId, INT boost )
*/
VOID WINAPI VWin32_BoostThreadStatic( DWORD threadId, INT boost )
{
FIXME("(0x%08x,%d): stub\n", threadId, boost);
FIXME("(0x%08lx,%d): stub\n", threadId, boost);
}
/***********************************************************************
......
......@@ -1234,7 +1234,7 @@ DWORD NE_StartTask(void)
/* Now call 16-bit entry point */
TRACE("Starting main program: cs:ip=%04x:%04x ds=%04x ss:sp=%04x:%04x\n",
TRACE("Starting main program: cs:ip=%04lx:%04lx ds=%04lx ss:sp=%04x:%04x\n",
context.SegCs, context.Eip, context.SegDs, CURRENT_SS, CURRENT_SP);
WOWCallback16Ex( 0, WCB16_REGS, 0, NULL, (DWORD *)&context );
......
......@@ -543,7 +543,7 @@ static void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum)
if (entry->segnum == segnum)
{
pFunc = pSeg+entry->offs;
TRACE("pFunc: %p, *(DWORD *)pFunc: %08x, num_entries: %d\n", pFunc, *(DWORD *)pFunc, num_entries);
TRACE("pFunc: %p, *(DWORD *)pFunc: %08lx, num_entries: %d\n", pFunc, *(DWORD *)pFunc, num_entries);
if (*(pFunc+2) == 0x90)
{
if (*(WORD *)pFunc == 0x581e) /* push ds, pop ax */
......@@ -683,7 +683,7 @@ static BOOL NE_InitDLL( NE_MODULE *pModule )
context.Ebp = CURRENT_SP + FIELD_OFFSET(STACK16FRAME,bp);
pModule->ne_csip = 0; /* Don't initialize it twice */
TRACE_(dll)("Calling LibMain for %.*s, cs:ip=%04x:%04x ds=%04x di=%04x cx=%04x\n",
TRACE_(dll)("Calling LibMain for %.*s, cs:ip=%04lx:%04lx ds=%04lx di=%04x cx=%04x\n",
*((BYTE*)pModule + pModule->ne_restab),
(char *)pModule + pModule->ne_restab + 1,
context.SegCs, context.Eip, context.SegDs,
......
......@@ -518,7 +518,7 @@ int relay_call_from_16( void *entry_point, unsigned char *args16, CONTEXT *conte
if (!j) /* register function */
{
args32[nb_args++] = (int)context;
TRACE( ") ret=%04x:%04x ax=%04x bx=%04x cx=%04x dx=%04x si=%04x di=%04x bp=%04x ss:sp=%04x:%04x ds=%04x es=%04x efl=%08x\n",
TRACE( ") ret=%04x:%04x ax=%04x bx=%04x cx=%04x dx=%04x si=%04x di=%04x bp=%04x ss:sp=%04x:%04x ds=%04x es=%04x efl=%08lx\n",
frame->cs, frame->ip, (WORD)context->Eax, (WORD)context->Ebx, (WORD)context->Ecx,
(WORD)context->Edx, (WORD)context->Esi, (WORD)context->Edi, (WORD)context->Ebp,
(WORD)context->SegSs, (WORD)context->Esp, (WORD)context->SegDs, (WORD)context->SegEs, context->EFlags );
......@@ -534,7 +534,7 @@ int relay_call_from_16( void *entry_point, unsigned char *args16, CONTEXT *conte
TRACE( "\1Ret %s.%d: %s() ", module, ordinal, func );
if (!j) /* register function */
{
TRACE( "retval=none ret=%04x:%04x ax=%04x bx=%04x cx=%04x dx=%04x si=%04x di=%04x ds=%04x es=%04x efl=%08x\n",
TRACE( "retval=none ret=%04x:%04x ax=%04x bx=%04x cx=%04x dx=%04x si=%04x di=%04x ds=%04x es=%04x efl=%08lx\n",
(WORD)context->SegCs, LOWORD(context->Eip), (WORD)context->Eax, (WORD)context->Ebx,
(WORD)context->Ecx, (WORD)context->Edx, (WORD)context->Esi, (WORD)context->Edi,
(WORD)context->SegDs, (WORD)context->SegEs, context->EFlags );
......
......@@ -869,7 +869,7 @@ HGLOBAL16 WINAPI AllocResource16( HMODULE16 hModule, HRSRC16 hRsrc, DWORD size)
NE_MODULE *pModule = NE_GetPtr( hModule );
if (!pModule || !pModule->ne_rsrctab || !hRsrc) return 0;
TRACE("module=%04x res=%04x size=%d\n", hModule, hRsrc, size );
TRACE("module=%04x res=%04x size=%ld\n", hModule, hRsrc, size );
sizeShift = *(WORD *)((char *)pModule + pModule->ne_rsrctab);
pNameInfo = (NE_NAMEINFO*)((char*)pModule + hRsrc);
......
......@@ -215,7 +215,7 @@ void WINAPI __wine_snoop_entry( CONTEXT *context )
dll=dll->next;
}
if (!dll) {
FIXME("entrypoint 0x%08x not found\n",entry);
FIXME("entrypoint 0x%08lx not found\n",entry);
return; /* oops */
}
while (*rets) {
......@@ -246,7 +246,7 @@ void WINAPI __wine_snoop_entry( CONTEXT *context )
context->SegCs = HIWORD(fun->origfun);
TRACE("\1CALL %s.%d: %s(", dll->name, ordinal, fun->name);
TRACE("\1CALL %s.%ld: %s(", dll->name, ordinal, fun->name);
if (fun->nrofargs>0) {
max = fun->nrofargs;
if (max>16) max=16;
......@@ -276,7 +276,7 @@ void WINAPI __wine_snoop_return( CONTEXT *context )
}
context->Eip = LOWORD(ret->origreturn);
context->SegCs = HIWORD(ret->origreturn);
TRACE("\1RET %s.%d: %s(", ret->dll->name, ret->ordinal, ret->dll->funs[ret->ordinal].name);
TRACE("\1RET %s.%ld: %s(", ret->dll->name, ret->ordinal, ret->dll->funs[ret->ordinal].name);
if (ret->args) {
int i,max;
......
......@@ -85,7 +85,7 @@ VOID WINAPI _EnterSysLevel(SYSLEVEL *lock)
struct kernel_thread_data *thread_data = kernel_get_thread_data();
int i;
TRACE("(%p, level %d): thread %x count before %d\n",
TRACE("(%p, level %d): thread %lx count before %ld\n",
lock, lock->level, GetCurrentThreadId(), thread_data->sys_count[lock->level] );
for ( i = 3; i > lock->level; i-- )
......@@ -100,7 +100,7 @@ VOID WINAPI _EnterSysLevel(SYSLEVEL *lock)
thread_data->sys_count[lock->level]++;
thread_data->sys_mutex[lock->level] = lock;
TRACE("(%p, level %d): thread %x count after %d\n",
TRACE("(%p, level %d): thread %lx count after %ld\n",
lock, lock->level, GetCurrentThreadId(), thread_data->sys_count[lock->level] );
if (lock == &Win16Mutex) CallTo16_TebSelector = get_fs();
......@@ -114,12 +114,12 @@ VOID WINAPI _LeaveSysLevel(SYSLEVEL *lock)
{
struct kernel_thread_data *thread_data = kernel_get_thread_data();
TRACE("(%p, level %d): thread %x count before %d\n",
TRACE("(%p, level %d): thread %lx count before %ld\n",
lock, lock->level, GetCurrentThreadId(), thread_data->sys_count[lock->level] );
if ( thread_data->sys_count[lock->level] <= 0 || thread_data->sys_mutex[lock->level] != lock )
{
ERR("(%p, level %d): Invalid state: count %d mutex %p.\n",
ERR("(%p, level %d): Invalid state: count %ld mutex %p.\n",
lock, lock->level, thread_data->sys_count[lock->level],
thread_data->sys_mutex[lock->level] );
}
......@@ -131,7 +131,7 @@ VOID WINAPI _LeaveSysLevel(SYSLEVEL *lock)
RtlLeaveCriticalSection( &lock->crst );
TRACE("(%p, level %d): thread %x count after %d\n",
TRACE("(%p, level %d): thread %lx count after %ld\n",
lock, lock->level, GetCurrentThreadId(), thread_data->sys_count[lock->level] );
}
......
......@@ -680,7 +680,7 @@ BOOL16 WINAPI WaitEvent16( HTASK16 hTask )
if (pTask->flags & TDBF_WIN32)
{
FIXME("called for Win32 thread (%04x)!\n", GetCurrentThreadId());
FIXME("called for Win32 thread (%04lx)!\n", GetCurrentThreadId());
return TRUE;
}
......@@ -719,7 +719,7 @@ void WINAPI PostEvent16( HTASK16 hTask )
if (pTask->flags & TDBF_WIN32)
{
FIXME("called for Win32 thread (%04x)!\n", (DWORD)pTask->teb->ClientId.UniqueThread );
FIXME("called for Win32 thread (%04lx)!\n", (DWORD)pTask->teb->ClientId.UniqueThread );
return;
}
......@@ -881,7 +881,7 @@ FARPROC16 WINAPI MakeProcInstance16( FARPROC16 func, HANDLE16 hInstance )
thunk = MapSL( thunkaddr );
lfunc = MapSL( (SEGPTR)func );
TRACE("(%p,%04x): got thunk %08x\n", func, hInstance, thunkaddr );
TRACE("(%p,%04x): got thunk %08lx\n", func, hInstance, thunkaddr );
if (((lfunc[0]==0x8c) && (lfunc[1]==0xd8)) || /* movw %ds, %ax */
((lfunc[0]==0x1e) && (lfunc[1]==0x58)) /* pushw %ds, popw %ax */
) {
......
......@@ -274,14 +274,14 @@ static LPVOID _loadthunk(LPCSTR module, LPCSTR func, LPCSTR module32,
if (TD32 && TD16->checksum != TD32->checksum)
{
ERR("(%s, %s, %s): Wrong checksum %08x (should be %08x)\n",
ERR("(%s, %s, %s): Wrong checksum %08lx (should be %08lx)\n",
module, func, module32, TD16->checksum, TD32->checksum);
return 0;
}
if (!TD32 && checksum && checksum != *(LPDWORD)TD16)
{
ERR("(%s, %s, %s): Wrong checksum %08x (should be %08x)\n",
ERR("(%s, %s, %s): Wrong checksum %08lx (should be %08lx)\n",
module, func, module32, *(LPDWORD)TD16, checksum);
return 0;
}
......@@ -324,14 +324,14 @@ UINT WINAPI ThunkConnect32(
{
directionSL = TRUE;
TRACE("SL01 thunk %s (%p) <- %s (%s), Reason: %d\n",
TRACE("SL01 thunk %s (%p) <- %s (%s), Reason: %ld\n",
module32, TD, module16, thunkfun16, dwReason);
}
else if (!strncmp(TD->magic, "LS01", 4))
{
directionSL = FALSE;
TRACE("LS01 thunk %s (%p) -> %s (%s), Reason: %d\n",
TRACE("LS01 thunk %s (%p) -> %s (%s), Reason: %ld\n",
module32, TD, module16, thunkfun16, dwReason);
}
else
......@@ -370,7 +370,7 @@ UINT WINAPI ThunkConnect32(
tdb->next = SL32->data->targetDB; /* FIXME: not thread-safe! */
SL32->data->targetDB = tdb;
TRACE("Process %08x allocated TargetDB entry for ThunkDataSL %p\n",
TRACE("Process %08lx allocated TargetDB entry for ThunkDataSL %p\n",
GetCurrentProcessId(), SL32->data);
}
else
......@@ -992,11 +992,11 @@ DWORD WINAPIV SSCall(
DWORD i,ret;
DWORD *args = ((DWORD *)&fun) + 1;
TRACE("(%d,0x%08x,%p,[",nr,flags,fun);
for (i = 0; i < nr/4; i++) TRACE("0x%08x,",args[i]);
TRACE("(%ld,0x%08lx,%p,[",nr,flags,fun);
for (i = 0; i < nr/4; i++) TRACE("0x%08lx,",args[i]);
TRACE("])\n");
ret = call_entry_point( fun, nr / sizeof(DWORD), args );
TRACE(" returning %d ...\n",ret);
TRACE(" returning %ld ...\n",ret);
return ret;
}
......@@ -1079,7 +1079,7 @@ void WINAPI
FreeSLCallback(
DWORD x /* [in] 16 bit callback (segmented pointer?) */
) {
FIXME("(0x%08x): stub\n",x);
FIXME("(0x%08lx): stub\n",x);
}
/**********************************************************************
......@@ -1234,7 +1234,7 @@ void WINAPI __regs_K32Thk1632Prolog( CONTEXT *context )
WORD stackSel = SELECTOROF(frame32->frame16);
DWORD stackBase = GetSelectorBase(stackSel);
TRACE("before SYSTHUNK hack: EBP: %08x ESP: %08x cur_stack: %04x:%04x\n",
TRACE("before SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %04x:%04x\n",
context->Ebp, context->Esp, CURRENT_SS, CURRENT_SP);
memset(frame16, '\0', sizeof(STACK16FRAME));
......@@ -1248,7 +1248,7 @@ void WINAPI __regs_K32Thk1632Prolog( CONTEXT *context )
context->Esp = (DWORD)stack32 + 4;
context->Ebp = context->Esp + argSize;
TRACE("after SYSTHUNK hack: EBP: %08x ESP: %08x cur_stack: %04x:%04x\n",
TRACE("after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %04x:%04x\n",
context->Ebp, context->Esp, CURRENT_SS, CURRENT_SP);
}
......@@ -1279,7 +1279,7 @@ void WINAPI __regs_K32Thk1632Epilog( CONTEXT *context )
DWORD nArgsPopped = context->Esp - (DWORD)stack32;
TRACE("before SYSTHUNK hack: EBP: %08x ESP: %08x cur_stack: %04x:%04x\n",
TRACE("before SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %04x:%04x\n",
context->Ebp, context->Esp, CURRENT_SS, CURRENT_SP);
kernel_get_thread_data()->stack = (SEGPTR)frame16->frame32;
......@@ -1287,7 +1287,7 @@ void WINAPI __regs_K32Thk1632Epilog( CONTEXT *context )
context->Esp = (DWORD)stack16 + nArgsPopped;
context->Ebp = frame16->ebp;
TRACE("after SYSTHUNK hack: EBP: %08x ESP: %08x cur_stack: %04x:%04x\n",
TRACE("after SYSTHUNK hack: EBP: %08lx ESP: %08lx cur_stack: %04x:%04x\n",
context->Ebp, context->Esp, CURRENT_SS, CURRENT_SP);
}
}
......@@ -1336,14 +1336,14 @@ UINT WINAPI ThunkConnect16(
{
directionSL = TRUE;
TRACE("SL01 thunk %s (%p) -> %s (%s), Reason: %d\n",
TRACE("SL01 thunk %s (%p) -> %s (%s), Reason: %ld\n",
module16, TD, module32, thunkfun32, dwReason);
}
else if (!strncmp(TD->magic, "LS01", 4))
{
directionSL = FALSE;
TRACE("LS01 thunk %s (%p) <- %s (%s), Reason: %d\n",
TRACE("LS01 thunk %s (%p) <- %s (%s), Reason: %ld\n",
module16, TD, module32, thunkfun32, dwReason);
}
else
......@@ -1510,7 +1510,7 @@ void WINAPI C16ThkSL01(CONTEXT *context)
DWORD targetNr = LOWORD(context->Ecx) / 4;
struct SLTargetDB *tdb;
TRACE("Process %08x calling target %d of ThunkDataSL %p\n",
TRACE("Process %08lx calling target %ld of ThunkDataSL %p\n",
GetCurrentProcessId(), targetNr, td);
for (tdb = td->targetDB; tdb; tdb = tdb->next)
......@@ -1531,7 +1531,7 @@ void WINAPI C16ThkSL01(CONTEXT *context)
{
context->Edx = tdb->targetTable[targetNr];
TRACE("Call target is %08x\n", context->Edx);
TRACE("Call target is %08lx\n", context->Edx);
}
else
{
......@@ -1542,7 +1542,7 @@ void WINAPI C16ThkSL01(CONTEXT *context)
context->SegCs = stack[3];
context->Esp += td->apiDB[targetNr].nrArgBytes + 4;
ERR("Process %08x did not ThunkConnect32 %s to %s\n",
ERR("Process %08lx did not ThunkConnect32 %s to %s\n",
GetCurrentProcessId(), td->pszDll32, td->pszDll16);
}
}
......@@ -2288,7 +2288,7 @@ void WINAPI HouseCleanLogicallyDeadHandles(void)
*/
BOOL WINAPI _KERNEL32_100(HANDLE threadid,DWORD exitcode,DWORD x)
{
FIXME("(%p,%d,0x%08x): stub\n",threadid,exitcode,x);
FIXME("(%p,%ld,0x%08lx): stub\n",threadid,exitcode,x);
return TRUE;
}
......@@ -2301,7 +2301,7 @@ BOOL WINAPI _KERNEL32_100(HANDLE threadid,DWORD exitcode,DWORD x)
*/
DWORD WINAPI _KERNEL32_99(DWORD x)
{
FIXME("(0x%08x): stub\n",x);
FIXME("(0x%08lx): stub\n",x);
return 1;
}
......@@ -2572,7 +2572,7 @@ static DWORD WOW_CallProc32W16( FARPROC proc32, DWORD nrofargs, DWORD *args )
else ret = call_entry_point( proc32, nrofargs & ~CPEX_DEST_CDECL, args );
RestoreThunkLock( mutex_count );
TRACE("returns %08x\n",ret);
TRACE("returns %08lx\n",ret);
return ret;
}
......@@ -2584,7 +2584,7 @@ DWORD WINAPIV CallProc32W16( DWORD nrofargs, DWORD argconvmask, FARPROC proc32,
DWORD args[32];
unsigned int i;
TRACE("(%d,%d,%p args[",nrofargs,argconvmask,proc32);
TRACE("(%ld,%ld,%p args[",nrofargs,argconvmask,proc32);
for (i=0;i<nrofargs;i++)
{
......@@ -2593,14 +2593,14 @@ DWORD WINAPIV CallProc32W16( DWORD nrofargs, DWORD argconvmask, FARPROC proc32,
SEGPTR ptr = VA_ARG16( valist, SEGPTR );
/* pascal convention, have to reverse the arguments order */
args[nrofargs - i - 1] = (DWORD)MapSL(ptr);
TRACE("%08x(%p),",ptr,MapSL(ptr));
TRACE("%08lx(%p),",ptr,MapSL(ptr));
}
else
{
DWORD arg = VA_ARG16( valist, DWORD );
/* pascal convention, have to reverse the arguments order */
args[nrofargs - i - 1] = arg;
TRACE("%d,", arg);
TRACE("%ld,", arg);
}
}
TRACE("])\n");
......@@ -2619,7 +2619,7 @@ DWORD WINAPIV CallProcEx32W16( DWORD nrofargs, DWORD argconvmask, FARPROC proc32
DWORD args[32];
unsigned int i, count = min( 32, nrofargs & ~CPEX_DEST_CDECL );
TRACE("(%s,%d,%d,%p args[", nrofargs & CPEX_DEST_CDECL ? "cdecl": "stdcall",
TRACE("(%s,%ld,%ld,%p args[", nrofargs & CPEX_DEST_CDECL ? "cdecl": "stdcall",
nrofargs & ~CPEX_DEST_CDECL, argconvmask, proc32);
for (i = 0; i < count; i++)
......@@ -2628,13 +2628,13 @@ DWORD WINAPIV CallProcEx32W16( DWORD nrofargs, DWORD argconvmask, FARPROC proc32
{
SEGPTR ptr = VA_ARG16( valist, SEGPTR );
args[i] = (DWORD)MapSL(ptr);
TRACE("%08x(%p),",ptr,MapSL(ptr));
TRACE("%08lx(%p),",ptr,MapSL(ptr));
}
else
{
DWORD arg = VA_ARG16( valist, DWORD );
args[i] = arg;
TRACE("%d,", arg);
TRACE("%ld,", arg);
}
}
TRACE("])\n");
......@@ -2660,6 +2660,6 @@ DWORD WINAPIV WOW16Call(WORD x, WORD y, WORD z, VA_LIST16 args)
}
calladdr = VA_ARG16(args,DWORD);
stack16_pop( 3*sizeof(WORD) + x + sizeof(DWORD) );
FIXME(") calling address was 0x%08x\n",calladdr);
FIXME(") calling address was 0x%08lx\n",calladdr);
return 0;
}
......@@ -328,6 +328,6 @@ VOID WINAPI UTUnRegister( HMODULE hModule )
*/
WORD WINAPI UTInit16( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
{
FIXME("(%08x, %08x, %08x, %08x): stub\n", x1, x2, x3, x4 );
FIXME("(%08lx, %08lx, %08lx, %08lx): stub\n", x1, x2, x3, x4 );
return 0;
}
......@@ -445,7 +445,7 @@ BOOL WINAPI K32WOWCallback16Ex( DWORD vpfn16, DWORD dwFlags,
DWORD count = cbArgs / sizeof(WORD);
WORD * wstack = (WORD *)stack;
TRACE_(relay)( "\1CallTo16(func=%04x:%04x", context->SegCs, LOWORD(context->Eip) );
TRACE_(relay)( "\1CallTo16(func=%04lx:%04x", context->SegCs, LOWORD(context->Eip) );
while (count) TRACE_(relay)( ",%04x", wstack[--count] );
TRACE_(relay)( ") ss:sp=%04x:%04x ax=%04x bx=%04x cx=%04x dx=%04x si=%04x di=%04x bp=%04x ds=%04x es=%04x\n",
CURRENT_SS, CURRENT_SP,
......@@ -507,7 +507,7 @@ BOOL WINAPI K32WOWCallback16Ex( DWORD vpfn16, DWORD dwFlags,
if (TRACE_ON(relay))
{
TRACE_(relay)( "\1RetFrom16() ss:sp=%04x:%04x retval=%08x\n", CURRENT_SS, CURRENT_SP, ret );
TRACE_(relay)( "\1RetFrom16() ss:sp=%04x:%04x retval=%08lx\n", CURRENT_SS, CURRENT_SP, ret );
SYSLEVEL_CheckNotLevel( 2 );
}
}
......
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