From 1b2604384b8e6cce2a8170ca5226b924f9e20b0d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 20 Oct 2010 15:48:31 +0200 Subject: [PATCH] krnl386.exe: Avoid using the CONTEXT86 type. --- dlls/krnl386.exe16/dosaspi.c | 6 +- dlls/krnl386.exe16/dosdev.c | 20 +++--- dlls/krnl386.exe16/dosexe.c | 8 +-- dlls/krnl386.exe16/dosexe.h | 96 +++++++++++++-------------- dlls/krnl386.exe16/dosvm.c | 20 +++--- dlls/krnl386.exe16/error.c | 2 +- dlls/krnl386.exe16/fpu.c | 26 ++++---- dlls/krnl386.exe16/global.c | 3 +- dlls/krnl386.exe16/instr.c | 26 ++++---- dlls/krnl386.exe16/int09.c | 4 +- dlls/krnl386.exe16/int10.c | 4 +- dlls/krnl386.exe16/int13.c | 6 +- dlls/krnl386.exe16/int15.c | 2 +- dlls/krnl386.exe16/int16.c | 4 +- dlls/krnl386.exe16/int21.c | 90 ++++++++++++------------- dlls/krnl386.exe16/int25.c | 2 +- dlls/krnl386.exe16/int26.c | 2 +- dlls/krnl386.exe16/int2f.c | 20 +++--- dlls/krnl386.exe16/int31.c | 36 +++++----- dlls/krnl386.exe16/int33.c | 8 +-- dlls/krnl386.exe16/int67.c | 16 ++--- dlls/krnl386.exe16/interrupts.c | 66 +++++++++--------- dlls/krnl386.exe16/kernel16_private.h | 4 +- dlls/krnl386.exe16/ne_module.c | 6 +- dlls/krnl386.exe16/ne_segment.c | 4 +- dlls/krnl386.exe16/relay.c | 12 ++-- dlls/krnl386.exe16/snoop.c | 8 +-- dlls/krnl386.exe16/task.c | 4 +- dlls/krnl386.exe16/thunk.c | 60 ++++++++--------- dlls/krnl386.exe16/timer.c | 6 +- dlls/krnl386.exe16/vxd.c | 32 ++++----- dlls/krnl386.exe16/wowthunk.c | 2 +- 32 files changed, 302 insertions(+), 303 deletions(-) diff --git a/dlls/krnl386.exe16/dosaspi.c b/dlls/krnl386.exe16/dosaspi.c index 84299f9b81e..2f2ae022234 100644 --- a/dlls/krnl386.exe16/dosaspi.c +++ b/dlls/krnl386.exe16/dosaspi.c @@ -62,7 +62,7 @@ DOSASPI_PostProc( SRB_ExecSCSICmd *lpPRB ) if( (lpSRB16->cmd.SRB_Flags & SRB_POSTING) && lpSRB16->cmd.SRB_PostProc ) { - CONTEXT86 ctx; + CONTEXT ctx; /* The stack should look like this on entry to proc * NOTE: the SDK draws the following diagram bass akwards, use this one * to avoid being confused. Remember, the act of pushing something on @@ -175,7 +175,7 @@ DWORD ASPI_SendASPIDOSCommand(DWORD ptrSRB) return retval; } -static void WINAPI ASPI_DOS_func(CONTEXT86 *context) +static void WINAPI ASPI_DOS_func(CONTEXT *context) { WORD *stack = CTX_SEG_OFF_TO_LIN(context, context->SegSs, context->Esp); DWORD ptrSRB = *(DWORD *)&stack[2]; @@ -194,7 +194,7 @@ static void WINAPI ASPI_DOS_func(CONTEXT86 *context) * * returns the address of a real mode callback to ASPI_DOS_func() */ -void DOSVM_ASPIHandler( CONTEXT86 *context ) +void DOSVM_ASPIHandler( CONTEXT *context ) { FARPROC16 *p = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); TRACE("DOS ASPI opening\n"); diff --git a/dlls/krnl386.exe16/dosdev.c b/dlls/krnl386.exe16/dosdev.c index a82fb7b8488..ff2a6769c0f 100644 --- a/dlls/krnl386.exe16/dosdev.c +++ b/dlls/krnl386.exe16/dosdev.c @@ -77,10 +77,10 @@ static void *strategy_data[NB_SYSTEM_STRATEGIES]; /* prototypes */ -static void WINAPI nul_strategy(CONTEXT86*ctx); -static void WINAPI nul_interrupt(CONTEXT86*ctx); -static void WINAPI con_strategy(CONTEXT86*ctx); -static void WINAPI con_interrupt(CONTEXT86*ctx); +static void WINAPI nul_strategy(CONTEXT*ctx); +static void WINAPI nul_interrupt(CONTEXT*ctx); +static void WINAPI con_strategy(CONTEXT*ctx); +static void WINAPI con_interrupt(CONTEXT*ctx); /* devices */ static const WINEDEV devs[] = @@ -119,7 +119,7 @@ static struct _DOS_LISTOFLISTS * DOSMEM_LOL(void) /* the device implementations */ -static void do_lret(CONTEXT86*ctx) +static void do_lret(CONTEXT*ctx) { WORD *stack = CTX_SEG_OFF_TO_LIN(ctx, ctx->SegSs, ctx->Esp); @@ -128,7 +128,7 @@ static void do_lret(CONTEXT86*ctx) ctx->Esp += 2*sizeof(WORD); } -static void do_strategy(CONTEXT86*ctx, int id, int extra) +static void do_strategy(CONTEXT*ctx, int id, int extra) { REQUEST_HEADER *hdr = CTX_SEG_OFF_TO_LIN(ctx, ctx->SegEs, ctx->Ebx); void **hdr_ptr = strategy_data[id]; @@ -149,12 +149,12 @@ static REQUEST_HEADER * get_hdr(int id, void**extra) return hdr_ptr ? *hdr_ptr : NULL; } -static void WINAPI nul_strategy(CONTEXT86*ctx) +static void WINAPI nul_strategy(CONTEXT*ctx) { do_strategy(ctx, SYSTEM_STRATEGY_NUL, 0); } -static void WINAPI nul_interrupt(CONTEXT86*ctx) +static void WINAPI nul_interrupt(CONTEXT*ctx) { REQUEST_HEADER *hdr = get_hdr(SYSTEM_STRATEGY_NUL, NULL); /* eat everything and recycle nothing */ @@ -172,12 +172,12 @@ static void WINAPI nul_interrupt(CONTEXT86*ctx) do_lret(ctx); } -static void WINAPI con_strategy(CONTEXT86*ctx) +static void WINAPI con_strategy(CONTEXT*ctx) { do_strategy(ctx, SYSTEM_STRATEGY_CON, sizeof(int)); } -static void WINAPI con_interrupt(CONTEXT86*ctx) +static void WINAPI con_interrupt(CONTEXT*ctx) { int *scan; REQUEST_HEADER *hdr = get_hdr(SYSTEM_STRATEGY_CON,(void **)&scan); diff --git a/dlls/krnl386.exe16/dosexe.c b/dlls/krnl386.exe16/dosexe.c index c16d0df6241..a3b84eab277 100644 --- a/dlls/krnl386.exe16/dosexe.c +++ b/dlls/krnl386.exe16/dosexe.c @@ -442,7 +442,7 @@ void __wine_load_dos_exe( LPCSTR filename, LPCSTR cmdline ) * * this may only be called from existing DOS processes */ -BOOL MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID paramblk ) +BOOL MZ_Exec( CONTEXT *context, LPCSTR filename, BYTE func, LPVOID paramblk ) { DWORD binType; STARTUPINFOA st; @@ -703,7 +703,7 @@ static void MZ_Launch( LPCSTR cmdtail, int length ) /*********************************************************************** * MZ_Exit */ -void MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval ) +void MZ_Exit( CONTEXT *context, BOOL cs_psp, WORD retval ) { if (DOSVM_psp) { WORD psp_seg = cs_psp ? context->SegCs : DOSVM_psp; @@ -762,7 +762,7 @@ void __wine_load_dos_exe( LPCSTR filename, LPCSTR cmdline ) /*********************************************************************** * MZ_Exec */ -BOOL MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID paramblk ) +BOOL MZ_Exec( CONTEXT *context, LPCSTR filename, BYTE func, LPVOID paramblk ) { /* can't happen */ SetLastError(ERROR_BAD_FORMAT); @@ -788,7 +788,7 @@ void MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg ) /*********************************************************************** * MZ_Exit */ -void MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval ) +void MZ_Exit( CONTEXT *context, BOOL cs_psp, WORD retval ) { DOSVM_Exit( retval ); } diff --git a/dlls/krnl386.exe16/dosexe.h b/dlls/krnl386.exe16/dosexe.h index f9190ccd708..0b813e15cff 100644 --- a/dlls/krnl386.exe16/dosexe.h +++ b/dlls/krnl386.exe16/dosexe.h @@ -64,9 +64,9 @@ typedef struct { DWORD offset; } SEGPTR48, FARPROC48; -typedef void (*DOSRELAY)(CONTEXT86*,void*); -typedef void (WINAPI *RMCBPROC)(CONTEXT86*); -typedef void (WINAPI *INTPROC)(CONTEXT86*); +typedef void (*DOSRELAY)(CONTEXT*,void*); +typedef void (WINAPI *RMCBPROC)(CONTEXT*); +typedef void (WINAPI *INTPROC)(CONTEXT*); #define DOS_PRIORITY_REALTIME 0 /* IRQ0 */ #define DOS_PRIORITY_KEYBOARD 1 /* IRQ1 */ @@ -83,7 +83,7 @@ extern struct DPMI_segments *DOSVM_dpmi_segments; #endif /* linux-i386 */ /* - * Declare some CONTEXT86.EFlags bits. + * Declare some CONTEXT.EFlags bits. * IF_MASK is only pushed into real mode stack. */ #define V86_FLAG 0x00020000 @@ -334,8 +334,8 @@ typedef struct } WINEDEV; /* dosexe.c */ -extern BOOL MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID paramblk ); -extern void MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval ); +extern BOOL MZ_Exec( CONTEXT *context, LPCSTR filename, BYTE func, LPVOID paramblk ); +extern void MZ_Exit( CONTEXT *context, BOOL cs_psp, WORD retval ); extern BOOL MZ_Current( void ); extern void MZ_AllocDPMITask( void ); extern void MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg ); @@ -343,10 +343,10 @@ extern BOOL DOSVM_IsWin16(void); extern void DOSVM_Exit( WORD retval ); /* dosvm.c */ -extern void DOSVM_SendQueuedEvents( CONTEXT86 * ); -extern void WINAPI DOSVM_AcknowledgeIRQ( CONTEXT86 * ); -extern INT DOSVM_Enter( CONTEXT86 *context ); -extern void DOSVM_Wait( CONTEXT86 * ); +extern void DOSVM_SendQueuedEvents( CONTEXT * ); +extern void WINAPI DOSVM_AcknowledgeIRQ( CONTEXT * ); +extern INT DOSVM_Enter( CONTEXT *context ); +extern void DOSVM_Wait( CONTEXT * ); extern DWORD DOSVM_Loop( HANDLE hThread ); extern void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data ); extern void DOSVM_PIC_ioport_out( WORD port, BYTE val ); @@ -367,87 +367,87 @@ extern void DMA_ioport_out( WORD port, BYTE val ); extern BYTE DMA_ioport_in( WORD port ); /* dosaspi.c */ -extern void DOSVM_ASPIHandler(CONTEXT86*); +extern void DOSVM_ASPIHandler(CONTEXT*); /* dosmem.c */ extern BIOSDATA *DOSVM_BiosData( void ); extern void DOSVM_start_bios_timer(void); /* fpu.c */ -extern void WINAPI DOSVM_Int34Handler(CONTEXT86*); -extern void WINAPI DOSVM_Int35Handler(CONTEXT86*); -extern void WINAPI DOSVM_Int36Handler(CONTEXT86*); -extern void WINAPI DOSVM_Int37Handler(CONTEXT86*); -extern void WINAPI DOSVM_Int38Handler(CONTEXT86*); -extern void WINAPI DOSVM_Int39Handler(CONTEXT86*); -extern void WINAPI DOSVM_Int3aHandler(CONTEXT86*); -extern void WINAPI DOSVM_Int3bHandler(CONTEXT86*); -extern void WINAPI DOSVM_Int3cHandler(CONTEXT86*); -extern void WINAPI DOSVM_Int3dHandler(CONTEXT86*); -extern void WINAPI DOSVM_Int3eHandler(CONTEXT86*); +extern void WINAPI DOSVM_Int34Handler(CONTEXT*); +extern void WINAPI DOSVM_Int35Handler(CONTEXT*); +extern void WINAPI DOSVM_Int36Handler(CONTEXT*); +extern void WINAPI DOSVM_Int37Handler(CONTEXT*); +extern void WINAPI DOSVM_Int38Handler(CONTEXT*); +extern void WINAPI DOSVM_Int39Handler(CONTEXT*); +extern void WINAPI DOSVM_Int3aHandler(CONTEXT*); +extern void WINAPI DOSVM_Int3bHandler(CONTEXT*); +extern void WINAPI DOSVM_Int3cHandler(CONTEXT*); +extern void WINAPI DOSVM_Int3dHandler(CONTEXT*); +extern void WINAPI DOSVM_Int3eHandler(CONTEXT*); /* int09.c */ -extern void WINAPI DOSVM_Int09Handler(CONTEXT86*); +extern void WINAPI DOSVM_Int09Handler(CONTEXT*); extern void DOSVM_Int09SendScan(BYTE scan,BYTE ascii); extern BYTE DOSVM_Int09ReadScan(BYTE*ascii); /* int10.c */ -extern void WINAPI DOSVM_Int10Handler(CONTEXT86*); +extern void WINAPI DOSVM_Int10Handler(CONTEXT*); extern void DOSVM_PutChar(BYTE ascii); /* int13.c */ -extern void WINAPI DOSVM_Int13Handler(CONTEXT86*); +extern void WINAPI DOSVM_Int13Handler(CONTEXT*); /* int15.c */ -extern void WINAPI DOSVM_Int15Handler(CONTEXT86*); +extern void WINAPI DOSVM_Int15Handler(CONTEXT*); /* int16.c */ -extern void WINAPI DOSVM_Int16Handler(CONTEXT86*); -extern BOOL DOSVM_Int16ReadChar( BYTE *, BYTE *, CONTEXT86 * ); +extern void WINAPI DOSVM_Int16Handler(CONTEXT*); +extern BOOL DOSVM_Int16ReadChar( BYTE *, BYTE *, CONTEXT * ); extern int DOSVM_Int16AddChar(BYTE ascii,BYTE scan); /* int21.c */ -extern void WINAPI DOSVM_Int21Handler(CONTEXT86*); +extern void WINAPI DOSVM_Int21Handler(CONTEXT*); /* int25.c */ BOOL DOSVM_RawRead( BYTE, DWORD, DWORD, BYTE *, BOOL ); -void WINAPI DOSVM_Int25Handler( CONTEXT86 * ); +void WINAPI DOSVM_Int25Handler( CONTEXT * ); /* int26.c */ BOOL DOSVM_RawWrite( BYTE, DWORD, DWORD, BYTE *, BOOL ); -void WINAPI DOSVM_Int26Handler( CONTEXT86 * ); +void WINAPI DOSVM_Int26Handler( CONTEXT * ); /* int2f.c */ -extern void WINAPI DOSVM_Int2fHandler(CONTEXT86*); +extern void WINAPI DOSVM_Int2fHandler(CONTEXT*); extern void MSCDEX_InstallCDROM(void); /* int31.c */ -extern void WINAPI DOSVM_Int31Handler(CONTEXT86*); -extern void WINAPI DOSVM_RawModeSwitchHandler(CONTEXT86*); +extern void WINAPI DOSVM_Int31Handler(CONTEXT*); +extern void WINAPI DOSVM_RawModeSwitchHandler(CONTEXT*); extern BOOL DOSVM_IsDos32(void); extern FARPROC16 DPMI_AllocInternalRMCB(RMCBPROC); -extern int DPMI_CallRMProc(CONTEXT86*,LPWORD,int,int); -extern BOOL DOSVM_CheckWrappers(CONTEXT86*); +extern int DPMI_CallRMProc(CONTEXT*,LPWORD,int,int); +extern BOOL DOSVM_CheckWrappers(CONTEXT*); /* int33.c */ -extern void WINAPI DOSVM_Int33Handler(CONTEXT86*); +extern void WINAPI DOSVM_Int33Handler(CONTEXT*); extern void DOSVM_Int33Message(UINT,WPARAM,LPARAM); extern void DOSVM_Int33Console(MOUSE_EVENT_RECORD*); /* int67.c */ -extern void WINAPI DOSVM_Int67Handler(CONTEXT86*); -extern void EMS_Ioctl_Handler(CONTEXT86*); +extern void WINAPI DOSVM_Int67Handler(CONTEXT*); +extern void EMS_Ioctl_Handler(CONTEXT*); /* interrupts.c */ -extern void __wine_call_int_handler( CONTEXT86 *, BYTE ); -extern void DOSVM_CallBuiltinHandler( CONTEXT86 *, BYTE ); -extern BOOL DOSVM_EmulateInterruptPM( CONTEXT86 *, BYTE ); -extern BOOL DOSVM_EmulateInterruptRM( CONTEXT86 *, BYTE ); +extern void __wine_call_int_handler( CONTEXT *, BYTE ); +extern void DOSVM_CallBuiltinHandler( CONTEXT *, BYTE ); +extern BOOL DOSVM_EmulateInterruptPM( CONTEXT *, BYTE ); +extern BOOL DOSVM_EmulateInterruptRM( CONTEXT *, BYTE ); extern FARPROC16 DOSVM_GetPMHandler16( BYTE ); extern FARPROC48 DOSVM_GetPMHandler48( BYTE ); extern FARPROC16 DOSVM_GetRMHandler( BYTE ); -extern void DOSVM_HardwareInterruptPM( CONTEXT86 *, BYTE ); -extern void DOSVM_HardwareInterruptRM( CONTEXT86 *, BYTE ); +extern void DOSVM_HardwareInterruptPM( CONTEXT *, BYTE ); +extern void DOSVM_HardwareInterruptRM( CONTEXT *, BYTE ); extern void DOSVM_SetPMHandler16( BYTE, FARPROC16 ); extern void DOSVM_SetPMHandler48( BYTE, FARPROC48 ); extern void DOSVM_SetRMHandler( BYTE, FARPROC16 ); @@ -457,14 +457,14 @@ extern DWORD DOSVM_inport( int port, int size ); extern void DOSVM_outport( int port, int size, DWORD value ); /* relay.c */ -void DOSVM_RelayHandler( CONTEXT86 * ); -void DOSVM_BuildCallFrame( CONTEXT86 *, DOSRELAY, LPVOID ); +void DOSVM_RelayHandler( CONTEXT * ); +void DOSVM_BuildCallFrame( CONTEXT *, DOSRELAY, LPVOID ); /* soundblaster.c */ extern void SB_ioport_out( WORD port, BYTE val ); extern BYTE SB_ioport_in( WORD port ); /* timer.c */ -extern void WINAPI DOSVM_Int08Handler(CONTEXT86*); +extern void WINAPI DOSVM_Int08Handler(CONTEXT*); #endif /* __WINE_DOSEXE_H */ diff --git a/dlls/krnl386.exe16/dosvm.c b/dlls/krnl386.exe16/dosvm.c index decd57ee3ea..87adf33a1ae 100644 --- a/dlls/krnl386.exe16/dosvm.c +++ b/dlls/krnl386.exe16/dosvm.c @@ -145,7 +145,7 @@ static BOOL DOSVM_HasPendingEvents( void ) * be called. This is because we may otherwise get a deadlock if * another thread is waiting for the same critical section. */ -static void DOSVM_SendOneEvent( CONTEXT86 *context ) +static void DOSVM_SendOneEvent( CONTEXT *context ) { LPDOSEVENT event = pending_event; @@ -222,7 +222,7 @@ static void DOSVM_SendOneEvent( CONTEXT86 *context ) * This routine assumes that caller has already cleared TEB.vm86_pending * and checked that interrupts are enabled. */ -void DOSVM_SendQueuedEvents( CONTEXT86 *context ) +void DOSVM_SendQueuedEvents( CONTEXT *context ) { DWORD old_cs = context->SegCs; DWORD old_ip = context->Eip; @@ -323,7 +323,7 @@ void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data) * which uses DPMI to thunk down to DOS services) */ if (irq<0) { /* callback event, perform it with dummy context */ - CONTEXT86 context; + CONTEXT context; memset(&context,0,sizeof(context)); (*relay)(&context,data); } else { @@ -410,11 +410,11 @@ static void DOSVM_ProcessMessage(MSG *msg) * interrupts and waits until some asynchronous event has been * processed. */ -void DOSVM_Wait( CONTEXT86 *waitctx ) +void DOSVM_Wait( CONTEXT *waitctx ) { if (DOSVM_HasPendingEvents()) { - CONTEXT86 context = *waitctx; + CONTEXT context = *waitctx; /* * If DOSVM_Wait is called from protected mode we emulate @@ -594,7 +594,7 @@ static LONG WINAPI exception_handler(EXCEPTION_POINTERS *eptr) return EXCEPTION_CONTINUE_SEARCH; } -INT DOSVM_Enter( CONTEXT86 *context ) +INT DOSVM_Enter( CONTEXT *context ) { INT ret = 0; if (!ISV86(context)) @@ -669,7 +669,7 @@ void DOSVM_PIC_ioport_out( WORD port, BYTE val) /*********************************************************************** * DOSVM_Enter */ -INT DOSVM_Enter( CONTEXT86 *context ) +INT DOSVM_Enter( CONTEXT *context ) { SetLastError( ERROR_NOT_SUPPORTED ); return -1; @@ -678,7 +678,7 @@ INT DOSVM_Enter( CONTEXT86 *context ) /*********************************************************************** * DOSVM_Wait */ -void DOSVM_Wait( CONTEXT86 *waitctx ) { } +void DOSVM_Wait( CONTEXT *waitctx ) { } /*********************************************************************** * DOSVM_PIC_ioport_out @@ -692,7 +692,7 @@ void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data) { if (irq<0) { /* callback event, perform it with dummy context */ - CONTEXT86 context; + CONTEXT context; memset(&context,0,sizeof(context)); (*relay)(&context,data); } else { @@ -708,7 +708,7 @@ void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data) * * This routine should be called by all internal IRQ handlers. */ -void WINAPI DOSVM_AcknowledgeIRQ( CONTEXT86 *context ) +void WINAPI DOSVM_AcknowledgeIRQ( CONTEXT *context ) { /* * Send EOI to PIC. diff --git a/dlls/krnl386.exe16/error.c b/dlls/krnl386.exe16/error.c index 48b38df7387..dc02d2132e6 100644 --- a/dlls/krnl386.exe16/error.c +++ b/dlls/krnl386.exe16/error.c @@ -283,7 +283,7 @@ void WINAPI LogParamError16(UINT16 uErr, FARPROC16 lpfn, LPVOID lpvParam) /*********************************************************************** * K327 (KERNEL.327) */ -void WINAPI HandleParamError( CONTEXT86 *context ) +void WINAPI HandleParamError( CONTEXT *context ) { UINT16 uErr = LOWORD(context->Ebx); FARPROC16 lpfn = (FARPROC16)MAKESEGPTR( context->SegCs, context->Eip ); diff --git a/dlls/krnl386.exe16/fpu.c b/dlls/krnl386.exe16/fpu.c index 733dfb705f5..c0b0faae244 100644 --- a/dlls/krnl386.exe16/fpu.c +++ b/dlls/krnl386.exe16/fpu.c @@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(int); * The actual work is done by a single routine. */ -static void FPU_ModifyCode(CONTEXT86 *context, BYTE Opcode); +static void FPU_ModifyCode(CONTEXT *context, BYTE Opcode); /********************************************************************** @@ -40,7 +40,7 @@ static void FPU_ModifyCode(CONTEXT86 *context, BYTE Opcode); * The interrupt list isn't specific about what this interrupt * actually does. [ interrup.m ] */ -void WINAPI DOSVM_Int34Handler(CONTEXT86 *context) +void WINAPI DOSVM_Int34Handler(CONTEXT *context) { TRACE("Int 0x34 called-- FP opcode 0xd8\n"); FPU_ModifyCode(context, 0xd8); @@ -55,7 +55,7 @@ void WINAPI DOSVM_Int34Handler(CONTEXT86 *context) * The interrupt list isn't specific about what this interrupt * actually does. [ interrup.m ] */ -void WINAPI DOSVM_Int35Handler(CONTEXT86 *context) +void WINAPI DOSVM_Int35Handler(CONTEXT *context) { TRACE("Int 0x35 called-- FP opcode 0xd9\n"); FPU_ModifyCode(context, 0xd9); @@ -70,7 +70,7 @@ void WINAPI DOSVM_Int35Handler(CONTEXT86 *context) * The interrupt list isn't specific about what this interrupt * actually does. [ interrup.m ] */ -void WINAPI DOSVM_Int36Handler(CONTEXT86 *context) +void WINAPI DOSVM_Int36Handler(CONTEXT *context) { TRACE("Int 0x36 called-- FP opcode 0xda\n"); FPU_ModifyCode(context, 0xda); @@ -85,7 +85,7 @@ void WINAPI DOSVM_Int36Handler(CONTEXT86 *context) * The interrupt list isn't specific about what this interrupt * actually does. [ interrup.m ] */ -void WINAPI DOSVM_Int37Handler(CONTEXT86 *context) +void WINAPI DOSVM_Int37Handler(CONTEXT *context) { TRACE("Int 0x37 called-- FP opcode 0xdb\n"); FPU_ModifyCode(context, 0xdb); @@ -103,7 +103,7 @@ void WINAPI DOSVM_Int37Handler(CONTEXT86 *context) * The interrupt list isn't specific about what this interrupt * actually does. [ interrup.m ] */ -void WINAPI DOSVM_Int38Handler(CONTEXT86 *context) +void WINAPI DOSVM_Int38Handler(CONTEXT *context) { TRACE("Int 0x38 called-- FP opcode 0xdc\n"); FPU_ModifyCode(context, 0xdc); @@ -118,7 +118,7 @@ void WINAPI DOSVM_Int38Handler(CONTEXT86 *context) * The interrupt list isn't specific about what this interrupt * actually does. [ interrup.m ] */ -void WINAPI DOSVM_Int39Handler(CONTEXT86 *context) +void WINAPI DOSVM_Int39Handler(CONTEXT *context) { TRACE("Int 0x39 called-- FP opcode 0xdd\n"); FPU_ModifyCode(context, 0xdd); @@ -133,7 +133,7 @@ void WINAPI DOSVM_Int39Handler(CONTEXT86 *context) * The interrupt list isn't specific about what this interrupt * actually does. [ interrup.m ] */ -void WINAPI DOSVM_Int3aHandler(CONTEXT86 *context) +void WINAPI DOSVM_Int3aHandler(CONTEXT *context) { TRACE("Int 0x3a called-- FP opcode 0xde\n"); FPU_ModifyCode(context, 0xde); @@ -148,7 +148,7 @@ void WINAPI DOSVM_Int3aHandler(CONTEXT86 *context) * The interrupt list isn't specific about what this interrupt * actually does. [ interrup.m ] */ -void WINAPI DOSVM_Int3bHandler(CONTEXT86 *context) +void WINAPI DOSVM_Int3bHandler(CONTEXT *context) { TRACE("Int 0x3b called-- FP opcode 0xdf\n"); FPU_ModifyCode(context, 0xdf); @@ -171,7 +171,7 @@ void WINAPI DOSVM_Int3bHandler(CONTEXT86 *context) * * 11011xxx should be the opcode instruction. */ -void WINAPI DOSVM_Int3cHandler(CONTEXT86 *context) +void WINAPI DOSVM_Int3cHandler(CONTEXT *context) { FIXME("Int 3C NOT Implemented\n"); INT_BARF(context, 0x3c); @@ -185,7 +185,7 @@ void WINAPI DOSVM_Int3cHandler(CONTEXT86 *context) * * Opcode 0x90 is a NOP. It just fills space where the 3D was. */ -void WINAPI DOSVM_Int3dHandler(CONTEXT86 *context) +void WINAPI DOSVM_Int3dHandler(CONTEXT *context) { TRACE("Int 0x3d called-- Standalone FWAIT\n"); FPU_ModifyCode(context, 0x90); @@ -203,7 +203,7 @@ void WINAPI DOSVM_Int3dHandler(CONTEXT86 *context) * Direct access 4.0 modifies and does not restore this vector. * */ -void WINAPI DOSVM_Int3eHandler(CONTEXT86 *context) +void WINAPI DOSVM_Int3eHandler(CONTEXT *context) { FIXME("Int 3E NOT Implemented\n"); INT_BARF(context, 0x3e); @@ -219,7 +219,7 @@ void WINAPI DOSVM_Int3eHandler(CONTEXT86 *context) * * Code thanks to Ove Kaaven */ -static void FPU_ModifyCode(CONTEXT86 *context, BYTE Opcode) +static void FPU_ModifyCode(CONTEXT *context, BYTE Opcode) { BYTE *code = CTX_SEG_OFF_TO_LIN(context, context->SegCs, context->Eip); diff --git a/dlls/krnl386.exe16/global.c b/dlls/krnl386.exe16/global.c index ba4d7df645d..7f3807e28a5 100644 --- a/dlls/krnl386.exe16/global.c +++ b/dlls/krnl386.exe16/global.c @@ -561,8 +561,7 @@ BOOL16 WINAPI GlobalUnlock16( * *all* registers, even AX/DX ! * */ -void WINAPI GlobalChangeLockCount16( HGLOBAL16 handle, INT16 delta, - CONTEXT86 *context ) +void WINAPI GlobalChangeLockCount16( HGLOBAL16 handle, INT16 delta, CONTEXT *context ) { if ( delta == 1 ) GlobalLock16( handle ); diff --git a/dlls/krnl386.exe16/instr.c b/dlls/krnl386.exe16/instr.c index a1eb68c4a57..61f92ab4f77 100644 --- a/dlls/krnl386.exe16/instr.c +++ b/dlls/krnl386.exe16/instr.c @@ -44,7 +44,7 @@ WINE_DECLARE_DEBUG_CHANNEL(io); #define ADD_LOWORD(dw,val) ((dw) = ((dw) & 0xffff0000) | LOWORD((DWORD)(dw)+(val))) #define ISV86(context) ((context)->EFlags & 0x00020000) -static inline void add_stack( CONTEXT86 *context, int offset ) +static inline void add_stack( CONTEXT *context, int offset ) { if (ISV86(context) || !IS_SELECTOR_32BIT(context->SegSs)) ADD_LOWORD( context->Esp, offset ); @@ -52,7 +52,7 @@ static inline void add_stack( CONTEXT86 *context, int offset ) context->Esp += offset; } -static inline void *make_ptr( CONTEXT86 *context, DWORD seg, DWORD off, int long_addr ) +static inline void *make_ptr( CONTEXT *context, DWORD seg, DWORD off, int long_addr ) { if (ISV86(context)) return (void *)((seg << 4) + LOWORD(off)); if (wine_ldt_is_system(seg)) return (void *)off; @@ -60,7 +60,7 @@ static inline void *make_ptr( CONTEXT86 *context, DWORD seg, DWORD off, int long return (char *) MapSL( MAKESEGPTR( seg, 0 ) ) + off; } -static inline void *get_stack( CONTEXT86 *context ) +static inline void *get_stack( CONTEXT *context ) { if (ISV86(context)) return (void *)((context->SegSs << 4) + LOWORD(context->Esp)); return wine_ldt_get_ptr( context->SegSs, context->Esp ); @@ -100,7 +100,7 @@ static inline struct idtr get_idtr(void) * * See Undocumented Windows, Chapter 5, __0040. */ -static BOOL INSTR_ReplaceSelector( CONTEXT86 *context, WORD *sel ) +static BOOL INSTR_ReplaceSelector( CONTEXT *context, WORD *sel ) { if (*sel == 0x40) { @@ -113,7 +113,7 @@ static BOOL INSTR_ReplaceSelector( CONTEXT86 *context, WORD *sel ) /* store an operand into a register */ -static void store_reg( CONTEXT86 *context, BYTE regmodrm, const BYTE *addr, int long_op ) +static void store_reg( CONTEXT *context, BYTE regmodrm, const BYTE *addr, int long_op ) { switch((regmodrm >> 3) & 7) { @@ -157,7 +157,7 @@ static void store_reg( CONTEXT86 *context, BYTE regmodrm, const BYTE *addr, int * * Return the address of an instruction operand (from the mod/rm byte). */ -static BYTE *INSTR_GetOperandAddr( CONTEXT86 *context, BYTE *instr, +static BYTE *INSTR_GetOperandAddr( CONTEXT *context, BYTE *instr, int long_addr, int segprefix, int *len ) { int mod, rm, base = 0, index = 0, ss = 0, seg = 0, off; @@ -317,7 +317,7 @@ static BYTE *INSTR_GetOperandAddr( CONTEXT86 *context, BYTE *instr, * * Emulate the LDS (and LES,LFS,etc.) instruction. */ -static BOOL INSTR_EmulateLDS( CONTEXT86 *context, BYTE *instr, int long_op, +static BOOL INSTR_EmulateLDS( CONTEXT *context, BYTE *instr, int long_op, int long_addr, int segprefix, int *len ) { WORD seg; @@ -361,7 +361,7 @@ static BOOL INSTR_EmulateLDS( CONTEXT86 *context, BYTE *instr, int long_op, * * input on an I/O port */ -static DWORD INSTR_inport( WORD port, int size, CONTEXT86 *context ) +static DWORD INSTR_inport( WORD port, int size, CONTEXT *context ) { DWORD res = DOSVM_inport( port, size ); @@ -392,7 +392,7 @@ static DWORD INSTR_inport( WORD port, int size, CONTEXT86 *context ) * * output on an I/O port */ -static void INSTR_outport( WORD port, int size, DWORD val, CONTEXT86 *context ) +static void INSTR_outport( WORD port, int size, DWORD val, CONTEXT *context ) { DOSVM_outport( port, size, val ); @@ -423,7 +423,7 @@ static void INSTR_outport( WORD port, int size, DWORD val, CONTEXT86 *context ) * Emulate a privileged instruction. * Returns exception continuation status. */ -DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT86 *context ) +DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ) { int prefix, segprefix, prefixlen, len, repX, long_op, long_addr; BYTE *instr; @@ -865,7 +865,7 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT86 *context ) LONG CALLBACK INSTR_vectored_handler( EXCEPTION_POINTERS *ptrs ) { EXCEPTION_RECORD *record = ptrs->ExceptionRecord; - CONTEXT86 *context = ptrs->ContextRecord; + CONTEXT *context = ptrs->ContextRecord; if (wine_ldt_is_system(context->SegCs) && (record->ExceptionCode == EXCEPTION_ACCESS_VIOLATION || @@ -881,7 +881,7 @@ LONG CALLBACK INSTR_vectored_handler( EXCEPTION_POINTERS *ptrs ) /*********************************************************************** * DOS3Call (KERNEL.102) */ -void WINAPI DOS3Call( CONTEXT86 *context ) +void WINAPI DOS3Call( CONTEXT *context ) { __wine_call_int_handler( context, 0x21 ); } @@ -890,7 +890,7 @@ void WINAPI DOS3Call( CONTEXT86 *context ) /*********************************************************************** * NetBIOSCall (KERNEL.103) */ -void WINAPI NetBIOSCall16( CONTEXT86 *context ) +void WINAPI NetBIOSCall16( CONTEXT *context ) { __wine_call_int_handler( context, 0x5c ); } diff --git a/dlls/krnl386.exe16/int09.c b/dlls/krnl386.exe16/int09.c index 91b7b5ea34b..6c19e4ade4c 100644 --- a/dlls/krnl386.exe16/int09.c +++ b/dlls/krnl386.exe16/int09.c @@ -147,7 +147,7 @@ static void DOSVM_Int09UpdateKbdStatusFlags(BYTE scan, BOOL extended, BIOSDATA * * See http://www.execpc.com/~geezer/osd/kbd/ for a very good description * of keyboard mapping modes. */ -void WINAPI DOSVM_Int09Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int09Handler( CONTEXT *context ) { BIOSDATA *data = DOSVM_BiosData(); BYTE ascii, scan = DOSVM_Int09ReadScan(&ascii); @@ -210,7 +210,7 @@ void WINAPI DOSVM_Int09Handler( CONTEXT86 *context ) DOSVM_AcknowledgeIRQ( context ); } -static void KbdRelay( CONTEXT86 *context, void *data ) +static void KbdRelay( CONTEXT *context, void *data ) { if (kbdinfo.queuelen) { /* cleanup operation, called from DOSVM_PIC_ioport_out: diff --git a/dlls/krnl386.exe16/int10.c b/dlls/krnl386.exe16/int10.c index 2e47a4c378b..0edfbd7668d 100644 --- a/dlls/krnl386.exe16/int10.c +++ b/dlls/krnl386.exe16/int10.c @@ -812,7 +812,7 @@ static void INT10_InitializeVideoMode( BIOSDATA *data ) * * Handler for VESA functions (int10 function 0x4f). */ -static void INT10_HandleVESA( CONTEXT86 *context ) +static void INT10_HandleVESA( CONTEXT *context ) { BIOSDATA *data = DOSVM_BiosData(); @@ -977,7 +977,7 @@ static void INT10_HandleVESA( CONTEXT86 *context ) * * Added additional vga graphic support - 3/99 */ -void WINAPI DOSVM_Int10Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int10Handler( CONTEXT *context ) { BIOSDATA *data = DOSVM_BiosData(); diff --git a/dlls/krnl386.exe16/int13.c b/dlls/krnl386.exe16/int13.c index b96d5e73095..002b663f774 100644 --- a/dlls/krnl386.exe16/int13.c +++ b/dlls/krnl386.exe16/int13.c @@ -58,7 +58,7 @@ static BYTE INT13_last_status; * Despite what Ralf Brown says, at least functions 0x06 and 0x07 * seem to set carry, too. */ -static void INT13_SetStatus( CONTEXT86 *context, BYTE status ) +static void INT13_SetStatus( CONTEXT *context, BYTE status ) { INT13_last_status = status; @@ -76,7 +76,7 @@ static void INT13_SetStatus( CONTEXT86 *context, BYTE status ) * * Read floppy disk parameters. */ -static void INT13_ReadFloppyParams( CONTEXT86 *context ) +static void INT13_ReadFloppyParams( CONTEXT *context ) { #ifdef linux static const BYTE floppy_params[2][13] = @@ -184,7 +184,7 @@ static void INT13_ReadFloppyParams( CONTEXT86 *context ) * * Handler for int 13h (disk I/O). */ -void WINAPI DOSVM_Int13Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int13Handler( CONTEXT *context ) { TRACE( "AH=%02x\n", AH_reg( context ) ); diff --git a/dlls/krnl386.exe16/int15.c b/dlls/krnl386.exe16/int15.c index bbbef3c4485..8150a04bfae 100644 --- a/dlls/krnl386.exe16/int15.c +++ b/dlls/krnl386.exe16/int15.c @@ -31,7 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(int); * * Handler for int 15h */ -void WINAPI DOSVM_Int15Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int15Handler( CONTEXT *context ) { switch(AH_reg(context)) { diff --git a/dlls/krnl386.exe16/int16.c b/dlls/krnl386.exe16/int16.c index 47c94104c93..47e9d8ee597 100644 --- a/dlls/krnl386.exe16/int16.c +++ b/dlls/krnl386.exe16/int16.c @@ -47,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(int); * not currently listed here. */ -void WINAPI DOSVM_Int16Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int16Handler( CONTEXT *context ) { BIOSDATA *data = NULL; BYTE ascii, scan; @@ -160,7 +160,7 @@ void WINAPI DOSVM_Int16Handler( CONTEXT86 *context ) * Return value will always be TRUE and returned keystroke will be * removed from buffer. */ -int DOSVM_Int16ReadChar(BYTE *ascii, BYTE *scan, CONTEXT86 *waitctx) +int DOSVM_Int16ReadChar(BYTE *ascii, BYTE *scan, CONTEXT *waitctx) { BIOSDATA *data = DOSVM_BiosData(); WORD CurOfs = data->NextKbdCharPtr; diff --git a/dlls/krnl386.exe16/int21.c b/dlls/krnl386.exe16/int21.c index f055963e130..2ec6345e02b 100644 --- a/dlls/krnl386.exe16/int21.c +++ b/dlls/krnl386.exe16/int21.c @@ -64,7 +64,7 @@ BOOL WINAPI VerifyConsoleIoHandle(HANDLE); /* * Forward declarations. */ -static BOOL INT21_RenameFile( CONTEXT86 *context ); +static BOOL INT21_RenameFile( CONTEXT *context ); WINE_DEFAULT_DEBUG_CHANNEL(int21); @@ -270,11 +270,11 @@ struct magic_device WCHAR name[10]; HANDLE handle; LARGE_INTEGER index; - void (*ioctl_handler)(CONTEXT86 *); + void (*ioctl_handler)(CONTEXT *); }; -static void INT21_IoctlScsiMgrHandler( CONTEXT86 * ); -static void INT21_IoctlHPScanHandler( CONTEXT86 * ); +static void INT21_IoctlScsiMgrHandler( CONTEXT * ); +static void INT21_IoctlHPScanHandler( CONTEXT * ); static struct magic_device magic_devices[] = { @@ -374,7 +374,7 @@ static void INT21_SetCurrentDrive( BYTE drive ) * Reads a character from the standard input. * Extended keycodes will be returned as two separate characters. */ -static BOOL INT21_ReadChar( BYTE *input, CONTEXT86 *waitctx ) +static BOOL INT21_ReadChar( BYTE *input, CONTEXT *waitctx ) { static BYTE pending_scan = 0; @@ -579,7 +579,7 @@ static INT21_HEAP *INT21_GetHeapPointer( void ) * Get segment/selector for DOS heap (INT21_HEAP). * Creates and initializes heap on first call. */ -static WORD INT21_GetHeapSelector( CONTEXT86 *context ) +static WORD INT21_GetHeapSelector( CONTEXT *context ) { INT21_HEAP *heap = INT21_GetHeapPointer(); @@ -679,7 +679,7 @@ static BOOL INT21_FillDrivePB( BYTE drive ) * - function 0x47 * - subfunction 0x47 of function 0x71 */ -static BOOL INT21_GetCurrentDirectory( CONTEXT86 *context, BOOL islong ) +static BOOL INT21_GetCurrentDirectory( CONTEXT *context, BOOL islong ) { char *buffer = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Esi); BYTE drive = INT21_MapDrive( DL_reg(context) ); @@ -802,7 +802,7 @@ static BOOL INT21_GetCurrentDirectory( CONTEXT86 *context, BOOL islong ) * - function 0x3b * - subfunction 0x3b of function 0x71 */ -static BOOL INT21_SetCurrentDirectory( CONTEXT86 *context ) +static BOOL INT21_SetCurrentDirectory( CONTEXT *context ) { WCHAR dirW[MAX_PATH]; WCHAR env_var[4]; @@ -935,7 +935,7 @@ static HANDLE INT21_OpenMagicDevice( LPCWSTR name, DWORD access ) * - function 0x6c * - subfunction 0x6c of function 0x71 */ -static BOOL INT21_CreateFile( CONTEXT86 *context, +static BOOL INT21_CreateFile( CONTEXT *context, DWORD pathSegOff, BOOL returnStatus, WORD dosAccessShare, @@ -1153,7 +1153,7 @@ static BOOL INT21_CreateFile( CONTEXT86 *context, * read from console including terminating CR or * zero if capacity was zero. */ -static WORD INT21_BufferedInput( CONTEXT86 *context, BYTE *ptr, WORD capacity ) +static WORD INT21_BufferedInput( CONTEXT *context, BYTE *ptr, WORD capacity ) { BYTE length = 0; @@ -1206,7 +1206,7 @@ static WORD INT21_BufferedInput( CONTEXT86 *context, BYTE *ptr, WORD capacity ) /*********************************************************************** * INT21_GetCurrentDTA */ -static BYTE *INT21_GetCurrentDTA( CONTEXT86 *context ) +static BYTE *INT21_GetCurrentDTA( CONTEXT *context ) { TDB *pTask = GlobalLock16(GetCurrentTask()); @@ -1233,7 +1233,7 @@ static BYTE *INT21_GetCurrentDTA( CONTEXT86 *context ) * the FCB must have the drive_number, file_name, and file_extension * fields filled and all other bytes cleared. */ -static void INT21_OpenFileUsingFCB( CONTEXT86 *context ) +static void INT21_OpenFileUsingFCB( CONTEXT *context ) { struct FCB *fcb; struct XFCB *xfcb; @@ -1332,7 +1332,7 @@ static void INT21_OpenFileUsingFCB( CONTEXT86 *context ) * NOTES * Closes a FCB file. */ -static void INT21_CloseFileUsingFCB( CONTEXT86 *context ) +static void INT21_CloseFileUsingFCB( CONTEXT *context ) { struct FCB *fcb; struct XFCB *xfcb; @@ -1377,7 +1377,7 @@ static void INT21_CloseFileUsingFCB( CONTEXT86 *context ) * are updated to point to the next record. If a partial record is * read, it is filled with zeros up to the FCB->logical_record_size. */ -static void INT21_SequentialReadFromFCB( CONTEXT86 *context ) +static void INT21_SequentialReadFromFCB( CONTEXT *context ) { struct FCB *fcb; struct XFCB *xfcb; @@ -1457,7 +1457,7 @@ static void INT21_SequentialReadFromFCB( CONTEXT86 *context ) * Then FCB->current_block_number and FCB->record_within_current_block * are updated to point to the next record. */ -static void INT21_SequentialWriteToFCB( CONTEXT86 *context ) +static void INT21_SequentialWriteToFCB( CONTEXT *context ) { struct FCB *fcb; struct XFCB *xfcb; @@ -1533,7 +1533,7 @@ static void INT21_SequentialWriteToFCB( CONTEXT86 *context ) * FCB->random_access_record_number is not updated. If a partial record * is read, it is filled with zeros up to the FCB->logical_record_size. */ -static void INT21_ReadRandomRecordFromFCB( CONTEXT86 *context ) +static void INT21_ReadRandomRecordFromFCB( CONTEXT *context ) { struct FCB *fcb; struct XFCB *xfcb; @@ -1606,7 +1606,7 @@ static void INT21_ReadRandomRecordFromFCB( CONTEXT86 *context ) * is specified with FCB->random_access_record_number. The * FCB->random_access_record_number is not updated. */ -static void INT21_WriteRandomRecordToFCB( CONTEXT86 *context ) +static void INT21_WriteRandomRecordToFCB( CONTEXT *context ) { struct FCB *fcb; struct XFCB *xfcb; @@ -1681,7 +1681,7 @@ static void INT21_WriteRandomRecordToFCB( CONTEXT86 *context ) * it is filled with zeros up to the FCB->logical_record_size. The * CX register is set to the number of successfully read records. */ -static void INT21_RandomBlockReadFromFCB( CONTEXT86 *context ) +static void INT21_RandomBlockReadFromFCB( CONTEXT *context ) { struct FCB *fcb; struct XFCB *xfcb; @@ -1772,7 +1772,7 @@ static void INT21_RandomBlockReadFromFCB( CONTEXT86 *context ) * next record after the records written. The CX register is set to * the number of successfully written records. */ -static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context ) +static void INT21_RandomBlockWriteToFCB( CONTEXT *context ) { struct FCB *fcb; struct XFCB *xfcb; @@ -1841,7 +1841,7 @@ static void INT21_RandomBlockWriteToFCB( CONTEXT86 *context ) * - subfunction 0x39 of function 0x71 * - subfunction 0xff of function 0x43 (CL == 0x39) */ -static BOOL INT21_CreateDirectory( CONTEXT86 *context ) +static BOOL INT21_CreateDirectory( CONTEXT *context ) { WCHAR dirW[MAX_PATH]; char *dirA = CTX_SEG_OFF_TO_LIN(context, @@ -1881,7 +1881,7 @@ static BOOL INT21_CreateDirectory( CONTEXT86 *context ) * * Handler for function 0x65. */ -static void INT21_ExtendedCountryInformation( CONTEXT86 *context ) +static void INT21_ExtendedCountryInformation( CONTEXT *context ) { BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegEs, context->Edi ); BYTE buffsize = CX_reg (context); @@ -2012,7 +2012,7 @@ static void INT21_ExtendedCountryInformation( CONTEXT86 *context ) * - function 0x43 * - subfunction 0x43 of function 0x71 */ -static BOOL INT21_FileAttributes( CONTEXT86 *context, +static BOOL INT21_FileAttributes( CONTEXT *context, BYTE subfunction, BOOL islong ) { @@ -2269,7 +2269,7 @@ static BOOL INT21_FileAttributes( CONTEXT86 *context, * * Handler for function 0x57. */ -static BOOL INT21_FileDateTime( CONTEXT86 *context ) +static BOOL INT21_FileDateTime( CONTEXT *context ) { HANDLE handle = DosFileHandleToWin32Handle(BX_reg(context)); FILETIME filetime; @@ -2369,7 +2369,7 @@ static BOOL INT21_FileDateTime( CONTEXT86 *context ) * * Handler for functions 0x51 and 0x62. */ -static void INT21_GetPSP( CONTEXT86 *context ) +static void INT21_GetPSP( CONTEXT *context ) { TRACE( "GET CURRENT PSP ADDRESS (%02x)\n", AH_reg(context) ); @@ -2447,7 +2447,7 @@ static inline DWORD INT21_Ioctl_CylHeadSect2Lin(DWORD cyl, WORD head, WORD sec, * * Handler for block device IOCTLs. */ -static void INT21_Ioctl_Block( CONTEXT86 *context ) +static void INT21_Ioctl_Block( CONTEXT *context ) { BYTE *dataptr; BYTE drive = INT21_MapDrive( BL_reg(context) ); @@ -2660,7 +2660,7 @@ static void INT21_Ioctl_Block( CONTEXT86 *context ) * * IOCTL handler for the SCSIMGR device. */ -static void INT21_IoctlScsiMgrHandler( CONTEXT86 *context ) +static void INT21_IoctlScsiMgrHandler( CONTEXT *context ) { switch (AL_reg(context)) { @@ -2694,7 +2694,7 @@ static void INT21_IoctlScsiMgrHandler( CONTEXT86 *context ) * * IOCTL handler for the HPSCAN device. */ -static void INT21_IoctlHPScanHandler( CONTEXT86 *context ) +static void INT21_IoctlHPScanHandler( CONTEXT *context ) { switch (AL_reg(context)) { @@ -2725,7 +2725,7 @@ static void INT21_IoctlHPScanHandler( CONTEXT86 *context ) * * Handler for character device IOCTLs. */ -static void INT21_Ioctl_Char( CONTEXT86 *context ) +static void INT21_Ioctl_Char( CONTEXT *context ) { int status; int IsConsoleIOHandle = 0; @@ -2833,7 +2833,7 @@ static void INT21_Ioctl_Char( CONTEXT86 *context ) * * Handler for function 0x44. */ -static void INT21_Ioctl( CONTEXT86 *context ) +static void INT21_Ioctl( CONTEXT *context ) { switch (AL_reg(context)) { @@ -2924,7 +2924,7 @@ static void INT21_Ioctl( CONTEXT86 *context ) * * Handler for function 0x73. */ -static BOOL INT21_Fat32( CONTEXT86 *context ) +static BOOL INT21_Fat32( CONTEXT *context ) { switch (AL_reg(context)) { @@ -3043,7 +3043,7 @@ static void INT21_ConvertFindDataWtoA(WIN32_FIND_DATAA *dataA, * * Handler for function 0x71. */ -static void INT21_LongFilename( CONTEXT86 *context ) +static void INT21_LongFilename( CONTEXT *context ) { BOOL bSetDOSExtendedError = FALSE; WCHAR pathW[MAX_PATH]; @@ -3343,7 +3343,7 @@ static void INT21_LongFilename( CONTEXT86 *context ) * - subfunction 0x56 of function 0x71 * - subfunction 0xff of function 0x43 (CL == 0x56) */ -static BOOL INT21_RenameFile( CONTEXT86 *context ) +static BOOL INT21_RenameFile( CONTEXT *context ) { WCHAR fromW[MAX_PATH]; WCHAR toW[MAX_PATH]; @@ -3366,7 +3366,7 @@ static BOOL INT21_RenameFile( CONTEXT86 *context ) * Handler for: * - function 0x5e */ -static BOOL INT21_NetworkFunc (CONTEXT86 *context) +static BOOL INT21_NetworkFunc (CONTEXT *context) { switch (AL_reg(context)) { @@ -3403,7 +3403,7 @@ static BOOL INT21_NetworkFunc (CONTEXT86 *context) * INT21_GetDiskSerialNumber * */ -static int INT21_GetDiskSerialNumber( CONTEXT86 *context ) +static int INT21_GetDiskSerialNumber( CONTEXT *context ) { BYTE *dataptr = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); WCHAR path[] = {'A',':','\\',0}, label[11]; @@ -3428,7 +3428,7 @@ static int INT21_GetDiskSerialNumber( CONTEXT86 *context ) * INT21_SetDiskSerialNumber * */ -static int INT21_SetDiskSerialNumber( CONTEXT86 *context ) +static int INT21_SetDiskSerialNumber( CONTEXT *context ) { #if 0 BYTE *dataptr = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); @@ -3454,7 +3454,7 @@ static int INT21_SetDiskSerialNumber( CONTEXT86 *context ) * INT21_GetFreeDiskSpace * */ -static int INT21_GetFreeDiskSpace( CONTEXT86 *context ) +static int INT21_GetFreeDiskSpace( CONTEXT *context ) { DWORD cluster_sectors, sector_bytes, free_clusters, total_clusters; WCHAR root[] = {'A',':','\\',0}; @@ -3528,7 +3528,7 @@ static int INT21_GetFreeDiskSpace( CONTEXT86 *context ) * INT21_GetDriveAllocInfo * */ -static int INT21_GetDriveAllocInfo( CONTEXT86 *context, BYTE drive ) +static int INT21_GetDriveAllocInfo( CONTEXT *context, BYTE drive ) { INT21_DPB *dpb; @@ -3547,7 +3547,7 @@ static int INT21_GetDriveAllocInfo( CONTEXT86 *context, BYTE drive ) /*********************************************************************** * INT21_GetExtendedError */ -static void INT21_GetExtendedError( CONTEXT86 *context ) +static void INT21_GetExtendedError( CONTEXT *context ) { BYTE class, action, locus; WORD error = GetLastError(); @@ -3656,7 +3656,7 @@ static void INT21_GetExtendedError( CONTEXT86 *context ) SET_CH( context, locus ); } -static BOOL INT21_CreateTempFile( CONTEXT86 *context ) +static BOOL INT21_CreateTempFile( CONTEXT *context ) { static int counter = 0; char *name = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx ); @@ -3791,7 +3791,7 @@ static const WCHAR *INT21_FindPath; /* will point to current dta->fullPath searc /****************************************************************** * INT21_FindFirst */ -static int INT21_FindFirst( CONTEXT86 *context ) +static int INT21_FindFirst( CONTEXT *context ) { WCHAR *p, *q; const char *path; @@ -3921,7 +3921,7 @@ static unsigned INT21_FindHelper(LPCWSTR fullPath, unsigned drive, unsigned coun /****************************************************************** * INT21_FindNext */ -static int INT21_FindNext( CONTEXT86 *context ) +static int INT21_FindNext( CONTEXT *context ) { FINDFILE_DTA *dta = (FINDFILE_DTA *)INT21_GetCurrentDTA(context); DWORD attr = dta->search_attr | FA_UNUSED | FA_ARCHIVE | FA_RDONLY; @@ -3967,7 +3967,7 @@ static int INT21_FindNext( CONTEXT86 *context ) * INT21_FindFirstFCB * */ -static int INT21_FindFirstFCB( CONTEXT86 *context ) +static int INT21_FindFirstFCB( CONTEXT *context ) { BYTE *fcb = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); FINDFILE_FCB *pFCB; @@ -3991,7 +3991,7 @@ static int INT21_FindFirstFCB( CONTEXT86 *context ) * INT21_FindNextFCB * */ -static int INT21_FindNextFCB( CONTEXT86 *context ) +static int INT21_FindNextFCB( CONTEXT *context ) { BYTE *fcb = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); FINDFILE_FCB *pFCB; @@ -4054,7 +4054,7 @@ static int INT21_FindNextFCB( CONTEXT86 *context ) * INT21_ParseFileNameIntoFCB * */ -static void INT21_ParseFileNameIntoFCB( CONTEXT86 *context ) +static void INT21_ParseFileNameIntoFCB( CONTEXT *context ) { char *filename = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Esi ); @@ -4133,7 +4133,7 @@ static BOOL INT21_Dup2(HFILE16 hFile1, HFILE16 hFile2) * * Interrupt 0x21 handler. */ -void WINAPI DOSVM_Int21Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int21Handler( CONTEXT *context ) { BOOL bSetDOSExtendedError = FALSE; diff --git a/dlls/krnl386.exe16/int25.c b/dlls/krnl386.exe16/int25.c index c4588a3b32b..5aa0b55cd10 100644 --- a/dlls/krnl386.exe16/int25.c +++ b/dlls/krnl386.exe16/int25.c @@ -80,7 +80,7 @@ BOOL DOSVM_RawRead(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL f * * Handler for int 25h (absolute disk read). */ -void WINAPI DOSVM_Int25Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int25Handler( CONTEXT *context ) { WCHAR drivespec[4] = {'A', ':', '\\', 0}; BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx ); diff --git a/dlls/krnl386.exe16/int26.c b/dlls/krnl386.exe16/int26.c index 6fb780faf59..e475c8da9df 100644 --- a/dlls/krnl386.exe16/int26.c +++ b/dlls/krnl386.exe16/int26.c @@ -69,7 +69,7 @@ BOOL DOSVM_RawWrite(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL * * Handler for int 26h (absolute disk write). */ -void WINAPI DOSVM_Int26Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int26Handler( CONTEXT *context ) { WCHAR drivespec[4] = {'A', ':', '\\', 0}; BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx ); diff --git a/dlls/krnl386.exe16/int2f.c b/dlls/krnl386.exe16/int2f.c index 43d10d9f7f2..3535ec32704 100644 --- a/dlls/krnl386.exe16/int2f.c +++ b/dlls/krnl386.exe16/int2f.c @@ -60,15 +60,15 @@ typedef struct WORD cdrom_selector; /* Protected mode selector for CDROM_HEAP */ } CDROM_HEAP; -static void do_int2f_16( CONTEXT86 *context ); -static void MSCDEX_Handler( CONTEXT86 *context ); +static void do_int2f_16( CONTEXT *context ); +static void MSCDEX_Handler( CONTEXT *context ); /********************************************************************** * DOSVM_Int2fHandler * * Handler for int 2fh (multiplex). */ -void WINAPI DOSVM_Int2fHandler( CONTEXT86 *context ) +void WINAPI DOSVM_Int2fHandler( CONTEXT *context ) { TRACE("Subfunction 0x%X\n", AX_reg(context)); @@ -320,7 +320,7 @@ void WINAPI DOSVM_Int2fHandler( CONTEXT86 *context ) /********************************************************************** * do_int2f_16 */ -static void do_int2f_16( CONTEXT86 *context ) +static void do_int2f_16( CONTEXT *context ) { DWORD addr; @@ -949,7 +949,7 @@ static void MSCDEX_Request(BYTE *driver_request, BOOL dorealmode) MSCDEX_Dump("End", driver_request, dorealmode); } -static void MSCDEX_Handler(CONTEXT86* context) +static void MSCDEX_Handler(CONTEXT* context) { int drive, count; char* p; @@ -1044,8 +1044,8 @@ static void MSCDEX_Handler(CONTEXT86* context) } /* prototypes */ -static void WINAPI cdrom_strategy(CONTEXT86*ctx); -static void WINAPI cdrom_interrupt(CONTEXT86*ctx); +static void WINAPI cdrom_strategy(CONTEXT*ctx); +static void WINAPI cdrom_interrupt(CONTEXT*ctx); /* device info */ static const WINEDEV cdromdev = @@ -1058,7 +1058,7 @@ static const WINEDEV cdromdev = static REQUEST_HEADER *cdrom_driver_request; /* Return to caller */ -static void do_lret(CONTEXT86*ctx) +static void do_lret(CONTEXT*ctx) { WORD *stack = CTX_SEG_OFF_TO_LIN(ctx, ctx->SegSs, ctx->Esp); @@ -1067,13 +1067,13 @@ static void do_lret(CONTEXT86*ctx) ctx->Esp += 2*sizeof(WORD); } -static void WINAPI cdrom_strategy(CONTEXT86*ctx) +static void WINAPI cdrom_strategy(CONTEXT*ctx) { cdrom_driver_request = CTX_SEG_OFF_TO_LIN(ctx, ctx->SegEs, ctx->Ebx); do_lret( ctx ); } -static void WINAPI cdrom_interrupt(CONTEXT86*ctx) +static void WINAPI cdrom_interrupt(CONTEXT*ctx) { if (cdrom_driver_request->unit > CDROM_GetHeap()->hdr.units) cdrom_driver_request->status = STAT_ERROR | 1; /* unknown unit */ diff --git a/dlls/krnl386.exe16/int31.c b/dlls/krnl386.exe16/int31.c index edcf0b3c8ee..982887682bb 100644 --- a/dlls/krnl386.exe16/int31.c +++ b/dlls/krnl386.exe16/int31.c @@ -151,7 +151,7 @@ static LONG WINAPI dpmi_exception_handler(EXCEPTION_POINTERS *eptr) /********************************************************************** * INT_GetRealModeContext */ -static void INT_GetRealModeContext( REALMODECALL *call, CONTEXT86 *context ) +static void INT_GetRealModeContext( REALMODECALL *call, CONTEXT *context ) { context->Eax = call->eax; context->Ebx = call->ebx; @@ -175,7 +175,7 @@ static void INT_GetRealModeContext( REALMODECALL *call, CONTEXT86 *context ) /********************************************************************** * INT_SetRealModeContext */ -static void INT_SetRealModeContext( REALMODECALL *call, CONTEXT86 *context ) +static void INT_SetRealModeContext( REALMODECALL *call, CONTEXT *context ) { call->eax = context->Eax; call->ebx = context->Ebx; @@ -376,7 +376,7 @@ __ASM_GLOBAL_FUNC(DPMI_CallRMCB32, * * This routine does the hard work of calling a callback procedure. */ -static void DPMI_CallRMCBProc( CONTEXT86 *context, RMCB *rmcb, WORD flag ) +static void DPMI_CallRMCBProc( CONTEXT *context, RMCB *rmcb, WORD flag ) { DWORD old_vif = get_vm86_teb_info()->dpmi_vif; @@ -408,7 +408,7 @@ static void DPMI_CallRMCBProc( CONTEXT86 *context, RMCB *rmcb, WORD flag ) DPMI_CallRMCB32(rmcb, ss, esp, &es, &edi); } else { /* 16-bit DPMI client */ - CONTEXT86 ctx = *context; + CONTEXT ctx = *context; ctx.SegCs = rmcb->proc_sel; ctx.Eip = rmcb->proc_ofs; ctx.SegDs = ss; @@ -434,7 +434,7 @@ static void DPMI_CallRMCBProc( CONTEXT86 *context, RMCB *rmcb, WORD flag ) * * This routine does the hard work of calling a real mode procedure. */ -int DPMI_CallRMProc( CONTEXT86 *context, LPWORD stack, int args, int iret ) +int DPMI_CallRMProc( CONTEXT *context, LPWORD stack, int args, int iret ) { LPWORD stack16; LPVOID addr = NULL; /* avoid gcc warning */ @@ -540,9 +540,9 @@ callrmproc_again: /********************************************************************** * CallRMInt */ -static void DOSVM_CallRMInt( CONTEXT86 *context ) +static void DOSVM_CallRMInt( CONTEXT *context ) { - CONTEXT86 realmode_ctx; + CONTEXT realmode_ctx; FARPROC16 rm_int = DOSVM_GetRMHandler( BL_reg(context) ); REALMODECALL *call = CTX_SEG_OFF_TO_LIN( context, context->SegEs, @@ -569,12 +569,12 @@ static void DOSVM_CallRMInt( CONTEXT86 *context ) /********************************************************************** * CallRMProc */ -static void DOSVM_CallRMProc( CONTEXT86 *context, int iret ) +static void DOSVM_CallRMProc( CONTEXT *context, int iret ) { REALMODECALL *p = CTX_SEG_OFF_TO_LIN( context, context->SegEs, context->Edi ); - CONTEXT86 context16; + CONTEXT context16; TRACE("RealModeCall: EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n", p->eax, p->ebx, p->ecx, p->edx); @@ -595,10 +595,10 @@ static void DOSVM_CallRMProc( CONTEXT86 *context, int iret ) /* (see dosmem.c, function DOSMEM_InitDPMI) */ -static void StartPM( CONTEXT86 *context ) +static void StartPM( CONTEXT *context ) { UINT16 cs, ss, ds, es; - CONTEXT86 pm_ctx; + CONTEXT pm_ctx; DWORD psp_ofs = (DWORD)(DOSVM_psp<<4); PDB16 *psp = (PDB16 *)psp_ofs; HANDLE16 env_seg = psp->environment; @@ -731,9 +731,9 @@ static int DPMI_FreeRMCB( DWORD address ) * * DPMI Raw Mode Switch handler */ -void WINAPI DOSVM_RawModeSwitchHandler( CONTEXT86 *context ) +void WINAPI DOSVM_RawModeSwitchHandler( CONTEXT *context ) { - CONTEXT86 rm_ctx; + CONTEXT rm_ctx; int ret; /* initialize real-mode context as per spec */ @@ -792,7 +792,7 @@ void WINAPI DOSVM_RawModeSwitchHandler( CONTEXT86 *context ) /********************************************************************** * AllocRMCB */ -static void DOSVM_AllocRMCB( CONTEXT86 *context ) +static void DOSVM_AllocRMCB( CONTEXT *context ) { RMCB *NewRMCB = DPMI_AllocRMCB(); @@ -818,7 +818,7 @@ static void DOSVM_AllocRMCB( CONTEXT86 *context ) /********************************************************************** * FreeRMCB */ -static void DOSVM_FreeRMCB( CONTEXT86 *context ) +static void DOSVM_FreeRMCB( CONTEXT *context ) { FIXME("callback address: %04x:%04x\n", CX_reg(context), DX_reg(context)); @@ -839,7 +839,7 @@ static BYTE * XMS_Offset( MOVEOFS *ofs ) /********************************************************************** * XMS_Handler */ -static void XMS_Handler( CONTEXT86 *context ) +static void XMS_Handler( CONTEXT *context ) { switch(AH_reg(context)) { @@ -920,7 +920,7 @@ static void XMS_Handler( CONTEXT86 *context ) * * Check if this was really a wrapper call instead of an interrupt. */ -BOOL DOSVM_CheckWrappers( CONTEXT86 *context ) +BOOL DOSVM_CheckWrappers( CONTEXT *context ) { if (context->SegCs==DOSVM_dpmi_segments->dpmi_seg) { /* This is the protected mode switch */ @@ -956,7 +956,7 @@ BOOL DOSVM_CheckWrappers( CONTEXT86 *context ) * * Handler for int 31h (DPMI). */ -void WINAPI DOSVM_Int31Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int31Handler( CONTEXT *context ) { RESET_CFLAG(context); switch(AX_reg(context)) diff --git a/dlls/krnl386.exe16/int33.c b/dlls/krnl386.exe16/int33.c index f111f5fbe03..b3411a70b01 100644 --- a/dlls/krnl386.exe16/int33.c +++ b/dlls/krnl386.exe16/int33.c @@ -50,7 +50,7 @@ static struct * - subfunction 0x00 (reset mouse) * - subfunction 0x21 (software reset) */ -static void INT33_ResetMouse( CONTEXT86 *context ) +static void INT33_ResetMouse( CONTEXT *context ) { memset( &mouse_info, 0, sizeof(mouse_info) ); @@ -75,7 +75,7 @@ static void INT33_ResetMouse( CONTEXT86 *context ) * * Handler for int 33h (MS MOUSE). */ -void WINAPI DOSVM_Int33Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int33Handler( CONTEXT *context ) { switch (AX_reg(context)) { @@ -199,10 +199,10 @@ typedef struct { WORD mask,but,x,y,mx,my; } MCALLDATA; -static void MouseRelay(CONTEXT86 *context,void *mdata) +static void MouseRelay(CONTEXT *context,void *mdata) { MCALLDATA *data = mdata; - CONTEXT86 ctx = *context; + CONTEXT ctx = *context; if (!ISV86(&ctx)) { diff --git a/dlls/krnl386.exe16/int67.c b/dlls/krnl386.exe16/int67.c index 6b461a54d54..3137bc929e3 100644 --- a/dlls/krnl386.exe16/int67.c +++ b/dlls/krnl386.exe16/int67.c @@ -109,7 +109,7 @@ static void EMS_init(void) * * Get handle and allocate memory. */ -static void EMS_alloc( CONTEXT86 *context ) +static void EMS_alloc( CONTEXT *context ) { int hindex = 1; /* handle zero is reserved for system */ @@ -140,7 +140,7 @@ static void EMS_alloc( CONTEXT86 *context ) * * Get/set handle name. */ -static void EMS_access_name( CONTEXT86 *context ) +static void EMS_access_name( CONTEXT *context ) { char *ptr; int hindex = DX_reg(context); @@ -220,7 +220,7 @@ static BYTE EMS_map( WORD physical_page, WORD new_hindex, WORD new_logical_page * * Map multiple logical pages into physical pages. */ -static void EMS_map_multiple( CONTEXT86 *context ) +static void EMS_map_multiple( CONTEXT *context ) { WORD *ptr = PTR_REAL_TO_LIN(context->SegDs, SI_reg(context)); BYTE status = 0; @@ -248,7 +248,7 @@ static void EMS_map_multiple( CONTEXT86 *context ) * * Free memory and release handle. */ -static void EMS_free( CONTEXT86 *context ) +static void EMS_free( CONTEXT *context ) { int hindex = DX_reg(context); int i; @@ -282,7 +282,7 @@ static void EMS_free( CONTEXT86 *context ) * * Save physical page mappings into handle specific save area. */ -static void EMS_save_context( CONTEXT86 *context ) +static void EMS_save_context( CONTEXT *context ) { WORD h = DX_reg(context); int i; @@ -301,7 +301,7 @@ static void EMS_save_context( CONTEXT86 *context ) * * Restore physical page mappings from handle specific save area. */ -static void EMS_restore_context( CONTEXT86 *context ) +static void EMS_restore_context( CONTEXT *context ) { WORD handle = DX_reg(context); int i; @@ -324,7 +324,7 @@ static void EMS_restore_context( CONTEXT86 *context ) * * Handler for interrupt 67h EMS routines. */ -void WINAPI DOSVM_Int67Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int67Handler( CONTEXT *context ) { switch AH_reg(context) { @@ -461,7 +461,7 @@ void WINAPI DOSVM_Int67Handler( CONTEXT86 *context ) * * Handler for interrupt 21h IOCTL routine for device "EMMXXXX0". */ -void EMS_Ioctl_Handler( CONTEXT86 *context ) +void EMS_Ioctl_Handler( CONTEXT *context ) { assert(AH_reg(context) == 0x44); diff --git a/dlls/krnl386.exe16/interrupts.c b/dlls/krnl386.exe16/interrupts.c index bb5b769bd8f..e0466808e28 100644 --- a/dlls/krnl386.exe16/interrupts.c +++ b/dlls/krnl386.exe16/interrupts.c @@ -34,18 +34,18 @@ WINE_DECLARE_DEBUG_CHANNEL(relay); #define BCD_TO_BIN(x) ((x&15) + (x>>4)*10) #define BIN_TO_BCD(x) ((x%10) + ((x/10)<<4)) -static void WINAPI DOSVM_Int11Handler(CONTEXT86*); -static void WINAPI DOSVM_Int12Handler(CONTEXT86*); -static void WINAPI DOSVM_Int17Handler(CONTEXT86*); -static void WINAPI DOSVM_Int19Handler(CONTEXT86*); -static void WINAPI DOSVM_Int1aHandler(CONTEXT86*); -static void WINAPI DOSVM_Int20Handler(CONTEXT86*); -static void WINAPI DOSVM_Int29Handler(CONTEXT86*); -static void WINAPI DOSVM_Int2aHandler(CONTEXT86*); -static void WINAPI DOSVM_Int41Handler(CONTEXT86*); -static void WINAPI DOSVM_Int4bHandler(CONTEXT86*); -static void WINAPI DOSVM_Int5cHandler(CONTEXT86*); -static void WINAPI DOSVM_DefaultHandler(CONTEXT86*); +static void WINAPI DOSVM_Int11Handler(CONTEXT*); +static void WINAPI DOSVM_Int12Handler(CONTEXT*); +static void WINAPI DOSVM_Int17Handler(CONTEXT*); +static void WINAPI DOSVM_Int19Handler(CONTEXT*); +static void WINAPI DOSVM_Int1aHandler(CONTEXT*); +static void WINAPI DOSVM_Int20Handler(CONTEXT*); +static void WINAPI DOSVM_Int29Handler(CONTEXT*); +static void WINAPI DOSVM_Int2aHandler(CONTEXT*); +static void WINAPI DOSVM_Int41Handler(CONTEXT*); +static void WINAPI DOSVM_Int4bHandler(CONTEXT*); +static void WINAPI DOSVM_Int5cHandler(CONTEXT*); +static void WINAPI DOSVM_DefaultHandler(CONTEXT*); static FARPROC16 DOSVM_Vectors16[256]; static FARPROC48 DOSVM_Vectors48[256]; @@ -133,7 +133,7 @@ static BOOL DOSVM_IsIRQ( BYTE intnum ) * Default interrupt handler. This will be used to emulate all * interrupts that don't have their own interrupt handler. */ -static void WINAPI DOSVM_DefaultHandler( CONTEXT86 *context ) +static void WINAPI DOSVM_DefaultHandler( CONTEXT *context ) { } @@ -165,7 +165,7 @@ static INTPROC DOSVM_GetBuiltinHandler( BYTE intnum ) * * Simple DOSRELAY that interprets its argument as INTPROC and calls it. */ -static void DOSVM_IntProcRelay( CONTEXT86 *context, LPVOID data ) +static void DOSVM_IntProcRelay( CONTEXT *context, LPVOID data ) { INTPROC proc = (INTPROC)data; proc(context); @@ -176,7 +176,7 @@ static void DOSVM_IntProcRelay( CONTEXT86 *context, LPVOID data ) * DOSVM_PrepareIRQ * */ -static void DOSVM_PrepareIRQ( CONTEXT86 *context, BOOL isbuiltin ) +static void DOSVM_PrepareIRQ( CONTEXT *context, BOOL isbuiltin ) { /* Disable virtual interrupts. */ get_vm86_teb_info()->dpmi_vif = 0; @@ -207,7 +207,7 @@ static void DOSVM_PrepareIRQ( CONTEXT86 *context, BOOL isbuiltin ) * so that it actually contains two copies of eflags, one of which is * popped during return from interrupt handler. */ -static void DOSVM_PushFlags( CONTEXT86 *context, BOOL islong, BOOL isstub ) +static void DOSVM_PushFlags( CONTEXT *context, BOOL islong, BOOL isstub ) { if (islong) { @@ -259,7 +259,7 @@ static void DOSVM_PushFlags( CONTEXT86 *context, BOOL islong, BOOL isstub ) * Pushes interrupt frame to stack and changes instruction * pointer to interrupt handler. */ -BOOL DOSVM_EmulateInterruptPM( CONTEXT86 *context, BYTE intnum ) +BOOL DOSVM_EmulateInterruptPM( CONTEXT *context, BYTE intnum ) { TRACE_(relay)("Call DOS int 0x%02x ret=%04x:%08x\n" " eax=%08x ebx=%08x ecx=%08x edx=%08x\n" @@ -351,7 +351,7 @@ BOOL DOSVM_EmulateInterruptPM( CONTEXT86 *context, BYTE intnum ) * Pushes interrupt frame to stack and changes instruction * pointer to interrupt handler. */ -void DOSVM_HardwareInterruptPM( CONTEXT86 *context, BYTE intnum ) +void DOSVM_HardwareInterruptPM( CONTEXT *context, BYTE intnum ) { if(DOSVM_IsDos32()) { @@ -448,7 +448,7 @@ void DOSVM_HardwareInterruptPM( CONTEXT86 *context, BYTE intnum ) * Returns FALSE if this interrupt was caused by return * from real mode wrapper. */ -BOOL DOSVM_EmulateInterruptRM( CONTEXT86 *context, BYTE intnum ) +BOOL DOSVM_EmulateInterruptRM( CONTEXT *context, BYTE intnum ) { TRACE_(relay)("Call DOS int 0x%02x ret=%04x:%08x\n" " eax=%08x ebx=%08x ecx=%08x edx=%08x\n" @@ -508,7 +508,7 @@ BOOL DOSVM_EmulateInterruptRM( CONTEXT86 *context, BYTE intnum ) * Either calls directly builtin handler or pushes interrupt frame to * stack and changes instruction pointer to interrupt handler. */ -void DOSVM_HardwareInterruptRM( CONTEXT86 *context, BYTE intnum ) +void DOSVM_HardwareInterruptRM( CONTEXT *context, BYTE intnum ) { FARPROC16 handler = DOSVM_GetRMHandler( intnum ); @@ -703,7 +703,7 @@ void DOSVM_SetPMHandler48( BYTE intnum, FARPROC48 handler ) * * Execute Wine interrupt handler procedure. */ -void DOSVM_CallBuiltinHandler( CONTEXT86 *context, BYTE intnum ) +void DOSVM_CallBuiltinHandler( CONTEXT *context, BYTE intnum ) { /* * FIXME: Make all builtin interrupt calls go via this routine. @@ -719,7 +719,7 @@ void DOSVM_CallBuiltinHandler( CONTEXT86 *context, BYTE intnum ) /********************************************************************** * __wine_call_int_handler (KERNEL.@) */ -void __wine_call_int_handler( CONTEXT86 *context, BYTE intnum ) +void __wine_call_int_handler( CONTEXT *context, BYTE intnum ) { DOSMEM_InitDosMemory(); DOSVM_CallBuiltinHandler( context, intnum ); @@ -762,7 +762,7 @@ void __wine_call_int_handler( CONTEXT86 *context, BYTE intnum ) * All *nix systems either have a math processor or * emulate one. */ -static void WINAPI DOSVM_Int11Handler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int11Handler( CONTEXT *context ) { int diskdrives = 0; int parallelports = 0; @@ -812,7 +812,7 @@ static void WINAPI DOSVM_Int11Handler( CONTEXT86 *context ) * * Handler for int 12h (get memory size). */ -static void WINAPI DOSVM_Int12Handler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int12Handler( CONTEXT *context ) { SET_AX( context, 640 ); } @@ -823,7 +823,7 @@ static void WINAPI DOSVM_Int12Handler( CONTEXT86 *context ) * * Handler for int 17h (printer - output character). */ -static void WINAPI DOSVM_Int17Handler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int17Handler( CONTEXT *context ) { switch( AH_reg(context) ) { @@ -850,7 +850,7 @@ static void WINAPI DOSVM_Int17Handler( CONTEXT86 *context ) * * Handler for int 19h (Reboot). */ -static void WINAPI DOSVM_Int19Handler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int19Handler( CONTEXT *context ) { TRACE( "Attempted Reboot\n" ); ExitProcess(0); @@ -862,7 +862,7 @@ static void WINAPI DOSVM_Int19Handler( CONTEXT86 *context ) * * Handler for int 1ah. */ -static void WINAPI DOSVM_Int1aHandler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int1aHandler( CONTEXT *context ) { switch(AH_reg(context)) { @@ -961,7 +961,7 @@ static void WINAPI DOSVM_Int1aHandler( CONTEXT86 *context ) * * Handler for int 20h. */ -static void WINAPI DOSVM_Int20Handler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int20Handler( CONTEXT *context ) { if (DOSVM_IsWin16()) DOSVM_Exit( 0 ); @@ -977,7 +977,7 @@ static void WINAPI DOSVM_Int20Handler( CONTEXT86 *context ) * * Handler for int 29h (fast console output) */ -static void WINAPI DOSVM_Int29Handler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int29Handler( CONTEXT *context ) { /* Yes, it seems that this is really all this interrupt does. */ DOSVM_PutChar(AL_reg(context)); @@ -989,7 +989,7 @@ static void WINAPI DOSVM_Int29Handler( CONTEXT86 *context ) * * Handler for int 2ah (network). */ -static void WINAPI DOSVM_Int2aHandler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int2aHandler( CONTEXT *context ) { switch(AH_reg(context)) { @@ -1005,7 +1005,7 @@ static void WINAPI DOSVM_Int2aHandler( CONTEXT86 *context ) /*********************************************************************** * DOSVM_Int41Handler */ -static void WINAPI DOSVM_Int41Handler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int41Handler( CONTEXT *context ) { if ( ISV86(context) ) { @@ -1049,7 +1049,7 @@ static void WINAPI DOSVM_Int41Handler( CONTEXT86 *context ) * DOSVM_Int4bHandler * */ -static void WINAPI DOSVM_Int4bHandler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int4bHandler( CONTEXT *context ) { switch(AH_reg(context)) { @@ -1071,7 +1071,7 @@ static void WINAPI DOSVM_Int4bHandler( CONTEXT86 *context ) * * Called from NetBIOSCall16. */ -static void WINAPI DOSVM_Int5cHandler( CONTEXT86 *context ) +static void WINAPI DOSVM_Int5cHandler( CONTEXT *context ) { BYTE* ptr; ptr = MapSL( MAKESEGPTR(context->SegEs,BX_reg(context)) ); diff --git a/dlls/krnl386.exe16/kernel16_private.h b/dlls/krnl386.exe16/kernel16_private.h index 8ab4c8936b0..db33af6ffad 100644 --- a/dlls/krnl386.exe16/kernel16_private.h +++ b/dlls/krnl386.exe16/kernel16_private.h @@ -208,7 +208,7 @@ extern BOOL16 GLOBAL_MoveBlock( HGLOBAL16 handle, void *ptr, DWORD size ); extern HGLOBAL16 GLOBAL_Alloc( WORD flags, DWORD size, HGLOBAL16 hOwner, unsigned char selflags ); /* instr.c */ -extern DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT86 *context ); +extern DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ); extern LONG CALLBACK INSTR_vectored_handler( EXCEPTION_POINTERS *ptrs ); /* ne_module.c */ @@ -237,7 +237,7 @@ extern void SELECTOR_FreeBlock( WORD sel ); (wine_ldt_is_system(sel) || (wine_ldt_copy.flags[LOWORD(sel) >> 3] & WINE_LDT_FLAGS_32BIT)) /* relay16.c */ -extern int relay_call_from_16( void *entry_point, unsigned char *args16, CONTEXT86 *context ); +extern int relay_call_from_16( void *entry_point, unsigned char *args16, CONTEXT *context ); /* snoop16.c */ extern void SNOOP16_RegisterDLL(HMODULE16,LPCSTR); diff --git a/dlls/krnl386.exe16/ne_module.c b/dlls/krnl386.exe16/ne_module.c index 9f777cc3833..b6334fed218 100644 --- a/dlls/krnl386.exe16/ne_module.c +++ b/dlls/krnl386.exe16/ne_module.c @@ -1219,7 +1219,7 @@ DWORD NE_StartTask(void) if ( hInstance >= 32 ) { - CONTEXT86 context; + CONTEXT context; /* Enter instance handles into task struct */ @@ -2049,7 +2049,7 @@ HMODULE WINAPI MapHModuleSL(HMODULE16 hmod) /*************************************************************************** * MapHInstLS (KERNEL.472) */ -void WINAPI MapHInstLS16( CONTEXT86 *context ) +void WINAPI MapHInstLS16( CONTEXT *context ) { context->Eax = MapHModuleLS( (HMODULE)context->Eax ); } @@ -2057,7 +2057,7 @@ void WINAPI MapHInstLS16( CONTEXT86 *context ) /*************************************************************************** * MapHInstSL (KERNEL.473) */ -void WINAPI MapHInstSL16( CONTEXT86 *context ) +void WINAPI MapHInstSL16( CONTEXT *context ) { context->Eax = (DWORD)MapHModuleSL( context->Eax ); } diff --git a/dlls/krnl386.exe16/ne_segment.c b/dlls/krnl386.exe16/ne_segment.c index 48910e4013c..d231fb9bebd 100644 --- a/dlls/krnl386.exe16/ne_segment.c +++ b/dlls/krnl386.exe16/ne_segment.c @@ -660,7 +660,7 @@ static BOOL NE_InitDLL( NE_MODULE *pModule ) { SEGTABLEENTRY *pSegTable; WORD hInst, ds, heap; - CONTEXT86 context; + CONTEXT context; pSegTable = NE_SEG_TABLE( pModule ); @@ -787,7 +787,7 @@ static void NE_CallDllEntryPoint( NE_MODULE *pModule, DWORD dwReason ) } else { - CONTEXT86 context; + CONTEXT context; WORD args[8]; memset( &context, 0, sizeof(context) ); diff --git a/dlls/krnl386.exe16/relay.c b/dlls/krnl386.exe16/relay.c index 29a36f1df82..dcafe17ac53 100644 --- a/dlls/krnl386.exe16/relay.c +++ b/dlls/krnl386.exe16/relay.c @@ -338,7 +338,7 @@ __ASM_GLOBAL_FUNC( call_entry_point, * * Same as relay_call_from_16 but doesn't print any debug information. */ -static int relay_call_from_16_no_debug( void *entry_point, unsigned char *args16, CONTEXT86 *context, +static int relay_call_from_16_no_debug( void *entry_point, unsigned char *args16, CONTEXT *context, const CALLFROM16 *call ) { unsigned int i, j, nb_args = 0; @@ -432,7 +432,7 @@ static int relay_call_from_16_no_debug( void *entry_point, unsigned char *args16 * * Replacement for the 16-bit relay functions when relay debugging is on. */ -int relay_call_from_16( void *entry_point, unsigned char *args16, CONTEXT86 *context ) +int relay_call_from_16( void *entry_point, unsigned char *args16, CONTEXT *context ) { STACK16FRAME *frame; WORD ordinal; @@ -620,7 +620,7 @@ static RELAY_Stack16 *RELAY_GetPointer( DWORD offset ) * Note: This might be called from signal handler, so the stack * allocation algorithm must be signal safe. */ -static void RELAY_MakeShortContext( CONTEXT86 *context ) +static void RELAY_MakeShortContext( CONTEXT *context ) { DWORD offset = offsetof(RELAY_Stack16, stack_top); RELAY_Stack16 *stack = RELAY_GetPointer( 0 ); @@ -655,7 +655,7 @@ static void RELAY_MakeShortContext( CONTEXT86 *context ) * This stub is called by __wine_call_from_16_regs in order to marshall * relay parameters. */ -static void __stdcall RELAY_RelayStub( DOSRELAY proc, unsigned char *args, CONTEXT86 *context ) +static void __stdcall RELAY_RelayStub( DOSRELAY proc, unsigned char *args, CONTEXT *context ) { if (proc) { @@ -691,7 +691,7 @@ static void __stdcall RELAY_RelayStub( DOSRELAY proc, unsigned char *args, CONTE * * Restore saved code and stack pointers and release stack block. */ -void DOSVM_RelayHandler( CONTEXT86 *context ) +void DOSVM_RelayHandler( CONTEXT *context ) { RELAY_Stack16 *stack = RELAY_GetPointer( context->Esp ); @@ -715,7 +715,7 @@ void DOSVM_RelayHandler( CONTEXT86 *context ) * Modifies the context so that return to context calls DOSRELAY and * only after return from DOSRELAY the original context will be returned to. */ -void DOSVM_BuildCallFrame( CONTEXT86 *context, DOSRELAY relay, LPVOID data ) +void DOSVM_BuildCallFrame( CONTEXT *context, DOSRELAY relay, LPVOID data ) { WORD code_sel = DOSVM_dpmi_segments->relay_code_sel; diff --git a/dlls/krnl386.exe16/snoop.c b/dlls/krnl386.exe16/snoop.c index 42fa8d18a69..4b8477c59b1 100644 --- a/dlls/krnl386.exe16/snoop.c +++ b/dlls/krnl386.exe16/snoop.c @@ -38,8 +38,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(snoop); #include "pshpack1.h" -static void WINAPI SNOOP16_Entry(FARPROC proc, LPBYTE args, CONTEXT86 *context); -static void WINAPI SNOOP16_Return(FARPROC proc, LPBYTE args, CONTEXT86 *context); +static void WINAPI SNOOP16_Entry(FARPROC proc, LPBYTE args, CONTEXT *context); +static void WINAPI SNOOP16_Return(FARPROC proc, LPBYTE args, CONTEXT *context); typedef struct tagSNOOP16_FUN { /* code part */ @@ -237,7 +237,7 @@ SNOOP16_GetProcAddress16(HMODULE16 hmod,DWORD ordinal,FARPROC16 origfun) { } #define CALLER1REF (*(DWORD*)(MapSL( MAKESEGPTR(context->SegSs,LOWORD(context->Esp)+4)))) -static void WINAPI SNOOP16_Entry(FARPROC proc, LPBYTE args, CONTEXT86 *context) { +static void WINAPI SNOOP16_Entry(FARPROC proc, LPBYTE args, CONTEXT *context) { DWORD ordinal=0; DWORD entry=(DWORD)MapSL( MAKESEGPTR(context->SegCs,LOWORD(context->Eip)) )-5; WORD xcs = context->SegCs; @@ -304,7 +304,7 @@ static void WINAPI SNOOP16_Entry(FARPROC proc, LPBYTE args, CONTEXT86 *context) DPRINTF(") ret=%04x:%04x\n",HIWORD(ret->origreturn),LOWORD(ret->origreturn)); } -static void WINAPI SNOOP16_Return(FARPROC proc, LPBYTE args, CONTEXT86 *context) { +static void WINAPI SNOOP16_Return(FARPROC proc, LPBYTE args, CONTEXT *context) { SNOOP16_RETURNENTRY *ret = (SNOOP16_RETURNENTRY*)((char *) MapSL( MAKESEGPTR(context->SegCs,LOWORD(context->Eip)) )-5); /* We haven't found out the nrofargs yet. If we called a cdecl diff --git a/dlls/krnl386.exe16/task.c b/dlls/krnl386.exe16/task.c index 1b252e94dc9..b067c8177bd 100644 --- a/dlls/krnl386.exe16/task.c +++ b/dlls/krnl386.exe16/task.c @@ -615,7 +615,7 @@ void WINAPI ExitKernel16(void) * * Called by the application startup code. */ -void WINAPI InitTask16( CONTEXT86 *context ) +void WINAPI InitTask16( CONTEXT *context ) { TDB *pTask; INSTANCEDATA *pinstance; @@ -1136,7 +1136,7 @@ void WINAPI SwitchStackTo16( WORD seg, WORD ptr, WORD top ) /*********************************************************************** * SwitchStackBack (KERNEL.109) */ -void WINAPI SwitchStackBack16( CONTEXT86 *context ) +void WINAPI SwitchStackBack16( CONTEXT *context ) { STACK16FRAME *oldFrame, *newFrame; INSTANCEDATA *pData; diff --git a/dlls/krnl386.exe16/thunk.c b/dlls/krnl386.exe16/thunk.c index 8b42619ddca..bc00658b3ae 100644 --- a/dlls/krnl386.exe16/thunk.c +++ b/dlls/krnl386.exe16/thunk.c @@ -154,14 +154,14 @@ extern void QT_Thunk(void); extern void QT_ThunkPrime(void); /* Push a DWORD on the 32-bit stack */ -static inline void stack32_push( CONTEXT86 *context, DWORD val ) +static inline void stack32_push( CONTEXT *context, DWORD val ) { context->Esp -= sizeof(DWORD); *(DWORD *)context->Esp = val; } /* Pop a DWORD from the 32-bit stack */ -static inline DWORD stack32_pop( CONTEXT86 *context ) +static inline DWORD stack32_pop( CONTEXT *context ) { DWORD ret = *(DWORD *)context->Esp; context->Esp += sizeof(DWORD); @@ -187,7 +187,7 @@ void WINAPI LogApiThk( LPSTR func ) * * NOTE: needs to preserve all registers! */ -void WINAPI __regs_LogApiThkLSF( LPSTR func, CONTEXT86 *context ) +void WINAPI __regs_LogApiThkLSF( LPSTR func, CONTEXT *context ) { TRACE( "%s\n", debugstr_a(func) ); } @@ -198,7 +198,7 @@ DEFINE_REGS_ENTRYPOINT( LogApiThkLSF, 1 ) * * NOTE: needs to preserve all registers! */ -void WINAPI __regs_LogApiThkSL( LPSTR func, CONTEXT86 *context ) +void WINAPI __regs_LogApiThkSL( LPSTR func, CONTEXT *context ) { TRACE( "%s\n", debugstr_a(func) ); } @@ -209,7 +209,7 @@ DEFINE_REGS_ENTRYPOINT( LogApiThkSL, 1 ) * * NOTE: needs to preserve all registers! */ -void WINAPI __regs_LogCBThkSL( LPSTR func, CONTEXT86 *context ) +void WINAPI __regs_LogCBThkSL( LPSTR func, CONTEXT *context ) { TRACE( "%s\n", debugstr_a(func) ); } @@ -451,9 +451,9 @@ UINT WINAPI ThunkConnect32( * FIXME: DDJ talks of certain register usage rules; I'm not sure * whether we cover this 100%. */ -void WINAPI __regs_QT_Thunk( CONTEXT86 *context ) +void WINAPI __regs_QT_Thunk( CONTEXT *context ) { - CONTEXT86 context16; + CONTEXT context16; DWORD argsize; context16 = *context; @@ -534,7 +534,7 @@ DEFINE_REGS_ENTRYPOINT( QT_Thunk, 0 ) * ESP is EBP-64 after return. * */ -void WINAPI __regs_FT_Prolog( CONTEXT86 *context ) +void WINAPI __regs_FT_Prolog( CONTEXT *context ) { /* Build stack frame */ stack32_push(context, context->Ebp); @@ -576,12 +576,12 @@ DEFINE_REGS_ENTRYPOINT( FT_Prolog, 0 ) * of arguments, so that the single DWORD bitmap is no longer * sufficient ... */ -void WINAPI __regs_FT_Thunk( CONTEXT86 *context ) +void WINAPI __regs_FT_Thunk( CONTEXT *context ) { DWORD mapESPrelative = *(DWORD *)(context->Ebp - 20); DWORD callTarget = *(DWORD *)(context->Ebp - 52); - CONTEXT86 context16; + CONTEXT context16; DWORD i, argsize; DWORD newstack[32]; LPBYTE oldstack; @@ -740,9 +740,9 @@ DWORD WINAPI ThunkInitLS( * in the BL register by the called 16-bit routine. * */ -void WINAPI __regs_Common32ThkLS( CONTEXT86 *context ) +void WINAPI __regs_Common32ThkLS( CONTEXT *context ) { - CONTEXT86 context16; + CONTEXT context16; DWORD argsize; context16 = *context; @@ -799,9 +799,9 @@ DEFINE_REGS_ENTRYPOINT( Common32ThkLS, 0 ) * (Note that this function seems only to be used for * OLECLI32 -> OLECLI and OLESVR32 -> OLESVR thunking.) */ -void WINAPI __regs_OT_32ThkLSF( CONTEXT86 *context ) +void WINAPI __regs_OT_32ThkLSF( CONTEXT *context ) { - CONTEXT86 context16; + CONTEXT context16; DWORD argsize; context16 = *context; @@ -907,7 +907,7 @@ LPVOID WINAPI ThunkInitLSF( * Note: The two DWORD arguments get popped off the stack. * */ -void WINAPI __regs_FT_PrologPrime( CONTEXT86 *context ) +void WINAPI __regs_FT_PrologPrime( CONTEXT *context ) { DWORD targetTableOffset; LPBYTE relayCode; @@ -937,7 +937,7 @@ DEFINE_REGS_ENTRYPOINT( FT_PrologPrime, 0 ) * EAX start of relay code * */ -void WINAPI __regs_QT_ThunkPrime( CONTEXT86 *context ) +void WINAPI __regs_QT_ThunkPrime( CONTEXT *context ) { DWORD targetTableOffset; LPBYTE relayCode; @@ -1013,7 +1013,7 @@ BOOL WINAPI SSOnBigStack(void) * * This must be a register routine as it has to preserve *all* registers. */ -void WINAPI SSConfirmSmallStack( CONTEXT86 *context ) +void WINAPI SSConfirmSmallStack( CONTEXT *context ) { /* We are always on the small stack while in 16-bit code ... */ } @@ -1053,7 +1053,7 @@ DWORD WINAPIV SSCall( /********************************************************************** * W32S_BackTo32 (KERNEL32.51) */ -void WINAPI __regs_W32S_BackTo32( CONTEXT86 *context ) +void WINAPI __regs_W32S_BackTo32( CONTEXT *context ) { LPDWORD stack = (LPDWORD)context->Esp; FARPROC proc = (FARPROC)context->Eip; @@ -1152,7 +1152,7 @@ FreeSLCallback( * The SEGPTR is used by the caller! */ void WINAPI __regs_AllocMappedBuffer( - CONTEXT86 *context /* [in] EDI register: size of buffer to allocate */ + CONTEXT *context /* [in] EDI register: size of buffer to allocate */ ) { HGLOBAL handle = GlobalAlloc(0, context->Edi + 8); DWORD *buffer = GlobalLock(handle); @@ -1187,7 +1187,7 @@ DEFINE_REGS_ENTRYPOINT( AllocMappedBuffer, 0 ) * Nothing. */ void WINAPI __regs_FreeMappedBuffer( - CONTEXT86 *context /* [in] EDI register: pointer to buffer */ + CONTEXT *context /* [in] EDI register: pointer to buffer */ ) { if (context->Edi) { @@ -1248,7 +1248,7 @@ BOOL16 WINAPI IsPeFormat16( /*********************************************************************** * K32Thk1632Prolog (KERNEL32.@) */ -void WINAPI __regs_K32Thk1632Prolog( CONTEXT86 *context ) +void WINAPI __regs_K32Thk1632Prolog( CONTEXT *context ) { LPBYTE code = (LPBYTE)context->Eip - 5; @@ -1310,7 +1310,7 @@ DEFINE_REGS_ENTRYPOINT( K32Thk1632Prolog, 0 ) /*********************************************************************** * K32Thk1632Epilog (KERNEL32.@) */ -void WINAPI __regs_K32Thk1632Epilog( CONTEXT86 *context ) +void WINAPI __regs_K32Thk1632Epilog( CONTEXT *context ) { LPBYTE code = (LPBYTE)context->Eip - 13; @@ -1457,7 +1457,7 @@ UINT WINAPI ThunkConnect16( * C16ThkSL (KERNEL.630) */ -void WINAPI C16ThkSL(CONTEXT86 *context) +void WINAPI C16ThkSL(CONTEXT *context) { LPBYTE stub = MapSL(context->Eax), x = stub; WORD cs = wine_get_cs(); @@ -1503,7 +1503,7 @@ void WINAPI C16ThkSL(CONTEXT86 *context) * C16ThkSL01 (KERNEL.631) */ -void WINAPI C16ThkSL01(CONTEXT86 *context) +void WINAPI C16ThkSL01(CONTEXT *context) { LPBYTE stub = MapSL(context->Eax), x = stub; @@ -1980,7 +1980,7 @@ void WINAPI InitCBClient16( FARPROC glueLS ) /*********************************************************************** * CBClientGlueSL (KERNEL.604) */ -void WINAPI CBClientGlueSL( CONTEXT86 *context ) +void WINAPI CBClientGlueSL( CONTEXT *context ) { /* Create stack frame */ SEGPTR stackSeg = stack16_push( 12 ); @@ -2007,7 +2007,7 @@ void WINAPI CBClientGlueSL( CONTEXT86 *context ) * CBClientThunkSL (KERNEL.620) */ extern DWORD CALL32_CBClient( FARPROC proc, LPWORD args, WORD *stackLin, DWORD *esi ); -void WINAPI CBClientThunkSL( CONTEXT86 *context ) +void WINAPI CBClientThunkSL( CONTEXT *context ) { /* Call 32-bit relay code */ @@ -2032,7 +2032,7 @@ void WINAPI CBClientThunkSL( CONTEXT86 *context ) * CBClientThunkSLEx (KERNEL.621) */ extern DWORD CALL32_CBClientEx( FARPROC proc, LPWORD args, WORD *stackLin, DWORD *esi, INT *nArgs ); -void WINAPI CBClientThunkSLEx( CONTEXT86 *context ) +void WINAPI CBClientThunkSLEx( CONTEXT *context ) { /* Call 32-bit relay code */ @@ -2135,7 +2135,7 @@ LPVOID WINAPI GetPK16SysVar(void) /********************************************************************** * CommonUnimpStub (KERNEL32.17) */ -void WINAPI __regs_CommonUnimpStub( CONTEXT86 *context ) +void WINAPI __regs_CommonUnimpStub( CONTEXT *context ) { FIXME("generic stub: %s\n", ((LPSTR)context->Eax ? (LPSTR)context->Eax : "?")); @@ -2287,7 +2287,7 @@ INT WINAPIV k32wsprintfA(LPSTR buffer, LPCSTR spec, ...) * Real prototype is: * INT16 WINAPI Catch( LPCATCHBUF lpbuf ); */ -void WINAPI Catch16( LPCATCHBUF lpbuf, CONTEXT86 *context ) +void WINAPI Catch16( LPCATCHBUF lpbuf, CONTEXT *context ) { /* Note: we don't save the current ss, as the catch buffer is */ /* only 9 words long. Hopefully no one will have the silly */ @@ -2325,7 +2325,7 @@ void WINAPI Catch16( LPCATCHBUF lpbuf, CONTEXT86 *context ) * Real prototype is: * INT16 WINAPI Throw( LPCATCHBUF lpbuf, INT16 retval ); */ -void WINAPI Throw16( LPCATCHBUF lpbuf, INT16 retval, CONTEXT86 *context ) +void WINAPI Throw16( LPCATCHBUF lpbuf, INT16 retval, CONTEXT *context ) { STACK16FRAME *pFrame; STACK32FRAME *frame32; diff --git a/dlls/krnl386.exe16/timer.c b/dlls/krnl386.exe16/timer.c index fd0938f62b5..279e916c50b 100644 --- a/dlls/krnl386.exe16/timer.c +++ b/dlls/krnl386.exe16/timer.c @@ -68,7 +68,7 @@ static DWORD TIMER_millis = 0; * called. This function will be called even if application has its * own IRQ handler that does not jump to builtin IRQ handler. */ -static void TIMER_Relay( CONTEXT86 *context, void *data ) +static void TIMER_Relay( CONTEXT *context, void *data ) { InterlockedDecrement( &TIMER_pending ); } @@ -160,10 +160,10 @@ void DOSVM_SetTimer( UINT ticks ) * * DOS interrupt 08h handler (IRQ0 - TIMER). */ -void WINAPI DOSVM_Int08Handler( CONTEXT86 *context ) +void WINAPI DOSVM_Int08Handler( CONTEXT *context ) { BIOSDATA *bios_data = DOSVM_BiosData(); - CONTEXT86 nested_context = *context; + CONTEXT nested_context = *context; FARPROC16 int1c_proc = DOSVM_GetRMHandler( 0x1c ); nested_context.SegCs = SELECTOROF(int1c_proc); diff --git a/dlls/krnl386.exe16/vxd.c b/dlls/krnl386.exe16/vxd.c index c57f1463cab..a3ff9ee8b3a 100644 --- a/dlls/krnl386.exe16/vxd.c +++ b/dlls/krnl386.exe16/vxd.c @@ -52,7 +52,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(vxd); -typedef DWORD (WINAPI *VxDCallProc)(DWORD, CONTEXT86 *); +typedef DWORD (WINAPI *VxDCallProc)(DWORD, CONTEXT *); typedef BOOL (WINAPI *DeviceIoProc)(DWORD, LPVOID, DWORD, LPVOID, DWORD, LPDWORD, LPOVERLAPPED); struct vxd_module @@ -287,7 +287,7 @@ done: * VxDCall7 (KERNEL32.8) * VxDCall8 (KERNEL32.9) */ -void WINAPI __regs_VxDCall( DWORD service, CONTEXT86 *context ) +void WINAPI __regs_VxDCall( DWORD service, CONTEXT *context ) { unsigned int i; VxDCallProc proc = NULL; @@ -321,7 +321,7 @@ DEFINE_REGS_ENTRYPOINT( VxDCall, 1 ) /*********************************************************************** * __wine_vxd_vmm (WPROCS.401) */ -void WINAPI __wine_vxd_vmm ( CONTEXT86 *context ) +void WINAPI __wine_vxd_vmm ( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -348,7 +348,7 @@ void WINAPI __wine_vxd_vmm ( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_pagefile (WPROCS.433) */ -void WINAPI __wine_vxd_pagefile( CONTEXT86 *context ) +void WINAPI __wine_vxd_pagefile( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -394,7 +394,7 @@ void WINAPI __wine_vxd_pagefile( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_reboot (WPROCS.409) */ -void WINAPI __wine_vxd_reboot( CONTEXT86 *context ) +void WINAPI __wine_vxd_reboot( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -415,7 +415,7 @@ void WINAPI __wine_vxd_reboot( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_vdd (WPROCS.410) */ -void WINAPI __wine_vxd_vdd( CONTEXT86 *context ) +void WINAPI __wine_vxd_vdd( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -436,7 +436,7 @@ void WINAPI __wine_vxd_vdd( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_vmd (WPROCS.412) */ -void WINAPI __wine_vxd_vmd( CONTEXT86 *context ) +void WINAPI __wine_vxd_vmd( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -457,7 +457,7 @@ void WINAPI __wine_vxd_vmd( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_vxdloader (WPROCS.439) */ -void WINAPI __wine_vxd_vxdloader( CONTEXT86 *context ) +void WINAPI __wine_vxd_vxdloader( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -499,7 +499,7 @@ void WINAPI __wine_vxd_vxdloader( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_shell (WPROCS.423) */ -void WINAPI __wine_vxd_shell( CONTEXT86 *context ) +void WINAPI __wine_vxd_shell( CONTEXT *context ) { unsigned service = DX_reg(context); @@ -592,7 +592,7 @@ void WINAPI __wine_vxd_shell( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_comm (WPROCS.414) */ -void WINAPI __wine_vxd_comm( CONTEXT86 *context ) +void WINAPI __wine_vxd_comm( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -617,7 +617,7 @@ void WINAPI __wine_vxd_comm( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_timer (WPROCS.405) */ -void WINAPI __wine_vxd_timer( CONTEXT86 *context ) +void WINAPI __wine_vxd_timer( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -668,7 +668,7 @@ static DWORD CALLBACK timer_thread( void *arg ) /*********************************************************************** * __wine_vxd_timerapi (WPROCS.1490) */ -void WINAPI __wine_vxd_timerapi( CONTEXT86 *context ) +void WINAPI __wine_vxd_timerapi( CONTEXT *context ) { static WORD System_Time_Selector; @@ -702,7 +702,7 @@ void WINAPI __wine_vxd_timerapi( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_configmg (WPROCS.451) */ -void WINAPI __wine_vxd_configmg( CONTEXT86 *context ) +void WINAPI __wine_vxd_configmg( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -723,7 +723,7 @@ void WINAPI __wine_vxd_configmg( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_enable (WPROCS.455) */ -void WINAPI __wine_vxd_enable( CONTEXT86 *context ) +void WINAPI __wine_vxd_enable( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -744,7 +744,7 @@ void WINAPI __wine_vxd_enable( CONTEXT86 *context ) /*********************************************************************** * __wine_vxd_apm (WPROCS.438) */ -void WINAPI __wine_vxd_apm( CONTEXT86 *context ) +void WINAPI __wine_vxd_apm( CONTEXT *context ) { unsigned service = AX_reg(context); @@ -814,7 +814,7 @@ void WINAPI __wine_vxd_apm( CONTEXT86 *context ) * service of the Win32s VxD. (Note that the offset is never reset.) * */ -void WINAPI __wine_vxd_win32s( CONTEXT86 *context ) +void WINAPI __wine_vxd_win32s( CONTEXT *context ) { switch (AX_reg(context)) { diff --git a/dlls/krnl386.exe16/wowthunk.c b/dlls/krnl386.exe16/wowthunk.c index 6b2437375ed..c6c28a354dc 100644 --- a/dlls/krnl386.exe16/wowthunk.c +++ b/dlls/krnl386.exe16/wowthunk.c @@ -42,7 +42,7 @@ WINE_DECLARE_DEBUG_CHANNEL(snoop); /* symbols exported from relay16.s */ extern DWORD WINAPI wine_call_to_16( FARPROC16 target, DWORD cbArgs, PEXCEPTION_HANDLER handler ); -extern void WINAPI wine_call_to_16_regs( CONTEXT86 *context, DWORD cbArgs, PEXCEPTION_HANDLER handler ); +extern void WINAPI wine_call_to_16_regs( CONTEXT *context, DWORD cbArgs, PEXCEPTION_HANDLER handler ); extern void __wine_call_to_16_ret(void); extern void CALL32_CBClient_Ret(void); extern void CALL32_CBClientEx_Ret(void);