From 700a0c480503d218e008ebc3f9c796c09a48f46a Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 22 Sep 2008 18:55:21 +0000 Subject: [PATCH] 2008-09-22 20:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rdd/dbfntx/dbfntx1.c * harbour/source/rdd/dbfcdx/dbfcdx1.c * do not allow to close production index by ordBagClear() when strict FP compatibility is set for production index or when _SET_AUTOPEN is enabled. It compatible behavior to ordListClear() function --- harbour/ChangeLog | 8 ++++++++ harbour/source/rdd/dbfcdx/dbfcdx1.c | 7 ++++++- harbour/source/rdd/dbfntx/dbfntx1.c | 4 +++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3b1dcee568..d97c13fa94 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,14 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-09-22 20:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rdd/dbfntx/dbfntx1.c + * harbour/source/rdd/dbfcdx/dbfcdx1.c + * do not allow to close production index by ordBagClear() when + strict FP compatibility is set for production index or when + _SET_AUTOPEN is enabled. It compatible behavior to ordListClear() + function + 2008-09-22 20:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/classes.c * harbour/source/rdd/workarea.c diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index ce44caffd8..23656247e5 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -7294,7 +7294,12 @@ static ERRCODE hb_cdxOrderListDelete( CDXAREAP pArea, LPDBORDERINFO pOrderInfo ) hb_cdxCreateFName( pArea, hb_itemGetCPtr( pOrderInfo->atomBagName ), &fProd, szFileName, szTagName ); - pIndex = hb_cdxFindBag( pArea, szFileName ); + + if( fProd && ( CDXAREA_DATA( pArea )->fStrictStruct ? + pArea->fHasTags : hb_setGetAutOpen() ) ) + pIndex = NULL; + else + pIndex = hb_cdxFindBag( pArea, szFileName ); if( pIndex ) { diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index ed89872503..82d15b244e 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -7381,7 +7381,9 @@ static ERRCODE ntxOrderListDelete( NTXAREAP pArea, LPDBORDERINFO pOrderInfo ) szFileName, szTagName ); pIndex = hb_ntxFindBag( pArea, szFileName ); - if( pIndex ) + if( pIndex && !( pIndex->Production && NTXAREA_DATA( pArea )->fStruct && + ( NTXAREA_DATA( pArea )->fStrictStruct ? + pArea->fHasTags : hb_setGetAutOpen() ) ) ) { pIndexPtr = &pArea->lpIndexes; while( *pIndexPtr )