2009-04-10 22:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbqt/Makefile
* added /usr/include to list of directories scanned for QT header files
* harbour/contrib/hbole/olecore.c
! added missing return
* formatting and minor cleanup
* harbour/source/vm/arrays.c
* formatting
* harbour/source/vm/asort.c
! minor CA-Cl*pper compatibility fix - if sort codeblock returns
numeric value then it should be used as logical one (0 means FALSE)
* harbour/include/hbstack.h
* harbour/source/vm/estack.c
+ added macro to force static hb_stack declaration even if
HB_STACK_MACROS is internally used
* harbour/source/vm/initsymb.c
* harbour/source/vm/hashfunc.c
* harbour/source/vm/evalhb.c
* harbour/source/vm/pcount.c
* harbour/source/vm/runner.c
* harbour/source/vm/debug.c
* harbour/source/vm/pvalue.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/proc.c
* harbour/source/vm/eval.c
* harbour/source/vm/dynlibhb.c
* do not use hbvmopt.h if it's not necessary or use hbvmint.h instead
to clean all direct references to hb_stack variable
This commit is contained in:
@@ -8,6 +8,40 @@
|
||||
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2009-04-10 22:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/contrib/hbqt/Makefile
|
||||
* added /usr/include to list of directories scanned for QT header files
|
||||
|
||||
* harbour/contrib/hbole/olecore.c
|
||||
! added missing return
|
||||
* formatting and minor cleanup
|
||||
|
||||
* harbour/source/vm/arrays.c
|
||||
* formatting
|
||||
|
||||
* harbour/source/vm/asort.c
|
||||
! minor CA-Cl*pper compatibility fix - if sort codeblock returns
|
||||
numeric value then it should be used as logical one (0 means FALSE)
|
||||
|
||||
* harbour/include/hbstack.h
|
||||
* harbour/source/vm/estack.c
|
||||
+ added macro to force static hb_stack declaration even if
|
||||
HB_STACK_MACROS is internally used
|
||||
|
||||
* harbour/source/vm/initsymb.c
|
||||
* harbour/source/vm/hashfunc.c
|
||||
* harbour/source/vm/evalhb.c
|
||||
* harbour/source/vm/pcount.c
|
||||
* harbour/source/vm/runner.c
|
||||
* harbour/source/vm/debug.c
|
||||
* harbour/source/vm/pvalue.c
|
||||
* harbour/source/vm/cmdarg.c
|
||||
* harbour/source/vm/proc.c
|
||||
* harbour/source/vm/eval.c
|
||||
* harbour/source/vm/dynlibhb.c
|
||||
* do not use hbvmopt.h if it's not necessary or use hbvmint.h instead
|
||||
to clean all direct references to hb_stack variable
|
||||
|
||||
2009-04-10 08:00 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* harbour/contrib/hbqt/generator/hbqtgen.prg
|
||||
- Removed WIN specific castings.
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
|
||||
#include "hbwinole.h"
|
||||
|
||||
/* base date value in OLE (1899-12-30) as julian day */
|
||||
#define HB_OLE_DATE_BASE 0x0024D9AB
|
||||
|
||||
static PHB_DYNS s_pDyns_hb_oleauto;
|
||||
static PHB_DYNS s_pDyns_hObjAccess;
|
||||
static PHB_DYNS s_pDyns_hObjAssign;
|
||||
@@ -185,12 +188,12 @@ static void hb_oleItemToVariant( VARIANT* pVariant, PHB_ITEM pItem )
|
||||
|
||||
case HB_IT_DATE:
|
||||
pVariant->n1.n2.vt = VT_DATE;
|
||||
pVariant->n1.n2.n3.dblVal = ( double ) ( hb_itemGetDL( pItem ) - 0x0024D9AB );
|
||||
pVariant->n1.n2.n3.dblVal = ( double ) ( hb_itemGetDL( pItem ) - HB_OLE_DATE_BASE );
|
||||
break;
|
||||
|
||||
case HB_IT_TIMESTAMP:
|
||||
pVariant->n1.n2.vt = VT_DATE;
|
||||
pVariant->n1.n2.n3.dblVal = hb_itemGetTD( pItem ) - 0x0024D9AB;
|
||||
pVariant->n1.n2.n3.dblVal = hb_itemGetTD( pItem ) - HB_OLE_DATE_BASE;
|
||||
break;
|
||||
|
||||
case HB_IT_OBJECT:
|
||||
@@ -318,7 +321,7 @@ void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant )
|
||||
{
|
||||
long lJulian, lMilliSec;
|
||||
|
||||
hb_timeStampUnpackDT( pVariant->n1.n2.n3.dblVal + 0x0024D9AB, &lJulian, &lMilliSec );
|
||||
hb_timeStampUnpackDT( pVariant->n1.n2.n3.dblVal + HB_OLE_DATE_BASE, &lJulian, &lMilliSec );
|
||||
if( lMilliSec )
|
||||
hb_itemPutTDT( pItem, lJulian, lMilliSec );
|
||||
else
|
||||
@@ -412,13 +415,12 @@ HB_FUNC( OLECREATEOBJECT ) /* ( cOleName | cCLSID [, cIID ] ) */
|
||||
}
|
||||
|
||||
if( lOleError == S_OK )
|
||||
lOleError = CoCreateInstance( HB_ID_REF( ClassID ), NULL, CLSCTX_SERVER, fIID ? HB_ID_REF( iid ) : HB_ID_REF( IID_IDispatch ), ( void** ) &pDisp );
|
||||
lOleError = CoCreateInstance( HB_ID_REF( ClassID ), NULL, CLSCTX_SERVER, fIID ? HB_ID_REF( iid ) : HB_ID_REF( IID_IDispatch ), ( void** ) ( void * ) &pDisp );
|
||||
}
|
||||
else
|
||||
lOleError = CO_E_CLASSSTRING;
|
||||
|
||||
hb_setOleError( lOleError );
|
||||
|
||||
ppDisp = ( IDispatch** ) hb_gcAlloc( sizeof( IDispatch* ), hb_ole_destructor );
|
||||
*ppDisp = pDisp;
|
||||
hb_retptrGC( ppDisp );
|
||||
@@ -468,7 +470,7 @@ HB_FUNC( OLEGETACTIVEOBJECT ) /* ( cOleName | cCLSID [, cIID ] ) */
|
||||
|
||||
if ( lOleError == S_OK )
|
||||
#if HB_OLE_C_API
|
||||
lOleError = pUnk->lpVtbl->QueryInterface( pUnk, fIID ? &iid : &IID_IDispatch, ( void** ) &pDisp );
|
||||
lOleError = pUnk->lpVtbl->QueryInterface( pUnk, fIID ? &iid : &IID_IDispatch, ( void** ) ( void * ) &pDisp );
|
||||
#else
|
||||
lOleError = pUnk->QueryInterface( fIID ? iid : IID_IDispatch, ( void** ) &pDisp );
|
||||
#endif
|
||||
@@ -502,11 +504,11 @@ HB_FUNC( OLERELEASE )
|
||||
*ppDisp = NULL;
|
||||
hb_retl( TRUE );
|
||||
}
|
||||
else
|
||||
hb_retl( FALSE );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
|
||||
hb_retl( FALSE );
|
||||
}
|
||||
|
||||
|
||||
@@ -564,6 +566,8 @@ HB_FUNC( HB_OLEAUTO___ONERROR )
|
||||
hb_vmSend( 0 );
|
||||
|
||||
pDisp = hb_oleParam( -1 );
|
||||
if( !pDisp )
|
||||
return;
|
||||
|
||||
szMethod = hb_itemGetSymbol( hb_stackBaseItem() )->szName;
|
||||
szMethodWide = AnsiToWide( szMethod );
|
||||
|
||||
@@ -38,7 +38,7 @@ ifeq ($(HB_WITH_QT),yes)
|
||||
|
||||
ifeq ($(HB_INC_QT),)
|
||||
ifeq ($(HB_XBUILD),)
|
||||
HB_INC_QT = /usr/include/qt4 /Developer/qt/include
|
||||
HB_INC_QT = /usr/include/qt4 /usr/include /Developer/qt/include
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -246,7 +246,11 @@ typedef struct
|
||||
# define hb_stack_ref() ( hb_stack_ptr )
|
||||
# endif
|
||||
# else
|
||||
extern HB_STACK hb_stack;
|
||||
# if defined( HB_STACK_LOCAL_MACROS )
|
||||
static HB_STACK hb_stack;
|
||||
# else
|
||||
extern HB_STACK hb_stack;
|
||||
# endif
|
||||
# define hb_stack_ref() ( &hb_stack )
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -214,7 +214,6 @@ BOOL hb_arraySize( PHB_ITEM pArray, ULONG ulLen )
|
||||
{
|
||||
if( pBaseArray->ulLen < ulLen )
|
||||
{
|
||||
|
||||
if( pBaseArray->ulAllocated < ulLen )
|
||||
{
|
||||
/*
|
||||
@@ -252,8 +251,8 @@ BOOL hb_arraySize( PHB_ITEM pArray, ULONG ulLen )
|
||||
}
|
||||
else if( ulLen < ( pBaseArray->ulAllocated >> 1 ) )
|
||||
{
|
||||
pBaseArray->ulAllocated = ulLen;
|
||||
pBaseArray->pItems = ( PHB_ITEM ) hb_xrealloc( pBaseArray->pItems, sizeof( HB_ITEM ) * ulLen );
|
||||
pBaseArray->ulAllocated = ulLen;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
SORTING AND SEARCHING ALGORITHMS: A COOKBOOK, BY THOMAS NIEMANN
|
||||
http://members.xoom.com/_XMCM/thomasn/s_man.htm */
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmint.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbvm.h"
|
||||
#include "hbstack.h"
|
||||
@@ -75,8 +75,11 @@ static BOOL hb_itemIsLess( PHB_ITEM pItem1, PHB_ITEM pItem2, PHB_ITEM pBlock, PH
|
||||
|
||||
if( pBaseArray->ulLen <= ulLast )
|
||||
return FALSE;
|
||||
else if( HB_IS_LOGICAL( hb_stackReturnItem() ) )
|
||||
return hb_itemGetL( hb_stackReturnItem() );
|
||||
else
|
||||
/* CA-Cl*pper always takes return value as logical item
|
||||
* accepting 0, 1 as numeric representation of FALSE/TRUE
|
||||
*/
|
||||
return hb_parl( -1 );
|
||||
}
|
||||
|
||||
/* Do native compare when no codeblock is supplied */
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
|
||||
#define HB_OS_WIN_USED
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapifs.h"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmint.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbapidbg.h"
|
||||
#include "hbapiitm.h"
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#define HB_OS_WIN_USED
|
||||
#define INCL_DOSMODULEMGR
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmint.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbstack.h"
|
||||
|
||||
@@ -133,9 +133,9 @@
|
||||
#else
|
||||
|
||||
/* no MT mode */
|
||||
# if defined( HB_STACK_MACROS )
|
||||
# if defined( HB_STACK_MACROS ) && !defined( HB_STACK_LOCAL_MACROS )
|
||||
HB_STACK hb_stack;
|
||||
# else
|
||||
# elif !defined( __cplusplus )
|
||||
static HB_STACK hb_stack;
|
||||
# endif
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmint.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbstack.h"
|
||||
#include "hbapiitm.h"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmint.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapierr.h"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmint.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapierr.h"
|
||||
@@ -351,9 +351,11 @@ HB_FUNC( HB_HMERGE )
|
||||
hb_vmPush( pValue );
|
||||
hb_vmPushLong( ulPos );
|
||||
hb_vmSend( 3 );
|
||||
if( HB_IS_LOGICAL( hb_stackReturnItem() ) &&
|
||||
hb_itemGetL( hb_stackReturnItem() ) )
|
||||
hb_hashAdd( pDest, pKey, pValue );
|
||||
{
|
||||
PHB_ITEM pReturn = hb_stackReturnItem();
|
||||
if( HB_IS_LOGICAL( pReturn ) && hb_itemGetL( pReturn ) )
|
||||
hb_hashAdd( pDest, pKey, pValue );
|
||||
}
|
||||
}
|
||||
else
|
||||
break;
|
||||
@@ -435,11 +437,13 @@ HB_FUNC( HB_HSCAN )
|
||||
hb_vmPush( pVal );
|
||||
hb_vmPushLong( ulStart );
|
||||
hb_vmSend( 3 );
|
||||
if( HB_IS_LOGICAL( hb_stackReturnItem() ) &&
|
||||
hb_itemGetL( hb_stackReturnItem() ) )
|
||||
{
|
||||
fFound = TRUE;
|
||||
break;
|
||||
PHB_ITEM pReturn = hb_stackReturnItem();
|
||||
if( HB_IS_LOGICAL( pReturn ) && hb_itemGetL( pReturn ) )
|
||||
{
|
||||
fFound = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbvm.h"
|
||||
|
||||
@@ -193,4 +192,3 @@ void hb_vmSymbolInit_RT( void )
|
||||
|
||||
hb_vmProcessSymbols( symbols, sizeof( symbols ) / sizeof( HB_SYMB ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmint.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbstack.h"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmint.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbapicls.h"
|
||||
#include "hbapiitm.h"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmint.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbstack.h"
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
* HB_HRBGETFUNSYM()
|
||||
*/
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmint.h"
|
||||
#include "hbapi.h"
|
||||
#include "hbstack.h"
|
||||
#include "hbapiitm.h"
|
||||
|
||||
Reference in New Issue
Block a user