2010-02-07 17:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/hvm.c
* src/rdd/dbfntx/dbfntx1.c
* src/rdd/dbfnsx/dbfnsx1.c
* src/rdd/dbfcdx/dbfcdx1.c
* src/rdd/dbf1.c
* src/rdd/usrrdd/usrrdd.c
* src/rdd/dbffpt/dbffpt1.c
* src/rdd/hbsix/sxcompr.c
* src/compiler/hbfix.c
* src/compiler/hbopt.c
* tests/bldtest/bldtest.c
* include/hbrddnsx.h
* include/hbxvm.h
* include/hbdefs.h
* include/hbapi.h
* include/hbrddntx.h
* include/hbrddcdx.h
* contrib/hbbmcdx/bmdbfcdx.c
* contrib/hbbmcdx/hbbmcdx.h
* SHORT -> HB_SHORT.
(in some places 'short' is used, these should be synced, noticed
it in RDD)
This commit is contained in:
@@ -17,6 +17,30 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-02-07 17:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/vm/hvm.c
|
||||
* src/rdd/dbfntx/dbfntx1.c
|
||||
* src/rdd/dbfnsx/dbfnsx1.c
|
||||
* src/rdd/dbfcdx/dbfcdx1.c
|
||||
* src/rdd/dbf1.c
|
||||
* src/rdd/usrrdd/usrrdd.c
|
||||
* src/rdd/dbffpt/dbffpt1.c
|
||||
* src/rdd/hbsix/sxcompr.c
|
||||
* src/compiler/hbfix.c
|
||||
* src/compiler/hbopt.c
|
||||
* tests/bldtest/bldtest.c
|
||||
* include/hbrddnsx.h
|
||||
* include/hbxvm.h
|
||||
* include/hbdefs.h
|
||||
* include/hbapi.h
|
||||
* include/hbrddntx.h
|
||||
* include/hbrddcdx.h
|
||||
* contrib/hbbmcdx/bmdbfcdx.c
|
||||
* contrib/hbbmcdx/hbbmcdx.h
|
||||
* SHORT -> HB_SHORT.
|
||||
(in some places 'short' is used, these should be synced, noticed
|
||||
it in RDD)
|
||||
|
||||
2010-02-07 07:46 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
|
||||
* contrib/hbqt/hbqt_hbqplaintextedit.h
|
||||
|
||||
@@ -340,8 +340,8 @@ static CDXDBGTIME hb_cdxGetTime()
|
||||
#ifdef HB_CDX_DBGUPDT
|
||||
static ULONG cdxWriteNO = 0;
|
||||
static ULONG cdxReadNO = 0;
|
||||
static SHORT cdxStackSize = 0;
|
||||
static SHORT cdxTmpStackSize = 0;
|
||||
static HB_SHORT cdxStackSize = 0;
|
||||
static HB_SHORT cdxTmpStackSize = 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -1712,7 +1712,7 @@ static ULONG hb_cdxPageGetKeyPage( LPCDXPAGE pPage, int iKey )
|
||||
/*
|
||||
* get number of duplicated keys from key in leaf index page
|
||||
*/
|
||||
static SHORT hb_cdxPageGetKeyTrl( LPCDXPAGE pPage, SHORT iKey )
|
||||
static HB_SHORT hb_cdxPageGetKeyTrl( LPCDXPAGE pPage, HB_SHORT iKey )
|
||||
{
|
||||
#ifdef HB_CDX_DBGCODE_EXT
|
||||
if( iKey < 0 || iKey >= pPage->iKeys )
|
||||
|
||||
@@ -287,12 +287,12 @@ typedef struct _CDXPAGE
|
||||
CDXINTNODE intNode;
|
||||
} node;
|
||||
BYTE bufKeyVal[ CDX_MAXKEY ]; /* buffer for leaf key val or added branch key */
|
||||
SHORT bufKeyNum; /* do not change these vars' order */
|
||||
SHORT bufKeyPos; /* they have to be just after the node */
|
||||
SHORT bufKeyLen; /* and maybe temporary overwriten when adding */
|
||||
SHORT iFree; /* new key to interior node record. */
|
||||
HB_SHORT bufKeyNum; /* do not change these vars' order */
|
||||
HB_SHORT bufKeyPos; /* they have to be just after the node */
|
||||
HB_SHORT bufKeyLen; /* and maybe temporary overwriten when adding */
|
||||
HB_SHORT iFree; /* new key to interior node record. */
|
||||
BYTE * pKeyBuf; /* pointer to uncompressed leaf page key pool */
|
||||
/* SHORT iKeyInBuf; */
|
||||
/* HB_SHORT iKeyInBuf; */
|
||||
|
||||
struct _CDXPAGE * Owner;
|
||||
struct _CDXPAGE * Child;
|
||||
|
||||
@@ -442,7 +442,7 @@ typedef struct _HB_CODEBLOCK
|
||||
PHB_ITEM pLocals; /* table with referenced local variables */
|
||||
void * pStatics; /* STATICs base frame */
|
||||
USHORT uiLocals; /* number of referenced local variables */
|
||||
SHORT dynBuffer; /* is pcode buffer allocated dynamically, SHORT used instead of HB_BOOL intentionally to force optimal alignment */
|
||||
HB_SHORT dynBuffer; /* is pcode buffer allocated dynamically, SHORT used instead of HB_BOOL intentionally to force optimal alignment */
|
||||
} HB_CODEBLOCK, * PHB_CODEBLOCK, * HB_CODEBLOCK_PTR;
|
||||
|
||||
typedef void ( * HB_EXTREF_FUNC0 )( void * );
|
||||
|
||||
@@ -732,7 +732,7 @@ typedef HB_U32 HB_FATTR;
|
||||
#define HB_UHBYTE( w ) ( ( BYTE ) ( ( ( w ) >> 24 ) & 0xFF ) )
|
||||
#define HB_LOWORD( l ) ( ( HB_U16 ) ( l ) )
|
||||
#define HB_HIWORD( l ) ( ( HB_U16 ) ( ( ( l ) >> 16 ) & 0xFFFF ) )
|
||||
#define HB_MKSHORT( lo, hi ) ( ( SHORT ) ( ( ( HB_I16 ) ( hi ) ) << 8 ) | ( lo ) )
|
||||
#define HB_MKSHORT( lo, hi ) ( ( HB_SHORT ) ( ( ( HB_I16 ) ( hi ) ) << 8 ) | ( lo ) )
|
||||
#define HB_MKUSHORT( lo, hi ) ( ( USHORT ) ( ( ( HB_U16 ) ( hi ) ) << 8 ) | ( lo ) )
|
||||
#define HB_MKLONG( b1, b2, b3, b4 ) ( ( LONG ) \
|
||||
( ( ( ( HB_I32 ) ( b4 ) ) << 24 ) | \
|
||||
@@ -1443,7 +1443,7 @@ typedef HB_U32 HB_FATTR;
|
||||
#define HB_GET_LE_INT32( p ) (( HB_I32 ) HB_GET_LE_UINT32( p ))
|
||||
#define HB_GET_LE_INT64( p ) (( HB_I64 ) HB_GET_LE_UINT64( p ))
|
||||
|
||||
#define HB_PCODE_MKSHORT( p ) (( SHORT ) HB_GET_LE_INT16( p ))
|
||||
#define HB_PCODE_MKSHORT( p ) (( HB_SHORT ) HB_GET_LE_INT16( p ))
|
||||
#define HB_PCODE_MKUSHORT( p ) (( USHORT ) HB_GET_LE_UINT16( p ))
|
||||
#define HB_PCODE_MKLONG( p ) (( LONG ) HB_GET_LE_INT32( p ))
|
||||
#define HB_PCODE_MKULONG( p ) (( ULONG ) HB_GET_LE_UINT32( p ))
|
||||
@@ -1618,7 +1618,7 @@ HB_EXTERN_BEGIN
|
||||
typedef PHB_FUNC HB_FUNC_PTR;
|
||||
HB_EXTERN_END
|
||||
|
||||
typedef SHORT HB_SYMBOLSCOPE; /* stores symbol's scope */
|
||||
typedef HB_SHORT HB_SYMBOLSCOPE; /* stores symbol's scope */
|
||||
|
||||
typedef unsigned char HB_ATTR;
|
||||
typedef int HB_COLOR;
|
||||
|
||||
@@ -282,12 +282,12 @@ typedef struct _CDXPAGE
|
||||
CDXINTNODE intNode;
|
||||
} node;
|
||||
BYTE bufKeyVal[ CDX_MAXKEY ]; /* buffer for leaf key val or added branch key */
|
||||
SHORT bufKeyNum; /* do not change these vars' order */
|
||||
SHORT bufKeyPos; /* they have to be just after the node */
|
||||
SHORT bufKeyLen; /* and maybe temporary overwriten when adding */
|
||||
SHORT iFree; /* new key to interior node record. */
|
||||
HB_SHORT bufKeyNum; /* do not change these vars' order */
|
||||
HB_SHORT bufKeyPos; /* they have to be just after the node */
|
||||
HB_SHORT bufKeyLen; /* and maybe temporary overwriten when adding */
|
||||
HB_SHORT iFree; /* new key to interior node record. */
|
||||
BYTE * pKeyBuf; /* pointer to uncompressed leaf page key pool */
|
||||
/* SHORT iKeyInBuf; */
|
||||
/* HB_SHORT iKeyInBuf; */
|
||||
|
||||
struct _CDXPAGE * Owner;
|
||||
struct _CDXPAGE * Child;
|
||||
|
||||
@@ -368,7 +368,7 @@ typedef KEYINFO * LPKEYINFO;
|
||||
typedef struct _TREE_STACK
|
||||
{
|
||||
ULONG page;
|
||||
SHORT ikey;
|
||||
HB_SHORT ikey;
|
||||
HB_UCHAR * value;
|
||||
} TREE_STACK;
|
||||
typedef TREE_STACK * LPTREESTACK;
|
||||
|
||||
@@ -174,7 +174,7 @@ typedef KEYINFO * LPKEYINFO;
|
||||
typedef struct _TREE_STACK
|
||||
{
|
||||
ULONG page;
|
||||
SHORT ikey;
|
||||
HB_SHORT ikey;
|
||||
} TREE_STACK;
|
||||
typedef TREE_STACK * LPTREESTACK;
|
||||
|
||||
|
||||
@@ -118,9 +118,9 @@ extern HB_EXPORT void hb_xvmPushBlockShort( const BYTE * pCode, PHB_SYMB pSym
|
||||
extern HB_EXPORT void hb_xvmPushBlockLarge( const BYTE * pCode, PHB_SYMB pSymbols ); /* creates a codeblock */
|
||||
extern HB_EXPORT void hb_xvmPushSelf( void );
|
||||
extern HB_EXPORT void hb_xvmPushVParams( void );
|
||||
extern HB_EXPORT void hb_xvmPushLocal( SHORT iLocal ); /* pushes the containts of a local onto the stack */
|
||||
extern HB_EXPORT void hb_xvmPushLocalByRef( SHORT iLocal ); /* pushes a local by refrence onto the stack */
|
||||
extern HB_EXPORT void hb_xvmPopLocal( SHORT iLocal ); /* pops the stack latest value onto a local */
|
||||
extern HB_EXPORT void hb_xvmPushLocal( HB_SHORT iLocal ); /* pushes the containts of a local onto the stack */
|
||||
extern HB_EXPORT void hb_xvmPushLocalByRef( HB_SHORT iLocal ); /* pushes a local by refrence onto the stack */
|
||||
extern HB_EXPORT void hb_xvmPopLocal( HB_SHORT iLocal ); /* pops the stack latest value onto a local */
|
||||
extern HB_EXPORT HB_BOOL hb_xvmPushField( PHB_SYMB pSymbol );
|
||||
extern HB_EXPORT HB_BOOL hb_xvmPopField( PHB_SYMB pSymbol );
|
||||
extern HB_EXPORT HB_BOOL hb_xvmPushMemvar( PHB_SYMB pSymbol );
|
||||
|
||||
@@ -117,7 +117,7 @@ static HB_FIX_FUNC( hb_p_pushblocklarge )
|
||||
static HB_FIX_FUNC( hb_p_localfix )
|
||||
{
|
||||
BYTE * pVar = &pFunc->pCode[ lPCodePos + 1 ];
|
||||
SHORT iVar = HB_PCODE_MKSHORT( pVar );
|
||||
HB_SHORT iVar = HB_PCODE_MKSHORT( pVar );
|
||||
|
||||
HB_SYMBOL_UNUSED( cargo );
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef HB_OPT_FUNC_ * HB_OPT_FUNC_PTR;
|
||||
static HB_OPT_FUNC( hb_p_poplocal )
|
||||
{
|
||||
BYTE * pVar = &pFunc->pCode[ lPCodePos + 1 ];
|
||||
SHORT iVar = HB_PCODE_MKSHORT( pVar );
|
||||
HB_SHORT iVar = HB_PCODE_MKSHORT( pVar );
|
||||
|
||||
HB_SYMBOL_UNUSED( cargo );
|
||||
|
||||
@@ -78,7 +78,7 @@ static HB_OPT_FUNC( hb_p_poplocal )
|
||||
static HB_OPT_FUNC( hb_p_pushlocal )
|
||||
{
|
||||
BYTE * pVar = &pFunc->pCode[ lPCodePos + 1 ];
|
||||
SHORT iVar = HB_PCODE_MKSHORT( pVar );
|
||||
HB_SHORT iVar = HB_PCODE_MKSHORT( pVar );
|
||||
|
||||
HB_SYMBOL_UNUSED( cargo );
|
||||
|
||||
@@ -137,7 +137,7 @@ static HB_OPT_FUNC( hb_p_pushlocalnear )
|
||||
static HB_OPT_FUNC( hb_p_localaddint )
|
||||
{
|
||||
BYTE * pVar = &pFunc->pCode[ lPCodePos + 1 ];
|
||||
SHORT iVar = HB_PCODE_MKSHORT( pVar );
|
||||
HB_SHORT iVar = HB_PCODE_MKSHORT( pVar );
|
||||
|
||||
HB_SYMBOL_UNUSED( cargo );
|
||||
|
||||
@@ -951,7 +951,7 @@ void hb_compOptimizePCode( HB_COMP_DECL, PFUNCTION pFunc )
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SHORT isNumber;
|
||||
HB_SHORT isNumber;
|
||||
BYTE bFlags;
|
||||
} HB_OPT_LOCAL, * PHB_OPT_LOCAL;
|
||||
|
||||
@@ -973,7 +973,7 @@ static HB_BOOL hb_compIsUncondJump( BYTE bPCode )
|
||||
}
|
||||
|
||||
/*
|
||||
static SHORT hb_compIsLocalOp( BYTE bCode )
|
||||
static HB_SHORT hb_compIsLocalOp( BYTE bCode )
|
||||
{
|
||||
return bCode == HB_P_POPLOCAL ||
|
||||
bCode == HB_P_POPLOCALNEAR ||
|
||||
@@ -988,7 +988,7 @@ static SHORT hb_compIsLocalOp( BYTE bCode )
|
||||
}
|
||||
*/
|
||||
|
||||
static SHORT hb_compLocalGetNumber( BYTE* pCode )
|
||||
static HB_SHORT hb_compLocalGetNumber( BYTE* pCode )
|
||||
{
|
||||
switch( *pCode )
|
||||
{
|
||||
@@ -1041,9 +1041,9 @@ static LONG hb_compJumpGetOffset( BYTE * pCode )
|
||||
|
||||
static void hb_compPCodeEnumScanLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLocals )
|
||||
{
|
||||
ULONG ulPos = 0, ulLastPos = 0;
|
||||
SHORT isVar = 0;
|
||||
HB_BOOL fWasJump = 0;
|
||||
ULONG ulPos = 0, ulLastPos = 0;
|
||||
HB_SHORT isVar = 0;
|
||||
HB_BOOL fWasJump = 0;
|
||||
|
||||
while( ulPos < pFunc->lPCodePos )
|
||||
{
|
||||
@@ -1195,7 +1195,7 @@ static void hb_compPCodeEnumScanLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLocals )
|
||||
}
|
||||
|
||||
|
||||
static void hb_compPCodeEnumSelfifyLocal( PFUNCTION pFunc, SHORT isLocal )
|
||||
static void hb_compPCodeEnumSelfifyLocal( PFUNCTION pFunc, HB_SHORT isLocal )
|
||||
{
|
||||
ULONG ulPos = 0, ulLastPos = 0;
|
||||
|
||||
@@ -1247,7 +1247,7 @@ static void hb_compPCodeEnumSelfifyLocal( PFUNCTION pFunc, SHORT isLocal )
|
||||
}
|
||||
|
||||
|
||||
static int hb_compPCodeTraceAssignedUnused( PFUNCTION pFunc, ULONG ulPos, BYTE * pMap, SHORT isLocal )
|
||||
static int hb_compPCodeTraceAssignedUnused( PFUNCTION pFunc, ULONG ulPos, BYTE * pMap, HB_SHORT isLocal )
|
||||
{
|
||||
for( ;; )
|
||||
{
|
||||
@@ -1323,10 +1323,10 @@ static int hb_compPCodeTraceAssignedUnused( PFUNCTION pFunc, ULONG ulPos, BYTE *
|
||||
|
||||
static void hb_compPCodeEnumAssignedUnused( HB_COMP_DECL, PFUNCTION pFunc, PHB_OPT_LOCAL pLocals )
|
||||
{
|
||||
BYTE * pMap;
|
||||
ULONG ulPos = 0, ulLastPos = 0;
|
||||
SHORT isLocal;
|
||||
USHORT usLine = 0;
|
||||
BYTE * pMap;
|
||||
ULONG ulPos = 0, ulLastPos = 0;
|
||||
HB_SHORT isLocal;
|
||||
USHORT usLine = 0;
|
||||
|
||||
pMap = ( BYTE * ) hb_xgrab( pFunc->lPCodePos );
|
||||
|
||||
@@ -1398,8 +1398,8 @@ static void hb_compPCodeEnumAssignedUnused( HB_COMP_DECL, PFUNCTION pFunc, PHB_O
|
||||
|
||||
if( fCheck && ( isLocal = hb_compLocalGetNumber( &pFunc->pCode[ ulPos ] ) ) > pFunc->wParamCount )
|
||||
{
|
||||
PVAR pVar = pFunc->pLocals;
|
||||
SHORT is;
|
||||
PVAR pVar = pFunc->pLocals;
|
||||
HB_SHORT is;
|
||||
|
||||
for( is = 1; is < isLocal; is++ )
|
||||
pVar = pVar->pNext;
|
||||
@@ -1455,8 +1455,8 @@ static void hb_compPCodeEnumRenumberLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLoca
|
||||
case HB_P_PUSHLOCALNEAR:
|
||||
case HB_P_LOCALNEARADDINT:
|
||||
{
|
||||
BYTE * pVar = &pFunc->pCode[ ulPos + 1 ];
|
||||
SHORT isVar = ( signed char ) pVar[ 0 ];
|
||||
BYTE * pVar = &pFunc->pCode[ ulPos + 1 ];
|
||||
HB_SHORT isVar = ( signed char ) pVar[ 0 ];
|
||||
|
||||
if( isVar > 0 && pLocals[ isVar - 1 ].isNumber != isVar )
|
||||
{
|
||||
@@ -1483,8 +1483,8 @@ static void hb_compPCodeEnumRenumberLocals( PFUNCTION pFunc, PHB_OPT_LOCAL pLoca
|
||||
case HB_P_LOCALINC:
|
||||
case HB_P_LOCALINCPUSH:
|
||||
{
|
||||
BYTE * pVar = &pFunc->pCode[ ulPos + 1 ];
|
||||
SHORT isVar = HB_PCODE_MKSHORT( pVar );
|
||||
BYTE * pVar = &pFunc->pCode[ ulPos + 1 ];
|
||||
HB_SHORT isVar = HB_PCODE_MKSHORT( pVar );
|
||||
|
||||
if( isVar > 0 && pLocals[ isVar - 1 ].isNumber != isVar )
|
||||
{
|
||||
|
||||
@@ -990,7 +990,7 @@ void hb_dbfPutMemoBlock( DBFAREAP pArea, USHORT uiIndex, ULONG ulBlock )
|
||||
}
|
||||
else
|
||||
{
|
||||
SHORT iCount;
|
||||
HB_SHORT iCount;
|
||||
|
||||
for( iCount = 9; iCount >= 0; iCount-- )
|
||||
{
|
||||
@@ -1111,7 +1111,7 @@ HB_ERRCODE hb_dbfSetMemoData( DBFAREAP pArea, USHORT uiIndex,
|
||||
}
|
||||
else
|
||||
{
|
||||
SHORT iCount;
|
||||
HB_SHORT iCount;
|
||||
|
||||
for( iCount = 9; iCount >= 0; iCount-- )
|
||||
{
|
||||
|
||||
@@ -166,8 +166,8 @@ static CDXDBGTIME hb_cdxGetTime()
|
||||
#ifdef HB_CDX_DBGUPDT
|
||||
static ULONG cdxWriteNO = 0;
|
||||
static ULONG cdxReadNO = 0;
|
||||
static SHORT cdxStackSize = 0;
|
||||
static SHORT cdxTmpStackSize = 0;
|
||||
static HB_SHORT cdxStackSize = 0;
|
||||
static HB_SHORT cdxTmpStackSize = 0;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1570,7 +1570,7 @@ static ULONG hb_cdxPageGetKeyPage( LPCDXPAGE pPage, int iKey )
|
||||
/*
|
||||
* get number of duplicated keys from key in leaf index page
|
||||
*/
|
||||
static SHORT hb_cdxPageGetKeyTrl( LPCDXPAGE pPage, SHORT iKey )
|
||||
static HB_SHORT hb_cdxPageGetKeyTrl( LPCDXPAGE pPage, HB_SHORT iKey )
|
||||
{
|
||||
#ifdef HB_CDX_DBGCODE_EXT
|
||||
if( iKey < 0 || iKey >= pPage->iKeys )
|
||||
|
||||
@@ -1563,7 +1563,7 @@ static ULONG hb_fptCountSixItemLength( FPTAREAP pArea, PHB_ITEM pItem,
|
||||
ulLen = hb_arrayLen( pItem );
|
||||
if( pArea->uiMemoVersion == DB_MEMOVER_SIX )
|
||||
{
|
||||
/* only 2 bytes (SHORT) for SIX compatibility */
|
||||
/* only 2 bytes (HB_SHORT) for SIX compatibility */
|
||||
ulLen = HB_MIN( ulLen, 0xFFFF );
|
||||
}
|
||||
for( u = 1; u <= ulLen; u++ )
|
||||
@@ -1575,7 +1575,7 @@ static ULONG hb_fptCountSixItemLength( FPTAREAP pArea, PHB_ITEM pItem,
|
||||
case HB_IT_STRING:
|
||||
ulSize = SIX_ITEM_BUFSIZE;
|
||||
ulLen = hb_itemGetCLen( pItem );
|
||||
/* only 2 bytes (SHORT) for SIX compatibility */
|
||||
/* only 2 bytes (HB_SHORT) for SIX compatibility */
|
||||
u = pArea->uiMemoVersion == DB_MEMOVER_SIX ? 0xFFFF : ULONG_MAX;
|
||||
if( fTrans && ulLen > 0 )
|
||||
{
|
||||
@@ -1621,7 +1621,7 @@ static ULONG hb_fptStoreSixItem( FPTAREAP pArea, PHB_ITEM pItem, BYTE ** bBufPtr
|
||||
ulLen = hb_arrayLen( pItem );
|
||||
if( pArea->uiMemoVersion == DB_MEMOVER_SIX )
|
||||
{
|
||||
/* only 2 bytes (SHORT) for SIX compatibility */
|
||||
/* only 2 bytes (HB_SHORT) for SIX compatibility */
|
||||
ulLen = HB_MIN( ulLen, 0xFFFF );
|
||||
}
|
||||
HB_PUT_LE_UINT32( &(*bBufPtr)[2], ulLen );
|
||||
@@ -1684,7 +1684,7 @@ static ULONG hb_fptStoreSixItem( FPTAREAP pArea, PHB_ITEM pItem, BYTE ** bBufPtr
|
||||
ulLen = hb_itemGetCLen( pItem );
|
||||
if( ulLen > 0 )
|
||||
{
|
||||
/* only 2 bytes (SHORT) for SIX compatibility */
|
||||
/* only 2 bytes (HB_SHORT) for SIX compatibility */
|
||||
u = pArea->uiMemoVersion == DB_MEMOVER_SIX ? 0xFFFF : ULONG_MAX;
|
||||
if( fTrans )
|
||||
{
|
||||
@@ -1748,7 +1748,7 @@ static HB_ERRCODE hb_fptReadSixItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE * b
|
||||
ulLen = HB_GET_LE_UINT32( &(*pbMemoBuf)[2] );
|
||||
if( pArea->uiMemoVersion == DB_MEMOVER_SIX )
|
||||
{
|
||||
ulLen &= 0xFFFF; /* only 2 bytes (SHORT) for SIX compatibility */
|
||||
ulLen &= 0xFFFF; /* only 2 bytes (HB_SHORT) for SIX compatibility */
|
||||
}
|
||||
(*pbMemoBuf) += SIX_ITEM_BUFSIZE;
|
||||
if( bBufEnd - (*pbMemoBuf) >= ( LONG ) ulLen )
|
||||
@@ -1777,7 +1777,7 @@ static HB_ERRCODE hb_fptReadSixItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE * b
|
||||
ulLen = HB_GET_LE_UINT32( &(*pbMemoBuf)[2] );
|
||||
if( pArea->uiMemoVersion == DB_MEMOVER_SIX )
|
||||
{
|
||||
ulLen &= 0xFFFF; /* only 2 bytes (SHORT) for SIX compatibility */
|
||||
ulLen &= 0xFFFF; /* only 2 bytes (HB_SHORT) for SIX compatibility */
|
||||
}
|
||||
(*pbMemoBuf) += SIX_ITEM_BUFSIZE;
|
||||
hb_arrayNew( pItem, ulLen );
|
||||
@@ -2117,7 +2117,7 @@ static HB_ERRCODE hb_fptReadFlexItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE *
|
||||
case FPTIT_FLEXAR_SHORT:
|
||||
if( bBufEnd - (*pbMemoBuf) >= 2 )
|
||||
{
|
||||
hb_itemPutNI( pItem, ( SHORT ) HB_GET_LE_UINT16( *pbMemoBuf ) );
|
||||
hb_itemPutNI( pItem, ( HB_SHORT ) HB_GET_LE_UINT16( *pbMemoBuf ) );
|
||||
*pbMemoBuf += 2;
|
||||
}
|
||||
else
|
||||
@@ -2128,7 +2128,7 @@ static HB_ERRCODE hb_fptReadFlexItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE *
|
||||
case FPTIT_FLEXAR_SHORT1:
|
||||
if( bBufEnd - (*pbMemoBuf) >= 3 )
|
||||
{
|
||||
hb_itemPutNILen( pItem, ( SHORT ) HB_GET_LE_UINT16( *pbMemoBuf ),
|
||||
hb_itemPutNILen( pItem, ( HB_SHORT ) HB_GET_LE_UINT16( *pbMemoBuf ),
|
||||
(*pbMemoBuf)[2] );
|
||||
*pbMemoBuf += 3;
|
||||
}
|
||||
@@ -2144,11 +2144,11 @@ static HB_ERRCODE hb_fptReadFlexItem( FPTAREAP pArea, BYTE ** pbMemoBuf, BYTE *
|
||||
if( iDec )
|
||||
{
|
||||
iLen -= iDec + 1;
|
||||
hb_itemPutNDLen( pItem, ( SHORT ) HB_GET_LE_UINT16( *pbMemoBuf ), iLen, iDec );
|
||||
hb_itemPutNDLen( pItem, ( HB_SHORT ) HB_GET_LE_UINT16( *pbMemoBuf ), iLen, iDec );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_itemPutNILen( pItem, ( SHORT ) HB_GET_LE_UINT16( *pbMemoBuf ), iLen );
|
||||
hb_itemPutNILen( pItem, ( HB_SHORT ) HB_GET_LE_UINT16( *pbMemoBuf ), iLen );
|
||||
}
|
||||
*pbMemoBuf += 4;
|
||||
}
|
||||
|
||||
@@ -2696,7 +2696,7 @@ static HB_BOOL hb_nsxTagPrevKey( LPTAGINFO pTag )
|
||||
* find a key value in page
|
||||
*/
|
||||
static int hb_nsxPageKeyFind( LPTAGINFO pTag, LPPAGEINFO pPage,
|
||||
HB_UCHAR * key, SHORT keylen, int mode,
|
||||
HB_UCHAR * key, HB_SHORT keylen, int mode,
|
||||
HB_BOOL fLast, ULONG ulRecNo, HB_BOOL *fStop )
|
||||
{
|
||||
int iBegin, iEnd, iLast, k, i;
|
||||
|
||||
@@ -197,47 +197,47 @@ static void hb_ntxSetKeyCount( LPPAGEINFO pPage, USHORT uiKeys )
|
||||
HB_PUT_LE_UINT16( ptr, uiKeys );
|
||||
}
|
||||
|
||||
static USHORT hb_ntxGetKeyOffset( LPPAGEINFO pPage, SHORT iKey )
|
||||
static USHORT hb_ntxGetKeyOffset( LPPAGEINFO pPage, HB_SHORT iKey )
|
||||
{
|
||||
char * ptr = hb_ntxPageBuffer( pPage ) + 2 + ( iKey << 1 );
|
||||
return HB_GET_LE_UINT16( ptr );
|
||||
}
|
||||
|
||||
static void hb_ntxSetKeyOffset( LPPAGEINFO pPage, SHORT iKey, USHORT uiOffset )
|
||||
static void hb_ntxSetKeyOffset( LPPAGEINFO pPage, HB_SHORT iKey, USHORT uiOffset )
|
||||
{
|
||||
char * ptr = hb_ntxPageBuffer( pPage ) + 2 + ( iKey << 1 );
|
||||
HB_PUT_LE_UINT16( ptr, uiOffset );
|
||||
}
|
||||
|
||||
static char * hb_ntxGetKeyPtr( LPPAGEINFO pPage, SHORT iKey )
|
||||
static char * hb_ntxGetKeyPtr( LPPAGEINFO pPage, HB_SHORT iKey )
|
||||
{
|
||||
return hb_ntxPageBuffer( pPage ) + hb_ntxGetKeyOffset( pPage, iKey );
|
||||
}
|
||||
|
||||
static ULONG hb_ntxGetKeyPage( LPPAGEINFO pPage, SHORT iKey )
|
||||
static ULONG hb_ntxGetKeyPage( LPPAGEINFO pPage, HB_SHORT iKey )
|
||||
{
|
||||
char * ptr = hb_ntxGetKeyPtr( pPage, iKey );
|
||||
return HB_GET_LE_UINT32( ptr );
|
||||
}
|
||||
|
||||
static void hb_ntxSetKeyPage( LPPAGEINFO pPage, SHORT iKey, ULONG ulPage )
|
||||
static void hb_ntxSetKeyPage( LPPAGEINFO pPage, HB_SHORT iKey, ULONG ulPage )
|
||||
{
|
||||
char * ptr = hb_ntxGetKeyPtr( pPage, iKey );
|
||||
HB_PUT_LE_UINT32( ptr, ulPage );
|
||||
}
|
||||
|
||||
static char * hb_ntxGetKeyVal( LPPAGEINFO pPage, SHORT iKey )
|
||||
static char * hb_ntxGetKeyVal( LPPAGEINFO pPage, HB_SHORT iKey )
|
||||
{
|
||||
return hb_ntxGetKeyPtr( pPage, iKey ) + 8;
|
||||
}
|
||||
|
||||
static void hb_ntxSetKeyRec( LPPAGEINFO pPage, SHORT iKey, ULONG ulRec )
|
||||
static void hb_ntxSetKeyRec( LPPAGEINFO pPage, HB_SHORT iKey, ULONG ulRec )
|
||||
{
|
||||
char * ptr = hb_ntxGetKeyPtr( pPage, iKey ) + 4;
|
||||
HB_PUT_LE_UINT32( ptr, ulRec );
|
||||
}
|
||||
|
||||
static ULONG hb_ntxGetKeyRec( LPPAGEINFO pPage, SHORT iKey )
|
||||
static ULONG hb_ntxGetKeyRec( LPPAGEINFO pPage, HB_SHORT iKey )
|
||||
{
|
||||
char * ptr = hb_ntxGetKeyPtr( pPage, iKey ) + 4;
|
||||
return HB_GET_LE_UINT32( ptr );
|
||||
@@ -2479,10 +2479,10 @@ static HB_BOOL hb_ntxTagPrevKey( LPTAGINFO pTag )
|
||||
* find a key value in page
|
||||
*/
|
||||
static int hb_ntxPageKeyFind( LPTAGINFO pTag, LPPAGEINFO pPage,
|
||||
char* key, SHORT keylen, HB_BOOL fNext,
|
||||
char* key, HB_SHORT keylen, HB_BOOL fNext,
|
||||
ULONG ulRecNo, HB_BOOL *fStop )
|
||||
{
|
||||
SHORT iLast = -1, iBegin = 0, iEnd = pPage->uiKeys - 1, k, i;
|
||||
HB_SHORT iLast = -1, iBegin = 0, iEnd = pPage->uiKeys - 1, k, i;
|
||||
|
||||
*fStop = HB_FALSE;
|
||||
while( iBegin <= iEnd )
|
||||
@@ -6523,7 +6523,7 @@ static HB_ERRCODE hb_ntxOrderCreate( NTXAREAP pArea, LPDBORDERCREATEINFO pOrderI
|
||||
}
|
||||
}
|
||||
pTag = hb_ntxTagNew( pIndex, szTagName, fTagName,
|
||||
szKey, pKeyExp, bType, (USHORT) iLen, (USHORT) iDec,
|
||||
szKey, pKeyExp, bType, ( USHORT ) iLen, ( USHORT ) iDec,
|
||||
szFor, pForExp,
|
||||
fAscend, pOrderInfo->fUnique, fCustom, pData->fSortRecNo );
|
||||
pTag->Partial = ( pArea->dbfarea.area.lpdbOrdCondInfo && !pArea->dbfarea.area.lpdbOrdCondInfo->fAll );
|
||||
|
||||
@@ -192,11 +192,11 @@ typedef struct _HB_LZSSX_COMPR
|
||||
|
||||
HB_UCHAR ring_buffer[ RBUFLENGTH + MAXLENGTH - 1 ];
|
||||
|
||||
SHORT match_offset;
|
||||
SHORT match_length;
|
||||
SHORT parent[ RBUFLENGTH + 1 ];
|
||||
SHORT left [ RBUFLENGTH + 1 ];
|
||||
SHORT right [ RBUFLENGTH + 257 ];
|
||||
HB_SHORT match_offset;
|
||||
HB_SHORT match_length;
|
||||
HB_SHORT parent[ RBUFLENGTH + 1 ];
|
||||
HB_SHORT left [ RBUFLENGTH + 1 ];
|
||||
HB_SHORT right [ RBUFLENGTH + 257 ];
|
||||
}
|
||||
HB_LZSSX_COMPR;
|
||||
typedef HB_LZSSX_COMPR * PHB_LZSSX_COMPR;
|
||||
|
||||
@@ -900,7 +900,7 @@ static HB_ERRCODE hb_usrSysName( AREAP pArea, char * szSysName )
|
||||
}
|
||||
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 2 );
|
||||
|
||||
hb_strncpy( ( char * ) szSysName, hb_itemGetCPtr( hb_stackItemFromBase( lOffset ) ),
|
||||
@@ -965,7 +965,7 @@ static HB_ERRCODE hb_usrBof( AREAP pArea, HB_BOOL * pBof )
|
||||
return SUPER_BOF( pArea, pBof );
|
||||
}
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 2 );
|
||||
|
||||
if( hb_xvmPopLogical( pBof ) )
|
||||
@@ -992,7 +992,7 @@ static HB_ERRCODE hb_usrEof( AREAP pArea, HB_BOOL * pEof )
|
||||
return SUPER_EOF( pArea, pEof );
|
||||
}
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 2 );
|
||||
|
||||
if( hb_xvmPopLogical( pEof ) )
|
||||
@@ -1019,7 +1019,7 @@ static HB_ERRCODE hb_usrFound( AREAP pArea, HB_BOOL * pFound )
|
||||
return SUPER_FOUND( pArea, pFound );
|
||||
}
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 2 );
|
||||
|
||||
if( hb_xvmPopLogical( pFound ) )
|
||||
@@ -1163,7 +1163,7 @@ static HB_ERRCODE hb_usrDeleted( AREAP pArea, HB_BOOL * pDeleted )
|
||||
return SUPER_DELETED( pArea, pDeleted );
|
||||
}
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 2 );
|
||||
|
||||
if( hb_xvmPopLogical( pDeleted ) )
|
||||
@@ -1229,7 +1229,7 @@ static HB_ERRCODE hb_usrFieldName( AREAP pArea, USHORT uiIndex, char * szName )
|
||||
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_vmPushInteger( uiIndex );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 3 );
|
||||
|
||||
hb_strncpy( ( char * ) szName, hb_itemGetCPtr( hb_stackItemFromBase( lOffset ) ),
|
||||
@@ -1294,7 +1294,7 @@ static HB_ERRCODE hb_usrFieldCount( AREAP pArea, USHORT * puiFields )
|
||||
}
|
||||
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 2 );
|
||||
|
||||
* puiFields = hb_itemGetNI( hb_stackItemFromBase( lOffset ) );
|
||||
@@ -1372,7 +1372,7 @@ static HB_ERRCODE hb_usrGetRec( AREAP pArea, BYTE ** pBuffer )
|
||||
}
|
||||
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 2 );
|
||||
|
||||
pItem = hb_stackItemFromBase( lOffset );
|
||||
@@ -1431,7 +1431,7 @@ static HB_ERRCODE hb_usrGetVarLen( AREAP pArea, USHORT uiIndex, ULONG * pulLengt
|
||||
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_vmPushInteger( uiIndex );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 3 );
|
||||
|
||||
* pulLength = hb_itemGetNL( hb_stackItemFromBase( lOffset ) );
|
||||
@@ -1455,7 +1455,7 @@ static HB_ERRCODE hb_usrRecCount( AREAP pArea, ULONG * pulRecCount )
|
||||
}
|
||||
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 2 );
|
||||
|
||||
* pulRecCount = hb_itemGetNL( hb_stackItemFromBase( lOffset ) );
|
||||
@@ -1495,7 +1495,7 @@ static HB_ERRCODE hb_usrRecNo( AREAP pArea, ULONG * pulRecNo )
|
||||
}
|
||||
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 2 );
|
||||
|
||||
* pulRecNo = hb_itemGetNL( hb_stackItemFromBase( lOffset ) );
|
||||
@@ -1582,7 +1582,7 @@ static HB_ERRCODE hb_usrAlias( AREAP pArea, char * szAlias )
|
||||
}
|
||||
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 2 );
|
||||
|
||||
hb_strncpy( ( char * ) szAlias, hb_itemGetCPtr( hb_stackItemFromBase( lOffset ) ),
|
||||
@@ -1706,7 +1706,7 @@ static HB_ERRCODE hb_usrPackRec( AREAP pArea, ULONG ulRecNo, HB_BOOL * pWritten
|
||||
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_vmPushLong( ulRecNo );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 3 );
|
||||
|
||||
if( hb_xvmPopLogical( pWritten ) )
|
||||
@@ -1904,7 +1904,7 @@ static HB_ERRCODE hb_usrRelArea( AREAP pArea, USHORT uiRelNo, USHORT * puiRelAre
|
||||
|
||||
hb_vmPushInteger( pArea->uiArea );
|
||||
hb_vmPushInteger( uiRelNo );
|
||||
hb_xvmPushLocalByRef( ( SHORT ) lOffset );
|
||||
hb_xvmPushLocalByRef( ( HB_SHORT ) lOffset );
|
||||
hb_vmDo( 3 );
|
||||
|
||||
* puiRelArea = hb_itemGetNI( hb_stackItemFromBase( lOffset ) );
|
||||
|
||||
@@ -8988,21 +8988,21 @@ void hb_xvmParameter( PHB_SYMB pSymbol, int iParams )
|
||||
hb_memvarNewParameter( pSymbol, hb_stackItemFromBase( iParams ) );
|
||||
}
|
||||
|
||||
void hb_xvmPushLocal( SHORT iLocal )
|
||||
void hb_xvmPushLocal( HB_SHORT iLocal )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_xvmPushLocal(%hd)", iLocal));
|
||||
|
||||
hb_vmPushLocal( iLocal );
|
||||
}
|
||||
|
||||
void hb_xvmPushLocalByRef( SHORT iLocal )
|
||||
void hb_xvmPushLocalByRef( HB_SHORT iLocal )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_xvmPushLocalByRef(%hd)", iLocal));
|
||||
|
||||
hb_vmPushLocalByRef( iLocal );
|
||||
}
|
||||
|
||||
void hb_xvmPopLocal( SHORT iLocal )
|
||||
void hb_xvmPopLocal( HB_SHORT iLocal )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_xvmPopLocal(%hd)", iLocal));
|
||||
|
||||
|
||||
@@ -21,14 +21,15 @@ int main()
|
||||
printf("\t sizeof(long double)=%d\n", (int) sizeof(long double));
|
||||
|
||||
printf("\nHarbour types:\n");
|
||||
printf("\t sizeof(BYTE)=%d %s\n", (int) sizeof(BYTE ), sizeof(BYTE )==1 ? "OK" : "BAD" );
|
||||
printf("\t sizeof(SHORT)=%d %s\n", (int) sizeof(SHORT ), sizeof(SHORT )==2 ? "OK" : "BAD" );
|
||||
printf("\t sizeof(BYTE)=%d %s\n", (int) sizeof(BYTE ), sizeof(BYTE)==1 ? "OK" : "BAD" );
|
||||
printf("\t sizeof(HB_SHORT)=%d %s\n", (int) sizeof(HB_SHORT ), sizeof(HB_SHORT)==2 ? "OK" : "BAD" );
|
||||
printf("\t sizeof(HB_UINT)=%d %s\n", (int) sizeof(HB_UINT ), sizeof(HB_UINT)==4 || sizeof(HB_UINT)==8 ? "OK" : "BAD" );
|
||||
printf("\t sizeof(LONG)=%d %s\n", (int) sizeof(LONG ), sizeof(LONG)==4 || sizeof(LONG)==8 ? "OK" : "BAD" );
|
||||
printf("\tsizeof(HB_LONGLONG)=%d %s\n", (int) sizeof(HB_LONGLONG), sizeof(HB_LONGLONG)==8 ? "OK" : "BAD" );
|
||||
printf("\t sizeof(double)=%d %s\n", (int) sizeof(double ), sizeof(double )==8 ? "OK" : "BAD" );
|
||||
printf("\t sizeof(double)=%d %s\n", (int) sizeof(double ), sizeof(double)==8 ? "OK" : "BAD" );
|
||||
|
||||
if ( sizeof(BYTE)!=1 || sizeof(SHORT)!=2 ||
|
||||
if ( sizeof(BYTE)!=1 ||
|
||||
sizeof(HB_SHORT)!=2 ||
|
||||
(sizeof(LONG)!=4 && sizeof(LONG)!=8) ||
|
||||
(sizeof(HB_LONGLONG)!=4 && sizeof(HB_LONGLONG)!=8) ||
|
||||
sizeof(double)!=8 )
|
||||
|
||||
Reference in New Issue
Block a user