2010-11-04 20:27 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/include/hbpp.h
  * harbour/include/hbcomp.h
  * harbour/src/pp/ppcore.c
  * harbour/src/main/harbour.c
  * harbour/src/compiler/hbmain.c
  * harbour/src/compiler/ppcomp.c
  * harbour/src/compiler/hbcmplib.c
    * added support for setting hash array as container for included
      files in HB_COMPILE*() functions.

  * harbour/utils/hbrun/hbrun.prg
    + added optional support for embedding all core header files
      into final HBRUN executable file. It can be enabled by
      compilation with HBRUN_WITH_HEADERS macro.

  * harbour/contrib/hbsqlit3/hbsqlit3.c
    ! removed non standard C construction
    % push function parameters directly on HVM stack
This commit is contained in:
Przemyslaw Czerpak
2010-11-04 19:28:05 +00:00
parent f1dc3346ec
commit 2432e2f5d3
10 changed files with 254 additions and 49 deletions

View File

@@ -16,6 +16,26 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-11-04 20:27 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
* harbour/include/hbcomp.h
* harbour/src/pp/ppcore.c
* harbour/src/main/harbour.c
* harbour/src/compiler/hbmain.c
* harbour/src/compiler/ppcomp.c
* harbour/src/compiler/hbcmplib.c
* added support for setting hash array as container for included
files in HB_COMPILE*() functions.
* harbour/utils/hbrun/hbrun.prg
+ added optional support for embedding all core header files
into final HBRUN executable file. It can be enabled by
compilation with HBRUN_WITH_HEADERS macro.
* harbour/contrib/hbsqlit3/hbsqlit3.c
! removed non standard C construction
% push function parameters directly on HVM stack
2010-11-04 18:05 UTC+0200 Petr Chornyj (myorg63 at mail.ru)
* harbour/contrib/hbsqlit3/hbsqlit3.c
! Fixed last modification typo

View File

@@ -399,7 +399,7 @@ static void func( sqlite3_context * ctx, int argc, sqlite3_value ** argv )
if( pSym && hb_vmRequestReenter() )
{
PHB_ITEM pItem[ argc ], pResult;
PHB_ITEM pResult;
int i;
hb_vmPushDynSym( pSym );
@@ -414,57 +414,50 @@ static void func( sqlite3_context * ctx, int argc, sqlite3_value ** argv )
{
case SQLITE_NULL:
{
pItem[ i ] = hb_itemNew( NULL );
hb_vmPushNil();
break;
}
case SQLITE_TEXT:
{
pItem[ i ] = hb_itemNew( NULL );
hb_itemPutStrUTF8( pItem[ i ],
hb_itemPutStrUTF8( hb_stackAllocItem(),
( const char* ) sqlite3_value_text( argv[i] ) );
break;
}
case SQLITE_FLOAT:
{
pItem[ i ] = hb_itemPutND( NULL, sqlite3_value_double( argv[i] ) );
hb_vmPushDouble( sqlite3_value_double( argv[i] ), HB_DEFAULT_DECIMALS );
break;
}
case SQLITE_INTEGER:
{
#if HB_VMLONG_MAX == INT32_MAX || defined( HB_LONG_LONG_OFF )
pItem[ i ] = hb_itemPutNI( NULL, sqlite3_value_int( argv[i] ) );
hb_vmPushInteger( sqlite3_value_int( argv[i] ) );
#else
pItem[ i ] = hb_itemPutNInt( NULL, sqlite3_value_int64( argv[i] ) );
hb_vmPushNumInt( sqlite3_value_int64( argv[i] ) );
#endif
break;
}
case SQLITE_BLOB:
{
pItem[ i ] = hb_itemPutCL( NULL, ( const char* ) sqlite3_value_blob( argv[i] ),
sqlite3_value_bytes( argv[i] ) );
hb_vmPushString( ( const char* ) sqlite3_value_blob( argv[i] ),
sqlite3_value_bytes( argv[i] ) );
break;
}
default:
{
pItem[ i ] = hb_itemPutCConst( NULL, ":default:" );
hb_itemPutCConst( hb_stackAllocItem(), ":default:" );
break;
}
}
hb_vmPush( pItem[ i ] );
}
}
}
hb_vmDo( (HB_USHORT) argc + 1 );
for( i = 0; i < argc; i++ )
{
hb_itemRelease( pItem[ i ] );
}
pResult = hb_param( -1, HB_IT_ANY );
switch ( hb_itemType( pResult ) )

