From 9ed0347914ae6385c97caf34878a9c50bf6ab080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Tue, 17 Feb 2015 13:28:11 +0100 Subject: [PATCH] 2015-02-17 13:28 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/compiler/cmdcheck.c ! fixed error messages when wrong parameters are passed. When wrong parameters are taken from HARBOURCMD or CLIPPERCMD "Bad command line option '%s'" error is generated and "Bad command line parameter '%s'" when wrong parameters are from command line. New behavior is Cl*pper compatible. --- ChangeLog.txt | 10 ++++++++++ src/compiler/cmdcheck.c | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index fb0efdf74c..8f15f2a87e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,16 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-02-17 13:28 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/compiler/cmdcheck.c + ! fixed error messages when wrong parameters are passed. + When wrong parameters are taken from HARBOURCMD or CLIPPERCMD + "Bad command line option '%s'" + error is generated and + "Bad command line parameter '%s'" + when wrong parameters are from command line. + New behavior is Cl*pper compatible. + 2015-02-17 12:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbssl/tests/inetssl.prg * contrib/rddads/ads1.c diff --git a/src/compiler/cmdcheck.c b/src/compiler/cmdcheck.c index b86d9c2e38..99b44f4430 100644 --- a/src/compiler/cmdcheck.c +++ b/src/compiler/cmdcheck.c @@ -819,7 +819,9 @@ static const char * hb_compChkParseSwitch( HB_COMP_DECL, const char * szSwitch, { if( szSwPtr - szSwitch <= 1 || ( *szSwPtr != '\0' && *szSwPtr != ' ' && ! HB_ISOPTSEP( *szSwPtr ) ) ) - hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', HB_COMP_ERR_BADOPTION, szSwitch, NULL ); + hb_compGenError( HB_COMP_PARAM, hb_comp_szErrors, 'F', + fEnv ? HB_COMP_ERR_BADOPTION : HB_COMP_ERR_BADPARAM, + szSwitch, NULL ); else return szSwPtr; }