From 52c70a7db32955f4923c62050d99a934579319d2 Mon Sep 17 00:00:00 2001 From: Ron Pinkas Date: Thu, 8 Jun 2000 05:50:09 +0000 Subject: [PATCH] 2000-06-07 22:50 UTC-0800 Ron Pinkas * source/compiler/harbour.c * main() Moved calls to hb_pp_init() to hb_pp_SetRules() in ppcore.c to avoid redefinition of standard defs. * source/pp/ppcore.c * hb_pp_SetRules() Moved calls to hb_pp_init() from main() in Harbour.c to avoid redefinition of standard defs. ! Minor fixes to warnings and errors. --- harbour/ChangeLog | 11 ++++++++++- harbour/source/compiler/harbour.c | 3 --- harbour/source/pp/ppcore.c | 9 ++++++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0016ddb0cc..c20458392a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,4 +1,13 @@ -2000-06-05 19:50 UTC-0800 Ron Pinkas +2000-06-07 22:50 UTC-0800 Ron Pinkas + + * source/compiler/harbour.c + * main() Moved calls to hb_pp_init() to hb_pp_SetRules() in ppcore.c to avoid redefinition of standard defs. + + * source/pp/ppcore.c + * hb_pp_SetRules() Moved calls to hb_pp_init() from main() in Harbour.c to avoid redefinition of standard defs. + ! Minor fixes to warnings and errors. + +2000-06-07 21:40 UTC-0800 Ron Pinkas * source/pp/ppcore.c * Changed hb_pp_SetRules() to only always default to .CH extension, if file name supplied without extension. diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index 5885c01c7e..5a1fde0cac 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -3406,9 +3406,6 @@ int hb_compCompile( char * szPrg, int argc, char * argv[] ) } else { - /* Initialization of preprocessor arrays */ - hb_pp_Init(); - /* Add /D command line or envvar defines */ hb_compChkDefines( argc, argv ); diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index afc9908f80..ea450389cd 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -196,7 +196,7 @@ char * hb_pp_szErrors[] = char * hb_pp_szWarnings[] = { "1Redefinition or duplicate definition of #define %s", - "No directives found in: %s%s\n" + "1No directives in command definitions file" }; void hb_pp_SetRules( BOOL (*hb_compInclude)(char *, PATHNAMES * ) ) @@ -262,7 +262,7 @@ void hb_pp_SetRules( BOOL (*hb_compInclude)(char *, PATHNAMES * ) ) } else { - hb_compGenWarning( hb_pp_szWarnings, 'W', HB_PP_WARN_NO_DIRECTIVES, szFileName, NULL ); + hb_compGenWarning( hb_pp_szWarnings, 'I', HB_PP_WARN_NO_DIRECTIVES, NULL /*szFileName*/, NULL ); } fclose( hb_comp_files.pLast->handle ); @@ -291,12 +291,15 @@ void hb_pp_SetRules( BOOL (*hb_compInclude)(char *, PATHNAMES * ) ) else { if( ! hb_comp_bQuiet ) - printf( "Standard Rules excluded!\n" ); + printf( "Standard command definitions excluded!\n" ); + + hb_pp_Init(); } } else { hb_pp_Table(); + hb_pp_Init(); } }