From aab90a31b834bcccf2e55c1777f48d0beb7884c7 Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Fri, 7 Dec 2001 08:21:05 +0000 Subject: [PATCH] 2001-12-07 22:20 GMT+3 Alexander Kresin --- harbour/ChangeLog | 4 ++++ harbour/source/rdd/dbfntx/dbfntx1.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0c27c20540..64c0863780 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +2001-12-07 22:20 GMT+3 Alexander Kresin + * source/rdd/dbfntx/dbfntx1.c + * Added support for Deleted() function in index adn condition expressions + 2001-12-06 22:40 GMT-3 Luiz Rafael Culik ! Fixed write and read operations returning -1 ! fixed an small bug when using multiple -D switch diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index 6a6877f701..30edba19fd 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -1714,6 +1714,7 @@ static void hb_ntxReadBuf( NTXAREAP pArea, BYTE* readBuffer, USHORT* numRecinBuf hb_fsReadLarge( pArea->hDataFile, readBuffer, pArea->uiRecordLen * 10 ); pArea->pRecord = readBuffer + (*numRecinBuf) * pArea->uiRecordLen; + pArea->fDeleted = ( pArea->pRecord[ 0 ] == '*' ); (*numRecinBuf) ++; } @@ -1735,6 +1736,7 @@ static ERRCODE hb_ntxIndexCreate( LPNTXINDEX pIndex ) BYTE* readBuffer; USHORT numRecinBuf = 0; BYTE * pRecordTmp; + BOOL fValidBuffer; ulRecCount = pIndex->Owner->ulRecCount; pArea = pIndex->Owner; @@ -1755,6 +1757,8 @@ static ERRCODE hb_ntxIndexCreate( LPNTXINDEX pIndex ) } pRecordTmp = pArea->pRecord; + fValidBuffer = pArea->fValidBuffer; + pArea->fValidBuffer = TRUE; hb_fsSeek( pArea->hDataFile, pArea->uiHeaderLen, FS_SET ); for( ulRecNo = 1; ulRecNo <= ulRecCount; ulRecNo++) { @@ -1816,6 +1820,7 @@ static ERRCODE hb_ntxIndexCreate( LPNTXINDEX pIndex ) } } pArea->pRecord = pRecordTmp; + pArea->fValidBuffer = fValidBuffer; hb_fsSeek( pTag->Owner->DiskFile, 1024, FS_SET ); hb_ntxBufferSave( pTag, &sortInfo ); hb_xfree( sortInfo.sortBuffer );