From 20b7b527790717400cbe4bb89a23d781c73bf9d3 Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Mon, 14 Oct 2002 07:43:55 +0000 Subject: [PATCH] 2002-10-14 11:45 UTC+0300 Alexander Kresin --- harbour/ChangeLog | 8 ++++++++ harbour/source/rdd/dbfcdx/dbfcdx1.c | 5 ++++- harbour/source/rdd/dbfntx/dbfntx1.c | 26 ++++++++++++++++++++------ 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7949e5d687..764ddfe848 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,14 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2002-10-14 11:45 UTC+0300 Alexander Kresin + * source/rdd/dbfntx/dbfntx1.c + ! bug fixed in scopes, when the last record of current order was in the scope + ! bug fixed in error handling while index creating + + * source/rdd/dbfcdx/dbfcdx1.c + ! bug fixed in error handling while index creating ( the same as in dbfntx ) + 2002-10-14 0:10 UTC-0800 Brian Hays * contrib/rdd_ads/rddads.h * contrib/rdd_ads/ads1.c diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index aea4a9dd1e..8e9c6fbb74 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -5825,7 +5825,10 @@ ERRCODE hb_cdxOrderCreate( CDXAREAP pAreaCdx, LPDBORDERCREATEINFO pOrderInfo ) break; default: - bType = '\0'; + hb_itemRelease( pKeyExp ); + if( pExpMacro != NULL ) + hb_macroDelete( pExpMacro ); + return FAILURE; } hb_itemRelease( pResult ); diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index ccf111e4f1..c803ca7f43 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -131,6 +131,11 @@ HB_FUNC( _DBFNTX ); HB_FUNC( DBFNTX_GETFUNCTABLE ); +#ifdef HB_PCODE_VER + #undef HB_PRG_PCODE_VER + #define HB_PRG_PCODE_VER HB_PCODE_VER +#endif + HB_INIT_SYMBOLS_BEGIN( dbfntx1__InitSymbols ) { "_DBFNTX", HB_FS_PUBLIC, HB_FUNCNAME( _DBFNTX ), 0 }, { "DBFNTX_GETFUNCTABLE", HB_FS_PUBLIC, HB_FUNCNAME( DBFNTX_GETFUNCTABLE) , 0 } @@ -3116,13 +3121,16 @@ static ERRCODE ntxSkipRaw( NTXAREAP pArea, LONG lToSkip ) while ( !pTag->TagEOF && lToSkip-- > 0 ) { hb_ntxTagKeyGoTo( pTag, NEXT_RECORD, &lContinue ); - if( !hb_ntxInTopScope( pTag, pTag->CurKeyInfo->key ) ) + if( !pTag->TagEOF ) { - ntxSeek( pArea, 1, pTag->topScope, 0 ); - } - else if( !hb_ntxInBottomScope( pTag, pTag->CurKeyInfo->key ) ) - { - pTag->TagEOF = TRUE; + if( !hb_ntxInTopScope( pTag, pTag->CurKeyInfo->key ) ) + { + ntxSeek( pArea, 1, pTag->topScope, 0 ); + } + else if( !hb_ntxInBottomScope( pTag, pTag->CurKeyInfo->key ) ) + { + pTag->TagEOF = TRUE; + } } } pArea->ulRecNo = ulRecNo; @@ -3470,6 +3478,12 @@ static ERRCODE ntxOrderCreate( NTXAREAP pArea, LPDBORDERCREATEINFO pOrderInfo ) uiLen = pResult->item.asString.length > NTX_MAX_KEY ? NTX_MAX_KEY : pResult->item.asString.length ; break; + + default: + hb_itemRelease( pKeyExp ); + if( pExpMacro != NULL ) + hb_macroDelete( pExpMacro ); + return FAILURE; } /* Make sure uiLen is not 0 */