20000315-16:23 GMT+1 Victor Szakats <info@szelvesz.hu>
This commit is contained in:
@@ -1,15 +1,41 @@
|
||||
20000315-16:23 GMT+1 Victor Szakats <info@szelvesz.hu>
|
||||
* include/hberrors.h
|
||||
source/pp/ppcore.c
|
||||
source/pp/pplib.c
|
||||
source/compiler/hbgenerr.c
|
||||
+ Added warning when a macro is doubly defined.
|
||||
!! IMPORTANT TOFIX !!: The filename and line number will not be shown in
|
||||
every cases, and even if shown it will wrong.
|
||||
! The PP related static variables are now initialized in hb_pp_Init();
|
||||
!! IMPORTANT TOFIX !!: The tables in PPTABLE.C should also be
|
||||
reinitialized on hb_pp_Init() to make multiple file compiling work.
|
||||
; Until these are not fixed the warning is commented out.
|
||||
* include/hbver.h
|
||||
+ HB_VER_MINOR changed to 32 (Harbour is now version 0.32)
|
||||
* HB_VER_REVISION bumped to "a"
|
||||
* source/compiler/hbusage.c
|
||||
source/compiler/genc.c
|
||||
source/compiler/genjava.c
|
||||
source/pp/stdalone/hbpp.c
|
||||
source/rtl/environ.c
|
||||
+ Also shows the MAJOR/MINOR Harbour version.
|
||||
* The revision letter is now shown after the version number, not the
|
||||
build.
|
||||
|
||||
20000315-14:28 GMT+1 Victor Szakats <info@szelvesz.hu>
|
||||
* include/hbvmpub.h
|
||||
include/hbcomp.h
|
||||
include/hbmacro.h
|
||||
source/compiler/genc.c
|
||||
% From now on hbpcode.h is not included in every file, to save compile
|
||||
time. !! WARNING !! All .PRG must be rebuilt.
|
||||
time. !! WARNING !! All .PRGs must be rebuilt.
|
||||
* source/*
|
||||
% Removed some superfluous #include "" directives, to save compile time.
|
||||
The whole inclusion system checked.
|
||||
* tests/test.frm
|
||||
! Re-uploaded in binary mode.
|
||||
* makefile.bc
|
||||
* Minor change.
|
||||
|
||||
20000315-08:08 GMT+1 Victor Szakats <info@szelvesz.hu>
|
||||
* source/rtl/filesys.c
|
||||
|
||||
@@ -121,6 +121,8 @@
|
||||
#define HB_PP_ERR_MEMFREE 13
|
||||
#define HB_PP_ERR_PRAGMA_BAD_VALUE 14
|
||||
|
||||
#define HB_PP_WARN_DEFINE_REDEF 1
|
||||
|
||||
extern void hb_compGenError( char * _szErrors[], char, int, char *, char * ); /* generic parsing error management function */
|
||||
extern void hb_compGenWarning( char * _szWarnings[], char, int, char *, char * ); /* generic parsing warning management function */
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
#define HB_VER_H_
|
||||
|
||||
#define HB_VER_MAJOR 0 /* Major version number */
|
||||
#define HB_VER_MINOR 0 /* Minor version number */
|
||||
#define HB_VER_REVISION "" /* Revision letter */
|
||||
#define HB_VER_MINOR 32 /* Minor version number */
|
||||
#define HB_VER_REVISION "a" /* Revision letter */
|
||||
#define HB_VER_BUILD 32 /* Build number */
|
||||
#define HB_VER_YEAR 2000 /* Build year */
|
||||
#define HB_VER_MONTH 03 /* Build month */
|
||||
|
||||
@@ -65,8 +65,8 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou
|
||||
fflush( stdout );
|
||||
}
|
||||
|
||||
fprintf( yyc, "/*\n * Harbour Compiler, Build %i%s (%04d.%02d.%02d)\n",
|
||||
HB_VER_BUILD, HB_VER_REVISION, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY );
|
||||
fprintf( yyc, "/*\n * Harbour Compiler, %d.%d%s (Build %d) (%04d.%02d.%02d)\n",
|
||||
HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY );
|
||||
fprintf( yyc, " * Generated C source code\n */\n\n" );
|
||||
|
||||
fprintf( yyc, "#include \"hbvmpub.h\"\n" );
|
||||
@@ -1156,3 +1156,4 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou
|
||||
if( ! hb_comp_bQuiet )
|
||||
printf( "Done.\n" );
|
||||
}
|
||||
|
||||
|
||||
@@ -77,8 +77,8 @@ void hb_compGenJava( PHB_FNAME pFileName )
|
||||
|
||||
s_nChar = 0;
|
||||
|
||||
fprintf( yyc, "/*\n * Harbour Compiler, Build %i%s (%04d.%02d.%02d)\n",
|
||||
HB_VER_BUILD, HB_VER_REVISION, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY );
|
||||
fprintf( yyc, "/*\n * Harbour Compiler, %d.%d%s (Build %d) (%04d.%02d.%02d)\n",
|
||||
HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY );
|
||||
fprintf( yyc, " * Generated JAVA source code\n */\n\n" );
|
||||
|
||||
fprintf( yyc, "public class %s\n", pFileName->szName );
|
||||
@@ -447,3 +447,4 @@ static void hb_fputs( char * szName, FILE * yyc )
|
||||
while( nPos < strlen( szName ) )
|
||||
hb_fputc( szName[ nPos++ ], yyc );
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,8 @@ void hb_compGenWarning( char * szWarnings[], char cPrefix, int iWarning, char *
|
||||
|
||||
if( ( szText[ 0 ] - '0' ) <= hb_comp_iWarnings )
|
||||
{
|
||||
printf( "\r%s(%i) ", hb_comp_files.pLast->szFileName, hb_comp_iLine );
|
||||
if( hb_comp_files.pLast != NULL && hb_comp_files.pLast->szFileName != NULL )
|
||||
printf( "\r%s(%i) ", hb_comp_files.pLast->szFileName, hb_comp_iLine );
|
||||
printf( "Warning %c%04i ", cPrefix, iWarning );
|
||||
printf( szText + 1, szWarning1, szWarning2 );
|
||||
printf( "\n" );
|
||||
|
||||
@@ -101,8 +101,8 @@ void hb_compPrintCredits( void )
|
||||
*/
|
||||
void hb_compPrintLogo( void )
|
||||
{
|
||||
printf( "Harbour Compiler, Build %i%s (%04d.%02d.%02d)\n",
|
||||
HB_VER_BUILD, HB_VER_REVISION, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY );
|
||||
printf( "Harbour Compiler %d.%d%s (Build %d) (%04d.%02d.%02d)\n",
|
||||
HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY );
|
||||
printf( "Copyright 1999-2000, http://www.harbour-project.org\n" );
|
||||
}
|
||||
|
||||
|
||||
@@ -143,15 +143,15 @@ static BOOL s_bTracePragma = FALSE;
|
||||
#define IT_COMMA 3
|
||||
#define IT_ID_OR_EXPR 4
|
||||
|
||||
static int s_kolAddDefs = 0;
|
||||
static int s_ParseState = 0;
|
||||
static int s_maxCondCompile = 5;
|
||||
static int s_kolAddDefs;
|
||||
static int s_ParseState;
|
||||
static int s_maxCondCompile;
|
||||
static int s_aIsRepeate[ 5 ];
|
||||
static int s_Repeate;
|
||||
static BOOL s_bReplacePat = TRUE;
|
||||
static BOOL s_bReplacePat;
|
||||
static int s_numBrackets;
|
||||
static char s_groupchar;
|
||||
static char s_prevchar = 'A';
|
||||
static char s_prevchar;
|
||||
|
||||
extern int hb_comp_iLine; /* currently parsed file line number */
|
||||
int * hb_pp_aCondCompile;
|
||||
@@ -176,11 +176,26 @@ char * hb_pp_szErrors[] =
|
||||
"Value out of range in #pragma directive"
|
||||
};
|
||||
|
||||
/* Table with warnings */
|
||||
char * hb_pp_szWarnings[] =
|
||||
{
|
||||
"1Redefinition or duplicate definition of #define %s"
|
||||
};
|
||||
|
||||
void hb_pp_Init( void )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_pp_Init()"));
|
||||
|
||||
/* TOFIX: The tables in PPTABLE.C should also be reinitialized */
|
||||
|
||||
s_kolAddDefs = 0;
|
||||
s_ParseState = 0;
|
||||
s_maxCondCompile = 5;
|
||||
s_bReplacePat = TRUE;
|
||||
s_prevchar = 'A';
|
||||
|
||||
hb_pp_aCondCompile = ( int * ) hb_xgrab( sizeof( int ) * 5 );
|
||||
hb_pp_nCondCompile = 0;
|
||||
|
||||
{
|
||||
char szResult[ 5 ];
|
||||
@@ -355,12 +370,18 @@ static int ParseDefine( char * sLine )
|
||||
DEFINES * hb_pp_AddDefine( char * defname, char * value )
|
||||
{
|
||||
BOOL isNew;
|
||||
DEFINES * stdef = DefSearch( defname, &isNew );
|
||||
DEFINES * stdef;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_pp_AddDefine(%s, %s)", defname, value));
|
||||
|
||||
stdef = DefSearch( defname, &isNew );
|
||||
|
||||
if( stdef != NULL )
|
||||
{
|
||||
/*
|
||||
hb_compGenWarning( hb_pp_szWarnings, 'I', HB_PP_WARN_DEFINE_REDEF, defname, NULL );
|
||||
*/
|
||||
|
||||
if( isNew )
|
||||
{
|
||||
if( stdef->pars ) hb_xfree( stdef->pars );
|
||||
|
||||
@@ -84,6 +84,8 @@ HARBOUR HB___PREPROCESS( void )
|
||||
|
||||
int slen;
|
||||
|
||||
hb_pp_Init();
|
||||
|
||||
slen = HB_MIN_( hb_parclen( 1 ), HB_PP_STR_SIZE - 1 );
|
||||
memcpy( pText, hb_parc( 1 ), slen );
|
||||
pText[ slen ] = 0; /* Preprocessor expects null-terminated string */
|
||||
|
||||
@@ -91,8 +91,8 @@ int main( int argc, char * argv[] )
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("main(%d, %p)", argc, argv));
|
||||
|
||||
printf( "Harbour Preprocessor, Build %i%s (%04d.%02d.%02d)\n",
|
||||
HB_VER_BUILD, HB_VER_REVISION, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY );
|
||||
printf( "Harbour Preprocessor %d.%d%s (Build %d) (%04d.%02d.%02d)\n",
|
||||
HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY );
|
||||
printf( "Copyright 1999-2000, http://www.harbour-project.org\n" );
|
||||
|
||||
while( iArg < argc )
|
||||
|
||||
@@ -367,8 +367,8 @@ char * hb_version( USHORT uiMode )
|
||||
|
||||
pszVersion = ( char * ) hb_xgrab( HB_VERSION_BUFFER_LEN );
|
||||
|
||||
sprintf( pszVersion, "Harbour %d.%d Intl. (Build %d%s) (%04d.%02d.%02d)",
|
||||
HB_VER_MAJOR, HB_VER_MINOR, HB_VER_BUILD, HB_VER_REVISION, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY );
|
||||
sprintf( pszVersion, "Harbour %d.%d%s Intl. (Build %d) (%04d.%02d.%02d)",
|
||||
HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY );
|
||||
|
||||
if( uiMode != 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user