Fixed Winelib compilation.

This commit is contained in:
Alexandre Julliard 1999-06-20 15:09:32 +00:00
parent 9597e209f8
commit c42dfdd02f
5 changed files with 19 additions and 11 deletions

View File

@ -43,9 +43,7 @@ DECLARE_DEBUG_CHANNEL(io)
(PTR_SEG_OFF_TO_LIN(SS_sig(context),STACK_sig(context))))) (PTR_SEG_OFF_TO_LIN(SS_sig(context),STACK_sig(context)))))
/* For invalid registers fixup */ /* For invalid registers fixup */
extern DWORD CallFrom16_Start,CallFrom16_End; int (*INSTR_IsRelay)( const void *addr ) = NULL;
extern DWORD CALLTO16_Start,CALLTO16_End;
/*********************************************************************** /***********************************************************************
* INSTR_ReplaceSelector * INSTR_ReplaceSelector
@ -60,11 +58,8 @@ extern DWORD CALLTO16_Start,CALLTO16_End;
*/ */
static BOOL INSTR_ReplaceSelector( SIGCONTEXT *context, WORD *sel ) static BOOL INSTR_ReplaceSelector( SIGCONTEXT *context, WORD *sel )
{ {
if ( IS_SELECTOR_SYSTEM(CS_sig(context)) ) if (IS_SELECTOR_SYSTEM(CS_sig(context)))
if ( ( EIP_sig(context) >= (DWORD)&CallFrom16_Start && if (INSTR_IsRelay && INSTR_IsRelay( (void *)EIP_sig(context) ))
EIP_sig(context) < (DWORD)&CallFrom16_End )
|| ( EIP_sig(context) >= (DWORD)&CALLTO16_Start &&
EIP_sig(context) < (DWORD)&CALLTO16_End ) )
{ {
/* Saved selector may have become invalid when the relay code */ /* Saved selector may have become invalid when the relay code */
/* tries to restore it. We simply clear it. */ /* tries to restore it. We simply clear it. */

View File

@ -23,6 +23,18 @@
static int MAIN_argc; static int MAIN_argc;
static char **MAIN_argv; static char **MAIN_argv;
extern int (*INSTR_IsRelay)( const void *addr );
static int is_relay_addr( const void *addr )
{
extern char CallFrom16_Start, CallFrom16_End, CALLTO16_Start, CALLTO16_End;
return ((((char *)addr >= &CallFrom16_Start) &&
((char *)addr < &CallFrom16_End)) ||
(((char *)addr >= &CALLTO16_Start) &&
((char *)addr < &CALLTO16_End)));
}
/*********************************************************************** /***********************************************************************
* Emulator initialisation * Emulator initialisation
*/ */
@ -141,6 +153,7 @@ int main( int argc, char *argv[] )
MAIN_argc = argc; MAIN_argv = argv; MAIN_argc = argc; MAIN_argv = argv;
/* Set up debugger hook */ /* Set up debugger hook */
INSTR_IsRelay = is_relay_addr;
EXC_SetDebugEventHook( wine_debugger ); EXC_SetDebugEventHook( wine_debugger );
if (Options.debug) if (Options.debug)

View File

@ -7,7 +7,7 @@
*/ */
#define LANGUAGE_ID Wa #define LANGUAGE_ID Wa
#define LANGUAGE_NUMBER 0x90 #define LANGUAGE_NUMBER 90
/* System Menu */ /* System Menu */

View File

@ -6,7 +6,7 @@
*/ */
#define LANGUAGE_ID Wa #define LANGUAGE_ID Wa
#define LANGUAGE_NUMBER 0x90 #define LANGUAGE_NUMBER 90
#define LANGUAGE_MENU_ITEM "&Walon" #define LANGUAGE_MENU_ITEM "&Walon"
/* Menu */ /* Menu */

View File

@ -8,7 +8,7 @@
/* This file is not yet complete !! */ /* This file is not yet complete !! */
#define LANGUAGE_ID Wa #define LANGUAGE_ID Wa
#define LANGUAGE_NUMBER 0x90 #define LANGUAGE_NUMBER 90
/* Menu */ /* Menu */