19990808-11:50 GMT+1

This commit is contained in:
Viktor Szakats
1999-08-08 10:19:56 +00:00
parent 183b21c359
commit e84bc8428c
5 changed files with 38 additions and 27 deletions

View File

@@ -1,3 +1,12 @@
19990808-11:50 GMT+1 Victor Szel <info@szelvesz.hu>
* source/runner/runner.c
source/runner/Makefile
include/run_exp.h
! Some missed name changes adapted.
* source/rtl/errorapi.c
! hb_vmPushlogical() uses BOOL.
+ Some improvement in _errLaunch().
19990808-10:05 GMT+1 Antonio Linares <alinares@fivetech.com>
* makefile.b32
* setkey and devoutp were not properly referenced

View File

@@ -77,7 +77,7 @@ HARBOUR HB___MVPRIVATE();
*/
HB_INIT_SYMBOLS_BEGIN( RUNNER )
{ "HB_RUN", FS_PUBLIC, HB_HB_RUN , 0 },
{ "MAIN", FS_PUBLIC, HB_MAIN , 0 },
{ "__AGLOBALSTACK", FS_PUBLIC, HB___AGLOBALSTACK , 0 },
{ "__APARAM", FS_PUBLIC, HB___APARAM , 0 },
{ "__ASTACK", FS_PUBLIC, HB___ASTACK , 0 },

View File

@@ -41,11 +41,6 @@ PHB_ITEM hb_errNew( void )
return pReturn;
}
/* QUESTION: When does Clipper show this: */
/* TODO: Change to internal error: */
/* printf("Error recovery failure, ???? (0)") */
/* exit(1); */
WORD hb_errLaunch( PHB_ITEM pError )
{
WORD wRetVal;
@@ -55,12 +50,13 @@ WORD hb_errLaunch( PHB_ITEM pError )
/* TODO: Determine if there was a BREAK in error handler. */
BOOL bBreak = FALSE;
WORD nSequenceLevel = 0;
USHORT uiFlags = hb_errGetFlags( pError );
if ( ! IS_BLOCK( &errorBlock ) )
{
/* TODO: Change to internal error: */
printf( "No ERRORBLOCK() for error at: ???? (0)" );
exit( 1 );
exit( 1 ); /* TODO: quit correctly */
}
hb_vmPushSymbol( &symEval );
@@ -68,24 +64,27 @@ WORD hb_errLaunch( PHB_ITEM pError )
hb_vmPush( pError );
hb_vmDo( 1 );
/* TODO: Handle the canSubstitute case somehow */
/* Clipper doesn't document the case where canSubstitute is set */
if ( bBreak )
{
if ( nSequenceLevel )
{
wRetVal = E_BREAK;
}
else
{
exit( 1 ); /* TODO: quit correctly */
}
wRetVal = E_BREAK;
}
else if ( IS_LOGICAL( &stack.Return ) )
{
wRetVal = stack.Return.item.asLogical.value ? E_RETRY : E_DEFAULT;
}
else
{
wRetVal = E_DEFAULT;
}
if ( ( wRetVal == E_BREAK && nSequenceLevel == 0 ) ||
( wRetVal == E_DEFAULT && !( uiFlags & EF_CANDEFAULT ) ) ||
( wRetVal == E_RETRY && !( uiFlags & EF_CANRETRY ) ) )
{
/* TODO: Change to internal error: */
printf("Error recovery failure, ???? (0)");
exit( 1 ); /* TODO: quit correctly */
}
}
else
wRetVal = E_RETRY;
@@ -296,21 +295,21 @@ PHB_ITEM hb_errPutFlags( PHB_ITEM pError, USHORT uiFlags )
{
hb_vmPushSymbol( hb_dynsymGet( "_CANRETRY" )->pSymbol );
hb_vmPush( pError );
hb_vmPushLogical( uiFlags & EF_CANRETRY );
hb_vmPushLogical( ( uiFlags & EF_CANRETRY ) ? TRUE : FALSE );
hb_vmDo( 1 );
/* ; */
hb_vmPushSymbol( hb_dynsymGet( "_CANSUBSTITUTE" )->pSymbol );
hb_vmPush( pError );
hb_vmPushLogical( uiFlags & EF_CANSUBSTITUTE );
hb_vmPushLogical( ( uiFlags & EF_CANSUBSTITUTE ) ? TRUE : FALSE );
hb_vmDo( 1 );
/* ; */
hb_vmPushSymbol( hb_dynsymGet( "_CANDEFAULT" )->pSymbol );
hb_vmPush( pError );
hb_vmPushLogical( uiFlags & EF_CANDEFAULT );
hb_vmPushLogical( ( uiFlags & EF_CANDEFAULT ) ? TRUE : FALSE );
hb_vmDo( 1 );
/* ; */

View File

@@ -9,8 +9,11 @@ C_SOURCES=\
C_MAIN=runner.c
LIBS=\
tools \
debug \
rdd \
vm \
rtl \
tools \
hbpp \
include $(TOP)$(ROOT)config/bin.cf

View File

@@ -39,11 +39,11 @@ static BYTE prgFunction[] = { 0x68, 0x00, 0x00, 0x00, 0x00,
0xC3 };
/* push offset pcode
push offset symbols
call near relative VirtualMachine
call near relative hb_vmExecute
add esp, 8
ret near */
/* This is the assembler output from : VirtualMachine(pcode,symbols). */
/* This is the assembler output from : hb_vmExecute(pcode,symbols). */
/* #elseif INTEL16 */
/* #elseif MOTOROLA */
@@ -196,7 +196,7 @@ HARBOUR HB_MAIN( void )
}
}
ProcessSymbols( pSymRead, ulSymbols );
hb_vmProcessSymbols( pSymRead, ulSymbols );
/* Initialize static variables first
*/
@@ -446,8 +446,8 @@ static PASM_CALL CreateFun( PHB_SYMB pSymbols, BYTE * pCode )
Patch( asmRet->pAsmData, 1, pSymbols ); /* Insert pointer to testsym */
Patch( asmRet->pAsmData, 6, pCode); /* Insert pointer to testcode */
PatchRelative( asmRet->pAsmData, 11, &VirtualMachine, 15 );
/* Insert pointer to VirtualMachine() */
PatchRelative( asmRet->pAsmData, 11, &hb_vmExecute, 15 );
/* Insert pointer to hb_vmExecute() */
/* #elseif INTEL16 */
/* #elseif MOTOROLA */