2010-06-15 12:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbdefs.h
* harbour/include/hbvmpub.h
* harbour/src/common/expropt1.c
* harbour/src/common/expropt2.c
* harbour/src/common/hbstr.c
* harbour/src/compiler/gencc.c
* harbour/src/vm/hvm.c
* harbour/src/vm/itemapi.c
* harbour/src/vm/task.c
* harbour/src/rtl/abs.c
* harbour/src/rtl/hbdyn.c
* harbour/src/rdd/dbsql.c
* harbour/contrib/hbwin/olecore.c
* harbour/contrib/sddoci/sddoci.c
* harbour/contrib/sddsqlt3/sddsqlt3.c
* renamed HB_LONG_{MIN,MAX} to HB_VMLONG_{MIN,MAX} and
HB_INT_{MIN,MAX} to HB_VMINT_{MIN,MAX} to not confuse users
after renaming HB_LONG to HB_MAXINT and LONG to HB_LONG.
They could expect that HB_LONG_{MIN,MAX} are for HB_LONG type.
This commit is contained in:
@@ -16,6 +16,27 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-06-15 12:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbdefs.h
|
||||
* harbour/include/hbvmpub.h
|
||||
* harbour/src/common/expropt1.c
|
||||
* harbour/src/common/expropt2.c
|
||||
* harbour/src/common/hbstr.c
|
||||
* harbour/src/compiler/gencc.c
|
||||
* harbour/src/vm/hvm.c
|
||||
* harbour/src/vm/itemapi.c
|
||||
* harbour/src/vm/task.c
|
||||
* harbour/src/rtl/abs.c
|
||||
* harbour/src/rtl/hbdyn.c
|
||||
* harbour/src/rdd/dbsql.c
|
||||
* harbour/contrib/hbwin/olecore.c
|
||||
* harbour/contrib/sddoci/sddoci.c
|
||||
* harbour/contrib/sddsqlt3/sddsqlt3.c
|
||||
* renamed HB_LONG_{MIN,MAX} to HB_VMLONG_{MIN,MAX} and
|
||||
HB_INT_{MIN,MAX} to HB_VMINT_{MIN,MAX} to not confuse users
|
||||
after renaming HB_LONG to HB_MAXINT and LONG to HB_LONG.
|
||||
They could expect that HB_LONG_{MIN,MAX} are for HB_LONG type.
|
||||
|
||||
2010-06-15 10:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbcurl/hbcurl.c
|
||||
! Fixed typo in prev change.
|
||||
|
||||
@@ -387,7 +387,7 @@ static void hb_oleItemToVariantRef( VARIANT* pVariant, PHB_ITEM pItem,
|
||||
break;
|
||||
|
||||
case HB_IT_LONG:
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
pVariant->n1.n2.vt = VT_I4;
|
||||
pVariant->n1.n2.n3.lVal = hb_itemGetNL( pItem );
|
||||
if( pVarRef )
|
||||
@@ -708,7 +708,7 @@ void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant )
|
||||
break;
|
||||
|
||||
case VT_I8:
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
hb_itemPutNInt( pItem, ( HB_MAXINT ) pVariant->n1.n2.n3.lVal );
|
||||
#elif defined( HB_OLE_NO_LL )
|
||||
/* workaround for wrong OLE variant structure definition */
|
||||
@@ -719,7 +719,7 @@ void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant )
|
||||
break;
|
||||
|
||||
case VT_I8 | VT_BYREF:
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
hb_itemPutNInt( pItem, ( HB_MAXINT ) *pVariant->n1.n2.n3.plVal );
|
||||
#elif defined( HB_OLE_NO_LLREF )
|
||||
/* workaround for wrong OLE variant structure definition */
|
||||
@@ -755,7 +755,7 @@ 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 )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
hb_itemPutNInt( pItem, ( HB_MAXINT ) pVariant->n1.n2.n3.ulVal );
|
||||
#elif defined( HB_OLE_NO_LL )
|
||||
/* workaround for wrong OLE variant structure definition */
|
||||
@@ -767,7 +767,7 @@ void hb_oleVariantToItem( PHB_ITEM pItem, VARIANT* pVariant )
|
||||
|
||||
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 )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
hb_itemPutNInt( pItem, ( HB_MAXINT ) *pVariant->n1.n2.n3.pulVal );
|
||||
#elif defined( HB_OLE_NO_LLREF )
|
||||
/* workaround for wrong OLE variant structure definition */
|
||||
@@ -994,7 +994,7 @@ void hb_oleVariantUpdate( VARIANT* pVariant, PHB_ITEM pItem,
|
||||
break;
|
||||
|
||||
case VT_I8 | VT_BYREF:
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
*pVariant->n1.n2.n3.plVal = ( long ) hb_itemGetNInt( pItem );
|
||||
#elif defined( HB_OLE_NO_LLREF )
|
||||
/* workaround for wrong OLE variant structure definition */
|
||||
@@ -1017,7 +1017,7 @@ void hb_oleVariantUpdate( VARIANT* pVariant, PHB_ITEM pItem,
|
||||
break;
|
||||
|
||||
case VT_UI8 | VT_BYREF:
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
*pVariant->n1.n2.n3.pulVal = ( unsigned long ) hb_itemGetNInt( pItem );
|
||||
#elif defined( HB_OLE_NO_LLREF )
|
||||
/* workaround for wrong OLE variant structure definition */
|
||||
|
||||
@@ -567,7 +567,7 @@ static HB_ERRCODE ocilibGoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo )
|
||||
case HB_FT_LONG:
|
||||
case HB_FT_INTEGER:
|
||||
if( pField->uiDec == 0 )
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
pItem = hb_itemPutNIntLen( NULL, OCI_GetInt( rs, ui ), pField->uiLen );
|
||||
#else
|
||||
pItem = hb_itemPutNIntLen( NULL, OCI_GetBigInt( rs, ui ), pField->uiLen );
|
||||
|
||||
@@ -451,7 +451,7 @@ static HB_ERRCODE sqlite3GoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo )
|
||||
case HB_FT_LONG:
|
||||
case HB_FT_INTEGER:
|
||||
if( pField->uiDec == 0 )
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
pItem = hb_itemPutNIntLen( NULL, sqlite3_column_int( st, ui ), pField->uiLen );
|
||||
#else
|
||||
pItem = hb_itemPutNIntLen( NULL, sqlite3_column_int64( st, ui ), pField->uiLen );
|
||||
|
||||
@@ -477,28 +477,28 @@ typedef HB_UCHAR HB_BYTE;
|
||||
#endif
|
||||
|
||||
#if defined( HB_CLIPPER_INT_ITEMS )
|
||||
# define HB_INT_MAX SHRT_MAX
|
||||
# define HB_INT_MIN SHRT_MIN
|
||||
# define HB_LONG_MAX LONG_MAX
|
||||
# define HB_LONG_MIN LONG_MIN
|
||||
# define HB_ULONG_MAX ULONG_MAX
|
||||
# define HB_VMINT_MAX SHRT_MAX
|
||||
# define HB_VMINT_MIN SHRT_MIN
|
||||
# define HB_VMLONG_MAX LONG_MAX
|
||||
# define HB_VMLONG_MIN LONG_MIN
|
||||
# define HB_VMULONG_MAX ULONG_MAX
|
||||
typedef long HB_MAXINT;
|
||||
typedef unsigned long HB_MAXUINT;
|
||||
# define PFHL "l"
|
||||
#elif !defined( HB_LONG_LONG_OFF ) && ULONG_MAX == UINT_MAX
|
||||
# define HB_INT_MAX INT_MAX
|
||||
# define HB_INT_MIN INT_MIN
|
||||
# define HB_LONG_MAX LONGLONG_MAX
|
||||
# define HB_LONG_MIN LONGLONG_MIN
|
||||
# define HB_ULONG_MAX ULONGLONG_MAX
|
||||
# define HB_VMINT_MAX INT_MAX
|
||||
# define HB_VMINT_MIN INT_MIN
|
||||
# define HB_VMLONG_MAX LONGLONG_MAX
|
||||
# define HB_VMLONG_MIN LONGLONG_MIN
|
||||
# define HB_VMULONG_MAX ULONGLONG_MAX
|
||||
typedef HB_LONGLONG HB_MAXINT;
|
||||
typedef HB_ULONGLONG HB_MAXUINT;
|
||||
#else
|
||||
# define HB_INT_MAX INT_MAX
|
||||
# define HB_INT_MIN INT_MIN
|
||||
# define HB_LONG_MAX LONG_MAX
|
||||
# define HB_LONG_MIN LONG_MIN
|
||||
# define HB_ULONG_MAX ULONG_MAX
|
||||
# define HB_VMINT_MAX INT_MAX
|
||||
# define HB_VMINT_MIN INT_MIN
|
||||
# define HB_VMLONG_MAX LONG_MAX
|
||||
# define HB_VMLONG_MIN LONG_MIN
|
||||
# define HB_VMULONG_MAX ULONG_MAX
|
||||
typedef long HB_MAXINT;
|
||||
typedef unsigned long HB_MAXUINT;
|
||||
# define PFHL "l"
|
||||
@@ -507,10 +507,10 @@ typedef HB_UCHAR HB_BYTE;
|
||||
typedef HB_MAXINT HB_VMMAXINT;
|
||||
typedef HB_MAXUINT HB_VMMAXUINT;
|
||||
|
||||
#define HB_DBL_LIM_INT(d) ( HB_INT_MIN <= (d) && (d) <= HB_INT_MAX )
|
||||
#define HB_DBL_LIM_LONG(d) ( (HB_MAXDBL) HB_LONG_MIN <= (HB_MAXDBL) (d) && (HB_MAXDBL) (d) <= (HB_MAXDBL) HB_LONG_MAX )
|
||||
#define HB_LIM_INT(l) ( HB_INT_MIN <= (l) && (l) <= HB_INT_MAX )
|
||||
#define HB_LIM_LONG(l) ( HB_LONG_MIN <= (l) && (l) <= HB_LONG_MAX )
|
||||
#define HB_DBL_LIM_INT(d) ( HB_VMINT_MIN <= (d) && (d) <= HB_VMINT_MAX )
|
||||
#define HB_DBL_LIM_LONG(d) ( (HB_MAXDBL) HB_VMLONG_MIN <= (HB_MAXDBL) (d) && (HB_MAXDBL) (d) <= (HB_MAXDBL) HB_VMLONG_MAX )
|
||||
#define HB_LIM_INT(l) ( HB_VMINT_MIN <= (l) && (l) <= HB_VMINT_MAX )
|
||||
#define HB_LIM_LONG(l) ( HB_VMLONG_MIN <= (l) && (l) <= HB_VMLONG_MAX )
|
||||
|
||||
#define HB_DBL_LIM_INT8(d) ( -128 <= (d) && (d) <= 127 )
|
||||
#define HB_DBL_LIM_INT16(d) ( INT16_MIN <= (d) && (d) <= INT16_MAX )
|
||||
@@ -559,21 +559,21 @@ typedef HB_MAXUINT HB_VMMAXUINT;
|
||||
* intentionally replicated. I think we should keep it
|
||||
* only in strict compatibility mode. [druzus]
|
||||
*/
|
||||
#if HB_INT_MIN < -999999999
|
||||
#if HB_VMINT_MIN < -999999999
|
||||
# define HB_INT_LENGTH( i ) ( ( (i) < -999999999 || (i) > 999999999 ) ? 20 : 10 )
|
||||
#else
|
||||
# define HB_INT_LENGTH( i ) 10
|
||||
# define HB_INT_EXPLENGTH( i ) 10
|
||||
# if HB_LONG_MIN < -999999999
|
||||
# if HB_VMLONG_MIN < -999999999
|
||||
# define HB_LONG_LENGTH( i ) ( ( (i) < -999999999 || (i) > 999999999 ) ? 20 : 10 )
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined( HB_LONG_LONG_OFF )
|
||||
# if HB_LONG_MAX > HB_LL( 9999999999 )
|
||||
# if HB_VMLONG_MAX > HB_LL( 9999999999 )
|
||||
# define HB_LONG_LENGTH( l ) ( ( (l) < -999999999 || (l) > HB_LL( 9999999999 ) ) ? 20 : 10 )
|
||||
# endif
|
||||
# if HB_INT_MAX > HB_LL( 9999999999 )
|
||||
# if HB_VMINT_MAX > HB_LL( 9999999999 )
|
||||
# define HB_INT_EXPLENGTH( i ) HB_LONG_LENGTH( i )
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -91,7 +91,7 @@ struct _HB_SYMB;
|
||||
} \
|
||||
} while( 0 )
|
||||
|
||||
# if HB_INT_MAX >= LONG_MAX
|
||||
# if HB_VMINT_MAX >= LONG_MAX
|
||||
# define HB_ITEM_PUT_LONGRAW( p, v ) \
|
||||
do { \
|
||||
(p)->type = HB_IT_INTEGER; \
|
||||
|
||||
@@ -1121,8 +1121,8 @@ HB_EXPR_PTR hb_compExprNewNegate( HB_EXPR_PTR pNegExpr, HB_COMP_DECL )
|
||||
}
|
||||
else
|
||||
{
|
||||
#if -HB_LONG_MAX > HB_LONG_MIN
|
||||
if( pNegExpr->value.asNum.val.l < -HB_LONG_MAX )
|
||||
#if -HB_VMLONG_MAX > HB_VMLONG_MIN
|
||||
if( pNegExpr->value.asNum.val.l < -HB_VMLONG_MAX )
|
||||
{
|
||||
pNegExpr->value.asNum.NumType = HB_ET_DOUBLE;
|
||||
pNegExpr->value.asNum.val.d = - ( double ) pNegExpr->value.asNum.val.l;
|
||||
|
||||
@@ -951,8 +951,8 @@ HB_EXPR_PTR hb_compExprReduceNegate( HB_EXPR_PTR pSelf, HB_COMP_DECL )
|
||||
}
|
||||
else
|
||||
{
|
||||
#if -HB_LONG_MAX > HB_LONG_MIN
|
||||
if( pExpr->value.asNum.val.l < -HB_LONG_MAX )
|
||||
#if -HB_VMLONG_MAX > HB_VMLONG_MIN
|
||||
if( pExpr->value.asNum.val.l < -HB_VMLONG_MAX )
|
||||
{
|
||||
pExpr->value.asNum.NumType = HB_ET_DOUBLE;
|
||||
pExpr->value.asNum.val.d = - ( double ) pExpr->value.asNum.val.l;
|
||||
|
||||
@@ -590,8 +590,8 @@ static HB_BOOL hb_str2number( HB_BOOL fPCode, const char* szNum, HB_SIZE ulLen,
|
||||
HB_MAXINT lLimV;
|
||||
int iLimC;
|
||||
|
||||
lLimV = HB_LONG_MAX / 10;
|
||||
iLimC = ( int ) ( HB_LONG_MAX % 10 );
|
||||
lLimV = HB_VMLONG_MAX / 10;
|
||||
iLimC = ( int ) ( HB_VMLONG_MAX % 10 );
|
||||
|
||||
iWidth = ulPos;
|
||||
|
||||
|
||||
@@ -1246,7 +1246,7 @@ static HB_GENC_FUNC( hb_p_pushlong )
|
||||
|
||||
if( iSkip == 0 )
|
||||
{
|
||||
#if HB_INT_MAX >= INT32_MAX
|
||||
#if INT_MAX >= INT32_MAX
|
||||
fprintf( cargo->yyc, "\thb_xvmPushInteger( %d );\n", ( int ) lVal );
|
||||
#else
|
||||
fprintf( cargo->yyc, "\thb_xvmPushLong( %ldL );\n", ( long ) lVal );
|
||||
|
||||
@@ -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_MAXINT llNext = HB_LONG_MAX;
|
||||
HB_MAXINT llNext = HB_VMLONG_MAX;
|
||||
HB_FHANDLE hFile;
|
||||
HB_ERRCODE errCode;
|
||||
|
||||
|
||||
@@ -71,9 +71,9 @@ HB_FUNC( ABS )
|
||||
|
||||
if( iNumber >= 0 )
|
||||
hb_retnilen( iNumber, iWidth );
|
||||
#if -HB_INT_MAX > HB_INT_MIN
|
||||
else if( iNumber < -HB_INT_MAX )
|
||||
#if HB_LONG_MAX > HB_INT_MAX
|
||||
#if -HB_VMINT_MAX > HB_VMINT_MIN
|
||||
else if( iNumber < -INT_MAX )
|
||||
#if HB_VMLONG_MAX > HB_VMINT_MAX
|
||||
hb_retnint( - ( HB_MAXINT ) iNumber );
|
||||
#else
|
||||
hb_retndlen( - ( double ) iNumber, 0, iDec );
|
||||
@@ -88,8 +88,8 @@ HB_FUNC( ABS )
|
||||
|
||||
if( lNumber >= 0 )
|
||||
hb_retnintlen( lNumber, iWidth );
|
||||
#if -HB_LONG_MAX > HB_LONG_MIN
|
||||
else if( lNumber < -HB_LONG_MAX )
|
||||
#if -HB_VMLONG_MAX > HB_VMLONG_MIN
|
||||
else if( lNumber < -HB_VMLONG_MAX )
|
||||
hb_retndlen( - ( double ) lNumber, 0, iDec );
|
||||
#endif
|
||||
else
|
||||
|
||||
@@ -185,7 +185,7 @@ static HB_U64 hb_u64par( PHB_ITEM pParam, PHB_DYNARG pArg )
|
||||
|
||||
case HB_DYN_CTYPE_LLONG_UNSIGNED:
|
||||
/* TOFIX: Digits are lost. */
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
pArg->value.t.n64 = ( HB_MAXUINT ) hb_itemGetNInt( pParam );
|
||||
#else
|
||||
pArg->value.t.n64 = ( HB_ULONGLONG ) hb_itemGetNInt( pParam );
|
||||
@@ -322,7 +322,7 @@ static PHB_ITEM hb_u64ret( PHB_ITEM pItem, int iRetType, int iEncoding, HB_DYNVA
|
||||
break;
|
||||
|
||||
case HB_DYN_CTYPE_LLONG:
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
hb_itemPutNInt( pItem, ( HB_MAXINT ) value.t.n64 );
|
||||
#else
|
||||
hb_itemPutNInt( pItem, ( HB_LONGLONG ) value.t.n64 );
|
||||
@@ -330,7 +330,7 @@ static PHB_ITEM hb_u64ret( PHB_ITEM pItem, int iRetType, int iEncoding, HB_DYNVA
|
||||
break;
|
||||
|
||||
case HB_DYN_CTYPE_LLONG_UNSIGNED:
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
hb_itemPutNInt( pItem, ( HB_MAXUINT ) value.t.n64 );
|
||||
#else
|
||||
hb_itemPutNInt( pItem, ( HB_ULONGLONG ) value.t.n64 );
|
||||
@@ -536,7 +536,7 @@ static void hb_u32par( PHB_ITEM pParam, PHB_DYNARG pArg, HB_U32 * r1, HB_U32 * r
|
||||
|
||||
case HB_DYN_CTYPE_LLONG_UNSIGNED:
|
||||
/* TOFIX: Digits are lost. */
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
pArg->value.t.n64 = ( HB_MAXUINT ) hb_itemGetNInt( pParam );
|
||||
#else
|
||||
pArg->value.t.n64 = ( HB_ULONGLONG ) hb_itemGetNInt( pParam );
|
||||
@@ -687,7 +687,7 @@ static PHB_ITEM hb_u32ret( PHB_ITEM pItem, int iRetType, int iEncoding, HB_DYNVA
|
||||
break;
|
||||
|
||||
case HB_DYN_CTYPE_LLONG:
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
hb_itemPutNInt( pItem, ( HB_MAXINT ) value.t.n64 );
|
||||
#else
|
||||
hb_itemPutNInt( pItem, ( HB_LONGLONG ) value.t.n64 );
|
||||
@@ -695,7 +695,7 @@ static PHB_ITEM hb_u32ret( PHB_ITEM pItem, int iRetType, int iEncoding, HB_DYNVA
|
||||
break;
|
||||
|
||||
case HB_DYN_CTYPE_LLONG_UNSIGNED:
|
||||
#if HB_LONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
|
||||
hb_itemPutNInt( pItem, ( HB_MAXUINT ) value.t.n64 );
|
||||
#else
|
||||
hb_itemPutNInt( pItem, ( HB_ULONGLONG ) value.t.n64 );
|
||||
|
||||
@@ -180,7 +180,7 @@ static void hb_vmPushHBLong( HB_MAXINT lNumber ); /* pushes a HB_MAXINT numbe
|
||||
#if !defined( HB_LONG_LONG_OFF )
|
||||
static void hb_vmPushLongLongConst( HB_LONGLONG lNumber ); /* Pushes a long long constant (pcode) */
|
||||
#endif
|
||||
#if HB_INT_MAX >= INT32_MAX
|
||||
#if HB_VMINT_MAX >= INT32_MAX
|
||||
static void hb_vmPushIntegerConst( int iNumber ); /* Pushes a int constant (pcode) */
|
||||
#else
|
||||
static void hb_vmPushLongConst( long lNumber ); /* Pushes a long constant (pcode) */
|
||||
@@ -2100,7 +2100,7 @@ void hb_vmExecute( const HB_BYTE * pCode, PHB_SYMB pSymbols )
|
||||
|
||||
case HB_P_PUSHLONG:
|
||||
HB_TRACE( HB_TR_DEBUG, ("(HB_P_PUSHLONG)") );
|
||||
#if HB_INT_MAX >= INT32_MAX
|
||||
#if HB_VMINT_MAX >= INT32_MAX
|
||||
hb_vmPushIntegerConst( ( int ) HB_PCODE_MKLONG( &pCode[ 1 ] ) );
|
||||
#else
|
||||
hb_vmPushLongConst( ( long ) HB_PCODE_MKLONG( &pCode[ 1 ] ) );
|
||||
@@ -3002,10 +3002,10 @@ static void hb_vmNegate( void )
|
||||
|
||||
if( HB_IS_INTEGER( pItem ) )
|
||||
{
|
||||
#if -HB_INT_MAX > HB_INT_MIN
|
||||
if( pItem->item.asInteger.value < -HB_INT_MAX )
|
||||
#if -HB_VMINT_MAX > HB_VMINT_MIN
|
||||
if( pItem->item.asInteger.value < -HB_VMINT_MAX )
|
||||
{
|
||||
#if HB_LONG_MAX > HB_INT_MAX
|
||||
#if HB_VMLONG_MAX > HB_VMINT_MAX
|
||||
HB_MAXINT lValue = ( HB_MAXINT ) pItem->item.asInteger.value;
|
||||
pItem->type = HB_IT_LONG;
|
||||
pItem->item.asLong.value = -lValue;
|
||||
@@ -3028,8 +3028,8 @@ static void hb_vmNegate( void )
|
||||
}
|
||||
else if( HB_IS_LONG( pItem ) )
|
||||
{
|
||||
#if -HB_LONG_MAX > HB_LONG_MIN
|
||||
if( pItem->item.asLong.value < -HB_LONG_MAX )
|
||||
#if -HB_VMLONG_MAX > HB_VMLONG_MIN
|
||||
if( pItem->item.asLong.value < -HB_VMLONG_MAX )
|
||||
{
|
||||
double dValue = ( double ) pItem->item.asLong.value;
|
||||
pItem->type = HB_IT_DOUBLE;
|
||||
@@ -3351,8 +3351,8 @@ static void hb_vmMult( HB_ITEM_PTR pResult, HB_ITEM_PTR pItem1, HB_ITEM_PTR pIte
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_vmMult(%p,%p,%p)", pResult, pItem1, pItem2));
|
||||
|
||||
#if HB_LONG_MAX / HB_INT_MAX >= HB_INT_MAX && \
|
||||
HB_LONG_MIN / HB_INT_MIN >= HB_INT_MIN && 1
|
||||
#if HB_VMLONG_MAX / HB_VMINT_MAX >= HB_VMINT_MAX && \
|
||||
HB_VMLONG_MIN / HB_VMINT_MIN >= -HB_VMINT_MIN && 1
|
||||
if( HB_IS_INTEGER( pItem1 ) && HB_IS_INTEGER( pItem2 ) )
|
||||
{
|
||||
HB_MAXINT lResult = ( HB_MAXINT ) pItem1->item.asInteger.value *
|
||||
@@ -3535,7 +3535,7 @@ static void hb_vmInc( PHB_ITEM pItem )
|
||||
{
|
||||
if( HB_IS_INTEGER( pItem ) )
|
||||
{
|
||||
if( pItem->item.asInteger.value < HB_INT_MAX )
|
||||
if( pItem->item.asInteger.value < HB_VMINT_MAX )
|
||||
{
|
||||
pItem->type = HB_IT_INTEGER;
|
||||
pItem->item.asInteger.value++;
|
||||
@@ -3543,7 +3543,7 @@ static void hb_vmInc( PHB_ITEM pItem )
|
||||
}
|
||||
else
|
||||
{
|
||||
#if HB_INT_MAX < HB_LONG_MAX
|
||||
#if HB_VMINT_MAX < HB_VMLONG_MAX
|
||||
pItem->type = HB_IT_LONG;
|
||||
pItem->item.asLong.value = ( HB_MAXINT ) pItem->item.asInteger.value + 1;
|
||||
pItem->item.asLong.length = HB_LONG_EXPLENGTH( pItem->item.asLong.value );
|
||||
@@ -3555,7 +3555,7 @@ static void hb_vmInc( PHB_ITEM pItem )
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if( pItem->item.asLong.value < HB_LONG_MAX )
|
||||
else if( pItem->item.asLong.value < HB_VMLONG_MAX )
|
||||
{
|
||||
pItem->type = HB_IT_LONG;
|
||||
pItem->item.asLong.value++;
|
||||
@@ -3600,7 +3600,7 @@ static void hb_vmDec( PHB_ITEM pItem )
|
||||
{
|
||||
if( HB_IS_INTEGER( pItem ) )
|
||||
{
|
||||
if( pItem->item.asInteger.value > HB_INT_MIN )
|
||||
if( pItem->item.asInteger.value > HB_VMINT_MIN )
|
||||
{
|
||||
pItem->type = HB_IT_INTEGER;
|
||||
pItem->item.asInteger.value--;
|
||||
@@ -3608,7 +3608,7 @@ static void hb_vmDec( PHB_ITEM pItem )
|
||||
}
|
||||
else
|
||||
{
|
||||
#if HB_INT_MIN > HB_LONG_MIN
|
||||
#if HB_VMINT_MIN > HB_VMLONG_MIN
|
||||
pItem->type = HB_IT_LONG;
|
||||
pItem->item.asLong.value = ( HB_MAXINT ) pItem->item.asInteger.value - 1;
|
||||
pItem->item.asLong.length = HB_LONG_EXPLENGTH( pItem->item.asLong.value );
|
||||
@@ -3620,7 +3620,7 @@ static void hb_vmDec( PHB_ITEM pItem )
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if( pItem->item.asLong.value > HB_LONG_MIN )
|
||||
else if( pItem->item.asLong.value > HB_VMLONG_MIN )
|
||||
{
|
||||
pItem->type = HB_IT_LONG;
|
||||
pItem->item.asLong.value--;
|
||||
@@ -6598,7 +6598,7 @@ void hb_vmPushInteger( int iNumber )
|
||||
pItem->item.asInteger.length = HB_INT_LENGTH( iNumber );
|
||||
}
|
||||
|
||||
#if HB_INT_MAX >= INT32_MAX
|
||||
#if HB_VMINT_MAX >= INT32_MAX
|
||||
static void hb_vmPushIntegerConst( int iNumber )
|
||||
{
|
||||
HB_STACK_TLS_PRELOAD
|
||||
|
||||
@@ -976,7 +976,7 @@ PHB_ITEM hb_itemPutNLL( PHB_ITEM pItem, HB_LONGLONG llNumber )
|
||||
else
|
||||
pItem = hb_itemNew( NULL );
|
||||
|
||||
#if HB_LONG_MAX >= LONGLONG_MAX
|
||||
#if HB_VMLONG_MAX >= LONGLONG_MAX
|
||||
pItem->type = HB_IT_LONG;
|
||||
pItem->item.asLong.value = ( HB_MAXINT ) llNumber;
|
||||
pItem->item.asLong.length = HB_LONG_LENGTH( llNumber );
|
||||
@@ -1181,7 +1181,7 @@ PHB_ITEM hb_itemPutNLLen( PHB_ITEM pItem, long lNumber, int iWidth )
|
||||
else
|
||||
pItem = hb_itemNew( NULL );
|
||||
|
||||
#if HB_INT_MAX == LONG_MAX
|
||||
#if HB_VMINT_MAX == LONG_MAX
|
||||
if( iWidth <= 0 || iWidth > 99 )
|
||||
iWidth = HB_INT_LENGTH( lNumber );
|
||||
|
||||
@@ -1213,7 +1213,7 @@ PHB_ITEM hb_itemPutNLLLen( PHB_ITEM pItem, HB_LONGLONG llNumber, int iWidth )
|
||||
else
|
||||
pItem = hb_itemNew( NULL );
|
||||
|
||||
#if HB_LONG_MAX >= LONGLONG_MAX
|
||||
#if HB_VMLONG_MAX >= LONGLONG_MAX
|
||||
if( iWidth <= 0 || iWidth > 99 )
|
||||
iWidth = HB_LONG_LENGTH( llNumber );
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
#define HB_TASK_STACK_MIN 16384
|
||||
#define HB_TASK_STACK_ALIGN 16
|
||||
#define HB_TASK_NO_DELAY 0
|
||||
#define HB_TASK_INFINITE_DELAY HB_LONG_MAX
|
||||
#define HB_TASK_INFINITE_DELAY HB_VMLONG_MAX
|
||||
|
||||
|
||||
#undef HB_TASK_STACK_INIT
|
||||
|
||||
Reference in New Issue
Block a user