From 4c890ac167d675d2492790d72b9d52159d2e6afe Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 16 Aug 1999 11:29:33 +0000 Subject: [PATCH] 19990816-13:20 GMT+1 --- harbour/ChangeLog | 13 +++++++++++++ harbour/source/rtl/Makefile | 1 + harbour/source/rtl/errorsys.prg | 5 +---- harbour/source/rtl/itemapi.c | 12 +++++++----- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f3924c2964..de4702c0db 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,16 @@ +19990816-13:20 GMT+1 Victor Szel + * source/rtl/Makefile + + browdb.prg added + * source/rtl/errorsys.prg + ! Removed ErrorLevel() call. + * source/rtl/itemapi.c + ! hb_evalNew() is no longer making a copy of the passed block/name + parameters, so hb_evalRelease() will properly release that item. + Although not exactly defined in CA-Clipper NG, the example program + suggest that it works like this. CA-Clipper example generated unreleased + blocks in Harbour. + % Some variable scope optimized. + 19990816-12:39 GMT+1 Antonio Linares + source/rtl/browdb.prg * source code for TBrowseDb() diff --git a/harbour/source/rtl/Makefile b/harbour/source/rtl/Makefile index 431a922f0d..baa03d4b72 100644 --- a/harbour/source/rtl/Makefile +++ b/harbour/source/rtl/Makefile @@ -41,6 +41,7 @@ PRG_SOURCES=\ adir.prg \ alert.prg \ asort.prg \ + browdb.prg \ devoutp.prg \ errorsys.prg \ menuto.prg \ diff --git a/harbour/source/rtl/errorsys.prg b/harbour/source/rtl/errorsys.prg index 90ee0473ef..21d281038c 100644 --- a/harbour/source/rtl/errorsys.prg +++ b/harbour/source/rtl/errorsys.prg @@ -95,16 +95,13 @@ static function DefError( oError ) cMessage += " (DOS Error " + LTrim(Str(oError:osCode)) + ")" ENDIF - QOut( cMessage) + QOut( cMessage ) DO WHILE ! Empty( ProcName( n ) ) QOut("Called from " + ProcName( n ) + ; "(" + AllTrim( Str( ProcLine( n++ ) ) ) + ")") ENDDO - // TOFIX: Removing ErrorLevel() call will cause a VM error - // don't know why [vszel] - ErrorLevel(1) QUIT RETURN .F. diff --git a/harbour/source/rtl/itemapi.c b/harbour/source/rtl/itemapi.c index 30da6bf6f0..ed4c90aa3c 100644 --- a/harbour/source/rtl/itemapi.c +++ b/harbour/source/rtl/itemapi.c @@ -35,8 +35,7 @@ BOOL hb_evalNew( PEVALINFO pEvalInfo, PHB_ITEM pItem ) if( pEvalInfo ) { memset( pEvalInfo, 0, sizeof( EVALINFO ) ); - pEvalInfo->pItems[ 0 ] = hb_itemNew( 0 ); - hb_itemCopy( pEvalInfo->pItems[ 0 ], pItem ); + pEvalInfo->pItems[ 0 ] = pItem; bResult = TRUE; } return bResult; @@ -45,10 +44,11 @@ BOOL hb_evalNew( PEVALINFO pEvalInfo, PHB_ITEM pItem ) BOOL hb_evalPutParam( PEVALINFO pEvalInfo, PHB_ITEM pItem ) { BOOL bResult = FALSE; - WORD w; if( pEvalInfo ) { + WORD w; + for( w = 1; w < HB_EVAL_PARAM_MAX_ + 1; w++ ) /* note that 0 position is used by the codeblock or function name item */ { if( ! pEvalInfo->pItems[ w ] ) @@ -66,10 +66,11 @@ BOOL hb_evalPutParam( PEVALINFO pEvalInfo, PHB_ITEM pItem ) BOOL hb_evalRelease( PEVALINFO pEvalInfo ) { BOOL bResult = FALSE; - WORD w; if( pEvalInfo ) { + WORD w; + for( w = 0; w < HB_EVAL_PARAM_MAX_ + 1; w++ ) hb_itemRelease( pEvalInfo->pItems[ w ] ); bResult = TRUE; @@ -79,11 +80,12 @@ BOOL hb_evalRelease( PEVALINFO pEvalInfo ) PHB_ITEM hb_evalLaunch( PEVALINFO pEvalInfo ) { - WORD w = 1; PHB_ITEM pResult = 0; if( pEvalInfo ) { + WORD w = 1; + if( IS_STRING( pEvalInfo->pItems[ 0 ] ) ) { hb_vmPushSymbol( hb_dynsymGet( hb_itemGetC( pEvalInfo->pItems[ 0 ] ) )->pSymbol );