From a28c708abc088b820c9b8168c2f9dcfb0b4393aa Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Sat, 27 Oct 2001 16:15:08 +0000 Subject: [PATCH] 2001-10-27 20:15 GMT+3 Alexander Kresin --- harbour/ChangeLog | 6 ++++++ harbour/source/pp/pplib.c | 3 +++ harbour/source/rdd/dbfntx/dbfntx1.c | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index afcc372d2b..bbebd69d3d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +2001-10-27 20:15 GMT+3 Alexander Kresin + * source/rdd/dbfntx1.c + * logical index support added ( code posted by Matteo Baccan ) + ! source/pp/pplib.c + ! bug fixed in __pp_free() function + 2001-10-27 06:50 GMT -3 Luiz Rafael Culik * hb_slex.vc * Make file sincronized with makefile.vc thanks to Ron Pinkas forn this file update diff --git a/harbour/source/pp/pplib.c b/harbour/source/pp/pplib.c index 65e1ffcb35..b8e4cc6e52 100644 --- a/harbour/source/pp/pplib.c +++ b/harbour/source/pp/pplib.c @@ -186,7 +186,10 @@ HB_FUNC( __PP_FREE ) hb_pp_Free(); if( hb_pp_aCondCompile ) + { hb_xfree( hb_pp_aCondCompile ); + hb_pp_aCondCompile = NULL; + } } HB_FUNC( __PPADDRULE ) diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index 3b0e7e22f7..1e12f38544 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -380,6 +380,11 @@ static void hb_ntxGetCurrentKey( LPTAGINFO pTag, LPKEYINFO pKey ) hb_itemGetDS( &hb_stack.Return, szBuffer ); hb_itemPutC( pKey->pItem,szBuffer ); break; + case HB_IT_LOGICAL: + szBuffer[0] = ( hb_itemGetL( &hb_stack.Return ) ? 'T':'F' ); + szBuffer[1] = 0; + hb_itemPutC( pKey->pItem, szBuffer ); + break; } } else @@ -401,6 +406,11 @@ static void hb_ntxGetCurrentKey( LPTAGINFO pTag, LPKEYINFO pKey ) hb_itemGetDS( hb_stackItemFromTop( - 1 ), szBuffer ); hb_itemPutC( pKey->pItem,szBuffer ); break; + case HB_IT_LOGICAL: + szBuffer[0] = ( hb_itemGetL( hb_stackItemFromTop( - 1 ) ) ? 'T' : 'F' ); + szBuffer[1] = 0; + hb_itemPutC( pKey->pItem, szBuffer ); + break; } hb_stackPop(); } @@ -873,6 +883,8 @@ static int hb_ntxItemCompare( PHB_ITEM pKey1, PHB_ITEM pKey2, BOOL Exact ) case HB_IT_DATE: iResult = hb_itemGetDL( pKey1 ) - hb_itemGetDL( pKey2 ); break; + case HB_IT_LOGICAL: + break; */ default: iResult = 0; @@ -1794,6 +1806,11 @@ static ERRCODE hb_ntxIndexCreate( LPNTXINDEX pIndex ) hb_itemGetDS( pItem, szBuffer ); hb_ntxSortKeyAdd( pTag, &sortInfo, szBuffer ); break; + case HB_IT_LOGICAL: + szBuffer[0] = ( hb_itemGetL( pItem ) ? 'T' : 'F' ); + szBuffer[1] = 0; + hb_ntxSortKeyAdd( pTag, &sortInfo, szBuffer ); + break; default: printf( "ntxCreateOrder" ); } @@ -2114,6 +2131,11 @@ static ERRCODE ntxSeek( NTXAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin hb_itemGetDS( pKey, szBuffer ); hb_itemPutC( pKey2->pItem,szBuffer ); break; + case HB_IT_LOGICAL: + szBuffer[0] = ( hb_itemGetL( pKey ) ? 'T' : 'F' ); + szBuffer[1] = 0; + hb_itemPutC( pKey2->pItem, szBuffer ); + break; } /* hb_itemCopy( pKey2->pItem, pKey ); */ if ( bFindLast )