diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c13d9f8018..98ba5d47bc 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -7,6 +7,13 @@ For example: 2002-12-01 23:12 UTC+0100 Foo Bar */ + SET CFLAGS=-DHB_TR_LEVEL_DEBUG + it's equal to + SET CFLAGS=-DHB_TR_LEVEL_DEBUG=5 // Not permited in DOS &WIN + +2002-03-22 15:02 UTC-0300 Walter Negro + * source/rtl/tget.prg + ! Fix ::unTransform() for numeric Get with complex Picture. 2002-03-21 20:47 UTC+0300 Alexander Kresin * source/rdd/dbfntx/dbfntx1.c diff --git a/harbour/include/hbrddntx.h b/harbour/include/hbrddntx.h index 650e2d1bb7..badc95d73a 100644 --- a/harbour/include/hbrddntx.h +++ b/harbour/include/hbrddntx.h @@ -88,9 +88,6 @@ extern "C" { #define PREV_RECORD 3 #define NEXT_RECORD 4 -#define NTX_MAX_REC_NUM 0x7FFFFFFFL -#define NTX_IGNORE_REC_NUM -1 - #define NTX_MAX_KEY 256 /* Max len of key */ #define NTXBLOCKSIZE 1024 /* Size of block in NTX file */ diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index 67958fddaa..499367a67b 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -89,7 +89,7 @@ static LPKEYINFO hb_ntxKeyNew( LPKEYINFO pKeyFrom ); static void hb_ntxKeyFree( LPKEYINFO pKey ); static LONG hb_ntxTagKeyFind( LPTAGINFO pTag, LPKEYINFO pKey, BOOL* result ); static BOOL ntxIsRecBad( NTXAREAP pArea, LONG ulRecNo ); -static int hb_ntxTagFindCurrentKey( LPPAGEINFO pPage, LONG lBlock, LPKEYINFO pKey, BOOL bExact, BOOL lSeek, int level ); +static int hb_ntxTagFindCurrentKey( LPPAGEINFO pPage, LPKEYINFO pKey, BOOL bExact, BOOL lSeek, int level ); static USHORT hb_ntxPageFindCurrentKey( LPPAGEINFO pPage, ULONG ulRecno ); static void hb_ntxGetCurrentKey( LPTAGINFO pTag, LPKEYINFO pKey ); static BOOL hb_ntxPageReadNextKey( LPTAGINFO pTag, BOOL lContinue ); @@ -286,7 +286,7 @@ static LONG hb_ntxTagKeyFind( LPTAGINFO pTag, LPKEYINFO pKey, BOOL * result ) pTag->CurKeyInfo->Tag = 0; pTag->TagBOF = pTag->TagEOF = *result = FALSE; - K = hb_ntxTagFindCurrentKey( hb_ntxPageLoad( pTag->Owner,0 ), pKey->Tag, pKey, FALSE, TRUE, 1 ); + K = hb_ntxTagFindCurrentKey( hb_ntxPageLoad( pTag->Owner,0 ), pKey, FALSE, TRUE, 1 ); if( K == 0 ) { *result = TRUE; @@ -374,7 +374,7 @@ static USHORT hb_ntxGetKeyType( LPTAGINFO pTag ) } } -static int hb_ntxTagFindCurrentKey( LPPAGEINFO pPage, LONG lBlock, LPKEYINFO pKey, BOOL bExact, BOOL lSeek, int level ) +static int hb_ntxTagFindCurrentKey( LPPAGEINFO pPage, LPKEYINFO pKey, BOOL bExact, BOOL lSeek, int level ) { int k = 1, kChild; LPKEYINFO p; @@ -397,15 +397,6 @@ static int hb_ntxTagFindCurrentKey( LPPAGEINFO pPage, LONG lBlock, LPKEYINFO pKe /* k > 0 : pKey->pItem > p->pItem */ if( !pPage->TagParent->AscendKey ) k = -k; - if( k == 0 && lBlock == NTX_MAX_REC_NUM ) - k = 1; - if( k == 0 && lBlock != NTX_IGNORE_REC_NUM ) - { - if( lBlock > p->Xtra ) - k = 1; - else if( lBlock < p->Xtra ) - k = -1; - } } if( k <= 0 ) /* pKey <= p */ @@ -443,7 +434,7 @@ static int hb_ntxTagFindCurrentKey( LPPAGEINFO pPage, LONG lBlock, LPKEYINFO pKe pPage->TagParent->keyNext = pPage->CurKey; } pChildPage = hb_ntxPageLoad( pPage->TagParent->Owner,p->Tag ); - kChild = hb_ntxTagFindCurrentKey( pChildPage, lBlock, pKey, bExact, lSeek, level + 1 ); + kChild = hb_ntxTagFindCurrentKey( pChildPage, pKey, bExact, lSeek, level + 1 ); if( k != 0 || kChild == 0 ) k = kChild; if( k > 0 ) @@ -454,13 +445,6 @@ static int hb_ntxTagFindCurrentKey( LPPAGEINFO pPage, LONG lBlock, LPKEYINFO pKe pPage->TagParent->keyNext = keyNext; } } - else if( k == 0 && lBlock != NTX_IGNORE_REC_NUM ) - { - if( lBlock > p->Tag ) - k = 1; - else if( lBlock < p->Tag ) - k = -1; - } } if( k > 0 ) pPage->CurKey++; @@ -589,8 +573,7 @@ static BOOL hb_ntxPageReadNextKey( LPTAGINFO pTag, BOOL lContinue ) } else hb_ntxGetCurrentKey( pTag,pKey ); - pKey->Tag = NTX_IGNORE_REC_NUM; - seekRes = hb_ntxTagFindCurrentKey( hb_ntxPageLoad( pTag->Owner,0 ), pKey->Tag, pKey, FALSE, FALSE, 1 ); + seekRes = hb_ntxTagFindCurrentKey( hb_ntxPageLoad( pTag->Owner,0 ), pKey, FALSE, FALSE, 1 ); hb_ntxKeyFree( pKey ); if( seekRes ) { @@ -682,8 +665,7 @@ static BOOL hb_ntxPageReadPrevKey( LPTAGINFO pTag, BOOL lContinue ) } else hb_ntxGetCurrentKey( pTag, pKey ); - pKey->Tag = NTX_IGNORE_REC_NUM; - seekRes = hb_ntxTagFindCurrentKey( hb_ntxPageLoad( pTag->Owner,0 ), pKey->Tag, pKey, FALSE, FALSE, 1 ); + seekRes = hb_ntxTagFindCurrentKey( hb_ntxPageLoad( pTag->Owner,0 ), pKey, FALSE, FALSE, 1 ); hb_ntxKeyFree( pKey ); if( seekRes ) { @@ -2477,11 +2459,6 @@ static ERRCODE ntxSeek( NTXAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin hb_ntxKeyFree( pKey2 ); return hb_ntxGoEof( pArea ); } - /* if ( bFindLast ) - pKey2->Tag = NTX_MAX_REC_NUM; - else - */ - pKey2->Tag = NTX_IGNORE_REC_NUM; pKey2->Xtra = 0; if( pArea->fShared ) @@ -2496,7 +2473,6 @@ static ERRCODE ntxSeek( NTXAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin hb_IncString( pKey2->pItem->item.asString.value, pKey2->pItem->item.asString.length ); - pKey2->Tag = NTX_IGNORE_REC_NUM; lRecnoLast = hb_ntxTagKeyFind( pTag, pKey2, &result ); hb_ntxKeyFree( pKey2 ); if( lRecnoLast > 0 ) @@ -2696,8 +2672,7 @@ static ERRCODE ntxGoCold( NTXAREAP pArea ) { hb_itemCopy( pKeyOld->pItem, pTag->CurKeyInfo->pItem ); pKeyOld->Xtra = pTag->CurKeyInfo->Xtra; - pKeyOld->Tag = NTX_IGNORE_REC_NUM; - if( hb_ntxTagFindCurrentKey( hb_ntxPageLoad( pTag->Owner,0 ), pKeyOld->Tag, pKeyOld, FALSE, FALSE, 1 ) ) + if( hb_ntxTagFindCurrentKey( hb_ntxPageLoad( pTag->Owner,0 ), pKeyOld, FALSE, FALSE, 1 ) ) { printf( "\n\rntxGoCold: Cannot find current key:" ); lpIndex = lpIndex->pNext; @@ -3577,7 +3552,6 @@ HB_FUNC(_DBFNTX ) { } - HB_FUNC( DBFNTX_GETFUNCTABLE ) { RDDFUNCS * pTable; diff --git a/harbour/source/vm/runner.c b/harbour/source/vm/runner.c index ec4bfb0bc8..a3e6cffaf5 100644 --- a/harbour/source/vm/runner.c +++ b/harbour/source/vm/runner.c @@ -408,6 +408,7 @@ PHRB_BODY hb_hrbLoad( char* szHrb ) hb_hrbFileClose( file ); } + hb_vmProcessSymbols( pHrbBody->pSymRead, ( USHORT ) pHrbBody->ulSymbols ); return pHrbBody; } @@ -417,8 +418,6 @@ void hb_hrbDo( PHRB_BODY pHrbBody, int argc, char * argv[] ) ULONG ul; int i; - hb_vmProcessSymbols( pHrbBody->pSymRead, ( USHORT ) pHrbBody->ulSymbols ); - /* Initialize static variables first */ for( ul = 0; ul < pHrbBody->ulSymbols; ul++ ) /* Check INIT functions */