See ChangeLog Entry 19990604-17:00 EDT David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
1999-06-04 22:15:17 +00:00
parent 25daef225a
commit 04324fbce8
25 changed files with 510 additions and 479 deletions

View File

@@ -1,3 +1,33 @@
19990604-17:00 EDT David G. Holm <dholm@jsd-llc.com>
In each of the following modules, all occurrences of ITEM and PITEM
were changed to HB_ITEM and PHB_ITEM. Any additional changes are
listed following the applicable modules:
* include/ctoharb.h
* include/extend.h
- Also added #define ITEM PHB_ITEM
* include/itemapi.h
* source/rtl/arrays.c
* source/rtl/classes.c
* source/rtl/codebloc.c
* source/rtl/console.c
* source/rtl/dates.c
* source/rtl/descend.c
* source/rtl/errorapi.c
* source/rtl/extend.c
* source/rtl/files.c
* source/rtl/itemapi.c
* source/rtl/math.c
* source/rtl/set.c
* source/rtl/strcmp.c
* source/rtl/strings.c
* source/rtl/transfrm.c
* source/tools/debug.c
* source/tools/hb_f.c
* source/tools/io.c
* source/tools/stringsx.c
* source/vm/dynsym.c
* source/vm/hvm.c
19990604-13:05 EDT David G. Holm <dholm@jsd-llc.com>
* source/vm/hvm.c
- Corrected ForTest() to use the correct decimal count

View File

@@ -7,7 +7,7 @@
/* executing Harbour code from C */
void Message( PSYMBOL );
void PushSymbol( PSYMBOL pSym ); /* pushes a function pointer onto the stack */
void Push( PITEM pItem ); /* pushes any item to the stack */
void Push( PHB_ITEM pItem ); /* pushes any item to the stack */
void PushNil( void ); /* in this case it places nil at self */
/* parameters should come here using Push...() */
void PushInteger( int iNumber );

View File

@@ -72,11 +72,11 @@ typedef struct /* items hold at the virtual machine stack */
WORD wBase; /* stack frame number of items position for a function call */
WORD wLine; /* currently processed PRG line number */
WORD wParams; /* number of received parameters for a function call */
} ITEM, * PITEM;
} HB_ITEM, * PHB_ITEM;
typedef struct
{
PITEM pItems; /* pointer to the array items */
PHB_ITEM pItems; /* pointer to the array items */
ULONG ulLen; /* number of items in the array */
WORD wHolders; /* number of holders of this array */
WORD wClass; /* offset to the classes base if it is an object */
@@ -85,12 +85,12 @@ typedef struct
typedef struct /* stack managed by the virtual machine */
{
PITEM pItems; /* pointer to the stack items */
PITEM pPos; /* pointer to the latest used item */
PHB_ITEM pItems; /* pointer to the stack items */
PHB_ITEM pPos; /* pointer to the latest used item */
LONG wItems; /* total items that may be holded on the stack */
ITEM Return; /* latest returned value */
PITEM pBase; /* stack frame position for the current function call */
PITEM pEvalBase;/* stack frame position for the evaluated codeblock */
HB_ITEM Return; /* latest returned value */
PHB_ITEM pBase; /* stack frame position for the current function call */
PHB_ITEM pEvalBase;/* stack frame position for the evaluated codeblock */
int iStatics; /* statics base for the current function call */
char szDate[ 9 ]; /* last returned date from _pards() yyyymmdd format */
} STACK;
@@ -107,7 +107,7 @@ typedef struct
typedef struct _CODEBLOCK
{
BYTE * pCode; /* codeblock pcode */
PITEM pItems; /* table with referenced local variables */
PHB_ITEM pItems; /* table with referenced local variables */
WORD wLocals; /* number of referenced local variables */
WORD wDetached; /* holds if pItems table variables values */
PSYMBOL pSymbols; /* codeblocks symbols */
@@ -116,7 +116,7 @@ typedef struct _CODEBLOCK
long lCounter; /* numer of references to this codeblock */
} CODEBLOCK, * PCODEBLOCK;
PITEM _param( WORD wParam, WORD wType ); /* retrieve a generic parameter */
PHB_ITEM _param( WORD wParam, WORD wType ); /* retrieve a generic parameter */
char * _parc( WORD wParam, ... ); /* retrieve a string parameter */
ULONG _parclen( WORD wParam, ... ); /* retrieve a string parameter length */
char * _pards( WORD wParam, ... ); /* retrieve a date as a string yyyymmdd */
@@ -145,30 +145,30 @@ void _stornl( long lValue, WORD wParam, ... ); /* stores a long on a variable by
void * _xgrab( ULONG lSize ); /* allocates memory */
void * _xrealloc( void * pMem, ULONG lSize ); /* reallocates memory */
void _xfree( void * pMem ); /* frees memory */
void ItemCopy( PITEM pDest, PITEM pSource );
void ItemRelease( PITEM pItem );
void ItemCopy( PHB_ITEM pDest, PHB_ITEM pSource );
void ItemRelease( PHB_ITEM pItem );
void hb_arrayNew( PITEM pItem, ULONG ulLen ); /* creates a new array */
void hb_arrayGet( PITEM pArray, ULONG ulIndex, PITEM pItem ); /* retrieves an item */
ULONG hb_arrayLen( PITEM pArray ); /* retrives the array len */
void hb_arraySet( PITEM pArray, ULONG ulIndex, PITEM pItem ); /* sets an array element */
void hb_arraySize( PITEM pArray, ULONG ulLen ); /* sets the array total length */
void hb_arrayRelease( PITEM pArray ); /* releases an array - don't call it - use ItemRelease() !!! */
char *hb_arrayGetString( PITEM pArray, ULONG ulIndex ); /* retrieves the string contained on an array element */
ULONG hb_arrayGetStringLen( PITEM pArray, ULONG ulIndex ); /* retrieves the string length contained on an array element */
int hb_arrayGetType( PITEM pArray, ULONG ulIndex );
void hb_arrayDel( PITEM pArray, ULONG ulIndex );
PITEM hb_arrayClone( PITEM pArray );
void hb_arrayAdd( PITEM pArray, PITEM pItemValue );
void hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ); /* creates a new array */
void hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); /* retrieves an item */
ULONG hb_arrayLen( PHB_ITEM pArray ); /* retrives the array len */
void hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); /* sets an array element */
void hb_arraySize( PHB_ITEM pArray, ULONG ulLen ); /* sets the array total length */
void hb_arrayRelease( PHB_ITEM pArray ); /* releases an array - don't call it - use ItemRelease() !!! */
char *hb_arrayGetString( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the string contained on an array element */
ULONG hb_arrayGetStringLen( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the string length contained on an array element */
int hb_arrayGetType( PHB_ITEM pArray, ULONG ulIndex );
void hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex );
PHB_ITEM hb_arrayClone( PHB_ITEM pArray );
void hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pItemValue );
int hb_itemStrCmp( PITEM pFirst, PITEM pSecond, BOOL bForceExact ); /* our string compare */
char * hb_str( PITEM pNumber, PITEM pWidth, PITEM pDec ); /* convert number to string */
int hb_itemStrCmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ); /* our string compare */
char * hb_str( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec ); /* convert number to string */
BOOL hb_strempty( char * szText, ULONG ulLen );
long hb_dateEncode( long lDay, long lMonth, long lYear );
void hb_dateDecode( long julian, long * plDay, long * plMonth, long * plYear );
HARBOURFUNC GetMethod( PITEM pObject, PSYMBOL pSymMsg ); /* returns the method pointer of a object class */
char * _GetClassName( PITEM pObject ); /* retrieves an object class name */
HARBOURFUNC GetMethod( PHB_ITEM pObject, PSYMBOL pSymMsg ); /* returns the method pointer of a object class */
char * _GetClassName( PHB_ITEM pObject ); /* retrieves an object class name */
/* dynamic symbol table management */
PDYNSYM GetDynSym( char * szName ); /* finds and creates a dynamic symbol if not found */
@@ -176,18 +176,18 @@ PDYNSYM NewDynSym( PSYMBOL pSymbol ); /* creates a new dynamic symbol based on a
PDYNSYM FindDynSym( char * szName ); /* finds a dynamic symbol */
/* error API */
PITEM _errNew( void );
PITEM _errPutDescription( PITEM pError, char * szDescription );
PITEM _errPutFileName( PITEM pError, char * szFileName );
PITEM _errPutGenCode( PITEM pError, USHORT uiGenCode );
PITEM _errPutOperation( PITEM pError, char * szOperation );
PITEM _errPutOsCode( PITEM pError, USHORT uiOsCode );
PITEM _errPutSeverity( PITEM pError, USHORT uiSeverity );
PITEM _errPutSubCode( PITEM pError, USHORT uiSubCode );
PITEM _errPutSubSystem( PITEM pError, char * szSubSystem );
PITEM _errPutTries( PITEM pError, USHORT uiTries );
WORD _errLaunch( PITEM pError );
void _errRelease( PITEM pError );
PHB_ITEM _errNew( void );
PHB_ITEM _errPutDescription( PHB_ITEM pError, char * szDescription );
PHB_ITEM _errPutFileName( PHB_ITEM pError, char * szFileName );
PHB_ITEM _errPutGenCode( PHB_ITEM pError, USHORT uiGenCode );
PHB_ITEM _errPutOperation( PHB_ITEM pError, char * szOperation );
PHB_ITEM _errPutOsCode( PHB_ITEM pError, USHORT uiOsCode );
PHB_ITEM _errPutSeverity( PHB_ITEM pError, USHORT uiSeverity );
PHB_ITEM _errPutSubCode( PHB_ITEM pError, USHORT uiSubCode );
PHB_ITEM _errPutSubSystem( PHB_ITEM pError, char * szSubSystem );
PHB_ITEM _errPutTries( PHB_ITEM pError, USHORT uiTries );
WORD _errLaunch( PHB_ITEM pError );
void _errRelease( PHB_ITEM pError );
#endif

View File

@@ -8,34 +8,35 @@ typedef struct
{
WORD type;
WORD paramCount;
PITEM pItems[ 10 ];
PHB_ITEM pItems[ 10 ];
} EVALINFO, * PEVALINFO;
PITEM hb_evalLaunch( PEVALINFO pEvalInfo );
BOOL hb_evalNew( PEVALINFO pEvalInfo, PITEM pItem );
BOOL hb_evalPutParam( PEVALINFO pEvalInfo, PITEM pItem );
#define ITEM PHB_ITEM
PHB_ITEM hb_evalLaunch( PEVALINFO pEvalInfo );
BOOL hb_evalNew( PEVALINFO pEvalInfo, PHB_ITEM pItem );
BOOL hb_evalPutParam( PEVALINFO pEvalInfo, PHB_ITEM pItem );
BOOL hb_evalRelease( PEVALINFO pEvalInfo );
PITEM hb_itemArrayGet( PITEM pArray, ULONG ulIndex );
PITEM hb_itemArrayNew( ULONG ulLen );
PITEM hb_itemArrayPut( PITEM pArray, ULONG ulIndex, PITEM pItem );
ULONG hb_itemCopyC( PITEM pItem, char *szBuffer, ULONG ulLen );
PHB_ITEM hb_itemArrayGet( PHB_ITEM pArray, ULONG ulIndex );
PHB_ITEM hb_itemArrayNew( ULONG ulLen );
PHB_ITEM hb_itemArrayPut( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem );
ULONG hb_itemCopyC( PHB_ITEM pItem, char *szBuffer, ULONG ulLen );
BOOL hb_itemFreeC( char *szText );
char * hb_itemGetC( PITEM pItem );
char *hb_itemGetDS( PITEM pItem, char *szDate );
BOOL hb_itemGetL( PITEM pItem );
double hb_itemGetND( PITEM pItem );
long hb_itemGetNL( PITEM pItem );
PITEM hb_itemNew( PITEM pNull );
PITEM hb_itemParam( WORD wParam );
PITEM hb_itemPutC( PITEM pItem, char *szText );
PITEM hb_itemPutCL( PITEM pItem, char *nszText, ULONG ulLen );
PITEM hb_itemPutDS( PITEM pItem, char *szDate );
PITEM hb_itemPutL( PITEM pItem, BOOL bValue );
PITEM hb_itemPutND( PITEM pItem, double dNumber );
PITEM hb_itemPutNL( PITEM pItem, long lNumber );
BOOL hb_itemRelease( PITEM pItem );
PITEM hb_itemReturn( PITEM pItem );
ULONG hb_itemSize( PITEM pItem );
WORD hb_itemType( PITEM pItem );
char * hb_itemGetC( PHB_ITEM pItem );
char *hb_itemGetDS( PHB_ITEM pItem, char *szDate );
BOOL hb_itemGetL( PHB_ITEM pItem );
double hb_itemGetND( PHB_ITEM pItem );
long hb_itemGetNL( PHB_ITEM pItem );
PHB_ITEM hb_itemNew( PHB_ITEM pNull );
PHB_ITEM hb_itemParam( WORD wParam );
PHB_ITEM hb_itemPutC( PHB_ITEM pItem, char *szText );
PHB_ITEM hb_itemPutCL( PHB_ITEM pItem, char *nszText, ULONG ulLen );
PHB_ITEM hb_itemPutDS( PHB_ITEM pItem, char *szDate );
PHB_ITEM hb_itemPutL( PHB_ITEM pItem, BOOL bValue );
PHB_ITEM hb_itemPutND( PHB_ITEM pItem, double dNumber );
PHB_ITEM hb_itemPutNL( PHB_ITEM pItem, long lNumber );
BOOL hb_itemRelease( PHB_ITEM pItem );
PHB_ITEM hb_itemReturn( PHB_ITEM pItem );
ULONG hb_itemSize( PHB_ITEM pItem );
WORD hb_itemType( PHB_ITEM pItem );

View File

