From 2ec4c76d15d19b6d06ea0246475b586b00cf8243 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 18 Mar 2009 10:59:10 +0000 Subject: [PATCH] 2009-03-18 11:58 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * utils/hbmk2/hbmk2.prg ! Enabled lib grouping for minwgce. * include/hbtypes.h * source/vm/maindllp.c * Formatting. --- harbour/ChangeLog | 8 +++ harbour/include/hbtypes.h | 132 +++++++++++++++++----------------- harbour/source/vm/maindllp.c | 126 ++++++++++++++++---------------- harbour/utils/hbmk2/hbmk2.prg | 2 +- 4 files changed, 137 insertions(+), 131 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7d9df3fa8f..c4306a8fb6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,14 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-18 11:58 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * utils/hbmk2/hbmk2.prg + ! Enabled lib grouping for minwgce. + + * include/hbtypes.h + * source/vm/maindllp.c + * Formatting. + 2009-03-18 10:09 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * contrib/hbsqlit3/tests/blob.prg * contrib/hbsqlit3/tests/pack.prg diff --git a/harbour/include/hbtypes.h b/harbour/include/hbtypes.h index 1e615f0320..276370b8f9 100644 --- a/harbour/include/hbtypes.h +++ b/harbour/include/hbtypes.h @@ -73,73 +73,73 @@ typedef void ( * VM_DLL_EXECUTE ) ( const BYTE * pCode, PHB_SYMB pSymbols ); typedef BOOL ( * EXT_IS_ARRAY ) ( int iParam ); typedef char * ( * EXT_PARC1 ) ( int iParam ); typedef char * ( * EXT_PARC2 ) ( int iParam, ULONG ulArrayIndex ); -typedef PHB_ITEM ( * HB_PARAM)( int iParam, long lMask ); -typedef PHB_ITEM ( * HB_PARAMERROR)( int iParam ); +typedef PHB_ITEM ( * HB_PARAM )( int iParam, long lMask ); +typedef PHB_ITEM ( * HB_PARAMERROR )( int iParam ); typedef int ( * HB_PCOUNTS )( void ); -typedef void ( * HB_RET)( void ); -typedef void ( * HB_RETC)( const char * szText ); -typedef void ( * HB_RETCLEN)( const char * szText, ULONG ulLen ); -typedef void ( * HB_RETDS)( const char * szDate ); -typedef void ( * HB_RETD)( int iYear, int iMonth, int iDay ); -typedef void ( * HB_RETDL)( long lJulian ); -typedef void ( * HB_RETL)( int iTrueFalse ); -typedef void ( * HB_RETND)( double dNumber ); -typedef void ( * HB_RETNI)( int iNumber ); -typedef void ( * HB_RETNL)( long lNumber ); -typedef void ( * HB_RETNLEN)( double dNumber, int iWidth, int iDec ); -typedef void ( * HB_RETNDLEN)( double dNumber, int iWidth, int iDec ); -typedef void ( * HB_RETNILEN)( int iNumber, int iWidth ); -typedef void ( * HB_RETNLLEN)( long lNumber, int iWidth ); -typedef void ( * HB_RETA)( ULONG ulLen ); -typedef ULONG ( * HB_PARINFA)( int iParamNum, ULONG uiArrayIndex ); -typedef ULONG ( * HB_PARINFO)( int iParam ); -typedef ULONG ( * HB_PARCLEN)( int iParam ); -typedef ULONG ( * HB_PARCSIZ)( int iParam ); -typedef char * ( * HB_PARDS)( int iParam ); -typedef char * ( * HB_PARDSBUFF)( char * szDate,int iParam); -typedef int ( * HB_PARL)( int iParam ); -typedef double ( * HB_PARND)( int iParam ); -typedef int ( * HB_PARNI)( int iParam ); -typedef long ( * HB_PARNL)( int iParam ); -typedef ULONG ( * HB_PARCLEN2)( int iParam, ULONG ulArrayIndex ); -typedef ULONG ( * HB_PARCSIZ2)( int iParam, ULONG ulArrayIndex ); -typedef char * ( * HB_PARDS2)( int iParam, ULONG ulArrayIndex ); -typedef char * ( * HB_PARDSBUFF2)( char * szDate,int iParam, ULONG ulArrayIndex ); -typedef int ( * HB_PARL2)( int iParam, ULONG ulArrayIndex ); -typedef double ( * HB_PARND2)( int iParam, ULONG ulArrayIndex ); -typedef int ( * HB_PARNI2)( int iParam, ULONG ulArrayIndex ); -typedef long ( * HB_PARNL2)( int iParam, ULONG ulArrayIndex ); -typedef int ( * HB_STORC)( const char * szText, int iParam ); -typedef int ( * HB_STORCLEN)( const char * szText, ULONG ulLength, int iParam); -typedef int ( * HB_STORDS)( const char * szDate, int iParam) ; -typedef int ( * HB_STORL)( int iLogical, int iParam ); -typedef int ( * HB_STORNI)( int iValue, int iParam ); -typedef int ( * HB_STORNL)( long lValue, int iParam ); -typedef int ( * HB_STORND)( double dValue, int iParam ); -typedef int ( * HB_STORC2)( const char * szText, int iParam , ULONG ulArrayIndex); -typedef int ( * HB_STORCLEN2)( const char * szText, ULONG ulLength, int iParam , ULONG ulArrayIndex); -typedef int ( * HB_STORDS2)( const char * szDate, int iParam , ULONG ulArrayIndex) ; -typedef int ( * HB_STORL2)( int iLogical, int iParam , ULONG ulArrayIndex); -typedef int ( * HB_STORNI2)( int iValue, int iParam , ULONG ulArrayIndex); -typedef int ( * HB_STORNL2)( long lValue, int iParam , ULONG ulArrayIndex); -typedef int ( * HB_STORND2)( double dValue, int iParam , ULONG ulArrayIndex); -typedef BOOL ( * HB_ARRAYNEW)( PHB_ITEM pItem, ULONG ulLen ); -typedef ULONG ( * HB_ARRAYLEN)( PHB_ITEM pArray ); -typedef BOOL ( * HB_ARRAYISOBJECT)( PHB_ITEM pArray ); -typedef BOOL ( * HB_ARRAYADD)( PHB_ITEM pArray, PHB_ITEM pItemValue ); -typedef BOOL ( * HB_ARRAYINS)( PHB_ITEM pArray, ULONG ulIndex ); -typedef BOOL ( * HB_ARRAYDEL)( PHB_ITEM pArray, ULONG ulIndex ); -typedef BOOL ( * HB_ARRAYSIZE)( PHB_ITEM pArray, ULONG ulLen ); -typedef BOOL ( * HB_ARRAYLAST)( PHB_ITEM pArray, PHB_ITEM pResult ); -typedef BOOL ( * HB_ARRAYSET)( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); -typedef BOOL ( * HB_ARRAYGET)( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); -typedef void ( * HB_XINIT)( void ); /* Initialize fixed memory subsystem */ -typedef void ( * HB_XEXIT)( void ); /* Deinitialize fixed memory subsystem */ -typedef void * ( * HB_XALLOC)( ULONG ulSize ); /* allocates memory, returns NULL on failure */ -typedef void * ( * HB_XGRAB)( ULONG ulSize ); /* allocates memory, exits on failure */ -typedef void ( * HB_XFREE)( void * pMem ); /* frees memory */ -typedef void * ( * HB_XREALLOC)( void * pMem, ULONG ulSize ); /* reallocates memory */ -typedef ULONG ( * HB_XSIZE)( void * pMem ); /* returns the size of an allocated memory block */ +typedef void ( * HB_RET )( void ); +typedef void ( * HB_RETC )( const char * szText ); +typedef void ( * HB_RETCLEN )( const char * szText, ULONG ulLen ); +typedef void ( * HB_RETDS )( const char * szDate ); +typedef void ( * HB_RETD )( int iYear, int iMonth, int iDay ); +typedef void ( * HB_RETDL )( long lJulian ); +typedef void ( * HB_RETL )( int iTrueFalse ); +typedef void ( * HB_RETND )( double dNumber ); +typedef void ( * HB_RETNI )( int iNumber ); +typedef void ( * HB_RETNL )( long lNumber ); +typedef void ( * HB_RETNLEN )( double dNumber, int iWidth, int iDec ); +typedef void ( * HB_RETNDLEN )( double dNumber, int iWidth, int iDec ); +typedef void ( * HB_RETNILEN )( int iNumber, int iWidth ); +typedef void ( * HB_RETNLLEN )( long lNumber, int iWidth ); +typedef void ( * HB_RETA )( ULONG ulLen ); +typedef ULONG ( * HB_PARINFA )( int iParamNum, ULONG uiArrayIndex ); +typedef ULONG ( * HB_PARINFO )( int iParam ); +typedef ULONG ( * HB_PARCLEN )( int iParam ); +typedef ULONG ( * HB_PARCSIZ )( int iParam ); +typedef char * ( * HB_PARDS )( int iParam ); +typedef char * ( * HB_PARDSBUFF )( char * szDate,int iParam); +typedef int ( * HB_PARL )( int iParam ); +typedef double ( * HB_PARND )( int iParam ); +typedef int ( * HB_PARNI )( int iParam ); +typedef long ( * HB_PARNL )( int iParam ); +typedef ULONG ( * HB_PARCLEN2 )( int iParam, ULONG ulArrayIndex ); +typedef ULONG ( * HB_PARCSIZ2 )( int iParam, ULONG ulArrayIndex ); +typedef char * ( * HB_PARDS2 )( int iParam, ULONG ulArrayIndex ); +typedef char * ( * HB_PARDSBUFF2 )( char * szDate,int iParam, ULONG ulArrayIndex ); +typedef int ( * HB_PARL2 )( int iParam, ULONG ulArrayIndex ); +typedef double ( * HB_PARND2 )( int iParam, ULONG ulArrayIndex ); +typedef int ( * HB_PARNI2 )( int iParam, ULONG ulArrayIndex ); +typedef long ( * HB_PARNL2 )( int iParam, ULONG ulArrayIndex ); +typedef int ( * HB_STORC )( const char * szText, int iParam ); +typedef int ( * HB_STORCLEN )( const char * szText, ULONG ulLength, int iParam ); +typedef int ( * HB_STORDS )( const char * szDate, int iParam ); +typedef int ( * HB_STORL )( int iLogical, int iParam ); +typedef int ( * HB_STORNI )( int iValue, int iParam ); +typedef int ( * HB_STORNL )( long lValue, int iParam ); +typedef int ( * HB_STORND )( double dValue, int iParam ); +typedef int ( * HB_STORC2 )( const char * szText, int iParam , ULONG ulArrayIndex ); +typedef int ( * HB_STORCLEN2 )( const char * szText, ULONG ulLength, int iParam , ULONG ulArrayIndex ); +typedef int ( * HB_STORDS2 )( const char * szDate, int iParam , ULONG ulArrayIndex ); +typedef int ( * HB_STORL2 )( int iLogical, int iParam , ULONG ulArrayIndex ); +typedef int ( * HB_STORNI2 )( int iValue, int iParam , ULONG ulArrayIndex ); +typedef int ( * HB_STORNL2 )( long lValue, int iParam , ULONG ulArrayIndex ); +typedef int ( * HB_STORND2 )( double dValue, int iParam , ULONG ulArrayIndex ); +typedef BOOL ( * HB_ARRAYNEW )( PHB_ITEM pItem, ULONG ulLen ); +typedef ULONG ( * HB_ARRAYLEN )( PHB_ITEM pArray ); +typedef BOOL ( * HB_ARRAYISOBJECT )( PHB_ITEM pArray ); +typedef BOOL ( * HB_ARRAYADD )( PHB_ITEM pArray, PHB_ITEM pItemValue ); +typedef BOOL ( * HB_ARRAYINS )( PHB_ITEM pArray, ULONG ulIndex ); +typedef BOOL ( * HB_ARRAYDEL )( PHB_ITEM pArray, ULONG ulIndex ); +typedef BOOL ( * HB_ARRAYSIZE )( PHB_ITEM pArray, ULONG ulLen ); +typedef BOOL ( * HB_ARRAYLAST )( PHB_ITEM pArray, PHB_ITEM pResult ); +typedef BOOL ( * HB_ARRAYSET )( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); +typedef BOOL ( * HB_ARRAYGET )( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); +typedef void ( * HB_XINIT )( void ); /* Initialize fixed memory subsystem */ +typedef void ( * HB_XEXIT )( void ); /* Deinitialize fixed memory subsystem */ +typedef void * ( * HB_XALLOC )( ULONG ulSize ); /* allocates memory, returns NULL on failure */ +typedef void * ( * HB_XGRAB )( ULONG ulSize ); /* allocates memory, exits on failure */ +typedef void ( * HB_XFREE )( void * pMem ); /* frees memory */ +typedef void * ( * HB_XREALLOC )( void * pMem, ULONG ulSize ); /* reallocates memory */ +typedef ULONG ( * HB_XSIZE )( void * pMem ); /* returns the size of an allocated memory block */ HB_EXTERN_END diff --git a/harbour/source/vm/maindllp.c b/harbour/source/vm/maindllp.c index fa9eff8a7d..e5558a8aa0 100644 --- a/harbour/source/vm/maindllp.c +++ b/harbour/source/vm/maindllp.c @@ -225,7 +225,7 @@ PHB_ITEM hb_paramError( int iParam ) /* Returns either the generic parameter or PHB_ITEM pReturn = NULL; FARPROC pParamError = GetProcAddress( GetModuleHandle( NULL ), "_hb_paramError" ); if( pParamError ) - pReturn = ((HB_PARAMERROR)pParamError)(iParam); + pReturn = ( ( HB_PARAMERROR ) pParamError )( iParam ); return pReturn; } int hb_pcount( void ) /* returns the number of suplied parameters */ @@ -233,108 +233,106 @@ int hb_pcount( void ) /* returns the number of suplied parameters */ int iReturn = 0; FARPROC pCounts = GetProcAddress( GetModuleHandle( NULL ), "_hb_pcount" ); if( pCounts ) - iReturn = ((HB_PCOUNTS)pCounts)(); + iReturn = ( ( HB_PCOUNTS ) pCounts )(); return iReturn; } void hb_retc( const char * szText ) /* returns a string */ { - FARPROC pRetc=GetProcAddress(GetModuleHandle( NULL ), "_hb_retc" ); + FARPROC pRetc=GetProcAddress( GetModuleHandle( NULL ), "_hb_retc" ); if( pRetc ) - ((HB_RETC)pRetc)(szText); + ( ( HB_RETC ) pRetc )( szText ); } void hb_retclen( const char * szText, ULONG ulLen ) /* returns a string with a specific length */ { - FARPROC pRetclen = GetProcAddress(GetModuleHandle( NULL ), "_hb_retclen" ); + FARPROC pRetclen = GetProcAddress( GetModuleHandle( NULL ), "_hb_retclen" ); if( pRetclen ) - ((HB_RETCLEN)pRetclen)(szText,ulLen); + ( ( HB_RETCLEN ) pRetclen )( szText, ulLen ); } void hb_retds( const char * szDate ) /* returns a date, must use yyyymmdd format */ { - FARPROC pRetds = GetProcAddress(GetModuleHandle( NULL ), "_hb_retds" ); + FARPROC pRetds = GetProcAddress( GetModuleHandle( NULL ), "_hb_retds" ); if( pRetds ) - ((HB_RETDS)pRetds)(szDate); + ( ( HB_RETDS ) pRetds )( szDate ); } void hb_retd( int iYear, int iMonth, int iDay ) /* returns a date */ { - FARPROC pRetd = GetProcAddress(GetModuleHandle( NULL ), "_hb_retd" ); + FARPROC pRetd = GetProcAddress( GetModuleHandle( NULL ), "_hb_retd" ); if( pRetd ) - ((HB_RETD)pRetd)( iYear, iMonth, iDay ); + ( ( HB_RETD ) pRetd )( iYear, iMonth, iDay ); } void hb_retdl( long lJulian ) /* returns a long value as a julian date */ { - FARPROC pRet = GetProcAddress(GetModuleHandle( NULL ), "_hb_retdl" ); + FARPROC pRet = GetProcAddress( GetModuleHandle( NULL ), "_hb_retdl" ); if( pRet ) - ((HB_RETDL)pRet)(lJulian); - + ( ( HB_RETDL ) pRet )( lJulian ); } void hb_retl( int iTrueFalse ) /* returns a logical integer */ { - FARPROC pRet = GetProcAddress(GetModuleHandle( NULL ), "_hb_retl" ); + FARPROC pRet = GetProcAddress( GetModuleHandle( NULL ), "_hb_retl" ); if( pRet ) - ((HB_RETDL)pRet)(iTrueFalse); + ( ( HB_RETDL ) pRet )( iTrueFalse ); } void hb_retnd( double dNumber ) /* returns a double */ { - FARPROC pRet = GetProcAddress(GetModuleHandle( NULL ), "_hb_retnd" ); + FARPROC pRet = GetProcAddress( GetModuleHandle( NULL ), "_hb_retnd" ); if( pRet ) - ((HB_RETND)pRet)(dNumber); + ( ( HB_RETND ) pRet )( dNumber ); } void hb_retni( int iNumber ) /* returns a integer number */ { FARPROC pRet = GetProcAddress(GetModuleHandle( NULL ), "_hb_retni" ); if( pRet ) - ((HB_RETNI)pRet)(iNumber); - + ( ( HB_RETNI ) pRet )( iNumber ); } void hb_retnl( long lNumber ) /* returns a long number */ { - FARPROC pRet = GetProcAddress(GetModuleHandle( NULL ), "_hb_retnl" ); + FARPROC pRet = GetProcAddress( GetModuleHandle( NULL ), "_hb_retnl" ); if( pRet ) - ((HB_RETNL)pRet)(lNumber); + ( ( HB_RETNL ) pRet )( lNumber ); } void hb_retnlen( double dNumber, int iWidth, int iDec ) /* returns a double, with specific width and decimals */ { - FARPROC pRet = GetProcAddress(GetModuleHandle( NULL ), "_hb_retnlen" ); + FARPROC pRet = GetProcAddress( GetModuleHandle( NULL ), "_hb_retnlen" ); if( pRet ) - ((HB_RETNLEN)pRet)(dNumber,iWidth,iDec); + ( ( HB_RETNLEN ) pRet )( dNumber, iWidth, iDec ); } void hb_retndlen( double dNumber, int iWidth, int iDec ) /* returns a double, with specific width and decimals */ { - FARPROC pRet = GetProcAddress(GetModuleHandle( NULL ), "_hb_retndlen" ); + FARPROC pRet = GetProcAddress( GetModuleHandle( NULL ), "_hb_retndlen" ); if( pRet ) - ((HB_RETNDLEN)pRet)(dNumber,iWidth,iDec); + ( ( HB_RETNDLEN ) pRet )( dNumber, iWidth, iDec ); } void hb_retnilen( int iNumber, int iWidth ) /* returns a integer number, with specific width */ { - FARPROC pRet = GetProcAddress(GetModuleHandle( NULL ), "_hb_retnilen" ); + FARPROC pRet = GetProcAddress( GetModuleHandle( NULL ), "_hb_retnilen" ); if( pRet ) - ((HB_RETNILEN)pRet)(iNumber,iWidth); + ( ( HB_RETNILEN ) pRet )( iNumber, iWidth ); } void hb_retnllen( long lNumber, int iWidth ) /* returns a long number, with specific width */ { - FARPROC pRet = GetProcAddress(GetModuleHandle( NULL ), "_hb_retnilen" ); + FARPROC pRet = GetProcAddress( GetModuleHandle( NULL ), "_hb_retnilen" ); if( pRet ) - ((HB_RETNLLEN)pRet)(lNumber,iWidth); + ( ( HB_RETNLLEN ) pRet )( lNumber, iWidth ); } void hb_reta( ULONG ulLen ) /* returns an array with a specific length */ { - FARPROC pRet = GetProcAddress(GetModuleHandle( NULL ), "_hb_reta" ); + FARPROC pRet = GetProcAddress( GetModuleHandle( NULL ), "_hb_reta" ); if( pRet ) - ((HB_RETA)pRet)(ulLen); + ( ( HB_RETA ) pRet )( ulLen ); } ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex ) /* retrieve length or element type of an array parameter */ @@ -342,7 +340,7 @@ ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex ) /* retrieve length or elem ULONG ulReturn = 0; FARPROC pParinfa = GetProcAddress( GetModuleHandle( NULL ), "_hb_parinfa" ); if( pParinfa ) - ulReturn = ((HB_PARINFA)pParinfa)(iParamNum,uiArrayIndex); + ulReturn = ( ( HB_PARINFA ) pParinfa )( iParamNum, uiArrayIndex ); return ulReturn; } @@ -351,7 +349,7 @@ ULONG hb_parinfo( int iParam ) /* Determine the param count or data type */ ULONG ulReturn = 0; FARPROC pParinfo = GetProcAddress( GetModuleHandle( NULL ), "_hb_parinfo" ); if( pParinfo ) - ulReturn = ((HB_PARINFO)pParinfo)(iParam); + ulReturn = ( ( HB_PARINFO ) pParinfo )( iParam ); return ulReturn; } @@ -574,7 +572,7 @@ int hb_storc( const char * szText, int iParam, ... ) ulArrayIndex = va_arg( va, ULONG ); va_end( va ); - ( ( HB_STORC2) pStorC )( szText, iParam, ulArrayIndex ); + ( ( HB_STORC2 ) pStorC )( szText, iParam, ulArrayIndex ); return 1; } else @@ -603,7 +601,7 @@ int hb_storclen( const char * szText, ULONG ulLen, int iParam, ... ) ulArrayIndex = va_arg( va, ULONG ); va_end( va ); - ( ( HB_STORCLEN2) pStorC )( szText, ulLen, iParam, ulArrayIndex ); + ( ( HB_STORCLEN2 ) pStorC )( szText, ulLen, iParam, ulArrayIndex ); return 1; } else @@ -633,7 +631,7 @@ int hb_stords( const char * szDate, int iParam, ... ) ulArrayIndex = va_arg( va, ULONG ); va_end( va ); - ( ( HB_STORDS2) pStorDs )( szDate, iParam, ulArrayIndex ); + ( ( HB_STORDS2 ) pStorDs )( szDate, iParam, ulArrayIndex ); return 1; } @@ -664,7 +662,7 @@ int hb_storl( int iLogical, int iParam, ... ) ulArrayIndex = va_arg( va, ULONG ); va_end( va ); - ( ( HB_STORL2) pStorL )( iLogical, iParam, ulArrayIndex ); + ( ( HB_STORL2 ) pStorL )( iLogical, iParam, ulArrayIndex ); return 1; } else @@ -694,12 +692,12 @@ int hb_storni( int iValue, int iParam, ... ) ulArrayIndex = va_arg( va, ULONG ); va_end( va ); - ( ( HB_STORNI2) pStorNi )( iValue, iParam, ulArrayIndex ); + ( ( HB_STORNI2 ) pStorNi )( iValue, iParam, ulArrayIndex ); return 1; } else { - ( ( HB_STORNI) pStorNi )( iValue, iParam ); + ( ( HB_STORNI ) pStorNi )( iValue, iParam ); return 1; } @@ -724,12 +722,12 @@ int hb_stornl( long lValue, int iParam, ... ) ulArrayIndex = va_arg( va, ULONG ); va_end( va ); - ( ( HB_STORNL2) pStorNl )( lValue, iParam, ulArrayIndex ); + ( ( HB_STORNL2 ) pStorNl )( lValue, iParam, ulArrayIndex ); return 1; } else { - ( ( HB_STORNL) pStorNl )( lValue, iParam ); + ( ( HB_STORNL ) pStorNl )( lValue, iParam ); return 1; } @@ -754,12 +752,12 @@ int hb_stornd( double dNumber, int iParam, ... ) ulArrayIndex = va_arg( va, ULONG ); va_end( va ); - ( ( HB_STORND2) pStorNd )( dNumber, iParam, ulArrayIndex ); + ( ( HB_STORND2 ) pStorNd )( dNumber, iParam, ulArrayIndex ); return 1; } else { - ( ( HB_STORND) pStorNd )( dNumber, iParam ); + ( ( HB_STORND ) pStorNd )( dNumber, iParam ); return 1; } @@ -770,7 +768,7 @@ int hb_stornd( double dNumber, int iParam, ... ) BOOL hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ) /* creates a new array */ { - HB_ARRAYNEW pArrayNew = (HB_ARRAYNEW) GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayNew" ); + HB_ARRAYNEW pArrayNew = ( HB_ARRAYNEW) GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayNew" ); if( pArrayNew ) return pArrayNew( pItem, ulLen ); else @@ -779,7 +777,7 @@ BOOL hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ) /* creates a new array */ ULONG hb_arrayLen( PHB_ITEM pArray ) /* retrives the array len */ { - HB_ARRAYLEN pArrayLen = (HB_ARRAYLEN)GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayLen" ); + HB_ARRAYLEN pArrayLen = ( HB_ARRAYLEN ) GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayLen" ); if( pArrayLen ) return pArrayLen( pArray ); else @@ -788,7 +786,7 @@ ULONG hb_arrayLen( PHB_ITEM pArray ) /* retrives the array len */ BOOL hb_arrayIsObject( PHB_ITEM pArray ) /* retrives if the array is an object */ { - HB_ARRAYISOBJECT pArrayIsObject = (HB_ARRAYISOBJECT)GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayIsObject" ); + HB_ARRAYISOBJECT pArrayIsObject = ( HB_ARRAYISOBJECT ) GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayIsObject" ); if( pArrayIsObject ) return pArrayIsObject( pArray ); else @@ -797,7 +795,7 @@ BOOL hb_arrayIsObject( PHB_ITEM pArray ) /* retrives if the array is an obj BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pItemValue ) /* add a new item to the end of an array item */ { - HB_ARRAYADD pArrayAdd = (HB_ARRAYADD)GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayAdd" ); + HB_ARRAYADD pArrayAdd = ( HB_ARRAYADD ) GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayAdd" ); if( pArrayAdd ) return pArrayAdd( pArray, pItemValue ); else @@ -806,7 +804,7 @@ BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pItemValue ) /* add a new item BOOL hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex ) /* insert a nil item into an array, without changing the length */ { - HB_ARRAYINS pArrayIns = (HB_ARRAYINS)GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayIns" ); + HB_ARRAYINS pArrayIns = ( HB_ARRAYINS ) GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayIns" ); if( pArrayIns ) return pArrayIns( pArray, ulIndex ); else @@ -815,7 +813,7 @@ BOOL hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex ) /* insert a nil item int BOOL hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex ) /* delete an array item, without changing length */ { - HB_ARRAYDEL pArrayDel = (HB_ARRAYDEL)GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayDel" ); + HB_ARRAYDEL pArrayDel = ( HB_ARRAYDEL ) GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayDel" ); if( pArrayDel ) return pArrayDel( pArray, ulIndex ); else @@ -824,7 +822,7 @@ BOOL hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex ) /* delete an array item, BOOL hb_arraySize( PHB_ITEM pArray, ULONG ulLen ) /* sets the array total length */ { - HB_ARRAYSIZE pArraySize = (HB_ARRAYSIZE)GetProcAddress( GetModuleHandle( NULL ), "_hb_arraySize" ); + HB_ARRAYSIZE pArraySize = ( HB_ARRAYSIZE ) GetProcAddress( GetModuleHandle( NULL ), "_hb_arraySize" ); if( pArraySize ) return pArraySize( pArray, ulLen ); else @@ -833,7 +831,7 @@ BOOL hb_arraySize( PHB_ITEM pArray, ULONG ulLen ) /* sets the array total l BOOL hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ) /* retrieve last item in an array */ { - HB_ARRAYLAST pArrayLast= (HB_ARRAYLAST)GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayLast" ); + HB_ARRAYLAST pArrayLast = ( HB_ARRAYLAST ) GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayLast" ); if( pArrayLast ) return pArrayLast( pArray, pResult ); else @@ -842,7 +840,7 @@ BOOL hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ) /* retrieve last ite BOOL hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) /* sets an array element */ { - HB_ARRAYSET pArraySet = (HB_ARRAYSET)GetProcAddress( GetModuleHandle( NULL ), "_hb_arraySet" ); + HB_ARRAYSET pArraySet = ( HB_ARRAYSET ) GetProcAddress( GetModuleHandle( NULL ), "_hb_arraySet" ); if( pArraySet ) return pArraySet( pArray, ulIndex, pItem); else @@ -851,7 +849,7 @@ BOOL hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) /* sets BOOL hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) /* retrieves an item */ { - HB_ARRAYGET pArrayGet = (HB_ARRAYGET)GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayGet" ); + HB_ARRAYGET pArrayGet = ( HB_ARRAYGET ) GetProcAddress( GetModuleHandle( NULL ), "_hb_arrayGet" ); if( pArrayGet ) return pArrayGet( pArray, ulIndex, pItem); else @@ -860,14 +858,14 @@ BOOL hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) /* retri void hb_xinit( void ) /* Initialize fixed memory subsystem */ { - HB_XINIT pXinit = (HB_XINIT)GetProcAddress( GetModuleHandle( NULL ), "_hb_xinit" ); + HB_XINIT pXinit = ( HB_XINIT ) GetProcAddress( GetModuleHandle( NULL ), "_hb_xinit" ); if( pXinit ) pXinit(); } void hb_xexit( void ) /* Deinitialize fixed memory subsystem */ { - HB_XEXIT pXexit = (HB_XEXIT)GetProcAddress( GetModuleHandle( NULL ), "_hb_xexit" ); + HB_XEXIT pXexit = ( HB_XEXIT ) GetProcAddress( GetModuleHandle( NULL ), "_hb_xexit" ); if( pXexit ) pXexit(); } @@ -875,16 +873,16 @@ void hb_xexit( void ) /* Deinitialize fixed memory s void * hb_xalloc( ULONG ulSize ) /* allocates memory, returns NULL on failure */ { void * pRet = NULL; - HB_XALLOC pXalloc = (HB_XALLOC)GetProcAddress( GetModuleHandle( NULL ), "_hb_xalloc" ); + HB_XALLOC pXalloc = ( HB_XALLOC ) GetProcAddress( GetModuleHandle( NULL ), "_hb_xalloc" ); if( pXalloc ) - pRet=pXalloc( ulSize ); + pRet = pXalloc( ulSize ); return pRet; } void * hb_xgrab( ULONG ulSize ) /* allocates memory, exits on failure */ { void * pRet = NULL; - HB_XGRAB pXgrab = (HB_XGRAB)GetProcAddress( GetModuleHandle( NULL ), "_hb_xgrab" ); + HB_XGRAB pXgrab = ( HB_XGRAB ) GetProcAddress( GetModuleHandle( NULL ), "_hb_xgrab" ); if( pXgrab ) pRet = pXgrab( ulSize ); return pRet; @@ -892,7 +890,7 @@ void * hb_xgrab( ULONG ulSize ) /* allocates memory, exits on fa void hb_xfree( void * pMem ) /* frees memory */ { - HB_XFREE pXfree = (HB_XFREE)GetProcAddress( GetModuleHandle( NULL ), "_hb_xfree" ); + HB_XFREE pXfree = ( HB_XFREE ) GetProcAddress( GetModuleHandle( NULL ), "_hb_xfree" ); if( pXfree ) pXfree( pMem ); } @@ -900,18 +898,18 @@ void hb_xfree( void * pMem ) /* frees memory */ void * hb_xrealloc( void * pMem, ULONG ulSize ) /* reallocates memory */ { void * pRet = NULL; - HB_XREALLOC pXrealloc = (HB_XREALLOC)GetProcAddress( GetModuleHandle( NULL ), "_hb_xrealloc" ); + HB_XREALLOC pXrealloc = ( HB_XREALLOC ) GetProcAddress( GetModuleHandle( NULL ), "_hb_xrealloc" ); if( pXrealloc ) - pRet = (void*) pXrealloc( pMem, ulSize ); - return pRet; + pRet = ( void * ) pXrealloc( pMem, ulSize ); + return pRet; } ULONG hb_xsize( void * pMem ) /* returns the size of an allocated memory block */ { - HB_XSIZE pXsize = (HB_XSIZE)GetProcAddress( GetModuleHandle( NULL ), "_hb_xsize" ); + HB_XSIZE pXsize = ( HB_XSIZE ) GetProcAddress( GetModuleHandle( NULL ), "_hb_xsize" ); ULONG ulReturn = 0; if( pXsize ) - ulReturn = pXsize( (void *)pMem ); + ulReturn = pXsize( ( void * ) pMem ); return ulReturn; } diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 0aa97448e2..6f43da2078 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -1286,7 +1286,7 @@ FUNCTION Main( ... ) AAdd( s_aLIBPATH, "{DB}" ) ENDIF IF ! lStopAfterCComp - IF t_cCOMP == "mingw" + IF t_cCOMP $ "mingw|mingwce" cOpt_CompC += " -Wl,--start-group {LL} -Wl,--end-group" ELSE cOpt_CompC += " {LL}"