diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d2a11b22fe..fce8300f0b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,15 +8,26 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ + Authors of RDDs which do not allow to create tables without fields + should add to their low level RDD code necessary RT error. + +2006-04-14 20:51 UTC+0100 Jacek Kubica (kubica/at/wssk.wroc.pl) + * source/rtl/filesys.c + ! fixed problem in CURDIR() wchich return truncate value + if directory name is 3 chars long (fix given by Przemyslaw Czerpak) + +2006-04-10 00:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rdd/dbfntx/dbfntx1.c + ! fixed skip back after updating last record 2006-04-09 19:16 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rdd/dbfcdx/dbfcdx1.c ! fixed scope checking when skip is done from the record which dos not exist in index - * xharbour/source/rdd/dbfcdx/dbfcdx1.c + * harbour/source/vm/classes.c * use hb_itemClone() - it will save us modifications in the - * xharbour/source/rdd/dbfntx/dbfntx1.c + future if we will add new items which will be passed as parameters like arrays (f.e. hashes) * some source code formatting @@ -874,8 +885,8 @@ and use them in some GTs. * harbour/source/rtl/gx.c - * xharbour/contrib/rdd_ads/ads1.c - * xharbour/contrib/rdd_ads/adsfunc.c + * use screen dimensions as default values for SETMODE() not maxrow()/ + maxcol() * harbour/source/rtl/gtxwc/gtxwc.c * harbour/source/rtl/gtxwc/gtxwc.h diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index 8e41e675ba..fb507d997e 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -5134,9 +5134,11 @@ static ERRCODE hb_cdxDBOISkipUnique( CDXAREAP pArea, LPCDXTAG pTag, BOOL fForwar hb_cdxTagRefreshScope( pTag ); if ( ! hb_cdxCurKeyRefresh( pArea, pTag ) ) { - if ( pTag->TagEOF ) + if ( pTag->TagEOF || ( fForward ? !hb_cdxBottomScope( pTag ) : + !hb_cdxTopScope( pTag ) ) ) fOut = TRUE; - else if ( ( fForward ? pTag->UsrAscend : !pTag->UsrAscend ) && + else if ( ( fForward ? pTag->UsrAscend && hb_cdxTopScope( pTag ) : + !pTag->UsrAscend && hb_cdxBottomScope( pTag ) ) && pTag->CurKey->rec != 0 ) { pKey = hb_cdxKeyEval( pKey, pTag ); @@ -5241,7 +5243,8 @@ static BOOL hb_cdxDBOISkipEval( CDXAREAP pArea, LPCDXTAG pTag, BOOL fForward, if ( ! hb_cdxCurKeyRefresh( pArea, pTag ) ) { if ( !pTag->TagEOF && pTag->CurKey->rec != 0 && - ( fForward ? pTag->UsrAscend : !pTag->UsrAscend ) ) + ( fForward ? pTag->UsrAscend : !pTag->UsrAscend ) && + hb_cdxTopScope( pTag ) && hb_cdxBottomScope( pTag ) ) fFirst = FALSE; } if ( fForward ) @@ -5349,7 +5352,8 @@ static BOOL hb_cdxDBOISkipWild( CDXAREAP pArea, LPCDXTAG pTag, BOOL fForward, if ( ! hb_cdxCurKeyRefresh( pArea, pTag ) ) { if ( !pTag->TagEOF && pTag->CurKey->rec != 0 && - ( fForward ? pTag->UsrAscend : !pTag->UsrAscend ) ) + ( fForward ? pTag->UsrAscend : !pTag->UsrAscend ) && + hb_cdxTopScope( pTag ) && hb_cdxBottomScope( pTag ) ) fFirst = FALSE; } @@ -5506,7 +5510,8 @@ static BOOL hb_cdxDBOISkipRegEx( CDXAREAP pArea, LPCDXTAG pTag, BOOL fForward, if ( ! hb_cdxCurKeyRefresh( pArea, pTag ) ) { if ( !pTag->TagEOF && pTag->CurKey->rec != 0 && - ( fForward ? pTag->UsrAscend : !pTag->UsrAscend ) ) + ( fForward ? pTag->UsrAscend : !pTag->UsrAscend ) && + hb_cdxTopScope( pTag ) && hb_cdxBottomScope( pTag ) ) fFirst = FALSE; } if ( fForward ) @@ -6541,22 +6546,22 @@ static ERRCODE hb_cdxSkipRaw( CDXAREAP pArea, LONG lToSkip ) { if ( fForward ) { - if ( pTag->TagEOF ) + if ( pTag->TagEOF || !hb_cdxBottomScope( pTag ) ) fOut = TRUE; - else if ( pTag->UsrAscend ) + else if ( pTag->UsrAscend && hb_cdxTopScope( pTag ) ) lToSkip--; } else if ( pArea->fPositioned ) { - if ( pTag->TagEOF ) + if ( pTag->TagEOF || !hb_cdxTopScope( pTag ) ) fOut = TRUE; - else if ( !pTag->UsrAscend ) + else if ( !pTag->UsrAscend && hb_cdxBottomScope( pTag ) ) lToSkip++; } } if ( fForward ) { - if ( pArea->fPositioned && !fOut ) + if ( !fOut ) { while ( lToSkip-- > 0 ) { @@ -6568,7 +6573,7 @@ static ERRCODE hb_cdxSkipRaw( CDXAREAP pArea, LONG lToSkip ) } } } - retval = SELF_GOTO( ( AREAP ) pArea, ( !pArea->fPositioned || pTag->TagEOF || fOut ) + retval = SELF_GOTO( ( AREAP ) pArea, ( pTag->TagEOF || fOut ) ? 0 : pTag->CurKey->rec ); } else /* if ( lToSkip < 0 ) */ diff --git a/harbour/source/vm/classes.c b/harbour/source/vm/classes.c index 7c186327d7..5eb6f83aa1 100644 --- a/harbour/source/vm/classes.c +++ b/harbour/source/vm/classes.c @@ -823,7 +823,7 @@ char * hb_objGetRealClsName( PHB_ITEM pObject, char * szName ) */ PHB_FUNC hb_objGetMethod( PHB_ITEM pObject, PHB_SYMB pMessage ) { - return hb_objGetMthd( (PHB_ITEM) pObject, (PHB_SYMB) pMessage, TRUE ) ; + return hb_objGetMthd( (PHB_ITEM) pObject, (PHB_SYMB) pMessage, TRUE ) ; } PHB_FUNC hb_objGetMthd( PHB_ITEM pObject, PHB_SYMB pMessage, BOOL lAllowErrFunc ) @@ -836,13 +836,13 @@ PHB_FUNC hb_objGetMthd( PHB_ITEM pObject, PHB_SYMB pMessage, BOOL lAllowErrFunc HB_TRACE(HB_TR_DEBUG, ("hb_objGetMthd(%p, %p)", pObject, pMessage)); if( pObject->type == HB_IT_ARRAY ) - { + { uiClass = pObject->item.asArray.value->uiClass; - } + } else - { + { uiClass = 0; - } + } if( uiClass && uiClass <= s_uiClasses ) { @@ -861,9 +861,9 @@ PHB_FUNC hb_objGetMthd( PHB_ITEM pObject, PHB_SYMB pMessage, BOOL lAllowErrFunc s_pMethod = pMethod ; if( hb_bProfiler ) - { + { pMethod->ulCalls++; /* Profiler */ - } + } return pFunction; } @@ -1152,13 +1152,7 @@ HB_FUNC( __CLSADDMSG ) if( pInit && ! HB_IS_NIL( pInit ) ) /* Initializer found */ { - if( HB_IS_ARRAY( pInit ) ) - pNewMeth->pInitValue = hb_arrayClone( pInit ); - else - { - pNewMeth->pInitValue = hb_itemNew( NULL ); - hb_itemCopy( pNewMeth->pInitValue, pInit ); - } + pNewMeth->pInitValue = hb_itemClone( pInit ); } } break; @@ -1179,13 +1173,7 @@ HB_FUNC( __CLSADDMSG ) if( pInit && ! HB_IS_NIL( pInit ) ) /* Initializer found */ { - if( HB_IS_ARRAY( pInit ) ) - pNewMeth->pInitValue = hb_arrayClone( pInit ); - else - { - pNewMeth->pInitValue = hb_itemNew( NULL ); - hb_itemCopy( pNewMeth->pInitValue, pInit ); - } + pNewMeth->pInitValue = hb_itemClone( pInit ); } } @@ -1436,17 +1424,8 @@ HB_FUNC( __CLSNEW ) if( pSprCls->pMethods[ ui ].pInitValue ) { - PHB_ITEM pInitValue; - - if( HB_IS_ARRAY( pSprCls->pMethods[ ui ].pInitValue ) ) - pNewCls->pMethods[ uiAt + uiBucket ].pInitValue = hb_arrayClone( pSprCls->pMethods[ ui ].pInitValue ); - else - { - pInitValue = hb_itemNew( NULL ); - - hb_itemCopy( pInitValue, pSprCls->pMethods[ ui ].pInitValue ); - pNewCls->pMethods[ uiAt + uiBucket ].pInitValue = pInitValue; - } + pNewCls->pMethods[ uiAt + uiBucket ].pInitValue = + hb_itemClone( pSprCls->pMethods[ ui ].pInitValue ); } break; } @@ -1768,7 +1747,7 @@ HB_FUNC( __OBJCLONE ) PHB_ITEM pDstObject ; if( pSrcObject ) - { + { pDstObject= hb_arrayClone( pSrcObject ) ; /* pDstObject->item.asArray.value->puiClsTree = NULL; */ @@ -1776,7 +1755,7 @@ HB_FUNC( __OBJCLONE ) /* pDstObject->item.asArray.value->puiClsTree[0]=0; */ hb_itemRelease( hb_itemReturn( pDstObject ) ); - } + } else { hb_errRT_BASE( EG_ARG, 3001, NULL, "__OBJCLONE", 0 ); @@ -1893,9 +1872,9 @@ HB_FUNC( __CLSINSTSUPER ) } } else - { + { hb_errRT_BASE( EG_ARG, 3003, "Cannot find super class", "__CLSINSTSUPER", 0 ); - } + } } if( ! bFound ) @@ -2190,16 +2169,13 @@ static HARBOUR hb___msgClsSel( void ) ? pSelf->item.asArray.value->uiClass : 0 ); /* Get class word */ PHB_ITEM pReturn = hb_itemNew( NULL ); + USHORT nParam = HB_MSGLISTALL; + USHORT uiPCount = hb_pcount(); - - USHORT nParam=HB_MSGLISTALL; - - USHORT uiPCount=hb_pcount(); - - if( uiPCount>=1 ) - { - nParam = (USHORT) hb_parni( 1 ); - } + if( uiPCount >= 1 ) + { + nParam = ( USHORT ) hb_parni( 1 ); + } if( ( ! uiClass ) && HB_IS_BYREF( pSelf ) ) { /* Variables by reference */ @@ -2339,7 +2315,7 @@ static HARBOUR hb___msgSuper( void ) pCopy->item.asArray.value->uiClass = s_pMethod->uiSprClass; /* superclass handel casting */ pCopy->item.asArray.value->puiClsTree = NULL ; - hb_itemRelease(hb_itemReturn( pCopy )); + hb_itemRelease( hb_itemReturn( pCopy ) ); } /*