View File

@@ -84,7 +84,7 @@ extern PHB_DEBUGINFO hb_compGetDebugInfo( HB_COMP_DECL );
extern void hb_compChkFileSwitches( int argc, char * argv[] );
extern void hb_compInitPP( HB_COMP_DECL, int argc, const char * const argv[] );
extern void hb_compInitPP( HB_COMP_DECL, int argc, const char * const argv[], PHB_PP_OPEN_FUNC pOpenFunc );
extern void hb_compCompileEnd( HB_COMP_DECL );
extern int hb_comp_yyparse( HB_COMP_DECL );
@@ -266,7 +266,8 @@ extern HB_BOOL hb_compCheckUnclosedStru( HB_COMP_DECL, PFUNCTION );
#define HB_GEN_FUNC3( func, p1,p2,p3 ) hb_compGen##func( p1, p2, p3, HB_COMP_PARAM )
#define HB_GEN_FUNC4( func, p1,p2,p3,p4 ) hb_compGen##func( p1, p2, p3, p4, HB_COMP_PARAM )
extern int hb_compMain( int argc, const char * const argv[], HB_BYTE ** pBufPtr, HB_SIZE * pnSize, const char * szSource );
extern int hb_compMain( int argc, const char * const argv[] );
extern int hb_compMainExt( int argc, const char * const argv[], HB_BYTE ** pBufPtr, HB_SIZE * pnSize, const char * szSource, void * cargo, PHB_PP_OPEN_FUNC pOpenFunc );
extern void hb_compOutStd( HB_COMP_DECL, const char * szMessage );
extern void hb_compOutErr( HB_COMP_DECL, const char * szMessage );

View File

@@ -83,8 +83,13 @@ HB_EXTERN_BEGIN
#define HB_PP_INLINE_QUOTE1 5
#define HB_PP_INLINE_QUOTE2 6
/* actions returned by function to open included files */
#define HB_PP_OPEN_OK 0
#define HB_PP_OPEN_FILE 1
#define HB_PP_OPEN_ERROR 2
/* function to open included files */
#define HB_PP_OPEN_FUNC_( func ) FILE * func( void *, const char *, HB_BOOL, HB_BOOL *, char * )
#define HB_PP_OPEN_FUNC_( func ) int func( void *, char *, HB_BOOL, HB_BOOL, HB_BOOL, HB_PATHNAMES *, HB_BOOL *, FILE **, const char **, HB_SIZE *, HB_BOOL * )
typedef HB_PP_OPEN_FUNC_( HB_PP_OPEN_FUNC );
typedef HB_PP_OPEN_FUNC * PHB_PP_OPEN_FUNC;
@@ -549,8 +554,9 @@ typedef struct _HB_PP_FILE
HB_BOOL fGenLineInfo; /* #line information should be generated */
HB_BOOL fEof; /* the end of file reached */
HB_BOOL fFree; /* free external buffer */
const char * pLineBuf; /* buffer for parsing external lines */
HB_SIZE nLineBufLen; /* size of external line buffer */
HB_SIZE nLineBufLen; /* size of external line buffer */
struct _HB_PP_FILE * pPrev; /* previous file, the one which included this file */
}

View File

