2002-03-21 15:58 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>

This commit is contained in:
Alexander S.Kresin
2002-03-21 12:57:44 +00:00
parent bb9fb12dd8
commit 0db30aed6b
4 changed files with 15 additions and 38 deletions

View File

@@ -7,6 +7,13 @@
For example:
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
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 <anegro@overnet.com.ar>
* source/rtl/tget.prg
! Fix ::unTransform() for numeric Get with complex Picture.
2002-03-21 20:47 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>
* source/rdd/dbfntx/dbfntx1.c

View File

@@ -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 */

View File

@@ -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;

View File

@@ -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 */