diff --git a/harbour/.cvsignore b/harbour/.cvsignore index 9efc141b3d..cfee219893 100644 --- a/harbour/.cvsignore +++ b/harbour/.cvsignore @@ -6,3 +6,6 @@ os2 os2/* w32 w32/* +b16/* +b32/* +vc/* diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b36b4c1279..91c0bc431a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,40 @@ +20000302-11:21 GMT+1 Victor Szakats + * config/rules.cf + makefile.bc + makefile.vc + + -es2 added as a default Harbour switch. + WARNING! HBDOC will not compile, since it has warnings. + * contrib/* + include/* + doc/* + source/* + * Changed the name of all header files, which didn't have a "hb" prefix. + WARNING! All .PRG files must be recompiled. Note that from now on the + most common header file EXTEND.H is only a CA-Cl*pper compatibility + file, in for new Harbour code you should use HBAPI.H instead. + + errorapi.h -> hbapierr.h + filesys.h -> hbapifs.h + gtapi.h -> hbapigt.h + itemapi.h -> hbapiitm.h + langapi.h -> hbapilng.h + mouseapi.h -> hbapimou.h + rddapi.h -> hbapirdd.h + box.h -> hbbox.h + compiler.h -> hbcomp.h + setcurs.h -> hbcursor.h + dates.h -> hbdate.h + expropt.h -> hbexprop.h + init.h -> hbinit.h + inkey.h -> hbinkey.h + macro.h -> hbmacro.h + pcode.h -> hbpcode.h + set.h -> hbset.h + ctoharb.h -> hbvm.h + hb_vmpub.h -> hbvmpub.h + extend.h -> hbapi.h + hbfsapi.h -> hbapifs.h (merged into) + 20000302-12:35 GMT+1 Ryszard Glab *source/pp/hbpp.c @@ -31,6 +68,7 @@ *utils/hbdoc/hrb.rsp *utils/hbdoc/hrbtools.rsp *Change to use the new docs dir + 20000301-14:34 GMT+1 Victor Szakats * source/rtl/console.c source/rtl/oldclear.c diff --git a/harbour/config/rules.cf b/harbour/config/rules.cf index f063b0b1de..84b7541153 100644 --- a/harbour/config/rules.cf +++ b/harbour/config/rules.cf @@ -20,7 +20,7 @@ HB := $(HB_BIN_COMPILE)/ endif HB := $(HB)harbour$(EXE_EXT) -HB_FLAGS = -n -q0 -w -I$(TOP) -I$(HB_INC_COMPILE) +HB_FLAGS = -n -q0 -w -es2 -I$(TOP) -I$(HB_INC_COMPILE) # The rule to link an executable. ifeq ($(LD_RULE),) diff --git a/harbour/contrib/directx/HB_DDraw.h b/harbour/contrib/directx/HB_DDraw.h index c2ae7d8ad2..3a7c9de59e 100644 --- a/harbour/contrib/directx/HB_DDraw.h +++ b/harbour/contrib/directx/HB_DDraw.h @@ -24,8 +24,8 @@ #define INITGUID #include "windows.h" #include "winuser.h" -#include "extend.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbvm.h" #include "errno.h" #include "objbase.h" #include "tchar.h" diff --git a/harbour/contrib/odbc/odbc.c b/harbour/contrib/odbc/odbc.c index 0d2a604c5b..2e9c24d6d0 100644 --- a/harbour/contrib/odbc/odbc.c +++ b/harbour/contrib/odbc/odbc.c @@ -54,8 +54,8 @@ #include #include #include -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" #include "hbdefs.h" #include #include diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index 3094f31fff..52f50f0d50 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -38,13 +38,13 @@ #define MAX_STR_LEN 255 #include "windows.h" -#include "extend.h" -#include "init.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbinit.h" +#include "hbapiitm.h" #include "rddsys.ch" -#include "langapi.h" -#include "dates.h" -#include "errorapi.h" +#include "hbapilng.h" +#include "hbdate.h" +#include "hbapierr.h" #include "rddads.h" ERRCODE adsRecCount( ADSAREAP pArea, ULONG * pRecCount ); diff --git a/harbour/contrib/rdd_ads/adsfunc.c b/harbour/contrib/rdd_ads/adsfunc.c index 37352572ba..322fd9ac0f 100644 --- a/harbour/contrib/rdd_ads/adsfunc.c +++ b/harbour/contrib/rdd_ads/adsfunc.c @@ -34,13 +34,13 @@ */ #include "windows.h" -#include "extend.h" -#include "init.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbinit.h" +#include "hbapiitm.h" #include "rddsys.ch" -#include "langapi.h" -#include "dates.h" -#include "errorapi.h" +#include "hbapilng.h" +#include "hbdate.h" +#include "hbapierr.h" #include "rddads.h" int adsFileType = ADS_CDX; diff --git a/harbour/contrib/rdd_ads/rddads.h b/harbour/contrib/rdd_ads/rddads.h index 257080cf78..89131cd538 100644 --- a/harbour/contrib/rdd_ads/rddads.h +++ b/harbour/contrib/rdd_ads/rddads.h @@ -33,7 +33,7 @@ * */ -#include "rddapi.h" +#include "hbapirdd.h" #include "ace.h" /* diff --git a/harbour/doc/pcode.txt b/harbour/doc/pcode.txt index 17bd14856b..443c810db9 100644 --- a/harbour/doc/pcode.txt +++ b/harbour/doc/pcode.txt @@ -49,9 +49,9 @@ Let's review the Test.prg pcode structure in more detail: 0023 (60) ENDPROC 60 -We could define a pcode.h file to better read that pcode: +We could define a hbpcode.h file to better read that pcode: -pcode.h +hbpcode.h #define LINE 0x2A #define SYMF 0x13 diff --git a/harbour/doc/vm.txt b/harbour/doc/vm.txt index babb9e8573..77a1230123 100644 --- a/harbour/doc/vm.txt +++ b/harbour/doc/vm.txt @@ -20,7 +20,7 @@ interface of each subsystem. The main execution loop is defined in the C function named VirtualMachine(), which receives two parameters: the pcode instructions to execute and the local symbol table (a portion of the OBJs (static) symbol table) used by -that pcode: (please review pcode.h for the currently implemented pcode +that pcode: (please review hbpcode.h for the currently implemented pcode opcodes) VM( pcode, local symbols ) @@ -299,7 +299,7 @@ vice-versa. Answer : -Harbour opcodes are defined in pcode.h. We are trying to use very easy to +Harbour opcodes are defined in hbpcode.h. We are trying to use very easy to remember mnemonics, so PUSHWORD seems easier than PUSHW. The opcodes values are meaningless as they are just used by a C language switch sentence (in fact there is a powerful optimization which is to use the pcode opcodes diff --git a/harbour/include/Makefile b/harbour/include/Makefile index 2400406e66..368a8eb135 100644 --- a/harbour/include/Makefile +++ b/harbour/include/Makefile @@ -5,33 +5,35 @@ ROOT = ../ C_HEADERS=\ - box.h \ clipdefs.h \ - compiler.h \ - ctoharb.h \ - dates.h \ - errorapi.h \ extend.h \ - filesys.h \ - gtapi.h \ + hbapierr.h \ + hbapiext.h \ + hbapifs.h \ + hbapigt.h \ + hbapiitm.h \ + hbapilng.h \ + hbapimou.h \ + hbapirdd.h \ + hbbox.h \ + hbcomp.h \ + hbcursor.h \ + hbdate.h \ hbdefs.h \ hberrors.h \ - hbfsapi.h \ + hbexprop.h \ + hbinit.h \ + hbinkey.h \ + hbmacro.h \ + hbpcode.h \ hbpp.h \ + hbset.h \ hbsetup.h \ hbtrace.h \ hbver.h \ + hbvm.h \ + hbvmpub.h \ hbwinapi.h \ - hb_vmpub.h \ - init.h \ - inkey.h \ - itemapi.h \ - langapi.h \ - mouseapi.h \ - pcode.h \ - rddapi.h \ - set.h \ - setcurs.h \ PRG_HEADERS=\ achoice.ch \ @@ -74,3 +76,4 @@ API_HEADERS=\ vm.api \ include $(TOP)$(ROOT)config/header.cf + diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h new file mode 100644 index 0000000000..d4ede47f8f --- /dev/null +++ b/harbour/include/hbapi.h @@ -0,0 +1,479 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Header file for the Extend API, Array API, misc API and base declarations + * + * Copyright 1999 Antonio Linares + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version, with one exception: + * + * The exception is that if you link the Harbour Runtime Library (HRL) + * and/or the Harbour Virtual Machine (HVM) with other files to produce + * an executable, this does not by itself cause the resulting executable + * to be covered by the GNU General Public License. Your use of that + * executable is in no way restricted on account of linking the HRL + * and/or HVM code into it. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit + * their web site at http://www.gnu.org/). + * + */ + +/* TOFIX: There are several things in this file which are not part of the + standard Harbour API, in other words these things are not + guaranteed to remain unchanged. To avoid confusion these should be + moved to somewhere else (like HBRTL.H). [vszakats] */ + +#ifndef HB_APIEXT_H_ +#define HB_APIEXT_H_ + +#include "hbdefs.h" +#include "hbvmpub.h" + +/* items types and type checking macros */ +#define IT_NIL ( ( USHORT ) 0x0000 ) +#define IT_POINTER ( ( USHORT ) 0x0001 ) +#define IT_INTEGER ( ( USHORT ) 0x0002 ) +#define IT_LONG ( ( USHORT ) 0x0008 ) +#define IT_DOUBLE ( ( USHORT ) 0x0010 ) +#define IT_DATE ( ( USHORT ) 0x0020 ) +#define IT_LOGICAL ( ( USHORT ) 0x0080 ) +#define IT_SYMBOL ( ( USHORT ) 0x0100 ) +#define IT_ALIAS ( ( USHORT ) 0x0200 ) +#define IT_STRING ( ( USHORT ) 0x0400 ) +#define IT_MEMOFLAG ( ( USHORT ) 0x0800 ) +#define IT_MEMO ( IT_MEMOFLAG | IT_STRING ) +#define IT_BLOCK ( ( USHORT ) 0x1000 ) +#define IT_BYREF ( ( USHORT ) 0x2000 ) +#define IT_MEMVAR ( ( USHORT ) 0x4000 ) +#define IT_ARRAY ( ( USHORT ) 0x8000 ) +#define IT_OBJECT IT_ARRAY +#define IT_NUMERIC ( ( USHORT ) ( IT_INTEGER | IT_LONG | IT_DOUBLE ) ) +#define IT_ANY ( ( USHORT ) 0xFFFF ) + +#define IS_BYREF( p ) ( ( p )->type & IT_BYREF ) +#define IS_OF_TYPE( p, t ) ( ( ( p )->type & ~IT_BYREF ) == t ) +#define IS_ARRAY( p ) IS_OF_TYPE( p, IT_ARRAY ) +#define IS_NIL( p ) IS_OF_TYPE( p, IT_NIL ) +#define IS_BLOCK( p ) IS_OF_TYPE( p, IT_BLOCK ) +#define IS_DATE( p ) IS_OF_TYPE( p, IT_DATE ) +#define IS_DOUBLE( p ) IS_OF_TYPE( p, IT_DOUBLE ) +#define IS_INTEGER( p ) IS_OF_TYPE( p, IT_INTEGER ) +#define IS_LOGICAL( p ) IS_OF_TYPE( p, IT_LOGICAL ) +#define IS_LONG( p ) IS_OF_TYPE( p, IT_LONG ) +#define IS_NUMERIC( p ) ( ( p )->type & IT_NUMERIC ) +#define IS_OBJECT( p ) IS_OF_TYPE( p, IT_OBJECT ) +#define IS_STRING( p ) IS_OF_TYPE( p, IT_STRING ) +#define IS_MEMO( p ) IS_OF_TYPE( p, IT_MEMO ) +#define IS_SYMBOL( p ) IS_OF_TYPE( p, IT_SYMBOL ) +#define IS_MEMVAR( p ) IS_OF_TYPE( p, IT_MEMVAR ) +#define IS_POINTER( p ) IS_OF_TYPE( p, IT_POINTER ) + +#define ISNIL( n ) ( hb_param( n, IT_ANY ) == NULL || IS_NIL( hb_param( n, IT_ANY ) ) ) /* NOTE: Intentionally using a different method */ +#define ISCHAR( n ) ( hb_param( n, IT_STRING ) != NULL ) +#define ISNUM( n ) ( hb_param( n, IT_NUMERIC ) != NULL ) +#define ISLOG( n ) ( hb_param( n, IT_LOGICAL ) != NULL ) +#define ISDATE( n ) ( hb_param( n, IT_DATE ) != NULL ) +#define ISMEMO( n ) ( hb_param( n, IT_MEMO ) != NULL ) +#define ISBYREF( n ) ( hb_parinfo( n ) & IT_BYREF ) /* NOTE: Intentionally using a different method */ +#define ISARRAY( n ) ( hb_param( n, IT_ARRAY ) != NULL ) +#define ISBLOCK( n ) ( hb_param( n, IT_BLOCK ) != NULL ) /* Not available in CA-Cl*pper. */ +#define ISPOINTER( n ) ( hb_param( n, IT_POINTER ) != NULL ) /* Not available in CA-Cl*pper. */ + +#define PCOUNT hb_pcount() +#define ALENGTH( n ) hb_parinfa( n, 0 ) + +/* forward declarations */ +struct _HB_CODEBLOCK; +struct _HB_BASEARRAY; +struct _HB_ITEM; +struct _HB_VALUE; + +/* Internal structures that holds data */ +struct hb_struArray +{ + struct _HB_BASEARRAY * value; +}; + +struct hb_struBlock +{ + LONG statics; + USHORT lineno; + USHORT paramcnt; + struct _HB_CODEBLOCK * value; +}; + +struct hb_struDate +{ + LONG value; +}; + +/* this definition signals that number of decimal places for double value + * was not specified at compile time (the value is a result of optimization + * performed by the compiler) + */ +#define HB_DEFAULT_DECIMALS 255 +struct hb_struDouble +{ + USHORT length; + USHORT decimal; + double value; +}; + +struct hb_struInteger +{ + USHORT length; + int value; +}; + +struct hb_struLogical +{ + BOOL value; +}; + +struct hb_struLong +{ + USHORT length; + long value; +}; + +struct hb_struMemvar +{ + struct _HB_VALUE ** itemsbase; + LONG offset; + LONG value; +}; + +struct hb_struPointer +{ + void * value; +}; + +struct hb_struRefer +{ + struct _HB_ITEM ** itemsbase; + LONG offset; + LONG value; +}; + +struct hb_struString +{ + ULONG length; + char * value; +}; + +struct hb_struSymbol +{ + LONG stackbase; + USHORT lineno; + USHORT paramcnt; + PHB_SYMB value; +}; + +/* items hold at the virtual machine stack */ +typedef struct _HB_ITEM +{ + USHORT type; + union + { + struct hb_struArray asArray; + struct hb_struBlock asBlock; + struct hb_struDate asDate; + struct hb_struDouble asDouble; + struct hb_struInteger asInteger; + struct hb_struLogical asLogical; + struct hb_struLong asLong; + struct hb_struMemvar asMemvar; + struct hb_struPointer asPointer; + struct hb_struRefer asRefer; + struct hb_struString asString; + struct hb_struSymbol asSymbol; + } item; +} HB_ITEM, * PHB_ITEM, * HB_ITEM_PTR; + +typedef struct _HB_BASEARRAY +{ + PHB_ITEM pItems; /* pointer to the array items */ + ULONG ulLen; /* number of items in the array */ + USHORT uiHolders; /* number of holders of this array */ + USHORT uiClass; /* offset to the classes base if it is an object */ + USHORT uiPrevCls; /* for fixing after access super */ +} HB_BASEARRAY, * PHB_BASEARRAY, * HB_BASEARRAY_PTR; + +/* stack managed by the virtual machine */ +typedef struct +{ + 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 */ + 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 */ +} HB_STACK; + +/* internal structure for codeblocks */ +typedef struct _HB_CODEBLOCK +{ + BYTE * pCode; /* codeblock pcode */ + PHB_ITEM pLocals; /* table with referenced local variables */ + USHORT uiLocals; /* number of referenced local variables */ + PHB_SYMB pSymbols; /* codeblocks symbols */ + ULONG ulCounter; /* numer of references to this codeblock */ + BOOL dynBuffer; /* is pcode buffer allocated dynamically */ +} HB_CODEBLOCK, * PHB_CODEBLOCK, * HB_CODEBLOCK_PTR; + +typedef struct _HB_VALUE +{ + HB_ITEM item; + ULONG counter; + HB_HANDLE hPrevMemvar; +} HB_VALUE, * PHB_VALUE, * HB_VALUE_PTR; + +/* RDD method return codes */ +typedef USHORT ERRCODE; +#define SUCCESS 0 +#define FAILURE 1 + +extern HB_STACK hb_stack; +extern HB_SYMB hb_symEval; + +/* Extend API */ +extern char * hb_parc( int iParam, ... ); /* retrieve a string parameter */ +extern ULONG hb_parclen( int iParam, ... ); /* retrieve a string parameter length */ +extern ULONG hb_parcsiz( int iParam, ... ); +extern char * hb_pards( int iParam, ... ); /* retrieve a date as a string yyyymmdd */ +extern char * hb_pardsbuff( char * szDate, int iParam, ... ); /* retrieve a date as a string yyyymmdd */ +extern ULONG hb_parinfa( int iParamNum, ULONG uiArrayIndex ); +extern int hb_parinfo( int iParam ); /* Determine the param count or data type */ +extern int hb_parl( int iParam, ... ); /* retrieve a logical parameter as an int */ +extern double hb_parnd( int iParam, ... ); /* retrieve a numeric parameter as a double */ +extern int hb_parni( int iParam, ... ); /* retrieve a numeric parameter as a integer */ +extern long hb_parnl( int iParam, ... ); /* retrieve a numeric parameter as a long */ +extern PHB_ITEM hb_param( int iParam, int iMask ); /* retrieve a generic parameter */ +extern int hb_pcount( void ); /* returns the number of suplied parameters */ + +extern void hb_ret( void ); /* post a NIL return value */ +extern void hb_retc( char * szText ); /* returns a string */ +extern void hb_retclen( char * szText, ULONG ulLen ); /* returns a string with a specific length */ +extern void hb_retds( char * szDate ); /* returns a date, must use yyyymmdd format */ +extern void hb_retl( int iTrueFalse ); /* returns a logical integer */ +extern void hb_retnd( double dNumber ); /* returns a double */ +extern void hb_retni( int iNumber ); /* returns a integer number */ +extern void hb_retnl( long lNumber ); /* returns a long number */ +extern void hb_retnlen( double dNumber, int iWidth, int iDec ); /* returns a double, with specific width and decimals */ +extern void hb_retndlen( double dNumber, int iWidth, int iDec ); /* returns a double, with specific width and decimals */ +extern void hb_retnilen( int iNumber, int iWidth ); /* returns a integer number, with specific width */ +extern void hb_retnllen( long lNumber, int iWidth ); /* returns a long number, with specific width */ +extern void hb_reta( ULONG ulLen ); /* returns an array with a specific length */ + +extern void hb_storc( char * szText, int iParam, ... ); /* stores a szString on a variable by reference */ +extern void hb_storclen( char * szText, ULONG ulLength, int iParam, ... ); /* stores a fixed length string on a variable by reference */ +extern void hb_stords( char * szDate, int iParam, ... ); /* szDate must have yyyymmdd format */ +extern void hb_storl( int iLogical, int iParam, ... ); /* stores a logical integer on a variable by reference */ +extern void hb_storni( int iValue, int iParam, ... ); /* stores an integer on a variable by reference */ +extern void hb_stornl( long lValue, int iParam, ... ); /* stores a long on a variable by reference */ +extern void hb_stornd( double dValue, int iParam, ... ); /* stores a double on a variable by reference */ + +extern void hb_xinit( void ); /* Initialize fixed memory subsystem */ +extern void hb_xexit( void ); /* Deinitialize fixed memory subsystem */ +extern void * hb_xalloc( ULONG ulSize ); /* allocates memory, returns NULL on failure */ +extern void * hb_xgrab( ULONG ulSize ); /* allocates memory, exists on failure */ +extern void hb_xfree( void * pMem ); /* frees memory */ +extern void * hb_xrealloc( void * pMem, ULONG ulSize ); /* reallocates memory */ +extern ULONG hb_xsize( void * pMem ); /* returns the size of an allocated memory block */ +extern ULONG hb_xquery( USHORT uiMode ); /* Query different types of memory information */ + +#if UINT_MAX == ULONG_MAX + /* NOTE: memcpy/memset can work with ULONG data blocks */ + #define hb_xmemcpy memcpy + #define hb_xmemset memset +#else + /* NOTE: otherwise, the hb_xmemcpy and hb_xmemset functions + will be used to copy and/or set ULONG data blocks */ +extern void * hb_xmemcpy( void * pDestArg, void * pSourceArg, ULONG ulLen ); /* copy more than memcpy() can */ +extern void * hb_xmemset( void * pDestArg, int iFill, ULONG ulLen ); /* set more than memset() can */ +#endif + +/* array management */ +extern BOOL hb_arrayError( PHB_ITEM pArray, ULONG ulIndex, BOOL bAssign ); /* Checks if the passed parameters are valid, launches runtim error if needed */ +extern BOOL hb_arrayNew( PHB_ITEM pItem, ULONG ulLen ); /* creates a new array */ +extern ULONG hb_arrayLen( PHB_ITEM pArray ); /* retrives the array len */ +extern BOOL hb_arrayIsObject( PHB_ITEM pArray ); /* retrives if the array is an object */ +extern BOOL hb_arrayAdd( PHB_ITEM pArray, PHB_ITEM pItemValue ); +extern BOOL hb_arrayIns( PHB_ITEM pArray, ULONG ulIndex ); +extern BOOL hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex ); +extern BOOL hb_arraySize( PHB_ITEM pArray, ULONG ulLen ); /* sets the array total length */ +extern BOOL hb_arrayLast( PHB_ITEM pArray, PHB_ITEM pResult ); +extern BOOL hb_arrayRelease( PHB_ITEM pArray ); /* releases an array - don't call it - use ItemRelease() !!! */ +extern BOOL hb_arraySet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); /* sets an array element */ +extern BOOL hb_arrayGet( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem ); /* retrieves an item */ +extern PHB_ITEM hb_arrayGetItemPtr( PHB_ITEM pArray, ULONG ulIndex ); /* returns pointer to specified element of the array */ +extern ULONG hb_arrayCopyC( PHB_ITEM pArray, ULONG ulIndex, char * szBuffer, ULONG ulLen ); +extern char * hb_arrayGetC( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the string contained on an array element */ +extern char * hb_arrayGetCPtr( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the string pointer on an array element */ +extern ULONG hb_arrayGetCLen( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the string length contained on an array element */ +extern BOOL hb_arrayGetL( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the logical value contained on an array element */ +extern int hb_arrayGetNI( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the int value contained on an array element */ +extern long hb_arrayGetNL( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the long numeric value contained on an array element */ +extern double hb_arrayGetND( PHB_ITEM pArray, ULONG ulIndex ); /* retrieves the double value contained on an array element */ +extern char * hb_arrayGetDS( PHB_ITEM pArray, ULONG ulIndex, char * szDate ); /* retrieves the date value contained on an array element */ +extern USHORT hb_arrayGetType( PHB_ITEM pArray, ULONG ulIndex ); +extern BOOL hb_arrayFill( PHB_ITEM pArray, PHB_ITEM pValue, ULONG * pulStart, ULONG * pulCount ); +extern ULONG hb_arrayScan( PHB_ITEM pArray, PHB_ITEM pValue, ULONG * pulStart, ULONG * pulCount ); +extern BOOL hb_arrayEval( PHB_ITEM pArray, PHB_ITEM bBlock, ULONG * pulStart, ULONG * pulCount ); +extern BOOL hb_arrayCopy( PHB_ITEM pSrcArray, PHB_ITEM pDstArray, ULONG * pulStart, ULONG * pulCount, ULONG * pulTarget ); +extern PHB_ITEM hb_arrayClone( PHB_ITEM pArray ); + +/* string management */ + +extern int hb_stricmp( const char * s1, const char * s2 ); +extern int hb_strnicmp( const char * s1, const char * s2, ULONG ulLen ); +extern char * hb_strupr( char * pszText ); +extern char * hb_strdup( const char * pszText ); +extern BOOL hb_strMatchRegExp( const char * szString, const char * szMask ); +extern BOOL hb_strEmpty( const char * szText, ULONG ulLen ); +extern void hb_strDescend( char * szStringTo, const char * szStringFrom, ULONG ulLen ); +extern ULONG hb_strAt( const char * szSub, ULONG ulSubLen, const char * szText, ULONG ulLen ); +extern char * hb_strUpper( char * szText, ULONG ulLen ); +extern char * hb_strLower( char * szText, ULONG ulLen ); +extern char * hb_strncpyUpper( char * pDest, const char * pSource, ULONG ulLen ); +extern double hb_strVal( const char * szText ); +extern char * hb_strLTrim( const char * szText, ULONG * ulLen ); +extern ULONG hb_strRTrimLen( const char * szText, ULONG ulLen, BOOL bAnySpace ); + +extern double hb_numRound( double dResult, int iDec ); + +/* class management */ +extern void hb_clsReleaseAll( void ); /* releases all defined classes */ + +/* object management */ +extern char * hb_objGetClsName( PHB_ITEM pObject ); /* retrieves an object class name */ +extern PHB_FUNC hb_objGetMethod( PHB_ITEM pObject, PHB_SYMB pSymMsg ); /* returns the method pointer of a object class */ +extern ULONG hb_objHasMsg( PHB_ITEM pObject, char * szString ); + +/* dynamic symbol table management */ +extern PHB_DYNS hb_dynsymGet( char * szName ); /* finds and creates a dynamic symbol if not found */ +extern PHB_DYNS hb_dynsymNew( PHB_SYMB pSymbol ); /* creates a new dynamic symbol based on a local one */ +extern PHB_DYNS hb_dynsymFind( char * szName ); /* finds a dynamic symbol */ +extern PHB_DYNS hb_dynsymFindName( char * szName ); /* converts to uppercase and finds a dynamic symbol */ +extern void hb_dynsymLog( void ); /* displays all dynamic symbols */ +extern void hb_dynsymRelease( void ); /* releases the memory of the dynamic symbol table */ +extern void hb_dynsymEval( PHB_DYNS_FUNC, void * ); /* enumerates all dynamic symbols */ + +/* Command line and environment argument management */ +extern void hb_cmdargInit( int argc, char * argv[] ); +extern int hb_cmdargARGC( void ); +extern char ** hb_cmdargARGV( void ); +extern BOOL hb_cmdargIsInternal( const char * szArg ); +extern BOOL hb_cmdargCheck( const char * pszName ); /* Check if a given internal switch (like //INFO) was set */ +extern char * hb_cmdargString( const char * pszName ); /* Returns the string value of an internal switch (like //TEMPPATH:"C:\") */ +extern int hb_cmdargNum( const char * pszName ); /* Returns the numeric value of an internal switch (like //F:90) */ +extern void hb_cmdargProcessVM( void ); + +/* Symbol management */ +extern PHB_SYMB hb_symbolNew( char * szName ); + +/* Codeblock management */ +extern HB_CODEBLOCK_PTR hb_codeblockNew( BYTE *, USHORT, USHORT *, PHB_SYMB ); +extern HB_CODEBLOCK_PTR hb_codeblockMacroNew( BYTE *, USHORT ); +extern void hb_codeblockDelete( PHB_ITEM ); +extern PHB_ITEM hb_codeblockGetVar( PHB_ITEM, LONG ); +extern PHB_ITEM hb_codeblockGetRef( PHB_ITEM, PHB_ITEM ); +extern void hb_codeblockEvaluate( PHB_ITEM ); +extern void hb_codeblockCopy( PHB_ITEM, PHB_ITEM ); + +/* memvars subsystem */ +extern HB_HANDLE hb_memvarValueNew( PHB_ITEM, BOOL ); +extern HB_VALUE_PTR * hb_memvarValueBaseAddress( void ); +extern void hb_memvarsInit( void ); +extern void hb_memvarsRelease( void ); +extern void hb_memvarValueIncRef( HB_HANDLE ); +extern void hb_memvarValueDecRef( HB_HANDLE ); +extern void hb_memvarSetValue( PHB_SYMB, HB_ITEM_PTR ); +extern ERRCODE hb_memvarGet( HB_ITEM_PTR, PHB_SYMB ); +extern void hb_memvarGetValue( HB_ITEM_PTR, PHB_SYMB ); +extern void hb_memvarGetRefer( HB_ITEM_PTR, PHB_SYMB ); +extern ULONG hb_memvarGetPrivatesBase( void ); +extern void hb_memvarSetPrivatesBase( ULONG ); +extern void hb_memvarNewParameter( PHB_SYMB, HB_ITEM_PTR ); +extern char * hb_memvarGetStrValuePtr( char *, ULONG * ); + +/* console I/O subsystem */ +extern void hb_consoleInitialize( void ); +extern void hb_consoleRelease( void ); +extern char * hb_consoleGetNewLine( void ); +extern void hb_outstd( char * pStr, ULONG ulLen ); +extern void hb_outerr( char * pStr, ULONG ulLen ); +extern USHORT hb_setCursor( BOOL bSetCursor, USHORT usNewCursor ); +extern void hb_tone( double dFrequency, double dDuration ); +extern char * hb_setColor( char * ); + +/* compiler and macro compiler */ +extern char * hb_compReservedName( char * ); + +/* macro compiler */ + +typedef struct HB_CBVAR_ /* This structure holds local variables declared in a codeblock */ +{ + char * szName; + BYTE bType; + struct HB_CBVAR_ * pNext; +} HB_CBVAR, *HB_CBVAR_PTR; + +typedef struct HB_PCODE_INFO_ /* compiled pcode container */ +{ + BYTE * pCode; /* pointer to a memory block where pcode is stored */ + ULONG lPCodeSize; /* total memory size for pcode */ + ULONG lPCodePos; /* actual pcode offset */ + struct HB_PCODE_INFO_ *pPrev; + HB_CBVAR_PTR pLocals; +} HB_PCODE_INFO, * HB_PCODE_INFO_PTR; + +typedef struct HB_MACRO_ /* a macro compiled pcode container */ +{ + char * string; /* compiled string */ + ULONG length; /* length of the string */ + ULONG pos; /* current position inside of compiled string */ + int Flags; /* some flags we may need */ + int status; /* status of compilation */ + HB_PCODE_INFO_PTR pCodeInfo; /* pointer to pcode buffer and info */ + void * pParseInfo; /* data needed by the parser - it should be 'void *' to allow different implementation of macr compiler */ + BOOL bName10; /* are we limiting identifier names to 10 chars ? */ + BOOL bShortCuts; /* are we using logical shorcuts (in OR/AND) */ +} HB_MACRO, * HB_MACRO_PTR; + +extern void hb_macroGetValue( HB_ITEM_PTR ); +extern void hb_macroSetValue( HB_ITEM_PTR ); +extern void hb_macroTextValue( HB_ITEM_PTR ); +extern void hb_macroPushSymbol( HB_ITEM_PTR ); +extern void hb_macroRun( HB_MACRO_PTR ); +extern HB_MACRO_PTR hb_macroCompile( char * ); +extern void hb_macroDelete( HB_MACRO_PTR ); +extern char * hb_macroTextSubst( char *, ULONG * ); +extern BOOL hb_macroIsIdent( char * ); +extern void hb_macroPopAliasedValue( HB_ITEM_PTR, HB_ITEM_PTR ); +extern void hb_macroPushAliasedValue( HB_ITEM_PTR, HB_ITEM_PTR ); +extern char * hb_macroGetType( HB_ITEM_PTR ); + +/* misc */ +extern char * hb_version( USHORT uiMode ); +extern char * hb_valtypeGet( HB_ITEM_PTR ); + +#endif /* HB_APIEXT_H_ */ + diff --git a/harbour/include/errorapi.h b/harbour/include/hbapierr.h similarity index 98% rename from harbour/include/errorapi.h rename to harbour/include/hbapierr.h index 90653dba70..a4c51ba344 100644 --- a/harbour/include/errorapi.h +++ b/harbour/include/hbapierr.h @@ -33,10 +33,10 @@ * */ -#ifndef HB_ERRORAPI_H_ -#define HB_ERRORAPI_H_ +#ifndef HB_APIERR_H_ +#define HB_APIERR_H_ -#include "extend.h" +#include "hbapi.h" #include "error.ch" /* Error codes (returned from hb_errLaunch()) */ @@ -151,4 +151,4 @@ typedef struct HB_ERROR_INFO_ /* set/get current error handler */ extern HB_ERROR_INFO_PTR hb_errorHandler( HB_ERROR_INFO_PTR ); -#endif /* HB_ERRORAPI_H_ */ +#endif /* HB_APIERR_H_ */ diff --git a/harbour/include/filesys.h b/harbour/include/hbapifs.h similarity index 87% rename from harbour/include/filesys.h rename to harbour/include/hbapifs.h index ba504d0540..800ba4b7ff 100644 --- a/harbour/include/filesys.h +++ b/harbour/include/hbapifs.h @@ -51,11 +51,11 @@ * */ -#ifndef HB_FILESYS_H_ -#define HB_FILESYS_H_ +#ifndef HB_APIFS_H_ +#define HB_APIFS_H_ -#include "extend.h" -#include "hbfsapi.h" +#include "hbapi.h" +#include "hbapifs.h" #include "fileio.ch" #define FS_ERROR F_ERROR @@ -109,4 +109,17 @@ extern void hb_fsSetError ( USHORT uiError ); extern USHORT hb_fsWrite ( FHANDLE hFileHandle, BYTE * pBuff, USHORT ulCount ); extern ULONG hb_fsWriteLarge ( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount ); -#endif /* HB_FILESYS_H_ */ +/* Filename support */ +typedef struct +{ + char szBuffer[ _POSIX_PATH_MAX + 3 + 10 ]; /* TOFIX: +10 is for the drive letter support, and should be changed to some manifest constant */ + char * szPath; + char * szName; + char * szExtension; + char * szDrive; +} HB_FNAME, * PHB_FNAME, * HB_FNAME_PTR; + +extern PHB_FNAME hb_fsFNameSplit( char * pszFileName ); /* Split given filename into path, name and extension */ +extern char * hb_fsFNameMerge( char * pszFileName, PHB_FNAME pFileName ); /* This function joins path, name and extension into a string with a filename */ + +#endif /* HB_APIFS_H_ */ diff --git a/harbour/include/gtapi.h b/harbour/include/hbapigt.h similarity index 97% rename from harbour/include/gtapi.h rename to harbour/include/hbapigt.h index 3fb4f4a95c..e5bfd2694d 100644 --- a/harbour/include/gtapi.h +++ b/harbour/include/hbapigt.h @@ -33,13 +33,13 @@ * */ -#ifndef HB_GTAPI_H_ -#define HB_GTAPI_H_ +#ifndef HB_APIGT_H_ +#define HB_APIGT_H_ -#include "extend.h" +#include "hbapi.h" #include "color.ch" -#include "setcurs.h" -#include "box.h" +#include "hbcursor.h" +#include "hbbox.h" /* NOTE: The declaration of hb_gtSetPos(), hb_gtGetPos(), hb_gtWrite(), hb_gtWriteAt(), hb_gtRepChar() differs in parameter types from the @@ -111,4 +111,4 @@ extern BOOL hb_gt_GetBlink( void ); extern void hb_gt_SetBlink( BOOL bBlink ); extern void hb_gt_Replicate( BYTE byChar, ULONG ulLen ); -#endif /* HB_GTAPI_H_ */ +#endif /* HB_APIGT_H_ */ diff --git a/harbour/include/itemapi.h b/harbour/include/hbapiitm.h similarity index 98% rename from harbour/include/itemapi.h rename to harbour/include/hbapiitm.h index 125b4b5394..6940413e95 100644 --- a/harbour/include/itemapi.h +++ b/harbour/include/hbapiitm.h @@ -33,10 +33,10 @@ * */ -#ifndef HB_ITEMAPI_H_ -#define HB_ITEMAPI_H_ +#ifndef HB_APIITM_H_ +#define HB_APIITM_H_ -#include "extend.h" +#include "hbapi.h" #define HB_EVAL_PARAM_MAX_ 9 @@ -103,4 +103,4 @@ extern char * hb_itemStr ( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pD extern char * hb_itemString ( PHB_ITEM pItem, ULONG * ulLen, BOOL * bFreeReq ); /* Convert any scalar to a string */ extern PHB_ITEM hb_itemValToStr ( PHB_ITEM pItem ); /* Convert any scalar to a string */ -#endif /* HB_ITEMAPI_H_ */ +#endif /* HB_APIITM_H_ */ diff --git a/harbour/include/langapi.h b/harbour/include/hbapilng.h similarity index 97% rename from harbour/include/langapi.h rename to harbour/include/hbapilng.h index 60612ba2f7..9158ea73bf 100644 --- a/harbour/include/langapi.h +++ b/harbour/include/hbapilng.h @@ -33,8 +33,8 @@ * */ -#ifndef HB_LANGAPI_H_ -#define HB_LANGAPI_H_ +#ifndef HB_APILNG_H_ +#define HB_APILNG_H_ #define HB_LANG_TEXT_DATEFMT 0 #define HB_LANG_TEXT_YESCHAR 1 @@ -103,4 +103,4 @@ extern char * hb_langDGetErrorIntr ( ULONG ulIndex ); extern PHB_LANG hb_langNew ( void ); extern void hb_langDelete ( PHB_LANG lang ); -#endif /* HB_LANGAPI_H_ */ +#endif /* HB_APILNG_H_ */ diff --git a/harbour/include/mouseapi.h b/harbour/include/hbapimou.h similarity index 96% rename from harbour/include/mouseapi.h rename to harbour/include/hbapimou.h index c391c74a06..420649cecd 100644 --- a/harbour/include/mouseapi.h +++ b/harbour/include/hbapimou.h @@ -33,10 +33,10 @@ * */ -#ifndef HB_MOUSEAPI_H_ -#define HB_MOUSEAPI_H_ +#ifndef HB_APIMOU_H_ +#define HB_APIMOU_H_ -#include "extend.h" +#include "hbapi.h" /* Public interface. These should never change, only be added to. */ @@ -68,4 +68,4 @@ extern int hb_mouse_CountButton( void ); extern void hb_mouse_SetBounds( int iTop, int iLeft, int iBottom, int iRight ); extern void hb_mouse_GetBounds( int * piTop, int * piLeft, int * piBottom, int * piRight ); -#endif /* HB_MOUSEAPI_H_ */ +#endif /* HB_APIMOU_H_ */ diff --git a/harbour/include/rddapi.h b/harbour/include/hbapirdd.h similarity index 99% rename from harbour/include/rddapi.h rename to harbour/include/hbapirdd.h index 4171265c60..8e58975668 100644 --- a/harbour/include/rddapi.h +++ b/harbour/include/hbapirdd.h @@ -33,10 +33,10 @@ * */ -#ifndef HB_RDDAPI_H_ -#define HB_RDDAPI_H_ +#ifndef HB_APIRDD_H_ +#define HB_APIRDD_H_ -#include "filesys.h" +#include "hbapifs.h" /* RDD virtual machine integration functions */ @@ -1094,4 +1094,4 @@ extern ERRCODE hb_rddDisinherit( BYTE * drvName ); extern USHORT hb_rddExtendType( USHORT fieldType ); extern USHORT hb_rddFieldType( USHORT extendType ); -#endif /* HB_RDDAPI_H_ */ +#endif /* HB_APIRDD_H_ */ diff --git a/harbour/include/box.h b/harbour/include/hbbox.h similarity index 100% rename from harbour/include/box.h rename to harbour/include/hbbox.h diff --git a/harbour/include/compiler.h b/harbour/include/hbcomp.h similarity index 99% rename from harbour/include/compiler.h rename to harbour/include/hbcomp.h index 232b017bc4..e26e768600 100644 --- a/harbour/include/compiler.h +++ b/harbour/include/hbcomp.h @@ -33,8 +33,8 @@ * */ -#ifndef HB_COMPILER_H_ -#define HB_COMPILER_H_ +#ifndef HB_COMP_H_ +#define HB_COMP_H_ #include #include @@ -43,12 +43,12 @@ #include #include "hbsetup.h" -#include "extend.h" -#include "pcode.h" /* pcode values */ +#include "hbapi.h" +#include "hbpcode.h" /* pcode values */ #include "hberrors.h" #include "hbpp.h" #include "hbver.h" -#include "expropt.h" +#include "hbexprop.h" /* compiler related declarations */ @@ -352,5 +352,5 @@ extern char * hb_comp_szWarnings[]; #define HB_EXITLEVEL_SETEXIT 1 #define HB_EXITLEVEL_DELTARGET 2 -#endif /* HB_COMPILER_H_ */ +#endif /* HB_COMP_H_ */ diff --git a/harbour/include/setcurs.h b/harbour/include/hbcursor.h similarity index 95% rename from harbour/include/setcurs.h rename to harbour/include/hbcursor.h index 31c0ad4b5b..fb8c8352bf 100644 --- a/harbour/include/setcurs.h +++ b/harbour/include/hbcursor.h @@ -33,8 +33,8 @@ * */ -#ifndef HB_SETCURS_H_ -#define HB_SETCURS_H_ +#ifndef HB_CURSOR_H_ +#define HB_CURSOR_H_ typedef enum { @@ -45,4 +45,4 @@ typedef enum SC_SPECIAL2 = 4 /* Upper half block */ } HB_cursor_enum; -#endif /* HB_SETCURS_H_ */ +#endif /* HB_CURSOR_H_ */ diff --git a/harbour/include/dates.h b/harbour/include/hbdate.h similarity index 97% rename from harbour/include/dates.h rename to harbour/include/hbdate.h index c8b6eeb50e..9991500009 100644 --- a/harbour/include/dates.h +++ b/harbour/include/hbdate.h @@ -33,8 +33,8 @@ * */ -#ifndef HB_DATES_H_ -#define HB_DATES_H_ +#ifndef HB_DATE_H_ +#define HB_DATE_H_ /* In msgxxx.c modules */ extern char * hb_monthsname []; @@ -52,4 +52,4 @@ extern void hb_dateStrGet( const char * szDate, long * plDay, long * plMonth extern char * hb_dateDecStr( char * szDate, long lJulian ); extern long hb_dateEncStr( char * szDate ); -#endif /* HB_DATES_H_ */ +#endif /* HB_DATE_H_ */ diff --git a/harbour/include/hbexpr.c b/harbour/include/hbexpr.c index 1644a720d1..3f63188f8c 100644 --- a/harbour/include/hbexpr.c +++ b/harbour/include/hbexpr.c @@ -33,8 +33,10 @@ * */ +/* TOFIX: Split the code, since MSC8 can't compile it, even in Huge model. */ + /* TODO: - * Correct post- and pre- operations to correctly handle the following code + * - Correct post- and pre- operations to correctly handle the following code * a[ i++ ]++ * Notice: in current implementation (an in Clipper too) 'i++' is evaluated * two times! This causes that the new value (after incrementation) is @@ -42,7 +44,7 @@ */ #include -#include "compiler.h" +#include "hbcomp.h" /* memory allocation */ diff --git a/harbour/include/expropt.h b/harbour/include/hbexprop.h similarity index 98% rename from harbour/include/expropt.h rename to harbour/include/hbexprop.h index 65359c0976..deed63603d 100644 --- a/harbour/include/expropt.h +++ b/harbour/include/hbexprop.h @@ -33,10 +33,10 @@ * */ -#ifndef HB_EXPROPT_H_ -#define HB_EXPROPT_H_ +#ifndef HB_EXPROP_H_ +#define HB_EXPROP_H_ -#include "extend.h" +#include "hbapi.h" typedef struct HB_EXPR_ { @@ -213,4 +213,4 @@ HB_EXPR_PTR hb_compExprCBVarAdd( HB_EXPR_PTR, char *, BYTE ); #endif -#endif /* HB_EXPROPT_H_ */ +#endif /* HB_EXPROP_H_ */ diff --git a/harbour/include/hbfsapi.h b/harbour/include/hbfsapi.h deleted file mode 100644 index c46b3298a4..0000000000 --- a/harbour/include/hbfsapi.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Header file for the common Filesys API - * - * Copyright 1999 Victor Szakats - * www - http://www.harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version, with one exception: - * - * The exception is that if you link the Harbour Runtime Library (HRL) - * and/or the Harbour Virtual Machine (HVM) with other files to produce - * an executable, this does not by itself cause the resulting executable - * to be covered by the GNU General Public License. Your use of that - * executable is in no way restricted on account of linking the HRL - * and/or HVM code into it. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit - * their web site at http://www.gnu.org/). - * - */ - -#ifndef HB_FSAPI_H_ -#define HB_FSAPI_H_ - -#include "extend.h" - -/* Filename support */ -typedef struct -{ - char szBuffer[ _POSIX_PATH_MAX + 3 + 10 ]; /* TOFIX: +10 is for the drive letter support, and should be changed to some manifest constant */ - char * szPath; - char * szName; - char * szExtension; - char * szDrive; -} HB_FNAME, * PHB_FNAME, * HB_FNAME_PTR; - -extern PHB_FNAME hb_fsFNameSplit( char * pszFileName ); /* Split given filename into path, name and extension */ -extern char * hb_fsFNameMerge( char * pszFileName, PHB_FNAME pFileName ); /* This function joins path, name and extension into a string with a filename */ - -#endif /* HB_FSAPI_H_ */ - diff --git a/harbour/include/init.h b/harbour/include/hbinit.h similarity index 100% rename from harbour/include/init.h rename to harbour/include/hbinit.h diff --git a/harbour/include/inkey.h b/harbour/include/hbinkey.h similarity index 100% rename from harbour/include/inkey.h rename to harbour/include/hbinkey.h diff --git a/harbour/include/macro.h b/harbour/include/hbmacro.h similarity index 94% rename from harbour/include/macro.h rename to harbour/include/hbmacro.h index 58fb09dc54..39fca29174 100644 --- a/harbour/include/macro.h +++ b/harbour/include/hbmacro.h @@ -49,12 +49,12 @@ #define HB_MACRO_PARAM pMacro #include "hbsetup.h" -#include "extend.h" -#include "ctoharb.h" -#include "pcode.h" /* pcode values */ -#include "itemapi.h" -#include "errorapi.h" -#include "expropt.h" +#include "hbapi.h" +#include "hbvm.h" +#include "hbpcode.h" /* pcode values */ +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbexprop.h" /* flags for compilation process */ @@ -98,4 +98,4 @@ void hb_compGenJumpHere( ULONG, HB_MACRO_DECL ); #define HB_MACRO_DATA ( (HB_MACRO_PTR) HB_MACRO_PARAM ) #define HB_PCODE_DATA ( HB_MACRO_DATA->pCodeInfo ) -#endif +#endif /* HB_MACRO_H_ */ diff --git a/harbour/include/pcode.h b/harbour/include/hbpcode.h similarity index 100% rename from harbour/include/pcode.h rename to harbour/include/hbpcode.h diff --git a/harbour/include/hbpp.h b/harbour/include/hbpp.h index f13bb138ed..eedf5875bb 100644 --- a/harbour/include/hbpp.h +++ b/harbour/include/hbpp.h @@ -37,8 +37,8 @@ #define HB_PP_H_ #include "hbdefs.h" -#include "hbfsapi.h" -#include "extend.h" +#include "hbapifs.h" +#include "hbapi.h" #include "hberrors.h" #include "hbver.h" diff --git a/harbour/include/set.h b/harbour/include/hbset.h similarity index 99% rename from harbour/include/set.h rename to harbour/include/hbset.h index 957e4ebde2..e1a39f3efa 100644 --- a/harbour/include/set.h +++ b/harbour/include/hbset.h @@ -83,9 +83,9 @@ #define HB_SET_H_ #include "hbdefs.h" -#include "filesys.h" -#include "gtapi.h" -#include "inkey.h" +#include "hbapifs.h" +#include "hbapigt.h" +#include "hbinkey.h" typedef enum { diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index af1e7ad35b..e0d35c7d9a 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -54,7 +54,7 @@ * hb_vm_SymbolInit_ * (for example for myfirst.prg it will be: 'hb_vm_SymbolInit_MYFIRST' * The generation of this function is performed by the macro called - * HB_CALL_ON_STARTUP that is defined in 'init.h' + * HB_CALL_ON_STARTUP that is defined in 'hbinit.h' * * By default we are using extensions to ANSI C (symbol is not defined) */ diff --git a/harbour/include/hbver.h b/harbour/include/hbver.h index 8d26730fdd..cb9d533e17 100644 --- a/harbour/include/hbver.h +++ b/harbour/include/hbver.h @@ -87,10 +87,10 @@ extern int hb_day; #define hb_major 0 /* Major version number */ #define hb_minor 0 /* Minor version number */ -#define hb_revision "a" /* Revision letter */ +#define hb_revision "b" /* Revision letter */ #define hb_build 31 /* Build number */ #define hb_year 2000 /* Build year */ -#define hb_month 02 /* Build month */ +#define hb_month 03 /* Build month */ #define hb_day 02 /* Build day */ #endif /* HB_VER_H_ */ diff --git a/harbour/include/ctoharb.h b/harbour/include/hbvm.h similarity index 97% rename from harbour/include/ctoharb.h rename to harbour/include/hbvm.h index 456367cbc5..1726828475 100644 --- a/harbour/include/ctoharb.h +++ b/harbour/include/hbvm.h @@ -33,10 +33,10 @@ * */ -#ifndef HB_CTOHARB_H_ -#define HB_CTOHARB_H_ +#ifndef HB_VM_H_ +#define HB_VM_H_ -#include "extend.h" +#include "hbapi.h" /* Harbour virtual machine init/exit functions */ extern void hb_vmInit( BOOL bStartMainProc ); @@ -85,4 +85,5 @@ extern void hb_vmPushSymbol( PHB_SYMB pSym ); /* pushes a function pointer on extern void hb_stackDispCall( void ); extern void hb_stackPop( void ); /* pops an item from the stack */ -#endif /* HB_CTOHARB_H_ */ \ No newline at end of file +#endif /* HB_VM_H_ */ + diff --git a/harbour/include/hb_vmpub.h b/harbour/include/hbvmpub.h similarity index 99% rename from harbour/include/hb_vmpub.h rename to harbour/include/hbvmpub.h index 78f58f8069..634c41e797 100644 --- a/harbour/include/hb_vmpub.h +++ b/harbour/include/hbvmpub.h @@ -37,7 +37,7 @@ #define HB_VMPUB_H_ #include "hbdefs.h" -#include "pcode.h" +#include "hbpcode.h" struct _HB_DYNS; diff --git a/harbour/makefile.bc b/harbour/makefile.bc index 8733fd0283..2289e7c7e7 100644 --- a/harbour/makefile.bc +++ b/harbour/makefile.bc @@ -7,7 +7,7 @@ # Merge duplicate strings BCC_OPT = $(BCC_OPT) -d -HARBOUR_OPT = $(HARBOUR_OPT) -q0 -w +HARBOUR_OPT = $(HARBOUR_OPT) -q0 -w -es2 !if $d(B16) diff --git a/harbour/makefile.vc b/harbour/makefile.vc index 882f68505d..278d612003 100644 --- a/harbour/makefile.vc +++ b/harbour/makefile.vc @@ -69,7 +69,7 @@ RUNNER_DLL=$(BIN_DIR)\runjava.dll MACRO_LIB=$(LIB_DIR)\macro.lib REGRESS_EXE=$(BIN_DIR)\rt_main.exe HBDOC_EXE=$(BIN_DIR)\hbdoc.exe -HARBOURFLAGS=-iinclude -n -q0 -w +HARBOURFLAGS=-iinclude -n -q0 -w -es2 LIBS=$(HARBOUR_LIB) $(MACRO_LIB) $(TERMINAL_LIB) $(TOOLS_LIB) $(DEBUG_LIB) $(PP_LIB) $(DBFNTX_LIB) $(DBFCDX_LIB) $(RUNNER_LIB) $(MACRO_LIB) diff --git a/harbour/source/common/hbfsapi.c b/harbour/source/common/hbfsapi.c index eb7ecf8bcf..55a490a500 100644 --- a/harbour/source/common/hbfsapi.c +++ b/harbour/source/common/hbfsapi.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "hbfsapi.h" +#include "hbapi.h" +#include "hbapifs.h" /* Split given filename into path, name and extension, plus determine drive */ PHB_FNAME hb_fsFNameSplit( char * pszFileName ) diff --git a/harbour/source/common/hbstr.c b/harbour/source/common/hbstr.c index f12a3b61f6..f983cf1ea3 100644 --- a/harbour/source/common/hbstr.c +++ b/harbour/source/common/hbstr.c @@ -35,7 +35,7 @@ #include /* Needed by hb_strupr() */ -#include "extend.h" +#include "hbapi.h" ULONG hb_strAt( const char * szSub, ULONG ulSubLen, const char * szText, ULONG ulLen ) { diff --git a/harbour/source/common/reserved.c b/harbour/source/common/reserved.c index dcc7a93794..f8bc95d3f7 100644 --- a/harbour/source/common/reserved.c +++ b/harbour/source/common/reserved.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" /* Table with reserved functions names * NOTE: THIS TABLE MUST BE SORTED ALPHABETICALLY diff --git a/harbour/source/compiler/cmdcheck.c b/harbour/source/compiler/cmdcheck.c index abbc1bae82..81232afa3e 100644 --- a/harbour/source/compiler/cmdcheck.c +++ b/harbour/source/compiler/cmdcheck.c @@ -51,7 +51,7 @@ #include -#include "compiler.h" +#include "hbcomp.h" /* TODO: Add support for this compiler switches -m -r -t || getenv( "TMP" ) -u diff --git a/harbour/source/compiler/genc.c b/harbour/source/compiler/genc.c index a22e1faf5e..f3c7d83d4c 100644 --- a/harbour/source/compiler/genc.c +++ b/harbour/source/compiler/genc.c @@ -33,7 +33,7 @@ * */ -#include "compiler.h" +#include "hbcomp.h" void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language output */ { @@ -69,8 +69,8 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou hb_build, hb_revision, hb_year, hb_month, hb_day ); fprintf( yyc, " * Generated C source code\n */\n\n" ); - fprintf( yyc, "#include \"hb_vmpub.h\"\n" ); - fprintf( yyc, "#include \"init.h\"\n\n\n" ); + fprintf( yyc, "#include \"hbvmpub.h\"\n" ); + fprintf( yyc, "#include \"hbinit.h\"\n\n\n" ); if( ! hb_comp_bStartProc ) pFunc = pFunc->pNext; /* No implicit starting procedure */ diff --git a/harbour/source/compiler/genhrb.c b/harbour/source/compiler/genhrb.c index 6663720242..143e606f8e 100644 --- a/harbour/source/compiler/genhrb.c +++ b/harbour/source/compiler/genhrb.c @@ -33,7 +33,7 @@ * */ -#include "compiler.h" +#include "hbcomp.h" #define SYM_NOLINK 0 /* Symbol does not have to be linked */ #define SYM_FUNC 1 /* Defined function */ diff --git a/harbour/source/compiler/genjava.c b/harbour/source/compiler/genjava.c index 29dc1937fb..207c3a3411 100644 --- a/harbour/source/compiler/genjava.c +++ b/harbour/source/compiler/genjava.c @@ -34,9 +34,9 @@ * */ -#include "extend.h" -#include "compiler.h" -#include "pcode.h" +#include "hbapi.h" +#include "hbcomp.h" +#include "hbpcode.h" #include "hberrors.h" #include "hbver.h" diff --git a/harbour/source/compiler/genobj32.c b/harbour/source/compiler/genobj32.c index c7b4c859d1..5ed67f3207 100644 --- a/harbour/source/compiler/genobj32.c +++ b/harbour/source/compiler/genobj32.c @@ -33,9 +33,9 @@ * */ -#include "extend.h" -#include "compiler.h" -#include "pcode.h" +#include "hbapi.h" +#include "hbcomp.h" +#include "hbpcode.h" #include "hberrors.h" static ULONG GetSymbolsSize( void ); diff --git a/harbour/source/compiler/genpas.c b/harbour/source/compiler/genpas.c index 78a3c2f2b9..31a6766193 100644 --- a/harbour/source/compiler/genpas.c +++ b/harbour/source/compiler/genpas.c @@ -33,9 +33,9 @@ * */ -#include "extend.h" -#include "compiler.h" -#include "pcode.h" +#include "hbapi.h" +#include "hbcomp.h" +#include "hbpcode.h" #include "hberrors.h" void hb_compGenPascal( PHB_FNAME pFileName ) diff --git a/harbour/source/compiler/genrc.c b/harbour/source/compiler/genrc.c index 2db1fbb936..38a08c3c73 100644 --- a/harbour/source/compiler/genrc.c +++ b/harbour/source/compiler/genrc.c @@ -33,9 +33,9 @@ * */ -#include "extend.h" -#include "compiler.h" -#include "pcode.h" +#include "hbapi.h" +#include "hbcomp.h" +#include "hbpcode.h" #include "hberrors.h" void hb_compGenRC( PHB_FNAME pFileName ) diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index a89e9a726a..1cb0f53e2d 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -35,7 +35,7 @@ #include /* required for allocating and freeing memory */ -#include "compiler.h" +#include "hbcomp.h" #if defined(DOS) && defined(__BORLANDC__) #include diff --git a/harbour/source/compiler/harbour.l b/harbour/source/compiler/harbour.l index 5259869db7..9b8bba70fe 100644 --- a/harbour/source/compiler/harbour.l +++ b/harbour/source/compiler/harbour.l @@ -40,7 +40,7 @@ #include #include #include -#include "compiler.h" +#include "hbcomp.h" #include "harboury.h" #include "hbsetup.h" /* main configuration file */ #include "hberrors.h" diff --git a/harbour/source/compiler/harbour.y b/harbour/source/compiler/harbour.y index b216914193..15255e432b 100644 --- a/harbour/source/compiler/harbour.y +++ b/harbour/source/compiler/harbour.y @@ -42,7 +42,7 @@ #include -#include "compiler.h" +#include "hbcomp.h" /* Compile using: bison -d -v harbour.y */ @@ -1557,16 +1557,17 @@ BOOL hb_compInclude( char * szFileName, PATHNAMES * pSearch ) int yywrap( void ) /* handles the EOF of the currently processed file */ { - void * pLast; - if( hb_comp_files.iFiles == 1 ) { hb_xfree( hb_comp_files.pLast->pBuffer ); return 1; /* we have reached the main EOF */ } + /* else { + void * pLast; + pLast = hb_comp_files.pLast; fclose( hb_comp_files.pLast->handle ); hb_comp_files.pLast = ( PFILE ) ( ( PFILE ) hb_comp_files.pLast )->pPrev; @@ -1587,6 +1588,8 @@ int yywrap( void ) /* handles the EOF of the currently processed file */ return 0; } */ /* we close the currently include file and continue */ + + return 0; } /* ************************************************************************* */ diff --git a/harbour/source/compiler/hbfunchk.c b/harbour/source/compiler/hbfunchk.c index fa54d872f6..4b83e79fc1 100644 --- a/harbour/source/compiler/hbfunchk.c +++ b/harbour/source/compiler/hbfunchk.c @@ -33,7 +33,7 @@ * */ -#include "compiler.h" +#include "hbcomp.h" /* NOTE: iMinParam = -1, means no checking * iMaxParam = -1, means no upper limit diff --git a/harbour/source/compiler/hbgenerr.c b/harbour/source/compiler/hbgenerr.c index a857807e6a..e63ec63d2e 100644 --- a/harbour/source/compiler/hbgenerr.c +++ b/harbour/source/compiler/hbgenerr.c @@ -33,7 +33,7 @@ * */ -#include "compiler.h" +#include "hbcomp.h" /* Table with parse errors */ char * hb_comp_szErrors[] = diff --git a/harbour/source/compiler/hbpcode.c b/harbour/source/compiler/hbpcode.c index fa5cc18c47..2fa07fbcd8 100644 --- a/harbour/source/compiler/hbpcode.c +++ b/harbour/source/compiler/hbpcode.c @@ -33,7 +33,7 @@ * */ -#include "compiler.h" +#include "hbcomp.h" void hb_compGenPCode1( BYTE byte ) { diff --git a/harbour/source/compiler/hbusage.c b/harbour/source/compiler/hbusage.c index 4b7e49ad0b..9f2faed104 100644 --- a/harbour/source/compiler/hbusage.c +++ b/harbour/source/compiler/hbusage.c @@ -33,7 +33,7 @@ * */ -#include "compiler.h" +#include "hbcomp.h" /* * Prints available options diff --git a/harbour/source/macro/macro.c b/harbour/source/macro/macro.c index 03ef6202ba..c0da91563b 100644 --- a/harbour/source/macro/macro.c +++ b/harbour/source/macro/macro.c @@ -37,7 +37,7 @@ */ #define HB_MACRO_SUPPORT -#include "macro.h" +#include "hbmacro.h" /* TODO: * include these variables in SET subsystem ? diff --git a/harbour/source/macro/macro.l b/harbour/source/macro/macro.l index ea8942a33c..f6fbd78324 100644 --- a/harbour/source/macro/macro.l +++ b/harbour/source/macro/macro.l @@ -51,7 +51,7 @@ NOTE: -C controls the speed/size ratio of generated scanner #include #include #include -#include "macro.h" +#include "hbmacro.h" #include "macroy.h" #include "hbsetup.h" /* main configuration file */ #include "hberrors.h" diff --git a/harbour/source/macro/macro.y b/harbour/source/macro/macro.y index 8af5496b95..db4e165a08 100644 --- a/harbour/source/macro/macro.y +++ b/harbour/source/macro/macro.y @@ -45,7 +45,7 @@ */ #define HB_MACRO_SUPPORT -#include "macro.h" +#include "hbmacro.h" /* Compile using: bison -d -p hb_comp macro.y */ diff --git a/harbour/source/pp/hbpp.c b/harbour/source/pp/hbpp.c index d98f630904..0d4dcf0016 100644 --- a/harbour/source/pp/hbpp.c +++ b/harbour/source/pp/hbpp.c @@ -62,7 +62,7 @@ #include "hbpp.h" #include "hberrors.h" -#include "compiler.h" +#include "hbcomp.h" #if defined( OS_UNIX_COMPATIBLE ) #include diff --git a/harbour/source/pp/hbppint.c b/harbour/source/pp/hbppint.c index 603b0285fd..b3fe330533 100644 --- a/harbour/source/pp/hbppint.c +++ b/harbour/source/pp/hbppint.c @@ -47,7 +47,7 @@ #include #include "hbpp.h" #include "hberrors.h" -#include "compiler.h" +#include "hbcomp.h" extern FILES hb_comp_files; extern int hb_comp_iLine; /* currently parsed file line number */ diff --git a/harbour/source/pp/hbpplib.c b/harbour/source/pp/hbpplib.c index 90631331ff..57af64080e 100644 --- a/harbour/source/pp/hbpplib.c +++ b/harbour/source/pp/hbpplib.c @@ -46,10 +46,10 @@ #include #include "hbpp.h" -#include "compiler.h" -#include "extend.h" -#include "itemapi.h" -#include "errorapi.h" +#include "hbcomp.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" #include "hberrors.h" PATHNAMES * hb_comp_pIncludePath = NULL; diff --git a/harbour/source/pp/stdalone/hbpp.c b/harbour/source/pp/stdalone/hbpp.c index e7a7189633..2c85cc8a0d 100644 --- a/harbour/source/pp/stdalone/hbpp.c +++ b/harbour/source/pp/stdalone/hbpp.c @@ -51,7 +51,7 @@ #include "hbpp.h" #include "hberrors.h" #include "hbver.h" -#include "compiler.h" +#include "hbcomp.h" static int hb_pp_Parse( FILE * handl_o ); static void AddSearchPath( char * szPath, PATHNAMES * * pSearchList ); diff --git a/harbour/source/rdd/dbcmd.c b/harbour/source/rdd/dbcmd.c index 62bff7ec91..f0c66a5438 100644 --- a/harbour/source/rdd/dbcmd.c +++ b/harbour/source/rdd/dbcmd.c @@ -34,15 +34,15 @@ */ #include -#include "extend.h" -#include "itemapi.h" -#include "errorapi.h" -#include "rddapi.h" -#include "set.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbapirdd.h" +#include "hbset.h" +#include "hbvm.h" #include "rddsys.ch" #include "set.ch" -#include "langapi.h" +#include "hbapilng.h" #define HARBOUR_MAX_RDD_DRIVERNAME_LENGTH 32 #define HARBOUR_MAX_RDD_ALIAS_LENGTH 32 diff --git a/harbour/source/rdd/dbf1.c b/harbour/source/rdd/dbf1.c index 775ddc1a78..d741250b80 100644 --- a/harbour/source/rdd/dbf1.c +++ b/harbour/source/rdd/dbf1.c @@ -37,15 +37,15 @@ #include #include -#include "extend.h" -#include "itemapi.h" -#include "init.h" -#include "rddapi.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbinit.h" +#include "hbapirdd.h" #include "rddsys.ch" -#include "errorapi.h" -#include "dates.h" -#include "langapi.h" -#include "ctoharb.h" +#include "hbapierr.h" +#include "hbdate.h" +#include "hbapilng.h" +#include "hbvm.h" typedef struct _DBFHEADER { diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index 9d3fd41dfb..895162450c 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -36,13 +36,13 @@ #define SUPERTABLE ( &cdxSuper ) #include -#include "extend.h" -#include "init.h" -#include "itemapi.h" -#include "rddapi.h" +#include "hbapi.h" +#include "hbinit.h" +#include "hbapiitm.h" +#include "hbapirdd.h" #include "rddsys.ch" -#include "errorapi.h" -#include "langapi.h" +#include "hbapierr.h" +#include "hbapilng.h" typedef struct _DBFHEADER diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index c9448c5acf..23f7b0f869 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -35,10 +35,10 @@ #define SUPERTABLE ( &ntxSuper ) -#include "extend.h" -#include "init.h" -#include "itemapi.h" -#include "rddapi.h" +#include "hbapi.h" +#include "hbinit.h" +#include "hbapiitm.h" +#include "hbapirdd.h" #include "rddsys.ch" HARBOUR HB__DBFNTX( void ); diff --git a/harbour/source/rdd/delim1.c b/harbour/source/rdd/delim1.c index a3e7b29dbc..4982cb9df3 100644 --- a/harbour/source/rdd/delim1.c +++ b/harbour/source/rdd/delim1.c @@ -35,9 +35,9 @@ #define SUPERTABLE ( &delimSuper ) -#include "extend.h" -#include "init.h" -#include "rddapi.h" +#include "hbapi.h" +#include "hbinit.h" +#include "hbapirdd.h" #include "rddsys.ch" HARBOUR HB__DELIMC( void ); diff --git a/harbour/source/rdd/sdf1.c b/harbour/source/rdd/sdf1.c index 7e37a4665e..7a1533208b 100644 --- a/harbour/source/rdd/sdf1.c +++ b/harbour/source/rdd/sdf1.c @@ -35,9 +35,9 @@ #define SUPERTABLE ( &sdfSuper ) -#include "extend.h" -#include "init.h" -#include "rddapi.h" +#include "hbapi.h" +#include "hbinit.h" +#include "hbapirdd.h" #include "rddsys.ch" HARBOUR HB__SDFC( void ); diff --git a/harbour/source/rtl/arrays.c b/harbour/source/rtl/arrays.c index cc5dbeaf7c..c6079552b5 100644 --- a/harbour/source/rtl/arrays.c +++ b/harbour/source/rtl/arrays.c @@ -47,11 +47,11 @@ * */ -#include "extend.h" -#include "itemapi.h" -#include "errorapi.h" -#include "langapi.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbapilng.h" +#include "hbvm.h" /* * Internal diff --git a/harbour/source/rtl/binnum.c b/harbour/source/rtl/binnum.c index 388e2b0c85..6587a1684f 100644 --- a/harbour/source/rtl/binnum.c +++ b/harbour/source/rtl/binnum.c @@ -46,8 +46,8 @@ * */ -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" HARBOUR HB_BIN2W( void ) { diff --git a/harbour/source/rtl/break.c b/harbour/source/rtl/break.c index b05e0255d8..cac5251280 100644 --- a/harbour/source/rtl/break.c +++ b/harbour/source/rtl/break.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbvm.h" /* NOTE: This function should normally have a parameter count check. But since in Harbour we cannot distinguish between BREAK() function and diff --git a/harbour/source/rtl/classes.c b/harbour/source/rtl/classes.c index 4624d8128b..1777bb26f0 100644 --- a/harbour/source/rtl/classes.c +++ b/harbour/source/rtl/classes.c @@ -65,10 +65,10 @@ * */ -#include "extend.h" -#include "errorapi.h" -#include "itemapi.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbapierr.h" +#include "hbapiitm.h" +#include "hbvm.h" #include "hboo.ch" typedef struct diff --git a/harbour/source/rtl/codebloc.c b/harbour/source/rtl/codebloc.c index 7bd59887bc..6b7c2e72c7 100644 --- a/harbour/source/rtl/codebloc.c +++ b/harbour/source/rtl/codebloc.c @@ -35,9 +35,9 @@ /* The Harbour implementation of codeblocks */ -#include "extend.h" -#include "ctoharb.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbvm.h" +#include "hbapiitm.h" /* Creates the codeblock structure * diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index cfabe73ee0..0629b7dd54 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -64,17 +64,17 @@ * */ -#include "extend.h" -#include "itemapi.h" -#include "errorapi.h" -#include "filesys.h" -#include "dates.h" -#include "set.h" -#include "inkey.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbapifs.h" +#include "hbdate.h" +#include "hbset.h" +#include "hbinkey.h" #include "inkey.ch" -#include "gtapi.h" /* HARBOUR_USE_GTAPI is checked inside gtapi.h, so that +#include "hbapigt.h" /* HARBOUR_USE_GTAPI is checked inside hbapigt.h, so that we can always get the border styles */ -#include "mouseapi.h" +#include "hbapimou.h" #if defined(__GNUC__) && ! defined(__MINGW32__) #include diff --git a/harbour/source/rtl/copyfile.c b/harbour/source/rtl/copyfile.c index a1db28f17a..ee4dd882ff 100644 --- a/harbour/source/rtl/copyfile.c +++ b/harbour/source/rtl/copyfile.c @@ -33,9 +33,9 @@ * */ -#include "extend.h" -#include "errorapi.h" -#include "filesys.h" +#include "hbapi.h" +#include "hbapierr.h" +#include "hbapifs.h" #ifdef OS_UNIX_COMPATIBLE #include diff --git a/harbour/source/rtl/dates.c b/harbour/source/rtl/dates.c index 6399aa695d..202a142e15 100644 --- a/harbour/source/rtl/dates.c +++ b/harbour/source/rtl/dates.c @@ -71,11 +71,11 @@ be ahead of any other #include statements! */ #include "hbwinapi.h" -#include "extend.h" -#include "errorapi.h" -#include "itemapi.h" -#include "set.h" -#include "dates.h" +#include "hbapi.h" +#include "hbapierr.h" +#include "hbapiitm.h" +#include "hbset.h" +#include "hbdate.h" #include #include diff --git a/harbour/source/rtl/descend.c b/harbour/source/rtl/descend.c index 76b41bed68..6a9113f710 100644 --- a/harbour/source/rtl/descend.c +++ b/harbour/source/rtl/descend.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" void hb_strDescend( char * szStringTo, const char * szStringFrom, ULONG ulLen ) { diff --git a/harbour/source/rtl/dir.c b/harbour/source/rtl/dir.c index 63b8a00b51..53f3b43f59 100644 --- a/harbour/source/rtl/dir.c +++ b/harbour/source/rtl/dir.c @@ -110,8 +110,8 @@ #include "hbwinapi.h" #include -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" #include "directry.ch" #if defined(__GNUC__) && ! defined(__MINGW32__) diff --git a/harbour/source/rtl/do.c b/harbour/source/rtl/do.c index 6dc86fdd39..2816d4b1f1 100644 --- a/harbour/source/rtl/do.c +++ b/harbour/source/rtl/do.c @@ -33,10 +33,10 @@ * */ -#include "extend.h" -#include "itemapi.h" -#include "errorapi.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbvm.h" HARBOUR HB_DO( void ) { diff --git a/harbour/source/rtl/empty.c b/harbour/source/rtl/empty.c index a89547b2a0..ea044e071d 100644 --- a/harbour/source/rtl/empty.c +++ b/harbour/source/rtl/empty.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" HARBOUR HB_EMPTY( void ) { diff --git a/harbour/source/rtl/environ.c b/harbour/source/rtl/environ.c index 7ac76bbc5c..3777e8ffd6 100644 --- a/harbour/source/rtl/environ.c +++ b/harbour/source/rtl/environ.c @@ -68,8 +68,8 @@ #endif #endif -#include "extend.h" -#include "errorapi.h" +#include "hbapi.h" +#include "hbapierr.h" #include "hbver.h" #if defined(__TURBOC__) || defined(__BORLANDC__) || defined(_MSC_VER) || defined(__DJGPP__) || defined(__MINGW32__) diff --git a/harbour/source/rtl/errorapi.c b/harbour/source/rtl/errorapi.c index 6bf972ed87..4c293ae6e1 100644 --- a/harbour/source/rtl/errorapi.c +++ b/harbour/source/rtl/errorapi.c @@ -56,16 +56,16 @@ * */ -#include "extend.h" -#include "ctoharb.h" -#include "itemapi.h" -#include "errorapi.h" -#include "langapi.h" +#include "hbapi.h" +#include "hbvm.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbapilng.h" /* This is added to be able to detect a recursive error, and not let Harbour go into an infinite loop, this is an emulated version of the Clipper "Unrecoverable error 650: Processor stack fault" internal error, but - better shows what is really the problem */ + better shows what is really the problem. [vszakats] */ #define HB_ERROR_LAUNCH_MAX 8 static HB_ERROR_INFO_PTR s_errorHandler = NULL; @@ -259,7 +259,7 @@ USHORT hb_errLaunch( PHB_ITEM pError ) /* This error launcher should be used in those situations, where the error handler is expected to return a value to be substituted as the result of - a failed operation. */ + a failed operation. [vszakats] */ /* NOTE: This should only be called when the EF_CANSUBSTITUE flag was set Since it this case the error handler will return the value @@ -783,8 +783,8 @@ USHORT hb_errRT_TOOLS( ULONG ulGenCode, ULONG ulSubCode, char * szDescription, c return uiAction; } -/* NOTE: Use as minimal calls from here, as possible. */ -/* Don't allocate memory from this function. [vszakats] */ +/* NOTE: Use as minimal calls from here, as possible. + Don't allocate memory from this function. [vszakats] */ void hb_errInternal( ULONG ulIntCode, char * szText, char * szPar1, char * szPar2 ) { diff --git a/harbour/source/rtl/extend.c b/harbour/source/rtl/extend.c index 4b305a0f6f..181d253de3 100644 --- a/harbour/source/rtl/extend.c +++ b/harbour/source/rtl/extend.c @@ -47,10 +47,10 @@ * */ -#include "extend.h" -#include "itemapi.h" -#include "set.h" -#include "dates.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbset.h" +#include "hbdate.h" /* NOTE: iParam = -1 can be used to access the return value. */ /* NOTE: iParam = 0 can be used to access the SELF object. */ diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index 3d60f059ae..7dc76d5da2 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -80,10 +80,10 @@ #include "hbwinapi.h" #include -#include "extend.h" -#include "itemapi.h" -#include "filesys.h" -#include "errorapi.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapifs.h" +#include "hbapierr.h" #if defined(__CYGWIN__) #include diff --git a/harbour/source/rtl/fm.c b/harbour/source/rtl/fm.c index 0ffb129937..60c18fe191 100644 --- a/harbour/source/rtl/fm.c +++ b/harbour/source/rtl/fm.c @@ -64,8 +64,8 @@ #include #endif -#include "extend.h" -#include "errorapi.h" +#include "hbapi.h" +#include "hbapierr.h" #include "hbmemory.ch" #if defined(HB_FM_STATISTICS) && !defined(HB_TR_LEVEL) diff --git a/harbour/source/rtl/gt/gt_tpl.c b/harbour/source/rtl/gt/gt_tpl.c index 15e7627d4a..e74d171c8a 100644 --- a/harbour/source/rtl/gt/gt_tpl.c +++ b/harbour/source/rtl/gt/gt_tpl.c @@ -37,7 +37,7 @@ /* TODO: include any standard headers here */ -#include "gtapi.h" +#include "hbapigt.h" void hb_gt_Init( void ) { diff --git a/harbour/source/rtl/gt/gtcrs.c b/harbour/source/rtl/gt/gtcrs.c index 7187adfbb3..7b1b29ec5d 100644 --- a/harbour/source/rtl/gt/gtcrs.c +++ b/harbour/source/rtl/gt/gtcrs.c @@ -36,7 +36,7 @@ #include -#include "gtapi.h" +#include "hbapigt.h" static void gt_GetMaxRC(int* r, int* c); static void gt_GetRC(int* r, int* c); diff --git a/harbour/source/rtl/gt/gtdos.c b/harbour/source/rtl/gt/gtdos.c index bd30ec619a..d9391361f9 100644 --- a/harbour/source/rtl/gt/gtdos.c +++ b/harbour/source/rtl/gt/gtdos.c @@ -54,9 +54,9 @@ #include #include -#include "gtapi.h" -#include "set.h" /* For Ctrl+Break handling */ -#include "ctoharb.h" /* For Ctrl+Break handling */ +#include "hbapigt.h" +#include "hbset.h" /* For Ctrl+Break handling */ +#include "hbvm.h" /* For Ctrl+Break handling */ #if defined(__POWERC) || (defined(__TURBOC__) && !defined(__BORLANDC__)) || \ (defined(__ZTC__) && !defined(__SC__)) diff --git a/harbour/source/rtl/gt/gtos2.c b/harbour/source/rtl/gt/gtos2.c index 55e7c0448e..c73113ff4d 100644 --- a/harbour/source/rtl/gt/gtos2.c +++ b/harbour/source/rtl/gt/gtos2.c @@ -45,7 +45,7 @@ #include #include -#include "gtapi.h" +#include "hbapigt.h" static char hb_gt_GetCellSize( void ); static void hb_gt_SetCursorSize( char start, char end, int visible ); diff --git a/harbour/source/rtl/gt/gtsln.c b/harbour/source/rtl/gt/gtsln.c index 236e46270e..fe45763038 100644 --- a/harbour/source/rtl/gt/gtsln.c +++ b/harbour/source/rtl/gt/gtsln.c @@ -38,7 +38,7 @@ #include -#include "gtapi.h" +#include "hbapigt.h" void hb_gt_Init( void ) { diff --git a/harbour/source/rtl/gt/gtstd.c b/harbour/source/rtl/gt/gtstd.c index 3fd928d3f7..73d05fe4cd 100644 --- a/harbour/source/rtl/gt/gtstd.c +++ b/harbour/source/rtl/gt/gtstd.c @@ -37,7 +37,7 @@ /* TODO: include any standard headers here */ -#include "gtapi.h" +#include "hbapigt.h" static SHORT s_iRow; static SHORT s_iCol; diff --git a/harbour/source/rtl/gt/gtwin.c b/harbour/source/rtl/gt/gtwin.c index b344b994fb..987e28c898 100644 --- a/harbour/source/rtl/gt/gtwin.c +++ b/harbour/source/rtl/gt/gtwin.c @@ -62,9 +62,9 @@ #endif /* __GNUC__ */ #include -#include "gtapi.h" -#include "set.h" /* For Ctrl+Break handling */ -#include "ctoharb.h" /* For Ctrl+Break handling */ +#include "hbapigt.h" +#include "hbset.h" /* For Ctrl+Break handling */ +#include "hbvm.h" /* For Ctrl+Break handling */ #if defined(__IBMCPP__) #undef WORD /* 2 bytes unsigned */ diff --git a/harbour/source/rtl/gtapi.c b/harbour/source/rtl/gtapi.c index 71b809d0f7..09c0fd0527 100644 --- a/harbour/source/rtl/gtapi.c +++ b/harbour/source/rtl/gtapi.c @@ -122,8 +122,8 @@ */ #include -#include "set.h" -#include "gtapi.h" +#include "hbset.h" +#include "hbapigt.h" static SHORT s_iCurrentRow = 0; static SHORT s_iCurrentCol = 0; diff --git a/harbour/source/rtl/hardcr.c b/harbour/source/rtl/hardcr.c index 45d03b81d0..1114acd1fe 100644 --- a/harbour/source/rtl/hardcr.c +++ b/harbour/source/rtl/hardcr.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" #define CHR_HARD1 ( ( char ) HB_CHAR_CR ) diff --git a/harbour/source/rtl/initexit.c b/harbour/source/rtl/initexit.c index 0977fb0e6b..65b497bb7c 100644 --- a/harbour/source/rtl/initexit.c +++ b/harbour/source/rtl/initexit.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbvm.h" HARBOUR HB___QUIT( void ) { diff --git a/harbour/source/rtl/inkey.c b/harbour/source/rtl/inkey.c index 8a1525a2eb..e0fe63a4d0 100644 --- a/harbour/source/rtl/inkey.c +++ b/harbour/source/rtl/inkey.c @@ -107,14 +107,14 @@ #define HB_BREAK_FLAG 256 /* 256, because that's what DJGPP returns Ctrl+Break as. Clipper has no key code 256, so it may as well be used for all the Harbour builds that need it */ -#include "extend.h" -#include "ctoharb.h" -#include "errorapi.h" -#include "itemapi.h" -#include "set.h" -#include "inkey.h" +#include "hbapi.h" +#include "hbvm.h" +#include "hbapierr.h" +#include "hbapiitm.h" +#include "hbset.h" +#include "hbinkey.h" #include "inkey.ch" -#include "init.h" +#include "hbinit.h" #if defined(__TURBOC__) || defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__) #include diff --git a/harbour/source/rtl/isprint.c b/harbour/source/rtl/isprint.c index d340059585..89de2462dd 100644 --- a/harbour/source/rtl/isprint.c +++ b/harbour/source/rtl/isprint.c @@ -37,8 +37,8 @@ be ahead of any other #include statements! */ #include "hbwinapi.h" -#include "extend.h" -#include "filesys.h" +#include "hbapi.h" +#include "hbapifs.h" #if defined(__TURBOC__) || defined(__BORLANDC__) || defined(_MSC_VER) || defined(__DJGPP__) #include diff --git a/harbour/source/rtl/itemapi.c b/harbour/source/rtl/itemapi.c index 856ba361fd..17927e77b7 100644 --- a/harbour/source/rtl/itemapi.c +++ b/harbour/source/rtl/itemapi.c @@ -66,12 +66,12 @@ #include /* For log() */ -#include "extend.h" -#include "itemapi.h" -#include "ctoharb.h" -#include "errorapi.h" -#include "dates.h" -#include "set.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbvm.h" +#include "hbapierr.h" +#include "hbdate.h" +#include "hbset.h" /* DJGPP can sprintf a float that is almost 320 digits long */ #define HB_MAX_DOUBLE_LENGTH 320 diff --git a/harbour/source/rtl/langapi.c b/harbour/source/rtl/langapi.c index a7aad2f65d..d338813c08 100644 --- a/harbour/source/rtl/langapi.c +++ b/harbour/source/rtl/langapi.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "langapi.h" +#include "hbapi.h" +#include "hbapilng.h" static HB_LANG langEN = { diff --git a/harbour/source/rtl/len.c b/harbour/source/rtl/len.c index 7adf5d7c44..6f2636c291 100644 --- a/harbour/source/rtl/len.c +++ b/harbour/source/rtl/len.c @@ -33,9 +33,9 @@ * */ -#include "extend.h" -#include "errorapi.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapierr.h" +#include "hbapiitm.h" HARBOUR HB_LEN( void ) { diff --git a/harbour/source/rtl/math.c b/harbour/source/rtl/math.c index b3745b33e3..302465e583 100644 --- a/harbour/source/rtl/math.c +++ b/harbour/source/rtl/math.c @@ -45,9 +45,9 @@ */ #include -#include "extend.h" -#include "itemapi.h" -#include "errorapi.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" #if defined(__WATCOMC__) #define HB_MATH_HANDLER diff --git a/harbour/source/rtl/memofile.c b/harbour/source/rtl/memofile.c index 6ff87c24ae..a0432f2c2d 100644 --- a/harbour/source/rtl/memofile.c +++ b/harbour/source/rtl/memofile.c @@ -33,9 +33,9 @@ * */ -#include "extend.h" -#include "itemapi.h" -#include "filesys.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapifs.h" /* NOTE: CA-Clipper has 64K (65516 bytes exactly) limit on read, in Harbour this limit is extended, so we are not *stricly* compatible here. diff --git a/harbour/source/rtl/memoline.c b/harbour/source/rtl/memoline.c index 67bca4b7a6..cde1771122 100644 --- a/harbour/source/rtl/memoline.c +++ b/harbour/source/rtl/memoline.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_MEMOLINE( void ) { diff --git a/harbour/source/rtl/memvars.c b/harbour/source/rtl/memvars.c index bedaeef6e3..779392358c 100644 --- a/harbour/source/rtl/memvars.c +++ b/harbour/source/rtl/memvars.c @@ -51,11 +51,11 @@ #include /* for toupper() function */ -#include "extend.h" -#include "itemapi.h" -#include "errorapi.h" -#include "dates.h" /* for __MVSAVE()/__MVRESTORE() */ -#include "filesys.h" /* for __MVSAVE()/__MVRESTORE() */ +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbdate.h" /* for __MVSAVE()/__MVRESTORE() */ +#include "hbapifs.h" /* for __MVSAVE()/__MVRESTORE() */ #include "error.ch" #include "hbmemvar.ch" diff --git a/harbour/source/rtl/mlcount.c b/harbour/source/rtl/mlcount.c index ead9f228e5..413dd2d95a 100644 --- a/harbour/source/rtl/mlcount.c +++ b/harbour/source/rtl/mlcount.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_MLCOUNT( void ) { diff --git a/harbour/source/rtl/mlpos.c b/harbour/source/rtl/mlpos.c index eff5fe1e75..19a341d33e 100644 --- a/harbour/source/rtl/mlpos.c +++ b/harbour/source/rtl/mlpos.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_MLPOS( void ) { diff --git a/harbour/source/rtl/mouse/mousedos.c b/harbour/source/rtl/mouse/mousedos.c index 90bf78c6ae..9ae302e511 100644 --- a/harbour/source/rtl/mouse/mousedos.c +++ b/harbour/source/rtl/mouse/mousedos.c @@ -42,8 +42,8 @@ #include #endif -#include "mouseapi.h" -#include "gtapi.h" +#include "hbapimou.h" +#include "hbapigt.h" /* C callable low-level interface */ diff --git a/harbour/source/rtl/mouse/mouseos2.c b/harbour/source/rtl/mouse/mouseos2.c index 2ff0096a93..709b3a5359 100644 --- a/harbour/source/rtl/mouse/mouseos2.c +++ b/harbour/source/rtl/mouse/mouseos2.c @@ -49,7 +49,7 @@ #define INCL_NOPMAPI /* exclude Presentation Manager Include File */ #include -#include "mouseapi.h" +#include "hbapimou.h" static HMOU s_uMouHandle; /* mouse logical handle */ diff --git a/harbour/source/rtl/mouse/mousestd.c b/harbour/source/rtl/mouse/mousestd.c index 56be6d5c9e..1c7dbd5ce4 100644 --- a/harbour/source/rtl/mouse/mousestd.c +++ b/harbour/source/rtl/mouse/mousestd.c @@ -33,7 +33,7 @@ * */ -#include "mouseapi.h" +#include "hbapimou.h" /* NOTE: This file is a simple stub for those platforms which don't have any kind of mouse support. [vszakats] */ diff --git a/harbour/source/rtl/mouse/mousetpl.c b/harbour/source/rtl/mouse/mousetpl.c index f69e4043c5..d790c40be8 100644 --- a/harbour/source/rtl/mouse/mousetpl.c +++ b/harbour/source/rtl/mouse/mousetpl.c @@ -33,7 +33,7 @@ * */ -#include "mouseapi.h" +#include "hbapimou.h" /* C callable low-level interface */ diff --git a/harbour/source/rtl/mouse/mousewin.c b/harbour/source/rtl/mouse/mousewin.c index 336455387e..1cdd8a84bf 100644 --- a/harbour/source/rtl/mouse/mousewin.c +++ b/harbour/source/rtl/mouse/mousewin.c @@ -40,7 +40,7 @@ #endif /* __GNUC__ */ #include -#include "mouseapi.h" +#include "hbapimou.h" #if defined(__IBMCPP__) #undef WORD /* 2 bytes unsigned */ diff --git a/harbour/source/rtl/mouseapi.c b/harbour/source/rtl/mouseapi.c index ab5088aa9d..465cc1e7f0 100644 --- a/harbour/source/rtl/mouseapi.c +++ b/harbour/source/rtl/mouseapi.c @@ -44,10 +44,10 @@ * */ -#include "extend.h" -#include "itemapi.h" -#include "mouseapi.h" -#include "gtapi.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapimou.h" +#include "hbapigt.h" /* TODO: This level should make sure that if there's no mouse present the functions don't call the low level function, but return some diff --git a/harbour/source/rtl/mtran.c b/harbour/source/rtl/mtran.c index 8a3e205fe1..f60d2c1f82 100644 --- a/harbour/source/rtl/mtran.c +++ b/harbour/source/rtl/mtran.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" #define CHR_HARD1 ( ( char ) HB_CHAR_CR ) #define CHR_HARD2 ( ( char ) HB_CHAR_LF ) diff --git a/harbour/source/rtl/natmsg.c b/harbour/source/rtl/natmsg.c index e6ca43f8aa..fa99a9a7a3 100644 --- a/harbour/source/rtl/natmsg.c +++ b/harbour/source/rtl/natmsg.c @@ -47,8 +47,8 @@ #include -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" /* TODO: Use the Language API to retrieve these strings. */ /* NOTE: Ad-hoc names mostly taken from various Clipper source files. diff --git a/harbour/source/rtl/net.c b/harbour/source/rtl/net.c index fec0f85274..d5cdc6995b 100644 --- a/harbour/source/rtl/net.c +++ b/harbour/source/rtl/net.c @@ -37,7 +37,7 @@ be ahead of any other #include statements! */ #include "hbwinapi.h" -#include "extend.h" +#include "hbapi.h" /* TODO: Implement NETNAME() for other platforms */ /* NOTE: Clipper will only return a maximum of 15 bytes from this function. diff --git a/harbour/source/rtl/oemansi.c b/harbour/source/rtl/oemansi.c index ed036c71fe..14b5b923a2 100644 --- a/harbour/source/rtl/oemansi.c +++ b/harbour/source/rtl/oemansi.c @@ -40,8 +40,8 @@ be ahead of any other #include statements! */ #include "hbwinapi.h" -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" HARBOUR HB_HB_ANSITOOEM( void ) { diff --git a/harbour/source/rtl/oldbox.c b/harbour/source/rtl/oldbox.c index 5cb81a7a4d..afa0759d83 100644 --- a/harbour/source/rtl/oldbox.c +++ b/harbour/source/rtl/oldbox.c @@ -33,7 +33,7 @@ * */ -#include "gtapi.h" +#include "hbapigt.h" HARBOUR HB___BOX( void ) { diff --git a/harbour/source/rtl/oldclear.c b/harbour/source/rtl/oldclear.c index 548cc2c04b..2f89a366dc 100644 --- a/harbour/source/rtl/oldclear.c +++ b/harbour/source/rtl/oldclear.c @@ -33,7 +33,7 @@ * */ -#include "gtapi.h" +#include "hbapigt.h" HARBOUR HB___ATCLEAR( void ) { diff --git a/harbour/source/rtl/pcount.c b/harbour/source/rtl/pcount.c index 2ea7f42618..72bd239e82 100644 --- a/harbour/source/rtl/pcount.c +++ b/harbour/source/rtl/pcount.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_PCOUNT( void ) { diff --git a/harbour/source/rtl/proc.c b/harbour/source/rtl/proc.c index 75ce6423cf..52f431066d 100644 --- a/harbour/source/rtl/proc.c +++ b/harbour/source/rtl/proc.c @@ -44,7 +44,7 @@ * */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_PROCNAME( void ) { diff --git a/harbour/source/rtl/pvalue.c b/harbour/source/rtl/pvalue.c index 55f7f0f803..b18102cfa0 100644 --- a/harbour/source/rtl/pvalue.c +++ b/harbour/source/rtl/pvalue.c @@ -33,9 +33,9 @@ * */ -#include "extend.h" -#include "errorapi.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapierr.h" +#include "hbapiitm.h" HARBOUR HB_HB_PVALUE( void ) { diff --git a/harbour/source/rtl/samples.c b/harbour/source/rtl/samples.c index d408d221ae..4f90a3d976 100644 --- a/harbour/source/rtl/samples.c +++ b/harbour/source/rtl/samples.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" /* NOTE: szTime must be 9 chars large. */ diff --git a/harbour/source/rtl/set.c b/harbour/source/rtl/set.c index 7570fa9043..eef46bf584 100644 --- a/harbour/source/rtl/set.c +++ b/harbour/source/rtl/set.c @@ -191,12 +191,12 @@ */ #include -#include "extend.h" -#include "itemapi.h" -#include "errorapi.h" -#include "filesys.h" -#include "set.h" -#include "inkey.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbapifs.h" +#include "hbset.h" +#include "hbinkey.h" HB_SET_STRUCT hb_set; diff --git a/harbour/source/rtl/setcolor.c b/harbour/source/rtl/setcolor.c index 4e7e1b9dff..91600a797b 100644 --- a/harbour/source/rtl/setcolor.c +++ b/harbour/source/rtl/setcolor.c @@ -33,9 +33,9 @@ * */ -#include "extend.h" -#include "set.h" -#include "gtapi.h" +#include "hbapi.h" +#include "hbset.h" +#include "hbapigt.h" char * hb_setColor( char * szColor ) { diff --git a/harbour/source/rtl/soundex.c b/harbour/source/rtl/soundex.c index 3249d9f94e..e449678ed0 100644 --- a/harbour/source/rtl/soundex.c +++ b/harbour/source/rtl/soundex.c @@ -35,8 +35,8 @@ #include -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" #define SOUNDEX_LEN_MAX 4 diff --git a/harbour/source/rtl/strings.c b/harbour/source/rtl/strings.c index d8c9085bcf..09a43defa6 100644 --- a/harbour/source/rtl/strings.c +++ b/harbour/source/rtl/strings.c @@ -52,11 +52,11 @@ #include -#include "extend.h" -#include "dates.h" -#include "itemapi.h" -#include "errorapi.h" -#include "set.h" +#include "hbapi.h" +#include "hbdate.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbset.h" #define HB_ISSPACE( c ) ( ( c ) == ' ' || \ ( c ) == HB_CHAR_HT || \ diff --git a/harbour/source/rtl/tone.c b/harbour/source/rtl/tone.c index e02b82875f..d7ecdb91da 100644 --- a/harbour/source/rtl/tone.c +++ b/harbour/source/rtl/tone.c @@ -79,8 +79,8 @@ #include #endif -#include "extend.h" -#include "inkey.h" /* For hb_releaseCPU() */ +#include "hbapi.h" +#include "hbinkey.h" /* For hb_releaseCPU() */ #if defined(HARBOUR_GCC_OS2) ULONG DosBeep( ULONG ulFrequency, ULONG ulDuration ); diff --git a/harbour/source/rtl/trace.c b/harbour/source/rtl/trace.c index 2d1014f19e..6024a9b897 100644 --- a/harbour/source/rtl/trace.c +++ b/harbour/source/rtl/trace.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_HB_TRACESTATE( void ) { diff --git a/harbour/source/rtl/transfrm.c b/harbour/source/rtl/transfrm.c index 4d2c18556c..b634de25c0 100644 --- a/harbour/source/rtl/transfrm.c +++ b/harbour/source/rtl/transfrm.c @@ -46,11 +46,11 @@ #include -#include "extend.h" -#include "itemapi.h" -#include "errorapi.h" -#include "dates.h" -#include "set.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbdate.h" +#include "hbset.h" /* Picture function flags */ #define PF_LEFT 0x0001 /* @B */ diff --git a/harbour/source/rtl/type.c b/harbour/source/rtl/type.c index 99444aa2fb..af4346e060 100644 --- a/harbour/source/rtl/type.c +++ b/harbour/source/rtl/type.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "errorapi.h" +#include "hbapi.h" +#include "hbapierr.h" HARBOUR HB_TYPE( void ) { diff --git a/harbour/source/rtl/valtype.c b/harbour/source/rtl/valtype.c index c2be98165a..6375f92584 100644 --- a/harbour/source/rtl/valtype.c +++ b/harbour/source/rtl/valtype.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" char * hb_valtypeGet( HB_ITEM_PTR pItem ) { diff --git a/harbour/source/rtl/word.c b/harbour/source/rtl/word.c index 3e7ceca09f..62a0272a83 100644 --- a/harbour/source/rtl/word.c +++ b/harbour/source/rtl/word.c @@ -33,9 +33,9 @@ * */ -#include "extend.h" -#include "errorapi.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapierr.h" +#include "hbapiitm.h" /* NOTE: The Clipper NG states that WORD() will only work when used in CALL commands parameter list, otherwise it will return diff --git a/harbour/source/rtl/xhelp.c b/harbour/source/rtl/xhelp.c index 9cbebfb576..372953b06c 100644 --- a/harbour/source/rtl/xhelp.c +++ b/harbour/source/rtl/xhelp.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbvm.h" HARBOUR HB___XHELP( void ) { diff --git a/harbour/source/runner/runlib.c b/harbour/source/runner/runlib.c index 1b21cacc86..d973bb3dc0 100644 --- a/harbour/source/runner/runlib.c +++ b/harbour/source/runner/runlib.c @@ -33,12 +33,12 @@ * */ -#include "extend.h" -#include "itemapi.h" -#include "errorapi.h" -#include "filesys.h" -#include "ctoharb.h" -#include "pcode.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbapifs.h" +#include "hbvm.h" +#include "hbpcode.h" /* TODO: Separate the loading/unloading and the caller functions, this way we could also call a specific function name from the diff --git a/harbour/source/tools/asciisum.c b/harbour/source/tools/asciisum.c index 641f3657e3..04a8631d07 100644 --- a/harbour/source/tools/asciisum.c +++ b/harbour/source/tools/asciisum.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_ASCIISUM( void ) { diff --git a/harbour/source/tools/ascpos.c b/harbour/source/tools/ascpos.c index af596b3721..cf30bf159e 100644 --- a/harbour/source/tools/ascpos.c +++ b/harbour/source/tools/ascpos.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_ASCPOS( void ) { diff --git a/harbour/source/tools/atdiff.c b/harbour/source/tools/atdiff.c index 13b8db4332..8439b8db2f 100644 --- a/harbour/source/tools/atdiff.c +++ b/harbour/source/tools/atdiff.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_ATDIFF( void ) { diff --git a/harbour/source/tools/chareven.c b/harbour/source/tools/chareven.c index 758e4f4c7c..2d7550b95f 100644 --- a/harbour/source/tools/chareven.c +++ b/harbour/source/tools/chareven.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_CHAREVEN( void ) { diff --git a/harbour/source/tools/charmix.c b/harbour/source/tools/charmix.c index 368d84f592..489d8560b5 100644 --- a/harbour/source/tools/charmix.c +++ b/harbour/source/tools/charmix.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_CHARMIX( void ) { diff --git a/harbour/source/tools/charodd.c b/harbour/source/tools/charodd.c index 96c4b40e27..9e0272eb84 100644 --- a/harbour/source/tools/charodd.c +++ b/harbour/source/tools/charodd.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_CHARODD( void ) { diff --git a/harbour/source/tools/chrcount.c b/harbour/source/tools/chrcount.c index 9d1d44046d..c6e715c0a2 100644 --- a/harbour/source/tools/chrcount.c +++ b/harbour/source/tools/chrcount.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_CHRCOUNT( void ) { diff --git a/harbour/source/tools/chrfirst.c b/harbour/source/tools/chrfirst.c index 12c05f8993..d381204469 100644 --- a/harbour/source/tools/chrfirst.c +++ b/harbour/source/tools/chrfirst.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_CHRFIRST( void ) { diff --git a/harbour/source/tools/chrtotal.c b/harbour/source/tools/chrtotal.c index bed6bf6776..942d8bef9e 100644 --- a/harbour/source/tools/chrtotal.c +++ b/harbour/source/tools/chrtotal.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_CHRTOTAL( void ) { diff --git a/harbour/source/tools/ctchksum.c b/harbour/source/tools/ctchksum.c index 7aecc5b3fd..7678306f80 100644 --- a/harbour/source/tools/ctchksum.c +++ b/harbour/source/tools/ctchksum.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_CT_CHECKSUM( void ) { diff --git a/harbour/source/tools/ctchrmix.c b/harbour/source/tools/ctchrmix.c index c9f424570d..0d3a87f472 100644 --- a/harbour/source/tools/ctchrmix.c +++ b/harbour/source/tools/ctchrmix.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" /* NOTE: CA-Tools will hang if the second parameter is an empty string */ diff --git a/harbour/source/tools/ctcrypt.c b/harbour/source/tools/ctcrypt.c index 648678af1b..c36e2d2a4d 100644 --- a/harbour/source/tools/ctcrypt.c +++ b/harbour/source/tools/ctcrypt.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_CT_CRYPT( void ) { diff --git a/harbour/source/tools/dates2.c b/harbour/source/tools/dates2.c index 7703d05876..efa8f6018b 100644 --- a/harbour/source/tools/dates2.c +++ b/harbour/source/tools/dates2.c @@ -35,10 +35,10 @@ #include #include -#include "extend.h" -#include "errorapi.h" -#include "itemapi.h" -#include "dates.h" +#include "hbapi.h" +#include "hbapierr.h" +#include "hbapiitm.h" +#include "hbdate.h" static int hb__daysinmonth[ 12 ] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; diff --git a/harbour/source/tools/datesx.c b/harbour/source/tools/datesx.c index 4015d2177f..a25a33dca9 100644 --- a/harbour/source/tools/datesx.c +++ b/harbour/source/tools/datesx.c @@ -2,7 +2,7 @@ * $Id$ */ -#include "extend.h" +#include "hbapi.h" #include HARBOUR HB_DATETIME( void ) diff --git a/harbour/source/tools/dbftools.c b/harbour/source/tools/dbftools.c index d99f4a18bb..ad6330f880 100644 --- a/harbour/source/tools/dbftools.c +++ b/harbour/source/tools/dbftools.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "rddapi.h" +#include "hbapi.h" +#include "hbapirdd.h" HARBOUR HB_FIELDTYPE( void ) { diff --git a/harbour/source/tools/hb_f.c b/harbour/source/tools/hb_f.c index fecdd70dd9..a2bd59bb4a 100644 --- a/harbour/source/tools/hb_f.c +++ b/harbour/source/tools/hb_f.c @@ -35,7 +35,7 @@ /* please run $(HARBOUR)\tests\working\testhbf.prg for testing */ -#include "filesys.h" +#include "hbapifs.h" #define b_size 1024 #define c_size 4096 diff --git a/harbour/source/tools/io.c b/harbour/source/tools/io.c index f6e3475f41..a395c1cced 100644 --- a/harbour/source/tools/io.c +++ b/harbour/source/tools/io.c @@ -2,7 +2,7 @@ * $Id$ */ -#include "extend.h" +#include "hbapi.h" #ifdef DOS #include diff --git a/harbour/source/tools/mathx.c b/harbour/source/tools/mathx.c index 1d636170e9..188db1ebed 100644 --- a/harbour/source/tools/mathx.c +++ b/harbour/source/tools/mathx.c @@ -2,7 +2,7 @@ * $Id$ */ -#include "extend.h" +#include "hbapi.h" #include #ifndef M_PI_2 diff --git a/harbour/source/tools/strcount.c b/harbour/source/tools/strcount.c index e73fd945d4..f9e925505a 100644 --- a/harbour/source/tools/strcount.c +++ b/harbour/source/tools/strcount.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_STRCOUNT( void ) { diff --git a/harbour/source/tools/strcspn.c b/harbour/source/tools/strcspn.c index ae23f9e67b..045d401b96 100644 --- a/harbour/source/tools/strcspn.c +++ b/harbour/source/tools/strcspn.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_STRCSPN( void ) { diff --git a/harbour/source/tools/strdiff.c b/harbour/source/tools/strdiff.c index 449d51a1a0..95272d1e6e 100644 --- a/harbour/source/tools/strdiff.c +++ b/harbour/source/tools/strdiff.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_STRDIFF( void ) { diff --git a/harbour/source/tools/strexpan.c b/harbour/source/tools/strexpan.c index 31cb51d4e9..0c985f0462 100644 --- a/harbour/source/tools/strexpan.c +++ b/harbour/source/tools/strexpan.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_STREXPAND( void ) { diff --git a/harbour/source/tools/strfmt.c b/harbour/source/tools/strfmt.c index 8232050e27..11c11a3c08 100644 --- a/harbour/source/tools/strfmt.c +++ b/harbour/source/tools/strfmt.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" #define HB_STRFORMAT_PARNUM_MAX_ 9 diff --git a/harbour/source/tools/stringsx.c b/harbour/source/tools/stringsx.c index 17afd7d5bc..89d1e82da9 100644 --- a/harbour/source/tools/stringsx.c +++ b/harbour/source/tools/stringsx.c @@ -2,7 +2,7 @@ * $Id$ */ -#include "extend.h" +#include "hbapi.h" /* TODO: search this file for TODO and find 'em! */ diff --git a/harbour/source/tools/strleft.c b/harbour/source/tools/strleft.c index 52d8f36f1d..7a0704019e 100644 --- a/harbour/source/tools/strleft.c +++ b/harbour/source/tools/strleft.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_STRLEFT( void ) { diff --git a/harbour/source/tools/strpbrk.c b/harbour/source/tools/strpbrk.c index 8791fe26cc..41aeb86a33 100644 --- a/harbour/source/tools/strpbrk.c +++ b/harbour/source/tools/strpbrk.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_STRPBRK( void ) { diff --git a/harbour/source/tools/strright.c b/harbour/source/tools/strright.c index fccf426e18..d035023b6b 100644 --- a/harbour/source/tools/strright.c +++ b/harbour/source/tools/strright.c @@ -17,7 +17,7 @@ * public domain. */ -#include "extend.h" +#include "hbapi.h" HARBOUR HB_GT_STRRIGHT( void ) { diff --git a/harbour/source/vm/cmdarg.c b/harbour/source/vm/cmdarg.c index fc8fe15ccb..9bba54eeb0 100644 --- a/harbour/source/vm/cmdarg.c +++ b/harbour/source/vm/cmdarg.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" #include "hbmemory.ch" /* Command line argument management */ diff --git a/harbour/source/vm/debug.c b/harbour/source/vm/debug.c index fa181e6bac..f226a4fd81 100644 --- a/harbour/source/vm/debug.c +++ b/harbour/source/vm/debug.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "itemapi.h" +#include "hbapi.h" +#include "hbapiitm.h" /* $Doc$ * $FuncName$ AddToArray( , , ) diff --git a/harbour/source/vm/dynsym.c b/harbour/source/vm/dynsym.c index 58149e9d8d..efc419eb7f 100644 --- a/harbour/source/vm/dynsym.c +++ b/harbour/source/vm/dynsym.c @@ -33,7 +33,7 @@ * */ -#include "extend.h" +#include "hbapi.h" #define SYM_ALLOCATED ( ( HB_SYMBOLSCOPE ) -1 ) diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 33baa65b50..988267b664 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -50,15 +50,15 @@ #endif #include -#include "extend.h" -#include "ctoharb.h" -#include "errorapi.h" -#include "itemapi.h" -#include "langapi.h" -#include "rddapi.h" -#include "pcode.h" -#include "set.h" -#include "inkey.h" +#include "hbapi.h" +#include "hbvm.h" +#include "hbapierr.h" +#include "hbapiitm.h" +#include "hbapilng.h" +#include "hbapirdd.h" +#include "hbpcode.h" +#include "hbset.h" +#include "hbinkey.h" typedef struct _SYMBOLS { diff --git a/harbour/source/vm/initsymb.c b/harbour/source/vm/initsymb.c index 8ed3a1a666..031c7fca9e 100644 --- a/harbour/source/vm/initsymb.c +++ b/harbour/source/vm/initsymb.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbvm.h" extern HARBOUR HB_AADD( void ); extern HARBOUR HB_ABS( void ); diff --git a/harbour/source/vm/maindll.c b/harbour/source/vm/maindll.c index f23be883b6..de3bbcda60 100644 --- a/harbour/source/vm/maindll.c +++ b/harbour/source/vm/maindll.c @@ -36,7 +36,7 @@ #ifdef _Windows #include -#include "ctoharb.h" +#include "hbvm.h" BOOL WINAPI _export DllEntryPoint( HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved ) diff --git a/harbour/source/vm/mainstd.c b/harbour/source/vm/mainstd.c index 85a46f6dd2..901b356ad8 100644 --- a/harbour/source/vm/mainstd.c +++ b/harbour/source/vm/mainstd.c @@ -33,8 +33,8 @@ * */ -#include "extend.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbvm.h" int main( int argc, char * argv[] ) { diff --git a/harbour/source/vm/mainwin.c b/harbour/source/vm/mainwin.c index 44ad1615bb..61d6582d3c 100644 --- a/harbour/source/vm/mainwin.c +++ b/harbour/source/vm/mainwin.c @@ -36,8 +36,8 @@ #ifdef _Windows #include -#include "extend.h" -#include "ctoharb.h" +#include "hbapi.h" +#include "hbvm.h" HANDLE hb_hInstance = 0; HANDLE hb_hPrevInstance = 0;