@@ -6,8 +6,8 @@
#include <extend.h>
#include <ctoharb.h>
PITEM hb_itemNew( PITEM );
PITEM hb_itemArrayPut( PITEM , ULONG , PITEM );
PHB_ITEM hb_itemNew( PHB_ITEM );
PHB_ITEM hb_itemArrayPut( PHB_ITEM , ULONG , PHB_ITEM );
extern STACK stack;
extern SYMBOL symEval;
@@ -19,7 +19,7 @@ static char *szArgumentError = "Argument error: incorrect type";
* Internal
*/
void hb_arrayNew( PITEM pItem, ULONG ulLen ) /* creates a new array */
void hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ) /* creates a new array */
{
PBASEARRAY pBaseArray = ( PBASEARRAY ) _xgrab( sizeof( BASEARRAY ) );
ULONG ul;
@@ -29,7 +29,7 @@ void hb_arrayNew( PITEM pItem, ULONG ulLen ) /* creates a new array */
pItem->wType = IT_ARRAY;
if( ulLen )
pBaseArray->pItems = ( PITEM ) _xgrab( sizeof( ITEM ) * ulLen );
pBaseArray->pItems = ( PHB_ITEM ) _xgrab( sizeof( HB_ITEM ) * ulLen );
else
pBaseArray->pItems = 0;
@@ -44,7 +44,7 @@ void hb_arrayNew( PITEM pItem, ULONG ulLen ) /* creates a new array */
pItem->value.pBaseArray = pBaseArray;
}
void hb_arrayAdd( PITEM pArray, PITEM pValue )
void hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pValue )
{
PBASEARRAY pBaseArray = ( PBASEARRAY ) pArray->value.pBaseArray;
hb_arraySize( pArray, pBaseArray->ulLen + 1 );
@@ -52,7 +52,7 @@ void hb_arrayAdd( PITEM pArray, PITEM pValue )
ItemCopy( pBaseArray->pItems + ( pBaseArray->ulLen - 1 ), pValue );
}
void hb_arrayGet( PITEM pArray, ULONG ulIndex, PITEM pItem )
void hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem )
{
if( IS_ARRAY( pArray ) )
{
@@ -60,7 +60,7 @@ void hb_arrayGet( PITEM pArray, ULONG ulIndex, PITEM pItem )
ItemCopy( pItem, ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems + ( ulIndex - 1 ) );
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
@@ -68,20 +68,20 @@ void hb_arrayGet( PITEM pArray, ULONG ulIndex, PITEM pItem )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
}
}
char *hb_arrayGetString( PITEM pArray, ULONG ulIndex )
char *hb_arrayGetString( PHB_ITEM pArray, ULONG ulIndex )
{
if( IS_ARRAY( pArray ) )
{
if( ulIndex <= ( unsigned )hb_arrayLen( pArray ) )
{
PITEM pItem = ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems + ulIndex - 1;
PHB_ITEM pItem = ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems + ulIndex - 1;
if( IS_STRING( pItem ) )
return pItem->value.szText;
@@ -90,7 +90,7 @@ char *hb_arrayGetString( PITEM pArray, ULONG ulIndex )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
@@ -98,7 +98,7 @@ char *hb_arrayGetString( PITEM pArray, ULONG ulIndex )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
@@ -106,13 +106,13 @@ char *hb_arrayGetString( PITEM pArray, ULONG ulIndex )
return "";
}
ULONG hb_arrayGetStringLen( PITEM pArray, ULONG ulIndex )
ULONG hb_arrayGetStringLen( PHB_ITEM pArray, ULONG ulIndex )
{
if( IS_ARRAY( pArray ) )
{
if( ulIndex <= ( unsigned )hb_arrayLen( pArray ) )
{
PITEM pItem = ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems + ulIndex - 1;
PHB_ITEM pItem = ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems + ulIndex - 1;
if( IS_STRING( pItem ) )
return pItem->wLength;
@@ -121,7 +121,7 @@ ULONG hb_arrayGetStringLen( PITEM pArray, ULONG ulIndex )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
@@ -129,7 +129,7 @@ ULONG hb_arrayGetStringLen( PITEM pArray, ULONG ulIndex )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
@@ -137,18 +137,18 @@ ULONG hb_arrayGetStringLen( PITEM pArray, ULONG ulIndex )
return 0;
}
int hb_arrayGetType( PITEM pArray, ULONG ulIndex )
int hb_arrayGetType( PHB_ITEM pArray, ULONG ulIndex )
{
if( IS_ARRAY( pArray ) )
{
if( ulIndex <= ( unsigned ) hb_arrayLen( pArray ) )
{
PITEM pItem = ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems + ulIndex - 1;
PHB_ITEM pItem = ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems + ulIndex - 1;
return pItem->wType;
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, "Bound error: Array access" );
_errLaunch( pError );
_errRelease( pError );
@@ -157,7 +157,7 @@ int hb_arrayGetType( PITEM pArray, ULONG ulIndex )
return 0;
}
void hb_arrayLast( PITEM pArray, PITEM pResult )
void hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult )
{
if ( ( ( PBASEARRAY ) pArray->value.pBaseArray )->ulLen )
ItemCopy( pResult, ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems +
@@ -166,13 +166,13 @@ void hb_arrayLast( PITEM pArray, PITEM pResult )
ItemRelease( pResult );
}
ULONG hb_arrayLen( PITEM pArray )
ULONG hb_arrayLen( PHB_ITEM pArray )
{
if( IS_ARRAY( pArray ) )
return ( ( PBASEARRAY ) pArray->value.pBaseArray )->ulLen;
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
@@ -180,7 +180,7 @@ ULONG hb_arrayLen( PITEM pArray )
return 0;
}
void hb_arraySet( PITEM pArray, ULONG ulIndex, PITEM pItem )
void hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem )
{
if( IS_ARRAY( pArray ) )
{
@@ -188,7 +188,7 @@ void hb_arraySet( PITEM pArray, ULONG ulIndex, PITEM pItem )
ItemCopy( ( ( PBASEARRAY ) pArray->value.pBaseArray )->pItems + ( ulIndex - 1 ), pItem );
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
@@ -196,14 +196,14 @@ void hb_arraySet( PITEM pArray, ULONG ulIndex, PITEM pItem )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
}
}
void hb_arraySize( PITEM pArray, ULONG ulLen )
void hb_arraySize( PHB_ITEM pArray, ULONG ulLen )
{
if ( IS_ARRAY( pArray ) )
{
@@ -212,7 +212,7 @@ void hb_arraySize( PITEM pArray, ULONG ulLen )
if( ! pBaseArray->ulLen )
{
pBaseArray->pItems = ( PITEM ) _xgrab( ulLen * sizeof( ITEM ) );
pBaseArray->pItems = ( PHB_ITEM ) _xgrab( ulLen * sizeof( HB_ITEM ) );
for ( ul = 0; ul < ulLen; ul ++ )
( pBaseArray->pItems + ul )->wType = IT_NIL;
}
@@ -220,7 +220,7 @@ void hb_arraySize( PITEM pArray, ULONG ulLen )
{
if( pBaseArray->ulLen < ulLen )
{
pBaseArray->pItems = ( PITEM )_xrealloc( pBaseArray->pItems, sizeof( ITEM ) * ulLen );
pBaseArray->pItems = ( PHB_ITEM )_xrealloc( pBaseArray->pItems, sizeof( HB_ITEM ) * ulLen );
/* set value for new items */
for( ul = pBaseArray->ulLen; ul < ulLen; ul++ )
@@ -232,21 +232,21 @@ void hb_arraySize( PITEM pArray, ULONG ulLen )
for( ul = ulLen; ul < pBaseArray->ulLen; ul++ )
ItemRelease( pBaseArray->pItems + ul );
pBaseArray->pItems = ( PITEM )_xrealloc( pBaseArray->pItems, sizeof( ITEM ) * ulLen );
pBaseArray->pItems = ( PHB_ITEM )_xrealloc( pBaseArray->pItems, sizeof( HB_ITEM ) * ulLen );
}
}
pBaseArray->ulLen = ulLen;
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
}
}
void hb_arrayFill( PITEM pArray, PITEM pValue, ULONG ulStart, ULONG ulCount )
void hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, ULONG ulStart, ULONG ulCount )
{
if ( IS_ARRAY( pArray ) )
{
@@ -269,14 +269,14 @@ void hb_arrayFill( PITEM pArray, PITEM pValue, ULONG ulStart, ULONG ulCount )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
}
}
void hb_arrayDel( PITEM pArray, ULONG ulIndex )
void hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex )
{
if ( IS_ARRAY( pArray ) )
{
@@ -295,7 +295,7 @@ void hb_arrayDel( PITEM pArray, ULONG ulIndex )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
@@ -303,14 +303,14 @@ void hb_arrayDel( PITEM pArray, ULONG ulIndex )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
}
}
void hb_arrayIns( PITEM pArray, ULONG ulIndex )
void hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex )
{
if ( IS_ARRAY( pArray ) )
{
@@ -329,7 +329,7 @@ void hb_arrayIns( PITEM pArray, ULONG ulIndex )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szBoundError );
_errLaunch( pError );
_errRelease( pError );
@@ -337,14 +337,14 @@ void hb_arrayIns( PITEM pArray, ULONG ulIndex )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
}
}
int hb_arrayScan( PITEM pArray, PITEM pValue, ULONG ulStart, ULONG ulCount )
int hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, ULONG ulStart, ULONG ulCount )
{
if ( IS_ARRAY( pArray ) && pValue->wType != IT_NIL )
{
@@ -365,7 +365,7 @@ int hb_arrayScan( PITEM pArray, PITEM pValue, ULONG ulStart, ULONG ulCount )
for ( ulStart --; ulCount > 0; ulCount --, ulStart ++ )
{
PITEM pItem = pBaseArray->pItems + ulStart;
PHB_ITEM pItem = pBaseArray->pItems + ulStart;
if ( pValue->wType == IT_BLOCK )
{
@@ -414,7 +414,7 @@ int hb_arrayScan( PITEM pArray, PITEM pValue, ULONG ulStart, ULONG ulCount )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
@@ -422,7 +422,7 @@ int hb_arrayScan( PITEM pArray, PITEM pValue, ULONG ulStart, ULONG ulCount )
return 0;
}
void hb_arrayEval( PITEM pArray, PITEM bBlock, ULONG ulStart, ULONG ulCount )
void hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, ULONG ulStart, ULONG ulCount )
{
if ( IS_ARRAY( pArray ) && IS_BLOCK( bBlock ) )
{
@@ -442,7 +442,7 @@ void hb_arrayEval( PITEM pArray, PITEM bBlock, ULONG ulStart, ULONG ulCount )
for ( ulStart --; ulCount > 0; ulCount --, ulStart ++ )
{
PITEM pItem = pBaseArray->pItems + ulStart;
PHB_ITEM pItem = pBaseArray->pItems + ulStart;
PushSymbol( &symEval );
Push( bBlock );
@@ -452,14 +452,14 @@ void hb_arrayEval( PITEM pArray, PITEM bBlock, ULONG ulStart, ULONG ulCount )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
}
}
void hb_arrayRelease( PITEM pArray )
void hb_arrayRelease( PHB_ITEM pArray )
{
if ( IS_ARRAY( pArray ) )
{
@@ -481,14 +481,14 @@ void hb_arrayRelease( PITEM pArray )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
}
}
void hb_arrayCopy( PITEM pSrcArray, PITEM pDstArray, ULONG ulStart,
void hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, ULONG ulStart,
ULONG ulCount, ULONG ulTarget )
{
if ( IS_ARRAY( pSrcArray ) && IS_ARRAY( pDstArray ) )
@@ -522,16 +522,16 @@ void hb_arrayCopy( PITEM pSrcArray, PITEM pDstArray, ULONG ulStart,
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
}
}
PITEM hb_arrayClone( PITEM pSrcArray )
PHB_ITEM hb_arrayClone( PHB_ITEM pSrcArray )
{
PITEM pDstArray = hb_itemNew( 0 );
PHB_ITEM pDstArray = hb_itemNew( 0 );
if ( IS_ARRAY( pSrcArray ) )
{
@@ -546,11 +546,11 @@ PITEM hb_arrayClone( PITEM pSrcArray )
for ( ulCount = 0; ulCount < ulSrcLen; ulCount ++ )
{
PITEM pSrcItem = pSrcBaseArray->pItems + ulCount;
PHB_ITEM pSrcItem = pSrcBaseArray->pItems + ulCount;
if ( pSrcItem->wType == IT_ARRAY )
{
PITEM pClone = hb_arrayClone( pSrcItem );
PHB_ITEM pClone = hb_arrayClone( pSrcItem );
hb_itemArrayPut( pDstArray, ulCount + 1, pClone );
hb_itemRelease( pClone );
@@ -562,7 +562,7 @@ PITEM hb_arrayClone( PITEM pSrcArray )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, szArgumentError );
_errLaunch( pError );
_errRelease( pError );
@@ -580,8 +580,8 @@ HARBOUR ARRAY( void )
HARBOUR AADD( void )
{
PITEM pArray = _param( 1, IT_ARRAY );
PITEM pValue = _param( 2, IT_ANY );
PHB_ITEM pArray = _param( 1, IT_ARRAY );
PHB_ITEM pValue = _param( 2, IT_ANY );
if ( pArray )
hb_arrayAdd( pArray, pValue );
@@ -591,7 +591,7 @@ HARBOUR AADD( void )
HARBOUR ASIZE( void )
{
PITEM pArray = _param( 1, IT_ARRAY );
PHB_ITEM pArray = _param( 1, IT_ARRAY );
if ( pArray )
{
@@ -604,7 +604,7 @@ HARBOUR ASIZE( void )
HARBOUR ATAIL( void )
{
PITEM pArray = _param( 1, IT_ARRAY );
PHB_ITEM pArray = _param( 1, IT_ARRAY );
if ( pArray )
hb_arrayLast( pArray, &stack.Return );
@@ -614,7 +614,7 @@ HARBOUR ATAIL( void )
HARBOUR AINS( void )
{
PITEM pArray = _param( 1, IT_ARRAY );
PHB_ITEM pArray = _param( 1, IT_ARRAY );
if ( pArray )
{
@@ -627,7 +627,7 @@ HARBOUR AINS( void )
HARBOUR ADEL( void )
{
PITEM pArray = _param( 1, IT_ARRAY );
PHB_ITEM pArray = _param( 1, IT_ARRAY );
if ( pArray )
{
@@ -640,7 +640,7 @@ HARBOUR ADEL( void )
HARBOUR AFILL( void )
{
PITEM pArray = _param( 1, IT_ARRAY );
PHB_ITEM pArray = _param( 1, IT_ARRAY );
if ( pArray )
{
@@ -653,7 +653,7 @@ HARBOUR AFILL( void )
HARBOUR ASCAN( void )
{
PITEM pArray = _param( 1, IT_ARRAY );
PHB_ITEM pArray = _param( 1, IT_ARRAY );
if ( pArray )
_retnl( hb_arrayScan( pArray, _param( 2, IT_ANY ), _parnl( 3 ), _parnl( 4 ) ) );
@@ -663,8 +663,8 @@ HARBOUR ASCAN( void )
HARBOUR AEVAL( void )
{
PITEM pArray = _param( 1, IT_ARRAY );
PITEM bBlock = _param( 2, IT_BLOCK );
PHB_ITEM pArray = _param( 1, IT_ARRAY );
PHB_ITEM bBlock = _param( 2, IT_BLOCK );
if ( pArray )
{
@@ -677,8 +677,8 @@ HARBOUR AEVAL( void )
HARBOUR ACOPY( void )
{
PITEM pSrcArray = _param( 1, IT_ARRAY );
PITEM pDstArray = _param( 2, IT_ARRAY );
PHB_ITEM pSrcArray = _param( 1, IT_ARRAY );
PHB_ITEM pDstArray = _param( 2, IT_ARRAY );
if ( pSrcArray && pDstArray )
{
@@ -691,11 +691,11 @@ HARBOUR ACOPY( void )
HARBOUR ACLONE( void )
{
PITEM pSrcArray = _param( 1, IT_ARRAY );
PHB_ITEM pSrcArray = _param( 1, IT_ARRAY );
if ( pSrcArray )
{
PITEM pDstArray = hb_arrayClone( pSrcArray );
PHB_ITEM pDstArray = hb_arrayClone( pSrcArray );
ItemCopy( &stack.Return, pDstArray ); /* AClone() returns the new array */
ItemRelease( pDstArray );
_xfree( pDstArray );

View File

@@ -21,7 +21,7 @@ typedef struct
HARBOURFUNC pFunction;
WORD wData;
WORD wScope;
PITEM pInitValue;
PHB_ITEM pInitValue;
} METHOD, * PMETHOD;
typedef struct
@@ -32,8 +32,8 @@ typedef struct
PMETHOD pMethods;
WORD wMethods;
WORD wHashKey;
PITEM pClassDatas; /* Array for ClassDatas */
PITEM pInlines; /* Array for inline codeblocks */
PHB_ITEM pClassDatas; /* Array for ClassDatas */
PHB_ITEM pInlines; /* Array for inline codeblocks */
} CLASS, * PCLASS;
#define BUCKET 4
@@ -61,8 +61,8 @@ static void DictRealloc( PCLASS );
static HARBOUR EvalInline();
static HARBOUR GetClassData();
static HARBOUR GetData();
HARBOURFUNC GetMethod( PITEM, PSYMBOL );
ULONG hb_isMessage( PITEM, char *);
HARBOURFUNC GetMethod( PHB_ITEM, PSYMBOL );
ULONG hb_isMessage( PHB_ITEM, char *);
HARBOUR ISMESSAGE();
HARBOUR OCLONE();
HARBOUR OSEND();
@@ -149,7 +149,7 @@ HARBOUR CLASSADD()
WORD wType = _parni( 4 );
WORD wAt, wMask;
PITEM pInit = _param( 5, IT_ANY );
PHB_ITEM pInit = _param( 5, IT_ANY );
PCLASS pClass;
PDYNSYM pMessage;
PMETHOD pNewMeth;
@@ -246,7 +246,7 @@ HARBOUR CLASSCREATE()
{
WORD wSuper = _parni( 3 ); /* Super class present */
WORD wSize;
PITEM pItem;
PHB_ITEM pItem;
PCLASS pNewCls;
PCLASS pSprCls;
@@ -304,7 +304,7 @@ HARBOUR CLASSCREATE()
*/
HARBOUR CLASSDEL()
{
PITEM pString = _param( 2, IT_STRING );
PHB_ITEM pString = _param( 2, IT_STRING );
PSYMBOL pMessage = GetDynSym( pString->value.szText )->pSymbol;
PDYNSYM pMsg = ( PDYNSYM ) pMessage->pDynSym;
PCLASS pClass;
@@ -399,7 +399,7 @@ HARBOUR CLASSINSTANCE()
*/
HARBOUR CLASSMOD()
{
PITEM pString = _param( 2, IT_STRING );
PHB_ITEM pString = _param( 2, IT_STRING );
PSYMBOL pMessage = GetDynSym( pString->value.szText )->pSymbol;
PDYNSYM pMsg = ( PDYNSYM ) pMessage->pDynSym;
PCLASS pClass;
@@ -431,7 +431,7 @@ HARBOUR CLASSMOD()
_param( 3, IT_BLOCK ) );
else if( ( pFunc == SetData ) || ( pFunc == GetData ) )
{ /* Not allowed for DATA */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "CLASSMOD: Cannot modify a DATA item");
_errLaunch(pError);
_errRelease(pError);
@@ -450,7 +450,7 @@ HARBOUR CLASSMOD()
*/
static HARBOUR ClassName( void )
{
PITEM pItemRef;
PHB_ITEM pItemRef;
if( IS_BYREF( stack.pBase + 1 ) ) /* Variables by reference */
pItemRef = stack.pItems + ( stack.pBase + 1 )->value.wItem;
@@ -468,7 +468,7 @@ static HARBOUR ClassName( void )
*/
HARBOUR CLASSNAME()
{
PITEM pObject = _param( 0, IT_OBJECT );
PHB_ITEM pObject = _param( 0, IT_OBJECT );
WORD wClass;
if( pObject && ( ( PBASEARRAY ) pObject->value.pBaseArray )->wClass )
@@ -502,9 +502,9 @@ static HARBOUR ClassSel()
WORD wPos = 0;
PCLASS pClass;
PDYNSYM pMessage;
PITEM pReturn = hb_itemNew( NULL );
PITEM pItem;
PITEM pItemRef;
PHB_ITEM pReturn = hb_itemNew( NULL );
PHB_ITEM pItem;
PHB_ITEM pItemRef;
/* Variables by reference */
if( ( ! wClass ) && IS_BYREF( stack.pBase + 1 ) )
@@ -561,7 +561,7 @@ static void DictRealloc( PCLASS pClass )
*/
static HARBOUR EvalInline( void )
{
ITEM block;
HB_ITEM block;
WORD wClass = ( (PBASEARRAY) ( stack.pBase + 1 )->value.pBaseArray )->wClass;
WORD w;
@@ -584,7 +584,7 @@ static HARBOUR EvalInline( void )
* Get the class name of an object
*
*/
char * _GetClassName( PITEM pObject )
char * _GetClassName( PHB_ITEM pObject )
{
char * szClassName;
@@ -659,7 +659,7 @@ static HARBOUR GetClassData( void )
*/
static HARBOUR GetData( void )
{
PITEM pObject = stack.pBase + 1;
PHB_ITEM pObject = stack.pBase + 1;
WORD wIndex = pMethod->wData;
if( wIndex > ( WORD ) hb_arrayLen ( pObject ) )
@@ -674,7 +674,7 @@ static HARBOUR GetData( void )
*
* Internal function to the function pointer of a message of an object
*/
HARBOURFUNC GetMethod( PITEM pObject, PSYMBOL pMessage )
HARBOURFUNC GetMethod( PHB_ITEM pObject, PSYMBOL pMessage )
{
WORD wAt, wLimit, wMask;
WORD wClass = ( ( PBASEARRAY ) pObject->value.pBaseArray )->wClass;
@@ -732,7 +732,7 @@ HARBOURFUNC GetMethod( PITEM pObject, PSYMBOL pMessage )
*
* <uPtr> should be read as a boolean
*/
ULONG hb_isMessage( PITEM pObject, char *szString )
ULONG hb_isMessage( PHB_ITEM pObject, char *szString )
{
PSYMBOL pMessage = GetDynSym( szString )->pSymbol;
return( (ULONG) GetMethod( pObject, pMessage ) );
@@ -746,14 +746,14 @@ ULONG hb_isMessage( PITEM pObject, char *szString )
*/
HARBOUR ISMESSAGE()
{
PITEM pObject = _param( 1, IT_OBJECT );
PITEM pString = _param( 2, IT_STRING );
PHB_ITEM pObject = _param( 1, IT_OBJECT );
PHB_ITEM pString = _param( 2, IT_STRING );
if( pObject && pString )
_retl( hb_isMessage( pObject, pString->value.szText ) != 0 );
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: ISMESSAGE");
_errLaunch(pError);
_errRelease(pError);
@@ -768,18 +768,18 @@ HARBOUR ISMESSAGE()
*/
HARBOUR OCLONE( void )
{
PITEM pSrcObject = _param( 1, IT_OBJECT );
PHB_ITEM pSrcObject = _param( 1, IT_OBJECT );
if ( pSrcObject )
{
PITEM pDstObject = hb_arrayClone( pSrcObject );
PHB_ITEM pDstObject = hb_arrayClone( pSrcObject );
ItemCopy( &stack.Return, pDstObject );
hb_itemRelease( pDstObject );
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: OCLONE");
_errLaunch(pError);
_errRelease(pError);
@@ -794,8 +794,8 @@ HARBOUR OCLONE( void )
*/
HARBOUR OSEND()
{
PITEM pObject = _param( 1, IT_OBJECT );
PITEM pMessage = _param( 2, IT_STRING );
PHB_ITEM pObject = _param( 1, IT_OBJECT );
PHB_ITEM pMessage = _param( 2, IT_STRING );
WORD w;
if( pMessage && pObject ) /* Object & message passed */
@@ -809,7 +809,7 @@ HARBOUR OSEND()
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: OSEND");
_errLaunch(pError);
_errRelease(pError);
@@ -866,12 +866,12 @@ void ReleaseClasses( void )
*/
static HARBOUR SelectSuper( void )
{
PITEM pObject = stack.pBase + 1;
PITEM pSuper = (PITEM) _xgrab( sizeof( ITEM ) );
PHB_ITEM pObject = stack.pBase + 1;
PHB_ITEM pSuper = (PHB_ITEM) _xgrab( sizeof( HB_ITEM ) );
PBASEARRAY pNewBase = (PBASEARRAY) _xgrab( sizeof( BASEARRAY ) );
WORD wSuperCls = pMethod->wData; /* Get handle of superclass */
memcpy( pSuper, pObject, sizeof( ITEM ) ); /* Allocate new structures */
memcpy( pSuper, pObject, sizeof( HB_ITEM ) ); /* Allocate new structures */
memcpy( pNewBase, pObject->value.pBaseArray, sizeof( BASEARRAY ) );
pSuper->value.pBaseArray = pNewBase;
@@ -907,7 +907,7 @@ static HARBOUR SetClassData( void )
*/
static HARBOUR SetData( void )
{
PITEM pObject = stack.pBase + 1;
PHB_ITEM pObject = stack.pBase + 1;
WORD wIndex = pMethod->wData;
if( wIndex > ( WORD ) hb_arrayLen( pObject ) )
@@ -931,9 +931,9 @@ static HARBOUR Virtual( void )
*/
HARBOUR __INSTSUPER( void )
{
PITEM pString = _param( 1, IT_STRING );
PHB_ITEM pString = _param( 1, IT_STRING );
PDYNSYM pDynSym;
PITEM pSuperCls;
PHB_ITEM pSuperCls;
BYTE bFound = FALSE;
WORD w;
@@ -948,7 +948,7 @@ HARBOUR __INSTSUPER( void )
if( !IS_OBJECT( &stack.Return ) )
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "INSTSUPER : Super class does not return an object");
_errLaunch(pError);
_errRelease(pError);
@@ -965,7 +965,7 @@ HARBOUR __INSTSUPER( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "INSTSUPER : Cannot find super class");
_errLaunch(pError);
_errRelease(pError);

View File

@@ -46,7 +46,7 @@ PCODEBLOCK CodeblockNew( BYTE * pBuffer, WORD wSize, PSYMBOL pSymbols,
* all references will be replaced with current values of
* these variables
*/
pCBlock->pItems =(PITEM) _xgrab( sizeof(ITEM) * wVars );
pCBlock->pItems =(PHB_ITEM) _xgrab( sizeof(HB_ITEM) * wVars );
while( wVars-- )
{
@@ -124,7 +124,7 @@ void CodeblockDetach( PCODEBLOCK pCBlock )
{
/* this codeblock refers to local variables */
WORD w = 0;
PITEM pItem;
PHB_ITEM pItem;
while( w < pCBlock->wLocals )
{
@@ -162,10 +162,10 @@ void CodeblockEvaluate( PCODEBLOCK pCBlock )
/* Get local variable referenced in a codeblock
*/
PITEM CodeblockGetVar( PITEM pItem, SHORT iItemPos )
PHB_ITEM CodeblockGetVar( PHB_ITEM pItem, SHORT iItemPos )
{
PCODEBLOCK pCBlock = (PCODEBLOCK)pItem->value.pCodeblock;
PITEM pLocalVar;
PHB_ITEM pLocalVar;
pLocalVar =&pCBlock->pItems[ -iItemPos -1 ];
/* if a codeblock have detached local variables then it stores their value */
@@ -184,7 +184,7 @@ PITEM CodeblockGetVar( PITEM pItem, SHORT iItemPos )
* TODO: check if such simple pointer coping will allow to evaluate
* codeblocks recursively
*/
void CodeblockCopy( PITEM pDest, PITEM pSource )
void CodeblockCopy( PHB_ITEM pDest, PHB_ITEM pSource )
{
pDest->value.pCodeblock =pSource->value.pCodeblock;
((PCODEBLOCK) pDest->value.pCodeblock)->lCounter++;

View File

@@ -61,7 +61,7 @@ typedef void void_func_int (char *, WORD);
static void hb_out( WORD wParam, void_func_int * hb_out_func )
{
char * szText;
PITEM pItem = _param( wParam, IT_ANY );
PHB_ITEM pItem = _param( wParam, IT_ANY );
ULONG ulLenText;
char szBuffer [11];
@@ -256,7 +256,7 @@ HARBOUR QOUT( void )
HARBOUR DEVPOS( void ) /* Sets the screen and/or printer position */
{
PITEM pRow, pCol;
PHB_ITEM pRow, pCol;
if( _pcount() > 1 )
{
pRow = _param( 1, IT_NUMERIC );
@@ -276,7 +276,7 @@ HARBOUR DEVOUT( void ) /* writes a single values to the current device (screen o
if( _pcount() > 1 )
{
#ifdef USE_GTAPI
PITEM pColor = _param( 2, IT_STRING );
PHB_ITEM pColor = _param( 2, IT_STRING );
if( pColor )
{
_gtGetColorStr( fpOldColor );
@@ -314,8 +314,8 @@ HARBOUR SETPRC( void ) /* Sets the current printer row and column positions */
{
if( _pcount() > 1 )
{
PITEM pRow = _param( 1, IT_NUMERIC );
PITEM pCol = _param( 1, IT_NUMERIC );
PHB_ITEM pRow = _param( 1, IT_NUMERIC );
PHB_ITEM pCol = _param( 1, IT_NUMERIC );
if( pRow && pCol )
{
dev_row = _parni( 1 );

View File

@@ -324,7 +324,7 @@ HARBOUR DTOS( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: DTOS");
_errLaunch(pError);
_errRelease(pError);
@@ -333,7 +333,7 @@ HARBOUR DTOS( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: DTOS");
_errLaunch(pError);
_errRelease(pError);
@@ -348,7 +348,7 @@ HARBOUR STOD( void )
HARBOUR DAY( void )
{
PITEM pDate = _param( 1, IT_DATE );
PHB_ITEM pDate = _param( 1, IT_DATE );
long lDay, lMonth, lYear;
if( pDate )
@@ -359,7 +359,7 @@ HARBOUR DAY( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Error BASE/1114 Argument error: DAY");
_errLaunch(pError);
_errRelease(pError);
@@ -368,7 +368,7 @@ HARBOUR DAY( void )
HARBOUR MONTH( void )
{
PITEM pDate = _param( 1, IT_DATE );
PHB_ITEM pDate = _param( 1, IT_DATE );
long lDay, lMonth, lYear;
if( pDate )
@@ -379,7 +379,7 @@ HARBOUR MONTH( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Error BASE/1113 Argument error: MONTH");
_errLaunch(pError);
_errRelease(pError);
@@ -388,7 +388,7 @@ HARBOUR MONTH( void )
HARBOUR YEAR( void )
{
PITEM pDate = _param( 1, IT_DATE );
PHB_ITEM pDate = _param( 1, IT_DATE );
long lDay, lMonth, lYear;
if( pDate )
@@ -399,7 +399,7 @@ HARBOUR YEAR( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Error BASE/1112 Argument error: YEAR");
_errLaunch(pError);
_errRelease(pError);
@@ -423,7 +423,7 @@ oTime->tm_sec);
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: TIME");
_errLaunch(pError);
_errRelease(pError);
@@ -447,7 +447,7 @@ oTime->tm_mday);
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: DATE");
_errLaunch(pError);
_errRelease(pError);
@@ -469,7 +469,7 @@ long hb_dow( long d, long m, long y )
HARBOUR DOW( void )
{
PITEM pDate = _param( 1, IT_DATE );
PHB_ITEM pDate = _param( 1, IT_DATE );
long lDay, lMonth, lYear;
if( pDate )
@@ -480,7 +480,7 @@ HARBOUR DOW( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Error BASE/1115 Argument error: DOW");
_errLaunch(pError);
_errRelease(pError);

View File

@@ -30,7 +30,7 @@ HARBOUR DESCEND( void )
{
if( _pcount() == 1 )
{
PITEM pItem = _param(1, IT_ANY );
PHB_ITEM pItem = _param(1, IT_ANY );
if( pItem )
{

View File

@@ -14,11 +14,11 @@
#define E_RETRY 1
#define E_DEFAULT 0
extern ITEM errorBlock;
extern HB_ITEM errorBlock;
extern STACK stack;
extern SYMBOL symEval;
PITEM _errNew( void )
PHB_ITEM _errNew( void )
{
PushSymbol( GetDynSym( "ERRORNEW" )->pSymbol );
PushNil();
@@ -27,7 +27,7 @@ PITEM _errNew( void )
return &stack.Return;
}
char * _errGetDescription( PITEM pError )
char * _errGetDescription( PHB_ITEM pError )
{
PushSymbol( GetDynSym( "DESCRIPTION" )->pSymbol );
Push( pError );
@@ -35,7 +35,7 @@ char * _errGetDescription( PITEM pError )
return stack.Return.value.szText;
}
PITEM _errPutDescription( PITEM pError, char * szDescription )
PHB_ITEM _errPutDescription( PHB_ITEM pError, char * szDescription )
{
PushSymbol( GetDynSym( "_DESCRIPTION" )->pSymbol );
Push( pError );
@@ -44,7 +44,7 @@ PITEM _errPutDescription( PITEM pError, char * szDescription )
return pError;
}
char * _errGetFileName( PITEM pError )
char * _errGetFileName( PHB_ITEM pError )
{
PushSymbol( GetDynSym( "FILENAME" )->pSymbol );
Push( pError );
@@ -52,7 +52,7 @@ char * _errGetFileName( PITEM pError )
return stack.Return.value.szText;
}
PITEM _errPutFileName( PITEM pError, char * szFileName )
PHB_ITEM _errPutFileName( PHB_ITEM pError, char * szFileName )
{
PushSymbol( GetDynSym( "_FILENAME" )->pSymbol );
Push( pError );
@@ -61,7 +61,7 @@ PITEM _errPutFileName( PITEM pError, char * szFileName )
return pError;
}
USHORT _errGetGenCode( PITEM pError )
USHORT _errGetGenCode( PHB_ITEM pError )
{
PushSymbol( GetDynSym( "GENCODE" )->pSymbol );
Push( pError );
@@ -69,7 +69,7 @@ USHORT _errGetGenCode( PITEM pError )
return stack.Return.value.iNumber;
}
PITEM _errPutGenCode( PITEM pError, USHORT uiGenCode )
PHB_ITEM _errPutGenCode( PHB_ITEM pError, USHORT uiGenCode )
{
PushSymbol( GetDynSym( "_GENCODE" )->pSymbol );
Push( pError );
@@ -78,7 +78,7 @@ PITEM _errPutGenCode( PITEM pError, USHORT uiGenCode )
return pError;
}
char * _errGetOperation( PITEM pError )
char * _errGetOperation( PHB_ITEM pError )
{
PushSymbol( GetDynSym( "OPERATION" )->pSymbol );
Push( pError );
@@ -86,7 +86,7 @@ char * _errGetOperation( PITEM pError )
return stack.Return.value.szText;
}
PITEM _errPutOperation( PITEM pError, char * szOperation )
PHB_ITEM _errPutOperation( PHB_ITEM pError, char * szOperation )
{
PushSymbol( GetDynSym( "_OPERATION" )->pSymbol );
Push( pError );
@@ -95,7 +95,7 @@ PITEM _errPutOperation( PITEM pError, char * szOperation )
return pError;
}
USHORT _errGetOsCode( PITEM pError )
USHORT _errGetOsCode( PHB_ITEM pError )
{
PushSymbol( GetDynSym( "OSCODE" )->pSymbol );
Push( pError );
@@ -103,7 +103,7 @@ USHORT _errGetOsCode( PITEM pError )
return stack.Return.value.iNumber;
}
PITEM _errPutOsCode( PITEM pError, USHORT uiOsCode )
PHB_ITEM _errPutOsCode( PHB_ITEM pError, USHORT uiOsCode )
{
PushSymbol( GetDynSym( "_OSCODE" )->pSymbol );
Push( pError );
@@ -112,7 +112,7 @@ PITEM _errPutOsCode( PITEM pError, USHORT uiOsCode )
return pError;
}
PITEM _errPutSeverity( PITEM pError, USHORT uiSeverity )
PHB_ITEM _errPutSeverity( PHB_ITEM pError, USHORT uiSeverity )
{
PushSymbol( GetDynSym( "_SEVERITY" )->pSymbol );
Push( pError );
@@ -121,7 +121,7 @@ PITEM _errPutSeverity( PITEM pError, USHORT uiSeverity )
return pError;
}
PITEM _errPutSubCode( PITEM pError, USHORT uiSubCode )
PHB_ITEM _errPutSubCode( PHB_ITEM pError, USHORT uiSubCode )
{
PushSymbol( GetDynSym( "_SUBCODE" )->pSymbol );
Push( pError );
@@ -130,7 +130,7 @@ PITEM _errPutSubCode( PITEM pError, USHORT uiSubCode )
return pError;
}
PITEM _errPutSubSystem( PITEM pError, char * szSubSystem )
PHB_ITEM _errPutSubSystem( PHB_ITEM pError, char * szSubSystem )
{
PushSymbol( GetDynSym( "_SUBSYSTEM" )->pSymbol );
Push( pError );
@@ -139,7 +139,7 @@ PITEM _errPutSubSystem( PITEM pError, char * szSubSystem )
return pError;
}
PITEM _errPutTries( PITEM pError, USHORT uiTries )
PHB_ITEM _errPutTries( PHB_ITEM pError, USHORT uiTries )
{
PushSymbol( GetDynSym( "_TRIES" )->pSymbol );
Push( pError );
@@ -148,7 +148,7 @@ PITEM _errPutTries( PITEM pError, USHORT uiTries )
return pError;
}
WORD _errLaunch( PITEM pError )
WORD _errLaunch( PHB_ITEM pError )
{
PushSymbol( &symEval );
Push( &errorBlock );
@@ -158,7 +158,7 @@ WORD _errLaunch( PITEM pError )
return stack.Return.value.iNumber; /* TODO: _parnl( -1 ) */
}
void _errRelease( PITEM pError )
void _errRelease( PHB_ITEM pError )
{
ItemRelease( pError );
}

View File

@@ -14,10 +14,10 @@ ULONG ulMemoryMaxBlocks = 0;
ULONG ulMemoryMaxConsumed = 0;
ULONG ulMemoryConsumed = 0;
PITEM _param( WORD wParam, WORD wMask )
PHB_ITEM _param( WORD wParam, WORD wMask )
{
WORD wType;
PITEM pLocal;
PHB_ITEM pLocal;
if( wParam <= _pcount() )
{
@@ -39,7 +39,7 @@ PITEM _param( WORD wParam, WORD wMask )
char * _parc( WORD wParam, ... )
{
PITEM pItem;
PHB_ITEM pItem;
va_list va;
WORD wArrayIndex;
@@ -71,7 +71,7 @@ char * _parc( WORD wParam, ... )
ULONG _parclen( WORD wParam, ... )
{
PITEM pItem;
PHB_ITEM pItem;
va_list va;
WORD wArrayIndex;
@@ -103,7 +103,7 @@ ULONG _parclen( WORD wParam, ... )
char * _pards( WORD wParam, ... )
{
PITEM pItem;
PHB_ITEM pItem;
va_list va;
WORD wArrayIndex;
long lDay, lMonth, lYear;
@@ -148,7 +148,7 @@ char * _pards( WORD wParam, ... )
int _parl( WORD wParam, ... )
{
PITEM pItem;
PHB_ITEM pItem;
va_list va;
WORD wArrayIndex;
@@ -177,7 +177,7 @@ int _parl( WORD wParam, ... )
double _parnd( WORD wParam, ... )
{
PITEM pItem;
PHB_ITEM pItem;
va_list va;
WORD wArrayIndex;
@@ -212,7 +212,7 @@ double _parnd( WORD wParam, ... )
int _parni( WORD wParam, ... )
{
PITEM pItem;
PHB_ITEM pItem;
va_list va;
WORD wArrayIndex;
@@ -247,7 +247,7 @@ int _parni( WORD wParam, ... )
long _parnl( WORD wParam, ... )
{
PITEM pItem;
PHB_ITEM pItem;
va_list va;
WORD wArrayIndex;
@@ -282,7 +282,7 @@ long _parnl( WORD wParam, ... )
int _parinfa( int iParamNum, ULONG uiArrayIndex )
{
PITEM pArray = _param( iParamNum, IT_ARRAY );
PHB_ITEM pArray = _param( iParamNum, IT_ARRAY );
if( pArray )
{
@@ -407,7 +407,7 @@ void _retnl( long lNumber )
void _storc( char * szText, WORD wParam, ... )
{
PITEM pItem, pItemRef;
PHB_ITEM pItem, pItemRef;
va_list va;
WORD wArrayIndex;
ULONG ulLen;
@@ -439,7 +439,7 @@ void _storc( char * szText, WORD wParam, ... )
void _storclen( char * fixText, WORD wLength, WORD wParam, ... )
{
PITEM pItem, pItemRef;
PHB_ITEM pItem, pItemRef;
va_list va;
WORD wArrayIndex;
@@ -470,7 +470,7 @@ void _storclen( char * fixText, WORD wLength, WORD wParam, ... )
void _stords( char * szDate, WORD wParam, ... ) /* szDate must have yyyymmdd format */
{
PITEM pItem, pItemRef;
PHB_ITEM pItem, pItemRef;
va_list va;
WORD wArrayIndex;
long lDay, lMonth, lYear;
@@ -511,7 +511,7 @@ void _stords( char * szDate, WORD wParam, ... ) /* szDate must have yyyymmdd for
void _storl( int iLogical, WORD wParam, ... )
{
PITEM pItem, pItemRef;
PHB_ITEM pItem, pItemRef;
va_list va;
WORD wArrayIndex;
@@ -540,7 +540,7 @@ void _storl( int iLogical, WORD wParam, ... )
void _storni( int iValue, WORD wParam, ... )
{
PITEM pItem, pItemRef;
PHB_ITEM pItem, pItemRef;
va_list va;
WORD wArrayIndex;
@@ -570,7 +570,7 @@ void _storni( int iValue, WORD wParam, ... )
void _stornl( long lValue, WORD wParam, ... )
{
PITEM pItem, pItemRef;
PHB_ITEM pItem, pItemRef;
va_list va;
WORD wArrayIndex;
@@ -600,7 +600,7 @@ void _stornl( long lValue, WORD wParam, ... )
void _stornd( double dValue, WORD wParam, ... )
{
PITEM pItem, pItemRef;
PHB_ITEM pItem, pItemRef;
va_list va;
WORD wArrayIndex;

View File

@@ -424,8 +424,8 @@ HARBOUR FOPEN()
#endif
{
PITEM arg1_it = _param(1,IT_STRING);
PITEM arg2_it = _param(2,IT_NUMBER);
PHB_ITEM arg1_it = _param(1,IT_STRING);
PHB_ITEM arg2_it = _param(2,IT_NUMBER);
int open_flags;
int file_handle = -1;
@@ -448,8 +448,8 @@ HARBOUR FOPEN()
HARBOUR FCREATE()
{
PITEM arg1_it = _param(1,IT_STRING);
PITEM arg2_it = _param(2,IT_NUMBER);
PHB_ITEM arg1_it = _param(1,IT_STRING);
PHB_ITEM arg2_it = _param(2,IT_NUMBER);
int create_flags;
int file_handle = -1;
@@ -483,9 +483,9 @@ HARBOUR FREAD()
#endif
{
PITEM arg1_it = _param(1,IT_NUMBER);
PITEM arg2_it = _param(2,IT_STRING+IT_BYREF);
PITEM arg3_it = _param(3,IT_NUMBER);
PHB_ITEM arg1_it = _param(1,IT_NUMBER);
PHB_ITEM arg2_it = _param(2,IT_STRING+IT_BYREF);
PHB_ITEM arg3_it = _param(3,IT_NUMBER);
long bytes=0;
@@ -513,9 +513,9 @@ HARBOUR FWRITE()
#endif
{
PITEM arg1_it = _param(1,IT_NUMBER);
PITEM arg2_it = _param(2,IT_STRING);
PITEM arg3_it = _param(3,IT_NUMBER);
PHB_ITEM arg1_it = _param(1,IT_NUMBER);
PHB_ITEM arg2_it = _param(2,IT_STRING);
PHB_ITEM arg3_it = _param(3,IT_NUMBER);
long bytes=0;
@@ -539,7 +539,7 @@ HARBOUR FERROR()
HARBOUR FCLOSE()
{
PITEM arg1_it = _param(1,IT_NUMBER);
PHB_ITEM arg1_it = _param(1,IT_NUMBER);
if( arg1_it )
{
@@ -554,7 +554,7 @@ HARBOUR FCLOSE()
HARBOUR FERASE()
{
PITEM arg1_it = _param(1,IT_STRING);
PHB_ITEM arg1_it = _param(1,IT_STRING);
if( arg1_it )
{
@@ -569,8 +569,8 @@ HARBOUR FERASE()
HARBOUR FRENAME()
{
PITEM arg1_it = _param(1,IT_STRING);
PITEM arg2_it = _param(2,IT_STRING);
PHB_ITEM arg1_it = _param(1,IT_STRING);
PHB_ITEM arg2_it = _param(2,IT_STRING);
if( arg1_it && arg2_it )
{
@@ -585,9 +585,9 @@ HARBOUR FRENAME()
HARBOUR FSEEK()
{
PITEM arg1_it = _param(1,IT_NUMBER);
PITEM arg2_it = _param(2,IT_NUMBER);
PITEM arg3_it = _param(3,IT_NUMBER);
PHB_ITEM arg1_it = _param(1,IT_NUMBER);
PHB_ITEM arg2_it = _param(2,IT_NUMBER);
PHB_ITEM arg3_it = _param(3,IT_NUMBER);
long bytes=0;
int pos;
@@ -606,7 +606,7 @@ HARBOUR FSEEK()
HARBOUR HB_FILE()
{
PITEM arg1_it = _param( 1, IT_STRING );
PHB_ITEM arg1_it = _param( 1, IT_STRING );
if( arg1_it )
{
@@ -620,8 +620,8 @@ HARBOUR HB_FILE()
HARBOUR FREADSTR()
{
PITEM arg1_it = _param( 1, IT_NUMBER );
PITEM arg2_it = _param( 2, IT_NUMBER );
PHB_ITEM arg1_it = _param( 1, IT_NUMBER );
PHB_ITEM arg2_it = _param( 2, IT_NUMBER );
int handle;
long bytes;
@@ -658,7 +658,7 @@ HARBOUR FREADSTR()
HARBOUR BIN2I( void )
{
PITEM arg1_it = _param( 1, IT_STRING );
PHB_ITEM arg1_it = _param( 1, IT_STRING );
char * s;
int result=0;
@@ -677,7 +677,7 @@ HARBOUR BIN2I( void )
HARBOUR BIN2L()
{
PITEM arg1_it = _param( 1, IT_STRING );
PHB_ITEM arg1_it = _param( 1, IT_STRING );
char * s;
long result=0;
@@ -701,7 +701,7 @@ HARBOUR BIN2W()
HARBOUR I2BIN( void )
{
PITEM arg1_it = _param( 1, IT_INTEGER );
PHB_ITEM arg1_it = _param( 1, IT_INTEGER );
int n;
char s[3];
@@ -721,7 +721,7 @@ HARBOUR I2BIN( void )
HARBOUR L2BIN()
{
PITEM arg1_it = _param( 1, IT_LONG );
PHB_ITEM arg1_it = _param( 1, IT_LONG );
long n;
char s[5];
@@ -761,7 +761,7 @@ static int strcmp_wildcard( const char * pattern, const char * filename )
HARBOUR DIRECTORY( void )
{
#if defined(HAVE_POSIX_IO)
PITEM arg1_it = _param(1,IT_STRING);
PHB_ITEM arg1_it = _param(1,IT_STRING);
struct dirent ** nlist;
char * string;

View File

@@ -19,7 +19,7 @@ extern SYMBOL symEval;
//long greg2julian( long lDay, long lMonth, long lYear );
//extern void julian2greg( long julian, long * plDay, long * plMonth, long * plYear );
BOOL hb_evalNew( PEVALINFO pEvalInfo, PITEM pItem )
BOOL hb_evalNew( PEVALINFO pEvalInfo, PHB_ITEM pItem )
{
BOOL bResult = FALSE;
@@ -33,7 +33,7 @@ BOOL hb_evalNew( PEVALINFO pEvalInfo, PITEM pItem )
return bResult;
}
BOOL hb_evalPutParam( PEVALINFO pEvalInfo, PITEM pItem )
BOOL hb_evalPutParam( PEVALINFO pEvalInfo, PHB_ITEM pItem )
{
BOOL bResult = FALSE;
WORD w;
@@ -68,10 +68,10 @@ BOOL hb_evalRelease( PEVALINFO pEvalInfo )
return bResult;
}
PITEM hb_evalLaunch( PEVALINFO pEvalInfo )
PHB_ITEM hb_evalLaunch( PEVALINFO pEvalInfo )
{
WORD w = 1;
PITEM pResult = 0;
PHB_ITEM pResult = 0;
if( pEvalInfo )
{
@@ -99,22 +99,22 @@ PITEM hb_evalLaunch( PEVALINFO pEvalInfo )
return pResult;
}
PITEM hb_itemNew( PITEM pNull )
PHB_ITEM hb_itemNew( PHB_ITEM pNull )
{
PITEM pItem = ( PITEM ) hb_xgrab( sizeof( ITEM ) );
PHB_ITEM pItem = ( PHB_ITEM ) hb_xgrab( sizeof( HB_ITEM ) );
if( pNull ) /* keep the C compiler silent */
pNull->wType = 0; /* keep the C compiler silent */
memset( pItem, 0, sizeof( ITEM ) );
memset( pItem, 0, sizeof( HB_ITEM ) );
pItem->wType = IT_NIL;
return pItem;
}
PITEM hb_itemParam( WORD wParam )
PHB_ITEM hb_itemParam( WORD wParam )
{
PITEM pNew = hb_itemNew( 0 );
PHB_ITEM pNew = hb_itemNew( 0 );
if( hb_param( wParam, IT_ANY ) )
ItemCopy(pNew, hb_param( wParam, IT_ANY ));
@@ -122,7 +122,7 @@ PITEM hb_itemParam( WORD wParam )
return pNew;
}
BOOL hb_itemRelease( PITEM pItem )
BOOL hb_itemRelease( PHB_ITEM pItem )
{
BOOL bResult = FALSE;
@@ -135,31 +135,31 @@ BOOL hb_itemRelease( PITEM pItem )
return bResult;
}
PITEM hb_itemArrayNew( ULONG ulLen )
PHB_ITEM hb_itemArrayNew( ULONG ulLen )
{
PITEM pItem = hb_itemNew(0);
PHB_ITEM pItem = hb_itemNew(0);
hb_arrayNew(pItem, ulLen);
return pItem;
}
PITEM hb_itemArrayGet( PITEM pArray, ULONG ulIndex )
PHB_ITEM hb_itemArrayGet( PHB_ITEM pArray, ULONG ulIndex )
{
PITEM pItem = hb_itemNew(0);
PHB_ITEM pItem = hb_itemNew(0);
hb_arrayGet(pArray, ulIndex, pItem);
return pItem;
}
PITEM hb_itemArrayPut( PITEM pArray, ULONG ulIndex, PITEM pItem )
PHB_ITEM hb_itemArrayPut( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem )
{
hb_arraySet(pArray, ulIndex, pItem);
return pArray;
}
PITEM hb_itemPutC( PITEM pItem, char * szText )
PHB_ITEM hb_itemPutC( PHB_ITEM pItem, char * szText )
{
if( pItem )
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
@@ -173,7 +173,7 @@ PITEM hb_itemPutC( PITEM pItem, char * szText )
return pItem;
}
PITEM hb_itemPutCL( PITEM pItem, char * nszText, ULONG ulLen )
PHB_ITEM hb_itemPutCL( PHB_ITEM pItem, char * nszText, ULONG ulLen )
{
if( pItem )
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
@@ -189,7 +189,7 @@ PITEM hb_itemPutCL( PITEM pItem, char * nszText, ULONG ulLen )
return pItem;
}
char *hb_itemGetC( PITEM pItem )
char *hb_itemGetC( PHB_ITEM pItem )
{
if( pItem && IS_STRING( pItem ) )
{
@@ -203,7 +203,7 @@ char *hb_itemGetC( PITEM pItem )
return NULL;
}
ULONG hb_itemCopyC( PITEM pItem, char *szBuffer, ULONG ulLen )
ULONG hb_itemCopyC( PHB_ITEM pItem, char *szBuffer, ULONG ulLen )
{
if( pItem && IS_STRING(pItem) )
{
@@ -229,7 +229,7 @@ BOOL hb_itemFreeC( char *szText )
return bResult;
}
char *hb_itemGetDS( PITEM pItem, char *szDate )
char *hb_itemGetDS( PHB_ITEM pItem, char *szDate )
{
if( pItem && IS_DATE(pItem) )
{
@@ -254,7 +254,7 @@ char *hb_itemGetDS( PITEM pItem, char *szDate )
return "00000000";
}
BOOL hb_itemGetL( PITEM pItem )
BOOL hb_itemGetL( PHB_ITEM pItem )
{
if( pItem && IS_LOGICAL(pItem) )
{
@@ -264,7 +264,7 @@ BOOL hb_itemGetL( PITEM pItem )
return FALSE;
}
double hb_itemGetND( PITEM pItem )
double hb_itemGetND( PHB_ITEM pItem )
{
if( pItem )
{
@@ -280,7 +280,7 @@ double hb_itemGetND( PITEM pItem )
return 0;
}
long hb_itemGetNL( PITEM pItem )
long hb_itemGetNL( PHB_ITEM pItem )
{
if( pItem )
{
@@ -296,7 +296,7 @@ long hb_itemGetNL( PITEM pItem )
return 0;
}
PITEM hb_itemReturn( PITEM pItem )
PHB_ITEM hb_itemReturn( PHB_ITEM pItem )
{
if( pItem )
ItemCopy(&stack.Return, pItem);
@@ -304,7 +304,7 @@ PITEM hb_itemReturn( PITEM pItem )
return pItem;
}
PITEM hb_itemPutDS( PITEM pItem, char *szDate )
PHB_ITEM hb_itemPutDS( PHB_ITEM pItem, char *szDate )
{
long lDay, lMonth, lYear;
@@ -329,7 +329,7 @@ PITEM hb_itemPutDS( PITEM pItem, char *szDate )
return pItem;
}
PITEM hb_itemPutL( PITEM pItem, BOOL bValue )
PHB_ITEM hb_itemPutL( PHB_ITEM pItem, BOOL bValue )
{
if( pItem )
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
@@ -342,7 +342,7 @@ PITEM hb_itemPutL( PITEM pItem, BOOL bValue )
return pItem;
}
PITEM hb_itemPutND( PITEM pItem, double dNumber )
PHB_ITEM hb_itemPutND( PHB_ITEM pItem, double dNumber )
{
if( pItem )
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
@@ -357,7 +357,7 @@ PITEM hb_itemPutND( PITEM pItem, double dNumber )
return pItem;
}
PITEM hb_itemPutNL( PITEM pItem, long lNumber )
PHB_ITEM hb_itemPutNL( PHB_ITEM pItem, long lNumber )
{
if( pItem )
ItemRelease( pItem ); /* warning: this is hvm.c one not this one */
@@ -371,7 +371,7 @@ PITEM hb_itemPutNL( PITEM pItem, long lNumber )
return pItem;
}
ULONG hb_itemSize( PITEM pItem )
ULONG hb_itemSize( PHB_ITEM pItem )
{
if( pItem )
{
@@ -384,7 +384,7 @@ ULONG hb_itemSize( PITEM pItem )
return 0;
}
WORD hb_itemType( PITEM pItem )
WORD hb_itemType( PHB_ITEM pItem )
{
return pItem->wType;
}

View File

@@ -11,7 +11,7 @@ HARBOUR ABS( void )
{
if( _pcount() == 1 )
{
PITEM pNumber = _param(1, IT_NUMERIC);
PHB_ITEM pNumber = _param(1, IT_NUMERIC);
if( pNumber ) switch( pNumber->wType )
{
@@ -37,7 +37,7 @@ HARBOUR ABS( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: ABS");
_errLaunch(pError);
_errRelease(pError);
@@ -46,7 +46,7 @@ HARBOUR ABS( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: ABS");
_errLaunch(pError);
_errRelease(pError);
@@ -57,7 +57,7 @@ HARBOUR EXP( void )
{
if( _pcount() == 1 )
{
PITEM pNumber = _param(1, IT_NUMERIC);
PHB_ITEM pNumber = _param(1, IT_NUMERIC);
if( pNumber )
{
@@ -65,7 +65,7 @@ HARBOUR EXP( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: EXP");
_errLaunch(pError);
_errRelease(pError);
@@ -74,7 +74,7 @@ HARBOUR EXP( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: EXP");
_errLaunch(pError);
_errRelease(pError);
@@ -89,7 +89,7 @@ HARBOUR INT( void )
_retnl( _parnd( 1 ) );
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: INT");
_errLaunch(pError);
_errRelease(pError);
@@ -98,7 +98,7 @@ HARBOUR INT( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: INT");
_errLaunch(pError);
_errRelease(pError);
@@ -109,7 +109,7 @@ HARBOUR LOG( void )
{
if( _pcount() == 1 )
{
PITEM pNumber = _param(1, IT_NUMERIC);
PHB_ITEM pNumber = _param(1, IT_NUMERIC);
if( pNumber )
{
@@ -122,7 +122,7 @@ HARBOUR LOG( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LOG");
_errLaunch(pError);
_errRelease(pError);
@@ -131,7 +131,7 @@ HARBOUR LOG( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: LOG");
_errLaunch(pError);
_errRelease(pError);
@@ -143,7 +143,7 @@ HARBOUR MAX( void )
{
if( _pcount() == 2 )
{
PITEM p1 = _param(1, IT_NUMERIC + IT_DATE), p2 = _param(2, IT_NUMERIC + IT_DATE);
PHB_ITEM p1 = _param(1, IT_NUMERIC + IT_DATE), p2 = _param(2, IT_NUMERIC + IT_DATE);
if( p1 && p2 && p1->wType == p2->wType )
{
@@ -160,7 +160,7 @@ HARBOUR MAX( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: MAX");
_errLaunch(pError);
_errRelease(pError);
@@ -169,7 +169,7 @@ HARBOUR MAX( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: MAX");
_errLaunch(pError);
_errRelease(pError);
@@ -181,7 +181,7 @@ HARBOUR MIN( void )
{
if( _pcount() == 2 )
{
PITEM p1 = _param(1, IT_NUMERIC + IT_DATE), p2 = _param(2, IT_NUMERIC + IT_DATE);
PHB_ITEM p1 = _param(1, IT_NUMERIC + IT_DATE), p2 = _param(2, IT_NUMERIC + IT_DATE);
if( p1 && p2 && p1->wType == p2->wType )
{
@@ -198,7 +198,7 @@ HARBOUR MIN( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: MIN");
_errLaunch(pError);
_errRelease(pError);
@@ -207,7 +207,7 @@ HARBOUR MIN( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: MIN");
_errLaunch(pError);
_errRelease(pError);
@@ -227,8 +227,8 @@ FUNCTION MOD(cl_num, cl_base)
cl_num,;
IF(cl_result * cl_base < 0, cl_result + cl_base, cl_result) )
*/
PITEM pNumber = _param(1, IT_NUMERIC);
PITEM pBase = _param(2, IT_NUMERIC);
PHB_ITEM pNumber = _param(1, IT_NUMERIC);
PHB_ITEM pBase = _param(2, IT_NUMERIC);
if( pNumber && pBase )
{
@@ -250,7 +250,7 @@ FUNCTION MOD(cl_num, cl_base)
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: %");
_errLaunch(pError);
_errRelease(pError);
@@ -261,7 +261,7 @@ HARBOUR SQRT( void )
{
if( _pcount() == 1 )
{
PITEM pNumber = _param(1, IT_NUMERIC);
PHB_ITEM pNumber = _param(1, IT_NUMERIC);
if( pNumber )
{
@@ -275,7 +275,7 @@ HARBOUR SQRT( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: SQRT");
_errLaunch(pError);
_errRelease(pError);
@@ -284,7 +284,7 @@ HARBOUR SQRT( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: SQRT");
_errLaunch(pError);
_errRelease(pError);

View File

@@ -17,7 +17,7 @@ BOOL hb_set_fixed;
int hb_set_althan;
int hb_set_printhan;
static BOOL set_logical (PITEM pItem)
static BOOL set_logical (PHB_ITEM pItem)
{
BOOL logical;
if (IS_LOGICAL (pItem)) logical = pItem->value.iLogical;
@@ -25,7 +25,7 @@ static BOOL set_logical (PITEM pItem)
return (logical);
}
static int set_number (PITEM pItem, int old_value)
static int set_number (PHB_ITEM pItem, int old_value)
{
int number;
if (IS_INTEGER (pItem)) number = pItem->value.iNumber;
@@ -35,7 +35,7 @@ static int set_number (PITEM pItem, int old_value)
return (number);
}
static char * set_string (PITEM pItem, char * old_str)
static char * set_string (PHB_ITEM pItem, char * old_str)
{
char * string;
if (IS_STRING (pItem))
@@ -105,7 +105,7 @@ if (handle < 0) printf("\nError %d creating %s (DOS error %02x)", errno, path, _
if (handle < 0)
{
char error_message [32];
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
sprintf( error_message, "create error %d: SET", errno );
_errPutDescription(pError, error_message);
_errLaunch(pError);
@@ -118,7 +118,7 @@ HARBOUR HB_SETCENTURY (void)
{
int digit, count, size, y_size, y_start, y_stop;
int old_century_setting = hb_set_century;
PITEM pItem = _param (1, IT_ANY);
PHB_ITEM pItem = _param (1, IT_ANY);
char *szDateFormat, *szNewFormat;
/* Start by returning the current setting */
@@ -186,7 +186,7 @@ HARBOUR HB_SETCENTURY (void)
HARBOUR HB_SETFIXED (void)
{
PITEM pItem = _param (1, IT_ANY);
PHB_ITEM pItem = _param (1, IT_ANY);
/* Start by returning the current setting */
_retl (hb_set_fixed);
@@ -210,7 +210,7 @@ HARBOUR SET (void)
{
BOOL bFlag;
int args = _pcount();
PITEM pArg2, pArg3;
PHB_ITEM pArg2, pArg3;
HB_set_enum set_specifier = (HB_set_enum)_parni(1);
if (args > 1) pArg2 = _param (2, IT_ANY);

View File

@@ -6,12 +6,12 @@
#include <set.h>
/* Check whether two strings are equal (0), smaller (-1), or greater (1) */
int hb_itemStrCmp( PITEM pFirst, PITEM pSecond, BOOL bForceExact )
int hb_itemStrCmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact )
{
char *szFirst = pFirst->value.szText;
char *szSecond = pSecond->value.szText;
long lLenFirst = pFirst->wLength; /* TODO: change ITEM.wLength from WORD to long */
long lLenSecond = pSecond->wLength; /* TODO: change ITEM.wLength from WORD to long */
long lLenFirst = pFirst->wLength; /* TODO: change HB_ITEM.wLength from WORD to long */
long lLenSecond = pSecond->wLength; /* TODO: change HB_ITEM.wLength from WORD to long */
long lMinLen;
long lCounter;
int iRet = 0; /* Current status */

View File

@@ -78,7 +78,7 @@ HARBOUR LTRIM( void )
{
if( _pcount() == 1 )
{
PITEM pText = _param(1, IT_STRING);
PHB_ITEM pText = _param(1, IT_STRING);
if( pText )
{
@@ -89,7 +89,7 @@ HARBOUR LTRIM( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LTRIM");
_errLaunch(pError);
_errRelease(pError);
@@ -98,7 +98,7 @@ HARBOUR LTRIM( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: LTRIM");
_errLaunch(pError);
_errRelease(pError);
@@ -119,7 +119,7 @@ HARBOUR RTRIM( void )
{
if( _pcount() == 1 )
{
PITEM pText = _param(1, IT_STRING);
PHB_ITEM pText = _param(1, IT_STRING);
if( pText )
_retclen(pText->value.szText, hb_strRTrimLen(pText->value.szText, pText->wLength));
else
@@ -129,7 +129,7 @@ HARBOUR RTRIM( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: RTRIM");
_errLaunch(pError);
_errRelease(pError);
@@ -305,8 +305,8 @@ ULONG hb_strAt(char *szSub, long lSubLen, char *szText, long lLen)
/* TEST: QOUT( "at( 'cde', 'abcdefgfedcba' ) = '" + at( 'cde', 'abcdefgfedcba' ) + "'" ) */
HARBOUR AT( void )
{
PITEM pSub = _param(1, IT_ANY);
PITEM pText = _param(2, IT_ANY);
PHB_ITEM pSub = _param(1, IT_ANY);
PHB_ITEM pText = _param(2, IT_ANY);
if( pText && pSub )
{
@@ -316,7 +316,7 @@ HARBOUR AT( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: AT");
_errLaunch(pError);
_errRelease(pError);
@@ -325,7 +325,7 @@ HARBOUR AT( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: AT");
_errLaunch(pError);
_errRelease(pError);
@@ -368,7 +368,7 @@ HARBOUR CHR( void )
{
if( _pcount() == 1 )
{
PITEM pAsc = _param(1, IT_NUMERIC);
PHB_ITEM pAsc = _param(1, IT_NUMERIC);
if( pAsc )
{
@@ -381,7 +381,7 @@ HARBOUR CHR( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: CHR");
_errLaunch(pError);
_errRelease(pError);
@@ -390,7 +390,7 @@ HARBOUR CHR( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: CHR");
_errLaunch(pError);
_errRelease(pError);
@@ -402,7 +402,7 @@ HARBOUR ASC(void)
{
if( _pcount() == 1 )
{
PITEM pText = _param(1, IT_STRING);
PHB_ITEM pText = _param(1, IT_STRING);
if( pText )
{
@@ -413,7 +413,7 @@ HARBOUR ASC(void)
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: ASC");
_errLaunch(pError);
_errRelease(pError);
@@ -422,7 +422,7 @@ HARBOUR ASC(void)
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: ASC");
_errLaunch(pError);
_errRelease(pError);
@@ -434,11 +434,11 @@ HARBOUR LEFT( void )
{
if( _pcount() == 2 )
{
PITEM pText = _param(1, IT_STRING);
PHB_ITEM pText = _param(1, IT_STRING);
if( pText )
{
PITEM pLen = _param(2, IT_NUMERIC);
PHB_ITEM pLen = _param(2, IT_NUMERIC);
if( pLen )
{
@@ -454,7 +454,7 @@ HARBOUR LEFT( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LEFT");
_errLaunch(pError);
_errRelease(pError);
@@ -462,7 +462,7 @@ HARBOUR LEFT( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LEFT");
_errLaunch(pError);
_errRelease(pError);
@@ -471,7 +471,7 @@ HARBOUR LEFT( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: LEFT");
_errLaunch(pError);
_errRelease(pError);
@@ -483,11 +483,11 @@ HARBOUR RIGHT( void )
{
if( _pcount() == 2 )
{
PITEM pText = _param(1, IT_STRING);
PHB_ITEM pText = _param(1, IT_STRING);
if( pText )
{
PITEM pLen = _param(2, IT_NUMERIC);
PHB_ITEM pLen = _param(2, IT_NUMERIC);
if( pLen )
{
@@ -503,7 +503,7 @@ HARBOUR RIGHT( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: RIGHT");
_errLaunch(pError);
_errRelease(pError);
@@ -511,7 +511,7 @@ HARBOUR RIGHT( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: RIGHT");
_errLaunch(pError);
_errRelease(pError);
@@ -520,7 +520,7 @@ HARBOUR RIGHT( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: RIGHT");
_errLaunch(pError);
_errRelease(pError);
@@ -532,8 +532,8 @@ HARBOUR SUBSTR( void )
{
if( _pcount() > 1 && _pcount() < 4 )
{
PITEM pText = _param(1, IT_STRING);
PITEM pPos = _param(2, IT_NUMERIC);
PHB_ITEM pText = _param(1, IT_STRING);
PHB_ITEM pPos = _param(2, IT_NUMERIC);
if( pText && pPos )
{
@@ -552,7 +552,7 @@ HARBOUR SUBSTR( void )
if( lPos < pText->wLength )
{
PITEM pLen = _param(3, IT_NUMERIC);
PHB_ITEM pLen = _param(3, IT_NUMERIC);
long lLen;
if( pLen )
@@ -575,7 +575,7 @@ HARBOUR SUBSTR( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: SUBSTR");
_errLaunch(pError);
_errRelease(pError);
@@ -584,7 +584,7 @@ HARBOUR SUBSTR( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: SUBSTR");
_errLaunch(pError);
_errRelease(pError);
@@ -605,7 +605,7 @@ HARBOUR LOWER( void )
{
if( _pcount() == 1 )
{
PITEM pText = _param(1, IT_STRING);
PHB_ITEM pText = _param(1, IT_STRING);
if( pText )
{
@@ -615,7 +615,7 @@ HARBOUR LOWER( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LOWER");
_errLaunch(pError);
_errRelease(pError);
@@ -624,7 +624,7 @@ HARBOUR LOWER( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: LOWER");
_errLaunch(pError);
_errRelease(pError);
@@ -645,7 +645,7 @@ HARBOUR UPPER( void )
{
if( _pcount() == 1 )
{
PITEM pText = _param(1, IT_STRING);
PHB_ITEM pText = _param(1, IT_STRING);
if( pText )
{
@@ -655,7 +655,7 @@ HARBOUR UPPER( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: LOWER");
_errLaunch(pError);
_errRelease(pError);
@@ -664,7 +664,7 @@ HARBOUR UPPER( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: LOWER");
_errLaunch(pError);
_errRelease(pError);
@@ -677,8 +677,8 @@ HARBOUR REPLICATE( void )
{
if( _pcount() == 2 )
{
PITEM pText = _param(1, IT_STRING);
PITEM pTimes = _param(2, IT_NUMERIC);
PHB_ITEM pText = _param(1, IT_STRING);
PHB_ITEM pTimes = _param(2, IT_NUMERIC);
if( pText && pTimes )
{
@@ -705,7 +705,7 @@ HARBOUR REPLICATE( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: REPLICATE");
_errLaunch(pError);
_errRelease(pError);
@@ -714,7 +714,7 @@ HARBOUR REPLICATE( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: REPLICATE");
_errLaunch(pError);
_errRelease(pError);
@@ -727,7 +727,7 @@ HARBOUR SPACE( void )
{
if( _pcount() == 1 )
{
PITEM pLen = _param(1, IT_NUMERIC);
PHB_ITEM pLen = _param(1, IT_NUMERIC);
if( pLen )
{
@@ -746,7 +746,7 @@ HARBOUR SPACE( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: SPACE");
_errLaunch(pError);
_errRelease(pError);
@@ -755,7 +755,7 @@ HARBOUR SPACE( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: SPACE");
_errLaunch(pError);
_errRelease(pError);
@@ -765,13 +765,13 @@ HARBOUR SPACE( void )
/* replaces characters in a string */
HARBOUR STUFF( void )
{
PITEM pText;
PHB_ITEM pText;
pText = _param(1, IT_STRING);
if( pText )
{
char *szText = pText->value.szText;
PITEM pPos, pDel, pInsert;
PHB_ITEM pPos, pDel, pInsert;
long lPos, lDel, lInsert, lTotalLen;
char *szInsert;
@@ -825,18 +825,18 @@ HARBOUR STUFF( void )
/* replaces lots of characters in a string */
HARBOUR STRTRAN( void )
{
PITEM pText = _param(1, IT_STRING);
PHB_ITEM pText = _param(1, IT_STRING);
if( pText )
{
PITEM pSeek = _param(2, IT_STRING);
PHB_ITEM pSeek = _param(2, IT_STRING);
if( pSeek )
{
char *szText = pText->value.szText;
if( pSeek->wLength && pSeek->wLength <= pText->wLength )
{
char *szSeek = pSeek->value.szText;
PITEM pStart = _param(4, IT_NUMERIC);
PHB_ITEM pStart = _param(4, IT_NUMERIC);
char *szReplace;
long iStart;
@@ -848,8 +848,8 @@ HARBOUR STRTRAN( void )
}
else if( iStart > 0 )
{
PITEM pReplace = _param(3, IT_STRING);
PITEM pCount = _param(5, IT_NUMERIC);
PHB_ITEM pReplace = _param(3, IT_STRING);
PHB_ITEM pCount = _param(5, IT_NUMERIC);
long iReplace;
long iCount, bAll;
@@ -966,7 +966,7 @@ HARBOUR VAL( void )
{
if( _pcount() == 1 )
{
PITEM pText = _param(1, IT_STRING);
PHB_ITEM pText = _param(1, IT_STRING);
if( pText )
{
@@ -984,7 +984,7 @@ HARBOUR VAL( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: VAL");
_errLaunch(pError);
_errRelease(pError);
@@ -993,7 +993,7 @@ HARBOUR VAL( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: VAL");
_errLaunch(pError);
_errRelease(pError);
@@ -1007,7 +1007,7 @@ HARBOUR VAL( void )
Note: The caller is responsible for calling _xfree to free the results buffer,
but ONLY if the return value is not a NULL pointer!
*/
char * hb_str( PITEM pNumber, PITEM pWidth, PITEM pDec )
char * hb_str( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec )
{
char * szResult = 0;
@@ -1116,9 +1116,9 @@ HARBOUR STR( void )
if( _pcount() > 0 && _pcount() < 4 )
{
BOOL bValid = TRUE;
PITEM pNumber = _param( 1, IT_NUMERIC );
PITEM pWidth = 0;
PITEM pDec = 0;
PHB_ITEM pNumber = _param( 1, IT_NUMERIC );
PHB_ITEM pWidth = 0;
PHB_ITEM pDec = 0;
if( !pNumber )
bValid = FALSE;
@@ -1150,7 +1150,7 @@ HARBOUR STR( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: STR");
_errLaunch(pError);
_errRelease(pError);
@@ -1159,7 +1159,7 @@ HARBOUR STR( void )
else
{
/* QUESTION: Clipper catches this at compile time! */
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Incorrect number of arguments: STR");
_errLaunch(pError);
_errRelease(pError);

View File

@@ -135,7 +135,7 @@ char *NumPicture( char *szPic, long lPic, int iPicFlags, double dValue,
char *szStr;
char cPic;
PITEM pItem = NULL; /* Suppress warning */
PHB_ITEM pItem = NULL; /* Suppress warning */
BYTE bFound = FALSE;
BYTE bEmpty; /* Suppress empty string */
@@ -307,7 +307,7 @@ char *NumPicture( char *szPic, long lPic, int iPicFlags, double dValue,
dValue : Number to picture
lRetSize : The size of the returned string is passed here !
*/
PITEM NumDefault( double dValue )
PHB_ITEM NumDefault( double dValue )
{ /* Default number */
/* TODO: Change to str call */
PushSymbol ( GetDynSym( "STR" )->pSymbol ); /* Push STR function */
@@ -425,15 +425,15 @@ char *DatePicture( long lDate, int iPicFlags, long *lRetSize )
HARBOUR TRANSFORM( void )
{
PITEM pPic = _param( 2, IT_STRING); /* Picture string */
PITEM pExp = _param( 1, IT_ANY ); /* Input parameter */
PHB_ITEM pPic = _param( 2, IT_STRING); /* Picture string */
PHB_ITEM pExp = _param( 1, IT_ANY ); /* Input parameter */
char *szPic = pPic->value.szText;
char *szTemp;
char *szResult;
char *szExp;
PITEM pItem;
PHB_ITEM pItem;
long lPic = pPic->wLength;
long lPicStart = 0; /* Start of template */
@@ -613,7 +613,7 @@ HARBOUR TRANSFORM( void )
}
default:
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: TRANSFORM");
_errLaunch(pError);
@@ -624,7 +624,7 @@ HARBOUR TRANSFORM( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: TRANSFORM");
_errLaunch(pError);
@@ -676,7 +676,7 @@ HARBOUR TRANSFORM( void )
}
default:
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: TRANSFORM");
_errLaunch(pError);

View File

@@ -10,9 +10,9 @@
#include <itemapi.h>
extern STACK stack; /* External data used */
extern ITEM aStatics;
extern HB_ITEM aStatics;
PITEM ArrayClone( PITEM );
PHB_ITEM ArrayClone( PHB_ITEM );
/* $Doc$
* $FuncName$ <aStat> __aStatic()
@@ -32,7 +32,7 @@ HARBOUR __ASTATIC()
* $End$ */
HARBOUR __STATIC()
{
PITEM pStatic;
PHB_ITEM pStatic;
WORD wStatic;
wStatic = _parni(1);
@@ -46,9 +46,9 @@ HARBOUR __STATIC()
* $FuncName$ AddToArray( <pItem>, <pReturn>, <wPos> )
* $Description$ Add <pItem> to array <pReturn> at pos <wPos>
* $End$ */
void AddToArray( PITEM pItem, PITEM pReturn, WORD wPos )
void AddToArray( PHB_ITEM pItem, PHB_ITEM pReturn, WORD wPos )
{
PITEM pTemp;
PHB_ITEM pTemp;
if( pItem->wType == IT_SYMBOL)
{ /* Symbol is pushed as text */
@@ -74,7 +74,7 @@ void AddToArray( PITEM pItem, PITEM pReturn, WORD wPos )
* $End$ */
WORD GlobalStackLen( void )
{
PITEM pItem;
PHB_ITEM pItem;
WORD nCount = 0;
for( pItem = stack.pItems; pItem++ <= stack.pPos; nCount++ );
@@ -92,8 +92,8 @@ HARBOUR __GLOBALSTACKLEN()
* $End$ */
HARBOUR __AGLOBALSTACK()
{
PITEM pReturn;
PITEM pItem;
PHB_ITEM pReturn;
PHB_ITEM pItem;
WORD wLen = GlobalStackLen();
WORD wPos = 1;
@@ -113,8 +113,8 @@ HARBOUR __AGLOBALSTACK()
* $End$ */
WORD StackLen( void )
{
PITEM pItem;
PITEM pBase = stack.pItems + stack.pBase->wBase;
PHB_ITEM pItem;
PHB_ITEM pBase = stack.pItems + stack.pBase->wBase;
WORD nCount = 0;
@@ -140,9 +140,9 @@ HARBOUR __STACKLEN()
* $End$ */
HARBOUR __ASTACK()
{
PITEM pReturn;
PITEM pItem;
PITEM pBase = stack.pItems + stack.pBase->wBase;
PHB_ITEM pReturn;
PHB_ITEM pItem;
PHB_ITEM pBase = stack.pItems + stack.pBase->wBase;
WORD wLen = StackLen();
WORD wPos = 1;
@@ -165,9 +165,9 @@ HARBOUR __ASTACK()
/* and locals */
HARBOUR __APARAM()
{
PITEM pReturn;
PITEM pItem;
PITEM pBase = stack.pItems + stack.pBase->wBase;
PHB_ITEM pReturn;
PHB_ITEM pItem;
PHB_ITEM pBase = stack.pItems + stack.pBase->wBase;
/* Skip function + self */
WORD wLen = pBase->wParams;
WORD wPos = 1;

View File

@@ -39,8 +39,8 @@ HARBOUR hb_fuse( void )
{
PITEM arg1_it = _param(1,IT_STRING);
PITEM arg2_it = _param(2,IT_NUMBER);
PHB_ITEM arg1_it = _param(1,IT_STRING);
PHB_ITEM arg2_it = _param(2,IT_NUMBER);
int open_flags;
if ( arg1_it ) {
@@ -85,7 +85,7 @@ HARBOUR hb_fskip( void )
{
PITEM arg1_it = _param(1,IT_NUMBER);
PHB_ITEM arg1_it = _param(1,IT_NUMBER);
int nskip;
if( arg1_it )

View File

@@ -23,8 +23,8 @@
HARBOUR renfile()
{
int ok;
PITEM arg1 = _param(1,IT_STRING);
PITEM arg2 = _param(2,IT_STRING);
PHB_ITEM arg1 = _param(1,IT_STRING);
PHB_ITEM arg2 = _param(2,IT_STRING);
if( arg1 && arg2)
{
ok=rename(_parc(1),_parc(2));
@@ -134,7 +134,7 @@ HARBOUR renfile()
HARBOUR CD(void)
{
PITEM MEUDIR = _param(1,IT_STRING);
PHB_ITEM MEUDIR = _param(1,IT_STRING);
if(MEUDIR)
{
_retni(chdir(_parc(1)));
@@ -144,7 +144,7 @@ HARBOUR CD(void)
HARBOUR MD(void)
{
PITEM MEUDIR = _param(1,IT_STRING);
PHB_ITEM MEUDIR = _param(1,IT_STRING);
if(MEUDIR)
{
@@ -154,7 +154,7 @@ HARBOUR MD(void)
HARBOUR RD(void)
{
PITEM MEUDIR = _param(1,IT_STRING);
PHB_ITEM MEUDIR = _param(1,IT_STRING);
if(MEUDIR)
{
@@ -195,7 +195,7 @@ HARBOUR RD(void)
HARBOUR file(void)
{
PITEM arg1 = _param(1,IT_STRING);
PHB_ITEM arg1 = _param(1,IT_STRING);
char *arquivos;
int achou;
struct ffblk arquivo;

View File

@@ -78,7 +78,7 @@ HARBOUR STRTOKEN( void )
HARBOUR ROT13( void )
{
PITEM pText = _param(1, IT_STRING);
PHB_ITEM pText = _param(1, IT_STRING);
if( pText )
{

View File

@@ -10,14 +10,14 @@
typedef struct
{
PDYNSYM pDynSym; /* Pointer to dynamic symbol */
} DYNITEM, * PDYNITEM;
} DYNHB_ITEM, * PDYNHB_ITEM;
#define SYM_ALLOCATED -1
PSYMBOL NewSymbol( char * szName );
PDYNSYM FindDynSym( char * szName );
static PDYNITEM pDynItems = 0; /* Pointer to dynamic items */
static PDYNHB_ITEM pDynItems = 0; /* Pointer to dynamic items */
static WORD wDynSymbols = 0; /* Number of symbols present */
static WORD wClosestDynSym = 0;
/* Closest symbol for match. FindDynSym will search for the name. */
@@ -87,13 +87,13 @@ PDYNSYM NewDynSym( PSYMBOL pSymbol ) /* creates a new dynamic symbol */
/* *<1>* Remember we already got this one */
else
{ /* We want more symbols ! */
pDynItems = ( PDYNITEM ) _xrealloc( pDynItems, ( wDynSymbols + 1 ) * sizeof( DYNITEM ) );
pDynItems = ( PDYNHB_ITEM ) _xrealloc( pDynItems, ( wDynSymbols + 1 ) * sizeof( DYNHB_ITEM ) );
if( wClosestDynSym <= wDynSymbols ) /* Closest < current !! */
{ /* Here it goes :-) */
for( w = 0; w < ( wDynSymbols - wClosestDynSym ); w++ )
memcpy( &pDynItems[ wDynSymbols - w ],
&pDynItems[ wDynSymbols - w - 1 ], sizeof( DYNITEM ) );
&pDynItems[ wDynSymbols - w - 1 ], sizeof( DYNHB_ITEM ) );
} /* Insert element in array */
pDynSym = ( PDYNSYM ) _xgrab( sizeof( DYNSYM ) );
pDynItems[ wClosestDynSym ].pDynSym = pDynSym; /* Enter DynSym */
@@ -146,7 +146,7 @@ PDYNSYM FindDynSym( char * szName )
if( ! pDynItems )
{
pDynItems = ( PDYNITEM ) _xgrab( sizeof( DYNITEM ) ); /* Grab array */
pDynItems = ( PDYNHB_ITEM ) _xgrab( sizeof( DYNHB_ITEM ) ); /* Grab array */
pDynItems->pDynSym = ( PDYNSYM ) _xgrab( sizeof( DYNSYM ) );
/* Always grab a first symbol. Never an empty bucket. *<1>* */
pDynItems->pDynSym->wMemvar = 0;

View File

@@ -55,7 +55,7 @@ void Greater( void ); /* checks if the latest - 1 value is greater than
void GreaterEqual( void ); /* checks if the latest - 1 value is greater than or equal the latest, removes both and leaves result */
void Inc( void ); /* increment the latest numeric value on the stack */
void Instring( void ); /* check whether string 1 is contained in string 2 */
void ItemCopy( PITEM pDest, PITEM pSource ); /* copies an item to one place to another respecting its containts */
void ItemCopy( PHB_ITEM pDest, PHB_ITEM pSource ); /* copies an item to one place to another respecting its containts */
void Less( void ); /* checks if the latest - 1 value is less than the latest, removes both and leaves result */
void LessEqual( void ); /* checks if the latest - 1 value is less than or equal the latest, removes both and leaves result */
void Line( WORD wLine ); /* keeps track of the currently processed PRG line */
@@ -66,7 +66,7 @@ void Mult( void ); /* multiplies the latest two values on the stack,
void Negate( void ); /* negates (-) the latest value on the stack */
void Not( void ); /* changes the latest logical value on the stack */
void NotEqual( void ); /* checks if the two latest values on the stack are not equal, removes both and leaves result */
void OperatorCall( PITEM, PITEM, char *); /* call an overloaded operator */
void OperatorCall( PHB_ITEM, PHB_ITEM, char *); /* call an overloaded operator */
void Or( void ); /* performs the logical OR on the latest two values, removes them and leaves result on the stack */
void Plus( void ); /* sums the latest two values on the stack, removes them and leaves the result */
long PopDate( void ); /* pops the stack latest value and returns its date value as a LONG */
@@ -77,7 +77,7 @@ int PopLogical( void ); /* pops the stack latest value and returns it
double PopNumber( void ); /* pops the stack latest value and returns its numeric value */
void PopStatic( WORD wStatic ); /* pops the stack latest value onto a static */
void Power( void ); /* power the latest two values on the stack, removes them and leaves the result */
void Push( PITEM pItem ); /* pushes a generic item onto the stack */
void Push( PHB_ITEM pItem ); /* pushes a generic item onto the stack */
void PushBlock( BYTE * pCode, WORD wSize, WORD wParam, PSYMBOL pSymbols ); /* creates a codeblock */
void PushDate( LONG lDate ); /* pushes a long date onto the stack */
void PushDouble( double lNumber, WORD wDec ); /* pushes a double number onto the stack */
@@ -120,21 +120,21 @@ void StackShow( void ); /* show the types of the items on the stack for de
PCODEBLOCK CodeblockNew( BYTE *, WORD, PSYMBOL, int, WORD );
void CodeblockDelete( PCODEBLOCK );
PITEM CodeblockGetVar( PITEM, SHORT );
PHB_ITEM CodeblockGetVar( PHB_ITEM, SHORT );
void CodeblockEvaluate( PCODEBLOCK );
void CodeblockCopy( PITEM, PITEM );
void CodeblockCopy( PHB_ITEM, PHB_ITEM );
void CodeblockDetach( PCODEBLOCK );
void InitSymbolTable( void ); /* initialization of runtime support symbols */
static void ForceLink( void );
ULONG hb_isMessage( PITEM, char * );
ULONG hb_isMessage( PHB_ITEM, char * );
ULONG hb_strAt( char *, long, char *, long );
PITEM hb_itemReturn( PITEM );
PHB_ITEM hb_itemReturn( PHB_ITEM );
#define STACK_INITITEMS 100
#define STACK_EXPANDITEMS 20
#define STACK_INITHB_ITEMS 100
#define STACK_EXPANDHB_ITEMS 20
extern ULONG ulMemoryBlocks; /* memory blocks used */
extern ULONG ulMemoryMaxBlocks; /* maximum number of used memory blocks */
@@ -161,8 +161,8 @@ STACK stack;
int iHBDEBUG = 0; /* if 1 traces the virtual machine activity */
SYMBOL symEval = { "__EVAL", FS_PUBLIC, DoBlock, 0 }; /* symbol to evaluate codeblocks */
PSYMBOL pSymStart; /* start symbol of the application. MAIN() is not required */
ITEM aStatics; /* Harbour array to hold all application statics variables */
ITEM errorBlock; /* errorblock */
HB_ITEM aStatics; /* Harbour array to hold all application statics variables */
HB_ITEM errorBlock; /* errorblock */
PSYMBOLS pSymbols = 0; /* to hold a linked list of all different modules symbol tables */
BOOL bQuit = FALSE; /* inmediately exit the application */
BYTE bErrorLevel = 0; /* application exit errorlevel */
@@ -580,9 +580,9 @@ void VirtualMachine( PBYTE pCode, PSYMBOL pSymbols )
void And( void )
{
PITEM pItem2 = stack.pPos - 1;
PITEM pItem1 = stack.pPos - 2;
PITEM pError;
PHB_ITEM pItem2 = stack.pPos - 1;
PHB_ITEM pItem1 = stack.pPos - 2;
PHB_ITEM pError;
int iResult;
HBDEBUG( "And\n" );
@@ -606,8 +606,8 @@ void And( void )
void ArrayAt( void )
{
double dIndex = PopNumber();
PITEM pArray = stack.pPos - 1;
ITEM item;
PHB_ITEM pArray = stack.pPos - 1;
HB_ITEM item;
hb_arrayGet( pArray, dIndex, &item );
StackPop();
@@ -619,9 +619,9 @@ void ArrayAt( void )
void ArrayPut( void )
{
PITEM pValue = stack.pPos - 1;
PITEM pIndex = stack.pPos - 2;
PITEM pArray = stack.pPos - 3;
PHB_ITEM pValue = stack.pPos - 1;
PHB_ITEM pIndex = stack.pPos - 2;
PHB_ITEM pArray = stack.pPos - 3;
ULONG ulIndex;
if( IS_INTEGER( pIndex ) )
@@ -670,11 +670,11 @@ void Div( void )
void Do( WORD wParams )
{
PITEM pItem = stack.pPos - wParams - 2;
PHB_ITEM pItem = stack.pPos - wParams - 2;
PSYMBOL pSym = pItem->value.pSymbol;
WORD wStackBase = stack.pBase - stack.pItems; /* as the stack memory block could change */
WORD wItemIndex = pItem - stack.pItems;
PITEM pSelf = stack.pPos - wParams - 1;
PHB_ITEM pSelf = stack.pPos - wParams - 1;
HARBOURFUNC pFunc;
int iStatics = stack.iStatics; /* Return iStatics position */
@@ -730,7 +730,7 @@ void Do( WORD wParams )
HARBOUR DoBlock( void )
{
PITEM pBlock = stack.pBase + 1;
PHB_ITEM pBlock = stack.pBase + 1;
WORD wStackBase = stack.pBase - stack.pItems; /* as the stack memory block could change */
int iParam;
@@ -775,7 +775,7 @@ void DuplTwo( void )
HARBOUR EVAL( void )
{
PITEM pBlock = _param( 1, IT_BLOCK );
PHB_ITEM pBlock = _param( 1, IT_BLOCK );
if( pBlock )
{
@@ -805,8 +805,8 @@ void EndBlock( void )
void Equal( BOOL bExact )
{
PITEM pItem2 = stack.pPos - 1;
PITEM pItem1 = stack.pPos - 2;
PHB_ITEM pItem2 = stack.pPos - 1;
PHB_ITEM pItem1 = stack.pPos - 2;
int i;
if( IS_NIL( pItem1 ) && IS_NIL( pItem2 ) )
@@ -892,7 +892,7 @@ void Frame( BYTE bLocals, BYTE bParams )
void FuncPtr( void ) /* pushes a function address pointer. Removes the symbol from the satck */
{
PITEM pItem = stack.pPos - 1;
PHB_ITEM pItem = stack.pPos - 1;
if( IS_SYMBOL( pItem ) )
{
@@ -915,7 +915,7 @@ void Function( WORD wParams )
void GenArray( WORD wElements ) /* generates a wElements Array and fills it from the stack values */
{
ITEM itArray;
HB_ITEM itArray;
WORD w;
itArray.wType = IT_NIL;
@@ -1030,7 +1030,7 @@ void Inc( void )
{
double dNumber;
LONG lDate;
PITEM pError;
PHB_ITEM pError;
if( IS_NUMERIC( stack.pPos - 1 ) )
{
@@ -1050,7 +1050,7 @@ void Inc( void )
}
}
void ItemRelease( PITEM pItem )
void ItemRelease( PHB_ITEM pItem )
{
if( IS_STRING( pItem ) )
{
@@ -1075,8 +1075,8 @@ void ItemRelease( PITEM pItem )
void Instring( void )
{
PITEM pItem1 = stack.pPos - 2;
PITEM pItem2 = stack.pPos - 1;
PHB_ITEM pItem1 = stack.pPos - 2;
PHB_ITEM pItem2 = stack.pPos - 1;
int iResult;
ULONG ul;
@@ -1091,14 +1091,14 @@ void Instring( void )
}
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription( pError, "Error BASE/1109 Argument error: $" );
_errLaunch( pError );
}
}
void ItemCopy( PITEM pDest, PITEM pSource )
void ItemCopy( PHB_ITEM pDest, PHB_ITEM pSource )
{
ItemRelease( pDest );
@@ -1108,7 +1108,7 @@ void ItemCopy( PITEM pDest, PITEM pSource )
exit( 1 );
}
memcpy( pDest, pSource, sizeof( ITEM ) );
memcpy( pDest, pSource, sizeof( HB_ITEM ) );
if( IS_STRING( pSource ) )
{
@@ -1251,7 +1251,7 @@ void Negate( void )
void Not( void )
{
PITEM pItem = stack.pPos - 1;
PHB_ITEM pItem = stack.pPos - 1;
if( IS_LOGICAL( pItem ) )
pItem->value.iLogical = ! pItem->value.iLogical;
@@ -1261,8 +1261,8 @@ void Not( void )
void NotEqual( void )
{
PITEM pItem2 = stack.pPos - 1;
PITEM pItem1 = stack.pPos - 2;
PHB_ITEM pItem2 = stack.pPos - 1;
PHB_ITEM pItem1 = stack.pPos - 2;
int i;
if( IS_NIL( pItem1 ) && IS_NIL( pItem2 ) )
@@ -1358,7 +1358,7 @@ void Mult( void )
PushNumber( d1 * d2, wDec1 + wDec2 );
}
void OperatorCall( PITEM pItem1, PITEM pItem2, char *szSymbol )
void OperatorCall( PHB_ITEM pItem1, PHB_ITEM pItem2, char *szSymbol )
{
Push( pItem1 ); /* Push object */
Message( GetDynSym( szSymbol )->pSymbol ); /* Push operation */
@@ -1368,9 +1368,9 @@ void OperatorCall( PITEM pItem1, PITEM pItem2, char *szSymbol )
void Or( void )
{
PITEM pItem2 = stack.pPos - 1;
PITEM pItem1 = stack.pPos - 2;
PITEM pError;
PHB_ITEM pItem2 = stack.pPos - 1;
PHB_ITEM pItem1 = stack.pPos - 2;
PHB_ITEM pError;
int iResult;
if( IS_LOGICAL( pItem1 ) && IS_LOGICAL( pItem2 ) )
@@ -1391,8 +1391,8 @@ void Or( void )
void Plus( void )
{
PITEM pItem1 = stack.pPos - 2;
PITEM pItem2 = stack.pPos - 1;
PHB_ITEM pItem1 = stack.pPos - 2;
PHB_ITEM pItem2 = stack.pPos - 1;
double dNumber1, dNumber2;
long lDate1, lDate2;
@@ -1460,7 +1460,7 @@ long PopDate( void )
void PopDefStat( WORD wStatic ) /* Pops a default value to a STATIC */
{
PITEM pStatic;
PHB_ITEM pStatic;
StackPop();
pStatic = ( ( PBASEARRAY ) aStatics.value.pBaseArray )->pItems + stack.iStatics +
@@ -1511,7 +1511,7 @@ double PopDouble( void )
void PopLocal( SHORT iLocal )
{
PITEM pLocal;
PHB_ITEM pLocal;
StackPop();
@@ -1540,7 +1540,7 @@ void PopLocal( SHORT iLocal )
int PopLogical( void )
{
PITEM pError;
PHB_ITEM pError;
StackPop();
@@ -1558,7 +1558,7 @@ int PopLogical( void )
double PopNumber( void )
{
PITEM pItem = stack.pPos - 1;
PHB_ITEM pItem = stack.pPos - 1;
double dNumber;
StackPop();
@@ -1587,7 +1587,7 @@ double PopNumber( void )
void PopStatic( WORD wStatic )
{
PITEM pStatic;
PHB_ITEM pStatic;
StackPop();
pStatic = ( ( PBASEARRAY ) aStatics.value.pBaseArray )->pItems + stack.iStatics +
@@ -1621,7 +1621,7 @@ void PushLogical( int iTrueFalse )
void PushLocal( SHORT iLocal )
{
PITEM pLocal;
PHB_ITEM pLocal;
if( iLocal >= 0 )
{
@@ -1719,7 +1719,7 @@ void PushSymbol( PSYMBOL pSym )
HBDEBUG2( "PushSymbol: %s\n", pSym->szName );
}
void Push( PITEM pItem )
void Push( PHB_ITEM pItem )
{
ItemCopy( stack.pPos, pItem );
StackPush();
@@ -1828,13 +1828,13 @@ void StackPush( void )
/* no, make more headroom: */
/* StackShow(); */
stack.pItems = (PITEM)_xrealloc( stack.pItems, sizeof( ITEM ) *
( stack.wItems + STACK_EXPANDITEMS ) );
stack.pItems = (PHB_ITEM)_xrealloc( stack.pItems, sizeof( HB_ITEM ) *
( stack.wItems + STACK_EXPANDHB_ITEMS ) );
/* fix possibly invalid pointers: */
stack.pPos = stack.pItems + CurrIndex;
stack.pBase = stack.pItems + BaseIndex;
stack.wItems += STACK_EXPANDITEMS;
stack.wItems += STACK_EXPANDHB_ITEMS;
/* StackShow(); */
}
@@ -1846,16 +1846,16 @@ void StackPush( void )
void StackInit( void )
{
stack.pItems = ( PITEM ) _xgrab( sizeof( ITEM ) * STACK_INITITEMS );
stack.pItems = ( PHB_ITEM ) _xgrab( sizeof( HB_ITEM ) * STACK_INITHB_ITEMS );
stack.pBase = stack.pItems;
stack.pPos = stack.pItems; /* points to the first stack item */
stack.wItems = STACK_INITITEMS;
stack.wItems = STACK_INITHB_ITEMS;
HBDEBUG( "StackInit\n" );
}
void StackShow( void )
{
PITEM p;
PHB_ITEM p;
for( p = stack.pBase; p <= stack.pPos; p++ )
{
@@ -2053,7 +2053,7 @@ void DoInitFunctions( int argc, char * argv[] )
HARBOUR LEN( void )
{
PITEM pItem;
PHB_ITEM pItem;
if( _pcount() )
{
@@ -2080,7 +2080,7 @@ HARBOUR LEN( void )
HARBOUR EMPTY()
{
PITEM pItem = _param( 1, IT_ANY );
PHB_ITEM pItem = _param( 1, IT_ANY );
if( pItem )
{
@@ -2130,7 +2130,7 @@ HARBOUR EMPTY()
HARBOUR VALTYPE( void )
{
PITEM pItem;
PHB_ITEM pItem;
if( _pcount() )
{
@@ -2179,8 +2179,8 @@ HARBOUR VALTYPE( void )
HARBOUR ERRORBLOCK()
{
ITEM oldError;
PITEM pNewErrorBlock = _param( 1, IT_BLOCK );
HB_ITEM oldError;
PHB_ITEM pNewErrorBlock = _param( 1, IT_BLOCK );
oldError.wType = IT_NIL;
ItemCopy( &oldError, &errorBlock );
@@ -2195,7 +2195,7 @@ HARBOUR ERRORBLOCK()
HARBOUR PROCNAME()
{
int iLevel = _parni( 1 ) + 1; /* we are already inside ProcName() */
PITEM pBase = stack.pBase;
PHB_ITEM pBase = stack.pBase;
while( ( iLevel-- > 0 ) && pBase != stack.pItems )
pBase = stack.pItems + pBase->wBase;
@@ -2209,7 +2209,7 @@ HARBOUR PROCNAME()
HARBOUR PROCLINE()
{
int iLevel = _parni( 1 ) + 1; /* we are already inside ProcName() */
PITEM pBase = stack.pBase;
PHB_ITEM pBase = stack.pBase;
while( ( iLevel-- > 0 ) && pBase != stack.pItems )
pBase = stack.pItems + pBase->wBase;
@@ -2237,7 +2237,7 @@ HARBOUR ERRORLEVEL()
HARBOUR PCOUNT()
{
PITEM pBase = stack.pItems + stack.pBase->wBase;
PHB_ITEM pBase = stack.pItems + stack.pBase->wBase;
WORD wRet = pBase->wParams; /* Skip current function */
_retni( wRet );
@@ -2246,14 +2246,14 @@ HARBOUR PCOUNT()
HARBOUR PVALUE() /* PValue( <nArg> ) */
{
WORD wParam = _parni( 1 ); /* Get parameter */
PITEM pBase = stack.pItems + stack.pBase->wBase;
PHB_ITEM pBase = stack.pItems + stack.pBase->wBase;
/* Skip function + self */
if( wParam && wParam <= pBase->wParams ) /* Valid number */
hb_itemReturn( pBase + 1 + wParam );
else
{
PITEM pError = _errNew();
PHB_ITEM pError = _errNew();
_errPutDescription(pError, "Argument error: PVALUE");
_errLaunch(pError);