2011-02-02 22:08 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* config/postinst.hbs
    * MAKEDIR() -> HB_DIRCREATE().
      Warning: Make a 'make clean' _before_ updating to this revision.
               Or, do a fresh checkout and build that.
               Or, do a clean rebuild twice.
               (otherwise plain 'make clean' will end with an error)

  - examples/pp
    - Deleted obsolete PP code.

  ; NOTE: Now that HB_BUILD_CONTRIB_DYN=yes works pretty much
          okay on both win and linux, I will delete this
          tool meant as a temporary workaround for those
          requiring dynamic versions of Harbour libs:
            bin/hbmk2l2d.hbs
          If you need it, make a copy of it locally, though
          most pbly nobody ever used this.
This commit is contained in:
Viktor Szakats
2011-02-02 21:10:15 +00:00
parent 58dff21164
commit 6ef5fd19a8
10 changed files with 21 additions and 7094 deletions

View File

@@ -16,6 +16,25 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-02-02 22:08 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* config/postinst.hbs
* MAKEDIR() -> HB_DIRCREATE().
Warning: Make a 'make clean' _before_ updating to this revision.
Or, do a fresh checkout and build that.
Or, do a clean rebuild twice.
(otherwise plain 'make clean' will end with an error)
- examples/pp
- Deleted obsolete PP code.
; NOTE: Now that HB_BUILD_CONTRIB_DYN=yes works pretty much
okay on both win and linux, I will delete this
tool meant as a temporary workaround for those
requiring dynamic versions of Harbour libs:
bin/hbmk2l2d.hbs
If you need it, make a copy of it locally, though
most pbly nobody ever used this.
2011-02-02 18:14 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
+ Added -manifest= hbmk2 option for -hbexe/-hbdyn targets on
@@ -267,7 +286,7 @@
* examples/hbdoc2/gentpl.prg
* Replaced MakeDir() with universally available hb_DirCreate().
; TODO: same in config/postinst.hbs (delayed to avoid a million
false bug reports)
false bug reports) [DONE]
* src/rtl/Makefile
+ src/rtl/hbfilehi.prg

View File

@@ -425,7 +425,7 @@ STATIC FUNCTION DirBuild( cDir )
IF hb_FileExists( cDirTemp )
RETURN .F.
ELSEIF ! hb_DirExists( cDirTemp )
IF MakeDir( cDirTemp ) != 0
IF hb_DirCreate( cDirTemp ) != 0
RETURN .F.
ENDIF
ENDIF

View File

