diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c6fe31d82a..e4e5ff1b48 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2001-11-28 12:57 GMT-3 Horacio Roldan + * include/hbrddcdx.h + * source/rdd/dbfcdx/dbfcdx1.c + * begin support of pack + 2001-11-26 22:55 GMT+1 JFL (mafact) * harbour/source/vm/classes.c * Freezed ('remed') scoping due to a small bug wich could always diff --git a/harbour/include/hbrddcdx.h b/harbour/include/hbrddcdx.h index 0744ad3a34..f3db619db6 100644 --- a/harbour/include/hbrddcdx.h +++ b/harbour/include/hbrddcdx.h @@ -407,7 +407,8 @@ extern ERRCODE hb_cdxOpen( CDXAREAP pArea, LPDBOPENINFO pOpenInfo ); extern ERRCODE hb_cdxStructSize( CDXAREAP pArea, USHORT * uiSize ); extern ERRCODE hb_cdxSysName( CDXAREAP pArea, BYTE * pBuffer ); #define hb_cdxEval NULL -#define hb_cdxPack NULL +/* #define hb_cdxPack NULL */ +extern ERRCODE hb_cdxPack ( CDXAREAP pArea ); #define hb_cdxPackRec NULL #define hb_cdxSort NULL #define hb_cdxTrans NULL @@ -461,4 +462,4 @@ extern ERRCODE hb_cdxWriteDBHeader( CDXAREAP pArea ); } #endif -#endif /* HB_RDDCDX_H_ */ +#endif /* HB_RDDCDX_H_ */ \ No newline at end of file diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index b5a41b987b..82dc7bf04d 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -4872,4 +4872,22 @@ ERRCODE hb_cdxGoCold( CDXAREAP pArea ) if( SUPER_GOCOLD( ( AREAP ) pArea ) == FAILURE ) return FAILURE; return SUCCESS; +} + +extern ERRCODE hb_cdxPack ( CDXAREAP pArea ) +{ + HB_TRACE(HB_TR_DEBUG, ("nb_cdxPack(%p)", pArea )); + + /* Commit changes first */ + if( SELF_GOCOLD( ( AREAP ) pArea ) == FAILURE ) + return FAILURE; + + if( SUPER_PACK( ( AREAP ) pArea ) == SUCCESS ) + { + hb_cdxOrderListClear( pArea ); + /* return hb_cdxOrderListRebuild( pArea ); */ + return TRUE; + } + else + return FAILURE; } \ No newline at end of file