diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a897bf4ea8..38693cc55d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,14 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ + dos not exist in index + * xharbour/source/rdd/dbfcdx/dbfcdx1.c + * harbour/source/vm/classes.c + * use hb_itemClone() - it will save us modifications in the + * xharbour/source/rdd/dbfntx/dbfntx1.c + parameters like arrays (f.e. hashes) + * some source code formatting + 2006-04-09 14:55 UTC+0300 Alexander Kresin * contrib/rdd_ads/ads1.c * Added possibility to save memo fields > 64K diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index 2ceb71c3aa..8e41e675ba 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -7567,6 +7567,7 @@ static ERRCODE hb_cdxOrderDestroy( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ) { LPCDXINDEX pIndex, pIndexTmp; LPCDXTAG pTag; + USHORT uiTag; HB_TRACE(HB_TR_DEBUG, ("hb_cdxOrderDestroy(%p, %p)", pArea, pOrderInfo)); @@ -7578,7 +7579,7 @@ static ERRCODE hb_cdxOrderDestroy( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ) if ( pOrderInfo->itmOrder ) { - pTag = hb_cdxFindTag( pArea, pOrderInfo->itmOrder, pOrderInfo->atomBagName, NULL ); + pTag = hb_cdxFindTag( pArea, pOrderInfo->itmOrder, pOrderInfo->atomBagName, &uiTag ); if ( pTag ) { pIndex = pTag->pIndex; @@ -7619,6 +7620,10 @@ static ERRCODE hb_cdxOrderDestroy( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ) pIndex->fDelete = TRUE; hb_cdxIndexFree( pIndex ); } + if( uiTag < pArea->uiTag ) + pArea->uiTag--; + else if( uiTag == pArea->uiTag ) + pArea->uiTag = 0; } else { diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index 2a08b5b2ca..05bf102393 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -3809,14 +3809,30 @@ static ULONG hb_ntxOrdKeyNo( LPTAGINFO pTag ) */ static BOOL hb_ntxOrdKeyGoto( LPTAGINFO pTag, ULONG ulKeyNo ) { + NTXAREAP pArea = pTag->Owner->Owner; + if( ! ulKeyNo || ! hb_ntxTagLockRead( pTag ) ) return FALSE; + hb_ntxTagRefreshScope( pTag ); hb_ntxTagGoTop( pTag ); while( !pTag->TagEOF && --ulKeyNo ) { hb_ntxTagSkipNext( pTag ); } + + if( pTag->TagEOF ) + { + SELF_GOTO( ( AREAP ) pArea, 0 ); + } + else + { + LPTAGINFO pSavedTag = pArea->lpCurTag; + pArea->lpCurTag = pTag; + SELF_GOTO( ( AREAP ) pArea, pTag->CurKeyInfo->Xtra ); + SELF_SKIPFILTER( ( AREAP ) pArea, 1 ); + pArea->lpCurTag = pSavedTag; + } hb_ntxTagUnLockRead( pTag ); return TRUE; }