@@ -53,14 +53,68 @@
#include "hbapi.h"
#include "hbcomp.h"
static int s_pp_openFile( void * cargo, char * szFileName,
HB_BOOL fBefore, HB_BOOL fSysFile, HB_BOOL fBinary,
HB_PATHNAMES * pIncludePaths,
HB_BOOL * pfNested, FILE ** file_ptr,
const char ** pBufPtr, HB_SIZE *pnLen, HB_BOOL *pfFree )
{
HB_SYMBOL_UNUSED( fSysFile );
HB_SYMBOL_UNUSED( fBinary );
HB_SYMBOL_UNUSED( pIncludePaths );
HB_SYMBOL_UNUSED( pfNested );
HB_SYMBOL_UNUSED( file_ptr );
if( !fBefore )
{
HB_COMP_DECL = ( HB_COMP_PTR ) cargo;
PHB_ITEM pIncItem = ( PHB_ITEM ) HB_COMP_PARAM->cargo;
if( pIncItem )
{
if( HB_IS_HASH( pIncItem ) )
{
PHB_ITEM pFileItem = hb_hashGetCItemPtr( pIncItem, szFileName );
if( pFileItem )
{
HB_SIZE nLen = hb_itemGetCLen( pFileItem );
if( nLen )
{
*pBufPtr = hb_itemGetCPtr( pFileItem );
*pnLen = nLen;
*pfFree = HB_FALSE;
return HB_PP_OPEN_OK;
}
}
}
}
}
return HB_PP_OPEN_FILE;
}
static void hb_compGenArgList( int iFirst, int iLast,
int * pArgC, const char *** pArgV )
int * pArgC, const char *** pArgV,
PHB_ITEM * pIncItem,
PHB_PP_OPEN_FUNC * pOpenFunc )
{
PHB_ITEM pParam;
HB_SIZE ul, nLen;
int argc = 1, i;
const char ** argv;
if( pIncItem && pOpenFunc )
{
*pOpenFunc = NULL;
*pIncItem = hb_param( iFirst, HB_IT_HASH );
if( *pIncItem )
{
++iFirst;
*pOpenFunc = s_pp_openFile;
}
}
for( i = iFirst; i <= iLast; ++i )
{
pParam = hb_param( i, HB_IT_ARRAY | HB_IT_STRING );
@@ -111,10 +165,12 @@ HB_FUNC( HB_COMPILE )
{
int argc;
const char ** argv;
PHB_ITEM pIncItem;
PHB_PP_OPEN_FUNC pOpenFunc;
hb_compGenArgList( 1, hb_pcount(), &argc, &argv );
hb_compGenArgList( 1, hb_pcount(), &argc, &argv, &pIncItem, &pOpenFunc );
hb_retni( hb_compMain( argc, argv, NULL, NULL, NULL ) );
hb_retni( hb_compMainExt( argc, argv, NULL, NULL, NULL, pIncItem, pOpenFunc ) );
hb_xfree( argv );
}
@@ -122,11 +178,13 @@ HB_FUNC( HB_COMPILEBUF )
{
int iResult, argc;
const char ** argv;
PHB_ITEM pIncItem;
PHB_PP_OPEN_FUNC pOpenFunc;
HB_BYTE * pBuffer;
HB_SIZE nLen;
hb_compGenArgList( 1, hb_pcount(), &argc, &argv );
iResult = hb_compMain( argc, argv, &pBuffer, &nLen, NULL );
hb_compGenArgList( 1, hb_pcount(), &argc, &argv, &pIncItem, &pOpenFunc );
iResult = hb_compMainExt( argc, argv, &pBuffer, &nLen, NULL, pIncItem, pOpenFunc );
hb_xfree( argv );
if( iResult == EXIT_SUCCESS && pBuffer )
hb_retclen_buffer( ( char * ) pBuffer, nLen );
@@ -137,14 +195,16 @@ HB_FUNC( HB_COMPILEFROMBUF )
int iResult, argc;
const char ** argv;
const char * szSource;
PHB_ITEM pIncItem;
PHB_PP_OPEN_FUNC pOpenFunc;
HB_BYTE * pBuffer;
HB_SIZE nLen;
szSource = hb_parc( 1 );
if( szSource )
{
hb_compGenArgList( 2, hb_pcount(), &argc, &argv );
iResult = hb_compMain( argc, argv, &pBuffer, &nLen, szSource );
hb_compGenArgList( 2, hb_pcount(), &argc, &argv, &pIncItem, &pOpenFunc );
iResult = hb_compMainExt( argc, argv, &pBuffer, &nLen, szSource, pIncItem, pOpenFunc );
hb_xfree( argv );
if( iResult == EXIT_SUCCESS && pBuffer )
hb_retclen_buffer( ( char * ) pBuffer, nLen );

View File

@@ -59,8 +59,10 @@ static HB_BOOL hb_compRegisterFunc( HB_COMP_DECL, PFUNCTION pFunc, HB_BOOL fErro
/* ************************************************************************* */
int hb_compMain( int argc, const char * const argv[],
HB_BYTE ** pBufPtr, HB_SIZE * pnSize, const char * szSource )
int hb_compMainExt( int argc, const char * const argv[],
HB_BYTE ** pBufPtr, HB_SIZE * pnSize,
const char * szSource,
void * cargo, PHB_PP_OPEN_FUNC pOpenFunc )
{
HB_COMP_DECL;
int iStatus = EXIT_SUCCESS;
@@ -70,6 +72,7 @@ int hb_compMain( int argc, const char * const argv[],
HB_TRACE(HB_TR_DEBUG, ("hb_compMain()"));
HB_COMP_PARAM = hb_comp_new();
HB_COMP_PARAM->cargo = cargo;
HB_COMP_PARAM->pOutPath = NULL;
@@ -117,7 +120,7 @@ int hb_compMain( int argc, const char * const argv[],
hb_compChkPaths( HB_COMP_PARAM );
/* Set standard rules */
hb_compInitPP( HB_COMP_PARAM, argc, argv );
hb_compInitPP( HB_COMP_PARAM, argc, argv, pOpenFunc );
/* Prepare the table of identifiers */
hb_compIdentifierOpen( HB_COMP_PARAM );
@@ -177,6 +180,11 @@ int hb_compMain( int argc, const char * const argv[],
return iStatus;
}
int hb_compMain( int argc, const char * const argv[] )
{
return hb_compMainExt( argc, argv, NULL, NULL, NULL, NULL, NULL );
}
static int hb_compReadClpFile( HB_COMP_DECL, const char * szClpFile )
{
char buffer[ HB_PATH_MAX + 80 ];

View File

@@ -382,7 +382,8 @@ static void hb_pp_fileIncluded( void * cargo, const char * szFileName )
*pIncFilePtr = pIncFile;
}
void hb_compInitPP( HB_COMP_DECL, int argc, const char * const argv[] )
void hb_compInitPP( HB_COMP_DECL, int argc, const char * const argv[],
PHB_PP_OPEN_FUNC pOpenFunc )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_compInitPP()" ) );
@@ -390,7 +391,7 @@ void hb_compInitPP( HB_COMP_DECL, int argc, const char * const argv[] )
{
hb_pp_init( HB_COMP_PARAM->pLex->pPP, HB_COMP_PARAM->fQuiet,
HB_COMP_PARAM->iMaxTransCycles,
HB_COMP_PARAM, NULL, NULL,
HB_COMP_PARAM, pOpenFunc, NULL,
hb_pp_ErrorGen, hb_pp_Disp, hb_pp_PragmaDump,
HB_COMP_ISSUPPORTED( HB_COMPFLAG_HB_INLINE ) ?
hb_pp_hb_inLine : NULL, hb_pp_CompilerSwitch );

View File

@@ -130,7 +130,8 @@ int main( int argc, char * argv[] )
hb_compChkFileSwitches( argc, argv );
iResult = hb_compMain( argc, ( const char * const* ) argv, NULL, NULL, NULL );
iResult = hb_compMain( argc, ( const char * const* ) argv );
hb_xexit();
return iResult;

View File

@@ -1875,22 +1875,33 @@ static void hb_pp_defineDel( PHB_PP_STATE pState, PHB_PP_TOKEN pToken )
}
static PHB_PP_FILE hb_pp_FileNew( PHB_PP_STATE pState, const char * szFileName,
HB_BOOL fSysFile, HB_BOOL * pfNested, FILE * file_in,
HB_BOOL fSearchPath, PHB_PP_OPEN_FUNC pOpenFunc,
HB_BOOL fBinary )
HB_BOOL fSysFile, HB_BOOL * pfNested,
FILE * file_in, HB_BOOL fSearchPath,
PHB_PP_OPEN_FUNC pOpenFunc, HB_BOOL fBinary )
{
char szFileNameBuf[ HB_PATH_MAX ];
const char * pLineBuf = NULL;
HB_SIZE nLineBufLen = 0;
HB_BOOL fFree = HB_FALSE;
PHB_PP_FILE pFile;
if( ! file_in )
{
int iAction = HB_PP_OPEN_FILE;
if( pOpenFunc )
{
file_in = ( pOpenFunc )( pState->cargo, szFileName, fSysFile,
pfNested, szFileNameBuf );
szFileName = szFileNameBuf;
hb_strncpy( szFileNameBuf, szFileName, sizeof( szFileNameBuf ) - 1 );
iAction = ( pOpenFunc )( pState->cargo, szFileNameBuf,
HB_TRUE, fSysFile, fBinary,
fSearchPath ? pState->pIncludePath : NULL,
pfNested, &file_in,
&pLineBuf, &nLineBufLen, &fFree );
if( iAction == HB_PP_OPEN_OK )
szFileName = szFileNameBuf;
}
else
if( iAction == HB_PP_OPEN_FILE )
{
PHB_FNAME pFileName = hb_fsFNameSplit( szFileName );
HB_BOOL fNested = HB_FALSE;
@@ -1920,10 +1931,13 @@ static PHB_PP_FILE hb_pp_FileNew( PHB_PP_STATE pState, const char * szFileName,
}
file_in = hb_fopen( szFileName, fBinary ? "rb" : "r" );
fNested = file_in == NULL && hb_fsMaxFilesError();
if( file_in )
iAction = HB_PP_OPEN_OK;
else
fNested = hb_fsMaxFilesError();
}
if( !file_in )
if( iAction != HB_PP_OPEN_OK )
{
if( fNested )
{
@@ -1933,20 +1947,38 @@ static PHB_PP_FILE hb_pp_FileNew( PHB_PP_STATE pState, const char * szFileName,
else if( pState->pIncludePath && fSearchPath )
{
HB_PATHNAMES * pPath = pState->pIncludePath;
while( pPath && !file_in )
do
{
pFileName->szPath = pPath->szPath;
hb_fsFNameMerge( szFileNameBuf, pFileName );
file_in = hb_fopen( szFileNameBuf, fBinary ? "rb" : "r" );
if( file_in != NULL )
{
iAction = HB_PP_OPEN_OK;
szFileName = pFileName->szName;
break;
}
pPath = pPath->pNext;
}
while( pPath );
}
if( iAction != HB_PP_OPEN_OK && pOpenFunc && !fNested )
{
hb_strncpy( szFileNameBuf, pFileName->szName, sizeof( szFileNameBuf ) - 1 );
iAction = ( pOpenFunc )( pState->cargo, szFileNameBuf,
HB_FALSE, fSysFile, fBinary,
fSearchPath ? pState->pIncludePath : NULL,
pfNested, &file_in,
&pLineBuf, &nLineBufLen, &fFree );
if( iAction == HB_PP_OPEN_OK )
szFileName = szFileNameBuf;
}
}
hb_xfree( pFileName );
}
if( ! file_in )
if( iAction != HB_PP_OPEN_OK )
return NULL;
if( pState->pIncFunc )
@@ -1958,6 +1990,9 @@ static PHB_PP_FILE hb_pp_FileNew( PHB_PP_STATE pState, const char * szFileName,
pFile->szFileName = hb_strdup( szFileName );
pFile->file_in = file_in;
pFile->fFree = fFree;
pFile->pLineBuf = pLineBuf;
pFile->nLineBufLen = nLineBufLen;
pFile->iLastLine = 1;
return pFile;
@@ -1970,6 +2005,7 @@ static PHB_PP_FILE hb_pp_FileBufNew( const char * pLineBuf, HB_SIZE nLineBufLen
pFile = ( PHB_PP_FILE ) hb_xgrab( sizeof( HB_PP_FILE ) );
memset( pFile, '\0', sizeof( HB_PP_FILE ) );
pFile->fFree = HB_FALSE;
pFile->pLineBuf = pLineBuf;
pFile->nLineBufLen = nLineBufLen;
pFile->iLastLine = 1;
@@ -1991,6 +2027,9 @@ static void hb_pp_FileFree( PHB_PP_STATE pState, PHB_PP_FILE pFile,
if( pFile->szFileName )
hb_xfree( pFile->szFileName );
if( pFile->fFree && pFile->pLineBuf )
hb_xfree( ( void * ) pFile->pLineBuf );
hb_pp_tokenListFree( &pFile->pTokenList );
hb_xfree( pFile );
}
@@ -5068,8 +5107,10 @@ static void hb_pp_preprocessToken( PHB_PP_STATE pState )
if( !pState->pFile->pTokenList )
{
#if 0 /* disabled for files included from buffer */
if( pState->pFile->pLineBuf )
break;
#endif
/* this condition is only for compiler core code compatibility */
if( !pState->pFile->pPrev )
break;

View File

@@ -70,6 +70,12 @@ REQUEST HB_GT_CGI
REQUEST HB_GT_PCA
REQUEST HB_GT_STD
/* command to store header files in hash array */
#command ADD HEADER FILE <(cFile)> TO <hash> => ;
#pragma __streaminclude <(cFile)>|<hash>\[ <(cFile)> \] := %s
#define HB_HISTORY_LEN 500
#define HB_LINE_LEN 256
#define HB_PROMPT "."
@@ -87,6 +93,7 @@ STATIC s_cDirBase
PROCEDURE _APPMAIN( cFile, ... )
LOCAL cPath, cExt
LOCAL hHeaders
cPath := getenv( "HB_INSTALL_INC" )
IF !EMPTY( cPath )
@@ -94,8 +101,8 @@ PROCEDURE _APPMAIN( cFile, ... )
ENDIF
#ifdef __PLATFORM__UNIX
AADD( s_aIncDir, "-I/usr/include/harbour" )
AADD( s_aIncDir, "-I/usr/local/include/harbour" )
// AADD( s_aIncDir, "-I/usr/include/harbour" )
// AADD( s_aIncDir, "-I/usr/local/include/harbour" )
#endif
IF PCount() > 0
@@ -158,7 +165,74 @@ PROCEDURE _APPMAIN( cFile, ... )
EXIT
CASE ".prg"
CASE ".hbs"
cFile := HB_COMPILEBUF( HB_ARGV( 0 ), "-n2", "-w", "-es2", "-q0", ;
#ifdef HBRUN_WITH_HEADERS
/* add core header files */
hHeaders := { => }
ADD HEADER FILE "achoice.ch" TO hHeaders
ADD HEADER FILE "assert.ch" TO hHeaders
ADD HEADER FILE "blob.ch" TO hHeaders
ADD HEADER FILE "box.ch" TO hHeaders
ADD HEADER FILE "button.ch" TO hHeaders
ADD HEADER FILE "color.ch" TO hHeaders
ADD HEADER FILE "common.ch" TO hHeaders
ADD HEADER FILE "dbedit.ch" TO hHeaders
ADD HEADER FILE "dbinfo.ch" TO hHeaders
ADD HEADER FILE "dbstruct.ch" TO hHeaders
ADD HEADER FILE "directry.ch" TO hHeaders
ADD HEADER FILE "error.ch" TO hHeaders
ADD HEADER FILE "fileio.ch" TO hHeaders
ADD HEADER FILE "getexit.ch" TO hHeaders
ADD HEADER FILE "hb.ch" TO hHeaders
ADD HEADER FILE "hbclass.ch" TO hHeaders
ADD HEADER FILE "hbcom.ch" TO hHeaders
ADD HEADER FILE "hbdebug.ch" TO hHeaders
ADD HEADER FILE "hbdyn.ch" TO hHeaders
ADD HEADER FILE "hbextcdp.ch" TO hHeaders
ADD HEADER FILE "hbextern.ch" TO hHeaders
ADD HEADER FILE "hbextlng.ch" TO hHeaders
ADD HEADER FILE "hbgfx.ch" TO hHeaders
ADD HEADER FILE "hbgfxdef.ch" TO hHeaders
ADD HEADER FILE "hbgtinfo.ch" TO hHeaders
ADD HEADER FILE "hbhrb.ch" TO hHeaders
ADD HEADER FILE "hbinkey.ch" TO hHeaders
ADD HEADER FILE "hblang.ch" TO hHeaders
ADD HEADER FILE "hblpp.ch" TO hHeaders
ADD HEADER FILE "hbmacro.ch" TO hHeaders
ADD HEADER FILE "hbmath.ch" TO hHeaders
ADD HEADER FILE "hbmemory.ch" TO hHeaders
ADD HEADER FILE "hbmemvar.ch" TO hHeaders
ADD HEADER FILE "hboo.ch" TO hHeaders
ADD HEADER FILE "hbpers.ch" TO hHeaders
ADD HEADER FILE "hbsetup.ch" TO hHeaders
ADD HEADER FILE "hbsix.ch" TO hHeaders
ADD HEADER FILE "hbsocket.ch" TO hHeaders
ADD HEADER FILE "hbstdgen.ch" TO hHeaders
ADD HEADER FILE "hbsxdef.ch" TO hHeaders
ADD HEADER FILE "hbthread.ch" TO hHeaders
ADD HEADER FILE "hbtrace.ch" TO hHeaders
ADD HEADER FILE "hbusrrdd.ch" TO hHeaders
ADD HEADER FILE "hbver.ch" TO hHeaders
ADD HEADER FILE "hbzlib.ch" TO hHeaders
ADD HEADER FILE "inkey.ch" TO hHeaders
ADD HEADER FILE "memoedit.ch" TO hHeaders
ADD HEADER FILE "ord.ch" TO hHeaders
ADD HEADER FILE "rddsys.ch" TO hHeaders
ADD HEADER FILE "reserved.ch" TO hHeaders
ADD HEADER FILE "set.ch" TO hHeaders
ADD HEADER FILE "setcurs.ch" TO hHeaders
ADD HEADER FILE "simpleio.ch" TO hHeaders
ADD HEADER FILE "std.ch" TO hHeaders
ADD HEADER FILE "tbrowse.ch" TO hHeaders
ADD HEADER FILE "harbour.hbx" TO hHeaders
ADD HEADER FILE "hbcpage.hbx" TO hHeaders
ADD HEADER FILE "hblang.hbx" TO hHeaders
ADD HEADER FILE "hbscalar.hbx" TO hHeaders
ADD HEADER FILE "hbusrrdd.hbx" TO hHeaders
#else
hHeaders := NIL
#endif /* HBRUN_WITH_HEADERS */
cFile := HB_COMPILEBUF( hHeaders, HB_ARGV( 0 ), "-n2", "-w", "-es2", "-q0", ;
s_aIncDir, "-I" + FNameDirGet( cFile ), "-D" + "__HBSCRIPT__HBRUN", cFile )
IF cFile == NIL
ERRORLEVEL( 1 )