From 8ed63dc26e5560edf638e5c762e549d7cef5d21e Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Mon, 18 Jun 2001 11:54:36 +0000 Subject: [PATCH] 2001-06-18 15:50 GMT+3 Alexander Kresin --- harbour/ChangeLog | 6 ++++++ harbour/source/rdd/dbfntx/dbfntx1.c | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 30a2f221a4..bb5eae94d0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +2001-06-18 15:50 GMT+3 Alexander Kresin + * source/rdd/dbfntx/dbfntx1.c + ! Bug fixed, related to Bof, Eof flags after seeking + ! Seek "" works now as in CA-Clipper + * Added processing of DBOI_NAME to ntxOrderInfo, so Ordname() works now. + 2001-06-17 22:50 GMT -3 Luiz Rafael Culik *utils/hbmake/hbmake.prg * Fixed an small bug regading the file existence diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index fa1f629fb4..7b3bca3230 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -2025,6 +2025,13 @@ static ERRCODE ntxSeek( NTXAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin switch( hb_itemType( pKey ) ) { case HB_IT_STRING: + if( pKey->item.asString.length == 0 ) + { + hb_ntxKeyFree( pKey2 ); + retvalue = SELF_GOTOP( ( AREAP ) pArea ); + pArea->fFound = TRUE; + return retvalue; + } hb_itemCopy( pKey2->pItem, pKey ); break; case HB_IT_INTEGER: @@ -2075,6 +2082,7 @@ static ERRCODE ntxSeek( NTXAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin pArea->lpCurIndex = NULL; SELF_GOBOTTOM( ( AREAP ) pArea ); retvalue = SELF_SKIPRAW( ( AREAP ) pArea, 1 ); + pArea->fBof = FALSE; pArea->lpCurIndex = lpCurIndex; return retvalue; } @@ -2601,6 +2609,18 @@ static ERRCODE ntxOrderInfo( NTXAREAP pArea, USHORT uiIndex, LPDBORDERINFO pInfo } hb_itemPutC( pInfo->itmResult, "" ); break; + case DBOI_NAME: + if( pArea->lpNtxIndex ) + { + pIndex = ntxFindIndex( pArea , pInfo->itmOrder ); + if( pIndex ) + { + hb_itemPutC( pInfo->itmResult, pIndex->CompoundTag->TagName ); + return SUCCESS; + } + } + hb_itemPutC( pInfo->itmResult, "" ); + break; case DBOI_BAGEXT: hb_itemPutC( pInfo->itmResult, ".ntx" ); break;