diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 81e4c9c358..a736a3ffad 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -7,6 +7,19 @@ For example: 2002-12-01 23:12 UTC+0100 Foo Bar */ + * contrib/apollo + + Added function sx_GoBottom() + + Added function sx_Go() + + Added function sx_Seek() + + Added function sx_SetSoftSeek() + + Added function sx_RLock() + + Added function sx_Reindex() + + Added function sx_RecCount() + + Added function sx_SetMemoBlockSize() + + Added function sx_CreateNew() + + Added function sx_CreateField() + + Added function sx_CreateExec() + * contrib/apollo/test * Added added functions in the test application. 2001-12-30 04:40 UTC+0700 Andi Jahja diff --git a/harbour/contrib/hbzlib/zipcomp.cpp b/harbour/contrib/hbzlib/zipcomp.cpp index ef420c38a8..7479a95f24 100644 --- a/harbour/contrib/hbzlib/zipcomp.cpp +++ b/harbour/contrib/hbzlib/zipcomp.cpp @@ -164,7 +164,7 @@ int hb_CompressFile(char *szFile,PHB_ITEM pArray,int iCompLevel,PHB_ITEM pBloc bReturn=false; } catch(...){} - if (HB_IS_BLOCK(pProgressInfo)) + if (pProgressInfo) hb_itemRelease(pProgressInfo ); return bReturn; /* to avoid warning */ } @@ -286,7 +286,7 @@ int hb_CompressFile(char *szFile,PHB_ITEM pArray,int iCompLevel,PHB_ITEM pBloc } catch(...){} pDiskStatus=NULL ; - if (HB_IS_BLOCK(pProgressInfo)) + if (pProgressInfo) hb_itemRelease(pProgressInfo ); return bReturn; /* to avoid warning */ @@ -408,7 +408,7 @@ int hb_CompressFileStd(char *szFile,char *szFiletoCompress,int iCompLevel,PHB_ bReturn=false; } catch(...){} - if (HB_IS_BLOCK(pProgressInfo)) + if (pProgressInfo) hb_itemRelease(pProgressInfo ); return bReturn; /* to avoid warning */ @@ -510,7 +510,7 @@ int hb_CompressFileStd(char *szFile,char *szFiletoCompress,int iCompLevel,PHB_ } catch(...){} pDiskStatus=NULL ; - if (HB_IS_BLOCK(pProgressInfo)) + if (pProgressInfo) hb_itemRelease(pProgressInfo ); return true; /* to avoid warning */ diff --git a/harbour/include/hbtypes.h b/harbour/include/hbtypes.h new file mode 100644 index 0000000000..8956430a9e --- /dev/null +++ b/harbour/include/hbtypes.h @@ -0,0 +1,130 @@ + +/* + * $Id: + */ + +/* + * Harbour Project source code: + * Header file for typedef for maindllp.c + * + * Copyright 2001-2002 Luiz Rafael Culik + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +#ifndef HB_APITYS_H_ +#define HB_APITYS_H_ + +#include "hbvm.h" +#include "hbapiitm.h" + +typedef void ( * VM_PROCESS_DLL_SYMBOLS ) ( PHB_SYMB pModuleSymbols, + USHORT uiModuleSymbols ); + +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, int iMask ); +typedef PHB_ITEM ( * HB_PARAMERROR)( int iParam ); +typedef int ( * HB_PCOUNTS)(void); +typedef void ( * HB_RET)( void ); +typedef void ( * HB_RETC)( char * szText ); +typedef void ( * HB_RETCLEN)( char * szText, ULONG ulLen ); +typedef void ( * HB_RETDS)( char * szDate ); +typedef void ( * HB_RETD)( long lYear, long lMonth, long lDay ); +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 int ( * 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_PARINFO)( 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 void ( * HB_STORC)( char * szText, int iParam ); +typedef void ( * HB_STORCLEN)( char * szText, ULONG ulLength, int iParam); +typedef void ( * HB_STORDS)( char * szDate, int iParam) ; +typedef void ( * HB_STORL)( int iLogical, int iParam ); +typedef void ( * HB_STORNI)( int iValue, int iParam ); +typedef void ( * HB_STORNL)( long lValue, int iParam ); +typedef void ( * HB_STORND)( double dValue, int iParam ); +typedef void ( * HB_STORC2)( char * szText, int iParam , ULONG ulArrayIndex); +typedef void ( * HB_STORCLEN2)( char * szText, ULONG ulLength, int iParam , ULONG ulArrayIndex); +typedef void ( * HB_STORDS2)( char * szDate, int iParam , ULONG ulArrayIndex) ; +typedef void ( * HB_STORL2)( int iLogical, int iParam , ULONG ulArrayIndex); +typedef void ( * HB_STORNI2)( int iValue, int iParam , ULONG ulArrayIndex); +typedef void ( * HB_STORNL2)( long lValue, int iParam , ULONG ulArrayIndex); +typedef void ( * 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_ARRAYRELEASE)( PHB_ITEM pArray ); +typedef BOOL ( * HB_ARRAYSET)( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); +typedef BOOL ( * HB_ARRAYGET)( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); +#endif diff --git a/harbour/source/vm/arrays.c b/harbour/source/vm/arrays.c index 7ea90fc383..f3ab2984db 100644 --- a/harbour/source/vm/arrays.c +++ b/harbour/source/vm/arrays.c @@ -75,7 +75,7 @@ #include "hbvm.h" #include "hbstack.h" -BOOL hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ) /* creates a new array */ +BOOL HB_EXPORT hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ) /* creates a new array */ { PHB_BASEARRAY pBaseArray = ( PHB_BASEARRAY ) hb_gcAlloc( sizeof( HB_BASEARRAY ), hb_arrayReleaseGarbage ); ULONG ulPos; @@ -104,7 +104,7 @@ BOOL hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ) /* creates a new array */ return TRUE; } -BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pValue ) +BOOL HB_EXPORT hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pValue ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayAdd(%p, %p)", pArray, pValue)); @@ -125,7 +125,7 @@ BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pValue ) return FALSE; } -ULONG hb_arrayLen( PHB_ITEM pArray ) +ULONG HB_EXPORT hb_arrayLen( PHB_ITEM pArray ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayLen(%p)", pArray)); @@ -135,7 +135,7 @@ ULONG hb_arrayLen( PHB_ITEM pArray ) return 0; } -BOOL hb_arrayIsObject( PHB_ITEM pArray ) +BOOL HB_EXPORT hb_arrayIsObject( PHB_ITEM pArray ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayIsObject(%p)", pArray)); @@ -145,7 +145,7 @@ BOOL hb_arrayIsObject( PHB_ITEM pArray ) return FALSE; } -BOOL hb_arraySize( PHB_ITEM pArray, ULONG ulLen ) +BOOL HB_EXPORT hb_arraySize( PHB_ITEM pArray, ULONG ulLen ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySize(%p, %lu)", pArray, ulLen)); @@ -199,7 +199,7 @@ BOOL hb_arraySize( PHB_ITEM pArray, ULONG ulLen ) return FALSE; } -BOOL hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex ) +BOOL HB_EXPORT hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayDel(%p, %lu)", pArray, ulIndex)); @@ -227,7 +227,7 @@ BOOL hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex ) return FALSE; } -BOOL hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex ) +BOOL HB_EXPORT hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayIns(%p, %lu)", pArray, ulIndex)); @@ -253,7 +253,7 @@ BOOL hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex ) return FALSE; } -BOOL hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) +BOOL HB_EXPORT hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySet(%p, %lu, %p)", pArray, ulIndex, pItem)); @@ -266,7 +266,7 @@ BOOL hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) return FALSE; } -BOOL hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) +BOOL HB_EXPORT hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayGet(%p, %lu, %p)", pArray, ulIndex, pItem)); diff --git a/harbour/source/vm/extend.c b/harbour/source/vm/extend.c index 443698f7a2..a70098ed9d 100644 --- a/harbour/source/vm/extend.c +++ b/harbour/source/vm/extend.c @@ -77,7 +77,7 @@ /* NOTE: iParam = -1 can be used to access the return value. */ /* NOTE: iParam = 0 can be used to access the SELF object. */ -PHB_ITEM hb_param( int iParam, int iMask ) +PHB_ITEM HB_EXPORT hb_param( int iParam, int iMask ) { HB_TRACE(HB_TR_DEBUG, ("hb_param(%d, %d)", iParam, iMask)); @@ -98,7 +98,7 @@ PHB_ITEM hb_param( int iParam, int iMask ) return NULL; } -PHB_ITEM hb_paramError( int iParam ) +PHB_ITEM HB_EXPORT hb_paramError( int iParam ) { static HB_ITEM s_NIL; @@ -160,7 +160,7 @@ char HB_EXPORT * hb_parc( int iParam, ... ) return ""; } -ULONG hb_parclen( int iParam, ... ) +ULONG HB_EXPORT hb_parclen( int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_parclen(%d, ...)", iParam)); @@ -193,7 +193,7 @@ ULONG hb_parclen( int iParam, ... ) terminating zero byte, and it only works for parameters passed by reference. [vszakats] */ -ULONG hb_parcsiz( int iParam, ... ) +ULONG HB_EXPORT hb_parcsiz( int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_parcsiz(%d, ...)", iParam)); @@ -230,7 +230,7 @@ ULONG hb_parcsiz( int iParam, ... ) /* NOTE: Using hb_stack.szDate as a temporary date buffer guaranties good behavior when multithreading. */ -char * hb_pards( int iParam, ... ) +char HB_EXPORT * hb_pards( int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_pards(%d, ...)", iParam)); @@ -261,7 +261,7 @@ char * hb_pards( int iParam, ... ) /* NOTE: szDate must be a 9 chars wide buffer. [vszakats] */ -char * hb_pardsbuff( char * szDate, int iParam, ... ) +char HB_EXPORT * hb_pardsbuff( char * szDate, int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_pardsbuff(%p, %d, ...)", szDate, iParam)); @@ -290,7 +290,7 @@ char * hb_pardsbuff( char * szDate, int iParam, ... ) return hb_dateDecStr( szDate, 0 ); } -int hb_parl( int iParam, ... ) +int HB_EXPORT hb_parl( int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_parl(%d, ...)", iParam)); @@ -325,7 +325,7 @@ int hb_parl( int iParam, ... ) return 0; } -double hb_parnd( int iParam, ... ) +double HB_EXPORT hb_parnd( int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_parnd(%d, ...)", iParam)); @@ -358,7 +358,7 @@ double hb_parnd( int iParam, ... ) return 0; } -int hb_parni( int iParam, ... ) +int HB_EXPORT hb_parni( int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_parni(%d, ...)", iParam)); @@ -391,7 +391,7 @@ int hb_parni( int iParam, ... ) return 0; } -long hb_parnl( int iParam, ... ) +long HB_EXPORT hb_parnl( int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_parnl(%d, ...)", iParam)); @@ -426,7 +426,7 @@ long hb_parnl( int iParam, ... ) return 0; } -ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex ) +ULONG HB_EXPORT hb_parinfa( int iParamNum, ULONG uiArrayIndex ) { PHB_ITEM pArray; @@ -445,7 +445,7 @@ ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex ) return 0; } -int hb_parinfo( int iParam ) +int HB_EXPORT hb_parinfo( int iParam ) { HB_TRACE(HB_TR_DEBUG, ("hb_parinfo(%d)", iParam)); @@ -474,35 +474,35 @@ int hb_parinfo( int iParam ) #ifndef HB_API_MACROS -int hb_pcount( void ) +int HB_EXPORT hb_pcount( void ) { HB_TRACE(HB_TR_DEBUG, ("hb_pcount()")); return ( int ) ( hb_stackBaseItem() )->item.asSymbol.paramcnt; } -void hb_ret( void ) +void HB_EXPORT hb_ret( void ) { HB_TRACE(HB_TR_DEBUG, ("hb_ret()")); hb_itemClear( &hb_stack.Return ); } -void hb_reta( ULONG ulLen ) /* undocumented hb_reta() */ +void HB_EXPORT hb_reta( ULONG ulLen ) /* undocumented hb_reta() */ { HB_TRACE(HB_TR_DEBUG, ("hb_reta(%lu)", ulLen)); hb_arrayNew( &hb_stack.Return, ulLen ); } -void hb_retc( char * szText ) +void HB_EXPORT hb_retc( char * szText ) { HB_TRACE(HB_TR_DEBUG, ("hb_retc(%s)", szText)); hb_itemPutC( &hb_stack.Return, szText ); } -void hb_retclen( char * szText, ULONG ulLen ) +void HB_EXPORT hb_retclen( char * szText, ULONG ulLen ) { HB_TRACE(HB_TR_DEBUG, ("hb_retclen(%s, %lu)", szText, ulLen)); @@ -511,77 +511,77 @@ void hb_retclen( char * szText, ULONG ulLen ) /* szDate must have YYYYMMDD format */ -void hb_retds( char * szDate ) +void HB_EXPORT hb_retds( char * szDate ) { HB_TRACE(HB_TR_DEBUG, ("hb_retds(%s)", szDate)); hb_itemPutDS( &hb_stack.Return, szDate ); } -void hb_retd( long lYear, long lMonth, long lDay ) +void HB_EXPORT hb_retd( long lYear, long lMonth, long lDay ) { HB_TRACE(HB_TR_DEBUG, ("hb_retd(%04i, %02i, %02i)", lYear, lMonth, lDay)); hb_itemPutD( &hb_stack.Return, lYear, lMonth, lDay ); } -void hb_retdl( long lJulian ) +void HB_EXPORT hb_retdl( long lJulian ) { HB_TRACE(HB_TR_DEBUG, ("hb_retdl(%ld)", lJulian)); hb_itemPutDL( &hb_stack.Return, lJulian ); } -void hb_retl( int iLogical ) +void HB_EXPORT hb_retl( int iLogical ) { HB_TRACE(HB_TR_DEBUG, ("hb_retl(%d)", iLogical)); hb_itemPutL( &hb_stack.Return, iLogical ? TRUE : FALSE ); } -void hb_retnd( double dNumber ) +void HB_EXPORT hb_retnd( double dNumber ) { HB_TRACE(HB_TR_DEBUG, ("hb_retnd(%lf)", dNumber)); hb_itemPutND( &hb_stack.Return, dNumber ); } -void hb_retni( int iNumber ) +void HB_EXPORT hb_retni( int iNumber ) { HB_TRACE(HB_TR_DEBUG, ("hb_retni(%d)", iNumber)); hb_itemPutNI( &hb_stack.Return, iNumber ); } -void hb_retnl( long lNumber ) +void HB_EXPORT hb_retnl( long lNumber ) { HB_TRACE(HB_TR_DEBUG, ("hb_retnl(%ld)", lNumber)); hb_itemPutNL( &hb_stack.Return, lNumber ); } -void hb_retnlen( double dNumber, int iWidth, int iDec ) +void HB_EXPORT hb_retnlen( double dNumber, int iWidth, int iDec ) { HB_TRACE(HB_TR_DEBUG, ("hb_retnlen(%lf, %d, %d)", dNumber, iWidth, iDec)); hb_itemPutNLen( &hb_stack.Return, dNumber, iWidth, iDec ); } -void hb_retndlen( double dNumber, int iWidth, int iDec ) +void HB_EXPORT hb_retndlen( double dNumber, int iWidth, int iDec ) { HB_TRACE(HB_TR_DEBUG, ("hb_retndlen(%lf, %d, %d)", dNumber, iWidth, iDec)); hb_itemPutNDLen( &hb_stack.Return, dNumber, iWidth, iDec ); } -void hb_retnilen( int iNumber, int iWidth ) +void HB_EXPORT hb_retnilen( int iNumber, int iWidth ) { HB_TRACE(HB_TR_DEBUG, ("hb_retnilen(%d, %d)", iNumber, iWidth)); hb_itemPutNILen( &hb_stack.Return, iNumber, iWidth ); } -void hb_retnllen( long lNumber, int iWidth ) +void HB_EXPORT hb_retnllen( long lNumber, int iWidth ) { HB_TRACE(HB_TR_DEBUG, ("hb_retnllen(%ld, %d)", lNumber, iWidth)); @@ -590,7 +590,7 @@ void hb_retnllen( long lNumber, int iWidth ) #endif -void hb_storc( char * szText, int iParam, ... ) +void HB_EXPORT hb_storc( char * szText, int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_storc(%s, %d, ...)", szText, iParam)); @@ -616,7 +616,7 @@ void hb_storc( char * szText, int iParam, ... ) } } -void hb_storclen( char * szText, ULONG ulLen, int iParam, ... ) +void HB_EXPORT hb_storclen( char * szText, ULONG ulLen, int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_storclen(%s, %lu, %d, ...)", szText, ulLen, iParam)); @@ -644,7 +644,7 @@ void hb_storclen( char * szText, ULONG ulLen, int iParam, ... ) /* szDate must have YYYYMMDD format */ -void hb_stords( char * szDate, int iParam, ... ) +void HB_EXPORT hb_stords( char * szDate, int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_stords(%s, %d, ...)", szDate, iParam)); @@ -670,7 +670,7 @@ void hb_stords( char * szDate, int iParam, ... ) } } -void hb_storl( int iLogical, int iParam, ... ) +void HB_EXPORT hb_storl( int iLogical, int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_storl(%d, %d, ...)", iLogical, iParam)); @@ -696,7 +696,7 @@ void hb_storl( int iLogical, int iParam, ... ) } } -void hb_storni( int iValue, int iParam, ... ) +void HB_EXPORT hb_storni( int iValue, int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_storni(%d, %d, ...)", iValue, iParam)); @@ -722,7 +722,7 @@ void hb_storni( int iValue, int iParam, ... ) } } -void hb_stornl( long lValue, int iParam, ... ) +void HB_EXPORT hb_stornl( long lValue, int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_stornl(%ld, %d, ...)", lValue, iParam)); @@ -748,7 +748,7 @@ void hb_stornl( long lValue, int iParam, ... ) } } -void hb_stornd( double dNumber, int iParam, ... ) +void HB_EXPORT hb_stornd( double dNumber, int iParam, ... ) { HB_TRACE(HB_TR_DEBUG, ("hb_stornd(%lf, %d, ...)", dNumber, iParam)); diff --git a/harbour/source/vm/maindllp.c b/harbour/source/vm/maindllp.c index 6ea8060252..8ecde85f51 100644 --- a/harbour/source/vm/maindllp.c +++ b/harbour/source/vm/maindllp.c @@ -57,22 +57,12 @@ #define HB_OS_WIN_32_USED -#include "hbvm.h" -#include "hbapiitm.h" - -typedef void ( * VM_PROCESS_DLL_SYMBOLS ) ( PHB_SYMB pModuleSymbols, - USHORT uiModuleSymbols ); - -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 ); +#include "hbtypes.h" #if defined(HB_OS_WIN_32) -BOOL HB_EXPORT WINAPI DllEntryPoint( HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved ) +BOOL WINAPI HB_EXPORT DllEntryPoint( HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved ) { HB_TRACE( HB_TR_DEBUG, ("DllEntryPoint(%p, %p, %d)", hInstance, fdwReason, pvReserved ) ); @@ -147,4 +137,514 @@ char * hb_parc( int iParam, ... ) return ""; } +PHB_ITEM hb_param( int iParam, int iMask ) /* retrieve a generic parameter */ +{ + PHB_ITEM pReturn; + FARPROC pParam=GetProcAddress( GetModuleHandle( NULL ), "_hb_param" ); + if (pParam) + pReturn=((HB_PARAM)pParam)(iParam,iMask); + return pReturn; +} + +PHB_ITEM hb_paramError( int iParam ) /* Returns either the generic parameter or a NIL item if param not provided */ +{ + PHB_ITEM pReturn; + FARPROC pParamError=GetProcAddress( GetModuleHandle( NULL ), "_hb_paramError" ); + if (pParamError) + pReturn=((HB_PARAMERROR)pParamError)(iParam); + return pReturn; +} +int hb_pcount( void ) /* returns the number of suplied parameters */ +{ + int iReturn; + FARPROC pCounts=GetProcAddress(GetModuleHandle( NULL ), "_hb_pcount" ); + if (pCounts) + iReturn=((HB_PCOUNTS)pCounts)(); + return iReturn; +} + +void hb_retc( char * szText ) /* returns a string */ +{ + FARPROC pRetc=GetProcAddress(GetModuleHandle( NULL ), "_hb_retc" ); + if (pRetc) + ((HB_RETC)pRetc)(szText); +} + +void hb_retclen( char * szText, ULONG ulLen ) /* returns a string with a specific length */ +{ + FARPROC pRetclen=GetProcAddress(GetModuleHandle( NULL ), "_hb_retclen" ); + if (pRetclen) + ((HB_RETCLEN)pRetclen)(szText,ulLen); +} + +void hb_retds( char * szDate ) /* returns a date, must use yyyymmdd format */ +{ + FARPROC pRetds=GetProcAddress(GetModuleHandle( NULL ), "_hb_retds" ); + if (pRetds) + ((HB_RETDS)pRetds)(szDate); +} + +void hb_retd( long lYear, long lMonth, long lDay ) /* returns a date */ +{ + FARPROC pRetd=GetProcAddress(GetModuleHandle( NULL ), "_hb_retd" ); + if (pRetd) + ((HB_RETD)pRetd)(lYear,lMonth,lDay); +} + +void hb_retdl( long lJulian ) /* returns a long value as a julian date */ +{ + FARPROC pRet=GetProcAddress(GetModuleHandle( NULL ), "_hb_retdl" ); + if (pRet) + ((HB_RETDL)pRet)(lJulian); + +} + +void hb_retl( int iTrueFalse ) /* returns a logical integer */ +{ + FARPROC pRet=GetProcAddress(GetModuleHandle( NULL ), "_hb_retl" ); + if (pRet) + ((HB_RETDL)pRet)(iTrueFalse); +} + +void hb_retnd( double dNumber ) /* returns a double */ +{ + FARPROC pRet=GetProcAddress(GetModuleHandle( NULL ), "_hb_retnd" ); + if (pRet) + ((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); + +} + +void hb_retnl( long lNumber ) /* returns a long number */ +{ + FARPROC pRet=GetProcAddress(GetModuleHandle( NULL ), "_hb_retnl" ); + if (pRet) + ((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" ); + if (pRet) + ((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" ); + if (pRet) + ((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" ); + if (pRet) + ((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" ); + if (pRet) + ((HB_RETNLLEN)pRet)(lNumber,iWidth); +} + +void hb_reta( ULONG ulLen ) /* returns an array with a specific length */ +{ + FARPROC pRet=GetProcAddress(GetModuleHandle( NULL ), "_hb_reta" ); + if (pRet) + ((HB_RETA)pRet)(ulLen); +} + +ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex ) /* retrieve length or element type of an array parameter */ +{ + ULONG ulReturn; + FARPROC pParinfa=GetProcAddress( GetModuleHandle( NULL ), "_hb_parinfa" ); + if (pParinfa) + ulReturn=((HB_PARINFA)pParinfa)(iParamNum,uiArrayIndex); + return ulReturn; +} + +int hb_parinfo( int iParam ) /* Determine the param count or data type */ +{ + int iReturn; + FARPROC pParinfo=GetProcAddress( GetModuleHandle( NULL ), "_hb_parinfo" ); + if (pParinfo) + iReturn=((HB_PARINFO)pParinfo)(iParam); + return iReturn; +} + +ULONG hb_parclen( int iParam, ... ) /* retrieve a string parameter length */ +{ + FARPROC pParC= GetProcAddress( GetModuleHandle( NULL ), "_hb_parclen" ); + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + if( pExtIsArray && pParC ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + return ( ( HB_PARCLEN2 ) pParC )( iParam, ulArrayIndex ); + } + else + return ( ( HB_PARCLEN ) pParC )( iParam ); + } + else + return 0; +} + +ULONG hb_parcsiz( int iParam, ... )/* retrieve a by-reference string parameter length, including terminator */ +{ + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + FARPROC pParcSiz= GetProcAddress( GetModuleHandle( NULL ), "_hb_parcsiz" ); + + if( pExtIsArray && pParcSiz ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + return ( ( HB_PARCSIZ2 ) pParcSiz )( iParam, ulArrayIndex ); + } + else + return ( ( HB_PARCSIZ ) pParcSiz )( iParam ); + } + else + return 0; +} + +char * hb_pards( int iParam, ... ) /* retrieve a date as a string yyyymmdd */ +{ + FARPROC pParDs= GetProcAddress( GetModuleHandle( NULL ), "_hb_pards" ); + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + + if( pExtIsArray && pParDs ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + return ( ( HB_PARDS2 ) pParDs )( iParam, ulArrayIndex ); + } + else + return ( ( HB_PARDS ) pParDs )( iParam ); + } + else + return ""; +} + +char * hb_pardsbuff( char * szDate, int iParam, ... ) /* retrieve a date as a string yyyymmdd */ +{ + FARPROC pParDsBuff = GetProcAddress( GetModuleHandle( NULL ), "_hb_pardsbuff" ); + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + + if( pExtIsArray && pParDsBuff ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + return ( ( HB_PARDSBUFF2 ) pParDsBuff )( szDate, iParam, ulArrayIndex ); + } + else + return ( ( HB_PARDSBUFF ) pParDsBuff )( szDate, iParam ); + } + else + return ""; +} + +int hb_parl( int iParam, ... ) /* retrieve a logical parameter as an int */ +{ + int iReturn; + FARPROC pParL=GetProcAddress( GetModuleHandle( NULL ), "_hb_parl" ); + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + + if( pExtIsArray && pParL ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + return ( ( HB_PARL2 ) pParL )( iParam, ulArrayIndex ); + } + else + return ( ( HB_PARL ) pParL )( iParam ); + } + else + return 0; +} + +double hb_parnd( int iParam, ... ) /* retrieve a numeric parameter as a double */ +{ + + FARPROC pParNd=GetProcAddress( GetModuleHandle( NULL ), "_hb_parnd" ); + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + + if( pExtIsArray && pParNd ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + return ( ( HB_PARND2 ) pParNd )( iParam, ulArrayIndex ); + } + else + return ( ( HB_PARND ) pParNd )( iParam ); + } + else + return 0; +} + +int hb_parni( int iParam, ... ) /* retrieve a numeric parameter as a integer */ +{ + int iReturn; + FARPROC pParNi=GetProcAddress( GetModuleHandle( NULL ), "_hb_parni" ); + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + + if( pExtIsArray && pParNi ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + return ( ( HB_PARNI2 ) pParNi )( iParam, ulArrayIndex ); + } + else + return ( ( HB_PARNI ) pParNi )( iParam ); + } + else + return 0; +} + +long hb_parnl( int iParam, ... ) /* retrieve a numeric parameter as a long */ +{ + + FARPROC pParNl=GetProcAddress( GetModuleHandle( NULL ), "_hb_parnl" ); + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + + if( pExtIsArray && pParNl ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + return ( ( HB_PARNL2 ) pParNl )( iParam, ulArrayIndex ); + } + else + return ( ( HB_PARNL ) pParNl )( iParam ); + } + else + return 0; +} + +void hb_storc( char * szText, int iParam, ... ) +{ + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + FARPROC pStorC = GetProcAddress( GetModuleHandle( NULL ), "_hb_storc" ); + + if( pExtIsArray && pStorC ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + ( ( HB_STORC2) pStorC )( szText, iParam, ulArrayIndex ); + } + else + ( ( HB_STORC ) pStorC )( szText, iParam ); + } +} + +void hb_storclen( char * szText, ULONG ulLen, int iParam, ... ) +{ + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + FARPROC pStorC = GetProcAddress( GetModuleHandle( NULL ), "_hb_storclen" ); + + if( pExtIsArray && pStorC ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + ( ( HB_STORCLEN2) pStorC )( szText, ulLen, iParam, ulArrayIndex ); + } + else + ( ( HB_STORCLEN ) pStorC )( szText, ulLen, iParam ); + } +} + +void hb_stords( char * szDate, int iParam, ... ) +{ + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + FARPROC pStorDs = GetProcAddress( GetModuleHandle( NULL ), "_hb_stords" ); + + if( pExtIsArray && pStorDs ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + ( ( HB_STORDS2) pStorDs )( szDate, iParam, ulArrayIndex ); + } + else + ( ( HB_STORDS ) pStorDs )( szDate, iParam ); + } +} + +void hb_storl( int iLogical, int iParam, ... ) +{ + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + FARPROC pStorL = GetProcAddress( GetModuleHandle( NULL ), "_hb_storl" ); + + if( pExtIsArray && pStorL ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + ( ( HB_STORL2) pStorL )( iLogical, iParam, ulArrayIndex ); + } + else + ( ( HB_STORL ) pStorL )( iLogical, iParam ); + } +} + +void hb_storni( int iValue, int iParam, ... ) +{ + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + FARPROC pStorNi = GetProcAddress( GetModuleHandle( NULL ), "_hb_storni" ); + + if( pExtIsArray && pStorNi ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + ( ( HB_STORNI2) pStorNi )( iValue, iParam, ulArrayIndex ); + } + else + ( ( HB_STORNI) pStorNi )( iValue, iParam ); + } +} + +void hb_stornl( long lValue, int iParam, ... ) +{ + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + FARPROC pStorNl = GetProcAddress( GetModuleHandle( NULL ), "_hb_stornl" ); + + if( pExtIsArray && pStorNl ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + ( ( HB_STORNL2) pStorNl )( lValue, iParam, ulArrayIndex ); + } + else + ( ( HB_STORNL) pStorNl )( lValue, iParam ); + } +} + +void hb_stornd( double dNumber, int iParam, ... ) +{ + FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), "_hb_extIsArray" ); + FARPROC pStorNd = GetProcAddress( GetModuleHandle( NULL ), "_hb_stornd" ); + + if( pExtIsArray && pStorNd ) + { + if( ( ( EXT_IS_ARRAY ) pExtIsArray ) ( iParam ) ) + { + va_list va; + ULONG ulArrayIndex; + + va_start( va, iParam ); + ulArrayIndex = va_arg( va, ULONG ); + va_end( va ); + + ( ( HB_STORND2) pStorNd )( dNumber, iParam, ulArrayIndex ); + } + else + ( ( HB_STORND) pStorNd )( dNumber, iParam ); + } +} + + #endif diff --git a/harbour/utils/hbmake/hbmake.prg b/harbour/utils/hbmake/hbmake.prg index a876fab041..377f19bf01 100644 --- a/harbour/utils/hbmake/hbmake.prg +++ b/harbour/utils/hbmake/hbmake.prg @@ -114,6 +114,12 @@ Local nPos, aFile := {} Local aDef := {} Local cOs:=OS() Local allParam + +If Pcount() == 0 + ShowHelp() + Return NIL +Endif + //__traceprgcalls(.t.) //Local oProfile := HBProfile():new() // __setProfiler( .T. ) @@ -126,15 +132,13 @@ Default p3 To "" Default p4 To "" Default p5 To "" Default p6 To "" + if at("OS/2",cOs)>0 lGcc:=.t. lLinux:=.t. lBcc:=.f. endif -If Pcount() == 0 - ShowHelp() - Return NIL -Endif + Allparam:=ConvertParams(@cFile, aFile, p1, p2, p3, p4, p5, p6) if len( aFile ) > 1 @@ -152,8 +156,22 @@ If empty(cFile) .and. !lEditMode Return Nil Endif -ProcessParameters(AllParam) +/* +allParam:=p1 + p2 +p3+p4 + p5 +p6 +Allparam:=ConvertParams(AllParam) +If Pcount() == 0 + ShowHelp() + Return NIL +Endif +If cFile == NIL .and. !lEditMode + ? "File not Found" + Return Nil +Endif +*/ +If Pcount() >= 1 + ProcessParameters(AllParam) +Endif //if !file(cfile) // return nil //endif @@ -319,7 +337,7 @@ While !leof elseif at('!iffile',cTemp)>0 checkiffile(cTemp) elseif at('!stdout',cTemp)>0 - checkstdout(cTemp) + checkstdout(cTemp) endif // endif Endif @@ -714,7 +732,7 @@ else /****** Extended mode *****/ outstd(hb_osnewline()) ! ( cComm ) cErrText := memoread( 'test.out' ) - lEnd := 'Error' $ cErrText + lEnd := 'Error' $ cErrText /* if file('test.out' ) ferase('test.out' ) endif*/ @@ -917,6 +935,8 @@ Local cUserdef:=space(40) Local cUserInclude:=space(40) Local aLibs,aLibsin:={},aLibsout:={} local lExternalLib:=.f. +Local cOldLib:="" +Local cHtmlLib:="" nLinkHandle := Fcreate( cFile ) WriteMakeFileHeader() @@ -1264,40 +1284,33 @@ if lRddads endif if Len(alibsout)>0 .and. lExternalLib if lvcc .or. lbcc + cOldLib:=cDefBccLibs nPos:=ascan(aLibsout,{|z| at("html",lower(z))>0 } ) if npos>0 - cLibs+=aLibsout[npos]+" "+cDefBccLibs - adel(alibsout,nPos) - asize(alibsout,len(alibsout)-1) + cHtmlLib+=aLibsout[npos] + adel(alibsout,nPos) + asize(alibsout,len(alibsout)-1) endif aeval(alibsout,{ |cLib| cLibs+=" "+cLib}) - clibs+= " "+cDefBccLibs - cDefBccLibs:=cLibs + cDefBccLibs:=cHtmlLib+" "+cOldLib+" "+cLibs endif if lGcc nPos:=ascan(aLibsout,{|z| at("html",lower(z))>0 } ) if npos>0 - if cOs=="Linux" - cLibs+="-l"+strtran(aLibsout[npos],'.a',"")+" "+cDeflibGccLibs - elseif cOs=="OS/2" - cLibs+="-l"+strtran(aLibsout[npos],'.a',"")+" "+cgcclibsos2 - else - cLibs+="-l"+strtran(aLibsout[npos],'.a',"")+" "+cDefGccLibs - endif - + cHtmlLib+="-l"+strtran(aLibsout[npos],'.a',"") adel(alibsout,nPos) asize(alibsout,len(alibsout)-1) endif aeval(alibsout,{ |cLib| cLibs+=" -l"+strtran(cLib,'.a',"")}) - if cOs=="Linux" - clibs+= " "+cDeflibGccLibs - cDeflibGccLibs:=cLibs + if cOs=="Linux" + cOldLib:= " "+cDeflibGccLibs + cDeflibGccLibs:=cHtmlLib+" "+cOldLib+" "+cLibs elseif cOs=="OS/2" - clibs+= " "+cgcclibsos2 - cgcclibsos2:=cLibs + cOldLib:= " "+cgcclibsos2 + cgcclibsos2:=cHtmlLib+" "+cOldLib+" "+cLibs else - clibs+= " "+cDefGccLibs - cDefGccLibs:=cLibs + cOldLib:= " "+cDefGccLibs + cDefGccLibs:=cHtmlLib+" "+cOldLib+" "+cLibs endif endif ENDIF @@ -1610,8 +1623,8 @@ function fileisnewer(cFile,as) local nCount := 0 IF !lextended For nCount:=1 to len(aPrgs) - adir := { cFile,, hbmake_filedate( cFile ), hbmake_filetime( cFile ), ; - as[nCount], hbmake_filedate( as[nCount] ), hbmake_filetime( as[nCount] )} + adir := { cFile,, filedate( cFile ), filetime( cFile ), ; + as[nCount], filedate( as[nCount] ), filetime( as[nCount] )} if empty( adir[ 7 ] ) adir[ 2 ] := .t. else @@ -1619,8 +1632,8 @@ For nCount:=1 to len(aPrgs) endif next else - adir := { cFile,, hbmake_filedate( cFile ), hbmake_filetime( cFile ), ; - as, hbmake_filedate( as ), hbmake_filetime( as )} + adir := { cFile,, filedate( cFile ), filetime( cFile ), ; + as, filedate( as ), filetime( as )} if empty( adir[ 7 ] ) adir[ 2 ] := .t. else @@ -2289,7 +2302,7 @@ Local cPath AS STRING := '' Local cEnv AS STRING Local aEnv AS Array of string Local nPos as Numeric -if lLinux +if lLinux cpath:="." else cEnv := Gete( "PATH" ) @@ -2305,7 +2318,6 @@ else endif Return cPath -// Function ConvertParams(cParam) Function ConvertParams(cFile, aFile, p1, p2, p3, p4, p5, p6) LOCAL cParam := "" @@ -2388,6 +2400,24 @@ Function ConvertParams(cFile, aFile, p1, p2, p3, p4, p5, p6) cParam:=strtran(cParam,"-r","-R") return cParam +/* +Function ConvertParams(cParam) + cParam:=strtran(cParam,"/","-") + cParam:=strtran(cParam,"-elx","-ELX") + cParam:=strtran(cParam,"-el","-ELX") + cParam:=strtran(cParam,"-ex","-EX") + cParam:=strtran(cParam,"-e","-EX") + cParam:=strtran(cParam,"-i","-I") + cParam:=strtran(cParam,"-p","-P") + cParam:=strtran(cParam,"-b","-B") + cParam:=strtran(cParam,"-gl","-GL") + cParam:=strtran(cParam,"-g","-G") + cParam:=strtran(cParam,"-v","-V") + cParam:=strtran(cParam,"-f","-F") + cParam:=strtran(cParam,"-r","-R") +return cParam +*/ + Function ShowHelp() Local cOs:=OS() ?? "Harbour Make Utility"