2001-06-12 11:59 UTC-0800 Brian Hays <bhays@abacuslaw.com>

This commit is contained in:
Brian Hays
2001-06-13 07:00:51 +00:00
parent 5037695b15
commit 061ae91293
3 changed files with 52 additions and 23 deletions

View File

@@ -1,3 +1,14 @@
2001-06-12 11:59 UTC-0800 Brian Hays <bhays@abacuslaw.com>
* contrib/rdd_ads/ads1.c
* fixed subIndexing.
* source/rdd/dbcmd.c
* Fixed __dbLocate.
When it skipped to EOF, it didn't exit immediately and
evaluated the FOR condition on the phantom record. If it passed that
test, Found() was set to True even at EOF!
2001-06-12 19:10 UTC-0400 David G. Holm <dholm@jsd-llc.com>
* source/rtl/net.c

View File

@@ -1479,6 +1479,7 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
PHB_ITEM pExprItem = pOrderInfo->abExpr;
UNSIGNED16 pus16 = 0;
UNSIGNED8 pucWhile[ (ADS_MAX_KEY_LENGTH * 2) + 3 ];
UNSIGNED16 pusLen = ADS_MAX_KEY_LENGTH;
HB_TRACE(HB_TR_DEBUG, ("adsOrderCreate(%p, %p)", pArea, pOrderInfo));
@@ -1508,7 +1509,8 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
secondary bags before creating temp indexes with USECURRENT
*/
AdsGetKeyType(pArea->hOrdCurrent, &pus16);
strcpy(pucWhile, (UCHAR*)hb_itemGetCPtr( pExprItem ) );
AdsGetIndexExpr( pArea->hOrdCurrent, pucWhile, &pusLen);
pucWhile[pusLen] = 0;
if ( pus16 == ADS_STRING ) /* add quotation marks around the key */
{
strcat(pucWhile, "<=\"");

View File

@@ -1388,12 +1388,13 @@ HB_FUNC( __DBLOCATE )
return;
}
( ( AREAP ) s_pCurrArea->pArea )->fFound = FALSE;
memset( &pScopeInfo, 0, sizeof( DBSCOPEINFO ) );
pFor = hb_param( 1, HB_IT_BLOCK );
pWhile = hb_param( 2, HB_IT_BLOCK );
pNext = hb_param( 3, HB_IT_NUMERIC );
pRecord = hb_param( 4, HB_IT_NUMERIC );
pRest = hb_param( 5, HB_IT_LOGICAL );
pFor = hb_param( 1, HB_IT_BLOCK );
pWhile = hb_param( 2, HB_IT_BLOCK );
pNext = hb_param( 3, HB_IT_NUMERIC );
pRecord = hb_param( 4, HB_IT_NUMERIC );
pRest = hb_param( 5, HB_IT_LOGICAL );
pNewRest = NULL;
if( pWhile )
{
@@ -1445,14 +1446,19 @@ HB_FUNC( __DBLOCATE )
while( !( ( AREAP ) s_pCurrArea->pArea )->fEof && lNext-- > 0 && bWhile && !bFor )
{
SELF_SKIP( ( AREAP ) s_pCurrArea->pArea, 1 );
if( hb_itemType( pWhile ) == HB_IT_BLOCK )
bWhile = hb_itemGetL( hb_vmEvalBlock( pWhile ) );
if( ( ( AREAP ) s_pCurrArea->pArea )->fEof )
bFor = FALSE;
else
bWhile = TRUE;
if( hb_itemType( pNewFor ) == HB_IT_BLOCK )
bFor = hb_itemGetL( hb_vmEvalBlock( pNewFor ) );
else
bFor = hb_itemGetL( pNewFor );
{
if( hb_itemType( pWhile ) == HB_IT_BLOCK )
bWhile = hb_itemGetL( hb_vmEvalBlock( pWhile ) );
else
bWhile = TRUE;
if( hb_itemType( pNewFor ) == HB_IT_BLOCK )
bFor = hb_itemGetL( hb_vmEvalBlock( pNewFor ) );
else
bFor = hb_itemGetL( pNewFor );
}
}
( ( AREAP ) s_pCurrArea->pArea )->fFound = bFor;
}
@@ -1471,14 +1477,19 @@ HB_FUNC( __DBLOCATE )
while( !( ( AREAP ) s_pCurrArea->pArea )->fEof && bWhile && !bFor )
{
SELF_SKIP( ( AREAP ) s_pCurrArea->pArea, 1 );
if( hb_itemType( pWhile ) == HB_IT_BLOCK )
bWhile = hb_itemGetL( hb_vmEvalBlock( pWhile ) );
if( ( ( AREAP ) s_pCurrArea->pArea )->fEof )
bFor = FALSE;
else
bWhile = TRUE;
if( hb_itemType( pNewFor ) == HB_IT_BLOCK )
bFor = hb_itemGetL( hb_vmEvalBlock( pNewFor ) );
else
bFor = hb_itemGetL( pNewFor );
{
if( hb_itemType( pWhile ) == HB_IT_BLOCK )
bWhile = hb_itemGetL( hb_vmEvalBlock( pWhile ) );
else
bWhile = TRUE;
if( hb_itemType( pNewFor ) == HB_IT_BLOCK )
bFor = hb_itemGetL( hb_vmEvalBlock( pNewFor ) );
else
bFor = hb_itemGetL( pNewFor );
}
}
( ( AREAP ) s_pCurrArea->pArea )->fFound = bFor;
}
@@ -1494,10 +1505,15 @@ HB_FUNC( __DBLOCATE )
while( !( ( AREAP ) s_pCurrArea->pArea )->fEof && !bFor )
{
SELF_SKIP( ( AREAP ) s_pCurrArea->pArea, 1 );
if( hb_itemType( pNewFor ) == HB_IT_BLOCK )
bFor = hb_itemGetL( hb_vmEvalBlock( pNewFor ) );
if( ( ( AREAP ) s_pCurrArea->pArea )->fEof )
bFor = FALSE;
else
bFor = hb_itemGetL( pNewFor );
{
if( hb_itemType( pNewFor ) == HB_IT_BLOCK )
bFor = hb_itemGetL( hb_vmEvalBlock( pNewFor ) );
else
bFor = hb_itemGetL( pNewFor );
}
}
( ( AREAP ) s_pCurrArea->pArea )->fFound = bFor;
}