@@ -1,631 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Preprocessor & Compiler integration module
*
* Copyright 1999 Alexander S.Kresin <alex@belacy.belgorod.su>
* www - http://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, or (at your option)
* any later version.
*
* 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 software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries 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 Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
/*
* Avoid tracing in preprocessor/compiler.
*/
#if ! defined( HB_TRACE_UTILS )
#if defined( HB_TRACE_LEVEL )
#undef HB_TRACE_LEVEL
#endif
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hbppdef.h"
#include "hbcomp.h"
static void pp_ParseBuffer( PFILE, int * );
static char * pp_TextCommand( char * ptr, int * pLen );
static void pp_TextBlockFinish( void );
static void pp_StreamBlockFinish( void );
#if ! defined( HB_PP_DEBUG_MEMORY )
static char s_szLine[ HB_PP_STR_SIZE ];
static char s_szOutLine[ HB_PP_STR_SIZE ];
#else
static char * s_szLine = NULL;
static char * s_szOutLine = NULL;
#endif
int hb_pp_LastOutLine = 1;
static char * s_TextOutFunc = NULL;
static char * s_TextEndFunc = NULL;
static char * s_TextStartFunc = NULL;
/*
HB_BOOL bDebug = HB_FALSE;
*/
void hb_pp_InternalFree( void )
{
#if defined( HB_PP_DEBUG_MEMORY )
if( s_szLine )
{
hb_xfree( s_szLine );
s_szLine = NULL;
}
if( s_szOutLine )
{
hb_xfree( s_szOutLine );
s_szOutLine = NULL;
}
#endif
if( s_TextOutFunc )
{
hb_xfree( s_TextOutFunc );
s_TextOutFunc = NULL;
}
if( s_TextEndFunc )
{
hb_xfree( s_TextEndFunc );
s_TextEndFunc = NULL;
}
if( s_TextStartFunc )
{
hb_xfree( s_TextStartFunc );
s_TextStartFunc = NULL;
}
}
int hb_pp_Internal_( FILE * handl_o, char * sOut )
{
PFILE pFile;
char * ptr, * ptrOut, * tmpPtr;
int lContinue;
int rdlen;
ULONG lens;
int lLine = 0;
HB_TRACE( HB_TR_DEBUG, ( "hb_pp_Internal_(%p, %s)", handl_o, sOut ) );
#if defined( HB_PP_DEBUG_MEMORY )
if( ! s_szLine )
s_szLine = ( char * ) hb_xgrab( HB_PP_STR_SIZE );
if( ! s_szOutLine )
s_szOutLine = ( char * ) hb_xgrab( HB_PP_STR_SIZE );
#endif
hb_pp_NestedLiteralString = HB_FALSE;
hb_pp_LiteralEscSeq = HB_FALSE;
for(;; )
{
pFile = hb_comp_files.pLast;
lens = 0;
lContinue = 0;
ptrOut = sOut;
while( ( rdlen = hb_pp_RdStr( pFile->handle, s_szLine + lens, HB_PP_STR_SIZE -
lens, lContinue, ( char * ) pFile->pBuffer, &( pFile->lenBuffer ),
&( pFile->iBuffer ) ) ) >= 0 )
{
lens += rdlen;
hb_comp_iLine++;
if( lens >= HB_PP_STR_SIZE - 2 )
{
hb_compGenError( NULL, hb_pp_szErrors, 'F', HB_PP_ERR_BUFFER_OVERFLOW, NULL, NULL );
}
if( hb_pp_StreamBlock )
{
if( hb_pp_StreamBlock == HB_PP_STREAM_DUMP_C )
break;
else if( hb_pp_StreamBlock == HB_PP_STREAM_CLIPPER )
{
/* Clipper compatible TEXT/ENDTEXT handling */
ptr = s_szLine;
HB_SKIPTABSPACES( ptr );
if( hb_stricmp( ptr, "ENDTEXT" ) == 0 ||
hb_stricmp( ptr, "#pragma __endtext" ) == 0 )
{
pp_TextBlockFinish();
break;
}
if( s_TextOutFunc )
{
memmove( s_szLine + 1, s_szLine, lens++ );
s_szLine[ 0 ] = '[';
s_szLine[ lens++ ] = ']';
s_szLine[ lens ] = '\0';
lens = hb_snprintf( s_szOutLine, HB_PP_STR_SIZE, s_TextOutFunc, s_szLine );
memcpy( s_szLine, s_szOutLine, lens + 1 );
hb_pp_NestedLiteralString = HB_TRUE;
break;
}
else
{
s_szLine[ 0 ] = '\0'; /* discard text */
}
}
else if( hb_pp_StreamBlock == HB_PP_STREAM_PRG )
{
ptr = s_szLine + lens - rdlen;
HB_SKIPTABSPACES( ptr );
if( hb_stricmp( ptr, "ENDTEXT" ) == 0 ||
hb_stricmp( ptr, "#pragma __endtext" ) == 0 )
{
lens -= rdlen;
s_szLine[ lens ] = '\0';
pp_StreamBlockFinish();
break;
}
else
{
lContinue = 1;
continue;
}
}
else if( hb_pp_StreamBlock == HB_PP_STREAM_C )
{
ptr = s_szLine + lens - rdlen;
HB_SKIPTABSPACES( ptr );
if( hb_stricmp( ptr, "ENDTEXT" ) == 0 ||
hb_stricmp( ptr, "#pragma __endtext" ) == 0 )
{
lens -= rdlen;
s_szLine[ lens ] = '\0';
pp_StreamBlockFinish();
hb_pp_LiteralEscSeq = HB_TRUE;
break;
}
else
{
lContinue = 1;
continue;
}
}
}
if( s_szLine[ lens - 1 ] == ';' )
{
lContinue = pFile->lenBuffer ? 1 : 0;
lens--;
lens--;
while( s_szLine[ lens ] == ' ' || s_szLine[ lens ] == '\t' )
lens--;
s_szLine[ ++lens ] = ' ';
s_szLine[ ++lens ] = '\0';
}
else
{
lContinue = 0;
lens = 0;
}
if( ! lContinue )
{
pp_ParseBuffer( pFile, &lLine );
break;
}
}
if( rdlen < 0 )
{
if( hb_comp_files.iFiles == 1 )
return 0; /* we have reached the main EOF */
else
{
hb_pp_CloseInclude();
lLine = 1;
}
/* Ron Pinkas added 2000-06-22 */
s_szLine[ 0 ] = '\0';
break;
/* Ron Pinkas end 2000-06-22 */
}
if( *s_szLine )
break;
}
if( lLine )
{
if( hb_comp_files.iFiles == 1 )
hb_pp_LastOutLine = hb_comp_iLine;
hb_snprintf( ptrOut, HB_PP_STR_SIZE, "#line %d \"%s\"", ( hb_comp_files.pLast->iLine ), hb_comp_files.pLast->szFileName );
while( *ptrOut )
ptrOut++;
/* Ron Pinkas added 2000-06-14 */
tmpPtr = s_szLine;
HB_SKIPTABSPACES( tmpPtr );
/* Last Opened file ended without CR - adding CR to the #line directive. */
if( *tmpPtr != '\0' )
{
*ptrOut++ = '\n';
*ptrOut = '\0';
}
/* Ron Pinkas end 2000-06-14 */
}
else
{
/* Ron Pinkas added 2000-06-13 */
/* Ignore empty lines in #included files. */
/* Ron Pinkas removed 2001-01-20 */
#if 0
if( ( hb_pp_LastOutLine != hb_comp_iLine ) && hb_comp_files.iFiles == 1 && handl_o )
/* Ron Pinkas end 2000-06-13 */
for(; hb_pp_LastOutLine < hb_comp_iLine; hb_pp_LastOutLine++ )
hb_pp_WrStr( handl_o, "\n" );
#endif
/* END Ron Pinkas removed 2001-01-20 */
}
lens = hb_pp_strocpy( ptrOut, s_szLine ) + ( ptrOut - sOut );
*( sOut + lens++ ) = '\n';
*( sOut + lens ) = '\0';
if( hb_comp_iLineINLINE && hb_pp_StreamBlock == 0 )
{
hb_comp_iLine = hb_comp_iLinePRG + ( hb_comp_iLine - hb_comp_iLineINLINE );
hb_comp_iLine++;
hb_comp_iLineINLINE = 0;
}
if( handl_o )
{
hb_pp_WrStr( handl_o, sOut );
}
#if 0
printf( "%d : %s\n", hb_comp_iLine, sOut );
#endif
return lens;
}
static void pp_ParseBuffer( PFILE pFile, int * plLine )
{
HB_BOOL bCont = HB_TRUE;
char * ptr;
while( bCont && *s_szLine != '\0' )
{
ptr = s_szLine;
HB_SKIPTABSPACES( ptr );
if( *ptr == '#' )
{
HB_BOOL bIgnore = hb_pp_ParseDirective_( ptr );
if( pFile != hb_comp_files.pLast )
{
pFile = ( PFILE ) ( ( PFILE ) hb_comp_files.pLast )->pPrev;
if( *plLine )
{
hb_snprintf( s_szLine, HB_PP_STR_SIZE, "#line %d \"%s\"\n", pFile->iLine, pFile->szFileName );
*plLine = 0;
}
else
*s_szLine = '\0';
hb_snprintf( s_szLine + strlen( s_szLine ), HB_PP_STR_SIZE - strlen( s_szLine ),
"#line 1 \"%s\"", hb_comp_files.pLast->szFileName );
bCont = HB_FALSE;
}
else if( bIgnore )
*s_szLine = '\0';
else
{
hb_pp_ParseExpression( ptr, s_szOutLine, HB_TRUE );
}
}
else
{
if( *ptr == '\0' )
{
if( hb_comp_files.iFiles == 1 )
*s_szLine = '\0';
else
bCont = HB_FALSE;
}
else
{
if( hb_pp_nCondCompile == 0 || hb_pp_aCondCompile[ hb_pp_nCondCompile - 1 ] )
{
hb_pp_ParseExpression( ptr, s_szOutLine, HB_TRUE );
HB_SKIPTABSPACES( ptr );
bCont = ( *ptr == '#' );
}
else
*s_szLine = '\0';
}
}
}
}
static char * pp_TextCommand( char * ptr, int * pLen )
{
int i;
char * cCommand = NULL;
i = 0;
while( ptr[ i ] && ptr[ i ] != '|' )
{
i++;
}
if( i > 0 )
{
cCommand = ( char * ) hb_xgrab( i + 1 );
i = 0;
while( ptr[ i ] && ptr[ i ] != '|' )
{
cCommand[ i ] = ptr[ i ];
i++;
}
cCommand[ i ] = '\0';
*pLen -= i + 1;
if( *pLen )
memcpy( ptr, ptr + i + 1, *pLen );
else
ptr[ 0 ] = '\0';
}
else if( i == 0 && *ptr == '|' )
{
( *pLen )--;
if( *pLen )
memcpy( ptr, ptr + 1, *pLen );
else
*ptr = '\0';
}
return cCommand;
}
static void pp_TextBlockFinish( void )
{
hb_pp_StreamBlock = 0;
if( s_TextEndFunc )
{
hb_strncpy( s_szLine, s_TextEndFunc, sizeof( s_szLine ) - 1 );
hb_xfree( s_TextEndFunc );
s_TextEndFunc = NULL;
}
else
{
s_szLine[ 0 ] = '\0';
}
if( s_TextOutFunc )
{
hb_xfree( s_TextOutFunc );
s_TextOutFunc = NULL;
}
if( s_TextStartFunc )
{
hb_xfree( s_TextStartFunc );
s_TextStartFunc = NULL;
}
hb_pp_NestedLiteralString = HB_FALSE;
}
HB_BOOL hb_pp_StreamBlockBegin( char * ptr, int iStreamType )
{
HB_BOOL bIgnore = HB_TRUE;
int len;
switch( iStreamType )
{
case HB_PP_STREAM_CLIPPER:
/* internal handling of TEXT/ENDTEXT command
* #pragma __text|functionOut|functionEnd|functionStart
*/
len = strlen( ptr ) - 6;
memcpy( ptr, ptr + 7, len );
s_TextOutFunc = pp_TextCommand( ptr, &len );
s_TextEndFunc = pp_TextCommand( ptr, &len );
s_TextStartFunc = pp_TextCommand( ptr, &len );
if( s_TextStartFunc )
{
memcpy( ptr, s_TextStartFunc, strlen( s_TextStartFunc ) + 1 );
bIgnore = HB_FALSE;
}
hb_pp_StreamBlock = iStreamType;
break;
case HB_PP_STREAM_PRG:
/* internal handling of TEXT/ENDTEXT command
* #pragma __stream|functionOut|functionEnd|functionStart
* (lines are joined with CR/LF or LF)
*/
len = strlen( ptr ) - 8;
memcpy( ptr, ptr + 9, len );
s_TextOutFunc = pp_TextCommand( ptr, &len );
s_TextEndFunc = pp_TextCommand( ptr, &len );
s_TextStartFunc = pp_TextCommand( ptr, &len );
*ptr = '\0';
hb_pp_StreamBlock = iStreamType;
break;
case HB_PP_STREAM_C:
/* internal handling of TEXT/ENDTEXT command
* #pragma __cstream|functionOut|functionEnd|functionStart
* (lines are joined and C esc sequences are converted)
*/
len = strlen( ptr ) - 9;
memcpy( ptr, ptr + 10, len );
s_TextOutFunc = pp_TextCommand( ptr, &len );
s_TextEndFunc = pp_TextCommand( ptr, &len );
s_TextStartFunc = pp_TextCommand( ptr, &len );
*ptr = '\0';
hb_pp_StreamBlock = iStreamType;
break;
default:
break;
}
return bIgnore;
}
static void pp_StreamBlockFinish( void )
{
hb_pp_StreamBlock = 0;
hb_snprintf( s_szOutLine, HB_PP_STR_SIZE, s_TextOutFunc, s_szLine );
s_szLine[ 0 ] = '\0';
if( s_TextStartFunc )
{
hb_strncat( s_szLine, s_TextStartFunc, sizeof( s_szLine ) - 1 );
hb_xfree( s_TextStartFunc );
s_TextStartFunc = NULL;
}
hb_strncat( s_szLine, "[", sizeof( s_szLine ) - 1 );
hb_strncat( s_szLine, s_szOutLine, sizeof( s_szLine ) - 1 );
hb_strncat( s_szLine, "]", sizeof( s_szLine ) - 1 );
if( s_TextEndFunc )
{
hb_strncat( s_szLine, s_TextEndFunc, sizeof( s_szLine ) - 1 );
hb_xfree( s_TextEndFunc );
s_TextEndFunc = NULL;
}
if( s_TextOutFunc )
{
hb_xfree( s_TextOutFunc );
s_TextOutFunc = NULL;
}
hb_pp_NestedLiteralString = HB_TRUE;
}
void hb_pp_BlockEnd()
{
if( hb_pp_StreamBlock == HB_PP_STREAM_CLIPPER )
pp_TextBlockFinish();
else
pp_StreamBlockFinish();
}
int hb_pp_ReadRules( void )
{
PFILE pFile;
char * ptr;
int lContinue;
int lens, rdlen;
HB_TRACE( HB_TR_DEBUG, ( "hb_pp_ReadRules()" ) );
#if defined( HB_PP_DEBUG_MEMORY )
if( ! s_szLine )
s_szLine = ( char * ) hb_xgrab( HB_PP_STR_SIZE );
if( ! s_szOutLine )
s_szOutLine = ( char * ) hb_xgrab( HB_PP_STR_SIZE );
#endif
for(;; )
{
pFile = hb_comp_files.pLast;
lens = lContinue = 0;
while( ( rdlen = hb_pp_RdStr( pFile->handle, s_szLine + lens, HB_PP_STR_SIZE -
lens, lContinue, ( char * ) pFile->pBuffer, &( pFile->lenBuffer ),
&( pFile->iBuffer ) ) ) >= 0 )
{
lens += rdlen;
hb_comp_iLine++;
if( s_szLine[ lens - 1 ] == ';' )
{
lContinue = 1;
lens--;
lens--;
while( s_szLine[ lens ] == ' ' || s_szLine[ lens ] == '\t' )
lens--;
s_szLine[ ++lens ] = ' ';
s_szLine[ ++lens ] = '\0';
}
else
{
lContinue = 0;
lens = 0;
}
if( ! lContinue )
{
if( *s_szLine != '\0' )
{
ptr = s_szLine;
HB_SKIPTABSPACES( ptr );
if( *ptr == '#' )
{
hb_pp_ParseDirective_( ptr );
}
*s_szLine = '\0';
}
break;
}
}
if( rdlen < 0 )
{
if( hb_comp_files.iFiles == 1 )
{
break; /* we have reached the main EOF */
}
else
{
hb_pp_CloseInclude();
hb_pp_LastOutLine = hb_comp_iLine;
}
*s_szLine = '\0';
}
}
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,217 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Header file for the Preprocesor
*
* Copyright 1999 Alexander S.Kresin <alex@belacy.belgorod.su>
* www - http://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, or (at your option)
* any later version.
*
* 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 software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries 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 Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#ifndef HB_PP_H_
#define HB_PP_H_
#include "hbapi.h"
#include "hbapifs.h"
#include "hberrors.h"
HB_EXTERN_BEGIN
typedef void * PHB_PP_STATE;
typedef void * PHB_PP_TOKEN;
typedef void * PHB_PP_OPEN_FUNC;
struct _DEFINES;
typedef struct _DEFINES
{
char * name;
int namelen;
char * pars;
int npars;
char * value;
struct _DEFINES * last;
} DEFINES;
struct _COMMANDS;
typedef struct _COMMANDS
{
int com_or_xcom;
char * name;
int namelen;
char * mpatt;
char * value;
struct _COMMANDS * last;
} COMMANDS;
/* #include support */
typedef struct
{
FILE * handle; /* handle of the opened file */
void * pBuffer; /* file buffer */
char * yyBuffer; /* buffer used by yyac */
int iBuffer; /* current position in file buffer */
int lenBuffer; /* current length of data in file buffer */
char * szFileName; /* name of the file */
void * pPrev; /* pointer to the previous opened file */
void * pNext; /* pointer to the next opened file */
int iLine; /* currently processed line number */
} _FILE, * PFILE; /* structure to hold an opened PRG or CH */
/* structure to control several opened PRGs and CHs */
typedef struct
{
PFILE pLast; /* pointer to the last opened file */
int iFiles; /* number of files currently opened */
} FILES;
#define HB_PP_STR_SIZE 12288
#define HB_PP_BUFF_SIZE 4096
#define HB_SKIPTABSPACES( sptr ) while( *( sptr ) == ' ' || *( sptr ) == '\t' ) ( sptr )++
/* ppcore.c exported functions and variables */
#define HB_INCLUDE_FUNC_( hbFunc ) HB_BOOL hbFunc( char *, HB_PATHNAMES * )
typedef HB_INCLUDE_FUNC_ ( HB_INCLUDE_FUNC );
typedef HB_INCLUDE_FUNC * HB_INCLUDE_FUNC_PTR;
extern void hb_pp_SetRules_( HB_INCLUDE_FUNC_PTR hb_compInclude, HB_BOOL hb_comp_bQuiet );
extern int hb_pp_ReadRules( void );
extern void hb_pp_Init( void );
extern void hb_pp_Free( void );
extern void hb_pp_CloseInclude( void );
extern int hb_pp_ParseDirective_( char * ); /* Parsing preprocessor directives ( #... ) */
extern int hb_pp_ParseExpression( char *, char *, HB_BOOL ); /* Parsing a line ( without preprocessor directive ) */
extern int hb_pp_WrStr( FILE *, char * );
extern int hb_pp_RdStr( FILE *, char *, int, HB_BOOL, char *, int *, int * );
extern void hb_pp_Stuff( char *, char *, int, int, int );
extern int hb_pp_strocpy( char *, char * );
extern DEFINES * hb_pp_AddDefine_( char *, char * ); /* Add new #define to a linked list */
extern PHB_FNAME hb_comp_pFileName;
extern HB_BOOL hb_comp_bQuiet;
extern HB_BOOL hb_comp_bStartProc;
extern HB_BOOL hb_comp_bAutoMemvarAssume;
extern HB_BOOL hb_comp_bForceMemvars;
extern HB_BOOL hb_comp_bShortCuts;
extern HB_BOOL hb_comp_bDebugInfo;
extern HB_BOOL hb_comp_bLineNumbers;
extern int hb_comp_iExitLevel;
extern int hb_comp_iWarnings;
extern int hb_comp_iLine;
extern int hb_comp_iLineINLINE;
extern int hb_comp_iLinePRG;
extern int hb_pp_lInclude;
extern int * hb_pp_aCondCompile;
extern int hb_pp_nCondCompile;
extern const char * hb_pp_szErrors[];
extern const char * hb_pp_szWarnings[];
extern int hb_pp_nEmptyStrings;
extern int hb_pp_LastOutLine;
extern int hb_pp_StreamBlock;
extern HB_BOOL hb_pp_NestedLiteralString;
extern HB_BOOL hb_pp_LiteralEscSeq;
extern unsigned int hb_pp_MaxTranslateCycles;
extern HB_PATHNAMES * hb_comp_pIncludePath;
extern FILES hb_comp_files;
extern HB_BOOL hb_comp_bPPO;
extern FILE * hb_comp_yyppo;
/* ppcomp.c exported functions */
extern int hb_pp_Internal_( FILE *, char * );
extern void hb_pp_InternalFree( void );
#define HB_PP_STREAM_DUMP_C 1 /* pragma BEGINDUMP */
#define HB_PP_STREAM_CLIPPER 2 /* clipper compatible TEXT/ENDTEXT */
#define HB_PP_STREAM_PRG 4 /* TEXT/ENDTEXT lines joined with LF */
#define HB_PP_STREAM_C 8 /* TEXT/ENDTEXT lines joined and ESC seq processed */
extern HB_BOOL hb_pp_StreamBlockBegin( char *, int );
extern void hb_pp_BlockEnd( void );
/* pptable.c exported functions and variables */
extern void hb_pp_Table( void );
extern DEFINES * hb_pp_topDefine;
extern COMMANDS * hb_pp_topCommand;
extern COMMANDS * hb_pp_topTranslate;
/* pragma.c exported functions */
extern HB_BOOL hb_pp_ParsePragma( char * szline );
/*
* Errors generated by Harbour preprocessor
*/
#define HB_PP_ERR_CANNOT_OPEN 1
#define HB_PP_ERR_DIRECTIVE_ELSE 2
#define HB_PP_ERR_DIRECTIVE_ENDIF 3
#define HB_PP_ERR_WRONG_NAME 4
#define HB_PP_ERR_DEFINE_ABSENT 5
#define HB_PP_ERR_COMMAND_DEFINITION 6
#define HB_PP_ERR_PATTERN_DEFINITION 7
#define HB_PP_ERR_RECURSE 8
#define HB_PP_ERR_WRONG_DIRECTIVE 9
#define HB_PP_ERR_EXPLICIT 10
#define HB_PP_ERR_MEMALLOC 11
#define HB_PP_ERR_MEMREALLOC 12
#define HB_PP_ERR_MEMFREE 13
#define HB_PP_ERR_PRAGMA_BAD_VALUE 14
#define HB_PP_ERR_CANNOT_OPEN_RULES 15
#define HB_PP_ERR_BAD_RULES_FILE_NAME 16
#define HB_PP_ERR_TOO_MANY_INCLUDES 17
#define HB_PP_ERR_BUFFER_OVERFLOW 18
#define HB_PP_ERR_LABEL_MISSING_IN_DEFINE 19
#define HB_PP_ERR_PARE_MISSING_IN_DEFINE 20
#define HB_PP_ERR_LABEL_DUPL_IN_DEFINE 21
#define HB_PP_WARN_DEFINE_REDEF 1
#define HB_PP_WARN_NO_DIRECTIVES 2
HB_EXTERN_END
#endif /* HB_PP_H_ */

View File

@@ -1,450 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Preprocessor precompiled std.ch and some additions ( mainly generated )
*
* Copyright 1999 Alexander S.Kresin <alex@belacy.belgorod.su>
* www - http://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, or (at your option)
* any later version.
*
* 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 software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries 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 Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
/*
* Avoid tracing in preprocessor/compiler.
*/
#if ! defined(HB_TRACE_UTILS)
#if defined(HB_TRACE_LEVEL)
#undef HB_TRACE_LEVEL
#endif
#endif
#include <stdio.h>
#include "hbppdef.h"
COMMANDS * hb_pp_topCommand = NULL;
COMMANDS * hb_pp_topTranslate = NULL;
DEFINES * hb_pp_topDefine = NULL;
void hb_pp_Table( void )
{
static DEFINES sD___01 = {"_SET_ALTERNATE", 14,NULL,-1,"18", NULL };
static DEFINES sD___02 = {"_SET_ALTFILE", 12,NULL,-1,"19", &sD___01 };
static DEFINES sD___03 = {"_SET_BELL", 9,NULL,-1,"26", &sD___02 };
static DEFINES sD___04 = {"_SET_CANCEL", 11,NULL,-1,"12", &sD___03 };
static DEFINES sD___05 = {"_SET_COLOR", 10,NULL,-1,"15", &sD___04 };
static DEFINES sD___06 = {"_SET_CONFIRM", 12,NULL,-1,"27", &sD___05 };
static DEFINES sD___07 = {"_SET_CONSOLE", 12,NULL,-1,"17", &sD___06 };
static DEFINES sD___08 = {"_SET_CURSOR", 11,NULL,-1,"16", &sD___07 };
static DEFINES sD___09 = {"_SET_DATEFORMAT", 15,NULL,-1,"4", &sD___08 };
static DEFINES sD___10 = {"_SET_DEBUG", 10,NULL,-1,"13", &sD___09 };
static DEFINES sD___11 = {"_SET_DECIMALS", 13,NULL,-1,"3", &sD___10 };
static DEFINES sD___12 = {"_SET_DEFAULT", 12,NULL,-1,"7", &sD___11 };
static DEFINES sD___13 = {"_SET_DELETED", 12,NULL,-1,"11", &sD___12 };
static DEFINES sD___14 = {"_SET_DELIMCHARS", 15,NULL,-1,"34", &sD___13 };
static DEFINES sD___15 = {"_SET_DELIMITERS", 15,NULL,-1,"33", &sD___14 };
static DEFINES sD___16 = {"_SET_DEVICE", 11,NULL,-1,"20", &sD___15 };
static DEFINES sD___17 = {"_SET_EPOCH", 10,NULL,-1,"5", &sD___16 };
static DEFINES sD___18 = {"_SET_ESCAPE", 11,NULL,-1,"28", &sD___17 };
static DEFINES sD___19 = {"_SET_EVENTMASK", 14,NULL,-1,"39", &sD___18 };
static DEFINES sD___20 = {"_SET_EXACT", 10,NULL,-1,"1", &sD___19 };
static DEFINES sD___21 = {"_SET_EXCLUSIVE", 14,NULL,-1,"8", &sD___20 };
static DEFINES sD___22 = {"_SET_EXIT", 9,NULL,-1,"30", &sD___21 };
static DEFINES sD___23 = {"_SET_EXTRA", 10,NULL,-1,"21", &sD___22 };
static DEFINES sD___24 = {"_SET_EXTRAFILE", 14,NULL,-1,"22", &sD___23 };
static DEFINES sD___25 = {"_SET_FIXED", 10,NULL,-1,"2", &sD___24 };
static DEFINES sD___26 = {"_SET_INSERT", 11,NULL,-1,"29", &sD___25 };
static DEFINES sD___27 = {"_SET_INTENSITY", 14,NULL,-1,"31", &sD___26 };
static DEFINES sD___28 = {"_SET_MARGIN", 11,NULL,-1,"25", &sD___27 };
static DEFINES sD___29 = {"_SET_MCENTER", 12,NULL,-1,"37", &sD___28 };
static DEFINES sD___30 = {"_SET_MESSAGE", 12,NULL,-1,"36", &sD___29 };
static DEFINES sD___31 = {"_SET_PATH", 9,NULL,-1,"6", &sD___30 };
static DEFINES sD___32 = {"_SET_PRINTER", 12,NULL,-1,"23", &sD___31 };
static DEFINES sD___33 = {"_SET_PRINTFILE", 14,NULL,-1,"24", &sD___32 };
static DEFINES sD___34 = {"_SET_SCOREBOARD", 15,NULL,-1,"32", &sD___33 };
static DEFINES sD___35 = {"_SET_SCROLLBREAK", 16,NULL,-1,"38", &sD___34 };
static DEFINES sD___36 = {"_SET_SOFTSEEK", 13,NULL,-1,"9", &sD___35 };
static DEFINES sD___37 = {"_SET_TYPEAHEAD", 14,NULL,-1,"14", &sD___36 };
static DEFINES sD___38 = {"_SET_UNIQUE", 11,NULL,-1,"10", &sD___37 };
static DEFINES sD___39 = {"_SET_WRAP", 9,NULL,-1,"35", &sD___38 };
static DEFINES sD___40 = {"_SET_COUNT", 10,NULL,-1,"47", &sD___39 };
static DEFINES sD___41 = {"_SET_CH", 7,NULL,-1,NULL, &sD___40 };
static DEFINES sD___42 = {"_DFSET", 6,"\001x,\001y",2,"Set( _SET_DATEFORMAT, if(__SetCentury(), \001x, \001y) )", &sD___41 };
static DEFINES sD___43 = {"_SET_VIDEOMODE", 14,NULL,-1,"40", &sD___42 };
static DEFINES sD___44 = {"_SET_MBLOCKSIZE", 15,NULL,-1,"41", &sD___43 };
static DEFINES sD___45 = {"_SET_MFILEEXT", 13,NULL,-1,"42", &sD___44 };
static DEFINES sD___46 = {"_SET_STRICTREAD", 15,NULL,-1,"43", &sD___45 };
static DEFINES sD___47 = {"_SET_OPTIMIZE", 13,NULL,-1,"44", &sD___46 };
static DEFINES sD___48 = {"_SET_AUTOPEN", 12,NULL,-1,"45", &sD___47 };
static DEFINES sD___49 = {"_SET_AUTORDER", 13,NULL,-1,"46", &sD___48 };
static DEFINES sD___50 = {"_SET_AUTOSHARE", 14,NULL,-1,"47", &sD___49 };
static DEFINES sD___51 = {"_SET_LANGUAGE", 13,NULL,-1,"100", &sD___50 };
static DEFINES sD___52 = {"_SET_IDLEREPEAT", 15,NULL,-1,"101", &sD___51 };
static DEFINES sD___53 = {"_SET_FILECASE", 13,NULL,-1,"102", &sD___52 };
static DEFINES sD___54 = {"_SET_DIRCASE", 12,NULL,-1,"103", &sD___53 };
static DEFINES sD___55 = {"_SET_DIRSEPARATOR", 17,NULL,-1,"104", &sD___54 };
static DEFINES sD___56 = {"_SET_EOF", 8,NULL,-1,"105", &sD___55 };
static DEFINES sD___57 = {"_SET_HARDCOMMIT", 15,NULL,-1,"106", &sD___56 };
static DEFINES sD___58 = {"_SET_FORCEOPT", 13,NULL,-1,"107", &sD___57 };
static DEFINES sD___59 = {"_SET_DBFLOCKSCHEME", 18,NULL,-1,"108", &sD___58 };
static DEFINES sD___60 = {"_SET_DEFEXTENSIONS", 18,NULL,-1,"109", &sD___59 };
static COMMANDS sC___1 = {0,"NOTE", 4,"\1A30",NULL,NULL };
static COMMANDS sC___2 = {0,"DO",2,"WHILE \1A00","while \1A00",&sC___1 };
static COMMANDS sC___3 = {0,"END",3,"\1A00","end",&sC___2 };
static COMMANDS sC___4 = {0,"END",3,"SEQUENCE","end",&sC___3 };
static COMMANDS sC___5 = {0,"ENDSEQUENCE",11,"","end",&sC___4 };
static COMMANDS sC___6 = {0,"ENDDO",5,"\1A30","enddo",&sC___5 };
static COMMANDS sC___7 = {0,"ENDIF",5,"\1A30","endif",&sC___6 };
static COMMANDS sC___8 = {0,"ENDCASE",7,"\1A30","endcase",&sC___7 };
static COMMANDS sC___9 = {0,"ENDFOR",6,"\2 \1A30 \3","next",&sC___8 };
static COMMANDS sC___10 = {0,"NEXT",4,"\1A00 \2TO \1B00\3 \2STEP \1C00\3","next",&sC___9 };
static COMMANDS sC___11 = {0,"DO",2,"\1A00.PRG \2WITH \1B10\3","do \1A00 \2 WITH \1B00\3",&sC___10 };
static COMMANDS sC___12 = {0,"CALL",4,"\1A00() \2WITH \1B10\3","call \1A00 \2 WITH \1B00\3",&sC___11 };
static COMMANDS sC___13 = {0,"STORE",5,"\1A00 TO \1B00 \2, \1C00 \3","\1B00 := \2 \1C00 := \3 \1A00",&sC___12 };
static COMMANDS sC___14 = {0,"SET",3,"ECHO \1A30",NULL,&sC___13 };
static COMMANDS sC___15 = {0,"SET",3,"HEADING \1A30",NULL,&sC___14 };
static COMMANDS sC___16 = {0,"SET",3,"MENU \1A30",NULL,&sC___15 };
static COMMANDS sC___17 = {0,"SET",3,"STATUS \1A30",NULL,&sC___16 };
static COMMANDS sC___18 = {0,"SET",3,"STEP \1A30",NULL,&sC___17 };
static COMMANDS sC___19 = {0,"SET",3,"SAFETY \1A30",NULL,&sC___18 };
static COMMANDS sC___20 = {0,"SET",3,"TALK \1A30",NULL,&sC___19 };
static COMMANDS sC___21 = {0,"SET",3,"PROCEDURE TO",NULL,&sC___20 };
static COMMANDS sC___22 = {0,"SET",3,"PROCEDURE TO \1A00","_ProcReq_( \1A30 )",&sC___21 };
static COMMANDS sC___23 = {0,"SET",3,"EXACT \1A20ON,OFF,&>","Set( _SET_EXACT, \1A30 )",&sC___22 };
static COMMANDS sC___24 = {0,"SET",3,"EXACT (\1A00)","Set( _SET_EXACT, \1A00 )",&sC___23 };
static COMMANDS sC___25 = {0,"SET",3,"FIXED \1A20ON,OFF,&>","Set( _SET_FIXED, \1A30 )",&sC___24 };
static COMMANDS sC___26 = {0,"SET",3,"FIXED (\1A00)","Set( _SET_FIXED, \1A00 )",&sC___25 };
static COMMANDS sC___27 = {0,"SET",3,"DECIMALS TO \1A00","Set( _SET_DECIMALS, \1A00 )",&sC___26 };
static COMMANDS sC___28 = {0,"SET",3,"DECIMALS TO","Set( _SET_DECIMALS, 0 )",&sC___27 };
static COMMANDS sC___29 = {0,"SET",3,"PATH TO \1A30","Set( _SET_PATH, \1A30 )",&sC___28 };
static COMMANDS sC___30 = {0,"SET",3,"PATH TO","Set( _SET_PATH, "" )",&sC___29 };
static COMMANDS sC___31 = {0,"SET",3,"DEFAULT TO \1A40","Set( _SET_DEFAULT, \1A30 )",&sC___30 };
static COMMANDS sC___32 = {0,"SET",3,"DEFAULT TO","Set( _SET_DEFAULT, "" )",&sC___31 };
static COMMANDS sC___33 = {0,"SET",3,"CENTURY \1A20ON,OFF,&>","__SetCentury( \1A30 )",&sC___32 };
static COMMANDS sC___34 = {0,"SET",3,"CENTURY (\1A00)","__SetCentury( \1A00 )",&sC___33 };
static COMMANDS sC___35 = {0,"SET",3,"EPOCH TO \1A00","Set( _SET_EPOCH, \1A00 )",&sC___34 };
static COMMANDS sC___36 = {0,"SET",3,"DATE FORMAT \2TO\3 \1A00","Set( _SET_DATEFORMAT, \1A00 )",&sC___35 };
static COMMANDS sC___37 = {0,"SET",3,"DATE \2TO\3 AMERICAN","_DFSET( 'mm/dd/yyyy', 'mm/dd/yy' )",&sC___36 };
static COMMANDS sC___38 = {0,"SET",3,"DATE \2TO\3 ANSI","_DFSET( 'yyyy.mm.dd', 'yy.mm.dd' )",&sC___37 };
static COMMANDS sC___39 = {0,"SET",3,"DATE \2TO\3 BRITISH","_DFSET( 'dd/mm/yyyy', 'dd/mm/yy' )",&sC___38 };
static COMMANDS sC___40 = {0,"SET",3,"DATE \2TO\3 FRENCH","_DFSET( 'dd/mm/yyyy', 'dd/mm/yy' )",&sC___39 };
static COMMANDS sC___41 = {0,"SET",3,"DATE \2TO\3 GERMAN","_DFSET( 'dd.mm.yyyy', 'dd.mm.yy' )",&sC___40 };
static COMMANDS sC___42 = {0,"SET",3,"DATE \2TO\3 ITALIAN","_DFSET( 'dd-mm-yyyy', 'dd-mm-yy' )",&sC___41 };
static COMMANDS sC___43 = {0,"SET",3,"DATE \2TO\3 JAPANESE","_DFSET( 'yyyy/mm/dd', 'yy/mm/dd' )",&sC___42 };
static COMMANDS sC___44 = {0,"SET",3,"DATE \2TO\3 USA","_DFSET( 'mm-dd-yyyy', 'mm-dd-yy' )",&sC___43 };
static COMMANDS sC___45 = {0,"SET",3,"ALTERNATE \1A20ON,OFF,&>","Set( _SET_ALTERNATE, \1A30 )",&sC___44 };
static COMMANDS sC___46 = {0,"SET",3,"ALTERNATE (\1A00)","Set( _SET_ALTERNATE, \1A00 )",&sC___45 };
static COMMANDS sC___47 = {0,"SET",3,"ALTERNATE TO","Set( _SET_ALTFILE, "" )",&sC___46 };
static COMMANDS sC___48 = {0,"SET",3,"ALTERNATE TO \1A40 \2\1B20 ADDITIVE>\3","Set( _SET_ALTFILE, \1A30, \1B50 )",&sC___47 };
static COMMANDS sC___49 = {0,"SET",3,"CONSOLE \1A20ON,OFF,&>","Set( _SET_CONSOLE, \1A30 )",&sC___48 };
static COMMANDS sC___50 = {0,"SET",3,"CONSOLE (\1A00)","Set( _SET_CONSOLE, \1A00 )",&sC___49 };
static COMMANDS sC___51 = {0,"SET",3,"MARGIN TO \1A00","Set( _SET_MARGIN, \1A00 )",&sC___50 };
static COMMANDS sC___52 = {0,"SET",3,"MARGIN TO","Set( _SET_MARGIN, 0 )",&sC___51 };
static COMMANDS sC___53 = {0,"SET",3,"PRINTER \1A20ON,OFF,&>","Set( _SET_PRINTER, \1A30 )",&sC___52 };
static COMMANDS sC___54 = {0,"SET",3,"PRINTER (\1A00)","Set( _SET_PRINTER, \1A00 )",&sC___53 };
static COMMANDS sC___55 = {0,"SET",3,"PRINTER TO","Set( _SET_PRINTFILE, '""' )",&sC___54 };
static COMMANDS sC___56 = {0,"SET",3,"PRINTER TO \1A40 \2\1B20 ADDITIVE>\3","Set( _SET_PRINTFILE, \1A30, \1B50 )",&sC___55 };
static COMMANDS sC___57 = {0,"SET",3,"DEVICE TO SCREEN","Set( _SET_DEVICE, 'SCREEN' )",&sC___56 };
static COMMANDS sC___58 = {0,"SET",3,"DEVICE TO PRINTER","Set( _SET_DEVICE, 'PRINTER' )",&sC___57 };
static COMMANDS sC___59 = {0,"SET",3,"COLOR TO \2\1A30\3","SetColor( \1A10 )",&sC___58 };
static COMMANDS sC___60 = {0,"SET",3,"COLOR TO ( \1A00 )","SetColor( \1A00 )",&sC___59 };
static COMMANDS sC___61 = {0,"SET",3,"COLOUR TO \2\1A30\3","SET COLOR TO \2\1A00\3",&sC___60 };
static COMMANDS sC___62 = {0,"SET",3,"CURSOR \1A20ON,OFF,&>","SetCursor( if(Upper(\1A30) == 'ON', 1, 0) )",&sC___61 };
static COMMANDS sC___63 = {0,"SET",3,"CURSOR (\1A00)","SetCursor( if(\1A00, 1, 0) )",&sC___62 };
static COMMANDS sC___64 = {0,"?",1,"\2 \1A10\3","QOut( \1A00 )",&sC___63 };
static COMMANDS sC___65 = {0,"?",1,"? \2 \1A10\3","QQOut( \1A00 )",&sC___64 };
static COMMANDS sC___66 = {0,"EJECT",5,"","__Eject()",&sC___65 };
static COMMANDS sC___67 = {0,"TEXT",4,"","#pragma __text|QOut(%s)|QQOut()",&sC___66 };
static COMMANDS sC___68 = {0,"TEXT",4,"TO FILE \1A40","#pragma __text|QOut(%s)|__TextRestore()|__TextSave( \1A30 )",&sC___67 };
static COMMANDS sC___69 = {0,"TEXT",4,"TO PRINTER","#pragma __text|QOut(%s)|__TextRestore()|__TextSave('PRINTER')",&sC___68 };
static COMMANDS sC___70 = {0,"CLS",3,"","Scroll() ; SetPos(0,0)",&sC___69 };
static COMMANDS sC___71 = {0,"CLEAR",5,"SCREEN","CLS",&sC___70 };
static COMMANDS sC___72 = {0,"@",1,"\1A00, \1B00","Scroll( \1A00, \1B00, \1A00 ) ; SetPos( \1A00, \1B00 )",&sC___71 };
static COMMANDS sC___73 = {0,"@",1,"\1A00, \1B00 CLEAR","Scroll( \1A00, \1B00 ) ; SetPos( \1A00, \1B00 )",&sC___72 };
static COMMANDS sC___74 = {0,"@",1,"\1A00, \1B00 CLEAR TO \1C00, \1D00",
"Scroll( \1A00, \1B00, \1C00, \1D00 ) ; SetPos( \1A00, \1B00 )",&sC___73 };
static COMMANDS sC___75 = {0,"@",1,"\1A00, \1B00, \1C00, \1D00 BOX \1E00 \2COLOR \1F00\3",
"DispBox( \1A00, \1B00, \1C00, \1D00, \1E00 \2, \1F00 \3 )",&sC___74 };
static COMMANDS sC___76 = {0,"@",1,"\1A00, \1B00 TO \1C00, \1D00 \2DOUBLE\3 \2COLOR \1E00\3",
"DispBox( \1A00, \1B00, \1C00, \1D00, 2 \2, \1E00 \3 )",&sC___75 };
static COMMANDS sC___77 = {0,"@",1,"\1A00, \1B00 TO \1C00, \1D00 \2COLOR \1E00\3",
"DispBox( \1A00, \1B00, \1C00, \1D00, 1 \2, \1E00 \3 )",&sC___76 };
static COMMANDS sC___78 = {0,"@",1,"\1A00, \1B00 SAY \1C00 \2PICTURE \1D00\3 \2COLOR \1E00\3",
"DevPos( \1A00, \1B00 ) ; DevOutPict( \1C00, \1D00 \2, \1E00\3 )",&sC___77 };
static COMMANDS sC___79 = {0,"@",1,"\1A00, \1B00 SAY \1C00 \2COLOR \1D00\3",
"DevPos( \1A00, \1B00 ) ; DevOut( \1C00 \2, \1D00\3 )",&sC___78 };
static COMMANDS sC___80 = {0,"SET",3,"BELL \1A20ON,OFF,&>","Set( _SET_BELL, \1A30 )",&sC___79 };
static COMMANDS sC___81 = {0,"SET",3,"BELL (\1A00)","Set( _SET_BELL, \1A00 )",&sC___80 };
static COMMANDS sC___82 = {0,"SET",3,"CONFIRM \1A20ON,OFF,&>","Set( _SET_CONFIRM, \1A30 )",&sC___81 };
static COMMANDS sC___83 = {0,"SET",3,"CONFIRM (\1A00)","Set( _SET_CONFIRM, \1A00 )",&sC___82 };
static COMMANDS sC___84 = {0,"SET",3,"ESCAPE \1A20ON,OFF,&>","Set( _SET_ESCAPE, \1A30 )",&sC___83 };
static COMMANDS sC___85 = {0,"SET",3,"ESCAPE (\1A00)","Set( _SET_ESCAPE, \1A00 )",&sC___84 };
static COMMANDS sC___86 = {0,"SET",3,"INTENSITY \1A20ON,OFF,&>","Set( _SET_INTENSITY, \1A30 )",&sC___85 };
static COMMANDS sC___87 = {0,"SET",3,"INTENSITY (\1A00)","Set( _SET_INTENSITY, \1A00 )",&sC___86 };
static COMMANDS sC___88 = {0,"SET",3,"SCOREBOARD \1A20ON,OFF,&>","Set( _SET_SCOREBOARD, \1A30 )",&sC___87 };
static COMMANDS sC___89 = {0,"SET",3,"SCOREBOARD (\1A00)","Set( _SET_SCOREBOARD, \1A00 )",&sC___88 };
static COMMANDS sC___90 = {0,"SET",3,"DELIMITERS \1A20ON,OFF,&>","Set( _SET_DELIMITERS, \1A30 )",&sC___89 };
static COMMANDS sC___91 = {0,"SET",3,"DELIMITERS (\1A00)","Set( _SET_DELIMITERS, \1A00 )",&sC___90 };
static COMMANDS sC___92 = {0,"SET",3,"DELIMITERS TO \1A00","Set( _SET_DELIMCHARS, \1A00 )",&sC___91 };
static COMMANDS sC___93 = {0,"SET",3,"DELIMITERS TO DEFAULT","Set( _SET_DELIMCHARS, '::' )",&sC___92 };
static COMMANDS sC___94 = {0,"SET",3,"DELIMITERS TO","Set( _SET_DELIMCHARS, '::' )",&sC___93 };
static COMMANDS sC___95 = {0,"SET",3,"FORMAT TO \1A00","_ProcReq_( \1A30 + '.fmt' ) ; __SetFormat( {|| \1A00()} )",&sC___94 };
static COMMANDS sC___96 = {0,"SET",3,"FORMAT TO \1A00.\1B00",
"_ProcReq_( \1A30 + '.' + \1B30 ) ; __SetFormat( {|| \1A00()} )",&sC___95 };
static COMMANDS sC___97 = {0,"SET",3,"FORMAT TO \1A20&>",
"if ( Empty(\1A30) ) ; SET FORMAT TO ; else ; __SetFormat( &('{||' + \1A30 + '()}') ) ; end",&sC___96 };
static COMMANDS sC___98 = {0,"SET",3,"FORMAT TO","__SetFormat()",&sC___97 };
static COMMANDS sC___99 = {0,"@",1,"\1A00, \1B00 GET \1C00 \2PICTURE \1D00\3 \2VALID \1E00\3 \2WHEN \1F00\3 \2SEND \1G00\3",
"SetPos( \1A00, \1B00 ) ; AAdd( GetList, _GET_( \1C00, \1C20, \1D00, \1E40, \1F40 ):display() ) \2; ATail(GetList):\1G00\3",&sC___98 };
static COMMANDS sC___100 = {0,"@",1,"\1A00, \1B00 SAY \1C00 \2\1D10\3 GET \1E00 \2\1F10\3",
"@ \1A00, \1B00 SAY \1C00 \2\1D00\3 ; @ Row(), Col()+1 GET \1E00 \2\1F00\3",&sC___99 };
static COMMANDS sC___101 = {0,"@",1,"\1A00, \1B00 GET \1C00 \2\1D10\3 RANGE \1E00, \1F00 \2\1G10\3",
"@ \1A00, \1B00 GET \1C00 \2\1D00\3 VALID {|_1| RangeCheck(_1,, \1E00, \1F00)} \2\1G00\3",&sC___100 };
static COMMANDS sC___102 = {0,"@",1,"\1A00, \1B00 GET \1C00 \2\1D10\3 COLOR \1E00 \2\1F10\3",
"@ \1A00, \1B00 GET \1C00 \2\1D00\3 SEND colorDisp(\1E00) \2\1F00\3",&sC___101 };
static COMMANDS sC___103 = {0,"READ",4,"SAVE","ReadModal(GetList)",&sC___102 };
static COMMANDS sC___104 = {0,"READ",4,"","ReadModal(GetList) ; GetList := {}",&sC___103 };
static COMMANDS sC___105 = {0,"CLEAR",5,"GETS","ReadKill(.T.) ; GetList := {}",&sC___104 };
static COMMANDS sC___106 = {0,"@",1,"\2\1A10\3 COLOUR \2\1B10\3","@ \2\1A00\3 COLOR \2\1B00\3",&sC___105 };
static COMMANDS sC___107 = {0,"SET",3,"WRAP \1A20ON,OFF,&>","Set( _SET_WRAP, \1A30 )",&sC___106 };
static COMMANDS sC___108 = {0,"SET",3,"WRAP (\1A00)","Set( _SET_WRAP, \1A00 )",&sC___107 };
static COMMANDS sC___109 = {0,"SET",3,"MESSAGE TO \1A00 \2\1B20 CENTER, CENTRE>\3",
"Set( _SET_MESSAGE, \1A00 ) ; Set( _SET_MCENTER, \1B50 )",&sC___108 };
static COMMANDS sC___110 = {0,"SET",3,"MESSAGE TO","Set( _SET_MESSAGE, 0 ) ; Set( _SET_MCENTER, .F. )",&sC___109 };
static COMMANDS sC___111 = {0,"@",1,"\1A00, \1B00 PROMPT \1C00 \2MESSAGE \1D00\3 \2COLOR \1E00\3",
"__AtPrompt( \1A00, \1B00, \1C00 , \1D00 , \1E00 )",&sC___110 };
static COMMANDS sC___112 = {0,"MENU",4,"TO \1A00","\1A00 := __MenuTo( {|_1| if(PCount() == 0, \1A00, \1A00 := _1)}, \1A10 )",&sC___111 };
static COMMANDS sC___113 = {0,"SAVE",4,"SCREEN","__XSaveScreen()",&sC___112 };
static COMMANDS sC___114 = {0,"RESTORE",7,"SCREEN","__XRestScreen()",&sC___113 };
static COMMANDS sC___115 = {0,"SAVE",4,"SCREEN TO \1A00","\1A00 := SaveScreen( 0, 0, Maxrow(), Maxcol() )",&sC___114 };
static COMMANDS sC___116 = {0,"RESTORE",7,"SCREEN FROM \1A00","RestScreen( 0, 0, Maxrow(), Maxcol(), \1A00 )",&sC___115 };
static COMMANDS sC___117 = {0,"WAIT",4,"\2\1A00\3","__Wait( \1A00 )",&sC___116 };
static COMMANDS sC___118 = {0,"WAIT",4,"\2\1A00\3 TO \1B00","\1B00 := __Wait( \1A00 )",&sC___117 };
static COMMANDS sC___119 = {0,"ACCEPT",6,"\2\1A00\3 TO \1B00","\1B00 := __Accept( \1A00 )",&sC___118 };
static COMMANDS sC___120 = {0,"INPUT",5,"\2\1A00\3 TO \1B00",
"if ( !Empty(__Accept(\1A00)) ) ; \1B00 := &( __AcceptStr() ) ; end",&sC___119 };
static COMMANDS sC___121 = {0,"KEYBOARD",8,"\1A00","__Keyboard( \1A00 )",&sC___120 };
static COMMANDS sC___122 = {0,"CLEAR",5,"TYPEAHEAD","__Keyboard()",&sC___121 };
static COMMANDS sC___123 = {0,"SET",3,"TYPEAHEAD TO \1A00","Set( _SET_TYPEAHEAD, \1A00 )",&sC___122 };
static COMMANDS sC___124 = {0,"SET",3,"KEY \1A00 TO \1B00","SetKey( \1A00, {|p, l, v| \1B00(p, l, v)} )",&sC___123 };
static COMMANDS sC___125 = {0,"SET",3,"KEY \1A00 TO \1B00 ( \2\1C10\3 )","SET KEY \1A00 TO \1B00",&sC___124 };
static COMMANDS sC___126 = {0,"SET",3,"KEY \1A00 TO \1B20&>",
"if ( Empty(\1B30) ) ; SetKey( \1A00, NIL ) ; else ; SetKey( \1A00, {|p, l, v| \1B00(p, l, v)} ) ; end",&sC___125 };
static COMMANDS sC___127 = {0,"SET",3,"KEY \1A00 \2TO\3","SetKey( \1A00, NIL )",&sC___126 };
static COMMANDS sC___128 = {0,"SET",3,"FUNCTION \1A00 \2TO\3 \2\1B00\3","__SetFunction( \1A00, \1B00 )",&sC___127 };
static COMMANDS sC___129 = {0,"CLEAR",5,"MEMORY","__MVClear()",&sC___128 };
static COMMANDS sC___130 = {0,"RELEASE",7," \1A10","__MVXRelease( \1A30 )",&sC___129 };
static COMMANDS sC___131 = {0,"RELEASE",7,"ALL","__MVRelease('*', .T.)",&sC___130 };
static COMMANDS sC___132 = {0,"RELEASE",7,"ALL LIKE \1A00","__MVRelease( \1A10, .T. )",&sC___131 };
static COMMANDS sC___133 = {0,"RELEASE",7,"ALL EXCEPT \1A00","__MVRelease( \1A10, .F. )",&sC___132 };
static COMMANDS sC___134 = {0,"RESTORE",7,"\2FROM \1A40\3 \2\1B20 ADDITIVE>\3","__MVRestore( \1A30, \1B50 )",&sC___133 };
static COMMANDS sC___135 = {0,"SAVE",4,"ALL LIKE \1A00 TO \1B40","__MVSave( \1B30, \1A30, .T. )",&sC___134 };
static COMMANDS sC___136 = {0,"SAVE",4,"TO \1A40 ALL LIKE \1B00","__MVSave( \1A30, \1B30, .T. )",&sC___135 };
static COMMANDS sC___137 = {0,"SAVE",4,"ALL EXCEPT \1A00 TO \1B40","__MVSave( \1B30, \1A30, .F. )",&sC___136 };
static COMMANDS sC___138 = {0,"SAVE",4,"TO \1A40 ALL EXCEPT \1B00","__MVSave( \1A30, \1B30, .F. )",&sC___137 };
static COMMANDS sC___139 = {0,"SAVE",4,"\2TO \1A40\3 \2ALL\3","__MVSave( \1A30, '*', .T. )",&sC___138 };
static COMMANDS sC___140 = {0,"ERASE",5,"\1A40","FErase( \1A30 )",&sC___139 };
static COMMANDS sC___141 = {0,"DELETE",6,"FILE \1A40","FErase( \1A30 )",&sC___140 };
static COMMANDS sC___142 = {0,"RENAME",6,"\1A40 TO \1B40","FRename( \1A30, \1B30 )",&sC___141 };
static COMMANDS sC___143 = {0,"COPY",4,"FILE \1A40 TO \1B40","__CopyFile( \1A30, \1B30 )",&sC___142 };
static COMMANDS sC___144 = {0,"DIR",3,"\2\1A40\3","__Dir( \1A30 )",&sC___143 };
static COMMANDS sC___145 = {0,"TYPE",4,"\1A40 \2\1B20 TO PRINTER>\3 \2TO FILE \1C40\3",
"__TypeFile( \1A30, \1B50 ) \2; COPY FILE \1A30 TO \1C30 \3",&sC___144 };
static COMMANDS sC___146 = {0,"TYPE",4,"\1A40 \2\1B20 TO PRINTER>\3","__TypeFile( \1A30, \1B50 )",&sC___145 };
static COMMANDS sC___147 = {0,"REQUEST",7,"\1A10","EXTERNAL \1A00",&sC___146 };
static COMMANDS sC___148 = {0,"CANCEL",6,"","__Quit()",&sC___147 };
static COMMANDS sC___149 = {0,"QUIT",4,"","__Quit()",&sC___148 };
static COMMANDS sC___150 = {0,"RUN",3,"\1A30","__Run( \1A10 )",&sC___149 };
static COMMANDS sC___151 = {0,"RUN",3,"( \1A00 )","__Run( \1A00 )",&sC___150 };
static COMMANDS sC___152 = {0,"!",1,"\1A30","RUN \1A00",&sC___151 };
static COMMANDS sC___153 = {0,"RUN",3,"= \1A00","( run := \1A00 )",&sC___152 };
static COMMANDS sC___154 = {0,"RUN",3,":= \1A00","( run := \1A00 )",&sC___153 };
static COMMANDS sC___155 = {0,"SET",3,"EXCLUSIVE \1A20ON,OFF,&>","Set( _SET_EXCLUSIVE, \1A30 )",&sC___154 };
static COMMANDS sC___156 = {0,"SET",3,"EXCLUSIVE (\1A00)","Set( _SET_EXCLUSIVE, \1A00 )",&sC___155 };
static COMMANDS sC___157 = {0,"SET",3,"SOFTSEEK \1A20ON,OFF,&>","Set( _SET_SOFTSEEK, \1A30 )",&sC___156 };
static COMMANDS sC___158 = {0,"SET",3,"SOFTSEEK (\1A00)","Set( _SET_SOFTSEEK, \1A00 )",&sC___157 };
static COMMANDS sC___159 = {0,"SET",3,"UNIQUE \1A20ON,OFF,&>","Set( _SET_UNIQUE, \1A30 )",&sC___158 };
static COMMANDS sC___160 = {0,"SET",3,"UNIQUE (\1A00)","Set( _SET_UNIQUE, \1A00 )",&sC___159 };
static COMMANDS sC___161 = {0,"SET",3,"DELETED \1A20ON,OFF,&>","Set( _SET_DELETED, \1A30 )",&sC___160 };
static COMMANDS sC___162 = {0,"SET",3,"DELETED (\1A00)","Set( _SET_DELETED, \1A00 )",&sC___161 };
static COMMANDS sC___163 = {0,"SELECT",6,"\1A00","dbSelectArea( \1A30 )",&sC___162 };
static COMMANDS sC___164 = {0,"SELECT",6,"\1A00(\2\1B10\3)","dbSelectArea( \1A00(\1B00) )",&sC___163 };
static COMMANDS sC___165 = {0,"USE",3,"","dbCloseArea()",&sC___164 };
static COMMANDS sC___166 = {0,"USE",3,"\1A40 \2VIA \1B00\3 \2ALIAS \1C00\3 \2\1D20 NEW>\3 \2\1E20 EXCLUSIVE>\3 \2\1F20 SHARED>\3 \2\1G20 READONLY>\3 \2CODEPAGE \1H00\3 \2INDEX \1I40 \2, \1J40\3\3",
"dbUseArea( \1D50, \1B00, \1A30, \1C30, if(\1F50 .or. \1E50, !\1E50, NIL), \1G50, \1H30 ) \2; dbSetIndex( \1I30 )\3 \2; dbSetIndex( \1J30 )\3",&sC___165 };
static COMMANDS sC___167 = {0,"APPEND",6,"BLANK","dbAppend()",&sC___166 };
static COMMANDS sC___168 = {0,"PACK",4,"","__dbPack()",&sC___167 };
static COMMANDS sC___169 = {0,"ZAP",3,"","__dbZap()",&sC___168 };
static COMMANDS sC___170 = {0,"UNLOCK",6,"","dbUnlock()",&sC___169 };
static COMMANDS sC___171 = {0,"UNLOCK",6,"ALL","dbUnlockAll()",&sC___170 };
static COMMANDS sC___172 = {0,"COMMIT",6,"","dbCommitAll()",&sC___171 };
static COMMANDS sC___173 = {0,"GOTO",4,"\1A00","dbGoto(\1A00)",&sC___172 };
static COMMANDS sC___174 = {0,"GO",2,"\1A00","dbGoto(\1A00)",&sC___173 };
static COMMANDS sC___175 = {0,"GOTO",4,"TOP","dbGoTop()",&sC___174 };
static COMMANDS sC___176 = {0,"GO",2,"TOP","dbGoTop()",&sC___175 };
static COMMANDS sC___177 = {0,"GOTO",4,"BOTTOM","dbGoBottom()",&sC___176 };
static COMMANDS sC___178 = {0,"GO",2,"BOTTOM","dbGoBottom()",&sC___177 };
static COMMANDS sC___179 = {0,"SKIP",4,"","dbSkip(1)",&sC___178 };
static COMMANDS sC___180 = {0,"SKIP",4,"\1A00","dbSkip( \1A00 )",&sC___179 };
static COMMANDS sC___181 = {0,"SKIP",4,"ALIAS \1A00","\1A00 -> ( dbSkip(1) )",&sC___180 };
static COMMANDS sC___182 = {0,"SKIP",4,"\1A00 ALIAS \1B00","\1B00 -> ( dbSkip(\1A00) )",&sC___181 };
static COMMANDS sC___183 = {0,"SEEK",4,"\1A00 \2\1B20 SOFTSEEK>\3","dbSeek( \1A00, if( \1B50, .T., NIL ) )",&sC___182 };
static COMMANDS sC___184 = {0,"FIND",4,"\1A30","dbSeek( \1A30 )",&sC___183 };
static COMMANDS sC___185 = {0,"FIND",4,":= \1A00","( find := \1A00 )",&sC___184 };
static COMMANDS sC___186 = {0,"FIND",4,"= \1A00","( find := \1A00 )",&sC___185 };
static COMMANDS sC___187 = {0,"CONTINUE",8,"","__dbContinue()",&sC___186 };
static COMMANDS sC___188 = {0,"LOCATE",6,"\2FOR \1A00\3 \2WHILE \1B00\3 \2NEXT \1C00\3 \2RECORD \1D00\3 \2\1E20REST>\3 \2ALL\3",
"__dbLocate(\1A40,\1B40,\1C00,\1D00,\1E50)",&sC___187 };
static COMMANDS sC___189 = {0,"SET",3,"RELATION TO","dbClearRelation()",&sC___188 };
static COMMANDS sC___190 = {0,"SET",3,"RELATION \2\1A20 ADDITIVE>\3 \2TO \1C00 INTO \1D40 \2\1B20 SCOPED>\3 \2,\2TO\3 \1E00 INTO \1F40 \2\1G20 SCOPED>\3\3\3",
"if (!\1A50 ) ; dbClearRelation() ; end ; dbSetRelation(\1D30,\1C40,\1C20,\1B50 ) \2; dbSetRelation(\1F30,\1E40,\1E20,\1G50 )\3",&sC___189 };
static COMMANDS sC___191 = {0,"SET",3,"FILTER TO","dbClearFilter(NIL)",&sC___190 };
static COMMANDS sC___192 = {0,"SET",3,"FILTER TO \1A00","dbSetFilter( \1A40, \1A20 )",&sC___191 };
static COMMANDS sC___193 = {0,"SET",3,"FILTER TO \1A20&>",
"if ( Empty(\1A30) ) ; dbClearFilter() ; else ; dbSetFilter(\1A40,\1A30) ; end",&sC___192 };
static COMMANDS sC___194 = {0,"REPLACE",7,"\2 \1A00 WITH \1B00 \2, \1C00 WITH \1D00\3 \3 \2FOR \1E00\3 \2WHILE \1F00\3 \2NEXT \1G00\3 \2RECORD \1H00\3 \2\1I20REST>\3 \2ALL\3",
"DBEval( {|| _FIELD->\1A00 := \1B00 \2,_FIELD->\1C00 := \1D00\3},\1E40,\1F40,\1G00,\1H00,\1I50)",&sC___193 };
static COMMANDS sC___195 = {0,"REPLACE",7,"\1A00 WITH \1B00 \2, \1C00 WITH \1D00 \3",
"_FIELD->\1A00 := \1B00 \2; _FIELD->\1C00 := \1D00\3",&sC___194 };
static COMMANDS sC___196 = {0,"DELETE",6,"\2FOR \1A00\3 \2WHILE \1B00\3 \2NEXT \1C00\3 \2RECORD \1D00\3 \2\1E20REST>\3 \2ALL\3",
"DBEval( {|| dbDelete()}, \1A40, \1B40, \1C00, \1D00, \1E50 )",&sC___195 };
static COMMANDS sC___197 = {0,"RECALL",6,"\2FOR \1A00\3 \2WHILE \1B00\3 \2NEXT \1C00\3 \2RECORD \1D00\3 \2\1E20REST>\3 \2ALL\3",
"DBEval( {|| dbRecall()}, \1A40, \1B40, \1C00, \1D00, \1E50 )",&sC___196 };
static COMMANDS sC___198 = {0,"DELETE",6,"","dbDelete()",&sC___197 };
static COMMANDS sC___199 = {0,"RECALL",6,"","dbRecall()",&sC___198 };
static COMMANDS sC___200 = {0,"CREATE",6,"\1A40 \2FROM \1B40\3 \2VIA \1C00\3 \2ALIAS \1D00\3 \2\1E20 NEW>\3 \2CODEPAGE \1F00\3",
"__dbCreate( \1A30, \1B30, \1C00, \1E50, \1D30, \1F30 )",&sC___199 };
static COMMANDS sC___201 = {0,"COPY",4,"\2STRUCTURE\3 \2EXTENDED\3 \2TO \1A40\3","__dbCopyXStruct( \1A30 )",&sC___200 };
static COMMANDS sC___202 = {0,"COPY",4,"\2STRUCTURE\3 \2TO \1A40\3 \2FIELDS \1B10\3","__dbCopyStruct( \1A30, { \1B30 } )",&sC___201 };
static COMMANDS sC___203 = {0,"COPY",4,"\2TO \1A40\3 \2DELIMITED \2WITH \1B30\3\3 \2FIELDS \1C10\3 \2FOR \1D00\3 \2WHILE \1E00\3 \2NEXT \1F00\3 \2RECORD \1G00\3 \2\1H20REST>\3 \2ALL\3",
"__dbDelim( .T., \1A30, \1B30, { \1C30 }, \1D40, \1E40, \1F00, \1G00, \1H50 )",&sC___202 };
static COMMANDS sC___204 = {0,"COPY",4,"\2TO \1A40\3 \2SDF\3 \2FIELDS \1B10\3 \2FOR \1C00\3 \2WHILE \1D00\3 \2NEXT \1E00\3 \2RECORD \1F00\3 \2\1G20REST>\3 \2ALL\3",
"__dbSDF( .T., \1A30, { \1B30 }, \1C40, \1D40, \1E00, \1F00, \1G50 )",&sC___203 };
static COMMANDS sC___205 = {0,"COPY",4,"\2TO \1A40\3 \2FIELDS \1B10\3 \2FOR \1C00\3 \2WHILE \1D00\3 \2NEXT \1E00\3 \2RECORD \1F00\3 \2\1G20REST>\3 \2VIA \1H00\3 \2ALL\3",
"__dbCopy( \1A30, { \1B30 }, \1C40, \1D40, \1E00, \1F00, \1G50, \1H00 )",&sC___204 };
static COMMANDS sC___206 = {0,"APPEND",6,"\2FROM \1A40\3 \2DELIMITED \2WITH \1B30\3\3 \2FIELDS \1C10\3 \2FOR \1D00\3 \2WHILE \1E00\3 \2NEXT \1F00\3 \2RECORD \1G00\3 \2\1H20REST>\3 \2ALL\3",
"__dbDelim( .F., \1A30, \1B30, { \1C30 }, \1D40, \1E40, \1F00, \1G00, \1H50 )",&sC___205 };
static COMMANDS sC___207 = {0,"APPEND",6,"\2FROM \1A40\3 \2SDF\3 \2FIELDS \1B10\3 \2FOR \1C00\3 \2WHILE \1D00\3 \2NEXT \1E00\3 \2RECORD \1F00\3 \2\1G20REST>\3 \2ALL\3",
"__dbSDF( .F., \1A30, { \1B30 }, \1C40, \1D40, \1E00, \1F00, \1G50 )",&sC___206 };
static COMMANDS sC___208 = {0,"APPEND",6,"\2FROM \1A40\3 \2FIELDS \1B10\3 \2FOR \1C00\3 \2WHILE \1D00\3 \2NEXT \1E00\3 \2RECORD \1F00\3 \2\1G20REST>\3 \2VIA \1H00\3 \2ALL\3",
"__dbApp( \1A30, { \1B30 }, \1C40, \1D40, \1E00, \1F00, \1G50, \1H00 )",&sC___207 };
static COMMANDS sC___209 = {0,"SORT",4,"\2TO \1A40\3 \2ON \1B10\3 \2FOR \1C00\3 \2WHILE \1D00\3 \2NEXT \1E00\3 \2RECORD \1F00\3 \2\1G20REST>\3 \2ALL\3",
"__dbSort( \1A30, { \1B30 }, \1C40, \1D40, \1E00, \1F00, \1G50 )",&sC___208 };
static COMMANDS sC___210 = {0,"TOTAL",5,"\2TO \1A40\3 \2ON \1B00\3 \2FIELDS \1C10\3 \2FOR \1D00\3 \2WHILE \1E00\3 \2NEXT \1F00\3 \2RECORD \1G00\3 \2\1H20REST>\3 \2ALL\3",
"__dbTotal( \1A30, \1B40, { \1C30 }, \1D40, \1E40, \1F00, \1G00, \1H50 )",&sC___209 };
static COMMANDS sC___211 = {0,"UPDATE",6,"\2FROM \1A40\3 \2ON \1B00\3 \2REPLACE \1C00 WITH \1D00 \2, \1E00 WITH \1F00\3\3 \2\1G20RANDOM>\3",
"__dbUpdate( \1A30, \1B40, \1G50, {|| _FIELD->\1C00 := \1D00 \2, _FIELD->\1E00 := \1F00\3} )",&sC___210 };
static COMMANDS sC___212 = {0,"JOIN",4,"\2WITH \1A40\3 \2TO \1B00\3 \2FIELDS \1C10\3 \2FOR \1D00\3",
"__dbJoin( \1A30, \1B30, { \1C30 }, \1D40 )",&sC___211 };
static COMMANDS sC___213 = {0,"COUNT",5,"\2TO \1A00\3 \2FOR \1B00\3 \2WHILE \1C00\3 \2NEXT \1D00\3 \2RECORD \1E00\3 \2\1F20REST>\3 \2ALL\3",
"\1A00 := 0 ; DBEval( {|| \1A00++}, \1B40, \1C40, \1D00, \1E00, \1F50 )",&sC___212 };
static COMMANDS sC___214 = {0,"SUM",3,"\2 \1A00 \2, \1B00\3 TO \1C00 \2, \1D00\3 \3 \2FOR \1E00\3 \2WHILE \1F00\3 \2NEXT \1G00\3 \2RECORD \1H00\3 \2\1I20REST>\3 \2ALL\3",
"\1C00 := \2 \1D00 := \3 0 ; DBEval( {|| \1C00 += \1A00 \2, \1D00 += \1B00 \3}, \1E40, \1F40, \1G00, \1H00, \1I50 )",&sC___213 };
static COMMANDS sC___215 = {0,"AVERAGE",7,"\2 \1A00 \2, \1B00\3 TO \1C00 \2, \1D00\3 \3 \2FOR \1E00\3 \2WHILE \1F00\3 \2NEXT \1G00\3 \2RECORD \1H00\3 \2\1I20REST>\3 \2ALL\3",
"M->__Avg := \1C00 := \2 \1D00 := \3 0 ; DBEval( {|| M->__Avg := M->__Avg + 1, \1C00 := \1C00 + \1A00 \2, \1D00 := \1D00 + \1B00\3 }, \1E40, \1F40, \1G00, \1H00, \1I50 ) ; \1C00 := \1C00 / M->__Avg \2; \1D00 := \1D00 / M->__Avg \3",&sC___214 };
static COMMANDS sC___216 = {0,"LIST",4,"\2\1A10\3 \2\1B20OFF>\3 \2\1C20 TO PRINTER>\3 \2TO FILE \1D40\3 \2FOR \1E00\3 \2WHILE \1F00\3 \2NEXT \1G00\3 \2RECORD \1H00\3 \2\1I20REST>\3 \2ALL\3",
"__dbList( \1B50, { \1A40 }, .T., \1E40, \1F40, \1G00, \1H00, \1I50, \1C50, \1D30 )",&sC___215 };
static COMMANDS sC___217 = {0,"DISPLAY",7,"\2\1A10\3 \2\1B20OFF>\3 \2\1C20 TO PRINTER>\3 \2TO FILE \1D40\3 \2FOR \1E00\3 \2WHILE \1F00\3 \2NEXT \1G00\3 \2RECORD \1H00\3 \2\1I20REST>\3 \2\1J20ALL>\3",
"__DBList( \1B50, { \1A40 }, \1J50, \1E40, \1F40, \1G00, \1H00, \1I50, \1C50, \1D30 )",&sC___216 };
static COMMANDS sC___218 = {0,"REPORT",6,"FORM \1A00 \2HEADING \1B00\3 \2\1C20 PLAIN>\3 \2\1D20 NOEJECT>\3 \2\1E20 SUMMARY>\3 \2\1F20 NOCONSOLE>\3 \2\1G20 TO PRINTER>\3 \2TO FILE \1H40\3 \2FOR \1I00\3 \2WHILE \1J00\3 \2NEXT \1K00\3 \2RECORD \1L00\3 \2\1M20REST>\3 \2ALL\3",
"__ReportForm( \1A30, \1G50, \1H30, \1F50, \1I40, \1J40, \1K00, \1L00, \1M50, \1C50, \1B00, \1D50, \1E50 )",&sC___217 };
static COMMANDS sC___219 = {0,"LABEL",5,"FORM \1A00 \2\1B20 SAMPLE>\3 \2\1C20 NOCONSOLE>\3 \2\1D20 TO PRINTER>\3 \2TO FILE \1E40\3 \2FOR \1F00\3 \2WHILE \1G00\3 \2NEXT \1H00\3 \2RECORD \1I00\3 \2\1J20REST>\3 \2ALL\3",
"__LabelForm( \1A30, \1D50, \1E30, \1C50, \1F40, \1G40, \1H00, \1I00, \1J50, \1B50 )",&sC___218 };
static COMMANDS sC___220 = {0,"CLOSE",5,"\1A00","\1A00->( dbCloseArea() )",&sC___219 };
static COMMANDS sC___221 = {0,"CLOSE",5,"","dbCloseArea()",&sC___220 };
static COMMANDS sC___222 = {0,"CLOSE",5,"DATABASES","dbCloseAll()",&sC___221 };
static COMMANDS sC___223 = {0,"CLOSE",5,"ALTERNATE","Set(_SET_ALTFILE, "")",&sC___222 };
static COMMANDS sC___224 = {0,"CLOSE",5,"FORMAT","__SetFormat(NIL)",&sC___223 };
static COMMANDS sC___225 = {0,"CLOSE",5,"INDEXES","dbClearIndex()",&sC___224 };
static COMMANDS sC___226 = {0,"CLOSE",5,"PROCEDURE",NULL,&sC___225 };
static COMMANDS sC___227 = {0,"CLOSE",5,"ALL","CLOSE DATABASES ; SELECT 1 ; CLOSE FORMAT",&sC___226 };
static COMMANDS sC___228 = {0,"CLEAR",5,"","CLEAR SCREEN ; CLEAR GETS",&sC___227 };
static COMMANDS sC___229 = {0,"CLEAR",5,"ALL",
"CLOSE DATABASES ; CLOSE FORMAT ; CLEAR MEMORY ; CLEAR GETS ; SET ALTERNATE OFF ; SET ALTERNATE TO",&sC___228 };
static COMMANDS sC___230 = {0,"INDEX",5,"ON \1A00 \2TAG \1B40 \3 TO \1C40 \2FOR \1D00\3 \2\1E20ALL>\3 \2WHILE \1F00\3 \2NEXT \1G00\3 \2RECORD \1H00\3 \2\1I20REST>\3 \2EVAL \1J00\3 \2EVERY \1K00\3 \2\1L20 UNIQUE>\3 \2\1M20 ASCENDING>\3 \2\1N20 DESCENDING>\3 \2\1O20 USECURRENT>\3 \2\1P20 ADDITIVE>\3 \2\1R20 CUSTOM>\3 \2\1S20 NOOPTIMIZE>\3",
"ordCondSet( \1D20, \1D40, \2\1E50\3, \1F40, \1J40, \1K00, RECNO(), \1G00, \1H00, \2\1I50\3, \2\1N50\3,, \2\1P50\3, \2\1O50\3, \2\1R50\3, \2\1S50\3, \1F20 ) ; ordCreate(\1C30, \1B30, \1A20, \1A40, \2\1L50\3 )",&sC___229 };
static COMMANDS sC___231 = {0,"INDEX",5,"ON \1A00 TAG \1B40 \2TO \1C40\3 \2FOR \1D00\3 \2\1E20ALL>\3 \2WHILE \1F00\3 \2NEXT \1G00\3 \2RECORD \1H00\3 \2\1I20REST>\3 \2EVAL \1J00\3 \2EVERY \1K00\3 \2\1L20 UNIQUE>\3 \2\1M20 ASCENDING>\3 \2\1N20 DESCENDING>\3 \2\1O20 USECURRENT>\3 \2\1P20 ADDITIVE>\3 \2\1R20 CUSTOM>\3 \2\1S20 NOOPTIMIZE>\3",
"ordCondSet( \1D20, \1D40, \2\1E50\3, \1F40, \1J40, \1K00, RECNO(), \1G00, \1H00, \2\1I50\3, \2\1N50\3,, \2\1P50\3, \2\1O50\3, \2\1R50\3, \2\1S50\3, \1F20 ) ; ordCreate(\1C30, \1B30, \1A20, \1A40, \2\1L50\3 )",&sC___230 };
static COMMANDS sC___232 = {0,"INDEX",5,"ON \1A00 TO \1B40 \2\1C20 UNIQUE>\3",
"dbCreateIndex( \1B30, \1A20, \1A40, if( \1C50, .T., NIL ) )",&sC___231 };
static COMMANDS sC___233 = {0,"DELETE",6,"TAG \1A40 \2 IN \1B40 \3 \2, \1C40 \2 IN \1D40 \3 \3",
"ordDestroy( \1A30, \1B30 ) \2; ordDestroy( \1C30, \1D30 ) \3",&sC___232 };
static COMMANDS sC___234 = {0,"REINDEX",7,"\2EVAL \1A00\3 \2EVERY \1B00\3",
"ordCondSet(,,,, \1A40, \1B00,,,,,,,) ; ordListRebuild()",&sC___233 };
static COMMANDS sC___235 = {0,"REINDEX",7,"","ordListRebuild()",&sC___234 };
static COMMANDS sC___236 = {0,"SET",3,"INDEX TO \2 \1A40 \2, \1B40\3\3 \2\1C20 ADDITIVE>\3",
"if !\1C50 ; ordListClear() ; end \2; ordListAdd( \1A30 )\3 \2; ordListAdd( \1B30 )\3",&sC___235 };
static COMMANDS sC___237 = {0,"SET",3,"ORDER TO \1A00 \2IN \1B40\3","ordSetFocus( \1A00 \2, \1B30\3 )",&sC___236 };
static COMMANDS sC___238 = {0,"SET",3,"ORDER TO TAG \1A40 \2IN \1B40\3","ordSetFocus( \1A30 \2, \1B30\3 )",&sC___237 };
static COMMANDS sC___239 = {0,"SET",3,"ORDER TO","ordSetFocus(0)",&sC___238 };
static COMMANDS sC___240 = {0,"SET",3,"EVENTMASK TO \1A00","Set( _SET_EVENTMASK, \1A00 )",&sC___239 };
static COMMANDS sC___241 = {0,"SET",3,"OPTIMIZE \1A20ON,OFF,&>","Set( _SET_OPTIMIZE, \1A30 )",&sC___240 };
static COMMANDS sC___242 = {0,"SET",3,"OPTIMIZE (\1A00)","Set( _SET_OPTIMIZE, \1A00 )",&sC___241 };
static COMMANDS sC___243 = {0,"SET",3,"AUTOPEN \1A20 ON,OFF,&>","Set(_SET_AUTOPEN,\1A30 )",&sC___242 };
static COMMANDS sC___244 = {0,"SET",3,"AUTOPEN (\1A00)","Set(_SET_AUTOPEN,\1A00 )",&sC___243 };
static COMMANDS sC___245 = {0,"SET",3,"FILECASE \1A30","Set(_SET_FILECASE, \1A10 )",&sC___244 };
static COMMANDS sC___246 = {0,"SET",3,"FILECASE ( \1A00 )","Set(_SET_FILECASE, \1A00 )",&sC___245 };
static COMMANDS sC___247 = {0,"SET",3,"DIRCASE \1A30","Set(_SET_DIRCASE, \1A10 )",&sC___246 };
static COMMANDS sC___248 = {0,"SET",3,"DIRCASE ( \1A00 )","Set(_SET_DIRCASE, \1A00 )",&sC___247 };
static COMMANDS sC___249 = {0,"SET",3,"DIRSEPARATOR \1A30","Set(_SET_DIRSEPARATOR, \1A10 )",&sC___248 };
static COMMANDS sC___250 = {0,"SET",3,"DIRSEPARATOR ( \1A00 )","Set(_SET_DIRSEPARATOR, \1A00 )",&sC___249 };
static COMMANDS sC___251 = {0,"SET",3,"MBLOCKSIZE TO \1A00","Set( _SET_MBLOCKSIZE, \1A00 )",&sC___250 };
static COMMANDS sC___252 = {0,"SET",3,"MEMOBLOCK TO \1A00","Set( _SET_MBLOCKSIZE, \1A00 )",&sC___251 };
static COMMANDS sC___253 = {0,"SET",3,"MFILEEXT TO \1A00","Set( _SET_MFILEEXT, \1A00 )",&sC___252 };
static COMMANDS sC___254 = {0,"SET",3,"AUTOSHARE TO \1A00","Set( _SET_AUTOSHARE, \1A00 )",&sC___253 };
static COMMANDS sC___255 = {0,"SET",3,"AUTOSHARE TO","Set( _SET_AUTOSHARE, 0 )",&sC___254 };
static COMMANDS sC___256 = {0,"SET",3,"AUTORDER TO \1A00","Set( _SET_AUTORDER, \1A00 )",&sC___255 };
static COMMANDS sC___257 = {0,"SET",3,"AUTORDER TO","Set( _SET_AUTORDER, 0 )",&sC___256 };
static COMMANDS sC___258 = {0,"SET",3,"STRICTREAD \1A20 ON,OFF,&>","Set(_SET_STRICTREAD,\1A30 )",&sC___257 };
static COMMANDS sC___259 = {0,"SET",3,"STRICTREAD (\1A00)","Set(_SET_STRICTREAD,\1A00 )",&sC___258 };
static COMMANDS sC___260 = {0,"SET",3,"HARDCOMMIT \1A20 ON,OFF,&>","Set(_SET_HARDCOMMIT,\1A30 )",&sC___259 };
static COMMANDS sC___261 = {0,"SET",3,"HARDCOMMIT (\1A00)","Set(_SET_HARDCOMMIT,\1A00 )",&sC___260 };
static COMMANDS sC___262 = {0,"SET",3,"DBFLOCKSCHEME TO \1A00","Set(_SET_DBFLOCKSCHEME, \1A00 )",&sC___261 };
static COMMANDS sC___263 = {0,"SET",3,"DBFLOCKSCHEME TO","Set(_SET_DBFLOCKSCHEME, 0 )",&sC___262 };
hb_pp_topDefine = &sD___60;
hb_pp_topCommand = &sC___263;
hb_pp_topTranslate = NULL;
}

View File

@@ -1,425 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Support for #pragma directive and related functions
*
* Copyright 2000 Jose Lalin <dezac@corevia.com>
* www - http://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, or (at your option)
* any later version.
*
* 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 software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries 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 Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
/*
* See doc/pragma.txt to learn more about Harbour pragmas.
*/
#include "hbppdef.h"
#include "hbcomp.h"
static HB_BOOL StringToBool( char *, HB_BOOL );
static int StringToInt( char *, int );
static HB_BOOL IsOnOffSwitch( char *, HB_BOOL );
static void DebugPragma( char *, int, HB_BOOL );
static HB_BOOL s_bTracePragma = HB_FALSE;
/* Size of abreviated pragma commands */
#define PRAGMAS_LEN 8
/* TODO: Add support for:
RequestLib /R
*/
static PINLINE hb_compInlineAdd_( char * szFunName )
{
HB_SYMBOL_UNUSED( szFunName );
return NULL;
}
HB_BOOL hb_pp_ParsePragma( char * szLine )
{
HB_BOOL bIgnore = HB_TRUE;
HB_TRACE( HB_TR_DEBUG, ( "hb_pp_ParsePragma(%s)", szLine ) );
HB_SKIPTABSPACES( szLine );
if( HB_ISOPTSEP( szLine[ 0 ] ) )
{
switch( szLine[ 1 ] )
{
case 'a':
case 'A':
hb_comp_bAutoMemvarAssume = IsOnOffSwitch( szLine, hb_comp_bAutoMemvarAssume );
DebugPragma( szLine, -1, hb_comp_bAutoMemvarAssume );
break;
case 'b':
case 'B':
hb_comp_bDebugInfo = IsOnOffSwitch( szLine, hb_comp_bDebugInfo );
hb_comp_bLineNumbers = hb_comp_bDebugInfo;
DebugPragma( szLine, -1, hb_comp_bDebugInfo );
break;
case 'e':
case 'E':
if( szLine[ 2 ] == 's' ||
szLine[ 2 ] == 'S' )
{
switch( szLine[ 3 ] )
{
case '\0':
case '0':
hb_comp_iExitLevel = HB_EXITLEVEL_DEFAULT;
break;
case '1':
hb_comp_iExitLevel = HB_EXITLEVEL_SETEXIT;
break;
case '2':
hb_comp_iExitLevel = HB_EXITLEVEL_DELTARGET;
break;
default:
hb_compGenError( NULL, hb_pp_szErrors, 'F', HB_PP_ERR_PRAGMA_BAD_VALUE, NULL, NULL );
}
DebugPragma( szLine, hb_comp_iExitLevel, HB_FALSE );
}
break;
case 'l':
case 'L':
hb_comp_bLineNumbers = IsOnOffSwitch( szLine, hb_comp_bLineNumbers );
DebugPragma( szLine, -1, hb_comp_bLineNumbers );
break;
case 'n':
case 'N':
hb_comp_bStartProc = IsOnOffSwitch( szLine, hb_comp_bStartProc );
DebugPragma( szLine, -1, hb_comp_bStartProc );
break;
case 'p':
case 'P':
hb_comp_bPPO = IsOnOffSwitch( szLine, hb_comp_bPPO );
DebugPragma( szLine, -1, hb_comp_bPPO );
break;
case 'v':
case 'V':
hb_comp_bForceMemvars = IsOnOffSwitch( szLine, hb_comp_bForceMemvars );
DebugPragma( szLine, -1, hb_comp_bForceMemvars );
break;
case 'w':
case 'W':
if( szLine[ 2 ] != '\0' )
{
/* Check for +/- */
if( szLine[ strlen( szLine ) - 1 ] == '+' ||
szLine[ strlen( szLine ) - 1 ] == '-' )
hb_comp_iWarnings = IsOnOffSwitch( szLine, hb_comp_iWarnings != 0 ) ? 1 : 0;
else
{
/* There is -w<0,1,2,3> probably */
hb_comp_iWarnings = szLine[ 2 ] - '0';
if( hb_comp_iWarnings < 0 || hb_comp_iWarnings > 3 )
hb_compGenError( NULL, hb_pp_szErrors, 'F', HB_PP_ERR_PRAGMA_BAD_VALUE, NULL, NULL );
DebugPragma( szLine, -1, hb_comp_iWarnings );
}
}
break;
case 'z':
case 'Z':
hb_comp_bShortCuts = IsOnOffSwitch( szLine, hb_comp_bShortCuts );
DebugPragma( szLine, -1, hb_comp_bShortCuts );
break;
default:
break;
}
}
else
{
if( hb_strnicmp( szLine, "AUTOMEMVAR", PRAGMAS_LEN ) == 0 )
{
hb_comp_bAutoMemvarAssume = StringToBool( szLine, hb_comp_bAutoMemvarAssume );
DebugPragma( szLine, -1, hb_comp_bAutoMemvarAssume );
}
else if( hb_strnicmp( szLine, "BEGINDUMP", PRAGMAS_LEN ) == 0 )
{
char sBuffer[ HB_PP_STR_SIZE ], * pBuffer, sDirective[ 9 ];
int iSize, iOldSize;
PINLINE pInline;
if( hb_comp_bPPO )
{
hb_pp_WrStr( hb_comp_yyppo, "#pragma BEGINDUMP" );
}
hb_pp_StreamBlock = HB_PP_STREAM_DUMP_C;
pInline = hb_compInlineAdd_( NULL );
DigestInline:
iSize = hb_pp_Internal_( hb_comp_bPPO ? hb_comp_yyppo : NULL, sBuffer );
if( iSize == 0 )
{
hb_pp_StreamBlock = 0;
return bIgnore;
}
pBuffer = ( char * ) sBuffer;
while( *pBuffer == ' ' || *pBuffer == '\t' )
{
pBuffer++;
}
if( *pBuffer == '#' )
{
pBuffer++;
while( *pBuffer == ' ' || *pBuffer == '\t' )
{
pBuffer++;
}
hb_strncpyUpper( sDirective, pBuffer, 6 );
if( memcmp( sDirective, "PRAGMA", 6 ) == 0 )
{
pBuffer += 6;
}
while( *pBuffer == ' ' || *pBuffer == '\t' )
{
pBuffer++;
}
hb_strncpyUpper( sDirective, pBuffer, 7 );
if( memcmp( sDirective, "ENDDUMP", 7 ) == 0 )
{
hb_pp_StreamBlock = 0;
return bIgnore;
}
}
iOldSize = 0;
iSize = strlen( ( char * ) sBuffer );
if( pInline->pCode == NULL )
{
pInline->pCode = ( BYTE * ) hb_xgrab( iSize + 1 );
}
else
{
iOldSize = strlen( ( char * ) pInline->pCode );
pInline->pCode = ( BYTE * ) hb_xrealloc( pInline->pCode, iOldSize + iSize + 1 );
}
memcpy( pInline->pCode + iOldSize, sBuffer, iSize + 1 );
goto DigestInline;
}
else if( hb_strnicmp( szLine, "DEBUGINFO", PRAGMAS_LEN ) == 0 )
{
hb_comp_bDebugInfo = StringToBool( szLine, hb_comp_bDebugInfo );
hb_comp_bLineNumbers = hb_comp_bDebugInfo;
DebugPragma( szLine, -1, hb_comp_bDebugInfo );
}
else if( hb_strnicmp( szLine, "ENABLEWARNINGS", PRAGMAS_LEN ) == 0 )
{
hb_comp_iWarnings = StringToBool( szLine, hb_comp_iWarnings != 0 ) ? 1 : 0;
DebugPragma( szLine, hb_comp_iWarnings, HB_FALSE );
}
else if( hb_strnicmp( szLine, "EXITSEVERITY", PRAGMAS_LEN ) == 0 )
{
hb_comp_iExitLevel = StringToInt( szLine, hb_comp_iExitLevel );
if( hb_comp_iExitLevel != HB_EXITLEVEL_DEFAULT &&
hb_comp_iExitLevel != HB_EXITLEVEL_SETEXIT &&
hb_comp_iExitLevel != HB_EXITLEVEL_DELTARGET )
hb_compGenError( NULL, hb_pp_szErrors, 'F', HB_PP_ERR_PRAGMA_BAD_VALUE, NULL, NULL );
DebugPragma( szLine, hb_comp_iExitLevel, HB_FALSE );
}
else if( hb_strnicmp( szLine, "DYNAMICMEMVAR", PRAGMAS_LEN ) == 0 )
{
hb_comp_bForceMemvars = StringToBool( szLine, hb_comp_bForceMemvars );
DebugPragma( szLine, -1, hb_comp_bForceMemvars );
}
else if( hb_strnicmp( szLine, "LINENUMBER", PRAGMAS_LEN ) == 0 )
{
hb_comp_bLineNumbers = StringToBool( szLine, hb_comp_bLineNumbers );
DebugPragma( szLine, -1, hb_comp_bLineNumbers );
}
else if( hb_strnicmp( szLine, "NOSTARTPROC", PRAGMAS_LEN ) == 0 )
{
hb_comp_bStartProc = StringToBool( szLine, hb_comp_bStartProc );
DebugPragma( szLine, -1, hb_comp_bStartProc );
}
else if( hb_strnicmp( szLine, "PREPROCESSING", PRAGMAS_LEN ) == 0 )
{
hb_comp_bPPO = StringToBool( szLine, hb_comp_bPPO );
DebugPragma( szLine, -1, hb_comp_bPPO );
}
else if( hb_strnicmp( szLine, "SHORTCUT", PRAGMAS_LEN ) == 0 )
{
hb_comp_bShortCuts = StringToBool( szLine, hb_comp_bShortCuts );
DebugPragma( szLine, -1, hb_comp_bShortCuts );
}
else if( hb_strnicmp( szLine, "WARNINGLEVEL", PRAGMAS_LEN ) == 0 )
{
hb_comp_iWarnings = StringToInt( szLine, hb_comp_iWarnings );
if( hb_comp_iWarnings < 0 || hb_comp_iWarnings > 3 )
hb_compGenError( NULL, hb_pp_szErrors, 'F', HB_PP_ERR_PRAGMA_BAD_VALUE, NULL, NULL );
DebugPragma( szLine, hb_comp_iWarnings, HB_FALSE );
}
else if( hb_strnicmp( szLine, "TRACEPRAGMAS", PRAGMAS_LEN ) == 0 )
{
s_bTracePragma = StringToBool( szLine, s_bTracePragma );
DebugPragma( szLine, -1, s_bTracePragma );
}
else if( hb_strnicmp( szLine, "__text", 6 ) == 0 )
{
bIgnore = hb_pp_StreamBlockBegin( szLine, HB_PP_STREAM_CLIPPER );
DebugPragma( szLine, -1, s_bTracePragma );
}
else if( hb_strnicmp( szLine, "__stream", 8 ) == 0 )
{
bIgnore = hb_pp_StreamBlockBegin( szLine, HB_PP_STREAM_PRG );
DebugPragma( szLine, -1, s_bTracePragma );
}
else if( hb_strnicmp( szLine, "__cstream", 8 ) == 0 )
{
bIgnore = hb_pp_StreamBlockBegin( szLine, HB_PP_STREAM_C );
DebugPragma( szLine, -1, s_bTracePragma );
}
else if( hb_strnicmp( szLine, "__endtext", 9 ) == 0 )
{
hb_pp_BlockEnd();
DebugPragma( szLine, -1, s_bTracePragma );
}
else if( hb_strnicmp( szLine, "RECURSELEVEL", PRAGMAS_LEN ) == 0 )
{
int iOverflow;
int iMax;
iMax = ( int ) hb_strValInt( szLine, &iOverflow );
if( iOverflow || iMax < 1 )
hb_pp_MaxTranslateCycles = 1024;
else
hb_pp_MaxTranslateCycles = ( unsigned int ) iMax;
DebugPragma( szLine, hb_pp_MaxTranslateCycles, HB_FALSE );
}
}
return bIgnore;
}
/* Checks for +/- within the string, sets bDefault if not found */
static HB_BOOL IsOnOffSwitch( char * pszStr, HB_BOOL bValue )
{
int iPos = strlen( pszStr ) - 1;
if( pszStr[ iPos ] == '+' )
bValue = HB_TRUE;
else if( pszStr[ iPos ] == '-' )
bValue = HB_FALSE;
return bValue;
}
/* Checks for ON/OFF within the string, sets bDefault if not found */
static HB_BOOL StringToBool( char * pszStr, HB_BOOL bValue )
{
char * pos = strchr( pszStr, '=' );
if( ! pos )
pos = strchr( pszStr, '(' );
if( pos )
{
pos++;
HB_SKIPTABSPACES( pos );
if( hb_strnicmp( pos, "ON", 2 ) == 0 )
bValue = HB_TRUE;
else if( hb_strnicmp( pos, "OFF", 3 ) == 0 )
bValue = HB_FALSE;
}
return bValue;
}
/* Returns value after =, sets iDefault if not found */
static int StringToInt( char * pszStr, int iValue )
{
char * pos = strchr( pszStr, '=' );
if( ! pos )
pos = strchr( pszStr, '(' );
if( pos )
{
pos++;
HB_SKIPTABSPACES( pos );
if( *pos >= '0' && *pos <= '9' )
iValue = *pos - '0';
}
return iValue;
}
/* This is only to debug pragmas now */
static void DebugPragma( char * pszStr, int iValue, HB_BOOL bValue )
{
if( s_bTracePragma )
{
if( iValue >= 0 )
printf( "#pragma set to %i \'%s\'\n", iValue, pszStr );
else
printf( "#pragma set to %s \'%s\'\n", bValue ? "ON" : "OFF", pszStr );
}
}

View File

@@ -1,30 +0,0 @@
.TH HBPP 1
.SH NAME
hbpp \- Harbour Project Preprocessor
.SH SYNOPSIS
\fBhbpp\fP \fB<file[.prg]>\fP \fB[options]\fP
.SH DESCRIPTION
\fBhbpp\fP is the old Harbour Project preprocessor.
.SH OPTIONS
.IP "\fB-d<id>[=<val>]\fP" 10
#define <id>
.IP "\fB-i<path>\fP" 10
add #include file search path
.IP "\fB-o\fP" 10
creates hbpp.out with all tables
.IP "\fB-n\fP" 10
with those only, which defined in your file
.IP "\fB-w\fP" 10
enable warnings
.SH AUTHOR
Author of hbpp: The Harbour Project (http://harbour-project.org)
This manual page was written by Luis Mayoral <mayoral@linuxadicto.org>,
for the Debian GNU/Linux system (but may be used by others).

View File

@@ -1,520 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Preprocessor standalone main module
*
* Copyright 1999 Alexander S.Kresin <alex@belacy.belgorod.su>
* www - http://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, or (at your option)
* any later version.
*
* 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 software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries 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 Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
/*
* Avoid tracing in preprocessor/compiler.
*/
#if ! defined( HB_TRACE_UTILS )
#if defined( HB_TRACE_LEVEL )
#undef HB_TRACE_LEVEL
#endif
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* malloc.h has been obsoleted by stdlib.h (and does not even exist in gcc 3.x).
#include <malloc.h>
*/
#include "hbppdef.h"
#include "hbcomp.h"
#include "hbset.h"
extern int hb_pp_ParseDefine_( char * );
static void AddSearchPath( char * szPath, HB_PATHNAMES ** pSearchList );
static void OutTable( DEFINES * endDefine, COMMANDS * endCommand );
static HB_BOOL hb_pp_fopen( char * szFileName );
static char s_szLine[ HB_PP_STR_SIZE ];
static int s_iWarnings = 0;
static char * hb_buffer;
HB_PATHNAMES * hb_comp_pIncludePath = NULL;
PHB_FNAME hb_comp_pFileName = NULL;
FILES hb_comp_files;
int hb_comp_iLine = 1; /* currently parsed file line number */
/* These are need for the PP #pragma support */
HB_BOOL hb_comp_bPPO = HB_FALSE; /* flag indicating, is ppo output needed */
HB_BOOL hb_comp_bStartProc = HB_TRUE; /* holds if we need to create the starting procedure */
HB_BOOL hb_comp_bLineNumbers = HB_TRUE; /* holds if we need pcodes with line numbers */
HB_BOOL hb_comp_bShortCuts = HB_TRUE; /* .and. & .or. expressions shortcuts */
int hb_comp_iWarnings = 0; /* enable parse warnings */
HB_BOOL hb_comp_bAutoMemvarAssume = HB_FALSE; /* holds if undeclared variables are automatically assumed MEMVAR (-a)*/
HB_BOOL hb_comp_bForceMemvars = HB_FALSE; /* holds if memvars are assumed when accesing undeclared variable (-v)*/
HB_BOOL hb_comp_bDebugInfo = HB_FALSE; /* holds if generate debugger required info */
int hb_comp_iExitLevel = HB_EXITLEVEL_DEFAULT; /* holds if there was any warning during the compilation process */
FILE * hb_comp_yyppo = NULL;
int hb_comp_iLinePRG;
int hb_comp_iLineINLINE = 0;
int main( int argc, char * argv[] )
{
FILE * handl_o;
char szFileName[ HB_PATH_MAX ];
char szPpoName[ HB_PATH_MAX ];
int iArg = 1;
HB_BOOL bOutTable = HB_FALSE;
HB_BOOL bOutNew = HB_FALSE;
DEFINES * stdef;
COMMANDS * stcmd;
HB_TRACE( HB_TR_DEBUG, ( "main(%d, %p)", argc, argv ) );
printf( "Harbour Preprocessor (old version) %d.%d.%d\n",
HB_VER_MAJOR, HB_VER_MINOR, HB_VER_RELEASE );
printf( "Copyright (c) 1999-2008, http://harbour-project.org/\n" );
hb_pp_Table();
stdef = hb_pp_topDefine;
stcmd = hb_pp_topCommand;
hb_pp_Init();
while( iArg < argc )
{
if( HB_ISOPTSEP( argv[ iArg ][ 0 ] ) )
{
switch( argv[ iArg ][ 1 ] )
{
case 'd':
case 'D': /* defines a #define from the command line */
{
char * szDefText = hb_strdup( argv[ iArg ] + 2 ), * pAssign, * sDefLine;
unsigned int i = 0;
while( i < strlen( szDefText ) && ! HB_ISOPTSEP( szDefText[ i ] ) )
i++;
szDefText[ i ] = '\0';
if( szDefText )
{
if( ( pAssign = strchr( szDefText, '=' ) ) == NULL )
{
hb_pp_AddDefine_( szDefText, 0 );
}
else
{
szDefText[ pAssign - szDefText ] = '\0';
/* hb_pp_AddDefine_( szDefText, pAssign + 1 ); */
sDefLine = hb_xstrcpy( NULL, szDefText, " ", pAssign + 1, NULL );
hb_pp_ParseDefine_( sDefLine );
hb_xfree( sDefLine );
}
}
hb_xfree( szDefText );
}
break;
case 'i':
case 'I':
AddSearchPath( argv[ iArg ] + 2, &hb_comp_pIncludePath );
break;
case 'o':
case 'O':
bOutTable = HB_TRUE;
break;
case 'n':
case 'N':
bOutNew = HB_TRUE;
break;
case 'w':
case 'W':
s_iWarnings = 1;
if( argv[ iArg ][ 2 ] ) /* there is -w<0,1,2,3> probably */
{
s_iWarnings = argv[ iArg ][ 2 ] - '0';
if( s_iWarnings < 0 || s_iWarnings > 3 )
printf( "\nInvalid command line option: %s\n", argv[ iArg ] );
}
break;
default:
printf( "\nInvalid command line option: %s\n", &argv[ iArg ][ 1 ] );
break;
}
}
else
hb_comp_pFileName = hb_fsFNameSplit( argv[ iArg ] );
iArg++;
}
if( hb_comp_pFileName )
{
if( ! hb_comp_pFileName->szExtension )
hb_comp_pFileName->szExtension = ".prg";
hb_fsFNameMerge( szFileName, hb_comp_pFileName );
if( ! hb_pp_fopen( szFileName ) )
{
printf( "\nCan't open %s\n", szFileName );
return 1;
}
printf( "\nParsing file %s\n", szFileName );
}
else
{
printf( "\nSyntax: %s <file[.prg]> [options]"
"\n"
"\nOptions: /d<id>[=<val>] #define <id>"
"\n /i<path> add #include file search path"
"\n /o creates hbpp.out with all tables"
"\n /n with those only, which defined in your file"
"\n /w enable warnings"
"\n"
, argv[ 0 ] );
if( bOutTable )
OutTable( NULL, NULL );
return 1;
}
hb_comp_pFileName->szExtension = ".ppo";
hb_fsFNameMerge( szPpoName, hb_comp_pFileName );
if( ( handl_o = fopen( szPpoName, "wt" ) ) == NULL )
{
printf( "\nCan't open %s\n", szPpoName );
return 1;
}
{
char * szInclude = hb_getenv( "INCLUDE" );
if( szInclude )
{
char * pPath;
char * pDelim;
pPath = szInclude;
while( ( pDelim = strchr( pPath, HB_OS_PATH_LIST_SEP_CHR ) ) != NULL )
{
*pDelim = '\0';
AddSearchPath( pPath, &hb_comp_pIncludePath );
pPath = pDelim + 1;
}
AddSearchPath( pPath, &hb_comp_pIncludePath );
hb_xfree( szInclude );
}
}
hb_buffer = ( char * ) hb_xgrab( HB_PP_STR_SIZE );
while( hb_pp_Internal_( handl_o, hb_buffer ) > 0 )
;
fclose( hb_comp_files.pLast->handle );
hb_xfree( hb_comp_files.pLast->pBuffer );
hb_xfree( hb_comp_files.pLast );
hb_xfree( hb_buffer );
fclose( handl_o );
if( bOutTable )
OutTable( NULL, NULL );
else if( bOutNew )
OutTable( stdef, stcmd );
printf( "\nOk" );
return 0;
}
static void OutTable( DEFINES * endDefine, COMMANDS * endCommand )
{
FILE * handl_o;
int ipos, len_mpatt = 0, len_value;
int num;
DEFINES * stdef1 = hb_pp_topDefine, * stdef2 = NULL, * stdef3;
COMMANDS * stcmd1 = hb_pp_topCommand, * stcmd2 = NULL, * stcmd3;
HB_TRACE( HB_TR_DEBUG, ( "OutTable(%p, %p)", endDefine, endCommand ) );
while( stdef1 != endDefine )
{
stdef3 = stdef1->last;
stdef1->last = stdef2;
stdef2 = stdef1;
stdef1 = stdef3;
}
while( stcmd1 != endCommand )
{
stcmd3 = stcmd1->last;
stcmd1->last = stcmd2;
stcmd2 = stcmd1;
stcmd1 = stcmd3;
}
if( ( handl_o = fopen( "hbpp.out", "wt" ) ) == NULL )
{
printf( "\nCan't open hbpp.out\n" );
return;
}
num = 1;
while( stdef2 != NULL )
{
fprintf( handl_o, "\n static DEFINES sD___%i = ", num );
fprintf( handl_o, "{\"%s\",", stdef2->name );
if( stdef2->pars )
fprintf( handl_o, "\"%s\",", stdef2->pars );
else
fprintf( handl_o, "NULL," );
fprintf( handl_o, "%d,", stdef2->npars );
if( stdef2->value )
fprintf( handl_o, "\"%s\"", stdef2->value );
else
fprintf( handl_o, "NULL" );
if( num == 1 )
fprintf( handl_o, ", NULL };" );
else
fprintf( handl_o, ", &sD___%i };", num - 1 );
stdef2 = stdef2->last;
num++;
}
fprintf( handl_o, "\n DEFINES * hb_pp_topDefine = " );
if( num == 1 )
fprintf( handl_o, "NULL;" );
else
fprintf( handl_o, " = &sD___%i;\n", num - 1 );
num = 1;
while( stcmd2 != NULL )
{
fprintf( handl_o, "\n static COMMANDS sC___%i = ", num );
fprintf( handl_o, "{%d,\"%s\",", stcmd2->com_or_xcom, stcmd2->name );
if( stcmd2->mpatt != NULL )
{
len_mpatt = hb_pp_strocpy( s_szLine, stcmd2->mpatt );
while( ( ipos = hb_strAt( "\1", 1, s_szLine, len_mpatt ) ) > 0 )
{
hb_pp_Stuff( "\\1", s_szLine + ipos - 1, 2, 1, len_mpatt );
len_mpatt++;
}
fprintf( handl_o, "\"%s\",", s_szLine );
}
else
fprintf( handl_o, "NULL," );
if( stcmd2->value != NULL )
{
len_value = hb_pp_strocpy( s_szLine, stcmd2->value );
while( ( ipos = hb_strAt( "\1", 1, s_szLine, len_value ) ) > 0 )
{
hb_pp_Stuff( "\\1", s_szLine + ipos - 1, 2, 1, len_value );
len_value++;
}
if( len_mpatt + len_value > 80 )
fprintf( handl_o, "\n " );
fprintf( handl_o, "\"%s\"", s_szLine );
}
else
fprintf( handl_o, "NULL" );
if( num == 1 )
fprintf( handl_o, ",NULL };" );
else
fprintf( handl_o, ",&sC___%i };", num - 1 );
stcmd2 = stcmd2->last;
num++;
}
fprintf( handl_o, "\n COMMANDS * hb_pp_topCommand = " );
if( num == 1 )
fprintf( handl_o, "NULL;" );
else
fprintf( handl_o, " = &sC___%i;\n", num - 1 );
stcmd1 = hb_pp_topTranslate;
stcmd2 = NULL;
while( stcmd1 != NULL )
{
stcmd3 = stcmd1->last;
stcmd1->last = stcmd2;
stcmd2 = stcmd1;
stcmd1 = stcmd3;
}
num = 1;
while( stcmd2 != NULL )
{
fprintf( handl_o, "\n static COMMANDS sC___%i = ", num );
fprintf( handl_o, "{%d,\"%s\",", stcmd2->com_or_xcom, stcmd2->name );
if( stcmd2->mpatt != NULL )
{
len_mpatt = hb_pp_strocpy( s_szLine, stcmd2->mpatt );
while( ( ipos = hb_strAt( "\1", 1, s_szLine, len_mpatt ) ) > 0 )
{
hb_pp_Stuff( "\\1", s_szLine + ipos - 1, 2, 1, len_mpatt );
len_mpatt++;
}
fprintf( handl_o, "\"%s\",", s_szLine );
}
else
fprintf( handl_o, "NULL," );
if( stcmd2->value != NULL )
{
len_value = hb_pp_strocpy( s_szLine, stcmd2->value );
while( ( ipos = hb_strAt( "\1", 1, s_szLine, len_value ) ) > 0 )
{
hb_pp_Stuff( "\\1", s_szLine + ipos - 1, 2, 1, len_value );
len_value++;
}
if( len_mpatt + len_value > 80 )
fprintf( handl_o, "\n " );
fprintf( handl_o, "\"%s\"", s_szLine );
}
else
fprintf( handl_o, "NULL" );
if( num == 1 )
fprintf( handl_o, ",NULL };" );
else
fprintf( handl_o, ",&sC___%i };", num - 1 );
stcmd2 = stcmd2->last;
num++;
}
fprintf( handl_o, "\n COMMANDS * hb_pp_topTranslate = " );
if( num == 1 )
fprintf( handl_o, "NULL;" );
else
fprintf( handl_o, " = &sT___%i;", num );
fclose( handl_o );
}
/*
* Function that adds specified path to the list of pathnames to search
*/
static void AddSearchPath( char * szPath, HB_PATHNAMES ** pSearchList )
{
HB_PATHNAMES * pPath = *pSearchList;
HB_TRACE( HB_TR_DEBUG, ( "AddSearchPath(%s, %p)", szPath, pSearchList ) );
if( pPath )
{
while( pPath->pNext )
pPath = pPath->pNext;
pPath->pNext = ( HB_PATHNAMES * ) hb_xgrab( sizeof( HB_PATHNAMES ) );
pPath = pPath->pNext;
}
else
{
*pSearchList = pPath = ( HB_PATHNAMES * ) hb_xgrab( sizeof( HB_PATHNAMES ) );
}
pPath->pNext = NULL;
pPath->szPath = szPath;
}
void hb_compGenError( HB_COMP_DECL, const char * _szErrors[], char cPrefix, int iError, const char * szError1, const char * szError2 )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_compGenError(%p, %c, %d, %s, %s)", _szErrors, cPrefix, iError, szError1, szError2 ) );
HB_SYMBOL_UNUSED( HB_COMP_PARAM );
printf( "\r(%i) ", hb_comp_iLine );
printf( "Error %c%04i ", cPrefix, iError );
printf( _szErrors[ iError - 1 ], szError1, szError2 );
printf( "\n\n" );
/*
exit( EXIT_FAILURE );
*/
}
void hb_compGenWarning( HB_COMP_DECL, const char * _szWarnings[], char cPrefix, int iWarning, const char * szWarning1, const char * szWarning2 )
{
HB_TRACE( HB_TR_DEBUG, ( "hb_compGenWarning(%p, %c, %d, %s, %s)", _szWarnings, cPrefix, iWarning, szWarning1, szWarning2 ) );
HB_SYMBOL_UNUSED( HB_COMP_PARAM );
if( s_iWarnings )
{
const char * szText = _szWarnings[ iWarning - 1 ];
if( ( ( int ) ( szText[ 0 ] - '0' ) ) <= s_iWarnings )
{
printf( "\r(%i) ", hb_comp_iLine );
printf( "Warning %c%04i ", cPrefix, iWarning );
printf( szText + 1, szWarning1, szWarning2 );
printf( "\n" );
}
}
}
int hb_verSvnID( void )
{
return 0;
}
static HB_BOOL hb_pp_fopen( char * szFileName )
{
PFILE pFile;
FILE * handl_i = fopen( szFileName, "r" );
if( ! handl_i )
return HB_FALSE;
pFile = ( PFILE ) hb_xgrab( sizeof( _FILE ) );
pFile->handle = handl_i;
pFile->pBuffer = hb_xgrab( HB_PP_BUFF_SIZE );
pFile->iBuffer = pFile->lenBuffer = 10;
pFile->szFileName = szFileName;
pFile->pPrev = NULL;
hb_comp_files.pLast = pFile;
hb_comp_files.iFiles = 1;
return HB_TRUE;
}
#if defined( HB_OS_WIN_CE ) && ! defined( __CEGCC__ )
# include "hbwmain.c"
#endif

View File

@@ -1,9 +0,0 @@
#
# $Id$
#
pp.c hbppcomp.c hbppcore.c hbpptbl.c hbpragma.c
-lhbcommon
-lhbnortl
-static
-nohblib