From 58cd87abb146001a4a855f8cfa792ff60154e230 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 4 Jan 2010 13:44:22 +0100 Subject: [PATCH] winedos: Internal functions don't need to be WINAPI. --- dlls/winedos/dosaspi.c | 4 ++-- dlls/winedos/dosexe.h | 47 +++++++++++++++++++-------------------- dlls/winedos/dosvm.c | 18 +++++++-------- dlls/winedos/int09.c | 7 ++---- dlls/winedos/int10.c | 2 +- dlls/winedos/int16.c | 4 ++-- dlls/winedos/int21.c | 14 +----------- dlls/winedos/int31.c | 2 +- dlls/winedos/int33.c | 4 ++-- dlls/winedos/int67.c | 2 +- dlls/winedos/interrupts.c | 2 +- dlls/winedos/module.c | 20 ++++++++--------- dlls/winedos/timer.c | 2 +- dlls/winedos/xms.c | 2 +- 14 files changed, 57 insertions(+), 73 deletions(-) diff --git a/dlls/winedos/dosaspi.c b/dlls/winedos/dosaspi.c index 9125d53c03d..84299f9b81e 100644 --- a/dlls/winedos/dosaspi.c +++ b/dlls/winedos/dosaspi.c @@ -190,11 +190,11 @@ static void WINAPI ASPI_DOS_func(CONTEXT86 *context) /********************************************************************** - * ASPIHandler (WINEDOS.@) + * ASPIHandler * * returns the address of a real mode callback to ASPI_DOS_func() */ -void WINAPI DOSVM_ASPIHandler( CONTEXT86 *context ) +void DOSVM_ASPIHandler( CONTEXT86 *context ) { FARPROC16 *p = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx); TRACE("DOS ASPI opening\n"); diff --git a/dlls/winedos/dosexe.h b/dlls/winedos/dosexe.h index a1be04abcde..5ed8599d2ca 100644 --- a/dlls/winedos/dosexe.h +++ b/dlls/winedos/dosexe.h @@ -345,24 +345,23 @@ typedef struct } WINEDEV; /* module.c */ -extern void WINAPI MZ_LoadImage( LPCSTR filename, HANDLE hFile ); -extern BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID paramblk ); -extern void WINAPI MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval ); -extern BOOL WINAPI MZ_Current( void ); -extern void WINAPI MZ_AllocDPMITask( void ); -extern void WINAPI MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg ); +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_Current( void ); +extern void MZ_AllocDPMITask( void ); +extern void MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg ); 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 WINAPI DOSVM_Enter( CONTEXT86 *context ); -extern void WINAPI DOSVM_Wait( CONTEXT86 * ); -extern DWORD WINAPI DOSVM_Loop( HANDLE hThread ); -extern void WINAPI DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data ); -extern void WINAPI DOSVM_PIC_ioport_out( WORD port, BYTE val ); -extern void WINAPI DOSVM_SetTimer( UINT ticks ); +extern INT DOSVM_Enter( CONTEXT86 *context ); +extern void DOSVM_Wait( CONTEXT86 * ); +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 ); +extern void DOSVM_SetTimer( UINT ticks ); /* devices.c */ extern void DOSDEV_InstallDOSDevices(void); @@ -377,7 +376,7 @@ extern void DMA_ioport_out( WORD port, BYTE val ); extern BYTE DMA_ioport_in( WORD port ); /* dosaspi.c */ -extern void WINAPI DOSVM_ASPIHandler(CONTEXT86*); +extern void DOSVM_ASPIHandler(CONTEXT86*); /* dosconf.c */ extern DOSCONF *DOSCONF_GetConfig( void ); @@ -411,12 +410,12 @@ extern LPVOID DOSVM_AllocDataUMB(DWORD, WORD *, WORD *); /* int09.c */ extern void WINAPI DOSVM_Int09Handler(CONTEXT86*); -extern void WINAPI DOSVM_Int09SendScan(BYTE scan,BYTE ascii); -extern BYTE WINAPI DOSVM_Int09ReadScan(BYTE*ascii); +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_PutChar(BYTE ascii); +extern void DOSVM_PutChar(BYTE ascii); /* int13.c */ extern void WINAPI DOSVM_Int13Handler(CONTEXT86*); @@ -426,8 +425,8 @@ extern void WINAPI DOSVM_Int15Handler(CONTEXT86*); /* int16.c */ extern void WINAPI DOSVM_Int16Handler(CONTEXT86*); -extern BOOL WINAPI DOSVM_Int16ReadChar( BYTE *, BYTE *, CONTEXT86 * ); -extern int WINAPI DOSVM_Int16AddChar(BYTE ascii,BYTE scan); +extern BOOL DOSVM_Int16ReadChar( BYTE *, BYTE *, CONTEXT86 * ); +extern int DOSVM_Int16AddChar(BYTE ascii,BYTE scan); /* int21.c */ extern void WINAPI DOSVM_Int21Handler(CONTEXT86*); @@ -448,23 +447,23 @@ extern void MSCDEX_InstallCDROM(void); extern void WINAPI DOSVM_Int31Handler(CONTEXT86*); extern void WINAPI DOSVM_RawModeSwitchHandler(CONTEXT86*); extern BOOL DOSVM_IsDos32(void); -extern FARPROC16 WINAPI DPMI_AllocInternalRMCB(RMCBPROC); +extern FARPROC16 DPMI_AllocInternalRMCB(RMCBPROC); extern int DPMI_CallRMProc(CONTEXT86*,LPWORD,int,int); extern BOOL DOSVM_CheckWrappers(CONTEXT86*); /* int33.c */ extern void WINAPI DOSVM_Int33Handler(CONTEXT86*); -extern void WINAPI DOSVM_Int33Message(UINT,WPARAM,LPARAM); -extern void WINAPI DOSVM_Int33Console(MOUSE_EVENT_RECORD*); +extern void DOSVM_Int33Message(UINT,WPARAM,LPARAM); +extern void DOSVM_Int33Console(MOUSE_EVENT_RECORD*); /* int67.c */ extern void WINAPI DOSVM_Int67Handler(CONTEXT86*); -extern void WINAPI EMS_Ioctl_Handler(CONTEXT86*); +extern void EMS_Ioctl_Handler(CONTEXT86*); /* interrupts.c */ extern void WINAPI DOSVM_CallBuiltinHandler( CONTEXT86 *, BYTE ); extern BOOL WINAPI DOSVM_EmulateInterruptPM( CONTEXT86 *, BYTE ); -extern BOOL WINAPI DOSVM_EmulateInterruptRM( CONTEXT86 *, BYTE ); +extern BOOL DOSVM_EmulateInterruptRM( CONTEXT86 *, BYTE ); extern FARPROC16 DOSVM_GetPMHandler16( BYTE ); extern FARPROC48 DOSVM_GetPMHandler48( BYTE ); extern FARPROC16 DOSVM_GetRMHandler( BYTE ); @@ -491,6 +490,6 @@ extern char IO_pp_init(void); extern void WINAPI DOSVM_Int08Handler(CONTEXT86*); /* xms.c */ -extern void WINAPI XMS_Handler(CONTEXT86*); +extern void XMS_Handler(CONTEXT86*); #endif /* __WINE_DOSEXE_H */ diff --git a/dlls/winedos/dosvm.c b/dlls/winedos/dosvm.c index 7c81fade300..49c2fe20ecc 100644 --- a/dlls/winedos/dosvm.c +++ b/dlls/winedos/dosvm.c @@ -251,7 +251,7 @@ void DOSVM_SendQueuedEvents( CONTEXT86 *context ) /*********************************************************************** * QueueEvent (WINEDOS.@) */ -void WINAPI DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data) +void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data) { LPDOSEVENT event, cur, prev; BOOL old_pending; @@ -385,7 +385,7 @@ static void DOSVM_ProcessMessage(MSG *msg) * interrupts and waits until some asynchronous event has been * processed. */ -void WINAPI DOSVM_Wait( CONTEXT86 *waitctx ) +void DOSVM_Wait( CONTEXT86 *waitctx ) { if (DOSVM_HasPendingEvents()) { @@ -461,7 +461,7 @@ void WINAPI DOSVM_Wait( CONTEXT86 *waitctx ) } -DWORD WINAPI DOSVM_Loop( HANDLE hThread ) +DWORD DOSVM_Loop( HANDLE hThread ) { HANDLE objs[2]; int count = 0; @@ -569,7 +569,7 @@ static LONG WINAPI exception_handler(EXCEPTION_POINTERS *eptr) return EXCEPTION_CONTINUE_SEARCH; } -INT WINAPI DOSVM_Enter( CONTEXT86 *context ) +INT DOSVM_Enter( CONTEXT86 *context ) { INT ret = 0; if (!ISV86(context)) @@ -592,7 +592,7 @@ INT WINAPI DOSVM_Enter( CONTEXT86 *context ) /*********************************************************************** * OutPIC (WINEDOS.@) */ -void WINAPI DOSVM_PIC_ioport_out( WORD port, BYTE val) +void DOSVM_PIC_ioport_out( WORD port, BYTE val) { if (port != 0x20) { @@ -644,7 +644,7 @@ void WINAPI DOSVM_PIC_ioport_out( WORD port, BYTE val) /*********************************************************************** * Enter (WINEDOS.@) */ -INT WINAPI DOSVM_Enter( CONTEXT86 *context ) +INT DOSVM_Enter( CONTEXT86 *context ) { SetLastError( ERROR_NOT_SUPPORTED ); return -1; @@ -653,17 +653,17 @@ INT WINAPI DOSVM_Enter( CONTEXT86 *context ) /*********************************************************************** * Wait (WINEDOS.@) */ -void WINAPI DOSVM_Wait( CONTEXT86 *waitctx ) { } +void DOSVM_Wait( CONTEXT86 *waitctx ) { } /*********************************************************************** * OutPIC (WINEDOS.@) */ -void WINAPI DOSVM_PIC_ioport_out( WORD port, BYTE val) {} +void DOSVM_PIC_ioport_out( WORD port, BYTE val) {} /*********************************************************************** * QueueEvent (WINEDOS.@) */ -void WINAPI DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data) +void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data) { if (irq<0) { /* callback event, perform it with dummy context */ diff --git a/dlls/winedos/int09.c b/dlls/winedos/int09.c index f45baa462eb..0702287b4a1 100644 --- a/dlls/winedos/int09.c +++ b/dlls/winedos/int09.c @@ -224,7 +224,7 @@ static void KbdRelay( CONTEXT86 *context, void *data ) } } -void WINAPI DOSVM_Int09SendScan( BYTE scan, BYTE ascii ) +void DOSVM_Int09SendScan( BYTE scan, BYTE ascii ) { if (kbdinfo.queuelen == QUEUELEN) { ERR("keyboard queue overflow\n"); @@ -237,10 +237,7 @@ void WINAPI DOSVM_Int09SendScan( BYTE scan, BYTE ascii ) DOSVM_QueueEvent(1,DOS_PRIORITY_KEYBOARD,KbdRelay,NULL); } -/********************************************************************** - * KbdReadScan (WINEDOS.@) - */ -BYTE WINAPI DOSVM_Int09ReadScan( BYTE*ascii ) +BYTE DOSVM_Int09ReadScan( BYTE*ascii ) { if (ascii) *ascii = kbdinfo.ascii[0]; return kbdinfo.queue[0]; diff --git a/dlls/winedos/int10.c b/dlls/winedos/int10.c index e1ce312ae10..52fe65730fc 100644 --- a/dlls/winedos/int10.c +++ b/dlls/winedos/int10.c @@ -1447,7 +1447,7 @@ void WINAPI DOSVM_Int10Handler( CONTEXT86 *context ) * Write single character to VGA console at the current * cursor position and updates the BIOS cursor position. */ -void WINAPI DOSVM_PutChar( BYTE ascii ) +void DOSVM_PutChar( BYTE ascii ) { BIOSDATA *data = DOSVM_BiosData(); unsigned xpos, ypos; diff --git a/dlls/winedos/int16.c b/dlls/winedos/int16.c index 12e1c46b31d..8fa5de03e98 100644 --- a/dlls/winedos/int16.c +++ b/dlls/winedos/int16.c @@ -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 WINAPI DOSVM_Int16ReadChar(BYTE *ascii, BYTE *scan, CONTEXT86 *waitctx) +int DOSVM_Int16ReadChar(BYTE *ascii, BYTE *scan, CONTEXT86 *waitctx) { BIOSDATA *data = DOSVM_BiosData(); WORD CurOfs = data->NextKbdCharPtr; @@ -195,7 +195,7 @@ int WINAPI DOSVM_Int16ReadChar(BYTE *ascii, BYTE *scan, CONTEXT86 *waitctx) return TRUE; } -int WINAPI DOSVM_Int16AddChar(BYTE ascii,BYTE scan) +int DOSVM_Int16AddChar(BYTE ascii,BYTE scan) { BIOSDATA *data = DOSVM_BiosData(); WORD CurOfs = data->FirstKbdCharPtr; diff --git a/dlls/winedos/int21.c b/dlls/winedos/int21.c index 6fd131f9442..e85ad73664a 100644 --- a/dlls/winedos/int21.c +++ b/dlls/winedos/int21.c @@ -272,13 +272,12 @@ struct magic_device }; static void INT21_IoctlScsiMgrHandler( CONTEXT86 * ); -static void INT21_IoctlEMSHandler( CONTEXT86 * ); static void INT21_IoctlHPScanHandler( CONTEXT86 * ); static struct magic_device magic_devices[] = { { {'s','c','s','i','m','g','r','$',0}, NULL, { { 0, 0 } }, INT21_IoctlScsiMgrHandler }, - { {'e','m','m','x','x','x','x','0',0}, NULL, { { 0, 0 } }, INT21_IoctlEMSHandler }, + { {'e','m','m','x','x','x','x','0',0}, NULL, { { 0, 0 } }, EMS_Ioctl_Handler }, { {'h','p','s','c','a','n',0}, NULL, { { 0, 0 } }, INT21_IoctlHPScanHandler }, }; @@ -2691,17 +2690,6 @@ static void INT21_IoctlScsiMgrHandler( CONTEXT86 *context ) } -/*********************************************************************** - * INT21_IoctlEMSHandler - * - * IOCTL handler for the EMXXXX0 device. - */ -static void INT21_IoctlEMSHandler( CONTEXT86 *context ) -{ - EMS_Ioctl_Handler(context); -} - - /*********************************************************************** * INT21_IoctlHPScanHandler * diff --git a/dlls/winedos/int31.c b/dlls/winedos/int31.c index 0c5bdc7b2b8..5093b7aa7b9 100644 --- a/dlls/winedos/int31.c +++ b/dlls/winedos/int31.c @@ -675,7 +675,7 @@ static RMCB *DPMI_AllocRMCB( void ) } -FARPROC16 WINAPI DPMI_AllocInternalRMCB( RMCBPROC proc ) +FARPROC16 DPMI_AllocInternalRMCB( RMCBPROC proc ) { RMCB *NewRMCB = DPMI_AllocRMCB(); diff --git a/dlls/winedos/int33.c b/dlls/winedos/int33.c index d72f0d881f4..bacf105c16f 100644 --- a/dlls/winedos/int33.c +++ b/dlls/winedos/int33.c @@ -285,7 +285,7 @@ static void QueueMouseRelay(DWORD mx, DWORD my, WORD mask) } } -void WINAPI DOSVM_Int33Message(UINT message,WPARAM wParam,LPARAM lParam) +void DOSVM_Int33Message(UINT message,WPARAM wParam,LPARAM lParam) { WORD mask = 0; unsigned Height, Width, SX=1, SY=1; @@ -329,7 +329,7 @@ void WINAPI DOSVM_Int33Message(UINT message,WPARAM wParam,LPARAM lParam) mask); } -void WINAPI DOSVM_Int33Console(MOUSE_EVENT_RECORD *record) +void DOSVM_Int33Console(MOUSE_EVENT_RECORD *record) { unsigned Height, Width; WORD mask = 0; diff --git a/dlls/winedos/int67.c b/dlls/winedos/int67.c index a35e809fd9d..34013df35ba 100644 --- a/dlls/winedos/int67.c +++ b/dlls/winedos/int67.c @@ -461,7 +461,7 @@ void WINAPI DOSVM_Int67Handler( CONTEXT86 *context ) * * Handler for interrupt 21h IOCTL routine for device "EMMXXXX0". */ -void WINAPI EMS_Ioctl_Handler( CONTEXT86 *context ) +void EMS_Ioctl_Handler( CONTEXT86 *context ) { assert(AH_reg(context) == 0x44); diff --git a/dlls/winedos/interrupts.c b/dlls/winedos/interrupts.c index 81cb2bb0e75..59f5b04d08b 100644 --- a/dlls/winedos/interrupts.c +++ b/dlls/winedos/interrupts.c @@ -445,7 +445,7 @@ void DOSVM_HardwareInterruptPM( CONTEXT86 *context, BYTE intnum ) * Returns FALSE if this interrupt was caused by return * from real mode wrapper. */ -BOOL WINAPI DOSVM_EmulateInterruptRM( CONTEXT86 *context, BYTE intnum ) +BOOL DOSVM_EmulateInterruptRM( CONTEXT86 *context, BYTE intnum ) { TRACE_(relay)("Call DOS int 0x%02x ret=%04x:%08x\n" " eax=%08x ebx=%08x ecx=%08x edx=%08x\n" diff --git a/dlls/winedos/module.c b/dlls/winedos/module.c index 3b2abe708ef..51b68e4d13c 100644 --- a/dlls/winedos/module.c +++ b/dlls/winedos/module.c @@ -449,7 +449,7 @@ void WINAPI wine_load_dos_exe( LPCSTR filename, LPCSTR cmdline ) * * this may only be called from existing DOS processes */ -BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID paramblk ) +BOOL MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID paramblk ) { DWORD binType; STARTUPINFOA st; @@ -598,7 +598,7 @@ BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID para /*********************************************************************** * MZ_AllocDPMITask */ -void WINAPI MZ_AllocDPMITask( void ) +void MZ_AllocDPMITask( void ) { MZ_InitMemory(); MZ_InitTask(); @@ -607,7 +607,7 @@ void WINAPI MZ_AllocDPMITask( void ) /*********************************************************************** * MZ_RunInThread */ -void WINAPI MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg ) +void MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg ) { if (loop_thread) { DOS_SPC spc; @@ -710,7 +710,7 @@ static void MZ_Launch( LPCSTR cmdtail, int length ) /*********************************************************************** * MZ_Exit */ -void WINAPI MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval ) +void MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval ) { if (DOSVM_psp) { WORD psp_seg = cs_psp ? context->SegCs : DOSVM_psp; @@ -750,7 +750,7 @@ void WINAPI MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval ) /*********************************************************************** * MZ_Current */ -BOOL WINAPI MZ_Current( void ) +BOOL MZ_Current( void ) { return (dosvm_pid != 0); /* FIXME: do a better check */ } @@ -769,7 +769,7 @@ void WINAPI wine_load_dos_exe( LPCSTR filename, LPCSTR cmdline ) /*********************************************************************** * MZ_Exec */ -BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID paramblk ) +BOOL MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID paramblk ) { /* can't happen */ SetLastError(ERROR_BAD_FORMAT); @@ -779,7 +779,7 @@ BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID para /*********************************************************************** * MZ_AllocDPMITask */ -void WINAPI MZ_AllocDPMITask( void ) +void MZ_AllocDPMITask( void ) { FIXME("Actual real-mode calls not supported on this platform!\n"); } @@ -787,7 +787,7 @@ void WINAPI MZ_AllocDPMITask( void ) /*********************************************************************** * MZ_RunInThread */ -void WINAPI MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg ) +void MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg ) { proc(arg); } @@ -795,7 +795,7 @@ void WINAPI MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg ) /*********************************************************************** * MZ_Exit */ -void WINAPI MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval ) +void MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval ) { DOSVM_Exit( retval ); } @@ -803,7 +803,7 @@ void WINAPI MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval ) /*********************************************************************** * MZ_Current */ -BOOL WINAPI MZ_Current( void ) +BOOL MZ_Current( void ) { return FALSE; } diff --git a/dlls/winedos/timer.c b/dlls/winedos/timer.c index a7067aa8b0c..fd0938f62b5 100644 --- a/dlls/winedos/timer.c +++ b/dlls/winedos/timer.c @@ -144,7 +144,7 @@ static void WINAPI TIMER_DoSetTimer( ULONG_PTR arg ) /*********************************************************************** * DOSVM_SetTimer */ -void WINAPI DOSVM_SetTimer( UINT ticks ) +void DOSVM_SetTimer( UINT ticks ) { /* PIT interprets zero as a maximum length delay. */ if (ticks == 0) diff --git a/dlls/winedos/xms.c b/dlls/winedos/xms.c index 0b39ca658d9..14e5302f0fa 100644 --- a/dlls/winedos/xms.c +++ b/dlls/winedos/xms.c @@ -60,7 +60,7 @@ static BYTE * XMS_Offset( MOVEOFS *ofs ) * XMS_Handler */ -void WINAPI XMS_Handler( CONTEXT86 *context ) +void XMS_Handler( CONTEXT86 *context ) { switch(AH_reg(context)) {