diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5eb8bff610..757f5b8030 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,23 @@ +2000-11-12 15:20 UTC+0100 Ryszard Glab + + *include/hbapirdd.h + *include/hbrddwrk.h + *source/rdd/dbf1.c + *source/rdd/dbfcdx/dbfcdx1.c + *contrib/rdd_ads/ads1.c + *added typedef for setScope member of virtual table + typedef USHORT ( * DBENTRYP_VOS )( AREAP area, LPDBORDSCOPEINFO param ); + + *source/rdd/rddcpy.c + * replaced NULL with 0 + + *source/vm/asort.c + *source/vm/classes.c + *source/vm/hvm.c + *source/vm/itemapi.c + *source/vm/memvars.c + *added initialization of items created on the stack + 2000-11-11 23:35 UTC+0800 Ron Pinkas * contrib/dot/pp.prg ! Corrected few pre-processor bugs. diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index 29f2b114e5..2337911f09 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -1744,7 +1744,7 @@ static RDDFUNCS adsTable = { ( DBENTRYP_BP ) adsBof, ( DBENTRYP_SI ) adsScopeInfo, ( DBENTRYP_VFI ) adsSetFilter, ( DBENTRYP_VLO ) adsSetLocate, - ( DBENTRYP_VP ) adsSetScope, + ( DBENTRYP_VOS ) adsSetScope, ( DBENTRYP_VPL ) adsSkipScope, ( DBENTRYP_P ) adsCompile, ( DBENTRYP_I ) adsError, diff --git a/harbour/include/hbapirdd.h b/harbour/include/hbapirdd.h index 57fb58333c..c5024bbb70 100644 --- a/harbour/include/hbapirdd.h +++ b/harbour/include/hbapirdd.h @@ -631,6 +631,7 @@ typedef USHORT ( * DBENTRYP_VEI )( AREAP area, LPDBEVALINFO param ); typedef USHORT ( * DBENTRYP_VLO )( AREAP area, LPDBSCOPEINFO param ); typedef USHORT ( * DBENTRYP_VOC )( AREAP area, LPDBORDERCREATEINFO param ); typedef USHORT ( * DBENTRYP_VOI )( AREAP area, LPDBORDERCONDINFO param ); +typedef USHORT ( * DBENTRYP_VOS )( AREAP area, LPDBORDSCOPEINFO param ); typedef USHORT ( * DBENTRYP_OI )( AREAP area, LPDBORDERINFO param ); typedef USHORT ( * DBENTRYP_OII )( AREAP area, USHORT index, LPDBORDERINFO param ); typedef USHORT ( * DBENTRYP_SP )( AREAP area, USHORT * param ); @@ -753,7 +754,7 @@ typedef struct _RDDFUNCS DBENTRYP_SI scopeInfo; DBENTRYP_VFI setFilter; DBENTRYP_VLO setLocate; - DBENTRYP_VP setScope; + DBENTRYP_VOS setScope; DBENTRYP_VPL skipScope; diff --git a/harbour/include/hbrddwrk.h b/harbour/include/hbrddwrk.h index 0630f871d6..ef388425d9 100644 --- a/harbour/include/hbrddwrk.h +++ b/harbour/include/hbrddwrk.h @@ -122,7 +122,7 @@ extern ERRCODE hb_waFilterText( AREAP pArea, PHB_ITEM pFilter ); #define hb_waScopeInfo ( DBENTRYP_SI ) hb_waUnsupported extern ERRCODE hb_waSetFilter( AREAP pArea, LPDBFILTERINFO pFilterInfo ); extern ERRCODE hb_waSetLocate( AREAP pArea, LPDBSCOPEINFO pScopeInfo ); -#define hb_waSetScope ( DBENTRYP_VP ) hb_waUnsupported +#define hb_waSetScope ( DBENTRYP_VOS ) hb_waUnsupported #define hb_waSkipScope ( DBENTRYP_VPL ) hb_waUnsupported extern ERRCODE hb_waCompile( AREAP pArea, BYTE * pExpr ); extern ERRCODE hb_waError( AREAP pArea, PHB_ITEM pError ); diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index ababe276fe..38b7de3001 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -147,7 +147,7 @@ static RDDFUNCS dbfTable = { ( DBENTRYP_BP ) hb_dbfBof, ( DBENTRYP_SI ) hb_dbfScopeInfo, ( DBENTRYP_VFI ) hb_dbfSetFilter, ( DBENTRYP_VLO ) hb_dbfSetLocate, - ( DBENTRYP_VP ) hb_dbfSetScope, + ( DBENTRYP_VOS ) hb_dbfSetScope, ( DBENTRYP_VPL ) hb_dbfSkipScope, ( DBENTRYP_P ) hb_dbfCompile, ( DBENTRYP_I ) hb_dbfError, diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index 2b0f48a4fc..00857c028f 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -149,7 +149,7 @@ static RDDFUNCS cdxTable = { ( DBENTRYP_BP ) hb_cdxBof, ( DBENTRYP_SI ) hb_cdxScopeInfo, ( DBENTRYP_VFI ) hb_cdxSetFilter, ( DBENTRYP_VLO ) hb_cdxSetLocate, - ( DBENTRYP_VP ) hb_cdxSetScope, + ( DBENTRYP_VOS ) hb_cdxSetScope, ( DBENTRYP_VPL ) hb_cdxSkipScope, ( DBENTRYP_P ) hb_cdxCompile, ( DBENTRYP_I ) hb_cdxError, diff --git a/harbour/source/rdd/rddcpy.c b/harbour/source/rdd/rddcpy.c index f4c3659c8f..f844b34555 100644 --- a/harbour/source/rdd/rddcpy.c +++ b/harbour/source/rdd/rddcpy.c @@ -68,7 +68,7 @@ static LPAREANODE GetTheOtherArea( char *szDriver, char * szFileName ) if( SELF_OPEN( ( AREAP ) pAreaNode->pArea, &pInfo ) == FAILURE ) { - hb_errRT_DBCMD( EG_OPEN, NULL, NULL, "DBAPP" ); // Could not open it + hb_errRT_DBCMD( EG_OPEN, 0, NULL, "DBAPP" ); // Could not open it SELF_RELEASE( ( AREAP ) pAreaNode->pArea ); hb_xfree( pAreaNode ); return NULL; diff --git a/harbour/source/vm/asort.c b/harbour/source/vm/asort.c index 0fe43b8f76..6b42df0b42 100644 --- a/harbour/source/vm/asort.c +++ b/harbour/source/vm/asort.c @@ -111,6 +111,7 @@ static LONG hb_arraySortQuickPartition( PHB_ITEM pItems, LONG lb, LONG ub, PHB_I if( p != lb ) memcpy( pItems + p, pItems + lb, sizeof( HB_ITEM ) ); #else + hb_itemInit( &pivot ); hb_itemCopy( &pivot, pItems + p ); if( p != lb ) hb_itemCopy( pItems + p, pItems + lb ); @@ -175,6 +176,7 @@ static LONG hb_arraySortQuickPartition( PHB_ITEM pItems, LONG lb, LONG ub, PHB_I memcpy( pItems + j, pItems + i, sizeof( HB_ITEM ) ); memcpy( pItems + i, &temp, sizeof( HB_ITEM ) ); #else + hb_itemInit( &temp ); hb_itemCopy( &temp, pItems + j ); hb_itemCopy( pItems + j, pItems + i ); hb_itemCopy( pItems + i, &temp ); diff --git a/harbour/source/vm/classes.c b/harbour/source/vm/classes.c index af7c56a05a..8905ce6308 100644 --- a/harbour/source/vm/classes.c +++ b/harbour/source/vm/classes.c @@ -1332,6 +1332,7 @@ static PHB_ITEM hb_clsInst( USHORT uiClass, PHB_ITEM * * ppObjects, USHORT * pui HB_ITEM init; PHB_ITEM pInit; + hb_itemInit( &init ); hb_arrayGet( pClass->pClassDatas, pMeth->uiData, &init ); if( init.type == HB_IT_NIL ) { @@ -1417,6 +1418,7 @@ static PHB_ITEM hb_clsInst( USHORT uiClass, PHB_ITEM * * ppObjects, USHORT * pui HB_ITEM init; PHB_ITEM pInit; + hb_itemInit( &init ); hb_arrayGet( pClass->pClassDatas, pMeth->uiData, &init ); if( init.type == HB_IT_NIL ) { @@ -1969,6 +1971,7 @@ static HARBOUR hb___msgEvalInline( void ) USHORT uiParam; USHORT uiPCount=hb_pcount(); + hb_itemInit( &block ); hb_arrayGet( s_pClasses[ uiClass - 1 ].pInlines, s_pMethod->uiData, &block ); hb_vmPushSymbol( &hb_symEval ); diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 28956eaa98..58aa6b1085 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -2486,6 +2486,7 @@ static void hb_vmArrayPush( void ) */ HB_ITEM item; + hb_itemInit( &item ); hb_arrayGet( pArray, ulIndex, &item ); hb_stackPop(); @@ -3133,6 +3134,7 @@ static void hb_vmDebuggerEndProc( void ) HB_TRACE(HB_TR_DEBUG, ("hb_vmDebuggerEndProc()")); + hb_itemInit( &item ); hb_itemCopy( &item, &hb_stack.Return ); /* saves the previous returned value */ s_bDebugShowLines = FALSE; diff --git a/harbour/source/vm/itemapi.c b/harbour/source/vm/itemapi.c index 9baef9cc5b..15b66b2015 100644 --- a/harbour/source/vm/itemapi.c +++ b/harbour/source/vm/itemapi.c @@ -1090,6 +1090,7 @@ void hb_itemSwap( PHB_ITEM pItem1, PHB_ITEM pItem2 ) HB_TRACE(HB_TR_DEBUG, ("hb_itemSwap(%p, %p)", pItem1, pItem2)); + temp.type = HB_IT_NIL; hb_itemCopy( &temp, pItem2 ); hb_itemCopy( pItem2, pItem1 ); hb_itemCopy( pItem1, &temp ); diff --git a/harbour/source/vm/memvars.c b/harbour/source/vm/memvars.c index 2b0a1e22fc..0725c3c6f8 100644 --- a/harbour/source/vm/memvars.c +++ b/harbour/source/vm/memvars.c @@ -910,6 +910,7 @@ HB_FUNC( __MVPUBLIC ) ULONG j, ulLen = hb_arrayLen( pMemvar ); HB_ITEM VarItem; + hb_itemInit( &VarItem ); for( j = 1; j <= ulLen; j++ ) { hb_arrayGet( pMemvar, j, &VarItem ); @@ -945,6 +946,7 @@ HB_FUNC( __MVPRIVATE ) ULONG j, ulLen = hb_arrayLen( pMemvar ); HB_ITEM VarItem; + hb_itemInit( &VarItem ); for( j = 1; j <= ulLen; j++ ) { hb_arrayGet( pMemvar, j, &VarItem ); @@ -980,6 +982,7 @@ HB_FUNC( __MVXRELEASE ) ULONG j, ulLen = hb_arrayLen( pMemvar ); HB_ITEM VarItem; + hb_itemInit( &VarItem ); for( j = 1; j <= ulLen; j++ ) { hb_arrayGet( pMemvar, j, &VarItem ); @@ -1098,6 +1101,8 @@ HB_FUNC( __MVGET ) if( pDynVar ) { HB_ITEM retValue; + + hb_itemInit( &retValue ); hb_memvarGetValue( &retValue, pDynVar->pSymbol ); hb_itemClear( hb_itemReturn( &retValue ) ); } @@ -1121,6 +1126,8 @@ HB_FUNC( __MVGET ) if( pDynVar ) { HB_ITEM retValue; + + hb_itemInit( &retValue ); hb_memvarGetValue( &retValue, pDynVar->pSymbol ); hb_itemClear( hb_itemReturn( &retValue ) ); uiAction = E_DEFAULT;