2010-02-07 16:34 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* src/rtl/cdpapi.c
    ! Fixed type when manually correcting 'unsigned char' to UCHAR
      to sync with declaration.

  * contrib/gtwvg/gtwvg.c
    ! Fixed wrong casts (HB_LONG instead of long)

  * src/pp/ppcore.c
  * src/vm/macro.c
  * src/vm/hashes.c
  * src/vm/itemapi.c
  * src/vm/hvm.c
  * src/vm/arrays.c
  * src/vm/task.c
  * src/vm/thread.c
  * src/vm/extend.c
  * src/common/hbwince.c
  * src/common/expropt1.c
  * src/common/hbstr.c
  * src/common/expropt2.c
  * src/common/hbdate.c
  * src/macro/macro.yyc
  * src/macro/macro.y
  * src/macro/macro.yyh
  * src/macro/macrolex.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/hbstrfmt.c
  * src/rtl/hbcrc.c
  * src/rtl/minmax.c
  * src/rtl/hbrandom.c
  * src/rtl/hbsocket.c
  * src/rtl/hbbit.c
  * src/rtl/hbgtcore.c
  * src/rtl/cputime.c
  * src/rtl/idle.c
  * src/rtl/itemseri.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/hbznet.c
  * src/rtl/hbhex.c
  * src/rtl/seconds.c
  * src/rtl/abs.c
  * src/rtl/gtwvt/gtwvt.c
  * src/rtl/hbbyte.c
  * src/rtl/val.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbsql.c
  * src/rdd/sdf1.c
  * src/rdd/delim1.c
  * src/rdd/dbf1.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/compiler/hbmain.c
  * src/compiler/complex.c
  * src/compiler/harbour.yyc
  * src/compiler/harbour.y
  * src/compiler/harbour.yyh
  * include/hbvmpub.h
  * include/hbgtcore.h
  * include/hbthread.h
  * include/hbdefs.h
  * include/hbmacro.h
  * include/hbapi.h
  * include/hbapiitm.h
  * include/hbznet.h
  * include/hbvm.h
  * include/hbcomp.h
  * include/hbcompdf.h
  * include/hbexprop.h
  * include/hbsocket.h
  * include/hbchksum.h
  * include/hbexprb.c
  * include/hbdate.h
  * contrib/hbct/bitnum.c
  * contrib/hbct/dbftools.c
  * contrib/hbct/files.c
  * contrib/hbct/disk.c
  * contrib/xhb/xhbfunc.c
  * contrib/hbcurl/hbcurl.c
  * contrib/hbnetio/netiocli.c
  * contrib/hbnetio/netiosrv.c
  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/wvggui.c
  * contrib/gtwvg/wvgcore.c
  * contrib/rddads/ads1.c
  * contrib/hbwin/olecore.c
    * HB_LONG  -> HB_MAXINT
    * HB_ULONG -> HB_MAXUINT
This commit is contained in:
Viktor Szakats
2010-02-07 15:37:24 +00:00
parent 3a0affc051
commit f9336a957b
80 changed files with 489 additions and 401 deletions

View File

@@ -17,6 +17,95 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-02-07 16:34 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/cdpapi.c
! Fixed type when manually correcting 'unsigned char' to UCHAR
to sync with declaration.
* contrib/gtwvg/gtwvg.c
! Fixed wrong casts (HB_LONG instead of long)
* src/pp/ppcore.c
* src/vm/macro.c
* src/vm/hashes.c
* src/vm/itemapi.c
* src/vm/hvm.c
* src/vm/arrays.c
* src/vm/task.c
* src/vm/thread.c
* src/vm/extend.c
* src/common/hbwince.c
* src/common/expropt1.c
* src/common/hbstr.c
* src/common/expropt2.c
* src/common/hbdate.c
* src/macro/macro.yyc
* src/macro/macro.y
* src/macro/macro.yyh
* src/macro/macrolex.c
* src/rtl/gttrm/gttrm.c
* src/rtl/hbstrfmt.c
* src/rtl/hbcrc.c
* src/rtl/minmax.c
* src/rtl/hbrandom.c
* src/rtl/hbsocket.c
* src/rtl/hbbit.c
* src/rtl/hbgtcore.c
* src/rtl/cputime.c
* src/rtl/idle.c
* src/rtl/itemseri.c
* src/rtl/gtsln/gtsln.c
* src/rtl/gtpca/gtpca.c
* src/rtl/hbznet.c
* src/rtl/hbhex.c
* src/rtl/seconds.c
* src/rtl/abs.c
* src/rtl/gtwvt/gtwvt.c
* src/rtl/hbbyte.c
* src/rtl/val.c
* src/rdd/dbfntx/dbfntx1.c
* src/rdd/dbsql.c
* src/rdd/sdf1.c
* src/rdd/delim1.c
* src/rdd/dbf1.c
* src/rdd/dbffpt/dbffpt1.c
* src/compiler/hbmain.c
* src/compiler/complex.c
* src/compiler/harbour.yyc
* src/compiler/harbour.y
* src/compiler/harbour.yyh
* include/hbvmpub.h
* include/hbgtcore.h
* include/hbthread.h
* include/hbdefs.h
* include/hbmacro.h
* include/hbapi.h
* include/hbapiitm.h
* include/hbznet.h
* include/hbvm.h
* include/hbcomp.h
* include/hbcompdf.h
* include/hbexprop.h
* include/hbsocket.h
* include/hbchksum.h
* include/hbexprb.c
* include/hbdate.h
* contrib/hbct/bitnum.c
* contrib/hbct/dbftools.c
* contrib/hbct/files.c
* contrib/hbct/disk.c
* contrib/xhb/xhbfunc.c
* contrib/hbcurl/hbcurl.c
* contrib/hbnetio/netiocli.c
* contrib/hbnetio/netiosrv.c
* contrib/gtwvg/gtwvg.c
* contrib/gtwvg/wvggui.c
* contrib/gtwvg/wvgcore.c
* contrib/rddads/ads1.c
* contrib/hbwin/olecore.c
* HB_LONG -> HB_MAXINT
* HB_ULONG -> HB_MAXUINT
2010-02-07 16:03 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbdefs.h
! New Harbour types moved upper in the file to avoid

View File

