From 68e552cc68f273b6045baa28863dd018dd3f25a5 Mon Sep 17 00:00:00 2001 From: Ryszard Glab Date: Fri, 28 Jan 2000 19:06:03 +0000 Subject: [PATCH] ChangeLog 20000128-20:15 GMT+1 --- harbour/ChangeLog | 16 ++++++++++++++++ harbour/include/hbexpr.c | 22 ++++++++++++++-------- harbour/source/compiler/expropt.c | 1 + harbour/source/compiler/harbour.l | 13 +++++++++++++ harbour/source/debug/debugger.prg | 1 + harbour/source/macro/macro.c | 1 + harbour/source/macro/macro.l | 12 ++++++++++++ 7 files changed, 58 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0cd897de20..ffd4c7c856 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,19 @@ +20000128-20:15 GMT+1 Ryszard Glab + + *source/macro/macro.l + *source/compiler/harbour.l + * any nonstandard characters (ASCII < 32 and ASCII > 127) are + passed to grammar analyser instead of printing on stdout + + *include/hbexpr.c + *source/macro/macro.c + *source/compiler/expropt.c + * memory is released properly when more complex expression + is macro compiled eg. &( "1 + 2" ), &( ".T.:classname" ) + + *source/debugger/debugger.prg + * added 'LOCAL nKey' to suppress warnings + 20000128-20:3 GMT+3 Luiz Rafael Culik *source/rdd/dbcmd.c *source/rtl/arrays.c diff --git a/harbour/include/hbexpr.c b/harbour/include/hbexpr.c index aeb8be6aed..dbad456c6e 100644 --- a/harbour/include/hbexpr.c +++ b/harbour/include/hbexpr.c @@ -2929,6 +2929,12 @@ static HB_EXPR_FUNC( hb_compExprUseSend ) } case HB_EA_DELETE: +#ifdef HB_MACRO_SUPPORT + hb_compExprDelete( pSelf->value.asMessage.pObject ); + if( pSelf->value.asMessage.pParms ) + hb_compExprDelete( pSelf->value.asMessage.pParms ); + HB_XFREE( pSelf->value.asMessage.szMessage ); +#endif break; } return pSelf; @@ -4666,8 +4672,8 @@ static HB_EXPR_FUNC( hb_compExprUsePlus ) } pSelf->ExprType = HB_ET_NUMERIC; pSelf->ValType = HB_EV_NUMERIC; - HB_EXPR_USE( pLeft, HB_EA_DELETE ); - HB_EXPR_USE( pRight, HB_EA_DELETE ); + hb_compExprDelete( pLeft ); + hb_compExprDelete( pRight ); } else if( pLeft->ExprType == HB_ET_STRING && pRight->ExprType == HB_ET_STRING ) { @@ -4815,8 +4821,8 @@ static HB_EXPR_FUNC( hb_compExprUseMinus ) } pSelf->ExprType = HB_ET_NUMERIC; pSelf->ValType = HB_EV_NUMERIC; - HB_EXPR_USE( pLeft, HB_EA_DELETE ); - HB_EXPR_USE( pRight, HB_EA_DELETE ); + hb_compExprDelete( pLeft ); + hb_compExprDelete( pRight ); } else if( pLeft->ExprType == HB_ET_STRING && pRight->ExprType == HB_ET_STRING ) { @@ -4941,8 +4947,8 @@ static HB_EXPR_FUNC( hb_compExprUseMult ) } pSelf->ExprType = HB_ET_NUMERIC; pSelf->ValType = HB_EV_NUMERIC; - HB_EXPR_USE( pLeft, HB_EA_DELETE ); - HB_EXPR_USE( pRight, HB_EA_DELETE ); + hb_compExprDelete( pLeft ); + hb_compExprDelete( pRight ); } else { @@ -5172,8 +5178,8 @@ static HB_EXPR_FUNC( hb_compExprUseMod ) pSelf->ExprType = HB_ET_NUMERIC; pSelf->ValType = HB_EV_NUMERIC; - HB_EXPR_USE( pLeft, HB_EA_DELETE ); - HB_EXPR_USE( pRight, HB_EA_DELETE ); + hb_compExprDelete( pLeft ); + hb_compExprDelete( pRight ); } } } diff --git a/harbour/source/compiler/expropt.c b/harbour/source/compiler/expropt.c index 1ca580e917..5d30715077 100644 --- a/harbour/source/compiler/expropt.c +++ b/harbour/source/compiler/expropt.c @@ -5,5 +5,6 @@ /* hbexpr.c is also included from ../macro/macro.c * However it produces a slighty different code if used in * macro compiler + * 1 - ignore this magic number - this is used to force compilation */ #include "hbexpr.c" diff --git a/harbour/source/compiler/harbour.l b/harbour/source/compiler/harbour.l index 543441b4c7..1f30e0a186 100644 --- a/harbour/source/compiler/harbour.l +++ b/harbour/source/compiler/harbour.l @@ -1159,6 +1159,19 @@ Separator {SpaceTab} [\(] ++_iOpenBracket; hb_comp_iState =SEPARATOR; return yytext[ 0 ]; [\)] --_iOpenBracket; hb_comp_iState =SEPARATOR; return yytext[ 0 ]; +[\x00-\x1F] return yytext[ 0 ]; /* see below */ +[\x80-\xFF] { + /* This have to be the last rule - any nonstandard and not handled + * characters should go to grammar analyser instead of printing it + * on stdout. + */ + return yytext[ 0 ]; + } + +%{ +/* ************************************************************************ */ +%} + {InvalidNumber} BEGIN INVALIDNUM_; yylval.string = hb_strupr( hb_strdup( yytext ) ); ("."|{Separator}+) { hb_compGenError( hb_comp_szErrors, 'E', ERR_NUMERIC_FORMAT, NULL, NULL ); diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index e6076ff5c8..b0f1aa1226 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -932,6 +932,7 @@ return nil METHOD ShowModal() CLASS TDbWindow local lExit := .f. + local nKey ::lShadow = .t. ::Show() diff --git a/harbour/source/macro/macro.c b/harbour/source/macro/macro.c index 80666ca18f..5a73413bf8 100644 --- a/harbour/source/macro/macro.c +++ b/harbour/source/macro/macro.c @@ -1246,6 +1246,7 @@ void hb_compCodeBlockEnd( HB_MACRO_DECL ) * NOTE: It cannot be compiled into a single library because the code * required for macro compiler differs a little - we are passing additional * parameter that holds macro compiler internal data + * 1 - ignore this magic number - it forces the compilation of this file */ #include "hbexpr.c" diff --git a/harbour/source/macro/macro.l b/harbour/source/macro/macro.l index 97cc68b9ea..ef2db5215c 100644 --- a/harbour/source/macro/macro.l +++ b/harbour/source/macro/macro.l @@ -281,6 +281,18 @@ Separator {SpaceTab} [\(] ++_iOpenBracket; return yytext[ 0 ]; [\)] --_iOpenBracket; return yytext[ 0 ]; +[\x00-\x1F] return yytext[ 0 ]; /* see below */ +[\x80-\xFF] { + /* This have to be the last rule - any nonstandard and unhandled + * characters should go to grammar analyser instead of printing it + * on stdout. + */ + return yytext[ 0 ]; + } + +%{ +/* ************************************************************************ */ +%} {Number} { char * ptr;