From 03caef2ec23c09fcaedf62a5d9c76a706ee88fa1 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 2 Jul 2009 14:18:06 +0000 Subject: [PATCH] 2009-07-02 15:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbcomp.h * include/hbcompdf.h * include/hbapifs.h * include/hbexprop.h * include/hbmacro.h * include/hbapi.h * include/hbapiitm.h * include/hbdate.h * source/pp/ppcore.c * source/vm/itemapi.c * source/vm/arrays.c * source/vm/extend.c * source/common/expropt1.c * source/rtl/philes.c * source/rtl/empty.c * source/rtl/minmax.c * source/rtl/dates.c * source/rtl/filesys.c * source/rdd/dbfnsx/dbfnsx1.c * source/rdd/dbfcdx/dbfcdx1.c * source/rdd/dbf1.c * source/rdd/dbffpt/dbffpt1.c * source/rdd/hbsix/sxdate.c * source/compiler/hbmain.c * source/compiler/complex.c * source/compiler/harbour.yyc * source/compiler/harbour.y * contrib/hbct/files.c * contrib/hbct/dattime2.c * contrib/hbct/datetime.c * contrib/xhb/filestat.c * contrib/hbtip/utils.c * examples/hboleold/win_ole.c * LONG -> long for date/time related values (julian, date, type, millisec) ; This is an effort to clean Harbour sources from Windows/legacy-Clipper basic types and replace them with own or ANSI C ones. In the above case, usage wasn't consistent, LONG and long were mixed. * source/main/harbour.c * source/vm/fm.c * LONG -> long for some stat counters. --- harbour/ChangeLog | 46 +++++++++++++++++++++++++++++ harbour/contrib/hbct/datetime.c | 14 ++++----- harbour/contrib/hbct/dattime2.c | 10 +++---- harbour/contrib/hbct/files.c | 2 +- harbour/contrib/hbtip/utils.c | 2 +- harbour/contrib/xhb/filestat.c | 10 +++---- harbour/examples/hboleold/win_ole.c | 14 ++++----- harbour/include/hbapi.h | 22 +++++++------- harbour/include/hbapifs.h | 4 +-- harbour/include/hbapiitm.h | 4 +-- harbour/include/hbcomp.h | 4 +-- harbour/include/hbcompdf.h | 4 +-- harbour/include/hbdate.h | 30 +++++++++---------- harbour/include/hbexprop.h | 4 +-- harbour/include/hbmacro.h | 4 +-- harbour/source/common/expropt1.c | 10 +++---- harbour/source/compiler/complex.c | 16 +++++----- harbour/source/compiler/harbour.y | 2 +- harbour/source/compiler/harbour.yyc | 3 +- harbour/source/compiler/hbmain.c | 4 +-- harbour/source/main/harbour.c | 8 ++--- harbour/source/pp/ppcore.c | 2 +- harbour/source/rdd/dbf1.c | 4 +-- harbour/source/rdd/dbfcdx/dbfcdx1.c | 2 +- harbour/source/rdd/dbffpt/dbffpt1.c | 24 +++++++-------- harbour/source/rdd/dbfnsx/dbfnsx1.c | 2 +- harbour/source/rdd/hbsix/sxdate.c | 8 ++--- harbour/source/rtl/dates.c | 8 ++--- harbour/source/rtl/empty.c | 3 +- harbour/source/rtl/filesys.c | 40 ++++++++++++------------- harbour/source/rtl/minmax.c | 8 ++--- harbour/source/rtl/philes.c | 4 +-- harbour/source/vm/arrays.c | 8 ++--- harbour/source/vm/extend.c | 14 ++++----- harbour/source/vm/fm.c | 8 ++--- harbour/source/vm/itemapi.c | 30 +++++++++---------- 36 files changed, 213 insertions(+), 169 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 141d30fa8c..0c16fa6144 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,52 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-02 15:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * include/hbcomp.h + * include/hbcompdf.h + * include/hbapifs.h + * include/hbexprop.h + * include/hbmacro.h + * include/hbapi.h + * include/hbapiitm.h + * include/hbdate.h + * source/pp/ppcore.c + * source/vm/itemapi.c + * source/vm/arrays.c + * source/vm/extend.c + * source/common/expropt1.c + * source/rtl/philes.c + * source/rtl/empty.c + * source/rtl/minmax.c + * source/rtl/dates.c + * source/rtl/filesys.c + * source/rdd/dbfnsx/dbfnsx1.c + * source/rdd/dbfcdx/dbfcdx1.c + * source/rdd/dbf1.c + * source/rdd/dbffpt/dbffpt1.c + * source/rdd/hbsix/sxdate.c + * source/compiler/hbmain.c + * source/compiler/complex.c + * source/compiler/harbour.yyc + * source/compiler/harbour.y + * contrib/hbct/files.c + * contrib/hbct/dattime2.c + * contrib/hbct/datetime.c + * contrib/xhb/filestat.c + * contrib/hbtip/utils.c + * examples/hboleold/win_ole.c + * LONG -> long for date/time related values + (julian, date, type, millisec) + ; This is an effort to clean Harbour sources from + Windows/legacy-Clipper basic types and replace + them with own or ANSI C ones. + In the above case, usage wasn't consistent, + LONG and long were mixed. + + * source/main/harbour.c + * source/vm/fm.c + * LONG -> long for some stat counters. + 2009-07-02 14:38 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/gtqtc/gtqtc.cpp - Deleted commented Windows specific parts. diff --git a/harbour/contrib/hbct/datetime.c b/harbour/contrib/hbct/datetime.c index a1a77da983..113a162d97 100644 --- a/harbour/contrib/hbct/datetime.c +++ b/harbour/contrib/hbct/datetime.c @@ -100,7 +100,7 @@ HB_FUNC( BOM ) { - LONG lDate; + long lDate; int iYear, iMonth, iDay; if( HB_ISNIL( 1 ) ) @@ -155,7 +155,7 @@ HB_FUNC( BOM ) HB_FUNC( EOM ) { - LONG lDate; + long lDate; int iYear, iMonth, iDay; if( HB_ISNIL( 1 ) ) @@ -216,7 +216,7 @@ HB_FUNC( EOM ) HB_FUNC( BOQ ) { - LONG lDate; + long lDate; int iYear, iMonth, iDay; if( HB_ISNIL( 1 ) ) @@ -273,7 +273,7 @@ HB_FUNC( BOQ ) HB_FUNC( EOQ ) { - LONG lDate; + long lDate; int iYear, iMonth, iDay; if( HB_ISNIL( 1 ) ) @@ -335,7 +335,7 @@ HB_FUNC( EOQ ) HB_FUNC( BOY ) { - LONG lDate; + long lDate; int iYear, iMonth, iDay; if( HB_ISNIL( 1 ) ) @@ -390,7 +390,7 @@ HB_FUNC( BOY ) HB_FUNC( EOY ) { - LONG lDate; + long lDate; int iYear, iMonth, iDay; if( HB_ISNIL( 1 ) ) @@ -430,7 +430,7 @@ static int hb_wom( int iYear, int iMonth, int iDay ) HB_FUNC( WOM ) { - LONG lDate; + long lDate; int iYear, iMonth, iDay; if( HB_ISNIL( 1 ) ) diff --git a/harbour/contrib/hbct/dattime2.c b/harbour/contrib/hbct/dattime2.c index 5db8f06bab..5e8beeef12 100644 --- a/harbour/contrib/hbct/dattime2.c +++ b/harbour/contrib/hbct/dattime2.c @@ -101,10 +101,10 @@ static int ct_daystomonth( int iMonth, BOOL bLeap ) ( ( bLeap && iMonth > 2 ) ? 1 : 0 ) ); } -static int ct_doy( LONG lDate ) +static int ct_doy( long lDate ) { int iYear, iMonth, iDay; - LONG lFirst; + long lFirst; hb_dateDecode( lDate, &iYear, &iMonth, &iDay ); lFirst = hb_dateEncode( iYear, 1, 1 ); @@ -500,7 +500,7 @@ HB_FUNC( ADDMONTH ) */ HB_FUNC( DOY ) { - LONG lDate; + long lDate; if( HB_ISDATETIME( 1 ) ) { @@ -843,7 +843,7 @@ HB_FUNC( NTOCMONTH ) HB_FUNC( WEEK ) { int iYear, iMonth, iDay, iWeek; - LONG lDate; + long lDate; BOOL bSWN = ( HB_ISLOG( 2 ) ? hb_parl( 2 ) : FALSE ); if( HB_ISDATETIME( 1 ) ) @@ -872,7 +872,7 @@ HB_FUNC( WEEK ) } else { - LONG lDate2; + long lDate2; if( hb_setGetCPtr( HB_SET_DATEFORMAT ) && ( hb_setGetCPtr( HB_SET_DATEFORMAT )[0] == 'd' || hb_setGetCPtr( HB_SET_DATEFORMAT )[0] == 'D' ) ) diff --git a/harbour/contrib/hbct/files.c b/harbour/contrib/hbct/files.c index e10ae60236..c564f5e2a9 100644 --- a/harbour/contrib/hbct/files.c +++ b/harbour/contrib/hbct/files.c @@ -228,7 +228,7 @@ HB_FUNC( SETFDATI ) if( szFile && *szFile ) { PHB_ITEM pDate, pTime; - LONG lJulian, lMillisec; + long lJulian, lMillisec; if( HB_ISTIMESTAMP( 1 ) ) hb_partdt( &lJulian, &lMillisec, 1 ); diff --git a/harbour/contrib/hbtip/utils.c b/harbour/contrib/hbtip/utils.c index 5ca7c2b49a..1f6c4ba6e0 100644 --- a/harbour/contrib/hbtip/utils.c +++ b/harbour/contrib/hbtip/utils.c @@ -93,7 +93,7 @@ HB_FUNC( TIP_TIMESTAMP ) #ifdef HB_OS_WIN TIME_ZONE_INFORMATION tzInfo; - LONG lDate; + long lDate; int iYear, iMonth, iDay; const char *days[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; const char *months[] = { diff --git a/harbour/contrib/xhb/filestat.c b/harbour/contrib/xhb/filestat.c index a52a1e913e..e080a0ccd3 100644 --- a/harbour/contrib/xhb/filestat.c +++ b/harbour/contrib/xhb/filestat.c @@ -74,10 +74,10 @@ static BOOL hb_fsFileStats( const char *pszFileName, BYTE *pszAttr, HB_FOFFSET *llSize, - LONG *lcDate, - LONG *lcTime, - LONG *lmDate, - LONG *lmTime ) + long *lcDate, + long *lcTime, + long *lmDate, + long *lmTime ) { BOOL fResult = FALSE; @@ -268,7 +268,7 @@ HB_FUNC( FILESTATS ) BYTE szAttr[ 21 ]; const char * szFile = hb_parc( 1 ); HB_FOFFSET lSize = 0; - LONG lcDate = 0, lcTime = 0, lmDate = 0, lmTime = 0; + long lcDate = 0, lcTime = 0, lmDate = 0, lmTime = 0; /* Parameter checking */ if( !szFile || !*szFile ) diff --git a/harbour/examples/hboleold/win_ole.c b/harbour/examples/hboleold/win_ole.c index 3cc467239a..7484f5c092 100644 --- a/harbour/examples/hboleold/win_ole.c +++ b/harbour/examples/hboleold/win_ole.c @@ -797,11 +797,11 @@ static void FreeParams( DISPPARAMS *pDispParams, PHB_ITEM *aPrgParams ) break; case VT_BYREF | VT_I4: - hb_itemPutNL( pItem, ( LONG ) *pVariant->n1.n2.n3.plVal ); + hb_itemPutNL( pItem, ( long ) *pVariant->n1.n2.n3.plVal ); break; case VT_I4: - hb_itemPutNL( pItem, ( LONG ) pVariant->n1.n2.n3.lVal ); + hb_itemPutNL( pItem, ( long ) pVariant->n1.n2.n3.lVal ); break; #ifndef HB_LONG_LONG_OFF @@ -990,7 +990,7 @@ static PHB_ITEM SafeArrayToArray( SAFEARRAY * parray, UINT iDim, long * rgIndice /* Wrap our array with VTArrayWrapper() class ( aArray := VTArrayWrapper( vt, aArray) ) */ if( HB_IS_ARRAY( pArray ) && vt != VT_VARIANT ) { - PHB_ITEM pVT = hb_itemPutNL( hb_itemNew( NULL ), ( LONG ) vt ); + PHB_ITEM pVT = hb_itemPutNL( hb_itemNew( NULL ), ( long ) vt ); hb_vmPushDynSym( s_pSym_VTArrayWrapper ); hb_vmPushNil(); @@ -1076,7 +1076,7 @@ HRESULT hb_oleVariantToItem( PHB_ITEM pItem, VARIANT *pVariant ) { if( pUnk ) { - PHB_ITEM pVT = hb_itemPutNL( hb_itemNew( NULL ), ( LONG ) pVariant->n1.n2.vt ); + PHB_ITEM pVT = hb_itemPutNL( hb_itemNew( NULL ), ( long ) pVariant->n1.n2.vt ); PHB_ITEM pUnknown = hb_itemPutPtr( hb_itemNew( NULL ), ( void * ) pUnk ); hb_vmPushDynSym( s_pSym_VTWrapper ); @@ -1152,14 +1152,14 @@ HRESULT hb_oleVariantToItem( PHB_ITEM pItem, VARIANT *pVariant ) case VT_UI4 | VT_BYREF: case VT_INT | VT_BYREF: case VT_UINT | VT_BYREF: - hb_itemPutNL( pItem, ( LONG ) *pVariant->n1.n2.n3.plVal ); + hb_itemPutNL( pItem, ( long ) *pVariant->n1.n2.n3.plVal ); break; case VT_I4: /* Long (4 bytes) */ case VT_UI4: case VT_INT: case VT_UINT: - hb_itemPutNL( pItem, ( LONG ) pVariant->n1.n2.n3.lVal ); + hb_itemPutNL( pItem, ( long ) pVariant->n1.n2.n3.lVal ); break; case VT_R4 | VT_BYREF: /* Single */ @@ -1645,7 +1645,7 @@ static void OleThrowError( void ) /*HB_TRACE(HB_TR_INFO, ("Desc: '%s'\n", sDescription));*/ - pReturn = hb_errRT_SubstParams( hb_parcx( -1 ), EG_OLEEXCEPTION, (ULONG) s_nOleError, sDescription, hb_itemGetSymbol( hb_stackBaseItem() )->szName ); + pReturn = hb_errRT_SubstParams( hb_parcx( -1 ), EG_OLEEXCEPTION, ( ULONG ) s_nOleError, sDescription, hb_itemGetSymbol( hb_stackBaseItem() )->szName ); if( fFree ) { diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index 3506db0a3d..2aa3f442c2 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -615,9 +615,9 @@ extern HB_EXPORT ULONG hb_parclen( int iParam ); /* retrieve a string par extern HB_EXPORT ULONG hb_parcsiz( int iParam ); /* retrieve a by-reference string parameter length, including terminator */ extern HB_EXPORT const char * hb_pards( int iParam ); /* retrieve a date as a string YYYYMMDD */ extern HB_EXPORT char * hb_pardsbuff( char * szDate, int iParam ); /* retrieve a date as a string YYYYMMDD */ -extern HB_EXPORT LONG hb_pardl( int iParam ); /* retrieve a date as a LONG NUMBER */ +extern HB_EXPORT long hb_pardl( int iParam ); /* retrieve a date as a long integer */ extern HB_EXPORT double hb_partd( int iParam ); /* retrieve a timestamp as a double number */ -extern HB_EXPORT BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam ); /* retrieve a timestamp as two long numbers */ +extern HB_EXPORT BOOL hb_partdt( long * plJulian, long * plMilliSec , int iParam ); /* retrieve a timestamp as two long numbers */ extern HB_EXPORT int hb_parl( int iParam ); /* retrieve a logical parameter as an int */ extern HB_EXPORT double hb_parnd( int iParam ); /* retrieve a numeric parameter as a double */ extern HB_EXPORT int hb_parni( int iParam ); /* retrieve a numeric parameter as a integer */ @@ -635,9 +635,9 @@ extern HB_EXPORT ULONG hb_parvclen( int iParam, ... ); /* retrieve a stri extern HB_EXPORT ULONG hb_parvcsiz( int iParam, ... ); /* retrieve a by-reference string parameter length, including terminator */ extern HB_EXPORT const char * hb_parvds( int iParam, ... ); /* retrieve a date as a string YYYYMMDD */ extern HB_EXPORT char * hb_parvdsbuff( char * szDate, int iParam, ... ); /* retrieve a date as a string YYYYMMDD */ -extern HB_EXPORT LONG hb_parvdl( int iParam, ... ); /* retrieve a date as a LONG NUMBER */ +extern HB_EXPORT long hb_parvdl( int iParam, ... ); /* retrieve a date as a long integer */ extern HB_EXPORT double hb_parvtd( int iParam, ... ); /* retrieve a timestamp as a double number */ -extern HB_EXPORT BOOL hb_parvtdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... ); /* retrieve a timestamp as two long numbers */ +extern HB_EXPORT BOOL hb_parvtdt( long * plJulian, long * plMilliSec , int iParam, ... ); /* retrieve a timestamp as two long numbers */ extern HB_EXPORT int hb_parvl( int iParam, ... ); /* retrieve a logical parameter as an int */ extern HB_EXPORT double hb_parvnd( int iParam, ... ); /* retrieve a numeric parameter as a double */ extern HB_EXPORT int hb_parvni( int iParam, ... ); /* retrieve a numeric parameter as a integer */ @@ -661,7 +661,7 @@ extern HB_EXPORT void hb_retds( const char * szDate ); /* returns a date, mus extern HB_EXPORT void hb_retd( int iYear, int iMonth, int iDay ); /* returns a date */ extern HB_EXPORT void hb_retdl( long lJulian ); /* returns a long value as a julian date */ extern HB_EXPORT void hb_rettd( double dTimeStamp ); /* returns a double value as a timestamp */ -extern HB_EXPORT void hb_rettdt( LONG lJulian, LONG lMilliSec ); /* returns two long values as a timestamp */ +extern HB_EXPORT void hb_rettdt( long lJulian, long lMilliSec ); /* returns two long values as a timestamp */ extern HB_EXPORT void hb_retl( int iTrueFalse ); /* returns a logical integer */ extern HB_EXPORT void hb_retnd( double dNumber ); /* returns a double */ extern HB_EXPORT void hb_retni( int iNumber ); /* returns a integer number */ @@ -730,7 +730,7 @@ extern HB_EXPORT int hb_storclen_buffer( char * szText, ULONG ulLength, int i extern HB_EXPORT int hb_stords( const char * szDate, int iParam ); /* szDate must have YYYYMMDD format */ extern HB_EXPORT int hb_stordl( long lJulian, int iParam ); /* lJulian must be a date in Julian format */ extern HB_EXPORT int hb_stortd( double dTimeStamp, int iParam ); /* stores a double value as timestamp on a variable by reference */ -extern HB_EXPORT int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam ); /* stores two long values as timestamp on a variable by reference */ +extern HB_EXPORT int hb_stortdt( long lJulian, long lMilliSec, int iParam ); /* stores two long values as timestamp on a variable by reference */ extern HB_EXPORT int hb_storl( int iLogical, int iParam ); /* stores a logical integer on a variable by reference */ extern HB_EXPORT int hb_storni( int iValue, int iParam ); /* stores an integer on a variable by reference */ extern HB_EXPORT int hb_stornl( long lValue, int iParam ); /* stores a long on a variable by reference */ @@ -748,7 +748,7 @@ extern HB_EXPORT int hb_storvclen_buffer( char * szText, ULONG ulLength, int extern HB_EXPORT int hb_storvds( const char * szDate, int iParam, ... ); /* szDate must have YYYYMMDD format */ extern HB_EXPORT int hb_storvdl( long lJulian, int iParam, ... ); /* lJulian must be a date in Julian format */ extern HB_EXPORT int hb_storvtd( double dTimeStamp, int iParam, ... ); /* stores a double value as timestamp on a variable by reference */ -extern HB_EXPORT int hb_storvtdt( LONG lJulian, LONG lMilliSec, int iParam, ... ); /* stores two long values as timestamp on a variable by reference */ +extern HB_EXPORT int hb_storvtdt( long lJulian, long lMilliSec, int iParam, ... ); /* stores two long values as timestamp on a variable by reference */ extern HB_EXPORT int hb_storvl( int iLogical, int iParam, ... ); /* stores a logical integer on a variable by reference */ extern HB_EXPORT int hb_storvni( int iValue, int iParam, ... ); /* stores an integer on a variable by reference */ extern HB_EXPORT int hb_storvnl( long lValue, int iParam, ... ); /* stores a long on a variable by reference */ @@ -790,17 +790,17 @@ extern HB_EXPORT double hb_arrayGetND( PHB_ITEM pArray, ULONG ulIndex ); / extern HB_EXPORT char * hb_arrayGetDS( PHB_ITEM pArray, ULONG ulIndex, char * szDate ); /* retrieves the date value contained in an array element */ extern HB_EXPORT long hb_arrayGetDL( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the date value contained in an array element, as a long integer */ extern HB_EXPORT double hb_arrayGetTD( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the timestamp value contained in an array element, as a double value */ -extern HB_EXPORT BOOL hb_arrayGetTDT( PHB_ITEM pArray, ULONG ulIndex, LONG * plJulian, LONG * plMilliSec ); /* retrieves the timestamp value contained in an array element, as two long values */ +extern HB_EXPORT BOOL hb_arrayGetTDT( PHB_ITEM pArray, ULONG ulIndex, long * plJulian, long * plMilliSec ); /* retrieves the timestamp value contained in an array element, as two long values */ extern HB_EXPORT HB_TYPE hb_arrayGetType( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the type of an array item */ extern HB_EXPORT BOOL hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); /* sets an array element */ extern HB_EXPORT BOOL hb_arraySetForward( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); /* sets an array element by forwarding it's value */ extern HB_EXPORT BOOL hb_arraySetDS( PHB_ITEM pArray, ULONG ulIndex, const char * szDate ); -extern HB_EXPORT BOOL hb_arraySetDL( PHB_ITEM pArray, ULONG ulIndex, LONG lDate ); +extern HB_EXPORT BOOL hb_arraySetDL( PHB_ITEM pArray, ULONG ulIndex, long lDate ); extern HB_EXPORT BOOL hb_arraySetTD( PHB_ITEM pArray, ULONG ulIndex, double dTimeStamp ); -extern HB_EXPORT BOOL hb_arraySetTDT( PHB_ITEM pArray, ULONG ulIndex, LONG lJulian, LONG lMilliSec ); +extern HB_EXPORT BOOL hb_arraySetTDT( PHB_ITEM pArray, ULONG ulIndex, long lJulian, long lMilliSec ); extern HB_EXPORT BOOL hb_arraySetL( PHB_ITEM pArray, ULONG ulIndex, BOOL fValue ); extern HB_EXPORT BOOL hb_arraySetNI( PHB_ITEM pArray, ULONG ulIndex, int iNumber ); -extern HB_EXPORT BOOL hb_arraySetNL( PHB_ITEM pArray, ULONG ulIndex, LONG lNumber ); +extern HB_EXPORT BOOL hb_arraySetNL( PHB_ITEM pArray, ULONG ulIndex, long lNumber ); #ifndef HB_LONG_LONG_OFF extern HB_EXPORT BOOL hb_arraySetNLL( PHB_ITEM pArray, ULONG ulIndex, LONGLONG llNumber ); #endif diff --git a/harbour/include/hbapifs.h b/harbour/include/hbapifs.h index b31af71eda..22e1d48a8d 100644 --- a/harbour/include/hbapifs.h +++ b/harbour/include/hbapifs.h @@ -193,8 +193,8 @@ extern HB_EXPORT ULONG hb_fsSeek ( HB_FHANDLE hFileHandle, LONG lOff extern HB_EXPORT HB_FOFFSET hb_fsSeekLarge ( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, USHORT uiFlags ); /* reposition an open file using 64bit API */ extern HB_EXPORT ULONG hb_fsTell ( HB_FHANDLE hFileHandle ); /* retrieve the current position of a file */ extern HB_EXPORT BOOL hb_fsSetDevMode ( HB_FHANDLE hFileHandle, USHORT uiDevMode ); /* change the device mode of a file (text/binary) */ -extern HB_EXPORT BOOL hb_fsGetFileTime ( const char * pszFileName, LONG * plJulian, LONG * plMillisec ); -extern HB_EXPORT BOOL hb_fsSetFileTime ( const char * pszFileName, LONG lJulian, LONG lMillisec ); +extern HB_EXPORT BOOL hb_fsGetFileTime ( const char * pszFileName, long * plJulian, long * plMillisec ); +extern HB_EXPORT BOOL hb_fsSetFileTime ( const char * pszFileName, long lJulian, long lMillisec ); extern HB_EXPORT BOOL hb_fsGetAttr ( const char * pszFileName, ULONG * pulAttr ); extern HB_EXPORT BOOL hb_fsSetAttr ( const char * pszFileName, ULONG ulAttr ); extern HB_EXPORT void hb_fsSetError ( USHORT uiError ); /* set the file system DOS error number */ diff --git a/harbour/include/hbapiitm.h b/harbour/include/hbapiitm.h index 1756643eb4..c3da6311b8 100644 --- a/harbour/include/hbapiitm.h +++ b/harbour/include/hbapiitm.h @@ -91,7 +91,7 @@ extern HB_EXPORT char * hb_itemGetDS ( PHB_ITEM pItem, char * szDate ) extern HB_EXPORT char * hb_itemGetTS ( PHB_ITEM pItem, char * szDateTime ); extern HB_EXPORT long hb_itemGetDL ( PHB_ITEM pItem ); extern HB_EXPORT double hb_itemGetTD ( PHB_ITEM pItem ); -extern HB_EXPORT BOOL hb_itemGetTDT ( PHB_ITEM pItem, LONG * plJulian, LONG * plMilliSec ); +extern HB_EXPORT BOOL hb_itemGetTDT ( PHB_ITEM pItem, long * plJulian, long * plMilliSec ); extern HB_EXPORT BOOL hb_itemGetL ( PHB_ITEM pItem ); extern HB_EXPORT double hb_itemGetND ( PHB_ITEM pItem ); extern HB_EXPORT double hb_itemGetNDDec ( PHB_ITEM pItem, int * piDec ); @@ -118,7 +118,7 @@ extern HB_EXPORT PHB_ITEM hb_itemPutDS ( PHB_ITEM pItem, const char * sz extern HB_EXPORT PHB_ITEM hb_itemPutTS ( PHB_ITEM pItem, const char * szDateTime ); extern HB_EXPORT PHB_ITEM hb_itemPutDL ( PHB_ITEM pItem, long lJulian ); extern HB_EXPORT PHB_ITEM hb_itemPutTD ( PHB_ITEM pItem, double dTimeStamp ); -extern HB_EXPORT PHB_ITEM hb_itemPutTDT ( PHB_ITEM pItem, LONG lJulian, LONG lMilliSec ); +extern HB_EXPORT PHB_ITEM hb_itemPutTDT ( PHB_ITEM pItem, long lJulian, long lMilliSec ); extern HB_EXPORT PHB_ITEM hb_itemPutL ( PHB_ITEM pItem, BOOL bValue ); extern HB_EXPORT PHB_ITEM hb_itemPutND ( PHB_ITEM pItem, double dNumber ); extern HB_EXPORT PHB_ITEM hb_itemPutNI ( PHB_ITEM pItem, int iNumber ); diff --git a/harbour/include/hbcomp.h b/harbour/include/hbcomp.h index 17359e35c0..9a2ca994b3 100644 --- a/harbour/include/hbcomp.h +++ b/harbour/include/hbcomp.h @@ -208,8 +208,8 @@ extern void hb_compGenPushMemvarRef( const char * szVarName, HB_COMP_DECL ); extern void hb_compGenPushInteger( int iNumber, HB_COMP_DECL ); /* Pushes a integer number on the virtual machine stack */ extern void hb_compGenPushLogical( int iTrueFalse, HB_COMP_DECL ); /* pushes a logical value on the virtual machine stack */ extern void hb_compGenPushLong( HB_LONG lNumber, HB_COMP_DECL ); /* Pushes a long number on the virtual machine stack */ -extern void hb_compGenPushDate( LONG lDate, HB_COMP_DECL ); /* Pushes a date constant on the virtual machine stack */ -extern void hb_compGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL ); /* Pushes a timestamp constant on the virtual machine stack */ +extern void hb_compGenPushDate( long lDate, HB_COMP_DECL ); /* Pushes a date constant on the virtual machine stack */ +extern void hb_compGenPushTimeStamp( long lDate, long lTime, HB_COMP_DECL ); /* Pushes a timestamp constant on the virtual machine stack */ extern void hb_compGenPushNil( HB_COMP_DECL ); /* Pushes nil on the virtual machine stack */ extern void hb_compGenPushString( const char * szText, ULONG ulLen, HB_COMP_DECL ); /* Pushes a string on the virtual machine stack */ extern void hb_compGenPushSymbol( const char * szSymbolName, BOOL bFunction, HB_COMP_DECL ); /* Pushes a symbol on to the Virtual machine stack */ diff --git a/harbour/include/hbcompdf.h b/harbour/include/hbcompdf.h index 6b56843245..f7b9c26f5a 100644 --- a/harbour/include/hbcompdf.h +++ b/harbour/include/hbcompdf.h @@ -271,8 +271,8 @@ typedef struct HB_EXPR_ } asNum; struct { - LONG lDate; /* julian date */ - LONG lTime; /* time in milliseconds */ + long lDate; /* julian date */ + long lTime; /* time in milliseconds */ } asDate; struct { diff --git a/harbour/include/hbdate.h b/harbour/include/hbdate.h index 4b7de94f15..93e15943e6 100644 --- a/harbour/include/hbdate.h +++ b/harbour/include/hbdate.h @@ -75,7 +75,7 @@ extern HB_EXPORT void hb_dateStrGet( const char * szDate, int * piYear, int * extern HB_EXPORT char * hb_dateDecStr( char * szDate, long lJulian ); extern HB_EXPORT long hb_dateEncStr( const char * szDate ); extern HB_EXPORT int hb_dateDOW( int iYear, int iMonth, int iDay ); -extern HB_EXPORT int hb_dateJulianDOW( LONG lJulian ); +extern HB_EXPORT int hb_dateJulianDOW( long lJulian ); /* RTL functions */ extern HB_EXPORT const char * hb_dateCMonth( int iMonth ); @@ -85,10 +85,10 @@ extern HB_EXPORT long hb_dateUnformat( const char * szDate, const char * /* functions to operate on time values */ -extern HB_EXPORT LONG hb_timeEncode( int iHour, int iMinutes, int iSeconds, int iMSec ); -extern HB_EXPORT void hb_timeDecode( LONG lMilliSec, int * piHour, int * piMinutes, +extern HB_EXPORT long hb_timeEncode( int iHour, int iMinutes, int iSeconds, int iMSec ); +extern HB_EXPORT void hb_timeDecode( long lMilliSec, int * piHour, int * piMinutes, int * piSeconds, int * piMSec ); -extern HB_EXPORT char * hb_timeStr( char * szTime, LONG lMilliSec ); +extern HB_EXPORT char * hb_timeStr( char * szTime, long lMilliSec ); extern HB_EXPORT BOOL hb_timeStrGet( const char * szTime, int * piHour, int * piMinutes, int * piSeconds, int * piMSec ); @@ -102,22 +102,22 @@ extern HB_EXPORT void hb_timeStrRawGet( const char * szTime, extern HB_EXPORT void hb_timeStampGetLocal( int * piYear, int * piMonth, int * piDay, int * piHour, int * piMinutes, int * piSeconds, int * piMSec ); -extern HB_EXPORT void hb_timeStampGet( LONG * plJulian, LONG * plMilliSec ); +extern HB_EXPORT void hb_timeStampGet( long * plJulian, long * plMilliSec ); -extern HB_EXPORT char * hb_timeStampStrRawPut( char * szDateTime, LONG lJulian, LONG lMilliSec ); -extern HB_EXPORT void hb_timeStampStrRawGet( const char * szDateTime, LONG * plJulian, LONG * plMilliSec ); +extern HB_EXPORT char * hb_timeStampStrRawPut( char * szDateTime, long lJulian, long lMilliSec ); +extern HB_EXPORT void hb_timeStampStrRawGet( const char * szDateTime, long * plJulian, long * plMilliSec ); -extern HB_EXPORT char * hb_timeStampStr( char * szDateTime, LONG lJulian, LONG lMilliSec ); +extern HB_EXPORT char * hb_timeStampStr( char * szDateTime, long lJulian, long lMilliSec ); extern HB_EXPORT BOOL hb_timeStampStrGet( const char * szDateTime, int * piYear, int * piMonth, int * piDay, int * piHour, int * piMinutes, int * piSeconds, int * piMSec ); extern HB_EXPORT BOOL hb_timeStampStrGetDT( const char * szDateTime, - LONG * plJulian, LONG * plMilliSec ); + long * plJulian, long * plMilliSec ); -extern HB_EXPORT double hb_timeStampPackDT( LONG lJulian, LONG lMilliSec ); +extern HB_EXPORT double hb_timeStampPackDT( long lJulian, long lMilliSec ); extern HB_EXPORT void hb_timeStampUnpackDT( double dTimeStamp, - LONG * plJulian, LONG * plMilliSec ); + long * plJulian, long * plMilliSec ); extern HB_EXPORT double hb_timeStampPack( int iYear, int iMonth, int iDay, int iHour, int iMinutes, int iSeconds, int iMSec ); extern HB_EXPORT void hb_timeStampUnpack( double dTimeStamp, @@ -131,15 +131,15 @@ extern HB_EXPORT void hb_timeStampUnpackD( double dTimeStamp, int * piHour, int * piMinutes, double * pdSeconds ); /* RTL functions */ -extern HB_EXPORT char * hb_timeFormat( char * szBuffer, const char * szTimeFormat, LONG lMilliSec ); +extern HB_EXPORT char * hb_timeFormat( char * szBuffer, const char * szTimeFormat, long lMilliSec ); extern HB_EXPORT char * hb_timeStampFormat( char * szBuffer, const char * szDateFormat, const char * szTimeFormat, - LONG lJulian, LONG lMilliSec ); + long lJulian, long lMilliSec ); -extern HB_EXPORT LONG hb_timeUnformat( const char * szTime, const char * szTimeFormat ); +extern HB_EXPORT long hb_timeUnformat( const char * szTime, const char * szTimeFormat ); extern HB_EXPORT void hb_timeStampUnformat( const char * szDateTime, const char * szDateFormat, const char * szTimeFormat, - LONG * plJulian, LONG * plMilliSec ); + long * plJulian, long * plMilliSec ); HB_EXTERN_END diff --git a/harbour/include/hbexprop.h b/harbour/include/hbexprop.h index 6e398780ed..7e1771a317 100644 --- a/harbour/include/hbexprop.h +++ b/harbour/include/hbexprop.h @@ -85,8 +85,8 @@ extern HB_EXPR_PTR hb_compExprNewEmpty( HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewNil( HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewDouble( double, BYTE, BYTE, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewLong( HB_LONG, HB_COMP_DECL ); -extern HB_EXPR_PTR hb_compExprNewDate( LONG, HB_COMP_DECL ); -extern HB_EXPR_PTR hb_compExprNewTimeStamp( LONG, LONG, HB_COMP_DECL ); +extern HB_EXPR_PTR hb_compExprNewDate( long, HB_COMP_DECL ); +extern HB_EXPR_PTR hb_compExprNewTimeStamp( long, long, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewString( const char *, ULONG, BOOL, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewLogical( int, HB_COMP_DECL ); extern HB_EXPR_PTR hb_compExprNewSelf( HB_COMP_DECL ); diff --git a/harbour/include/hbmacro.h b/harbour/include/hbmacro.h index c8ba49bf94..4c122fbbab 100644 --- a/harbour/include/hbmacro.h +++ b/harbour/include/hbmacro.h @@ -130,8 +130,8 @@ extern ULONG hb_macroGenJumpTrue( LONG lOffset, HB_COMP_DECL ); extern void hb_macroGenPushSymbol( const char * szSymbolName, BOOL bFunction, HB_COMP_DECL ); extern void hb_macroGenPushLong( HB_LONG lNumber, HB_COMP_DECL ); -extern void hb_macroGenPushDate( LONG lDate, HB_COMP_DECL ); -extern void hb_macroGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL ); +extern void hb_macroGenPushDate( long lDate, HB_COMP_DECL ); +extern void hb_macroGenPushTimeStamp( long lDate, long lTime, HB_COMP_DECL ); extern void hb_macroGenMessage( const char * szMsgName, BOOL bIsObject, HB_COMP_DECL ); extern void hb_macroGenMessageData( const char * szMsg, BOOL bIsObject, HB_COMP_DECL ); extern void hb_macroGenPopVar( const char * szVarName, HB_COMP_DECL ); diff --git a/harbour/source/common/expropt1.c b/harbour/source/common/expropt1.c index 0a378e5946..5128aa4f1a 100644 --- a/harbour/source/common/expropt1.c +++ b/harbour/source/common/expropt1.c @@ -337,7 +337,7 @@ HB_EXPR_PTR hb_compExprNewLong( HB_LONG lValue, HB_COMP_DECL ) return pExpr; } -HB_EXPR_PTR hb_compExprNewDate( LONG lDate, HB_COMP_DECL ) +HB_EXPR_PTR hb_compExprNewDate( long lDate, HB_COMP_DECL ) { HB_EXPR_PTR pExpr; @@ -345,14 +345,14 @@ HB_EXPR_PTR hb_compExprNewDate( LONG lDate, HB_COMP_DECL ) pExpr = HB_COMP_EXPR_NEW( HB_ET_DATE ); - pExpr->value.asDate.lDate = ( LONG ) lDate; + pExpr->value.asDate.lDate = lDate; pExpr->value.asDate.lTime = 0; pExpr->ValType = HB_EV_DATE; return pExpr; } -HB_EXPR_PTR hb_compExprNewTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL ) +HB_EXPR_PTR hb_compExprNewTimeStamp( long lDate, long lTime, HB_COMP_DECL ) { HB_EXPR_PTR pExpr; @@ -661,7 +661,7 @@ HB_EXPR_PTR hb_compExprNewAliasExpr( HB_EXPR_PTR pAlias, HB_EXPR_PTR pExpList, pExpr->value.asAlias.pAlias = pAlias; pExpr->value.asAlias.pExpList = pExpList; pExpr->value.asAlias.pVar = NULL; - + if( pAlias->ExprType == HB_ET_MACRO ) { /* Is it a special case &variable->( expressionList ) */ @@ -1421,7 +1421,7 @@ HB_EXPR_PTR hb_compExprSetGetBlock( HB_EXPR_PTR pExpr, HB_COMP_DECL ) HB_EXPR_PTR pIIF; HB_EXPR_PTR pSet; - /* create {|var| expression + /* create {|var| expression * NOTE: this is not a valid variable name so there will be no collisions */ /* create var==NIL */ diff --git a/harbour/source/compiler/complex.c b/harbour/source/compiler/complex.c index 6773abfd31..1cc3561a3f 100644 --- a/harbour/source/compiler/complex.c +++ b/harbour/source/compiler/complex.c @@ -106,7 +106,7 @@ typedef struct } HB_LEX_KEY, * PHB_LEX_KEY; -static const HB_LEX_KEY s_keytable[] = +static const HB_LEX_KEY s_keytable[] = { { "ALWAYS", 4, 6, ALWAYS }, { "ANNOUNCE", 4, 8, ANNOUNCE }, @@ -174,7 +174,7 @@ static const HB_LEX_KEY s_keytable[] = #define _AS_VARIANT 9 static const int s_asTypes[] = -{ +{ 0, AS_ARRAY, AS_BLOCK, @@ -188,7 +188,7 @@ static const int s_asTypes[] = }; static const int s_asArrayTypes[] = -{ +{ 0, AS_ARRAY_ARRAY, AS_BLOCK_ARRAY, @@ -201,7 +201,7 @@ static const int s_asArrayTypes[] = AS_ARRAY }; -static const HB_LEX_KEY s_typetable[] = +static const HB_LEX_KEY s_typetable[] = { { "ANYTYPE", 4, 7, _AS_VARIANT }, { "ARRAY", 4, 5, _AS_ARRAY }, @@ -289,7 +289,7 @@ static const char * hb_comp_tokenString( YYSTYPE *yylval_ptr, HB_COMP_DECL, PHB_ } #if defined( HB_COMPAT_FOXPRO ) || 1 -static BOOL hb_comp_timeDecode( PHB_PP_TOKEN pTime, LONG * plTime ) +static BOOL hb_comp_timeDecode( PHB_PP_TOKEN pTime, long * plTime ) { HB_LONG lHour, lMinute, lMilliSec; double dNumber; @@ -386,7 +386,7 @@ static int hb_comp_dayTimeDecode( PHB_COMP_LEX pLex, PHB_PP_TOKEN pToken, /* Now support for dates constatns: {^YYYY/MM/DD} or {^YYYY-MM-DD} */ PHB_PP_TOKEN pYear, pMonth, pDay; HB_LONG lYear, lMonth, lDay; - LONG lDate = 0, lTime = 0; + long lDate = 0, lTime = 0; double dNumber; int iDec, iWidth, iType = 0; @@ -588,7 +588,7 @@ int hb_complex( YYSTYPE *yylval_ptr, HB_COMP_DECL ) { if( HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_PIPE ) { - yylval_ptr->asCodeblock.string = hb_strdup( + yylval_ptr->asCodeblock.string = hb_strdup( hb_pp_tokenBlockString( pLex->pPP, pToken, &yylval_ptr->asCodeblock.flags, &yylval_ptr->asCodeblock.length ) ); @@ -964,7 +964,7 @@ int hb_complex( YYSTYPE *yylval_ptr, HB_COMP_DECL ) break; case FIELD: - if( pToken->pNext && + if( pToken->pNext && ( ( pLex->iState == LOOKUP && HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_KEYWORD ) || HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_ALIAS ) ) diff --git a/harbour/source/compiler/harbour.y b/harbour/source/compiler/harbour.y index 9f7d55bd34..7a2e87f6bc 100644 --- a/harbour/source/compiler/harbour.y +++ b/harbour/source/compiler/harbour.y @@ -573,7 +573,7 @@ NumValue : NUM_DOUBLE { $$ = hb_compExprNewDouble( $1.dNumber, $1.bWidth | NUM_LONG { $$ = hb_compExprNewLong( $1.lNumber, HB_COMP_PARAM ); } ; -DateValue : NUM_DATE { $$ = hb_compExprNewDate( ( LONG ) $1.lNumber, HB_COMP_PARAM ); } +DateValue : NUM_DATE { $$ = hb_compExprNewDate( ( long ) $1.lNumber, HB_COMP_PARAM ); } ; TimeStampValue : TIMESTAMP { $$ = hb_compExprNewTimeStamp( $1.date, $1.time, HB_COMP_PARAM ); } diff --git a/harbour/source/compiler/harbour.yyc b/harbour/source/compiler/harbour.yyc index e436a6ff4d..12756b8e84 100644 --- a/harbour/source/compiler/harbour.yyc +++ b/harbour/source/compiler/harbour.yyc @@ -4909,7 +4909,7 @@ yyreduce: case 141: #line 576 "harbour.y" - { (yyval.asExpr) = hb_compExprNewDate( ( LONG ) (yyvsp[(1) - (1)].valLong).lNumber, HB_COMP_PARAM ); ;} + { (yyval.asExpr) = hb_compExprNewDate( ( long ) (yyvsp[(1) - (1)].valLong).lNumber, HB_COMP_PARAM ); ;} break; case 142: @@ -8123,4 +8123,3 @@ void yyerror( HB_COMP_DECL, const char * s ) else hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'E', HB_COMP_ERR_YACC, s, HB_COMP_PARAM->pLex->lasttok ); } - diff --git a/harbour/source/compiler/hbmain.c b/harbour/source/compiler/hbmain.c index 28f685a2ef..3bef504228 100644 --- a/harbour/source/compiler/hbmain.c +++ b/harbour/source/compiler/hbmain.c @@ -3029,7 +3029,7 @@ void hb_compGenPushLong( HB_LONG lNumber, HB_COMP_DECL ) } } -void hb_compGenPushDate( LONG lDate, HB_COMP_DECL ) +void hb_compGenPushDate( long lDate, HB_COMP_DECL ) { BYTE pBuffer[ 5 ]; @@ -3038,7 +3038,7 @@ void hb_compGenPushDate( LONG lDate, HB_COMP_DECL ) hb_compGenPCodeN( pBuffer, sizeof( pBuffer ), HB_COMP_PARAM ); } -void hb_compGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL ) +void hb_compGenPushTimeStamp( long lDate, long lTime, HB_COMP_DECL ) { BYTE pBuffer[ 9 ]; diff --git a/harbour/source/main/harbour.c b/harbour/source/main/harbour.c index dd82cf5936..76bd9d3285 100644 --- a/harbour/source/main/harbour.c +++ b/harbour/source/main/harbour.c @@ -90,10 +90,10 @@ typedef struct _HB_MEMINFO #endif static PHB_MEMINFO s_pMemBlocks = NULL; -static LONG s_ulMemoryBlocks = 0; /* memory blocks used */ -static LONG s_ulMemoryMaxBlocks = 0; /* maximum number of used memory blocks */ -static LONG s_ulMemoryMaxConsumed = 0; /* memory size consumed */ -static LONG s_ulMemoryConsumed = 0; /* memory max size consumed */ +static long s_ulMemoryBlocks = 0; /* memory blocks used */ +static long s_ulMemoryMaxBlocks = 0; /* maximum number of used memory blocks */ +static long s_ulMemoryMaxConsumed = 0; /* memory size consumed */ +static long s_ulMemoryConsumed = 0; /* memory max size consumed */ #endif /* HB_FM_STATISTICS */ diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index 3ea3684644..e9bb95fa11 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -5325,7 +5325,7 @@ void hb_pp_initDynDefines( PHB_PP_STATE pState ) char szResult[ 65 ]; char * pSrc, * pDst, * szPlatform; int iYear, iMonth, iDay, i; - LONG lDate, lTime; + long lDate, lTime; /* __PLATFORM__* */ pSrc = szPlatform = hb_verPlatform(); diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index 3f51bed89a..845e18a4b4 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -239,7 +239,7 @@ static HB_LONG hb_dbfGetNextValue( DBFAREAP pArea, USHORT uiField ) static void hb_dbfUpdateStampFields( DBFAREAP pArea ) { - LONG lJulian = 0, lMilliSec = 0; + long lJulian = 0, lMilliSec = 0; HB_LONG nRowVer = 0; LPFIELD pField; USHORT uiCount; @@ -2260,7 +2260,7 @@ static HB_ERRCODE hb_dbfPutRec( DBFAREAP pArea, const BYTE * pBuffer ) pRecord = ( BYTE * ) hb_xgrab( pArea->uiRecordLen ); pRecord[ 0 ] = pArea->fDeleted ? 'D' : 'E'; hb_sxEnCrypt( ( const char * ) pArea->pRecord + 1, - ( char * ) pRecord + 1, + ( char * ) pRecord + 1, pArea->pCryptKey, pArea->uiRecordLen - 1 ); } } diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index 46775b026c..130299b52d 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -769,7 +769,7 @@ static PHB_ITEM hb_cdxKeyGetItem( LPCDXKEY pKey, PHB_ITEM pItem, LPCDXTAG pTag, break; case 'D': HB_ORD2DBL( pKey->val, &d ); - pItem = hb_itemPutDL( pItem, ( LONG ) d ); + pItem = hb_itemPutDL( pItem, ( long ) d ); break; case 'T': HB_ORD2DBL( pKey->val, &d ); diff --git a/harbour/source/rdd/dbffpt/dbffpt1.c b/harbour/source/rdd/dbffpt/dbffpt1.c index 1f2abf6906..91886ce430 100644 --- a/harbour/source/rdd/dbffpt/dbffpt1.c +++ b/harbour/source/rdd/dbffpt/dbffpt1.c @@ -1502,7 +1502,7 @@ static HB_ERRCODE hb_fptReadRawSMTItem( FPTAREAP pArea, PHB_ITEM pItem, HB_FOFFS if( hb_fileReadAt( pArea->pMemoFile, buffer, 4, *pfOffset ) != 4 ) return EDBF_READ; *pfOffset += 4; - hb_itemPutDL( pItem, ( LONG ) HB_GET_LE_UINT32( buffer ) ); + hb_itemPutDL( pItem, ( long ) HB_GET_LE_UINT32( buffer ) ); break; case SMT_IT_LOGICAL: @@ -1612,7 +1612,7 @@ static HB_ERRCODE hb_fptReadSMTItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE * b errCode = EDBF_CORRUPT; break; } - hb_itemPutDL( pItem, ( LONG ) HB_GET_LE_UINT32( *pbMemoBuf ) ); + hb_itemPutDL( pItem, ( long ) HB_GET_LE_UINT32( *pbMemoBuf ) ); *pbMemoBuf += 4; break; @@ -1811,7 +1811,7 @@ static HB_ERRCODE hb_fptReadSixItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE * b switch ( usType ) { case FPTIT_SIX_LNUM: - hb_itemPutNL( pItem, ( LONG ) HB_GET_LE_UINT32( &(*pbMemoBuf)[6] ) ); + hb_itemPutNL( pItem, ( long ) HB_GET_LE_UINT32( &(*pbMemoBuf)[6] ) ); break; case FPTIT_SIX_DNUM: @@ -1821,7 +1821,7 @@ static HB_ERRCODE hb_fptReadSixItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE * b break; case FPTIT_SIX_LDATE: - hb_itemPutDL( pItem, ( LONG ) HB_GET_LE_UINT32( &(*pbMemoBuf)[6] ) ); + hb_itemPutDL( pItem, ( long ) HB_GET_LE_UINT32( &(*pbMemoBuf)[6] ) ); break; case FPTIT_SIX_LOG: @@ -2088,7 +2088,7 @@ static HB_ERRCODE hb_fptReadFlexItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE * case FPTIT_FLEXAR_DATEX: if( bBufEnd - (*pbMemoBuf) >= 4 ) { - hb_itemPutDL( pItem, ( LONG ) HB_GET_LE_UINT32( *pbMemoBuf ) ); + hb_itemPutDL( pItem, ( long ) HB_GET_LE_UINT32( *pbMemoBuf ) ); *pbMemoBuf += 4; } else @@ -2267,7 +2267,7 @@ static HB_ERRCODE hb_fptReadFlexItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE * case FPTIT_FLEXAR_LONG: if( bBufEnd - (*pbMemoBuf) >= 4 ) { - hb_itemPutNL( pItem, ( LONG ) HB_GET_LE_UINT32( *pbMemoBuf ) ); + hb_itemPutNL( pItem, ( long ) HB_GET_LE_UINT32( *pbMemoBuf ) ); *pbMemoBuf += 4; } else @@ -2771,22 +2771,22 @@ static HB_ERRCODE hb_fptGetMemo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem, hb_itemPutL( pItem, FALSE ); break; case FPTIT_FLEX_LDATE: - hb_itemPutDL( pItem, (LONG) HB_GET_LE_UINT32( pBuffer ) ); + hb_itemPutDL( pItem, ( long ) HB_GET_LE_UINT32( pBuffer ) ); break; case FPTIT_FLEX_CHAR: - hb_itemPutNI( pItem, (signed char) pBuffer[0] ); + hb_itemPutNI( pItem, ( signed char ) pBuffer[0] ); break; case FPTIT_FLEX_UCHAR: - hb_itemPutNI( pItem, (BYTE) pBuffer[0] ); + hb_itemPutNI( pItem, ( BYTE ) pBuffer[0] ); break; case FPTIT_FLEX_SHORT: - hb_itemPutNI( pItem, (SHORT) HB_GET_LE_UINT16( pBuffer ) ); + hb_itemPutNI( pItem, ( SHORT ) HB_GET_LE_UINT16( pBuffer ) ); break; case FPTIT_FLEX_USHORT: hb_itemPutNInt( pItem, HB_GET_LE_UINT16( pBuffer ) ); break; case FPTIT_FLEX_LONG: - hb_itemPutNL( pItem, (LONG) HB_GET_LE_UINT32( pBuffer ) ); + hb_itemPutNL( pItem, ( long ) HB_GET_LE_UINT32( pBuffer ) ); break; case FPTIT_FLEX_ULONG: hb_itemPutNInt( pItem, HB_GET_LE_UINT32( pBuffer ) ); @@ -2801,7 +2801,7 @@ static HB_ERRCODE hb_fptGetMemo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem, break; case FPTIT_TEXT: #ifndef HB_CDP_SUPPORT_OFF - hb_cdpnTranslate( ( char *) pBuffer, pArea->area.cdPage, hb_vmCDP(), ulSize ); + hb_cdpnTranslate( ( char * ) pBuffer, pArea->area.cdPage, hb_vmCDP(), ulSize ); #endif pBuffer[ ulSize ] = '\0'; hb_itemPutCLPtr( pItem, ( char * ) pBuffer, ulSize ); diff --git a/harbour/source/rdd/dbfnsx/dbfnsx1.c b/harbour/source/rdd/dbfnsx/dbfnsx1.c index be538c549e..518c4d9a1e 100644 --- a/harbour/source/rdd/dbfnsx/dbfnsx1.c +++ b/harbour/source/rdd/dbfnsx/dbfnsx1.c @@ -743,7 +743,7 @@ static PHB_ITEM hb_nsxKeyGetItem( PHB_ITEM pItem, LPKEYINFO pKey, break; case 'D': HB_ORD2DBL( pKey->val, &d ); - pItem = hb_itemPutDL( pItem, ( LONG ) d ); + pItem = hb_itemPutDL( pItem, ( long ) d ); break; case 'T': HB_ORD2DBL( pKey->val, &d ); diff --git a/harbour/source/rdd/hbsix/sxdate.c b/harbour/source/rdd/hbsix/sxdate.c index 0ba76066ac..ca88c26d36 100644 --- a/harbour/source/rdd/hbsix/sxdate.c +++ b/harbour/source/rdd/hbsix/sxdate.c @@ -57,10 +57,10 @@ #include "hbsxfunc.h" -char * hb_sxDtoP( char * pDate, LONG lJulian ) +char * hb_sxDtoP( char * pDate, long lJulian ) { int iYear, iMonth, iDay; - LONG lPDate; + long lPDate; HB_TRACE(HB_TR_DEBUG, ("hb_sxDtoP(%p, %ld)", pDate, lJulian)); @@ -72,10 +72,10 @@ char * hb_sxDtoP( char * pDate, LONG lJulian ) return pDate; } -LONG hb_sxPtoD( const char * pDate ) +long hb_sxPtoD( const char * pDate ) { int iYear, iMonth, iDay; - LONG lPDate; + long lPDate; HB_TRACE(HB_TR_DEBUG, ("hb_sxPtoD(%p)", pDate)); diff --git a/harbour/source/rtl/dates.c b/harbour/source/rtl/dates.c index d5a5477086..024f04a374 100644 --- a/harbour/source/rtl/dates.c +++ b/harbour/source/rtl/dates.c @@ -383,7 +383,7 @@ long hb_dateUnformat( const char * szDate, const char * szDateFormat ) * 16 for "hh:mm:ss:ffff pp" * always safe buffer size is 17 (+1 for 0) */ -char * hb_timeFormat( char * szBuffer, const char * szTimeFormat, LONG lMilliSec ) +char * hb_timeFormat( char * szBuffer, const char * szTimeFormat, long lMilliSec ) { char * szTimeBuffer; int iHour, iMinutes, iSeconds, iMSec, iPM, i12; @@ -509,7 +509,7 @@ char * hb_timeFormat( char * szBuffer, const char * szTimeFormat, LONG lMilliSec */ char * hb_timeStampFormat( char * szBuffer, const char * szDateFormat, const char * szTimeFormat, - LONG lJulian, LONG lMilliSec ) + long lJulian, long lMilliSec ) { char szDate[ 9 ], * szTimeBuffer; @@ -524,7 +524,7 @@ char * hb_timeStampFormat( char * szBuffer, return szBuffer; } -LONG hb_timeUnformat( const char * szTime, const char * szTimeFormat ) +long hb_timeUnformat( const char * szTime, const char * szTimeFormat ) { int iHour, iMinutes, iSeconds, iMSec, iPM; int size, i, count, prec, * pValue; @@ -629,7 +629,7 @@ LONG hb_timeUnformat( const char * szTime, const char * szTimeFormat ) void hb_timeStampUnformat( const char * szDateTime, const char * szDateFormat, const char * szTimeFormat, - LONG * plJulian, LONG * plMilliSec ) + long * plJulian, long * plMilliSec ) { HB_TRACE(HB_TR_DEBUG, ("hb_timeStampUnformat(%s, %s, %s, %p, %p)", szDateTime, szDateFormat, szTimeFormat, plJulian, plMilliSec)); diff --git a/harbour/source/rtl/empty.c b/harbour/source/rtl/empty.c index 64f99d5c34..88dc4afec3 100644 --- a/harbour/source/rtl/empty.c +++ b/harbour/source/rtl/empty.c @@ -56,7 +56,7 @@ HB_FUNC( EMPTY ) { PHB_ITEM pItem = hb_param( 1, HB_IT_ANY ); - LONG lDate, lTime; + long lDate, lTime; PHB_SYMB pSym; switch( hb_itemType( pItem ) ) @@ -117,4 +117,3 @@ HB_FUNC( EMPTY ) break; } } - diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index b706da5ca9..005e042377 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -192,7 +192,7 @@ #if !defined( INVALID_SET_FILE_POINTER ) && \ ( defined(__DMC__) || defined( _MSC_VER ) || defined( __LCC__ ) ) - #define INVALID_SET_FILE_POINTER ((DWORD)-1) + #define INVALID_SET_FILE_POINTER ( ( DWORD ) -1 ) #endif #if !defined( INVALID_FILE_ATTRIBUTES ) #define INVALID_FILE_ATTRIBUTES ( ( DWORD ) -1 ) @@ -921,7 +921,7 @@ BOOL hb_fsSetDevMode( HB_FHANDLE hFileHandle, USHORT uiDevMode ) #endif } -BOOL hb_fsGetFileTime( const char * pszFileName, LONG * plJulian, LONG * plMillisec ) +BOOL hb_fsGetFileTime( const char * pszFileName, long * plJulian, long * plMillisec ) { BOOL fResult; @@ -1088,7 +1088,7 @@ BOOL hb_fsGetAttr( const char * pszFileName, ULONG * pulAttr ) return fResult; } -BOOL hb_fsSetFileTime( const char * pszFileName, LONG lJulian, LONG lMillisec ) +BOOL hb_fsSetFileTime( const char * pszFileName, long lJulian, long lMillisec ) { BOOL fResult; int iYear, iMonth, iDay; @@ -1491,7 +1491,7 @@ ULONG hb_fsReadLarge( HB_FHANDLE hFileHandle, void * pBuff, ULONG ulCount ) { hb_vmUnlock(); ulRead = read( hFileHandle, pBuff, ulCount ); - hb_fsSetIOError( ulRead != (ULONG) -1, 0 ); + hb_fsSetIOError( ulRead != ( ULONG ) -1, 0 ); if( ulRead == ( ULONG ) -1 ) ulRead = 0; hb_vmLock(); @@ -1670,7 +1670,7 @@ ULONG hb_fsReadAt( HB_FHANDLE hFileHandle, void * pBuff, ULONG ulCount, HB_FOFFS #else ulRead = pread( hFileHandle, pBuff, ulCount, llOffset ); #endif - hb_fsSetIOError( ulRead != (ULONG) -1, 0 ); + hb_fsSetIOError( ulRead != ( ULONG ) -1, 0 ); if( ulRead == ( ULONG ) -1 ) ulRead = 0; hb_vmLock(); @@ -1729,7 +1729,7 @@ ULONG hb_fsWriteAt( HB_FHANDLE hFileHandle, const void * pBuff, ULONG ulCount, H #else ulWritten = pwrite( hFileHandle, pBuff, ulCount, llOffset ); #endif - hb_fsSetIOError( ulWritten != (ULONG) -1, 0 ); + hb_fsSetIOError( ulWritten != ( ULONG ) -1, 0 ); if( ulWritten == ( ULONG ) -1 ) ulWritten = 0; hb_vmLock(); @@ -2217,7 +2217,7 @@ BOOL hb_fsLockLarge( HB_FHANDLE hFileHandle, HB_FOFFSET ulStart, hb_vmLock(); } #else - bResult = hb_fsLock( hFileHandle, (ULONG) ulStart, (ULONG) ulLength, uiMode ); + bResult = hb_fsLock( hFileHandle, ( ULONG ) ulStart, ( ULONG ) ulLength, uiMode ); #endif return bResult; @@ -2265,35 +2265,35 @@ ULONG hb_fsSeek( HB_FHANDLE hFileHandle, LONG lOffset, USHORT uiFlags ) /* This DOS hack creates 2GB file size limit, Druzus */ if( lOffset < 0 && Flags == SEEK_SET ) { - ulPos = (ULONG) INVALID_SET_FILE_POINTER; + ulPos = ( ULONG ) INVALID_SET_FILE_POINTER; hb_fsSetError( 25 ); /* 'Seek Error' */ } else { - ulPos = (DWORD) SetFilePointer( DosToWinHandle( hFileHandle ), lOffset, NULL, ( DWORD ) Flags ); - hb_fsSetIOError( (DWORD) ulPos != INVALID_SET_FILE_POINTER, 0 ); + ulPos = ( DWORD ) SetFilePointer( DosToWinHandle( hFileHandle ), lOffset, NULL, ( DWORD ) Flags ); + hb_fsSetIOError( ( DWORD ) ulPos != INVALID_SET_FILE_POINTER, 0 ); } - if( (DWORD) ulPos == INVALID_SET_FILE_POINTER ) + if( ( DWORD ) ulPos == INVALID_SET_FILE_POINTER ) { - ulPos = (DWORD) SetFilePointer( DosToWinHandle( hFileHandle ), 0, NULL, SEEK_CUR ); + ulPos = ( DWORD ) SetFilePointer( DosToWinHandle( hFileHandle ), 0, NULL, SEEK_CUR ); } #else /* This DOS hack creates 2GB file size limit, Druzus */ if( lOffset < 0 && Flags == SEEK_SET ) { - ulPos = (ULONG) -1; + ulPos = ( ULONG ) -1; hb_fsSetError( 25 ); /* 'Seek Error' */ } else { ulPos = lseek( hFileHandle, lOffset, Flags ); - hb_fsSetIOError( ulPos != (ULONG) -1, 0 ); + hb_fsSetIOError( ulPos != ( ULONG ) -1, 0 ); } - if( ulPos == (ULONG) -1 ) + if( ulPos == ( ULONG ) -1 ) { ulPos = lseek( hFileHandle, 0L, SEEK_CUR ); - if( ulPos == (ULONG) -1 ) + if( ulPos == ( ULONG ) -1 ) { ulPos = 0; } @@ -2331,7 +2331,7 @@ HB_FOFFSET hb_fsSeekLarge( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, USHORT u else { ulOffsetLow = SetFilePointer( DosToWinHandle( hFileHandle ), - ulOffsetLow, (PLONG) &ulOffsetHigh, + ulOffsetLow, ( PLONG ) &ulOffsetHigh, ( DWORD ) Flags ); llPos = ( ( HB_FOFFSET ) ulOffsetHigh << 32 ) | ulOffsetLow; hb_fsSetIOError( llPos != ( HB_FOFFSET ) INVALID_SET_FILE_POINTER, 0 ); @@ -2341,7 +2341,7 @@ HB_FOFFSET hb_fsSeekLarge( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, USHORT u { ulOffsetHigh = 0; ulOffsetLow = SetFilePointer( DosToWinHandle( hFileHandle ), - 0, (PLONG) &ulOffsetHigh, SEEK_CUR ); + 0, ( PLONG ) &ulOffsetHigh, SEEK_CUR ); llPos = ( ( HB_FOFFSET ) ulOffsetHigh << 32 ) | ulOffsetLow; } hb_vmLock(); @@ -2359,7 +2359,7 @@ HB_FOFFSET hb_fsSeekLarge( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, USHORT u else { llPos = lseek64( hFileHandle, llOffset, Flags ); - hb_fsSetIOError( llPos != (HB_FOFFSET) -1, 0 ); + hb_fsSetIOError( llPos != ( HB_FOFFSET ) -1, 0 ); } if( llPos == (HB_FOFFSET) -1 ) @@ -2369,7 +2369,7 @@ HB_FOFFSET hb_fsSeekLarge( HB_FHANDLE hFileHandle, HB_FOFFSET llOffset, USHORT u hb_vmLock(); } #else - llPos = (HB_FOFFSET) hb_fsSeek( hFileHandle, (LONG) llOffset, uiFlags ); + llPos = (HB_FOFFSET) hb_fsSeek( hFileHandle, ( LONG ) llOffset, uiFlags ); #endif return llPos; diff --git a/harbour/source/rtl/minmax.c b/harbour/source/rtl/minmax.c index d0d720ac3d..c44fad4c40 100644 --- a/harbour/source/rtl/minmax.c +++ b/harbour/source/rtl/minmax.c @@ -95,8 +95,8 @@ HB_FUNC( MAX ) } else if( HB_IS_DATE( p1 ) && HB_IS_DATE( p2 ) ) { - LONG l1 = hb_itemGetDL( p1 ); - LONG l2 = hb_itemGetDL( p2 ); + long l1 = hb_itemGetDL( p1 ); + long l2 = hb_itemGetDL( p2 ); hb_retdl( l1 >= l2 ? l1 : l2 ); return; @@ -156,8 +156,8 @@ HB_FUNC( MIN ) } else if( HB_IS_DATE( p1 ) && HB_IS_DATE( p2 ) ) { - LONG l1 = hb_itemGetDL( p1 ); - LONG l2 = hb_itemGetDL( p2 ); + long l1 = hb_itemGetDL( p1 ); + long l2 = hb_itemGetDL( p2 ); hb_retdl( l1 <= l2 ? l1 : l2 ); return; diff --git a/harbour/source/rtl/philes.c b/harbour/source/rtl/philes.c index 1809ab4106..b41f30c710 100644 --- a/harbour/source/rtl/philes.c +++ b/harbour/source/rtl/philes.c @@ -390,7 +390,7 @@ HB_FUNC( HB_FSETATTR ) HB_FUNC( HB_FSETDATETIME ) { - LONG lDate = -1, lTime = -1; + long lDate = -1, lTime = -1; if( HB_ISTIMESTAMP( 2 ) ) hb_partdt( &lDate, &lTime, 2 ); @@ -411,7 +411,7 @@ HB_FUNC( HB_FSETDATETIME ) HB_FUNC( HB_FGETDATETIME ) { - LONG lJulian, lMillisec; + long lJulian, lMillisec; if( hb_fsGetFileTime( hb_parcx( 1 ), &lJulian, &lMillisec ) ) { diff --git a/harbour/source/vm/arrays.c b/harbour/source/vm/arrays.c index 8410be5f4a..2d51d9a3ec 100644 --- a/harbour/source/vm/arrays.c +++ b/harbour/source/vm/arrays.c @@ -517,7 +517,7 @@ double hb_arrayGetTD( PHB_ITEM pArray, ULONG ulIndex ) return 0; } -BOOL hb_arrayGetTDT( PHB_ITEM pArray, ULONG ulIndex, LONG * plJulian, LONG * plMilliSec ) +BOOL hb_arrayGetTDT( PHB_ITEM pArray, ULONG ulIndex, long * plJulian, long * plMilliSec ) { HB_TRACE(HB_TR_DEBUG, ("hb_arrayGetTDT(%p, %lu, %p, %p)", pArray, ulIndex, plJulian, plMilliSec)); @@ -686,7 +686,7 @@ BOOL hb_arraySetDS( PHB_ITEM pArray, ULONG ulIndex, const char * szDate ) return FALSE; } -BOOL hb_arraySetDL( PHB_ITEM pArray, ULONG ulIndex, LONG lDate ) +BOOL hb_arraySetDL( PHB_ITEM pArray, ULONG ulIndex, long lDate ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetDL(%p, %lu, %ld)", pArray, ulIndex, lDate)); @@ -712,7 +712,7 @@ BOOL hb_arraySetTD( PHB_ITEM pArray, ULONG ulIndex, double dTimeStamp ) return FALSE; } -BOOL hb_arraySetTDT( PHB_ITEM pArray, ULONG ulIndex, LONG lJulian, LONG lMilliSec ) +BOOL hb_arraySetTDT( PHB_ITEM pArray, ULONG ulIndex, long lJulian, long lMilliSec ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetTDT(%p, %lu, %lu, %lu)", pArray, ulIndex, lJulian, lMilliSec)); @@ -751,7 +751,7 @@ BOOL hb_arraySetNI( PHB_ITEM pArray, ULONG ulIndex, int iNumber ) return FALSE; } -BOOL hb_arraySetNL( PHB_ITEM pArray, ULONG ulIndex, LONG lNumber ) +BOOL hb_arraySetNL( PHB_ITEM pArray, ULONG ulIndex, long lNumber ) { HB_TRACE(HB_TR_DEBUG, ("hb_arraySetNL(%p, %lu, %lu)", pArray, ulIndex, lNumber)); diff --git a/harbour/source/vm/extend.c b/harbour/source/vm/extend.c index a4ee1628a8..8f05c00d5b 100644 --- a/harbour/source/vm/extend.c +++ b/harbour/source/vm/extend.c @@ -342,7 +342,7 @@ char * hb_pardsbuff( char * szDate, int iParam ) /* retrieve a date as long integer - number of days from Julian's day */ -LONG hb_pardl( int iParam ) +long hb_pardl( int iParam ) { HB_STACK_TLS_PRELOAD @@ -383,7 +383,7 @@ double hb_partd( int iParam ) return 0; } -BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam ) +BOOL hb_partdt( long * plJulian, long * plMilliSec , int iParam ) { HB_STACK_TLS_PRELOAD @@ -813,7 +813,7 @@ char * hb_parvdsbuff( char * szDate, int iParam, ... ) /* retrieve a date as long integer - number of days from Julian's day */ -LONG hb_parvdl( int iParam, ... ) +long hb_parvdl( int iParam, ... ) { HB_STACK_TLS_PRELOAD @@ -876,7 +876,7 @@ double hb_parvtd( int iParam, ... ) return 0; } -BOOL hb_parvtdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... ) +BOOL hb_parvtdt( long * plJulian, long * plMilliSec , int iParam, ... ) { HB_STACK_TLS_PRELOAD @@ -1338,7 +1338,7 @@ void hb_rettd( double dTimeStamp ) } #undef hb_rettdt -void hb_rettdt( LONG lJulian, LONG lMilliSec ) +void hb_rettdt( long lJulian, long lMilliSec ) { HB_STACK_TLS_PRELOAD @@ -1644,7 +1644,7 @@ int hb_stortd( double dTimeStamp, int iParam ) return 0; } -int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam ) +int hb_stortdt( long lJulian, long lMilliSec, int iParam ) { HB_STACK_TLS_PRELOAD @@ -2075,7 +2075,7 @@ int hb_storvtd( double dTimeStamp, int iParam, ... ) return 0; } -int hb_storvtdt( LONG lJulian, LONG lMilliSec, int iParam, ... ) +int hb_storvtdt( long lJulian, long lMilliSec, int iParam, ... ) { HB_STACK_TLS_PRELOAD diff --git a/harbour/source/vm/fm.c b/harbour/source/vm/fm.c index 80ce12b3d8..40fb80bd9e 100644 --- a/harbour/source/vm/fm.c +++ b/harbour/source/vm/fm.c @@ -266,10 +266,10 @@ typedef struct _HB_MEMINFO static BOOL s_fStatistic = FALSE; -static LONG s_lMemoryBlocks = 0; /* memory blocks used */ -static LONG s_lMemoryMaxBlocks = 0; /* maximum number of used memory blocks */ -static LONG s_lMemoryMaxConsumed = 0; /* memory size consumed */ -static LONG s_lMemoryConsumed = 0; /* memory max size consumed */ +static long s_lMemoryBlocks = 0; /* memory blocks used */ +static long s_lMemoryMaxBlocks = 0; /* maximum number of used memory blocks */ +static long s_lMemoryMaxConsumed = 0; /* memory size consumed */ +static long s_lMemoryConsumed = 0; /* memory max size consumed */ static PHB_MEMINFO s_pFirstBlock = NULL; static PHB_MEMINFO s_pLastBlock = NULL; diff --git a/harbour/source/vm/itemapi.c b/harbour/source/vm/itemapi.c index 21ffde78b8..2fbba17818 100644 --- a/harbour/source/vm/itemapi.c +++ b/harbour/source/vm/itemapi.c @@ -554,7 +554,7 @@ double hb_itemGetTD( PHB_ITEM pItem ) return 0; } -BOOL hb_itemGetTDT( PHB_ITEM pItem, LONG * plJulian, LONG * plMilliSec ) +BOOL hb_itemGetTDT( PHB_ITEM pItem, long * plJulian, long * plMilliSec ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemGetTDT(%p,%p,%p)", pItem, plJulian, plMilliSec)); @@ -635,28 +635,28 @@ int hb_itemGetNI( PHB_ITEM pItem ) return 0; } -LONG hb_itemGetNL( PHB_ITEM pItem ) +long hb_itemGetNL( PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemGetNL(%p)", pItem)); if( pItem ) { if( HB_IS_LONG( pItem ) ) - return ( LONG ) pItem->item.asLong.value; + return ( long ) pItem->item.asLong.value; else if( HB_IS_INTEGER( pItem ) ) - return ( LONG ) pItem->item.asInteger.value; + return ( long ) pItem->item.asInteger.value; else if( HB_IS_DOUBLE( pItem ) ) #ifdef __GNUC__ - return ( LONG ) ( ULONG ) pItem->item.asDouble.value; + return ( long ) ( ULONG ) pItem->item.asDouble.value; #else - return ( LONG ) pItem->item.asDouble.value; + return ( long ) pItem->item.asDouble.value; #endif /* DATETIME TODO: remove it */ else if( HB_IS_DATETIME( pItem ) ) - return ( LONG ) pItem->item.asDateTime.julian; + return ( long ) pItem->item.asDateTime.julian; } return 0; @@ -859,7 +859,7 @@ PHB_ITEM hb_itemPutTS( PHB_ITEM pItem, const char * szDateTime ) PHB_ITEM hb_itemPutTD( PHB_ITEM pItem, double dTimeStamp ) { - LONG lJulian, lMilliSec; + long lJulian, lMilliSec; HB_TRACE(HB_TR_DEBUG, ("hb_itemPutTD(%p, %lf)", pItem, dTimeStamp)); @@ -879,7 +879,7 @@ PHB_ITEM hb_itemPutTD( PHB_ITEM pItem, double dTimeStamp ) return pItem; } -PHB_ITEM hb_itemPutTDT( PHB_ITEM pItem, LONG lJulian, LONG lMilliSec ) +PHB_ITEM hb_itemPutTDT( PHB_ITEM pItem, long lJulian, long lMilliSec ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemPutTDT(%p, %ld, %ld)", pItem, lJulian, lMilliSec)); @@ -957,7 +957,7 @@ PHB_ITEM hb_itemPutNI( PHB_ITEM pItem, int iNumber ) return pItem; } -PHB_ITEM hb_itemPutNL( PHB_ITEM pItem, LONG lNumber ) +PHB_ITEM hb_itemPutNL( PHB_ITEM pItem, long lNumber ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemPutNL(%p, %ld)", pItem, lNumber)); @@ -971,11 +971,11 @@ PHB_ITEM hb_itemPutNL( PHB_ITEM pItem, LONG lNumber ) #if HB_INT_MAX >= LONG_MAX pItem->type = HB_IT_INTEGER; - pItem->item.asInteger.value = (int) lNumber; + pItem->item.asInteger.value = ( int ) lNumber; pItem->item.asInteger.length = HB_INT_LENGTH( lNumber ); #else pItem->type = HB_IT_LONG; - pItem->item.asLong.value = (HB_LONG) lNumber; + pItem->item.asLong.value = ( HB_LONG ) lNumber; pItem->item.asLong.length = HB_LONG_LENGTH( lNumber ); #endif @@ -997,7 +997,7 @@ PHB_ITEM hb_itemPutNLL( PHB_ITEM pItem, LONGLONG llNumber ) #if HB_LONG_MAX >= LONGLONG_MAX pItem->type = HB_IT_LONG; - pItem->item.asLong.value = (HB_LONG) llNumber; + pItem->item.asLong.value = ( HB_LONG ) llNumber; pItem->item.asLong.length = HB_LONG_LENGTH( llNumber ); #else pItem->type = HB_IT_DOUBLE; @@ -1195,7 +1195,7 @@ PHB_ITEM hb_itemPutNILen( PHB_ITEM pItem, int iNumber, int iWidth ) return pItem; } -PHB_ITEM hb_itemPutNLLen( PHB_ITEM pItem, LONG lNumber, int iWidth ) +PHB_ITEM hb_itemPutNLLen( PHB_ITEM pItem, long lNumber, int iWidth ) { HB_TRACE(HB_TR_DEBUG, ("hb_itemPutNLLen(%p, %ld, %d)", pItem, lNumber, iWidth)); @@ -1219,7 +1219,7 @@ PHB_ITEM hb_itemPutNLLen( PHB_ITEM pItem, LONG lNumber, int iWidth ) iWidth = HB_LONG_LENGTH( lNumber ); pItem->type = HB_IT_LONG; - pItem->item.asLong.value = (HB_LONG) lNumber; + pItem->item.asLong.value = ( HB_LONG ) lNumber; pItem->item.asLong.length = iWidth; #endif