@@ -1911,9 +1911,9 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
hb_arrayNew( pEvParams, 3 );
hb_arraySetNL( pEvParams, 1, ( HB_LONG ) LOWORD( wParam ) );
hb_arraySetNL( pEvParams, 2, ( HB_LONG ) HIWORD( wParam ) );
hb_arraySetNInt( pEvParams, 3, ( HB_LONG ) ( HB_PTRDIFF ) lParam );
hb_arraySetNL( pEvParams, 1, ( long ) LOWORD( wParam ) );
hb_arraySetNL( pEvParams, 2, ( long ) HIWORD( wParam ) );
hb_arraySetNInt( pEvParams, 3, ( HB_MAXINT ) ( HB_PTRDIFF ) lParam );
hb_gt_wvt_FireEvent( pWVT, HB_GTE_HSCROLL, pEvParams );
return 0;
@@ -1924,9 +1924,9 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
hb_arrayNew( pEvParams, 3 );
hb_arraySetNL( pEvParams, 1, ( HB_LONG ) LOWORD( wParam ) );
hb_arraySetNL( pEvParams, 2, ( HB_LONG ) HIWORD( wParam ) );
hb_arraySetNInt( pEvParams, 3, ( HB_LONG ) ( HB_PTRDIFF ) lParam );
hb_arraySetNL( pEvParams, 1, ( long ) LOWORD( wParam ) );
hb_arraySetNL( pEvParams, 2, ( long ) HIWORD( wParam ) );
hb_arraySetNInt( pEvParams, 3, ( HB_MAXINT ) ( HB_PTRDIFF ) lParam );
hb_gt_wvt_FireEvent( pWVT, HB_GTE_VSCROLL, pEvParams );
return 0;
@@ -1964,7 +1964,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
}
{ /* To evoke if that portion is covered by GUI control */
PHB_ITEM pEvParams = hb_itemNew( NULL );
hb_itemPutNInt( pEvParams, ( HB_LONG ) ( HB_PTRDIFF ) hWnd );
hb_itemPutNInt( pEvParams, ( HB_MAXINT ) ( HB_PTRDIFF ) hWnd );
hb_gt_wvt_FireEvent( pWVT, HB_GTE_PAINT, pEvParams );
}
return 0;
@@ -1988,7 +1988,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
{
hb_vmPushDynSym( pWVT->pSymWVT_SETFOCUS );
hb_vmPushNil();
hb_vmPushNumInt( ( HB_LONG ) ( HB_PTRDIFF ) hWnd );
hb_vmPushNumInt( ( HB_MAXINT ) ( HB_PTRDIFF ) hWnd );
hb_vmDo( 1 );
hb_vmRequestRestore();
}
@@ -2020,7 +2020,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
{
hb_vmPushDynSym( pWVT->pSymWVT_KILLFOCUS );
hb_vmPushNil();
hb_vmPushNumInt( ( HB_LONG ) ( HB_PTRDIFF ) hWnd );
hb_vmPushNumInt( ( HB_MAXINT ) ( HB_PTRDIFF ) hWnd );
hb_vmDo( 1 );
hb_vmRequestRestore();
}
@@ -3166,7 +3166,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
if( hb_itemGetNInt( pInfo->pNewVal ) != 0 )
{
HICON hIcon = LoadIcon( pWVT->hInstance,
MAKEINTRESOURCE( ( HB_LONG )
MAKEINTRESOURCE( ( HB_MAXINT )
hb_itemGetNInt( pInfo->pNewVal ) ) );
if( hIcon )
{
@@ -3567,7 +3567,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
else if( iIconType == 2 )
{
hIcon = LoadIcon( pWVT->hInstance,
MAKEINTRESOURCE( ( HB_LONG )
MAKEINTRESOURCE( ( HB_MAXINT )
hb_arrayGetNInt( pInfo->pNewVal2, 3 ) ) );
}
tnid.cbSize = sizeof( NOTIFYICONDATA ) ;

View File

@@ -390,7 +390,7 @@ BOOL CALLBACK hb_wvt_gtDlgProcMLess( HWND hDlg, UINT message, WPARAM wParam, LPA
{
hb_vmPushDynSym( ( PHB_DYNS ) pFunc );
hb_vmPushNil();
hb_vmPushNumInt( ( HB_LONG ) ( HB_PTRDIFF ) hDlg );
hb_vmPushNumInt( ( HB_MAXINT ) ( HB_PTRDIFF ) hDlg );
hb_vmPushNumInt( message );
hb_vmPushNumInt( wParam );
hb_vmPushNumInt( lParam );
@@ -408,7 +408,7 @@ BOOL CALLBACK hb_wvt_gtDlgProcMLess( HWND hDlg, UINT message, WPARAM wParam, LPA
{
hb_vmPushEvalSym();
hb_vmPush( _s->pFunc[ iIndex ] );
hb_vmPushNumInt( ( HB_LONG ) ( HB_PTRDIFF ) hDlg );
hb_vmPushNumInt( ( HB_MAXINT ) ( HB_PTRDIFF ) hDlg );
hb_vmPushNumInt( message );
hb_vmPushNumInt( wParam );
hb_vmPushNumInt( lParam );
@@ -507,7 +507,7 @@ BOOL CALLBACK hb_wvt_gtDlgProcModal( HWND hDlg, UINT message, WPARAM wParam, LPA
{
hb_vmPushDynSym( ( PHB_DYNS ) pFunc );
hb_vmPushNil();
hb_vmPushNumInt( ( HB_LONG ) ( HB_PTRDIFF ) hDlg );
hb_vmPushNumInt( ( HB_MAXINT ) ( HB_PTRDIFF ) hDlg );
hb_vmPushNumInt( message );
hb_vmPushNumInt( wParam );
hb_vmPushNumInt( lParam );
@@ -525,7 +525,7 @@ BOOL CALLBACK hb_wvt_gtDlgProcModal( HWND hDlg, UINT message, WPARAM wParam, LPA
{
hb_vmPushEvalSym();
hb_vmPush( pFunc );
hb_vmPushNumInt( ( HB_LONG ) ( HB_PTRDIFF ) hDlg );
hb_vmPushNumInt( ( HB_MAXINT ) ( HB_PTRDIFF ) hDlg );
hb_vmPushNumInt( message );
hb_vmPushNumInt( wParam );
hb_vmPushNumInt( lParam );

View File

@@ -1166,7 +1166,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
hb_arraySetNL( pEvParams, 1, ( long ) LOWORD( wParam ) );
hb_arraySetNL( pEvParams, 2, ( long ) HIWORD( wParam ) );
hb_arraySetNInt( pEvParams, 3, ( HB_LONG ) ( HB_PTRDIFF ) lParam );
hb_arraySetNInt( pEvParams, 3, ( HB_MAXINT ) ( HB_PTRDIFF ) lParam );
hb_gt_wvt_FireEvent( pWVT, HB_GTE_HSCROLL, pEvParams );
return 0;
@@ -1179,7 +1179,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
hb_arraySetNL( pEvParams, 1, ( long ) LOWORD( wParam ) );
hb_arraySetNL( pEvParams, 2, ( long ) HIWORD( wParam ) );
hb_arraySetNInt( pEvParams, 3, ( HB_LONG ) ( HB_PTRDIFF ) lParam );
hb_arraySetNInt( pEvParams, 3, ( HB_MAXINT ) ( HB_PTRDIFF ) lParam );
hb_gt_wvt_FireEvent( pWVT, HB_GTE_VSCROLL, pEvParams );
return 0;
@@ -1642,7 +1642,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
pWVT->bIconToFree = HB_FALSE;
pWVT->hIcon = LoadIcon( pWVT->hInstance,
MAKEINTRESOURCE( ( HB_LONG )
MAKEINTRESOURCE( ( HB_MAXINT )
hb_itemGetNInt( pInfo->pNewVal ) ) );
if( pWVT->hWnd )
@@ -1961,7 +1961,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
else if( iIconType == 2 )
{
hIcon = LoadIcon( pWVT->hInstance,
MAKEINTRESOURCE( ( HB_LONG )
MAKEINTRESOURCE( ( HB_MAXINT )
hb_arrayGetNInt( pInfo->pNewVal2, 3 ) ) );
}
tnid.cbSize = sizeof( NOTIFYICONDATA ) ;

View File

@@ -56,7 +56,7 @@
#include "hbapi.h"
static HB_BOOL __numParam( int iParam, HB_LONG * plNum )
static HB_BOOL __numParam( int iParam, HB_MAXINT * plNum )
{
const char *szHex = hb_parc( iParam );
@@ -96,7 +96,7 @@ static HB_BOOL __numParam( int iParam, HB_LONG * plNum )
HB_FUNC( NUMAND )
{
int iPCount = hb_pcount(), i = 1;
HB_LONG lValue = -1, lNext = 0;
HB_MAXINT lValue = -1, lNext = 0;
if( iPCount && __numParam( 1, &lValue ) )
{
@@ -112,7 +112,7 @@ HB_FUNC( NUMAND )
HB_FUNC( NUMOR )
{
int iPCount = hb_pcount(), i = 1;
HB_LONG lValue = -1, lNext = 0;
HB_MAXINT lValue = -1, lNext = 0;
if( iPCount && __numParam( 1, &lValue ) )
{
@@ -128,7 +128,7 @@ HB_FUNC( NUMOR )
HB_FUNC( NUMXOR )
{
int iPCount = hb_pcount(), i = 1;
HB_LONG lValue = -1, lNext = 0;
HB_MAXINT lValue = -1, lNext = 0;
if( iPCount && __numParam( 1, &lValue ) )
{
@@ -143,7 +143,7 @@ HB_FUNC( NUMXOR )
HB_FUNC( NUMNOT )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( __numParam( 1, &lValue ) )
lValue = ( ~lValue ) & 0xffff;
@@ -153,7 +153,7 @@ HB_FUNC( NUMNOT )
HB_FUNC( NUMLOW )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( __numParam( 1, &lValue ) )
lValue &= 0xff;
@@ -163,7 +163,7 @@ HB_FUNC( NUMLOW )
HB_FUNC( NUMHIGH )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( __numParam( 1, &lValue ) /* && lValue == lValue & 0xffff */ )
lValue = ( lValue >> 8 ) & 0xff;
@@ -173,7 +173,7 @@ HB_FUNC( NUMHIGH )
HB_FUNC( NUMROL )
{
HB_LONG lValue, lShift;
HB_MAXINT lValue, lShift;
if( __numParam( 1, &lValue ) && lValue == ( lValue & 0xffff ) && __numParam( 2, &lShift )
&& lShift == ( lShift & 0xffff ) )
@@ -199,7 +199,7 @@ HB_FUNC( NUMROL )
HB_FUNC( NUMMIRR )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( __numParam( 1, &lValue ) && lValue == ( lValue & 0xffff ) )
{
@@ -226,7 +226,7 @@ HB_FUNC( NUMMIRR )
HB_FUNC( CLEARBIT )
{
int iPCount = hb_pcount(), iBit, i = 1;
HB_LONG lValue;
HB_MAXINT lValue;
if( __numParam( 1, &lValue ) )
{
@@ -235,7 +235,7 @@ HB_FUNC( CLEARBIT )
iBit = hb_parni( ++i );
if( iBit < 1 || iBit > 64 )
break;
lValue &= ~( ( ( HB_LONG ) 1 ) << ( iBit - 1 ) );
lValue &= ~( ( ( HB_MAXINT ) 1 ) << ( iBit - 1 ) );
}
if( iPCount )
@@ -248,7 +248,7 @@ HB_FUNC( CLEARBIT )
HB_FUNC( SETBIT )
{
int iPCount = hb_pcount(), iBit, i = 1;
HB_LONG lValue;
HB_MAXINT lValue;
if( __numParam( 1, &lValue ) )
{
@@ -257,7 +257,7 @@ HB_FUNC( SETBIT )
iBit = hb_parni( ++i );
if( iBit < 1 || iBit > 64 )
break;
lValue |= ( ( HB_LONG ) 1 ) << ( iBit - 1 );
lValue |= ( ( HB_MAXINT ) 1 ) << ( iBit - 1 );
}
if( iPCount )
@@ -269,7 +269,7 @@ HB_FUNC( SETBIT )
HB_FUNC( ISBIT )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( __numParam( 1, &lValue ) )
{
@@ -277,7 +277,7 @@ HB_FUNC( ISBIT )
if( iBit )
--iBit;
lValue &= ( ( HB_LONG ) 1 ) << iBit;
lValue &= ( ( HB_MAXINT ) 1 ) << iBit;
}
else
lValue = 0;
@@ -287,7 +287,7 @@ HB_FUNC( ISBIT )
HB_FUNC( INTNEG )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( __numParam( 1, &lValue ) )
{
@@ -304,7 +304,7 @@ HB_FUNC( INTNEG )
HB_FUNC( INTPOS )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( __numParam( 1, &lValue ) )
{

View File

@@ -77,7 +77,7 @@ HB_FUNC( FIELDNUM )
HB_FUNC( DBFSIZE )
{
HB_LONG llSize = 0;
HB_MAXINT llSize = 0;
AREAP pArea;
if( ( pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer() ) != NULL )
@@ -93,7 +93,7 @@ HB_FUNC( DBFSIZE )
ulRecSize = hb_itemGetNL( pSize );
if( SELF_RECCOUNT( pArea, &ulRecCount ) == HB_SUCCESS )
{
llSize += ( HB_LONG ) ulRecCount *ulRecSize;
llSize += ( HB_MAXINT ) ulRecCount * ulRecSize;
}
}
}

View File

@@ -83,7 +83,7 @@ HB_FUNC( DIRMAKE )
if( hb_fsMkDir( hb_parcx( 1 ) ) )
hb_retni( 0 );
else
hb_retnint( - ( HB_LONG ) hb_fsOsError() );
hb_retnint( - ( HB_MAXINT ) hb_fsOsError() );
}
HB_FUNC( DIRNAME )

View File

@@ -293,7 +293,7 @@ HB_FUNC( FILEDELETE )
HB_FUNC( FILEMOVE )
{
hb_retnint( hb_fsRename( hb_parcx( 1 ),
hb_parcx( 2 ) ) ? 0 : - ( HB_LONG ) hb_fsOsError() );
hb_parcx( 2 ) ) ? 0 : - ( HB_MAXINT ) hb_fsOsError() );
}
@@ -305,7 +305,7 @@ HB_FUNC( RENAMEFILE )
HB_FUNC( DELETEFILE )
{
hb_retnint( hb_fsDelete( hb_parcx( 1 ) ) ? 0 : - ( HB_LONG ) hb_fsOsError() );
hb_retnint( hb_fsDelete( hb_parcx( 1 ) ) ? 0 : - ( HB_MAXINT ) hb_fsOsError() );
}

View File

@@ -1865,7 +1865,7 @@ HB_FUNC( CURL_EASY_STRERROR )
HB_FUNC( CURL_GETDATE )
{
if( HB_ISCHAR( 1 ) )
hb_retnint( ( HB_LONG ) curl_getdate( hb_parc( 1 ), NULL ) );
hb_retnint( ( HB_MAXINT ) curl_getdate( hb_parc( 1 ), NULL ) );
else
hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}

View File

@@ -473,7 +473,7 @@ static const char * s_fileDecode( const char * pszFilename,
if( iLen > 0 )
{
int iOverflow;
HB_LONG llPort;
HB_MAXINT llPort;
port_buf[ iLen ] = '\0';
llPort = hb_strValInt( port_buf, &iOverflow );

View File

@@ -565,7 +565,7 @@ HB_FUNC( NETIO_ACCEPT )
if( lsd && lsd->sd != HB_NO_SOCKET && !lsd->stop )
{
HB_LONG timeout = HB_ISNUM( 2 ) ? hb_parnint( 2 ) : -1;
HB_MAXINT timeout = HB_ISNUM( 2 ) ? hb_parnint( 2 ) : -1;
HB_SOCKET connsd;
int iLevel, iStrategy, keylen = ( int ) hb_parclen( 3 );

View File

@@ -692,7 +692,7 @@ void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant )
case VT_I8:
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
hb_itemPutNInt( pItem, ( HB_LONG ) pVariant->n1.n2.n3.lVal );
hb_itemPutNInt( pItem, ( HB_MAXINT ) pVariant->n1.n2.n3.lVal );
#elif defined( HB_OLE_NO_LL )
/* workaround for wrong OLE variant structure definition */
hb_itemPutNInt( pItem, * ( ( HB_LONGLONG * ) &pVariant->n1.n2.n3.lVal ) );
@@ -703,7 +703,7 @@ void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant )
case VT_I8 | VT_BYREF:
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
hb_itemPutNInt( pItem, ( HB_LONG ) *pVariant->n1.n2.n3.plVal );
hb_itemPutNInt( pItem, ( HB_MAXINT ) *pVariant->n1.n2.n3.plVal );
#elif defined( HB_OLE_NO_LLREF )
/* workaround for wrong OLE variant structure definition */
hb_itemPutNInt( pItem, * ( HB_LONGLONG * ) pVariant->n1.n2.n3.pdblVal );
@@ -739,24 +739,24 @@ void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant )
case VT_UI8:
/* TODO: sign is lost. Convertion to double will lose significant digits. */
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
hb_itemPutNInt( pItem, ( HB_LONG ) pVariant->n1.n2.n3.ulVal );
hb_itemPutNInt( pItem, ( HB_MAXINT ) pVariant->n1.n2.n3.ulVal );
#elif defined( HB_OLE_NO_LL )
/* workaround for wrong OLE variant structure definition */
hb_itemPutNInt( pItem, * ( ( HB_LONGLONG * ) &pVariant->n1.n2.n3.ulVal ) );
#else
hb_itemPutNInt( pItem, ( HB_LONG ) pVariant->n1.n2.n3.ullVal );
hb_itemPutNInt( pItem, ( HB_MAXINT ) pVariant->n1.n2.n3.ullVal );
#endif
break;
case VT_UI8 | VT_BYREF:
/* TODO: sign is lost. Convertion to double will lose significant digits. */
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
hb_itemPutNInt( pItem, ( HB_LONG ) *pVariant->n1.n2.n3.pulVal );
hb_itemPutNInt( pItem, ( HB_MAXINT ) *pVariant->n1.n2.n3.pulVal );
#elif defined( HB_OLE_NO_LLREF )
/* workaround for wrong OLE variant structure definition */
hb_itemPutNInt( pItem, * ( HB_LONGLONG * ) pVariant->n1.n2.n3.pdblVal );
#else
hb_itemPutNInt( pItem, ( HB_LONG ) *pVariant->n1.n2.n3.pullVal );
hb_itemPutNInt( pItem, ( HB_MAXINT ) *pVariant->n1.n2.n3.pullVal );
#endif
break;

View File

@@ -443,7 +443,7 @@ static void adsGetKeyItem( ADSAREAP pArea, PHB_ITEM pItem, int iKeyType,
if( pArea->iFileType == ADS_NTX )
{
int iLen = iKeyLen, iDec;
HB_LONG lValue;
HB_MAXINT lValue;
if( *pKeyBuf == '0' - 4 ) /* negative number */
{
@@ -2164,7 +2164,7 @@ static HB_ERRCODE adsGetValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
qVal = 0;
pArea->area.fEof = HB_TRUE;
}
hb_itemPutNIntLen( pItem, ( HB_LONG ) qVal, 20 );
hb_itemPutNIntLen( pItem, ( HB_MAXINT ) qVal, 20 );
#else
DOUBLE dVal = 0;
u32RetVal = AdsGetDouble( pArea->hTable, ADSFIELD( uiIndex ), &dVal );
@@ -2203,7 +2203,7 @@ static HB_ERRCODE adsGetValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
qVal = 0;
pArea->area.fEof = HB_TRUE;
}
hb_itemPutNIntLen( pItem, ( HB_LONG ) qVal, 10 );
hb_itemPutNIntLen( pItem, ( HB_MAXINT ) qVal, 10 );
break;
}
case HB_FT_ROWVER:
@@ -2215,7 +2215,7 @@ static HB_ERRCODE adsGetValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
qVal = 0;
pArea->area.fEof = HB_TRUE;
}
hb_itemPutNIntLen( pItem, ( HB_LONG ) qVal, 20 );
hb_itemPutNIntLen( pItem, ( HB_MAXINT ) qVal, 20 );
break;
}
#else

View File

@@ -158,7 +158,7 @@ HB_FUNC( XHB__KEYBOARD )
HB_FUNC( HB_CREATELEN8 )
{
char buffer[ 8 ];
HB_LONG llValue;
HB_MAXINT llValue;
if( HB_ISNUM( 1 ) )
{

View File

@@ -328,7 +328,7 @@ struct hb_struInteger
struct hb_struLong
{
HB_LONG value;
HB_MAXINT value;
USHORT length;
};
@@ -643,7 +643,7 @@ extern HB_EXPORT int hb_parni( int iParam ); /* retrieve a numeric para
extern HB_EXPORT int hb_parnidef( int iParam, int iDefValue ); /* retrieve a numeric parameter as a integer, return default value if parameter isn't numeric */
extern HB_EXPORT long hb_parnl( int iParam ); /* retrieve a numeric parameter as a long */
extern HB_EXPORT long hb_parnldef( int iParam, long lDefValue ); /* retrieve a numeric parameter as a long, return default value if parameter isn't numeric */
extern HB_EXPORT HB_LONG hb_parnint( int iParam ); /* retrieve a numeric parameter as a HB_LONG */
extern HB_EXPORT HB_MAXINT hb_parnint( int iParam ); /* retrieve a numeric parameter as a HB_MAXINT */
extern HB_EXPORT void * hb_parptr( int iParam ); /* retrieve a parameter as a pointer */
extern HB_EXPORT void * hb_parptrGC( const HB_GC_FUNCS * pFuncs, int iParam ); /* retrieve a parameter as a pointer if it's a pointer to GC allocated block */
#ifndef HB_LONG_LONG_OFF
@@ -663,7 +663,7 @@ extern HB_EXPORT int hb_parvl( int iParam, ... ); /* retrieve a logical
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 */
extern HB_EXPORT long hb_parvnl( int iParam, ... ); /* retrieve a numeric parameter as a long */
extern HB_EXPORT HB_LONG hb_parvnint( int iParam, ... ); /* retrieve a numeric parameter as a HB_LONG */
extern HB_EXPORT HB_MAXINT hb_parvnint( int iParam, ... ); /* retrieve a numeric parameter as a HB_MAXINT */
extern HB_EXPORT void * hb_parvptr( int iParam, ... ); /* retrieve a parameter as a pointer */
extern HB_EXPORT void * hb_parvptrGC( const HB_GC_FUNCS * pFuncs, int iParam, ... ); /* retrieve a parameter as a pointer if it's a pointer to GC allocated block */
#ifndef HB_LONG_LONG_OFF
@@ -687,12 +687,12 @@ 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 */
extern HB_EXPORT void hb_retnl( long lNumber );/* returns a long number */
extern HB_EXPORT void hb_retnint( HB_LONG lNumber );/* returns a long number */
extern HB_EXPORT void hb_retnint( HB_MAXINT lNumber );/* returns a long number */
extern HB_EXPORT void hb_retnlen( double dNumber, int iWidth, int iDec ); /* returns a double, with specific width and decimals */
extern HB_EXPORT void hb_retndlen( double dNumber, int iWidth, int iDec ); /* returns a double, with specific width and decimals */
extern HB_EXPORT void hb_retnilen( int iNumber, int iWidth ); /* returns a integer number, with specific width */
extern HB_EXPORT void hb_retnllen( long lNumber, int iWidth ); /* returns a long number, with specific width */
extern HB_EXPORT void hb_retnintlen( HB_LONG lNumber, int iWidth ); /* returns a long long number, with specific width */
extern HB_EXPORT void hb_retnintlen( HB_MAXINT lNumber, int iWidth ); /* returns a long long number, with specific width */
extern HB_EXPORT void hb_reta( HB_SIZE ulLen ); /* returns an array with a specific length */
extern HB_EXPORT void hb_retptr( void * ptr ); /* returns a pointer */
extern HB_EXPORT void hb_retptrGC( void * ptr ); /* returns a pointer to an allocated memory, collected by GC */
@@ -761,7 +761,7 @@ extern HB_EXPORT int hb_storl( int iLogical, int iParam ); /* stores a logica
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 */
extern HB_EXPORT int hb_stornd( double dValue, int iParam ); /* stores a double on a variable by reference */
extern HB_EXPORT int hb_stornint( HB_LONG lValue, int iParam ); /* stores a HB_LONG on a variable by reference */
extern HB_EXPORT int hb_stornint( HB_MAXINT lValue, int iParam ); /* stores a HB_MAXINT on a variable by reference */
extern HB_EXPORT int hb_storptr( void * pointer, int iParam ); /* stores a pointer on a variable by reference */
extern HB_EXPORT int hb_storptrGC( void * pointer, int iParam ); /* stores a pointer to GC block on a variable by reference */
#ifndef HB_LONG_LONG_OFF
@@ -779,7 +779,7 @@ extern HB_EXPORT int hb_storvl( int iLogical, int iParam, ... ); /* stores a
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 */
extern HB_EXPORT int hb_storvnd( double dValue, int iParam, ... ); /* stores a double on a variable by reference */
extern HB_EXPORT int hb_storvnint( HB_LONG lValue, int iParam, ... ); /* stores a HB_LONG on a variable by reference */
extern HB_EXPORT int hb_storvnint( HB_MAXINT lValue, int iParam, ... ); /* stores a HB_MAXINT on a variable by reference */
extern HB_EXPORT int hb_storvptr( void * pointer, int iParam, ... ); /* stores a pointer on a variable by reference */
extern HB_EXPORT int hb_storvptrGC( void * pointer, int iParam, ... ); /* stores a pointer to GC block on a variable by reference */
#ifndef HB_LONG_LONG_OFF
@@ -811,7 +811,7 @@ extern HB_EXPORT PHB_SYMB hb_arrayGetSymbol( PHB_ITEM pArray, HB_SIZE ulInde
extern HB_EXPORT HB_BOOL hb_arrayGetL( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the logical value contained on an array element */
extern HB_EXPORT int hb_arrayGetNI( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the int value contained on an array element */
extern HB_EXPORT long hb_arrayGetNL( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the long numeric value contained on an array element */
extern HB_EXPORT HB_LONG hb_arrayGetNInt( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the HB_LONG value contained on an array element */
extern HB_EXPORT HB_MAXINT hb_arrayGetNInt( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the HB_MAXINT value contained on an array element */
extern HB_EXPORT double hb_arrayGetND( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the double value contained on an array element */
extern HB_EXPORT char * hb_arrayGetDS( PHB_ITEM pArray, HB_SIZE ulIndex, char * szDate ); /* retrieves the date value contained in an array element */
extern HB_EXPORT long hb_arrayGetDL( PHB_ITEM pArray, HB_SIZE ulIndex ); /* retrieves the date value contained in an array element, as a long integer */
@@ -830,7 +830,7 @@ extern HB_EXPORT HB_BOOL hb_arraySetNL( PHB_ITEM pArray, HB_SIZE ulIndex, l
#ifndef HB_LONG_LONG_OFF
extern HB_EXPORT HB_BOOL hb_arraySetNLL( PHB_ITEM pArray, HB_SIZE ulIndex, HB_LONGLONG llNumber );
#endif
extern HB_EXPORT HB_BOOL hb_arraySetNInt( PHB_ITEM pArray, HB_SIZE ulIndex, HB_LONG lNumber );
extern HB_EXPORT HB_BOOL hb_arraySetNInt( PHB_ITEM pArray, HB_SIZE ulIndex, HB_MAXINT lNumber );
extern HB_EXPORT HB_BOOL hb_arraySetND( PHB_ITEM pArray, HB_SIZE ulIndex, double dNumber );
extern HB_EXPORT HB_BOOL hb_arraySetC( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText );
extern HB_EXPORT HB_BOOL hb_arraySetCL( PHB_ITEM pArray, HB_SIZE ulIndex, const char * szText, HB_SIZE ulLen );
@@ -930,10 +930,10 @@ extern HB_EXPORT HB_SIZE hb_strlentrim( const char * pszText ); /* like strlen
extern HB_EXPORT HB_SIZE hb_strnlen( const char * pszText, HB_SIZE ulLen ); /* like strlen() but result is limited to ulLen */
extern HB_EXPORT char * hb_xstrcat( char * dest, const char * src, ... ); /* Concatenates multiple strings into a single result */
extern HB_EXPORT char * hb_xstrcpy( char * szDest, const char * szSrc, ... ); /* Concatenates multiple strings into a single result */
extern HB_EXPORT HB_BOOL hb_compStrToNum( const char * szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth ); /* converts string to number, sets iDec, iWidth and returns HB_TRUE if results is double, used by compiler */
extern HB_EXPORT HB_BOOL hb_valStrnToNum( const char * szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth ); /* converts string to number, sets iDec, iWidth and returns HB_TRUE if results is double, used by VAL() */
extern HB_EXPORT HB_BOOL hb_strToNum( const char * szNum, HB_LONG * plVal, double * pdVal ); /* converts string to number, returns HB_TRUE if results is double */
extern HB_EXPORT HB_BOOL hb_strnToNum( const char * szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal ); /* converts string to number, returns HB_TRUE if results is double */
extern HB_EXPORT HB_BOOL hb_compStrToNum( const char * szNum, HB_SIZE ulLen, HB_MAXINT * plVal, double * pdVal, int * piDec, int * piWidth ); /* converts string to number, sets iDec, iWidth and returns HB_TRUE if results is double, used by compiler */
extern HB_EXPORT HB_BOOL hb_valStrnToNum( const char * szNum, HB_SIZE ulLen, HB_MAXINT * plVal, double * pdVal, int * piDec, int * piWidth ); /* converts string to number, sets iDec, iWidth and returns HB_TRUE if results is double, used by VAL() */
extern HB_EXPORT HB_BOOL hb_strToNum( const char * szNum, HB_MAXINT * plVal, double * pdVal ); /* converts string to number, returns HB_TRUE if results is double */
extern HB_EXPORT HB_BOOL hb_strnToNum( const char * szNum, HB_SIZE ulLen, HB_MAXINT * plVal, double * pdVal ); /* converts string to number, returns HB_TRUE if results is double */
extern HB_EXPORT int hb_snprintf( char * buffer, size_t bufsize, const char * format, ... ) HB_PRINTF_FORMAT( 3, 4 ); /* snprintf() equivalent */
extern HB_EXPORT int hb_vsnprintf( char * buffer, size_t bufsize, const char * format, va_list ap ); /* vsnprintf() equivalent */
extern HB_EXPORT int hb_printf_params( const char * format );
@@ -964,9 +964,9 @@ extern HB_EXPORT double hb_strVal( const char * szText, HB_SIZE ulLen ); /* r
extern HB_EXPORT const char * hb_strLTrim( const char * szText, HB_SIZE * ulLen ); /* return a pointer to the first non-white space character */
extern HB_EXPORT HB_SIZE hb_strRTrimLen( const char * szText, HB_SIZE ulLen, HB_BOOL bAnySpace ); /* return length of a string, ignoring trailing white space (or true spaces) */
extern HB_EXPORT double hb_strVal( const char * szText, HB_SIZE ulLen );
extern HB_EXPORT HB_LONG hb_strValInt( const char * szText, int * iOverflow );
extern HB_EXPORT HB_MAXINT hb_strValInt( const char * szText, int * iOverflow );
extern HB_EXPORT char * hb_strRemEscSeq( char * szText, HB_SIZE * ulLen ); /* remove C ESC sequences and converts them to Clipper chars */
extern HB_EXPORT char * hb_numToStr( char * szBuf, HB_SIZE ulSize, HB_LONG lNumber );
extern HB_EXPORT char * hb_numToStr( char * szBuf, HB_SIZE ulSize, HB_MAXINT lNumber );
extern HB_EXPORT double hb_numRound( double dResult, int iDec ); /* round a number to a specific number of digits */
extern HB_EXPORT double hb_numInt( double dNum ); /* take the integer part of the number */
extern HB_EXPORT double hb_random_num( void );

View File

@@ -97,7 +97,7 @@ extern HB_EXPORT double hb_itemGetND ( PHB_ITEM pItem );
extern HB_EXPORT double hb_itemGetNDDec ( PHB_ITEM pItem, int * piDec );
extern HB_EXPORT int hb_itemGetNI ( PHB_ITEM pItem );
extern HB_EXPORT long hb_itemGetNL ( PHB_ITEM pItem );
extern HB_EXPORT HB_LONG hb_itemGetNInt ( PHB_ITEM pItem );
extern HB_EXPORT HB_MAXINT hb_itemGetNInt ( PHB_ITEM pItem );
extern HB_EXPORT void hb_itemGetNLen ( PHB_ITEM pItem, int * piWidth, int * piDec );
extern HB_EXPORT void * hb_itemGetPtr ( PHB_ITEM pItem );
extern HB_EXPORT void * hb_itemGetPtrGC ( PHB_ITEM pItem, const HB_GC_FUNCS * pFuncs );
@@ -123,8 +123,8 @@ extern HB_EXPORT PHB_ITEM hb_itemPutL ( PHB_ITEM pItem, HB_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 );
extern HB_EXPORT PHB_ITEM hb_itemPutNL ( PHB_ITEM pItem, long lNumber );
extern HB_EXPORT PHB_ITEM hb_itemPutNInt ( PHB_ITEM pItem, HB_LONG lNumber );
extern HB_EXPORT PHB_ITEM hb_itemPutNIntLen( PHB_ITEM pItem, HB_LONG lNumber, int iWidth );
extern HB_EXPORT PHB_ITEM hb_itemPutNInt ( PHB_ITEM pItem, HB_MAXINT lNumber );
extern HB_EXPORT PHB_ITEM hb_itemPutNIntLen( PHB_ITEM pItem, HB_MAXINT lNumber, int iWidth );
extern HB_EXPORT PHB_ITEM hb_itemPutNLen ( PHB_ITEM pItem, double dNumber, int iWidth, int iDec );
extern HB_EXPORT PHB_ITEM hb_itemPutNDLen ( PHB_ITEM pItem, double dNumber, int iWidth, int iDec );
extern HB_EXPORT PHB_ITEM hb_itemPutNDDec ( PHB_ITEM pItem, double dNumber, int iDec );

View File

@@ -57,8 +57,8 @@ HB_EXTERN_BEGIN
extern HB_EXPORT HB_U32 hb_adler32( HB_U32 adler, const void * buf, HB_SIZE len );
extern HB_EXPORT HB_U16 hb_crc16( HB_U16 crc, const void * buf, HB_SIZE len );
extern HB_EXPORT HB_U32 hb_crc32( HB_U32 crc, const void * buf, HB_SIZE len );
extern HB_EXPORT HB_ULONG hb_crc( HB_ULONG crc, const void * buf, HB_SIZE len, HB_ULONG poly );
extern HB_EXPORT HB_ULONG hb_crcct( HB_ULONG crc, const void * buf, HB_SIZE len, HB_ULONG poly );
extern HB_EXPORT HB_MAXUINT hb_crc( HB_MAXUINT crc, const void * buf, HB_SIZE len, HB_MAXUINT poly );
extern HB_EXPORT HB_MAXUINT hb_crcct( HB_MAXUINT crc, const void * buf, HB_SIZE len, HB_MAXUINT poly );
extern HB_EXPORT void hb_md5( const void * data, HB_SIZE datalen, char * digest );
extern HB_EXPORT void hb_md5file( HB_FHANDLE hFile, char * digest );

View File

@@ -203,14 +203,14 @@ extern void hb_compGenPushVarRef( const char * szVarName, HB_COMP_DECL );
extern void hb_compGenPushMemvarRef( const char * szVarName, HB_COMP_DECL ); /* generates the pcode to push memvar variable by reference to the virtual machine stack */
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_compGenPushLong( HB_MAXINT 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_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, HB_BOOL bFunction, HB_COMP_DECL ); /* Pushes a symbol on to the Virtual machine stack */
extern void hb_compGenPushAliasedVar( const char *, HB_BOOL, const char *, HB_LONG, HB_COMP_DECL );
extern void hb_compGenPopAliasedVar( const char *, HB_BOOL, const char *, HB_LONG, HB_COMP_DECL );
extern void hb_compGenPushAliasedVar( const char *, HB_BOOL, const char *, HB_MAXINT, HB_COMP_DECL );
extern void hb_compGenPopAliasedVar( const char *, HB_BOOL, const char *, HB_MAXINT, HB_COMP_DECL );
extern void hb_compGenPCode1( BYTE, HB_COMP_DECL ); /* generates 1 byte of pcode */
extern void hb_compGenPCode2( BYTE, BYTE, HB_COMP_DECL ); /* generates 2 bytes of pcode + flag for optional StrongType(). */
extern void hb_compGenPCode3( BYTE, BYTE, BYTE, HB_COMP_DECL ); /* generates 3 bytes of pcode + flag for optional StrongType() */

View File

@@ -268,8 +268,8 @@ typedef struct HB_EXPR_
struct
{
union {
HB_LONG l; /* long value */
double d; /* double value */
HB_MAXINT l; /* long value */
double d; /* double value */
} val;
unsigned char bWidth; /* unsigned char used intentionally */
unsigned char bDec; /* unsigned char used intentionally */

View File

@@ -61,7 +61,7 @@ extern HB_EXPORT double hb_secondsCPU( int n );
extern HB_EXPORT double hb_dateSeconds( void );
/* return UTC julian timestamp in milliseconds */
extern HB_EXPORT HB_ULONG hb_dateMilliSeconds( void );
extern HB_EXPORT HB_MAXUINT hb_dateMilliSeconds( void );
/* functions to operate on julian date values */

View File

@@ -601,7 +601,6 @@ typedef unsigned long HB_COUNTER;
*/
/* TODO: Remove dependence on old types */
/* TODO: Solve HB_LONG/HB_ULONG. It currently means something else that it would later. */
/* Harbour overloaded types: */

View File

@@ -1793,7 +1793,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall )
usCount && pParms->value.asList.pExprList->ExprType == HB_ET_NUMERIC )
{
HB_EXPR_PTR pArg = pParms->value.asList.pExprList;
HB_LONG lResult = 0;
HB_MAXINT lResult = 0;
HB_BOOL fOptimize = HB_FALSE, fBool = HB_FALSE;
if( usCount >= 2 )
@@ -1847,28 +1847,28 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall )
}
else if( strcmp( "TEST", pName->value.asSymbol + 6 ) == 0 )
{
HB_LONG lBit = hb_compExprAsLongNum( pArg->pNext );
HB_MAXINT lBit = hb_compExprAsLongNum( pArg->pNext );
lResult = ( hb_compExprAsLongNum( pArg ) &
( ( HB_LONG ) 1 << lBit ) ) != 0;
( ( HB_MAXINT ) 1 << lBit ) ) != 0;
fOptimize = fBool = HB_TRUE;
}
else if( strcmp( "SET", pName->value.asSymbol + 6 ) == 0 )
{
HB_LONG lBit = hb_compExprAsLongNum( pArg->pNext );
HB_MAXINT lBit = hb_compExprAsLongNum( pArg->pNext );
lResult = hb_compExprAsLongNum( pArg ) |
( ( HB_LONG ) 1 << lBit );
( ( HB_MAXINT ) 1 << lBit );
fOptimize = HB_TRUE;
}
else if( strcmp( "RESET", pName->value.asSymbol + 6 ) == 0 )
{
HB_LONG lBit = hb_compExprAsLongNum( pArg->pNext );
HB_MAXINT lBit = hb_compExprAsLongNum( pArg->pNext );
lResult = hb_compExprAsLongNum( pArg ) &
( ~ ( ( HB_LONG ) 1 << lBit ) );
( ~ ( ( HB_MAXINT ) 1 << lBit ) );
fOptimize = HB_TRUE;
}
else if( strcmp( "SHIFT", pName->value.asSymbol + 6 ) == 0 )
{
HB_LONG lBits = hb_compExprAsLongNum( pArg->pNext );
HB_MAXINT lBits = hb_compExprAsLongNum( pArg->pNext );
lResult = hb_compExprAsLongNum( pArg );
if( lBits < 0 )
lResult >>= -lBits;

View File

@@ -79,7 +79,7 @@ extern const HB_EXPR_FUNC_PTR hb_comp_ExprTable[ HB_EXPR_COUNT ];
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_compExprNewLong( HB_MAXINT, 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, HB_BOOL, HB_COMP_DECL );
@@ -162,7 +162,7 @@ extern int hb_compExprAsInteger( HB_EXPR_PTR );
extern int hb_compExprAsNumSign( HB_EXPR_PTR );
extern int hb_compExprIsString( HB_EXPR_PTR );
extern int hb_compExprAsStringLen( HB_EXPR_PTR );
extern HB_LONG hb_compExprAsLongNum( HB_EXPR_PTR );
extern HB_MAXINT hb_compExprAsLongNum( HB_EXPR_PTR );
extern const char * hb_compExprAsString( HB_EXPR_PTR );
extern const char * hb_compExprAsSymbol( HB_EXPR_PTR );
@@ -205,7 +205,7 @@ extern HB_BOOL hb_compExprReduceCTOD( HB_EXPR_PTR, HB_COMP_DECL );
extern HB_BOOL hb_compExprReduceUPPER( HB_EXPR_PTR, HB_COMP_DECL );
extern HB_BOOL hb_compExprReduceMIN( HB_EXPR_PTR, HB_COMP_DECL );
extern HB_BOOL hb_compExprReduceMAX( HB_EXPR_PTR, HB_COMP_DECL );
extern HB_BOOL hb_compExprReduceBitFunc( HB_EXPR_PTR, HB_LONG, HB_BOOL, HB_COMP_DECL );
extern HB_BOOL hb_compExprReduceBitFunc( HB_EXPR_PTR, HB_MAXINT, HB_BOOL, HB_COMP_DECL );
HB_EXTERN_END

View File

@@ -316,9 +316,9 @@ typedef struct _HB_GT_BASE
HB_BOOL fMouseVisible;
int iMouseLastRow;
int iMouseLastCol;
HB_LONG iMouseLeftTimer;
HB_LONG iMouseRightTimer;
HB_LONG iMouseMiddleTimer;
HB_MAXINT iMouseLeftTimer;
HB_MAXINT iMouseRightTimer;
HB_MAXINT iMouseMiddleTimer;
int defaultKeyBuffer[ HB_DEFAULT_INKEY_BUFSIZE + 1 ];

View File

@@ -130,7 +130,7 @@ extern void hb_macroGenJumpHere( ULONG ulOffset, HB_COMP_DECL );
extern ULONG hb_macroGenJumpTrue( LONG lOffset, HB_COMP_DECL );
extern void hb_macroGenPushSymbol( const char * szSymbolName, HB_BOOL bFunction, HB_COMP_DECL );
extern void hb_macroGenPushLong( HB_LONG lNumber, HB_COMP_DECL );
extern void hb_macroGenPushLong( HB_MAXINT 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_macroGenMessage( const char * szMsgName, HB_BOOL bIsObject, HB_COMP_DECL );
@@ -140,14 +140,14 @@ extern void hb_macroGenPopMemvar( const char * szVarName, HB_COMP_DECL );
extern void hb_macroGenPopAliasedVar( const char * szVarName,
HB_BOOL bPushAliasValue,
const char * szAlias,
HB_LONG lWorkarea, HB_COMP_DECL );
HB_MAXINT lWorkarea, HB_COMP_DECL );
extern void hb_macroGenPushVar( const char * szVarName, HB_BOOL bMacroVar, HB_COMP_DECL );
extern void hb_macroGenPushVarRef( const char * szVarName, HB_COMP_DECL );
extern void hb_macroGenPushMemvarRef( const char * szVarName, HB_COMP_DECL );
extern void hb_macroGenPushAliasedVar( const char * szVarName,
HB_BOOL bPushAliasValue,
const char * szAlias,
HB_LONG lWorkarea, HB_COMP_DECL );
HB_MAXINT lWorkarea, HB_COMP_DECL );
extern void hb_macroGenPushLogical( int iTrueFalse, HB_COMP_DECL );
extern void hb_macroGenPushDouble( double dNumber, BYTE bWidth, BYTE bDec, HB_COMP_DECL );
extern void hb_macroGenPushFunCall( const char * szFunName, HB_COMP_DECL );

View File

@@ -92,12 +92,12 @@ HB_EXPORT extern int hb_socketClose( HB_SOCKET sd );
HB_EXPORT extern int hb_socketShutdown( HB_SOCKET sd, int iMode );
HB_EXPORT extern int hb_socketBind( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen );
HB_EXPORT extern int hb_socketListen( HB_SOCKET sd, int iBacklog );
HB_EXPORT extern HB_SOCKET hb_socketAccept( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen, HB_LONG timeout );
HB_EXPORT extern int hb_socketConnect( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen, HB_LONG timeout );
HB_EXPORT extern long hb_socketSend( HB_SOCKET sd, const void * data, long len, int flags, HB_LONG timeout );
HB_EXPORT extern long hb_socketSendTo( HB_SOCKET sd, const void * data, long len, int flags, const void * pSockAddr, unsigned uiSockLen, HB_LONG timeout );
HB_EXPORT extern long hb_socketRecv( HB_SOCKET sd, void * data, long len, int flags, HB_LONG timeout );
HB_EXPORT extern long hb_socketRecvFrom( HB_SOCKET sd, void * data, long len, int flags, void ** pSockAddr, unsigned * puiSockLen, HB_LONG timeout );
HB_EXPORT extern HB_SOCKET hb_socketAccept( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen, HB_MAXINT timeout );
HB_EXPORT extern int hb_socketConnect( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen, HB_MAXINT timeout );
HB_EXPORT extern long hb_socketSend( HB_SOCKET sd, const void * data, long len, int flags, HB_MAXINT timeout );
HB_EXPORT extern long hb_socketSendTo( HB_SOCKET sd, const void * data, long len, int flags, const void * pSockAddr, unsigned uiSockLen, HB_MAXINT timeout );
HB_EXPORT extern long hb_socketRecv( HB_SOCKET sd, void * data, long len, int flags, HB_MAXINT timeout );
HB_EXPORT extern long hb_socketRecvFrom( HB_SOCKET sd, void * data, long len, int flags, void ** pSockAddr, unsigned * puiSockLen, HB_MAXINT timeout );
HB_EXPORT extern int hb_socketSetBlockingIO( HB_SOCKET sd, HB_BOOL fBlocking );
HB_EXPORT extern int hb_socketSetNoDelay( HB_SOCKET sd, HB_BOOL fNoDelay );
HB_EXPORT extern int hb_socketSetReuseAddr( HB_SOCKET sd, HB_BOOL fReuse );
@@ -108,13 +108,13 @@ HB_EXPORT extern int hb_socketSetRcvBufSize( HB_SOCKET sd, int iSize );
HB_EXPORT extern int hb_socketGetRcvBufSize( HB_SOCKET sd, int * piSize );
HB_EXPORT extern int hb_socketGetSndBufSize( HB_SOCKET sd, int * piSize );
HB_EXPORT extern int hb_socketSetMulticast( HB_SOCKET sd, int af, const char * szAddr );
HB_EXPORT extern int hb_socketSelectRead( HB_SOCKET sd, HB_LONG timeout );
HB_EXPORT extern int hb_socketSelectWrite( HB_SOCKET sd, HB_LONG timeout );
HB_EXPORT extern int hb_socketSelectWriteEx( HB_SOCKET sd, HB_LONG timeout );
HB_EXPORT extern int hb_socketSelectRead( HB_SOCKET sd, HB_MAXINT timeout );
HB_EXPORT extern int hb_socketSelectWrite( HB_SOCKET sd, HB_MAXINT timeout );
HB_EXPORT extern int hb_socketSelectWriteEx( HB_SOCKET sd, HB_MAXINT timeout );
HB_EXPORT extern int hb_socketSelect( PHB_ITEM pArrayRD, HB_BOOL fSetRD,
PHB_ITEM pArrayWR, HB_BOOL fSetWR,
PHB_ITEM pArrayEX, HB_BOOL fSetEX,
HB_LONG timeout, HB_SOCKET_FUNC pFunc );
HB_MAXINT timeout, HB_SOCKET_FUNC pFunc );
HB_EXTERN_END

View File

@@ -83,7 +83,7 @@ HB_EXTERN_BEGIN
# include "hbtask.h"
typedef HB_LONG HB_THREAD_NO;
typedef HB_MAXINT HB_THREAD_NO;
typedef void * HB_THREAD_ID;
typedef void * HB_CRITICAL_T;
typedef void * HB_COND_T;
@@ -122,7 +122,7 @@ HB_EXTERN_BEGIN
#elif defined( HB_PTHREAD_API )
typedef HB_LONG HB_THREAD_NO;
typedef HB_MAXINT HB_THREAD_NO;
typedef pthread_t HB_THREAD_ID;
typedef pthread_t HB_THREAD_HANDLE;
typedef pthread_mutex_t HB_RAWCRITICAL_T;
@@ -173,7 +173,7 @@ HB_EXTERN_BEGIN
#elif defined( HB_OS_WIN )
typedef HB_LONG HB_THREAD_NO;
typedef HB_MAXINT HB_THREAD_NO;
typedef HANDLE HB_THREAD_HANDLE;
typedef CRITICAL_SECTION HB_RAWCRITICAL_T;
typedef HANDLE HB_OSCOND_T;
@@ -216,7 +216,7 @@ HB_EXTERN_BEGIN
* it may cause troubles when code will be ported to other platforms.
*/
/* typedef TID HB_THREAD_NO; */
typedef HB_LONG HB_THREAD_NO;
typedef HB_MAXINT HB_THREAD_NO;
typedef TID HB_THREAD_ID;
typedef TID HB_THREAD_HANDLE;
typedef HMTX HB_RAWCRITICAL_T;

View File

@@ -153,7 +153,7 @@ extern HB_EXPORT void hb_vmPushNumber( double dNumber, int iDec ); /* pushes
extern HB_EXPORT void hb_vmPushInteger( int iNumber ); /* pushes a integer number onto the stack */
extern HB_EXPORT void hb_vmPushLong( long lNumber ); /* pushes a long number onto the stack */
extern HB_EXPORT void hb_vmPushDouble( double lNumber, int iDec ); /* pushes a double number onto the stack */
extern HB_EXPORT void hb_vmPushNumInt( HB_LONG lNumber ); /* pushes a number on to the stack and decides if it is integer or HB_LONG */
extern HB_EXPORT void hb_vmPushNumInt( HB_MAXINT lNumber ); /* pushes a number on to the stack and decides if it is integer or HB_MAXINT */
extern HB_EXPORT void hb_vmPushLogical( HB_BOOL bValue ); /* pushes a logical value onto the stack */
extern HB_EXPORT void hb_vmPushString( const char * szText, HB_SIZE length ); /* pushes a string on to the stack */
extern HB_EXPORT void hb_vmPushStringPcode( const char * szText, HB_SIZE length ); /* pushes a string from pcode on to the stack */

View File

@@ -78,8 +78,8 @@ struct _HB_SYMB;
# endif
# define HB_ITEM_GET_NUMINTRAW( p ) ( HB_IS_INTEGER( p ) ? \
( HB_LONG ) (p)->item.asInteger.value : \
( HB_LONG ) (p)->item.asLong.value )
( HB_MAXINT ) (p)->item.asInteger.value : \
( HB_MAXINT ) (p)->item.asLong.value )
# define HB_ITEM_PUT_NUMINTRAW( p, v ) \
do { \

View File

@@ -64,9 +64,9 @@ HB_EXTERN_BEGIN
typedef void * PHB_ZNETSTREAM;
#endif
typedef long ( * HB_INET_SFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, const void *, long, HB_LONG, long * );
typedef long ( * HB_INET_RFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, void *, long, HB_LONG );
typedef long ( * HB_INET_FFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, HB_LONG );
typedef long ( * HB_INET_SFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, const void *, long, HB_MAXINT, long * );
typedef long ( * HB_INET_RFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, void *, long, HB_MAXINT );
typedef long ( * HB_INET_FFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, HB_MAXINT );
typedef void ( * HB_INET_CFUNC ) ( PHB_ZNETSTREAM );
extern HB_EXPORT int hb_znetError( PHB_ZNETSTREAM pStream );
@@ -75,9 +75,9 @@ extern HB_EXPORT PHB_ZNETSTREAM hb_znetOpen( int level, int strategy );
extern HB_EXPORT void hb_znetEncryptKey( PHB_ZNETSTREAM pStream, const void * keydata, int keylen );
extern HB_EXPORT void hb_znetClose( PHB_ZNETSTREAM pStream );
extern HB_EXPORT int hb_znetError( PHB_ZNETSTREAM pStream );
extern HB_EXPORT long hb_znetRead( PHB_ZNETSTREAM pStream, HB_SOCKET sd, void * buffer, long len, HB_LONG timeout );
extern HB_EXPORT long hb_znetFlush( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_LONG timeout );
extern HB_EXPORT long hb_znetWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, const void * buffer, long len, HB_LONG timeout, long * plast );
extern HB_EXPORT long hb_znetRead( PHB_ZNETSTREAM pStream, HB_SOCKET sd, void * buffer, long len, HB_MAXINT timeout );
extern HB_EXPORT long hb_znetFlush( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_MAXINT timeout );
extern HB_EXPORT long hb_znetWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, const void * buffer, long len, HB_MAXINT timeout, long * plast );
extern HB_EXPORT HB_BOOL hb_znetInetInitialize( PHB_ITEM, PHB_ZNETSTREAM,
HB_INET_RFUNC,

View File

@@ -267,14 +267,14 @@ int hb_compExprAsInteger( HB_EXPR_PTR pExpr )
return 0;
}
HB_LONG hb_compExprAsLongNum( HB_EXPR_PTR pExpr )
HB_MAXINT hb_compExprAsLongNum( HB_EXPR_PTR pExpr )
{
if( pExpr->ExprType == HB_ET_NUMERIC )
{
if( pExpr->value.asNum.NumType == HB_ET_LONG )
return pExpr->value.asNum.val.l;
else
return ( HB_LONG ) pExpr->value.asNum.val.d;
return ( HB_MAXINT ) pExpr->value.asNum.val.d;
}
else
return 0;
@@ -320,7 +320,7 @@ HB_EXPR_PTR hb_compExprNewDouble( double dValue, BYTE ucWidth, BYTE ucDec,
return pExpr;
}
HB_EXPR_PTR hb_compExprNewLong( HB_LONG lValue, HB_COMP_DECL )
HB_EXPR_PTR hb_compExprNewLong( HB_MAXINT lValue, HB_COMP_DECL )
{
HB_EXPR_PTR pExpr;

View File

@@ -2137,7 +2137,7 @@ HB_BOOL hb_compExprReduceINT( HB_EXPR_PTR pSelf, HB_COMP_DECL )
{
HB_MAXDBL dVal = ( HB_MAXDBL ) pArg->value.asNum.val.d;
if( HB_DBL_LIM_LONG( dVal ) )
pExpr = hb_compExprNewLong( ( HB_LONG ) pArg->value.asNum.val.d, HB_COMP_PARAM );
pExpr = hb_compExprNewLong( ( HB_MAXINT ) pArg->value.asNum.val.d, HB_COMP_PARAM );
else
pExpr = hb_compExprNewDouble( pArg->value.asNum.val.d,
pArg->value.asNum.bWidth, 0,
@@ -2513,7 +2513,7 @@ HB_BOOL hb_compExprReduceMAX( HB_EXPR_PTR pSelf, HB_COMP_DECL )
return HB_FALSE;
}
HB_BOOL hb_compExprReduceBitFunc( HB_EXPR_PTR pSelf, HB_LONG lResult, HB_BOOL fBool, HB_COMP_DECL )
HB_BOOL hb_compExprReduceBitFunc( HB_EXPR_PTR pSelf, HB_MAXINT lResult, HB_BOOL fBool, HB_COMP_DECL )
{
HB_EXPR_PTR pParms = pSelf->value.asFunCall.pParms;
HB_EXPR_PTR pExpr = fBool ? hb_compExprNewLogical( lResult != 0, HB_COMP_PARAM ) :

View File

@@ -158,7 +158,7 @@ void hb_timeStampGetLocal( int * piYear, int * piMonth, int * piDay,
}
/* return UTC julian timestamp in milliseconds */
HB_ULONG hb_dateMilliSeconds( void )
HB_MAXUINT hb_dateMilliSeconds( void )
{
HB_TRACE(HB_TR_DEBUG, ("hb_dateMilliSeconds()"));
@@ -166,7 +166,7 @@ HB_ULONG hb_dateMilliSeconds( void )
{
SYSTEMTIME st;
GetSystemTime( &st );
return ( HB_ULONG ) hb_dateEncode( st.wYear, st.wMonth, st.wDay ) *
return ( HB_MAXUINT ) hb_dateEncode( st.wYear, st.wMonth, st.wDay ) *
HB_MILLISECS_PER_DAY +
hb_timeEncode( st.wHour, st.wMinute, st.wSecond, st.wMilliseconds );
}
@@ -174,16 +174,16 @@ HB_ULONG hb_dateMilliSeconds( void )
{
struct timeval tv;
gettimeofday( &tv, NULL );
return ( ( HB_ULONG ) tv.tv_sec +
( HB_ULONG ) HB_SYS_DATE_BASE * HB_SECONDS_PER_DAY ) * 1000 +
return ( ( HB_MAXUINT ) tv.tv_sec +
( HB_MAXUINT ) HB_SYS_DATE_BASE * HB_SECONDS_PER_DAY ) * 1000 +
tv.tv_usec / 1000;
}
#else
{
struct timeb tb;
ftime( &tb );
return ( ( HB_ULONG ) tb.time +
( HB_ULONG ) HB_SYS_DATE_BASE * HB_SECONDS_PER_DAY ) * 1000 +
return ( ( HB_MAXUINT ) tb.time +
( HB_MAXUINT ) HB_SYS_DATE_BASE * HB_SECONDS_PER_DAY ) * 1000 +
tb.time;
}
#endif

View File

@@ -535,7 +535,7 @@ double hb_numDecConv( double dNum, int iDec )
return hb_numRound( dNum, 0 );
}
static HB_BOOL hb_str2number( HB_BOOL fPCode, const char* szNum, HB_SIZE ulLen, HB_LONG * lVal, double * dVal, int * piDec, int * piWidth )
static HB_BOOL hb_str2number( HB_BOOL fPCode, const char* szNum, HB_SIZE ulLen, HB_MAXINT * lVal, double * dVal, int * piDec, int * piWidth )
{
HB_BOOL fDbl = HB_FALSE, fDec = HB_FALSE, fNeg, fHex = HB_FALSE;
HB_SIZE ulPos = 0;
@@ -587,7 +587,7 @@ static HB_BOOL hb_str2number( HB_BOOL fPCode, const char* szNum, HB_SIZE ulLen,
}
else
{
HB_LONG lLimV;
HB_MAXINT lLimV;
int iLimC;
lLimV = HB_LONG_MAX / 10;
@@ -700,25 +700,25 @@ static HB_BOOL hb_str2number( HB_BOOL fPCode, const char* szNum, HB_SIZE ulLen,
return fDbl;
}
HB_BOOL hb_compStrToNum( const char* szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth )
HB_BOOL hb_compStrToNum( const char* szNum, HB_SIZE ulLen, HB_MAXINT * plVal, double * pdVal, int * piDec, int * piWidth )
{
HB_TRACE(HB_TR_DEBUG, ("hb_compStrToNum( %s, %lu, %p, %p, %p, %p)", szNum, ulLen, plVal, pdVal, piDec, piWidth ));
return hb_str2number( HB_TRUE, szNum, ulLen, plVal, pdVal, piDec, piWidth );
}
HB_BOOL hb_valStrnToNum( const char* szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal, int * piDec, int * piWidth )
HB_BOOL hb_valStrnToNum( const char* szNum, HB_SIZE ulLen, HB_MAXINT * plVal, double * pdVal, int * piDec, int * piWidth )
{
HB_TRACE(HB_TR_DEBUG, ("hb_valStrnToNum( %s, %lu, %p, %p, %p, %p)", szNum, ulLen, plVal, pdVal, piDec, piWidth ));
return hb_str2number( HB_FALSE, szNum, ulLen, plVal, pdVal, piDec, piWidth );
}
HB_BOOL hb_strToNum( const char* szNum, HB_LONG * plVal, double * pdVal )
HB_BOOL hb_strToNum( const char* szNum, HB_MAXINT * plVal, double * pdVal )
{
HB_TRACE(HB_TR_DEBUG, ("hb_strToNum(%s, %p, %p)", szNum, plVal, pdVal ));
return hb_str2number( HB_FALSE, szNum, strlen( szNum ), plVal, pdVal, NULL, NULL );
}
HB_BOOL hb_strnToNum( const char* szNum, HB_SIZE ulLen, HB_LONG * plVal, double * pdVal )
HB_BOOL hb_strnToNum( const char* szNum, HB_SIZE ulLen, HB_MAXINT * plVal, double * pdVal )
{
HB_TRACE(HB_TR_DEBUG, ("hb_strnToNum(%.*s, %lu, %p, %p)", ( int ) ulLen, szNum, ulLen, plVal, pdVal ));
return hb_str2number( HB_FALSE, szNum, ulLen, plVal, pdVal, NULL, NULL );
@@ -727,7 +727,7 @@ HB_BOOL hb_strnToNum( const char* szNum, HB_SIZE ulLen, HB_LONG * plVal, double
/* returns the numeric value of a character string representation of a number */
double hb_strVal( const char * szText, HB_SIZE ulLen )
{
HB_LONG lVal;
HB_MAXINT lVal;
double dVal;
HB_TRACE(HB_TR_DEBUG, ("hb_strVal(%.*s, %lu)", ( int ) ulLen, szText, ulLen));
@@ -737,9 +737,9 @@ double hb_strVal( const char * szText, HB_SIZE ulLen )
return dVal;
}
HB_LONG hb_strValInt( const char * szText, int * iOverflow )
HB_MAXINT hb_strValInt( const char * szText, int * iOverflow )
{
HB_LONG lVal;
HB_MAXINT lVal;
double dVal;
HB_TRACE(HB_TR_DEBUG, ("hb_strValInt(%s)", szText));
@@ -753,7 +753,7 @@ HB_LONG hb_strValInt( const char * szText, int * iOverflow )
return lVal;
}
char * hb_numToStr( char * szBuf, HB_SIZE ulSize, HB_LONG lNumber )
char * hb_numToStr( char * szBuf, HB_SIZE ulSize, HB_MAXINT lNumber )
{
int iPos = ( int ) ulSize;
HB_BOOL fNeg = HB_FALSE;

View File

@@ -330,7 +330,7 @@ int WINAPI MulDiv( int nNumber, int nNumerator, int nDenominator )
{
if( nDenominator )
{
HB_LONG llResult = ( HB_LONG ) nNumber * nNumerator / nDenominator;
HB_MAXINT llResult = ( HB_MAXINT ) nNumber * nNumerator / nDenominator;
if( HB_LIM_INT32( llResult ) )
return ( int ) llResult;
}

View File

@@ -291,7 +291,7 @@ static const char * hb_comp_tokenString( YYSTYPE *yylval_ptr, HB_COMP_DECL, PHB_
#if defined( HB_COMPAT_FOXPRO ) || 1
static HB_BOOL hb_comp_timeDecode( PHB_PP_TOKEN pTime, long * plTime )
{
HB_LONG lHour, lMinute, lMilliSec;
HB_MAXINT lHour, lMinute, lMilliSec;
double dNumber;
int iDec, iWidth;
@@ -325,7 +325,7 @@ static HB_BOOL hb_comp_timeDecode( PHB_PP_TOKEN pTime, long * plTime )
{
if( dNumber < 0.0 || dNumber >= 60.0 )
return HB_FALSE;
lMilliSec = ( HB_LONG ) ( dNumber * 1000 + 0.05 / HB_MILLISECS_PER_DAY );
lMilliSec = ( HB_MAXINT ) ( dNumber * 1000 + 0.05 / HB_MILLISECS_PER_DAY );
if( lMilliSec == 60000 )
--lMilliSec;
}
@@ -385,7 +385,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;
HB_MAXINT lYear, lMonth, lDay;
long lDate = 0, lTime = 0;
double dNumber;
int iDec, iWidth, iType = 0;
@@ -473,7 +473,7 @@ int hb_complex( YYSTYPE *yylval_ptr, HB_COMP_DECL )
{
case HB_PP_TOKEN_NUMBER:
{
HB_LONG lNumber;
HB_MAXINT lNumber;
double dNumber;
int iDec, iWidth;

View File

@@ -114,14 +114,14 @@ static void hb_compDebugStart( void ) { }
{
char * string; /* to hold a string returned by lex */
int iNumber; /* to hold a temporary integer number */
HB_LONG lNumber; /* to hold a temporary long number */
HB_MAXINT lNumber; /* to hold a temporary long number */
HB_BOOL bTrue;
HB_EXPR_PTR asExpr;
void * pVoid; /* to hold any memory structure we may need */
struct
{
HB_LONG lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
HB_MAXINT lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
} valLong;
struct
{

View File

@@ -433,14 +433,14 @@ typedef union YYSTYPE
{
char * string; /* to hold a string returned by lex */
int iNumber; /* to hold a temporary integer number */
HB_LONG lNumber; /* to hold a temporary long number */
HB_MAXINT lNumber; /* to hold a temporary long number */
HB_BOOL bTrue;
HB_EXPR_PTR asExpr;
void * pVoid; /* to hold any memory structure we may need */
struct
{
HB_LONG lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
HB_MAXINT lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
} valLong;
struct
{

View File

@@ -270,14 +270,14 @@ typedef union YYSTYPE
{
char * string; /* to hold a string returned by lex */
int iNumber; /* to hold a temporary integer number */
HB_LONG lNumber; /* to hold a temporary long number */
HB_MAXINT lNumber; /* to hold a temporary long number */
HB_BOOL bTrue;
HB_EXPR_PTR asExpr;
void * pVoid; /* to hold any memory structure we may need */
struct
{
HB_LONG lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
HB_MAXINT lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
} valLong;
struct
{

View File

@@ -2776,7 +2776,7 @@ void hb_compGenPushMemvarRef( const char * szVarName, HB_COMP_DECL ) /* generate
void hb_compGenPopAliasedVar( const char * szVarName,
HB_BOOL bPushAliasValue,
const char * szAlias,
HB_LONG lWorkarea,
HB_MAXINT lWorkarea,
HB_COMP_DECL )
{
if( bPushAliasValue )
@@ -2821,7 +2821,7 @@ void hb_compGenPopAliasedVar( const char * szVarName,
void hb_compGenPushAliasedVar( const char * szVarName,
HB_BOOL bPushAliasValue,
const char * szAlias,
HB_LONG lWorkarea,
HB_MAXINT lWorkarea,
HB_COMP_DECL )
{
if( bPushAliasValue )
@@ -2940,7 +2940,7 @@ void hb_compGenPushSymbol( const char * szSymbolName, HB_BOOL bFunction, HB_COMP
}
/* generates the pcode to push a long number on the virtual machine stack */
void hb_compGenPushLong( HB_LONG lNumber, HB_COMP_DECL )
void hb_compGenPushLong( HB_MAXINT lNumber, HB_COMP_DECL )
{
if( HB_COMP_PARAM->fLongOptimize )
{

View File

@@ -134,9 +134,9 @@
%union /* special structure used by lex and yacc to share info */
{
const char * string; /* to hold a string returned by lex */
int iNumber; /* to hold a temporary integer number */
HB_LONG lNumber; /* to hold a temporary long number */
void * pVoid; /* to hold any memory structure we may need */
int iNumber; /* to hold a temporary integer number */
HB_MAXINT lNumber; /* to hold a temporary long number */
void * pVoid; /* to hold any memory structure we may need */
HB_EXPR_PTR asExpr;
struct
{
@@ -149,8 +149,8 @@
} valInteger;
struct
{
HB_LONG lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
HB_MAXINT lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
} valLong;
struct
{
@@ -968,7 +968,7 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro )
case HB_PP_TOKEN_NUMBER:
{
HB_LONG lNumber;
HB_MAXINT lNumber;
double dNumber;
int iDec, iWidth;

View File

@@ -310,9 +310,9 @@ typedef union YYSTYPE
#line 135 "macro.y"
{
const char * string; /* to hold a string returned by lex */
int iNumber; /* to hold a temporary integer number */
HB_LONG lNumber; /* to hold a temporary long number */
void * pVoid; /* to hold any memory structure we may need */
int iNumber; /* to hold a temporary integer number */
HB_MAXINT lNumber; /* to hold a temporary long number */
void * pVoid; /* to hold any memory structure we may need */
HB_EXPR_PTR asExpr;
struct
{
@@ -325,8 +325,8 @@ typedef union YYSTYPE
} valInteger;
struct
{
HB_LONG lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
HB_MAXINT lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
} valLong;
struct
{
@@ -3307,7 +3307,7 @@ int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro )
case HB_PP_TOKEN_NUMBER:
{
HB_LONG lNumber;
HB_MAXINT lNumber;
double dNumber;
int iDec, iWidth;

View File

@@ -127,9 +127,9 @@ typedef union YYSTYPE
#line 135 "macro.y"
{
const char * string; /* to hold a string returned by lex */
int iNumber; /* to hold a temporary integer number */
HB_LONG lNumber; /* to hold a temporary long number */
void * pVoid; /* to hold any memory structure we may need */
int iNumber; /* to hold a temporary integer number */
HB_MAXINT lNumber; /* to hold a temporary long number */
void * pVoid; /* to hold any memory structure we may need */
HB_EXPR_PTR asExpr;
struct
{
@@ -142,8 +142,8 @@ typedef union YYSTYPE
} valInteger;
struct
{
HB_LONG lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
HB_MAXINT lNumber; /* to hold a long number returned by lex */
HB_UCHAR bWidth; /* to hold the width of the value */
} valLong;
struct
{

View File

@@ -243,7 +243,7 @@ static int hb_lexStringExtCopy( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro,
static int hb_lexNumConv( YYSTYPE *yylval_ptr, PHB_MACRO_LEX pLex, ULONG ulLen )
{
HB_LONG lNumber;
HB_MAXINT lNumber;
double dNumber;
int iDec, iWidth;

View File

@@ -4612,7 +4612,7 @@ static PHB_PP_TOKEN hb_pp_calcPrecedence( PHB_PP_TOKEN pToken,
return pNext;
}
static HB_BOOL hb_pp_calcReduce( HB_LONG * plValue, int iOperation )
static HB_BOOL hb_pp_calcReduce( HB_MAXINT * plValue, int iOperation )
{
switch( iOperation )
{
@@ -4632,8 +4632,8 @@ static HB_BOOL hb_pp_calcReduce( HB_LONG * plValue, int iOperation )
return HB_FALSE;
}
static HB_LONG hb_pp_calcOperation( HB_LONG lValueLeft, HB_LONG lValueRight,
int iOperation, HB_BOOL * pfError )
static HB_MAXINT hb_pp_calcOperation( HB_MAXINT lValueLeft, HB_MAXINT lValueRight,
int iOperation, HB_BOOL * pfError )
{
switch( iOperation )
{
@@ -4708,7 +4708,7 @@ static HB_LONG hb_pp_calcOperation( HB_LONG lValueLeft, HB_LONG lValueRight,
}
static PHB_PP_TOKEN hb_pp_calcValue( PHB_PP_TOKEN pToken, int iPrecedense,
HB_LONG * plValue, HB_BOOL * pfError,
HB_MAXINT * plValue, HB_BOOL * pfError,
HB_BOOL * pfUndef )
{
if( HB_PP_TOKEN_ISEOC( pToken ) )
@@ -4780,7 +4780,7 @@ static PHB_PP_TOKEN hb_pp_calcValue( PHB_PP_TOKEN pToken, int iPrecedense,
else if( iNextPrec > iPrecedense )
{
HB_BOOL fDefined = ( ! * pfUndef ) && hb_pp_calcReduce( plValue, iNextOper );
HB_LONG lValue = 0;
HB_MAXINT lValue = 0;
* pfError = HB_TRUE;
pToken = hb_pp_calcValue( pNext, iNextPrec, &lValue, pfError, pfUndef );
if( ! * pfError )
@@ -4795,11 +4795,11 @@ static PHB_PP_TOKEN hb_pp_calcValue( PHB_PP_TOKEN pToken, int iPrecedense,
return pToken;
}
static HB_LONG hb_pp_calculateValue( PHB_PP_STATE pState, PHB_PP_TOKEN pToken,
HB_BOOL fNoError )
static HB_MAXINT hb_pp_calculateValue( PHB_PP_STATE pState, PHB_PP_TOKEN pToken,
HB_BOOL fNoError )
{
HB_BOOL fError = HB_TRUE, fUndef = HB_FALSE;
HB_LONG lValue = 0;
HB_MAXINT lValue = 0;
pToken = hb_pp_calcValue( pToken, HB_PP_PREC_NUL, &lValue, &fError, &fUndef );
if( !HB_PP_TOKEN_ISEOC( pToken ) || fUndef )

View File

@@ -121,7 +121,7 @@ static HB_ERRCODE hb_dbfErrorRT( DBFAREAP pArea,
return errCode;
}
static HB_LONG hb_dbfGetRowVer( DBFAREAP pArea, USHORT uiField, HB_LONG * pValue )
static HB_MAXINT hb_dbfGetRowVer( DBFAREAP pArea, USHORT uiField, HB_MAXINT * pValue )
{
DBFFIELD dbField;
HB_BOOL fLck = HB_FALSE;
@@ -153,9 +153,9 @@ static HB_LONG hb_dbfGetRowVer( DBFAREAP pArea, USHORT uiField, HB_LONG * pValue
return HB_SUCCESS;
}
static HB_LONG hb_dbfGetNextValue( DBFAREAP pArea, USHORT uiField )
static HB_MAXINT hb_dbfGetNextValue( DBFAREAP pArea, USHORT uiField )
{
HB_LONG nValue = 0;
HB_MAXINT nValue = 0;
DBFFIELD dbField;
if( hb_fileReadAt( pArea->pDataFile, &dbField, sizeof( dbField ),
@@ -174,7 +174,7 @@ static HB_LONG hb_dbfGetNextValue( DBFAREAP pArea, USHORT uiField )
static void hb_dbfUpdateStampFields( DBFAREAP pArea )
{
long lJulian = 0, lMilliSec = 0;
HB_LONG nRowVer = 0;
HB_MAXINT nRowVer = 0;
LPFIELD pField;
USHORT uiCount;
@@ -298,9 +298,9 @@ static void hb_dbfSetBlankRecord( DBFAREAP pArea, int iType )
}
else if( bNext == HB_BLANK_AUTOINC )
{
HB_LONG nValue = hb_dbfGetNextValue( pArea, uiCount );
HB_MAXINT nValue = hb_dbfGetNextValue( pArea, uiCount );
if( pField->uiDec )
nValue = ( HB_LONG ) hb_numDecConv( ( double ) nValue, - ( int ) pField->uiDec );
nValue = ( HB_MAXINT ) hb_numDecConv( ( double ) nValue, - ( int ) pField->uiDec );
if( pField->uiType == HB_FT_INTEGER ||
pField->uiType == HB_FT_AUTOINC )
{
@@ -1926,14 +1926,14 @@ static HB_ERRCODE hb_dbfGetValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
hb_itemPutNILen( pItem, ( int ) HB_GET_LE_INT16( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 6 );
break;
case 3:
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT24( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 10 );
hb_itemPutNIntLen( pItem, ( HB_MAXINT ) HB_GET_LE_INT24( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 10 );
break;
case 4:
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT32( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 10 );
hb_itemPutNIntLen( pItem, ( HB_MAXINT ) HB_GET_LE_INT32( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 10 );
break;
case 8:
#ifndef HB_LONG_LONG_OFF
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 20 );
hb_itemPutNIntLen( pItem, ( HB_MAXINT ) HB_GET_LE_INT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 20 );
#else
hb_itemPutNLen( pItem, ( double ) HB_GET_LE_INT64( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 20, 0 );
#endif
@@ -1964,7 +1964,7 @@ static HB_ERRCODE hb_dbfGetValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
else
*/
{
HB_LONG lVal;
HB_MAXINT lVal;
double dVal;
HB_BOOL fDbl;
@@ -1995,7 +1995,7 @@ static HB_ERRCODE hb_dbfGetValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
}
else if( pField->uiLen == 4 )
{
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT32( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 10 );
hb_itemPutNIntLen( pItem, ( HB_MAXINT ) HB_GET_LE_INT32( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] ), 10 );
}
else
{
@@ -2351,14 +2351,14 @@ static HB_ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
}
else if( pField->uiType == HB_FT_INTEGER )
{
HB_LONG lVal;
HB_MAXINT lVal;
double dVal;
int iSize;
if( pField->uiDec )
{
dVal = hb_numDecConv( hb_itemGetND( pItem ), - ( int ) pField->uiDec );
lVal = ( HB_LONG ) dVal;
lVal = ( HB_MAXINT ) dVal;
if( ! HB_DBL_LIM_INT64( dVal ) )
iSize = 99;
else
@@ -2377,7 +2377,7 @@ static HB_ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
else if( HB_IS_DOUBLE( pItem ) )
{
dVal = hb_itemGetND( pItem );
lVal = ( HB_LONG ) dVal;
lVal = ( HB_MAXINT ) dVal;
if( ! HB_DBL_LIM_INT64( dVal ) )
iSize = 99;
else
@@ -2395,7 +2395,7 @@ static HB_ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
}
else
{
lVal = ( HB_LONG ) hb_itemGetNInt( pItem );
lVal = ( HB_MAXINT ) hb_itemGetNInt( pItem );
#ifdef HB_LONG_LONG_OFF
dVal = ( double ) lVal;
#endif
@@ -2444,7 +2444,7 @@ static HB_ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
}
else if( pField->uiType == HB_FT_ANY && pField->uiLen == 4 )
{
HB_LONG lVal = hb_itemGetNInt( pItem );
HB_MAXINT lVal = hb_itemGetNInt( pItem );
if( HB_IS_DOUBLE( pItem ) ?
HB_DBL_LIM_INT32( hb_itemGetND( pItem ) ) :
HB_LIM_INT32( lVal ) )
@@ -3242,12 +3242,12 @@ static HB_ERRCODE hb_dbfInfo( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
case DBI_FILEHANDLE:
hb_itemPutNInt( pItem, !pArea->pDataFile ? FS_ERROR :
( HB_LONG ) ( HB_NHANDLE ) hb_fileHandle( pArea->pDataFile ) );
( HB_MAXINT ) ( HB_NHANDLE ) hb_fileHandle( pArea->pDataFile ) );
break;
case DBI_MEMOHANDLE:
hb_itemPutNInt( pItem, ! pArea->pMemoFile ? FS_ERROR :
( HB_LONG ) ( HB_NHANDLE ) hb_fileHandle( pArea->pMemoFile ) );
( HB_MAXINT ) ( HB_NHANDLE ) hb_fileHandle( pArea->pMemoFile ) );
break;
case DBI_SHARED:

View File

@@ -1157,7 +1157,7 @@ static ULONG hb_fptCountSMTItemLength( FPTAREAP pArea, PHB_ITEM pItem,
case HB_IT_INTEGER:
case HB_IT_LONG:
{
HB_LONG iVal;
HB_MAXINT iVal;
iVal = hb_itemGetNInt( pItem );
if( HB_LIM_INT32( iVal ) )
{
@@ -1238,7 +1238,7 @@ static HB_ERRCODE hb_fptCountSMTDataLength( FPTAREAP pArea, HB_FOFFSET * pfOffse
static ULONG hb_fptStoreSMTItem( FPTAREAP pArea, PHB_ITEM pItem, BYTE ** bBufPtr, HB_BOOL fTrans )
{
ULONG ulLen, u, ulSize = 0;
HB_LONG iVal;
HB_MAXINT iVal;
LONG lVal;
double dVal;
int iWidth, iDec;
@@ -1607,7 +1607,7 @@ static ULONG hb_fptCountSixItemLength( FPTAREAP pArea, PHB_ITEM pItem,
static ULONG hb_fptStoreSixItem( FPTAREAP pArea, PHB_ITEM pItem, BYTE ** bBufPtr, HB_BOOL fTrans )
{
ULONG ulLen, u, ulSize;
HB_LONG iVal;
HB_MAXINT iVal;
LONG lVal;
double dVal;
int iWidth, iDec;
@@ -1819,7 +1819,7 @@ static ULONG hb_fptCountFlexItemLength( FPTAREAP pArea, PHB_ITEM pItem,
ULONG * pulArrayCount, HB_BOOL fTrans )
{
ULONG ulLen, u, ulSize = 1;
HB_LONG iVal;
HB_MAXINT iVal;
switch ( hb_itemType( pItem ) )
{
@@ -1872,7 +1872,7 @@ static ULONG hb_fptCountFlexItemLength( FPTAREAP pArea, PHB_ITEM pItem,
static void hb_fptStoreFlexItem( FPTAREAP pArea, PHB_ITEM pItem, BYTE ** bBufPtr, HB_BOOL fTrans )
{
ULONG ulLen, u;
HB_LONG iVal;
HB_MAXINT iVal;
LONG lVal;
double dVal;
int iWidth, iDec;
@@ -2925,7 +2925,7 @@ static HB_ERRCODE hb_fptPutMemo( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem,
BYTE itmBuffer[FLEX_ITEM_BUFSIZE];
BYTE *bBufPtr = NULL, *bBufAlloc = NULL;
HB_ERRCODE errCode;
HB_LONG iVal;
HB_MAXINT iVal;
LONG lVal;
HB_TRACE(HB_TR_DEBUG, ("hb_fptPutMemo(%p, %hu, %p, %p)", pArea, uiIndex, pItem, pulBlock));
@@ -3239,7 +3239,7 @@ static HB_ERRCODE hb_fptGetVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pI
if( pField->uiLen == 3 || uiType == HB_VF_DATE )
hb_itemPutDL( pItem, hb_sxPtoD( ( char * ) pFieldBuf ) );
else if( pField->uiLen == 4 || uiType == HB_VF_INT )
hb_itemPutNIntLen( pItem, ( HB_LONG ) HB_GET_LE_INT32( pFieldBuf ), 10 );
hb_itemPutNIntLen( pItem, ( HB_MAXINT ) HB_GET_LE_INT32( pFieldBuf ), 10 );
else if( pField->uiLen == 2 )
hb_itemPutNIntLen( pItem, ( int ) HB_GET_LE_INT16( pFieldBuf ), 10 );
else if( pField->uiLen == 1 )
@@ -3538,7 +3538,7 @@ static HB_ERRCODE hb_fptPutVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pI
}
else if( pField->uiLen == 4 )
{
HB_LONG lVal;
HB_MAXINT lVal;
if( ! HB_IS_NUMBER( pItem ) )
return EDBF_DATATYPE;
@@ -3600,7 +3600,7 @@ static HB_ERRCODE hb_fptPutVarField( FPTAREAP pArea, USHORT uiIndex, PHB_ITEM pI
}
else if( HB_IS_NUMBER( pItem ) )
{
HB_LONG lVal;
HB_MAXINT lVal;
lVal = hb_itemGetNInt( pItem );
if( !HB_IS_DOUBLE( pItem ) && HB_LIM_INT32( lVal ) )

View File

@@ -319,7 +319,7 @@ static PHB_ITEM hb_ntxStrToNum( PHB_ITEM pItem, char* szKeyVal, USHORT length, U
char szBuffer[ NTX_MAX_KEY + 1 ];
char *ptr = szKeyVal, *ptr2, c;
int iLen, iDec;
HB_LONG lValue;
HB_MAXINT lValue;
double dValue;
HB_SYMBOL_UNUSED( dec );

View File

@@ -235,7 +235,7 @@ static HB_BOOL hb_exportBufSqlVar( PHB_FILEBUF pFileBuf, PHB_ITEM pValue,
}
/* Export DBF content to a SQL script file */
static ULONG hb_db2Sql( AREAP pArea, PHB_ITEM pFields, HB_LONG llNext,
static ULONG hb_db2Sql( AREAP pArea, PHB_ITEM pFields, HB_MAXINT llNext,
PHB_ITEM pWhile, PHB_ITEM pFor,
const char * szDelim, const char * szSep,
const char * szEsc, const char * szTable,
@@ -363,7 +363,7 @@ HB_FUNC( __DBSQL )
const char * szSep = hb_parcx( 13 );
const char * szDelim = hb_parcx( 14 );
const char * szEsc = hb_parcx( 15 );
HB_LONG llNext = HB_LONG_MAX;
HB_MAXINT llNext = HB_LONG_MAX;
HB_FHANDLE hFile;
HB_ERRCODE errCode;

View File

@@ -321,7 +321,7 @@ static HB_ERRCODE hb_delimReadRecord( DELIMAREAP pArea )
}
else
{
HB_LONG lVal;
HB_MAXINT lVal;
double dVal;
HB_BOOL fDbl;
@@ -590,7 +590,7 @@ static HB_ERRCODE hb_delimGetValue( DELIMAREAP pArea, USHORT uiIndex, PHB_ITEM p
case HB_FT_LONG:
{
HB_LONG lVal;
HB_MAXINT lVal;
double dVal;
HB_BOOL fDbl;

View File

@@ -413,7 +413,7 @@ static HB_ERRCODE hb_sdfGetValue( SDFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem
case HB_FT_LONG:
{
HB_LONG lVal;
HB_MAXINT lVal;
double dVal;
HB_BOOL fDbl;

View File

@@ -74,7 +74,7 @@ HB_FUNC( ABS )
#if -HB_INT_MAX > HB_INT_MIN
else if( iNumber < -HB_INT_MAX )
#if HB_LONG_MAX > HB_INT_MAX
hb_retnint( - ( HB_LONG ) iNumber );
hb_retnint( - ( HB_MAXINT ) iNumber );
#else
hb_retndlen( - ( double ) iNumber, 0, iDec );
#endif
@@ -84,7 +84,7 @@ HB_FUNC( ABS )
}
else if( HB_IS_LONG( pNumber ) )
{
HB_LONG lNumber = hb_itemGetNInt( pNumber );
HB_MAXINT lNumber = hb_itemGetNInt( pNumber );
if( lNumber >= 0 )
hb_retnintlen( lNumber, iWidth );

View File

@@ -1044,7 +1044,7 @@ HB_WCHAR hb_cdpGetU16( PHB_CODEPAGE cdp, HB_BOOL fCtrl, unsigned char ch )
return ch;
}
HB_UCHAR char hb_cdpGetChar( PHB_CODEPAGE cdp, HB_BOOL fCtrl, HB_WCHAR wc )
HB_UCHAR hb_cdpGetChar( PHB_CODEPAGE cdp, HB_BOOL fCtrl, HB_WCHAR wc )
{
if( cdp && ( fCtrl || wc >= 32 ) )
{

View File

@@ -130,13 +130,13 @@ double hb_secondsCPU( int n )
{
if( n & 1 )
{
d += ( double ) ( ( ( HB_LONG ) User.dwHighDateTime << 32 ) +
( HB_LONG ) User.dwLowDateTime );
d += ( double ) ( ( ( HB_MAXINT ) User.dwHighDateTime << 32 ) +
( HB_MAXINT ) User.dwLowDateTime );
}
if( n & 2 )
{
d += ( double ) ( ( ( HB_LONG ) Kernel.dwHighDateTime << 32 ) +
( HB_LONG ) Kernel.dwLowDateTime );
d += ( double ) ( ( ( HB_MAXINT ) Kernel.dwHighDateTime << 32 ) +
( HB_MAXINT ) Kernel.dwLowDateTime );
}
d /= 10000000.0;
}

View File

@@ -233,7 +233,7 @@ static void hb_gt_pca_AnsiGetCurPos( int * iRow, int * iCol )
{
char rdbuf[ 64 ];
int i, j, n, d, y, x;
HB_ULONG end_timer, time;
HB_MAXUINT end_timer, time;
hb_gt_pca_termOut( "\x1B[6n", 4 );
hb_gt_pca_termFlush();

View File

@@ -504,7 +504,7 @@ static int hb_sln_isUTF8( int iStdOut, int iStdIn )
{
char rdbuf[ 64 ];
int i, j, n, d, y, x;
HB_ULONG end_timer, time;
HB_MAXUINT end_timer, time;
n = j = x = y = 0;
/* wait up to 2 seconds for answer */

View File

@@ -1838,7 +1838,7 @@ static HB_BOOL hb_gt_trm_AnsiGetCursorPos( PHB_GTTRM pTerm, int * iRow, int * iC
{
char rdbuf[ 64 ];
int i, j, n, d, y, x;
HB_ULONG end_timer, time;
HB_MAXUINT end_timer, time;
hb_gt_trm_termOut( pTerm, "\x1B[6n", 4 );
if( szPost )

View File

@@ -2462,7 +2462,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
pWVT->bIconToFree = HB_FALSE;
pWVT->hIcon = LoadIcon( pWVT->hInstance,
MAKEINTRESOURCE( ( HB_LONG )
MAKEINTRESOURCE( ( HB_MAXINT )
hb_itemGetNInt( pInfo->pNewVal ) ) );
if( pWVT->hWnd )

View File

@@ -60,7 +60,7 @@
to update the references in the compiler as well.
[vszakats] */
static HB_BOOL hb_numParam( int iParam, HB_LONG * plNum )
static HB_BOOL hb_numParam( int iParam, HB_MAXINT * plNum )
{
if( HB_ISNUM( iParam ) )
{
@@ -74,13 +74,13 @@ static HB_BOOL hb_numParam( int iParam, HB_LONG * plNum )
HB_FUNC( HB_BITAND )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( hb_numParam( 1, &lValue ) )
{
int iPCount = hb_pcount() - 1, i = 1;
do
{
HB_LONG lNext;
HB_MAXINT lNext;
if( !hb_numParam( ++i, &lNext ) )
return;
lValue &= lNext;
@@ -92,13 +92,13 @@ HB_FUNC( HB_BITAND )
HB_FUNC( HB_BITOR )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( hb_numParam( 1, &lValue ) )
{
int iPCount = hb_pcount() - 1, i = 1;
do
{
HB_LONG lNext;
HB_MAXINT lNext;
if( !hb_numParam( ++i, &lNext ) )
return;
lValue |= lNext;
@@ -110,13 +110,13 @@ HB_FUNC( HB_BITOR )
HB_FUNC( HB_BITXOR )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( hb_numParam( 1, &lValue ) )
{
int iPCount = hb_pcount() - 1, i = 1;
do
{
HB_LONG lNext;
HB_MAXINT lNext;
if( !hb_numParam( ++i, &lNext ) )
return;
lValue ^= lNext;
@@ -128,35 +128,35 @@ HB_FUNC( HB_BITXOR )
HB_FUNC( HB_BITNOT )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( hb_numParam( 1, &lValue ) )
hb_retnint( ~lValue );
}
HB_FUNC( HB_BITTEST )
{
HB_LONG lValue, lBit;
HB_MAXINT lValue, lBit;
if( hb_numParam( 1, &lValue ) && hb_numParam( 2, &lBit ) )
hb_retl( ( lValue & ( ( HB_LONG ) 1 << lBit ) ) != 0 );
hb_retl( ( lValue & ( ( HB_MAXINT ) 1 << lBit ) ) != 0 );
}
HB_FUNC( HB_BITSET )
{
HB_LONG lValue, lBit;
HB_MAXINT lValue, lBit;
if( hb_numParam( 1, &lValue ) && hb_numParam( 2, &lBit ) )
hb_retnint( lValue | ( ( HB_LONG ) 1 << lBit ) );
hb_retnint( lValue | ( ( HB_MAXINT ) 1 << lBit ) );
}
HB_FUNC( HB_BITRESET )
{
HB_LONG lValue, lBit;
HB_MAXINT lValue, lBit;
if( hb_numParam( 1, &lValue ) && hb_numParam( 2, &lBit ) )
hb_retnint( lValue & ( ~ ( ( HB_LONG ) 1 << lBit ) ) );
hb_retnint( lValue & ( ~ ( ( HB_MAXINT ) 1 << lBit ) ) );
}
HB_FUNC( HB_BITSHIFT )
{
HB_LONG lValue, lBits;
HB_MAXINT lValue, lBits;
if( hb_numParam( 1, &lValue ) && hb_numParam( 2, &lBits ) )
{
if( lBits < 0 )

View File

@@ -53,7 +53,7 @@
#include "hbapi.h"
#include "hbapierr.h"
static HB_BOOL hb_numParam( int iParam, HB_LONG * plNum )
static HB_BOOL hb_numParam( int iParam, HB_MAXINT * plNum )
{
if( HB_ISNUM( iParam ) )
{
@@ -67,7 +67,7 @@ static HB_BOOL hb_numParam( int iParam, HB_LONG * plNum )
HB_FUNC( HB_BYTESWAPI )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( hb_numParam( 1, &lValue ) )
{
@@ -78,7 +78,7 @@ HB_FUNC( HB_BYTESWAPI )
HB_FUNC( HB_BYTESWAPW )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( hb_numParam( 1, &lValue ) )
{
@@ -89,7 +89,7 @@ HB_FUNC( HB_BYTESWAPW )
HB_FUNC( HB_BYTESWAPL )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( hb_numParam( 1, &lValue ) )
{
@@ -100,7 +100,7 @@ HB_FUNC( HB_BYTESWAPL )
HB_FUNC( HB_BYTESWAPU )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( hb_numParam( 1, &lValue ) )
{
@@ -111,14 +111,14 @@ HB_FUNC( HB_BYTESWAPU )
HB_FUNC( HB_BYTESWAPLL )
{
HB_LONG lValue;
HB_MAXINT lValue;
if( hb_numParam( 1, &lValue ) )
{
#if defined( HB_LONG_LONG_OFF )
HB_LONG iVal = ( HB_LONG ) HB_SWAP_UINT32( lValue );
HB_MAXINT iVal = ( HB_MAXINT ) HB_SWAP_UINT32( lValue );
#else
HB_LONG iVal = ( HB_LONG ) HB_SWAP_UINT64( lValue );
HB_MAXINT iVal = ( HB_MAXINT ) HB_SWAP_UINT64( lValue );
#endif
hb_retnint( iVal );
}

View File

@@ -175,12 +175,12 @@ HB_U16 hb_crc16( HB_U16 crc, const void * buf, HB_SIZE len )
return crc ^ 0xffff;
}
HB_ULONG hb_crc( HB_ULONG crc, const void * buf, HB_SIZE len, HB_ULONG poly )
HB_MAXUINT hb_crc( HB_MAXUINT crc, const void * buf, HB_SIZE len, HB_MAXUINT poly )
{
if( buf && len )
{
const unsigned char * ucbuf = ( const unsigned char * ) buf;
HB_ULONG mask = 1, revp = 0;
HB_MAXUINT mask = 1, revp = 0;
while( poly > 1 )
{
@@ -205,17 +205,17 @@ HB_ULONG hb_crc( HB_ULONG crc, const void * buf, HB_SIZE len, HB_ULONG poly )
return crc;
}
HB_ULONG hb_crcct( HB_ULONG crc, const void * buf, HB_SIZE len, HB_ULONG poly )
HB_MAXUINT hb_crcct( HB_MAXUINT crc, const void * buf, HB_SIZE len, HB_MAXUINT poly )
{
if( buf && len )
{
const unsigned char * ucbuf = ( const unsigned char * ) buf;
HB_ULONG mask, revp = poly;
HB_MAXUINT mask, revp = poly;
int bits = 0;
while( revp >>= 1 )
++bits;
mask = ( HB_LONG ) 1 << ( bits - 1 );
mask = ( HB_MAXINT ) 1 << ( bits - 1 );
bits -= 8;
if( bits < 0 )
{
@@ -225,7 +225,7 @@ HB_ULONG hb_crcct( HB_ULONG crc, const void * buf, HB_SIZE len, HB_ULONG poly )
do
{
int i = 8;
crc ^= ( HB_ULONG ) ( *ucbuf++ );
crc ^= ( HB_MAXUINT ) ( *ucbuf++ );
do
crc = crc & mask ? poly ^ ( crc << 1 ) : crc << 1;
while( --i );
@@ -239,7 +239,7 @@ HB_ULONG hb_crcct( HB_ULONG crc, const void * buf, HB_SIZE len, HB_ULONG poly )
do
{
int i = 8;
crc ^= ( HB_ULONG ) ( *ucbuf++ ) << bits;
crc ^= ( HB_MAXUINT ) ( *ucbuf++ ) << bits;
do
crc = crc & mask ? poly ^ ( crc << 1 ) : crc << 1;
while( --i );
@@ -277,10 +277,10 @@ HB_FUNC( HB_CRC )
if( szString )
{
HB_ULONG ulPolynomial = ( HB_ULONG ) hb_parnint( 3 );
HB_MAXUINT ulPolynomial = ( HB_MAXUINT ) hb_parnint( 3 );
if( ulPolynomial == 0 )
ulPolynomial = 0x11021;
hb_retnint( hb_crc( ( HB_ULONG ) hb_parnint( 2 ), szString, hb_parclen( 1 ), ulPolynomial ) );
hb_retnint( hb_crc( ( HB_MAXUINT ) hb_parnint( 2 ), szString, hb_parclen( 1 ), ulPolynomial ) );
}
else
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
@@ -292,10 +292,10 @@ HB_FUNC( HB_CRCCT )
if( szString )
{
HB_ULONG ulPolynomial = ( HB_ULONG ) hb_parnint( 3 );
HB_MAXUINT ulPolynomial = ( HB_MAXUINT ) hb_parnint( 3 );
if( ulPolynomial == 0 )
ulPolynomial = 0x11021;
hb_retnint( hb_crcct( ( HB_ULONG ) hb_parnint( 2 ), szString, hb_parclen( 1 ), ulPolynomial ) );
hb_retnint( hb_crcct( ( HB_MAXUINT ) hb_parnint( 2 ), szString, hb_parclen( 1 ), ulPolynomial ) );
}
else
hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );

View File

@@ -2445,14 +2445,14 @@ static int hb_gt_def_InkeyNext( PHB_GT pGT, int iEventMask )
/* Wait for keyboard input */
static int hb_gt_def_InkeyGet( PHB_GT pGT, HB_BOOL fWait, double dSeconds, int iEventMask )
{
HB_ULONG end_timer;
HB_MAXUINT end_timer;
HB_BOOL fPop;
HB_TRACE(HB_TR_DEBUG, ("hb_gt_def_InkeyGet(%p,%d,%f,%d)", pGT, (int) fWait, dSeconds, iEventMask));
/* Wait forever ?, Use fixed value 100 for strict Clipper compatibility */
if( fWait && dSeconds * 100 >= 1 )
end_timer = hb_dateMilliSeconds() + ( HB_ULONG ) ( dSeconds * 1000 );
end_timer = hb_dateMilliSeconds() + ( HB_MAXUINT ) ( dSeconds * 1000 );
else
end_timer = 0;
@@ -2794,8 +2794,8 @@ static int hb_gt_def_MouseReadKey( PHB_GT pGT, int iEventMask )
{
if( iEventMask & INKEY_LDOWN && HB_GTSELF_MOUSEBUTTONPRESSED( pGT, 0, &iRow, &iCol ) )
{
HB_ULONG timer = hb_dateMilliSeconds();
if( timer - pGT->iMouseLeftTimer <= ( HB_ULONG ) HB_GTSELF_MOUSEGETDOUBLECLICKSPEED( pGT ) )
HB_MAXUINT timer = hb_dateMilliSeconds();
if( timer - pGT->iMouseLeftTimer <= ( HB_MAXUINT ) HB_GTSELF_MOUSEGETDOUBLECLICKSPEED( pGT ) )
iKey = K_LDBLCLK;
else
iKey = K_LBUTTONDOWN;
@@ -2807,8 +2807,8 @@ static int hb_gt_def_MouseReadKey( PHB_GT pGT, int iEventMask )
}
else if( iEventMask & INKEY_RDOWN && HB_GTSELF_MOUSEBUTTONPRESSED( pGT, 1, &iRow, &iCol ) )
{
HB_ULONG timer = hb_dateMilliSeconds();
if( timer - pGT->iMouseRightTimer <= ( HB_ULONG ) HB_GTSELF_MOUSEGETDOUBLECLICKSPEED( pGT ) )
HB_MAXUINT timer = hb_dateMilliSeconds();
if( timer - pGT->iMouseRightTimer <= ( HB_MAXUINT ) HB_GTSELF_MOUSEGETDOUBLECLICKSPEED( pGT ) )
iKey = K_RDBLCLK;
else
iKey = K_RBUTTONDOWN;
@@ -2820,8 +2820,8 @@ static int hb_gt_def_MouseReadKey( PHB_GT pGT, int iEventMask )
}
else if( iEventMask & INKEY_MMIDDLE && HB_GTSELF_MOUSEBUTTONPRESSED( pGT, 2, &iRow, &iCol ) )
{
HB_ULONG timer = hb_dateMilliSeconds();
if( timer - pGT->iMouseMiddleTimer <= ( HB_ULONG ) HB_GTSELF_MOUSEGETDOUBLECLICKSPEED( pGT ) )
HB_MAXUINT timer = hb_dateMilliSeconds();
if( timer - pGT->iMouseMiddleTimer <= ( HB_MAXUINT ) HB_GTSELF_MOUSEGETDOUBLECLICKSPEED( pGT ) )
iKey = K_MDBLCLK;
else
iKey = K_MBUTTONDOWN;

View File

@@ -60,7 +60,7 @@ HB_FUNC( HB_HEXTONUM )
if( szHex )
{
HB_ULONG ulNum = 0;
HB_MAXUINT ulNum = 0;
while( *szHex == ' ' ) szHex++;
while( *szHex )
@@ -88,10 +88,10 @@ HB_FUNC( HB_HEXTONUM )
HB_FUNC( HB_NUMTOHEX )
{
HB_ULONG ulNum;
int iLen;
HB_BOOL fDefaultLen;
char ret[ 33 ];
HB_MAXUINT ulNum;
int iLen;
HB_BOOL fDefaultLen;
char ret[ 33 ];
if( HB_ISNUM( 2 ) )
{

View File

@@ -105,18 +105,18 @@ HB_FUNC( HB_RANDOMINT )
if( ! HB_ISNUM( 1 ) )
hb_retni( dRnd >= 0.5 ? 0 : 1 );
else if( ! HB_ISNUM( 2 ) )
hb_retnint( ( HB_LONG ) ( 1 + ( dRnd * hb_parnint( 1 ) ) ) );
hb_retnint( ( HB_MAXINT ) ( 1 + ( dRnd * hb_parnint( 1 ) ) ) );
else
{
HB_LONG lX = hb_parnint( 1 );
HB_LONG lY = hb_parnint( 2 );
HB_MAXINT lX = hb_parnint( 1 );
HB_MAXINT lY = hb_parnint( 2 );
if( lX > lY )
{
HB_LONG lZ = lY;
HB_MAXINT lZ = lY;
lY = lX;
lX = lZ;
}
hb_retnint( ( HB_LONG ) ( lX + ( dRnd * ( lY - lX + 1 ) ) ) );
hb_retnint( ( HB_MAXINT ) ( lX + ( dRnd * ( lY - lX + 1 ) ) ) );
}
}

View File

@@ -476,7 +476,7 @@ int hb_socketListen( HB_SOCKET sd, int iBacklog )
return -1;
}
HB_SOCKET hb_socketAccept( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen, HB_LONG timeout )
HB_SOCKET hb_socketAccept( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen, HB_MAXINT timeout )
{
HB_SYMBOL_UNUSED( sd );
HB_SYMBOL_UNUSED( pSockAddr );
@@ -486,7 +486,7 @@ HB_SOCKET hb_socketAccept( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen, H
return HB_NO_SOCKET;
}
int hb_socketConnect( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen, HB_LONG timeout )
int hb_socketConnect( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen, HB_MAXINT timeout )
{
HB_SYMBOL_UNUSED( sd );
HB_SYMBOL_UNUSED( pSockAddr );
@@ -496,7 +496,7 @@ int hb_socketConnect( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen, HB_L
return -1;
}
long hb_socketSend( HB_SOCKET sd, const void * data, long len, int flags, HB_LONG timeout )
long hb_socketSend( HB_SOCKET sd, const void * data, long len, int flags, HB_MAXINT timeout )
{
HB_SYMBOL_UNUSED( sd );
HB_SYMBOL_UNUSED( data );
@@ -507,7 +507,7 @@ long hb_socketSend( HB_SOCKET sd, const void * data, long len, int flags, HB_LON
return -1;
}
long hb_socketSendTo( HB_SOCKET sd, const void * data, long len, int flags, const void * pSockAddr, unsigned uiSockLen, HB_LONG timeout )
long hb_socketSendTo( HB_SOCKET sd, const void * data, long len, int flags, const void * pSockAddr, unsigned uiSockLen, HB_MAXINT timeout )
{
HB_SYMBOL_UNUSED( sd );
HB_SYMBOL_UNUSED( data );
@@ -520,7 +520,7 @@ long hb_socketSendTo( HB_SOCKET sd, const void * data, long len, int flags, cons
return -1;
}
long hb_socketRecv( HB_SOCKET sd, void * data, long len, int flags, HB_LONG timeout )
long hb_socketRecv( HB_SOCKET sd, void * data, long len, int flags, HB_MAXINT timeout )
{
HB_SYMBOL_UNUSED( sd );
HB_SYMBOL_UNUSED( data );
@@ -531,7 +531,7 @@ long hb_socketRecv( HB_SOCKET sd, void * data, long len, int flags, HB_LONG time
return -1;
}
long hb_socketRecvFrom( HB_SOCKET sd, void * data, long len, int flags, void ** pSockAddr, unsigned * puiSockLen, HB_LONG timeout )
long hb_socketRecvFrom( HB_SOCKET sd, void * data, long len, int flags, void ** pSockAddr, unsigned * puiSockLen, HB_MAXINT timeout )
{
HB_SYMBOL_UNUSED( sd );
HB_SYMBOL_UNUSED( data );
@@ -625,7 +625,7 @@ int hb_socketSetMulticast( HB_SOCKET sd, int af, const char * szAddr )
return -1;
}
int hb_socketSelectRead( HB_SOCKET sd, HB_LONG timeout )
int hb_socketSelectRead( HB_SOCKET sd, HB_MAXINT timeout )
{
HB_SYMBOL_UNUSED( sd );
HB_SYMBOL_UNUSED( timeout );
@@ -633,7 +633,7 @@ int hb_socketSelectRead( HB_SOCKET sd, HB_LONG timeout )
return -1;
}
int hb_socketSelectWrite( HB_SOCKET sd, HB_LONG timeout )
int hb_socketSelectWrite( HB_SOCKET sd, HB_MAXINT timeout )
{
HB_SYMBOL_UNUSED( sd );
HB_SYMBOL_UNUSED( timeout );
@@ -642,7 +642,7 @@ int hb_socketSelectWrite( HB_SOCKET sd, HB_LONG timeout )
}
int hb_socketSelectWriteEx( HB_SOCKET sd, HB_LONG timeout )
int hb_socketSelectWriteEx( HB_SOCKET sd, HB_MAXINT timeout )
{
HB_SYMBOL_UNUSED( sd );
HB_SYMBOL_UNUSED( timeout );
@@ -653,7 +653,7 @@ int hb_socketSelectWriteEx( HB_SOCKET sd, HB_LONG timeout )
int hb_socketSelect( PHB_ITEM pArrayRD, HB_BOOL fSetRD,
PHB_ITEM pArrayWR, HB_BOOL fSetWR,
PHB_ITEM pArrayEX, HB_BOOL fSetEX,
HB_LONG timeout, HB_SOCKET_FUNC pFunc )
HB_MAXINT timeout, HB_SOCKET_FUNC pFunc )
{
HB_SYMBOL_UNUSED( pArrayRD );
HB_SYMBOL_UNUSED( fSetRD );
@@ -1361,13 +1361,13 @@ static int hb_socketTransType( int type, int *err )
}
#endif
static int hb_socketSelectRD( HB_SOCKET sd, HB_LONG timeout )
static int hb_socketSelectRD( HB_SOCKET sd, HB_MAXINT timeout )
{
struct timeval tv, * ptv;
fd_set rfds;
int iResult;
#if !defined( HB_HAS_SELECT_TIMER )
HB_ULONG timer = timeout <= 0 ? 0 : hb_dateMilliSeconds();
HB_MAXUINT timer = timeout <= 0 ? 0 : hb_dateMilliSeconds();
#endif
for( ;; )
@@ -1392,7 +1392,7 @@ static int hb_socketSelectRD( HB_SOCKET sd, HB_LONG timeout )
continue;
#else
{
HB_ULONG timecurr = hb_dateMilliSeconds();
HB_MAXUINT timecurr = hb_dateMilliSeconds();
if( timecurr > timer )
{
timeout -= timecurr - timer;
@@ -1409,13 +1409,13 @@ static int hb_socketSelectRD( HB_SOCKET sd, HB_LONG timeout )
( iResult > 0 && FD_ISSET( sd, &rfds ) ? 1 : 0 );
}
static int hb_socketSelectWR( HB_SOCKET sd, HB_LONG timeout )
static int hb_socketSelectWR( HB_SOCKET sd, HB_MAXINT timeout )
{
struct timeval tv, * ptv;
fd_set wfds;
int iResult;
#if !defined( HB_HAS_SELECT_TIMER )
HB_ULONG timer = timeout <= 0 ? 0 : hb_dateMilliSeconds();
HB_MAXUINT timer = timeout <= 0 ? 0 : hb_dateMilliSeconds();
#endif
for( ;; )
@@ -1440,7 +1440,7 @@ static int hb_socketSelectWR( HB_SOCKET sd, HB_LONG timeout )
continue;
#else
{
HB_ULONG timecurr = hb_dateMilliSeconds();
HB_MAXUINT timecurr = hb_dateMilliSeconds();
if( timecurr > timer )
{
timeout -= timecurr - timer;
@@ -1457,7 +1457,7 @@ static int hb_socketSelectWR( HB_SOCKET sd, HB_LONG timeout )
( iResult > 0 && FD_ISSET( sd, &wfds ) ? 1 : 0 );
}
static int hb_socketSelectWRE( HB_SOCKET sd, HB_LONG timeout )
static int hb_socketSelectWRE( HB_SOCKET sd, HB_MAXINT timeout )
{
struct timeval tv, * ptv;
fd_set wfds, * pefds;
@@ -1466,7 +1466,7 @@ static int hb_socketSelectWRE( HB_SOCKET sd, HB_LONG timeout )
#endif
int iResult;
#if !defined( HB_HAS_SELECT_TIMER )
HB_ULONG timer = timeout <= 0 ? 0 : hb_dateMilliSeconds();
HB_MAXUINT timer = timeout <= 0 ? 0 : hb_dateMilliSeconds();
#endif
for( ;; )
@@ -1502,7 +1502,7 @@ static int hb_socketSelectWRE( HB_SOCKET sd, HB_LONG timeout )
continue;
#else
{
HB_ULONG timecurr = hb_dateMilliSeconds();
HB_MAXUINT timecurr = hb_dateMilliSeconds();
if( timecurr > timer )
{
timeout -= timecurr - timer;
@@ -2085,7 +2085,7 @@ int hb_socketListen( HB_SOCKET sd, int iBacklog )
return ret;
}
HB_SOCKET hb_socketAccept( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen, HB_LONG timeout )
HB_SOCKET hb_socketAccept( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen, HB_MAXINT timeout )
{
HB_SOCKET newsd = HB_NO_SOCKET;
int ret;
@@ -2139,7 +2139,7 @@ HB_SOCKET hb_socketAccept( HB_SOCKET sd, void ** pSockAddr, unsigned * puiLen, H
return newsd;
}
int hb_socketConnect( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen, HB_LONG timeout )
int hb_socketConnect( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen, HB_MAXINT timeout )
{
int ret, blk;
@@ -2171,7 +2171,7 @@ int hb_socketConnect( HB_SOCKET sd, const void * pSockAddr, unsigned uiLen, HB_L
return ret;
}
long hb_socketSend( HB_SOCKET sd, const void * data, long len, int flags, HB_LONG timeout )
long hb_socketSend( HB_SOCKET sd, const void * data, long len, int flags, HB_MAXINT timeout )
{
long lSent = 0;
@@ -2209,7 +2209,7 @@ long hb_socketSend( HB_SOCKET sd, const void * data, long len, int flags, HB_LON
}
long hb_socketSendTo( HB_SOCKET sd, const void * data, long len, int flags,
const void * pSockAddr, unsigned uiSockLen, HB_LONG timeout )
const void * pSockAddr, unsigned uiSockLen, HB_MAXINT timeout )
{
long lSent = 0;
@@ -2243,7 +2243,7 @@ long hb_socketSendTo( HB_SOCKET sd, const void * data, long len, int flags,
return lSent;
}
long hb_socketRecv( HB_SOCKET sd, void * data, long len, int flags, HB_LONG timeout )
long hb_socketRecv( HB_SOCKET sd, void * data, long len, int flags, HB_MAXINT timeout )
{
long lReceived = 0;
@@ -2272,7 +2272,7 @@ long hb_socketRecv( HB_SOCKET sd, void * data, long len, int flags, HB_LONG time
return lReceived;
}
long hb_socketRecvFrom( HB_SOCKET sd, void * data, long len, int flags, void ** pSockAddr, unsigned * puiSockLen, HB_LONG timeout )
long hb_socketRecvFrom( HB_SOCKET sd, void * data, long len, int flags, void ** pSockAddr, unsigned * puiSockLen, HB_MAXINT timeout )
{
long lReceived = 0;
@@ -2506,7 +2506,7 @@ int hb_socketSetMulticast( HB_SOCKET sd, int af, const char * szAddr )
return -1;
}
int hb_socketSelectRead( HB_SOCKET sd, HB_LONG timeout )
int hb_socketSelectRead( HB_SOCKET sd, HB_MAXINT timeout )
{
int ret;
@@ -2517,7 +2517,7 @@ int hb_socketSelectRead( HB_SOCKET sd, HB_LONG timeout )
return ret;
}
int hb_socketSelectWrite( HB_SOCKET sd, HB_LONG timeout )
int hb_socketSelectWrite( HB_SOCKET sd, HB_MAXINT timeout )
{
int ret;
@@ -2528,7 +2528,7 @@ int hb_socketSelectWrite( HB_SOCKET sd, HB_LONG timeout )
return ret;
}
int hb_socketSelectWriteEx( HB_SOCKET sd, HB_LONG timeout )
int hb_socketSelectWriteEx( HB_SOCKET sd, HB_MAXINT timeout )
{
int ret;
@@ -2542,7 +2542,7 @@ int hb_socketSelectWriteEx( HB_SOCKET sd, HB_LONG timeout )
int hb_socketSelect( PHB_ITEM pArrayRD, HB_BOOL fSetRD,
PHB_ITEM pArrayWR, HB_BOOL fSetWR,
PHB_ITEM pArrayEX, HB_BOOL fSetEX,
HB_LONG timeout, HB_SOCKET_FUNC pFunc )
HB_MAXINT timeout, HB_SOCKET_FUNC pFunc )
{
HB_SOCKET maxsd, sd;
int i, ret;

View File

@@ -219,7 +219,7 @@ PHB_ITEM hb_strFormat( PHB_ITEM pItemReturn, PHB_ITEM pItemFormat, int iCount, P
fSign = 0;
if( HB_IS_NUMERIC( pItem ) )
{
iSize = sizeof( HB_LONG ) * 3 + 1;
iSize = sizeof( HB_MAXINT ) * 3 + 1;
pStr2 = pStr = ( char * ) hb_xgrab( iSize + 1 );
hb_itemStrBuf( pStr, pItem, iSize, 0 );
while( *pStr2 == ' ' )

View File

@@ -196,7 +196,7 @@ static void hb_znetEncrypt( PHB_ZNETSTREAM pStream, Bytef * data )
/* read data using stream structure
*/
long hb_znetRead( PHB_ZNETSTREAM pStream, HB_SOCKET sd, void * buffer, long len, HB_LONG timeout )
long hb_znetRead( PHB_ZNETSTREAM pStream, HB_SOCKET sd, void * buffer, long len, HB_MAXINT timeout )
{
long rec = 0;
@@ -279,7 +279,7 @@ long hb_znetRead( PHB_ZNETSTREAM pStream, HB_SOCKET sd, void * buffer, long len,
return len == 0 ? rec : len;
}
static long hb_znetStreamWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_LONG timeout )
static long hb_znetStreamWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_MAXINT timeout )
{
long tosnd = HB_ZNET_BUFSIZE - pStream->wr.avail_out;
long snd = 0, rest = 0;
@@ -355,7 +355,7 @@ static long hb_znetStreamWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_LONG ti
/* flush data in stream structure - return number of bytes left in the
* buffer which were not sent
*/
long hb_znetFlush( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_LONG timeout )
long hb_znetFlush( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_MAXINT timeout )
{
uInt uiSize = HB_ZNET_BUFSIZE - ( pStream->crypt ? -2 : 0 );
@@ -378,7 +378,7 @@ long hb_znetFlush( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_LONG timeout )
/* write data using stream structure
*/
long hb_znetWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, const void * buffer, long len, HB_LONG timeout, long * plast )
long hb_znetWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, const void * buffer, long len, HB_MAXINT timeout, long * plast )
{
long snd = 0;

View File

@@ -150,7 +150,7 @@ void hb_idleSleep( double dSeconds )
{
if( dSeconds >= 0 )
{
HB_ULONG end_timer = hb_dateMilliSeconds() + ( HB_ULONG ) ( dSeconds * 1000 );
HB_MAXUINT end_timer = hb_dateMilliSeconds() + ( HB_MAXUINT ) ( dSeconds * 1000 );
while( hb_dateMilliSeconds() < end_timer && hb_vmRequestQuery() == 0 )
hb_idleState();

View File

@@ -278,7 +278,7 @@ static HB_SIZE hb_itemSerialSize( PHB_ITEM pItem, HB_BOOL fNumSize,
PHB_CYCLIC_REF * pRefPtr, HB_SIZE ulOffset )
{
HB_SIZE ulSize, ulLen, u;
HB_LONG lVal;
HB_MAXINT lVal;
USHORT uiClass;
PHB_ITEM pDefVal;
const char * szVal;
@@ -430,7 +430,7 @@ static HB_SIZE hb_serializeItem( PHB_ITEM pItem, HB_BOOL fNumSize,
HB_UCHAR * pBuffer, HB_SIZE ulOffset,
PHB_CYCLIC_REF pRef )
{
HB_LONG lVal;
HB_MAXINT lVal;
double d;
int iWidth, iDecimal;
long l, l2;

View File

@@ -65,8 +65,8 @@ HB_FUNC( MAX )
{
if( HB_IS_NUMINT( p1 ) && HB_IS_NUMINT( p2 ) )
{
HB_LONG l1 = hb_itemGetNInt( p1 );
HB_LONG l2 = hb_itemGetNInt( p2 );
HB_MAXINT l1 = hb_itemGetNInt( p1 );
HB_MAXINT l2 = hb_itemGetNInt( p2 );
if( l1 >= l2 )
hb_itemReturn( p1 );
@@ -126,8 +126,8 @@ HB_FUNC( MIN )
{
if( HB_IS_NUMINT( p1 ) && HB_IS_NUMINT( p2 ) )
{
HB_LONG l1 = hb_itemGetNInt( p1 );
HB_LONG l2 = hb_itemGetNInt( p2 );
HB_MAXINT l1 = hb_itemGetNInt( p1 );
HB_MAXINT l2 = hb_itemGetNInt( p2 );
if( l1 <= l2 )
hb_itemReturn( p1 );

View File

@@ -60,7 +60,7 @@ HB_FUNC( SECONDS )
HB_FUNC( HB_MILLISECONDS )
{
hb_retnint( ( HB_LONG ) hb_dateMilliSeconds() );
hb_retnint( ( HB_MAXINT ) hb_dateMilliSeconds() );
}
HB_FUNC( HB_CLOCKS2SECS )

View File

@@ -64,7 +64,7 @@ HB_FUNC( VAL )
const char * szText = hb_itemGetCPtr( pText );
int iWidth, iDec, iLen = ( int ) hb_itemGetCLen( pText );
HB_BOOL fDbl;
HB_LONG lValue;
HB_MAXINT lValue;
double dValue;
fDbl = hb_valStrnToNum( szText, iLen, &lValue, &dValue , &iDec, &iWidth );

View File

@@ -596,7 +596,7 @@ HB_LONGLONG hb_arrayGetNLL( PHB_ITEM pArray, HB_SIZE ulIndex )
}
#endif
HB_LONG hb_arrayGetNInt( PHB_ITEM pArray, HB_SIZE ulIndex )
HB_MAXINT hb_arrayGetNInt( PHB_ITEM pArray, HB_SIZE ulIndex )
{
HB_TRACE(HB_TR_DEBUG, ("hb_arrayGetNLL(%p, %lu)", pArray, ulIndex));
@@ -803,7 +803,7 @@ HB_BOOL hb_arraySetNLL( PHB_ITEM pArray, HB_SIZE ulIndex, HB_LONGLONG llNumber )
}
#endif
HB_BOOL hb_arraySetNInt( PHB_ITEM pArray, HB_SIZE ulIndex, HB_LONG lNumber )
HB_BOOL hb_arraySetNInt( PHB_ITEM pArray, HB_SIZE ulIndex, HB_MAXINT lNumber )
{
HB_TRACE(HB_TR_DEBUG, ("hb_arraySetNInt(%p, %lu, %" PFHL "d)", pArray, ulIndex, lNumber));

View File

@@ -617,7 +617,7 @@ HB_LONGLONG hb_parnll( int iParam )
}
#endif
HB_LONG hb_parnint( int iParam )
HB_MAXINT hb_parnint( int iParam )
{
HB_STACK_TLS_PRELOAD
@@ -631,14 +631,14 @@ HB_LONG hb_parnint( int iParam )
pItem = hb_itemUnRef( pItem );
if( HB_IS_LONG( pItem ) )
return ( HB_LONG ) pItem->item.asLong.value;
return ( HB_MAXINT ) pItem->item.asLong.value;
else if( HB_IS_INTEGER( pItem ) )
return ( HB_LONG ) pItem->item.asInteger.value;
return ( HB_MAXINT ) pItem->item.asInteger.value;
else if( HB_IS_DOUBLE( pItem ) )
#if defined( __GNUC__ )
return ( HB_LONG ) ( HB_ULONG ) pItem->item.asDouble.value;
return ( HB_MAXINT ) ( HB_MAXUINT ) pItem->item.asDouble.value;
#else
return ( HB_LONG ) pItem->item.asDouble.value;
return ( HB_MAXINT ) pItem->item.asDouble.value;
#endif
}
@@ -1185,7 +1185,7 @@ HB_LONGLONG hb_parvnll( int iParam, ... )
}
#endif
HB_LONG hb_parvnint( int iParam, ... )
HB_MAXINT hb_parvnint( int iParam, ... )
{
HB_STACK_TLS_PRELOAD
@@ -1199,14 +1199,14 @@ HB_LONG hb_parvnint( int iParam, ... )
pItem = hb_itemUnRef( pItem );
if( HB_IS_LONG( pItem ) )
return ( HB_LONG ) pItem->item.asLong.value;
return ( HB_MAXINT ) pItem->item.asLong.value;
else if( HB_IS_INTEGER( pItem ) )
return ( HB_LONG ) pItem->item.asInteger.value;
return ( HB_MAXINT ) pItem->item.asInteger.value;
else if( HB_IS_DOUBLE( pItem ) )
#if defined( __GNUC__ )
return ( HB_LONG ) ( HB_ULONG ) pItem->item.asDouble.value;
return ( HB_MAXINT ) ( HB_MAXUINT ) pItem->item.asDouble.value;
#else
return ( HB_LONG ) pItem->item.asDouble.value;
return ( HB_MAXINT ) pItem->item.asDouble.value;
#endif
else if( HB_IS_ARRAY( pItem ) )
{
@@ -1479,7 +1479,7 @@ void hb_retnll( HB_LONGLONG llNumber )
#endif
#undef hb_retnint
void hb_retnint( HB_LONG lNumber )
void hb_retnint( HB_MAXINT lNumber )
{
HB_STACK_TLS_PRELOAD
@@ -1541,7 +1541,7 @@ void hb_retnlllen( HB_LONGLONG llNumber, int iWidth )
#endif
#undef hb_retnintlen
void hb_retnintlen( HB_LONG lNumber, int iWidth )
void hb_retnintlen( HB_MAXINT lNumber, int iWidth )
{
HB_STACK_TLS_PRELOAD
@@ -1874,7 +1874,7 @@ int hb_stornll( HB_LONGLONG llValue, int iParam )
}
#endif
int hb_stornint( HB_LONG lValue, int iParam )
int hb_stornint( HB_MAXINT lValue, int iParam )
{
HB_STACK_TLS_PRELOAD
@@ -2345,7 +2345,7 @@ int hb_storvnll( HB_LONGLONG llValue, int iParam, ... )
}
#endif
int hb_storvnint( HB_LONG lValue, int iParam, ... )
int hb_storvnint( HB_MAXINT lValue, int iParam, ... )
{
HB_STACK_TLS_PRELOAD

View File

@@ -192,8 +192,8 @@ static int hb_hashItemCmp( PHB_ITEM pKey1, PHB_ITEM pKey2, int iFlags )
}
else if( HB_IS_NUMINT( pKey1 ) && HB_IS_NUMINT( pKey2 ) )
{
HB_LONG l1 = HB_ITEM_GET_NUMINTRAW( pKey1 ),
l2 = HB_ITEM_GET_NUMINTRAW( pKey2 );
HB_MAXINT l1 = HB_ITEM_GET_NUMINTRAW( pKey1 ),
l2 = HB_ITEM_GET_NUMINTRAW( pKey2 );
return l1 < l2 ? -1 : ( l1 > l2 ? 1 : 0 );
}
else if( HB_IS_NUMERIC( pKey2 ) )

View File

@@ -176,7 +176,7 @@ static void hb_vmPushMacroBlock( const BYTE * pCode, HB_SIZE ulSize, USHORT u
static void hb_vmPushDoubleConst( double dNumber, int iWidth, int iDec ); /* Pushes a double constant (pcode) */
static void hb_vmPushLocal( int iLocal ); /* pushes the containts of a local onto the stack */
static void hb_vmPushLocalByRef( int iLocal ); /* pushes a local by refrence onto the stack */
static void hb_vmPushHBLong( HB_LONG lNumber ); /* pushes a HB_LONG number onto the stack */
static void hb_vmPushHBLong( HB_MAXINT lNumber ); /* pushes a HB_MAXINT number onto the stack */
#if !defined( HB_LONG_LONG_OFF )
static void hb_vmPushLongLongConst( HB_LONGLONG lNumber ); /* Pushes a long long constant (pcode) */
#endif
@@ -2934,7 +2934,7 @@ static void hb_vmAddInt( HB_ITEM_PTR pResult, LONG lAdd )
if( HB_IS_NUMINT( pResult ) )
{
HB_LONG lVal = HB_ITEM_GET_NUMINTRAW( pResult ), lResult;
HB_MAXINT lVal = HB_ITEM_GET_NUMINTRAW( pResult ), lResult;
lResult = lVal + lAdd;
@@ -3000,7 +3000,7 @@ static void hb_vmNegate( void )
if( pItem->item.asInteger.value < -HB_INT_MAX )
{
#if HB_LONG_MAX > HB_INT_MAX
HB_LONG lValue = ( HB_LONG ) pItem->item.asInteger.value;
HB_MAXINT lValue = ( HB_MAXINT ) pItem->item.asInteger.value;
pItem->type = HB_IT_LONG;
pItem->item.asLong.value = -lValue;
pItem->item.asLong.length = HB_LONG_EXPLENGTH( -lValue );
@@ -3122,9 +3122,9 @@ static void hb_vmPlus( HB_ITEM_PTR pResult, HB_ITEM_PTR pItem1, HB_ITEM_PTR pIte
if( HB_IS_NUMINT( pItem1 ) && HB_IS_NUMINT( pItem2 ) )
{
HB_LONG lNumber1 = HB_ITEM_GET_NUMINTRAW( pItem1 );
HB_LONG lNumber2 = HB_ITEM_GET_NUMINTRAW( pItem2 );
HB_LONG lResult = lNumber1 + lNumber2;
HB_MAXINT lNumber1 = HB_ITEM_GET_NUMINTRAW( pItem1 );
HB_MAXINT lNumber2 = HB_ITEM_GET_NUMINTRAW( pItem2 );
HB_MAXINT lResult = lNumber1 + lNumber2;
if( HB_IS_COMPLEX( pResult ) )
hb_itemClear( pResult );
@@ -3238,9 +3238,9 @@ static void hb_vmMinus( HB_ITEM_PTR pResult, HB_ITEM_PTR pItem1, HB_ITEM_PTR pIt
if( HB_IS_NUMINT( pItem1 ) && HB_IS_NUMINT( pItem2 ) )
{
HB_LONG lNumber1 = HB_ITEM_GET_NUMINTRAW( pItem1 );
HB_LONG lNumber2 = HB_ITEM_GET_NUMINTRAW( pItem2 );
HB_LONG lResult = lNumber1 - lNumber2;
HB_MAXINT lNumber1 = HB_ITEM_GET_NUMINTRAW( pItem1 );
HB_MAXINT lNumber2 = HB_ITEM_GET_NUMINTRAW( pItem2 );
HB_MAXINT lResult = lNumber1 - lNumber2;
if( HB_IS_COMPLEX( pResult ) )
hb_itemClear( pResult );
@@ -3349,8 +3349,8 @@ static void hb_vmMult( HB_ITEM_PTR pResult, HB_ITEM_PTR pItem1, HB_ITEM_PTR pIte
HB_LONG_MIN / HB_INT_MIN >= HB_INT_MIN && 1
if( HB_IS_INTEGER( pItem1 ) && HB_IS_INTEGER( pItem2 ) )
{
HB_LONG lResult = ( HB_LONG ) pItem1->item.asInteger.value *
( HB_LONG ) pItem2->item.asInteger.value;
HB_MAXINT lResult = ( HB_MAXINT ) pItem1->item.asInteger.value *
( HB_MAXINT ) pItem2->item.asInteger.value;
if( HB_IS_COMPLEX( pResult ) )
hb_itemClear( pResult );
HB_ITEM_PUT_NUMINTRAW( pResult, lResult );
@@ -3385,7 +3385,7 @@ static void hb_vmDivide( HB_ITEM_PTR pResult, HB_ITEM_PTR pItem1, HB_ITEM_PTR pI
if( HB_IS_NUMINT( pItem1 ) && HB_IS_NUMINT( pItem2 ) )
{
HB_LONG lDivisor = HB_ITEM_GET_NUMINTRAW( pItem2 );
HB_MAXINT lDivisor = HB_ITEM_GET_NUMINTRAW( pItem2 );
if( lDivisor == 0 )
{
@@ -3399,7 +3399,7 @@ static void hb_vmDivide( HB_ITEM_PTR pResult, HB_ITEM_PTR pItem1, HB_ITEM_PTR pI
}
else
{
HB_LONG lNumber1 = HB_ITEM_GET_NUMINTRAW( pItem1 );
HB_MAXINT lNumber1 = HB_ITEM_GET_NUMINTRAW( pItem1 );
hb_itemPutND( pResult, ( double ) lNumber1 / ( double ) lDivisor );
}
}
@@ -3447,7 +3447,7 @@ static void hb_vmModulus( HB_ITEM_PTR pResult, HB_ITEM_PTR pItem1, HB_ITEM_PTR p
if( HB_IS_NUMINT( pItem1 ) && HB_IS_NUMINT( pItem2 ) )
{
HB_LONG lDivisor = HB_ITEM_GET_NUMINTRAW( pItem2 );
HB_MAXINT lDivisor = HB_ITEM_GET_NUMINTRAW( pItem2 );
if( lDivisor == 0 )
{
@@ -3539,7 +3539,7 @@ static void hb_vmInc( PHB_ITEM pItem )
{
#if HB_INT_MAX < HB_LONG_MAX
pItem->type = HB_IT_LONG;
pItem->item.asLong.value = ( HB_LONG ) pItem->item.asInteger.value + 1;
pItem->item.asLong.value = ( HB_MAXINT ) pItem->item.asInteger.value + 1;
pItem->item.asLong.length = HB_LONG_EXPLENGTH( pItem->item.asLong.value );
#else
pItem->type = HB_IT_DOUBLE;
@@ -3604,7 +3604,7 @@ static void hb_vmDec( PHB_ITEM pItem )
{
#if HB_INT_MIN > HB_LONG_MIN
pItem->type = HB_IT_LONG;
pItem->item.asLong.value = ( HB_LONG ) pItem->item.asInteger.value - 1;
pItem->item.asLong.value = ( HB_MAXINT ) pItem->item.asInteger.value - 1;
pItem->item.asLong.length = HB_LONG_EXPLENGTH( pItem->item.asLong.value );
#else
pItem->type = HB_IT_DOUBLE;
@@ -6485,13 +6485,13 @@ void hb_vmPushNumber( double dNumber, int iDec )
hb_vmPushInteger( ( int ) dNumber );
else if( HB_DBL_LIM_LONG( dNumber ) )
hb_vmPushHBLong( ( HB_LONG ) dNumber );
hb_vmPushHBLong( ( HB_MAXINT ) dNumber );
else
hb_vmPushDouble( dNumber, hb_stackSetStruct()->HB_SET_DECIMALS );
}
static int hb_vmCalcIntWidth( HB_LONG lNumber )
static int hb_vmCalcIntWidth( HB_MAXINT lNumber )
{
int iWidth;
@@ -6544,7 +6544,7 @@ static void hb_vmPushLongConst( long lNumber )
HB_TRACE(HB_TR_DEBUG, ("hb_vmPushLongConst(%ld)", lNumber));
pItem->type = HB_IT_LONG;
pItem->item.asLong.value = ( HB_LONG ) lNumber;
pItem->item.asLong.value = ( HB_MAXINT ) lNumber;
pItem->item.asLong.length = ( USHORT ) hb_vmCalcIntWidth( lNumber );
}
#endif
@@ -6560,7 +6560,7 @@ void hb_vmPushLong( long lNumber )
HB_ITEM_PUT_LONGRAW( pItem, lNumber );
}
static void hb_vmPushHBLong( HB_LONG lNumber )
static void hb_vmPushHBLong( HB_MAXINT lNumber )
{
HB_STACK_TLS_PRELOAD
PHB_ITEM pItem = hb_stackAllocItem();
@@ -6581,12 +6581,12 @@ static void hb_vmPushLongLongConst( HB_LONGLONG llNumber )
HB_TRACE(HB_TR_DEBUG, ("hb_vmPushLongLongConst(%" PFLL "d)", llNumber));
pItem->type = HB_IT_LONG;
pItem->item.asLong.value = ( HB_LONG ) llNumber;
pItem->item.asLong.value = ( HB_MAXINT ) llNumber;
pItem->item.asLong.length = ( USHORT ) hb_vmCalcIntWidth( llNumber );
}
#endif
void hb_vmPushNumInt( HB_LONG lNumber )
void hb_vmPushNumInt( HB_MAXINT lNumber )
{
if( HB_LIM_INT( lNumber ) )
hb_vmPushInteger( ( int ) lNumber );
@@ -9551,7 +9551,7 @@ HB_BOOL hb_xvmEqualInt( LONG lValue )
}
else if( HB_IS_LONG( pItem ) )
{
pItem->item.asLogical.value = pItem->item.asLong.value == ( HB_LONG ) lValue;
pItem->item.asLogical.value = pItem->item.asLong.value == ( HB_MAXINT ) lValue;
pItem->type = HB_IT_LOGICAL;
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -9604,7 +9604,7 @@ HB_BOOL hb_xvmEqualIntIs( LONG lValue, HB_BOOL * pfValue )
}
else if( HB_IS_LONG( pItem ) )
{
* pfValue = pItem->item.asLong.value == ( HB_LONG ) lValue;
* pfValue = pItem->item.asLong.value == ( HB_MAXINT ) lValue;
hb_stackDec();
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -9670,7 +9670,7 @@ HB_BOOL hb_xvmNotEqualInt( LONG lValue )
}
else if( HB_IS_LONG( pItem ) )
{
pItem->item.asLogical.value = pItem->item.asLong.value != ( HB_LONG ) lValue;
pItem->item.asLogical.value = pItem->item.asLong.value != ( HB_MAXINT ) lValue;
pItem->type = HB_IT_LOGICAL;
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -9723,7 +9723,7 @@ HB_BOOL hb_xvmNotEqualIntIs( LONG lValue, HB_BOOL * pfValue )
}
else if( HB_IS_LONG( pItem ) )
{
* pfValue = pItem->item.asLong.value != ( HB_LONG ) lValue;
* pfValue = pItem->item.asLong.value != ( HB_MAXINT ) lValue;
hb_stackDec();
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -9789,7 +9789,7 @@ HB_BOOL hb_xvmLessThenInt( LONG lValue )
}
else if( HB_IS_LONG( pItem ) )
{
pItem->item.asLogical.value = pItem->item.asLong.value < ( HB_LONG ) lValue;
pItem->item.asLogical.value = pItem->item.asLong.value < ( HB_MAXINT ) lValue;
pItem->type = HB_IT_LOGICAL;
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -9837,7 +9837,7 @@ HB_BOOL hb_xvmLessThenIntIs( LONG lValue, HB_BOOL * pfValue )
}
else if( HB_IS_LONG( pItem ) )
{
* pfValue = pItem->item.asLong.value < ( HB_LONG ) lValue;
* pfValue = pItem->item.asLong.value < ( HB_MAXINT ) lValue;
hb_stackDec();
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -9898,7 +9898,7 @@ HB_BOOL hb_xvmLessEqualThenInt( LONG lValue )
}
else if( HB_IS_LONG( pItem ) )
{
pItem->item.asLogical.value = pItem->item.asLong.value <= ( HB_LONG ) lValue;
pItem->item.asLogical.value = pItem->item.asLong.value <= ( HB_MAXINT ) lValue;
pItem->type = HB_IT_LOGICAL;
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -9946,7 +9946,7 @@ HB_BOOL hb_xvmLessEqualThenIntIs( LONG lValue, HB_BOOL * pfValue )
}
else if( HB_IS_LONG( pItem ) )
{
* pfValue = pItem->item.asLong.value <= ( HB_LONG ) lValue;
* pfValue = pItem->item.asLong.value <= ( HB_MAXINT ) lValue;
hb_stackDec();
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -10007,7 +10007,7 @@ HB_BOOL hb_xvmGreaterThenInt( LONG lValue )
}
else if( HB_IS_LONG( pItem ) )
{
pItem->item.asLogical.value = pItem->item.asLong.value > ( HB_LONG ) lValue;
pItem->item.asLogical.value = pItem->item.asLong.value > ( HB_MAXINT ) lValue;
pItem->type = HB_IT_LOGICAL;
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -10055,7 +10055,7 @@ HB_BOOL hb_xvmGreaterThenIntIs( LONG lValue, HB_BOOL * pfValue )
}
else if( HB_IS_LONG( pItem ) )
{
* pfValue = pItem->item.asLong.value > ( HB_LONG ) lValue;
* pfValue = pItem->item.asLong.value > ( HB_MAXINT ) lValue;
hb_stackDec();
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -10116,7 +10116,7 @@ HB_BOOL hb_xvmGreaterEqualThenInt( LONG lValue )
}
else if( HB_IS_LONG( pItem ) )
{
pItem->item.asLogical.value = pItem->item.asLong.value >= ( HB_LONG ) lValue;
pItem->item.asLogical.value = pItem->item.asLong.value >= ( HB_MAXINT ) lValue;
pItem->type = HB_IT_LOGICAL;
}
else if( HB_IS_DOUBLE( pItem ) )
@@ -10164,7 +10164,7 @@ HB_BOOL hb_xvmGreaterEqualThenIntIs( LONG lValue, HB_BOOL * pfValue )
}
else if( HB_IS_LONG( pItem ) )
{
* pfValue = pItem->item.asLong.value >= ( HB_LONG ) lValue;
* pfValue = pItem->item.asLong.value >= ( HB_MAXINT ) lValue;
hb_stackDec();
}
else if( HB_IS_DOUBLE( pItem ) )

View File

@@ -651,23 +651,23 @@ long hb_itemGetNL( PHB_ITEM pItem )
return 0;
}
HB_LONG hb_itemGetNInt( PHB_ITEM pItem )
HB_MAXINT hb_itemGetNInt( PHB_ITEM pItem )
{
HB_TRACE(HB_TR_DEBUG, ("hb_itemGetNL(%p)", pItem));
if( pItem )
{
if( HB_IS_LONG( pItem ) )
return ( HB_LONG ) pItem->item.asLong.value;
return ( HB_MAXINT ) pItem->item.asLong.value;
else if( HB_IS_INTEGER( pItem ) )
return ( HB_LONG ) pItem->item.asInteger.value;
return ( HB_MAXINT ) pItem->item.asInteger.value;
else if( HB_IS_DOUBLE( pItem ) )
#if defined( __GNUC__ )
return ( HB_LONG ) ( HB_ULONG ) pItem->item.asDouble.value;
return ( HB_MAXINT ) ( HB_MAXUINT ) pItem->item.asDouble.value;
#else
return ( HB_LONG ) pItem->item.asDouble.value;
return ( HB_MAXINT ) pItem->item.asDouble.value;
#endif
}
@@ -978,7 +978,7 @@ PHB_ITEM hb_itemPutNLL( PHB_ITEM pItem, HB_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_MAXINT ) llNumber;
pItem->item.asLong.length = HB_LONG_LENGTH( llNumber );
#else
pItem->type = HB_IT_DOUBLE;
@@ -990,7 +990,7 @@ PHB_ITEM hb_itemPutNLL( PHB_ITEM pItem, HB_LONGLONG llNumber )
}
#endif
PHB_ITEM hb_itemPutNInt( PHB_ITEM pItem, HB_LONG lNumber )
PHB_ITEM hb_itemPutNInt( PHB_ITEM pItem, HB_MAXINT lNumber )
{
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutNInt(%p, %" PFHL "d)", pItem, lNumber));
@@ -1019,7 +1019,7 @@ PHB_ITEM hb_itemPutNInt( PHB_ITEM pItem, HB_LONG lNumber )
return pItem;
}
PHB_ITEM hb_itemPutNIntLen( PHB_ITEM pItem, HB_LONG lNumber, int iWidth )
PHB_ITEM hb_itemPutNIntLen( PHB_ITEM pItem, HB_MAXINT lNumber, int iWidth )
{
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutNIntLen(%p, %" PFHL "d, %d)", pItem, lNumber, iWidth));
@@ -1049,7 +1049,7 @@ PHB_ITEM hb_itemPutNLen( PHB_ITEM pItem, double dNumber, int iWidth, int iDec )
if( iDec == 0 )
{
HB_LONG lNumber = ( HB_LONG ) dNumber;
HB_MAXINT lNumber = ( HB_MAXINT ) dNumber;
if( ( double ) lNumber == dNumber )
{
@@ -1193,7 +1193,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_MAXINT ) lNumber;
pItem->item.asLong.length = iWidth;
#endif
@@ -1218,7 +1218,7 @@ PHB_ITEM hb_itemPutNLLLen( PHB_ITEM pItem, HB_LONGLONG llNumber, int iWidth )
iWidth = HB_LONG_LENGTH( llNumber );
pItem->type = HB_IT_LONG;
pItem->item.asLong.value = ( HB_LONG ) llNumber;
pItem->item.asLong.value = ( HB_MAXINT ) llNumber;
pItem->item.asLong.length = ( USHORT ) iWidth;
#else
pItem->type = HB_IT_DOUBLE;
@@ -2390,7 +2390,7 @@ HB_BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec )
}
else
{
HB_LONG lNumber;
HB_MAXINT lNumber;
if( HB_IS_INTEGER( pNumber ) )
lNumber = pNumber->item.asInteger.value;

View File

@@ -1244,7 +1244,7 @@ void hb_macroGenPushSymbol( const char * szSymbolName, HB_BOOL bFunction, HB_COM
}
/* generates the pcode to push a long number on the virtual machine stack */
void hb_macroGenPushLong( HB_LONG lNumber, HB_COMP_DECL )
void hb_macroGenPushLong( HB_MAXINT lNumber, HB_COMP_DECL )
{
if( lNumber == 0 )
{
@@ -1365,7 +1365,7 @@ void hb_macroGenPopMemvar( const char * szVarName, HB_COMP_DECL )
void hb_macroGenPopAliasedVar( const char * szVarName,
HB_BOOL bPushAliasValue,
const char * szAlias,
HB_LONG lWorkarea, HB_COMP_DECL )
HB_MAXINT lWorkarea, HB_COMP_DECL )
{
HB_TRACE(HB_TR_DEBUG, ("hb_macroGenPopAliasedVar(%s->%s)",szAlias,szVarName));
@@ -1457,7 +1457,7 @@ void hb_macroGenPushMemvarRef( const char * szVarName, HB_COMP_DECL )
void hb_macroGenPushAliasedVar( const char * szVarName,
HB_BOOL bPushAliasValue,
const char * szAlias,
HB_LONG lWorkarea, HB_COMP_DECL )
HB_MAXINT lWorkarea, HB_COMP_DECL )
{
HB_TRACE(HB_TR_DEBUG, ("hb_macroGenPushAliasedVar(%s->%s)",szAlias,szVarName));

View File

@@ -144,7 +144,7 @@ typedef struct _HB_TASKINFO
HB_BOOL detached;
HB_BOOL stop;
HB_LONG wakeup;
HB_MAXINT wakeup;
char * stack;
long stack_size;
@@ -205,7 +205,7 @@ static PHB_TASKMTX s_mutexList = NULL;
static int s_iTaskID = 0;
static HB_LONG hb_taskTimeStop( unsigned long ulMilliSec )
static HB_MAXINT hb_taskTimeStop( unsigned long ulMilliSec )
{
if( ulMilliSec == HB_TASK_INFINITE_WAIT )
return HB_TASK_INFINITE_DELAY;
@@ -213,22 +213,22 @@ static HB_LONG hb_taskTimeStop( unsigned long ulMilliSec )
{
#if defined( __DJGPP__ )
/* uclock_t uclock() * 1000 / UCLOCKS_PER_SEC */
return ( HB_LONG ) clock() * 1000 / CLOCKS_PER_SEC + ulMilliSec;
return ( HB_MAXINT ) clock() * 1000 / CLOCKS_PER_SEC + ulMilliSec;
#elif _POSIX_C_SOURCE >= 199309L
struct timespec ts;
clock_gettime( CLOCK_REALTIME, &ts );
return ( HB_LONG ) ts.tv_sec * 1000 + ts.tv_nsec / 1000000 + ulMilliSec;
return ( HB_MAXINT ) ts.tv_sec * 1000 + ts.tv_nsec / 1000000 + ulMilliSec;
#elif defined( HB_OS_UNIX )
struct timeval tv;
gettimeofday( &tv, NULL );
return ( HB_LONG ) tv.tv_sec * 1000 + tv.tv_usec / 1000 + ulMilliSec;
return ( HB_MAXINT ) tv.tv_sec * 1000 + tv.tv_usec / 1000 + ulMilliSec;
#else
return ( HB_LONG ) clock() * 1000 / CLOCKS_PER_SEC + ulMilliSec;
return ( HB_MAXINT ) clock() * 1000 / CLOCKS_PER_SEC + ulMilliSec;
#endif
}
}
static void hb_taskFreeze( HB_LONG wakeup )
static void hb_taskFreeze( HB_MAXINT wakeup )
{
#if defined( HB_OS_DOS )
while( wakeup > hb_taskTimeStop( 0 ) )

View File

@@ -1215,7 +1215,7 @@ static int hb_threadWait( PHB_THREADSTATE * pThreads, int iThreads,
else
ts.tv_sec = ts.tv_nsec = 0;
#else
HB_ULONG timer;
HB_MAXUINT timer;
if( ulMilliSec != HB_THREAD_INFINITE_WAIT )
timer = hb_dateMilliSeconds() + ulMilliSec;
@@ -1273,7 +1273,7 @@ static int hb_threadWait( PHB_THREADSTATE * pThreads, int iThreads,
# endif
if( !fExit && timer )
{
HB_ULONG curr = hb_dateMilliSeconds();
HB_MAXUINT curr = hb_dateMilliSeconds();
if( timer <= curr )
fExit = HB_TRUE;
else