From 886dc4fcbd0fd65f55c33e386bc1a38b10dceb8e Mon Sep 17 00:00:00 2001 From: Ryszard Glab Date: Fri, 2 Jun 2006 11:43:30 +0000 Subject: [PATCH] 2006-06-02 14:00 UTC+0100 Ryszard Glab * include/hbexpra.c * source/compiler/expropta.c * fixed bug in GET var[ any_one_dim_index ] * source/pp/ppcore.c * fixed BCC warning NOTICE: The above files are retagged to 'build46' --- harbour/ChangeLog | 10 ++++++++++ harbour/include/hbexpra.c | 15 +++++++++++++-- harbour/source/compiler/expropta.c | 2 +- harbour/source/pp/ppcore.c | 4 +++- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7d65817e8a..80b965f2a0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,16 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ + + + harbour/source/rdd/usrrdd/example/exrlx.prg + * example of using RLCDX RDD + + + harbour/source/rdd/usrrdd/example/exmemo.prg + * example of using DBTCDX, FPTCDX and SMTCDX RDDs + +2006-06-02 14:15 UTC+0100 Ryszard Glab + * harbour.spec + * updated to set version 0.46.1 for build46 2006-06-02 14:00 UTC+0100 Ryszard Glab diff --git a/harbour/include/hbexpra.c b/harbour/include/hbexpra.c index 1ced6fcd48..ffc21677f9 100644 --- a/harbour/include/hbexpra.c +++ b/harbour/include/hbexpra.c @@ -494,6 +494,11 @@ HB_EXPR_PTR hb_compExprNewFunCall( HB_EXPR_PTR pName, HB_EXPR_PTR pParms ) USHORT uiCount; if( pArg->ExprType == HB_ET_ARRAYAT ) { + /* replace: + _GET_( a[1], "a[1]", , , ) + into: + __GETA( {||a }, "a", , , , { 1 } ) + */ HB_EXPR_PTR pIndex, pVar; HB_EXPR_PTR pBase; @@ -583,8 +588,14 @@ HB_EXPR_PTR hb_compExprNewFunCall( HB_EXPR_PTR pName, HB_EXPR_PTR pParms ) } } } - pBase->value.asList.pExprList = NULL; - hb_compExprClear( pBase ); + /* clear expressions no longer used */ + while( pBase->ExprType == HB_ET_ARRAYAT ) + { + pVar = pBase->value.asList.pExprList; + pBase->value.asList.pExprList = NULL; + hb_compExprClear( pBase ); + pBase = pVar; + } } else if( pArg->ExprType == HB_ET_MACRO ) { diff --git a/harbour/source/compiler/expropta.c b/harbour/source/compiler/expropta.c index 10279c0acf..f9e080aae3 100644 --- a/harbour/source/compiler/expropta.c +++ b/harbour/source/compiler/expropta.c @@ -5,6 +5,6 @@ /* hbexpra.c is also included from ../macro/macro.c * However it produces a slighty different code if used in * macro compiler (there is an additional parameter passed to some functions) - * 1.20 - ignore this magic number - this is used to force compilation + * 1.21 - ignore this magic number - this is used to force compilation */ #include "hbexpra.c" diff --git a/harbour/source/pp/ppcore.c b/harbour/source/pp/ppcore.c index d613e1acea..f4438b82cd 100644 --- a/harbour/source/pp/ppcore.c +++ b/harbour/source/pp/ppcore.c @@ -3412,7 +3412,7 @@ static int pp_Stringify( BOOL bSmart, char **ptro, int *lenres, char *expr, int static int ReplacePattern( char patttype, char *expreal, int lenreal, char *ptro, int lenres ) { - int rmlen = lenreal, ifou, lenitem, i = 0; + int rmlen = lenreal, ifou, lenitem; char sQuotes[4] = "\"\","; HB_TRACE( HB_TR_DEBUG, ( "ReplacePattern(%c, %s, %d, %s, %p)", patttype, expreal, lenreal, ptro, lenres ) ); @@ -3495,6 +3495,8 @@ static int ReplacePattern( char patttype, char *expreal, int lenreal, char *ptro lenitem = ( ifou ) ? ifou - 1 : lenreal; if( *expreal != '\0' ) { + int i; + i = ( ifou ) ? 5 : 4; hb_pp_Stuff( "{||},", ptro, i, 0, lenres ); hb_pp_Stuff( expreal, ptro + 3, lenitem, 0, lenres + i );