From f554ff3df48a0713b3e0fdf7a15f4f4d7e4a1eb5 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 10 Mar 2009 00:06:24 +0000 Subject: [PATCH] 2009-03-10 01:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/compiler/hbusage.c ! fixed the /u+ description - it does not work like #include. Only preprocessor command are significant in files included by -u and -u+ * harbour/doc/man/harbour.1 + add -u+ description * harbour/source/pp/ppcore.c ! fixed typo in error message table (missing ',') * harbour/source/compiler/cmdcheck.c * generate error when -u+ is used without * harbour/source/compiler/hbmain.c * do not display usage screen if other errors were generated before --- harbour/ChangeLog | 18 ++++++++++++++++++ harbour/doc/man/harbour.1 | 2 ++ harbour/source/compiler/cmdcheck.c | 2 ++ harbour/source/compiler/hbmain.c | 8 ++++---- harbour/source/compiler/hbusage.c | 2 +- harbour/source/pp/ppcore.c | 2 +- 6 files changed, 28 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index faaf65ae0e..bec977f356 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,24 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-10 01:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/compiler/hbusage.c + ! fixed the /u+ description - it does not work like #include. + Only preprocessor command are significant in files included + by -u and -u+ + + * harbour/doc/man/harbour.1 + + add -u+ description + + * harbour/source/pp/ppcore.c + ! fixed typo in error message table (missing ',') + + * harbour/source/compiler/cmdcheck.c + * generate error when -u+ is used without + + * harbour/source/compiler/hbmain.c + * do not display usage screen if other errors were generated before + 2009-03-09 23:05 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * source/compiler/hbusage.c + Added -u+ to help screen. diff --git a/harbour/doc/man/harbour.1 b/harbour/doc/man/harbour.1 index eb155b5a36..f983582df3 100644 --- a/harbour/doc/man/harbour.1 +++ b/harbour/doc/man/harbour.1 @@ -68,6 +68,8 @@ set maximum number of preprocessor iterations syntax check only .IP "\fB-u[]\fP" 10 use command def set in (or none) +.IP "\fB-u+\fP" 10 +add command def set from .IP "\fB-undef:\fP" 10 #undef .IP "\fB-v\fP" 10 diff --git a/harbour/source/compiler/cmdcheck.c b/harbour/source/compiler/cmdcheck.c index b06abbf670..fe9a1d6c1f 100644 --- a/harbour/source/compiler/cmdcheck.c +++ b/harbour/source/compiler/cmdcheck.c @@ -612,6 +612,8 @@ static void hb_compChkEnvironVar( HB_COMP_DECL, const char *szSwitch ) HB_COMP_PARAM->szStdChExt[ HB_COMP_PARAM->iStdChExt++ ] = hb_strdup( s + 2 ); } + else + hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, s, NULL ); } else { diff --git a/harbour/source/compiler/hbmain.c b/harbour/source/compiler/hbmain.c index e06def3d1d..ccc878cb41 100644 --- a/harbour/source/compiler/hbmain.c +++ b/harbour/source/compiler/hbmain.c @@ -102,13 +102,13 @@ int hb_compMain( int argc, char * const argv[], BYTE ** pBufPtr, ULONG * pulSize { hb_compOutStd( HB_COMP_PARAM, "\n" ); hb_verBuildInfo(); - hb_comp_free( HB_COMP_PARAM ); - return iStatus; } if( HB_COMP_PARAM->fCredits ) - { hb_compPrintCredits( HB_COMP_PARAM ); + + if( HB_COMP_PARAM->fBuildInfo || HB_COMP_PARAM->fCredits ) + { hb_comp_free( HB_COMP_PARAM ); return iStatus; } @@ -147,7 +147,7 @@ int hb_compMain( int argc, char * const argv[], BYTE ** pBufPtr, ULONG * pulSize } } - if( ! bAnyFiles && ! HB_COMP_PARAM->fQuiet ) + if( ! bAnyFiles && ! HB_COMP_PARAM->fQuiet && ! HB_COMP_PARAM->fExit ) { hb_compPrintUsage( HB_COMP_PARAM, argv[ 0 ] ); iStatus = EXIT_FAILURE; diff --git a/harbour/source/compiler/hbusage.c b/harbour/source/compiler/hbusage.c index 28a0021324..07f18bf4a1 100644 --- a/harbour/source/compiler/hbusage.c +++ b/harbour/source/compiler/hbusage.c @@ -100,7 +100,7 @@ void hb_compPrintUsage( HB_COMP_DECL, const char * szSelf ) "\n %cs syntax check only", /* TODO: "\n %ct path for temp file creation", */ "\n %cu[] use command def set in (or none)", - "\n %cu+[] #include ", + "\n %cu+ add command def set from ", "\n %cundef: #undef ", "\n %cv variables are assumed M->", "\n %cw[] set warning level number (0..3, default 1)", diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index c559cf3e7e..589f7c003d 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -148,7 +148,7 @@ static const char * hb_pp_szErrors[] = "Bad filename in #include", /* C3008 */ "Too many nested #includes", /* C3009 */ "Invalid name follows #", /* C3010 */ - "Can't open standard rule file '%s'" /* C3011 */ + "Can't open standard rule file '%s'", /* C3011 */ "Write error to intermediate file '%s'" /* C3029 */ };