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;
......
......@@ -1174,7 +1174,7 @@ static void INT21_SequentialReadFromFCB( CONTEXT *context )
record_number = 128 * fcb->current_block_number + fcb->record_within_current_block;
position = SetFilePointer(handle, record_number * fcb->logical_record_size, NULL, 0);
if (position != record_number * fcb->logical_record_size) {
TRACE("seek(%d, %d, 0) failed with %u\n",
TRACE("seek(%d, %ld, 0) failed with %lu\n",
fcb->file_number, record_number * fcb->logical_record_size, position);
AL_result = 0x01; /* end of file, no data read */
} else {
......@@ -1190,7 +1190,7 @@ static void INT21_SequentialReadFromFCB( CONTEXT *context )
AL_result = 0x03; /* end of file, partial record read */
} /* if */
} else {
TRACE("successful read %d bytes from record %d (position %u) of file %d (handle %p)\n",
TRACE("successful read %d bytes from record %ld (position %lu) of file %d (handle %p)\n",
bytes_read, record_number, position, fcb->file_number, handle);
AL_result = 0x00; /* successful */
} /* if */
......@@ -1254,7 +1254,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT *context )
record_number = 128 * fcb->current_block_number + fcb->record_within_current_block;
position = SetFilePointer(handle, record_number * fcb->logical_record_size, NULL, 0);
if (position != record_number * fcb->logical_record_size) {
TRACE("seek(%d, %d, 0) failed with %u\n",
TRACE("seek(%d, %ld, 0) failed with %lu\n",
fcb->file_number, record_number * fcb->logical_record_size, position);
AL_result = 0x01; /* disk full */
} else {
......@@ -1265,7 +1265,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT *context )
fcb->file_number, disk_transfer_area, fcb->logical_record_size, bytes_written);
AL_result = 0x01; /* disk full */
} else {
TRACE("successful written %d bytes from record %d (position %u) of file %d (handle %p)\n",
TRACE("successful written %d bytes from record %ld (position %lu) of file %d (handle %p)\n",
bytes_written, record_number, position, fcb->file_number, handle);
AL_result = 0x00; /* successful */
} /* if */
......@@ -1330,7 +1330,7 @@ static void INT21_ReadRandomRecordFromFCB( CONTEXT *context )
} else {
position = SetFilePointer(handle, record_number * fcb->logical_record_size, NULL, 0);
if (position != record_number * fcb->logical_record_size) {
TRACE("seek(%d, %d, 0) failed with %u\n",
TRACE("seek(%d, %ld, 0) failed with %lu\n",
fcb->file_number, record_number * fcb->logical_record_size, position);
AL_result = 0x01; /* end of file, no data read */
} else {
......@@ -1346,7 +1346,7 @@ static void INT21_ReadRandomRecordFromFCB( CONTEXT *context )
AL_result = 0x03; /* end of file, partial record read */
} /* if */
} else {
TRACE("successful read %d bytes from record %d (position %u) of file %d (handle %p)\n",
TRACE("successful read %d bytes from record %ld (position %lu) of file %d (handle %p)\n",
bytes_read, record_number, position, fcb->file_number, handle);
AL_result = 0x00; /* successful */
} /* if */
......@@ -1403,7 +1403,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT *context )
} else {
position = SetFilePointer(handle, record_number * fcb->logical_record_size, NULL, 0);
if (position != record_number * fcb->logical_record_size) {
TRACE("seek(%d, %d, 0) failed with %u\n",
TRACE("seek(%d, %ld, 0) failed with %lu\n",
fcb->file_number, record_number * fcb->logical_record_size, position);
AL_result = 0x01; /* disk full */
} else {
......@@ -1414,7 +1414,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT *context )
fcb->file_number, disk_transfer_area, fcb->logical_record_size, bytes_written);
AL_result = 0x01; /* disk full */
} else {
TRACE("successful written %d bytes from record %d (position %u) of file %d (handle %p)\n",
TRACE("successful written %d bytes from record %ld (position %lu) of file %d (handle %p)\n",
bytes_written, record_number, position, fcb->file_number, handle);
AL_result = 0x00; /* successful */
} /* if */
......@@ -1482,7 +1482,7 @@ static void INT21_RandomBlockReadFromFCB( CONTEXT *context )
} else {
position = SetFilePointer(handle, record_number * fcb->logical_record_size, NULL, 0);
if (position != record_number * fcb->logical_record_size) {
TRACE("seek(%d, %d, 0) failed with %u\n",
TRACE("seek(%d, %ld, 0) failed with %lu\n",
fcb->file_number, record_number * fcb->logical_record_size, position);
records_read = 0;
AL_result = 0x01; /* end of file, no data read */
......@@ -1503,7 +1503,7 @@ static void INT21_RandomBlockReadFromFCB( CONTEXT *context )
AL_result = 0x03; /* end of file, partial record read */
} /* if */
} else {
TRACE("successful read %d bytes from record %d (position %u) of file %d (handle %p)\n",
TRACE("successful read %d bytes from record %ld (position %lu) of file %d (handle %p)\n",
bytes_read, record_number, position, fcb->file_number, handle);
records_read = records_requested;
AL_result = 0x00; /* successful */
......@@ -1573,7 +1573,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT *context )
} else {
position = SetFilePointer(handle, record_number * fcb->logical_record_size, NULL, 0);
if (position != record_number * fcb->logical_record_size) {
TRACE("seek(%d, %d, 0) failed with %u\n",
TRACE("seek(%d, %ld, 0) failed with %lu\n",
fcb->file_number, record_number * fcb->logical_record_size, position);
records_written = 0;
AL_result = 0x01; /* disk full */
......@@ -1588,7 +1588,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT *context )
records_written = bytes_written / fcb->logical_record_size;
AL_result = 0x01; /* disk full */
} else {
TRACE("successful write %d bytes from record %d (position %u) of file %d (handle %p)\n",
TRACE("successful write %d bytes from record %ld (position %lu) of file %d (handle %p)\n",
bytes_written, record_number, position, fcb->file_number, handle);
records_written = records_requested;
AL_result = 0x00; /* successful */
......@@ -3347,7 +3347,7 @@ static BOOL INT21_CreateTempFile( CONTEXT *context )
for (;;)
{
sprintf( p, "wine%04x.%03d", GetCurrentThreadId(), counter );
sprintf( p, "wine%04lx.%03d", GetCurrentThreadId(), counter );
counter = (counter + 1) % 1000;
SET_AX( context,
......@@ -3817,7 +3817,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
BOOL bSetDOSExtendedError = FALSE;
TRACE( "AX=%04x BX=%04x CX=%04x DX=%04x "
"SI=%04x DI=%04x DS=%04x ES=%04x EFL=%08x\n",
"SI=%04x DI=%04x DS=%04x ES=%04x EFL=%08lx\n",
AX_reg(context), BX_reg(context),
CX_reg(context), DX_reg(context),
SI_reg(context), DI_reg(context),
......@@ -3886,7 +3886,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
break;
case 0x09: /* WRITE STRING TO STANDARD OUTPUT */
TRACE("WRITE '$'-terminated string from %04X:%04X to stdout\n",
TRACE("WRITE '$'-terminated string from %04lX:%04X to stdout\n",
context->SegDs, DX_reg(context) );
{
LPSTR data = CTX_SEG_OFF_TO_LIN( context,
......@@ -3993,7 +3993,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
break;
case 0x1a: /* SET DISK TRANSFER AREA ADDRESS */
TRACE( "SET DISK TRANSFER AREA ADDRESS %04X:%04X\n",
TRACE( "SET DISK TRANSFER AREA ADDRESS %04lX:%04X\n",
context->SegDs, DX_reg(context) );
{
TDB *task = GlobalLock16( GetCurrentTask() );
......@@ -4361,7 +4361,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
break;
case 0x3f: /* "READ" - READ FROM FILE OR DEVICE */
TRACE( "READ from %d to %04X:%04X for %d bytes\n",
TRACE( "READ from %d to %04lX:%04X for %d bytes\n",
BX_reg(context),
context->SegDs,
DX_reg(context),
......@@ -4391,7 +4391,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
break;
case 0x40: /* "WRITE" - WRITE TO FILE OR DEVICE */
TRACE( "WRITE from %04X:%04X to handle %d for %d byte\n",
TRACE( "WRITE from %04lX:%04X to handle %d for %d byte\n",
context->SegDs, DX_reg(context),
BX_reg(context), CX_reg(context) );
{
......@@ -4426,7 +4426,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
break;
case 0x42: /* "LSEEK" - SET CURRENT FILE POSITION */
TRACE( "LSEEK handle %d offset %d from %s\n",
TRACE( "LSEEK handle %d offset %ld from %s\n",
BX_reg(context),
MAKELONG( DX_reg(context), CX_reg(context) ),
(AL_reg(context) == 0) ?
......@@ -4520,7 +4520,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
break;
case 0x49: /* FREE MEMORY */
TRACE( "FREE MEMORY segment %04X\n", context->SegEs );
TRACE( "FREE MEMORY segment %04lX\n", context->SegEs );
{
BOOL ok = !GlobalDOSFree16( context->SegEs );
......@@ -4536,7 +4536,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
break;
case 0x4a: /* RESIZE MEMORY BLOCK */
TRACE( "RESIZE MEMORY segment %04X to %d paragraphs\n",
TRACE( "RESIZE MEMORY segment %04lX to %d paragraphs\n",
context->SegEs, BX_reg(context) );
{
FIXME( "Resize memory block - unsupported under Win16\n" );
......@@ -4677,14 +4677,14 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
switch (AL_reg(context))
{
case 0x00: /* LOCK */
TRACE( "lock handle %d offset %d length %d\n",
TRACE( "lock handle %d offset %ld length %ld\n",
BX_reg(context), offset, length );
if (!LockFile( handle, offset, 0, length, 0 ))
bSetDOSExtendedError = TRUE;
break;
case 0x01: /* UNLOCK */
TRACE( "unlock handle %d offset %d length %d\n",
TRACE( "unlock handle %d offset %ld length %ld\n",
BX_reg(context), offset, length );
if (!UnlockFile( handle, offset, 0, length, 0 ))
bSetDOSExtendedError = TRUE;
......@@ -4873,10 +4873,10 @@ void WINAPI DOSVM_Int21Handler( CONTEXT *context )
/* Print error code if carry flag is set. */
if (context->EFlags & 0x0001)
TRACE("failed, error %d\n", GetLastError() );
TRACE("failed, error %ld\n", GetLastError() );
TRACE( "returning: AX=%04x BX=%04x CX=%04x DX=%04x "
"SI=%04x DI=%04x DS=%04x ES=%04x EFL=%08x\n",
"SI=%04x DI=%04x DS=%04x ES=%04x EFL=%08lx\n",
AX_reg(context), BX_reg(context),
CX_reg(context), DX_reg(context),
SI_reg(context), DI_reg(context),
......
......@@ -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;
}
......@@ -252,7 +252,7 @@ void WINAPI DECLSPEC_HIDDEN __regs_VxDCall( CONTEXT *context )
if (proc) context->Eax = proc( service, context );
else
{
FIXME( "Unknown/unimplemented VxD (%08x)\n", service);
FIXME( "Unknown/unimplemented VxD (%08lx)\n", service);
context->Eax = 0xffffffff; /* FIXME */
}
}
......@@ -414,7 +414,7 @@ void WINAPI __wine_vxd_vxdloader( CONTEXT *context )
break;
case 0x0001: /* load device */
FIXME("load device %04x:%04x (%s)\n",
FIXME("load device %04lx:%04x (%s)\n",
context->SegDs, DX_reg(context),
debugstr_a(MapSL(MAKESEGPTR(context->SegDs, DX_reg(context)))));
SET_AX( context, 0x0000 );
......@@ -424,7 +424,7 @@ void WINAPI __wine_vxd_vxdloader( CONTEXT *context )
break;
case 0x0002: /* unload device */
FIXME("unload device (%08x)\n", context->Ebx);
FIXME("unload device (%08lx)\n", context->Ebx);
SET_AX( context, 0x0000 );
RESET_CFLAG(context);
break;
......@@ -518,7 +518,7 @@ void WINAPI __wine_vxd_shell( CONTEXT *context )
break;
case 0x0106: /* install timeout callback */
TRACE("VxD Shell: ignoring shell callback (%d sec.)\n", context->Ebx);
TRACE("VxD Shell: ignoring shell callback (%ld sec.)\n", context->Ebx);
SET_CFLAG(context);
break;
......@@ -887,7 +887,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Output: EAX: 0 if OK
*/
TRACE("[0001] EBX=%x ECX=%x EDX=%x ESI=%x EDI=%x\n",
TRACE("[0001] EBX=%lx ECX=%lx EDX=%lx ESI=%lx EDI=%lx\n",
context->Ebx, context->Ecx, context->Edx,
context->Esi, context->Edi);
......@@ -910,7 +910,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Output: EAX: Size of area changed
*/
TRACE("[0002] EBX=%x ECX=%x EDX=%x\n",
TRACE("[0002] EBX=%lx ECX=%lx EDX=%lx\n",
context->Ebx, context->Ecx, context->Edx);
/* FIXME */
......@@ -928,7 +928,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Bit 1: Read-Write if set, Read-Only if clear
*/
TRACE("[0003] EDX=%x\n", context->Edx);
TRACE("[0003] EDX=%lx\n", context->Edx);
/* FIXME */
......@@ -999,7 +999,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
LPBYTE addr = module->baseAddr + pe_seg->VirtualAddress;
TRACE("MapModule: "
"Section %d at %08x from %08x len %08x\n",
"Section %d at %08lx from %08lx len %08lx\n",
i, (DWORD)addr, off, len);
if ( _llseek(image, off, SEEK_SET) != off
......@@ -1019,7 +1019,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
IMAGE_BASE_RELOCATION *r = (IMAGE_BASE_RELOCATION *)
(dir->Size? module->baseAddr + dir->VirtualAddress : 0);
TRACE("MapModule: Reloc delta %08x\n", module->relocDelta);
TRACE("MapModule: Reloc delta %08lx\n", module->relocDelta);
while (r && r->VirtualAddress)
{
......@@ -1027,7 +1027,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
WORD *TypeOffset = (WORD *)(r + 1);
unsigned int count = (r->SizeOfBlock - sizeof(*r)) / sizeof(*TypeOffset);
TRACE("MapModule: %d relocations for page %08x\n",
TRACE("MapModule: %d relocations for page %08lx\n",
count, (DWORD)page);
for(i = 0; i < count; i++)
......@@ -1070,7 +1070,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Output: EAX: 1 if OK
*/
TRACE("UnMapModule: %x\n", W32S_APP2WINE(context->Edx));
TRACE("UnMapModule: %lx\n", W32S_APP2WINE(context->Edx));
/* As we didn't map anything, there's nothing to unmap ... */
......@@ -1101,12 +1101,12 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
DWORD prot = stack[4];
DWORD result;
TRACE("VirtualAlloc(%x, %x, %x, %x, %x)\n",
TRACE("VirtualAlloc(%lx, %lx, %lx, %lx, %lx)\n",
(DWORD)retv, (DWORD)base, size, type, prot);
if (type & 0x80000000)
{
WARN("VirtualAlloc: strange type %x\n", type);
WARN("VirtualAlloc: strange type %lx\n", type);
type &= 0x7fffffff;
}
......@@ -1149,7 +1149,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
DWORD type = stack[3];
DWORD result;
TRACE("VirtualFree(%x, %x, %x, %x)\n",
TRACE("VirtualFree(%lx, %lx, %lx, %lx)\n",
(DWORD)retv, (DWORD)base, size, type);
result = VirtualFree(base, size, type);
......@@ -1187,7 +1187,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
DWORD *old_prot = (DWORD *)W32S_APP2WINE(stack[4]);
DWORD result;
TRACE("VirtualProtect(%x, %x, %x, %x, %x)\n",
TRACE("VirtualProtect(%lx, %lx, %lx, %lx, %lx)\n",
(DWORD)retv, (DWORD)base, size, new_prot, (DWORD)old_prot);
result = VirtualProtect(base, size, new_prot, old_prot);
......@@ -1224,7 +1224,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
DWORD len = stack[3];
DWORD result;
TRACE("VirtualQuery(%x, %x, %x, %x)\n",
TRACE("VirtualQuery(%lx, %lx, %lx, %lx)\n",
(DWORD)retv, (DWORD)base, (DWORD)info, len);
result = VirtualQuery(base, info, len);
......@@ -1244,7 +1244,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Output: EAX: NtStatus
*/
TRACE("[000a] ECX=%x EDX=%x\n",
TRACE("[000a] ECX=%lx EDX=%lx\n",
context->Ecx, context->Edx);
/* FIXME */
......@@ -1260,7 +1260,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Output: EAX: NtStatus
*/
TRACE("[000b] ECX=%x\n", context->Ecx);
TRACE("[000b] ECX=%lx\n", context->Ecx);
/* FIXME */
......@@ -1275,7 +1275,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Output: EDX: Previous Debug Flags
*/
FIXME("[000c] EDX=%x\n", context->Edx);
FIXME("[000c] EDX=%lx\n", context->Edx);
/* FIXME */
......@@ -1312,7 +1312,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
HANDLE result = INVALID_HANDLE_VALUE;
char name[128];
TRACE("NtCreateSection(%x, %x, %x, %x, %x, %x, %x, %x)\n",
TRACE("NtCreateSection(%lx, %lx, %lx, %lx, %lx, %lx, %lx, %lx)\n",
(DWORD)retv, flags1, atom, (DWORD)size, protect, flags2,
(DWORD)hFile, psp);
......@@ -1329,7 +1329,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
if (result == INVALID_HANDLE_VALUE)
WARN("NtCreateSection: failed!\n");
else
TRACE("NtCreateSection: returned %x\n", (DWORD)result);
TRACE("NtCreateSection: returned %lx\n", (DWORD)result);
if (result != INVALID_HANDLE_VALUE)
*retv = result,
......@@ -1360,7 +1360,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
HANDLE result = INVALID_HANDLE_VALUE;
char name[128];
TRACE("NtOpenSection(%x, %x, %x)\n",
TRACE("NtOpenSection(%lx, %lx, %lx)\n",
(DWORD)retv, protect, atom);
if (atom && GlobalGetAtomNameA(atom, name, sizeof(name)))
......@@ -1373,7 +1373,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
if (result == INVALID_HANDLE_VALUE)
WARN("NtOpenSection: failed!\n");
else
TRACE("NtOpenSection: returned %x\n", (DWORD)result);
TRACE("NtOpenSection: returned %lx\n", (DWORD)result);
if (result != INVALID_HANDLE_VALUE)
*retv = result,
......@@ -1399,7 +1399,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
HANDLE handle = (HANDLE)stack[0];
DWORD *id = (DWORD *)W32S_APP2WINE(stack[1]);
TRACE("NtCloseSection(%x, %x)\n", (DWORD)handle, (DWORD)id);
TRACE("NtCloseSection(%lx, %lx)\n", (DWORD)handle, (DWORD)id);
CloseHandle(handle);
if (id) *id = 0; /* FIXME */
......@@ -1422,7 +1422,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
HANDLE handle = (HANDLE)stack[0];
HANDLE new_handle;
TRACE("NtDupSection(%x)\n", (DWORD)handle);
TRACE("NtDupSection(%lx)\n", (DWORD)handle);
DuplicateHandle( GetCurrentProcess(), handle,
GetCurrentProcess(), &new_handle,
......@@ -1478,12 +1478,12 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
}
TRACE("NtMapViewOfSection"
"(%x, %x, %x, %x, %x, %x, %x, %x, %x, %x)\n",
"(%lx, %lx, %lx, %lx, %lx, %lx, %lx, %lx, %lx, %lx)\n",
(DWORD)SectionHandle, ProcessHandle, (DWORD)BaseAddress,
ZeroBits, CommitSize, (DWORD)SectionOffset, (DWORD)ViewSize,
InheritDisposition, AllocationType, Protect);
TRACE("NtMapViewOfSection: "
"base=%x, offset=%x, size=%x, access=%x\n",
"base=%lx, offset=%lx, size=%lx, access=%lx\n",
(DWORD)address, SectionOffset? SectionOffset->u.LowPart : 0,
ViewSize? *ViewSize : 0, access);
......@@ -1492,7 +1492,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
SectionOffset? SectionOffset->u.LowPart : 0,
ViewSize? *ViewSize : 0, address);
TRACE("NtMapViewOfSection: result=%x\n", result);
TRACE("NtMapViewOfSection: result=%lx\n", result);
if (W32S_WINE2APP(result))
{
......@@ -1519,7 +1519,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
DWORD ProcessHandle = stack[0]; /* ignored */
LPBYTE BaseAddress = (LPBYTE)W32S_APP2WINE(stack[1]);
TRACE("NtUnmapViewOfSection(%x, %x)\n",
TRACE("NtUnmapViewOfSection(%lx, %lx)\n",
ProcessHandle, (DWORD)BaseAddress);
UnmapViewOfFile(BaseAddress);
......@@ -1550,10 +1550,10 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
LPBYTE address = (LPBYTE)(BaseAddress? W32S_APP2WINE(*BaseAddress) : 0);
DWORD size = ViewSize? *ViewSize : 0;
TRACE("NtFlushVirtualMemory(%x, %x, %x, %x)\n",
TRACE("NtFlushVirtualMemory(%lx, %lx, %lx, %lx)\n",
ProcessHandle, (DWORD)BaseAddress, (DWORD)ViewSize,
(DWORD)unknown);
TRACE("NtFlushVirtualMemory: base=%x, size=%x\n",
TRACE("NtFlushVirtualMemory: base=%lx, size=%lx\n",
(DWORD)address, size);
FlushViewOfFile(address, size);
......@@ -1574,7 +1574,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Output: None
*/
FIXME("[0014] ECX=%x EDX=%x\n",
FIXME("[0014] ECX=%lx EDX=%lx\n",
context->Ecx, context->Edx);
/* FIXME */
......@@ -1588,7 +1588,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Output: None
*/
TRACE("[0015] EDX=%x\n", context->Edx);
TRACE("[0015] EDX=%lx\n", context->Edx);
/* We don't care, as we always have a coprocessor anyway */
break;
......@@ -1628,7 +1628,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Output: None
*/
FIXME("[0017] EBX=%x CX=%x\n",
FIXME("[0017] EBX=%lx CX=%x\n",
context->Ebx, CX_reg(context));
/* FIXME */
......@@ -1654,7 +1654,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
DWORD size = stack[2];
DWORD result;
TRACE("VirtualLock(%x, %x, %x)\n",
TRACE("VirtualLock(%lx, %lx, %lx)\n",
(DWORD)retv, (DWORD)base, size);
result = VirtualLock(base, size);
......@@ -1688,7 +1688,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
DWORD size = stack[2];
DWORD result;
TRACE("VirtualUnlock(%x, %x, %x)\n",
TRACE("VirtualUnlock(%lx, %lx, %lx)\n",
(DWORD)retv, (DWORD)base, size);
result = VirtualUnlock(base, size);
......@@ -1748,7 +1748,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
struct Win32sMemoryInfo *info =
(struct Win32sMemoryInfo *)W32S_APP2WINE(context->Esi);
FIXME("KGlobalMemStat(%x)\n", (DWORD)info);
FIXME("KGlobalMemStat(%lx)\n", (DWORD)info);
/* FIXME */
}
......@@ -1762,7 +1762,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
* Output: None
*/
TRACE("[001c] ECX=%x\n", context->Ecx);
TRACE("[001c] ECX=%lx\n", context->Ecx);
/* FIXME */
break;
......@@ -1788,12 +1788,12 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
DWORD prot = stack[3];
DWORD result;
TRACE("VirtualAlloc16(%x, %x, %x, %x)\n",
TRACE("VirtualAlloc16(%lx, %lx, %lx, %lx)\n",
(DWORD)base, size, type, prot);
if (type & 0x80000000)
{
WARN("VirtualAlloc16: strange type %x\n", type);
WARN("VirtualAlloc16: strange type %lx\n", type);
type &= 0x7fffffff;
}
......@@ -1805,7 +1805,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
else
context->Edx = 0,
context->Eax = STATUS_NO_MEMORY; /* FIXME */
TRACE("VirtualAlloc16: returning base %x\n", context->Edx);
TRACE("VirtualAlloc16: returning base %lx\n", context->Edx);
}
break;
......@@ -1828,7 +1828,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
DWORD type = stack[2];
DWORD result;
TRACE("VirtualFree16(%x, %x, %x)\n",
TRACE("VirtualFree16(%lx, %lx, %lx)\n",
(DWORD)base, size, type);
result = VirtualFree(base, size, type);
......@@ -1856,7 +1856,7 @@ void WINAPI __wine_vxd_win32s( CONTEXT *context )
DWORD *ptr = (DWORD *)W32S_APP2WINE(context->Ecx);
BOOL set = context->Edx;
TRACE("FWorkingSetSize(%x, %x)\n", (DWORD)ptr, (DWORD)set);
TRACE("FWorkingSetSize(%lx, %lx)\n", (DWORD)ptr, (DWORD)set);
if (set)
/* We do it differently ... */;
......
......@@ -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