From faea7efcd04f1bc982487106b7366d3883716846 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 26 Jul 2006 23:23:42 +0000 Subject: [PATCH] 2006-07-27 01:18 UTC+0100 Viktor Szakats (viktor.szakats syenar.hu) * harbour/source/rtl/dbedit.prg ! Previous non-strict compatible part made fully compatible by dropping an Eval() on the field value block. Strict branch and NOTE removed. --- harbour/ChangeLog | 6 +++++ harbour/source/rtl/dbedit.prg | 42 +++-------------------------------- 2 files changed, 9 insertions(+), 39 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1f0665258e..40c94b0aed 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2006-07-27 01:18 UTC+0100 Viktor Szakats (viktor.szakats syenar.hu) + * harbour/source/rtl/dbedit.prg + ! Previous non-strict compatible part made fully compatible by + dropping an Eval() on the field value block. Strict branch + and NOTE removed. + 2006-07-26 22:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbapi.h * harbour/include/hbexpra.c diff --git a/harbour/source/rtl/dbedit.prg b/harbour/source/rtl/dbedit.prg index 9ccfe32ace..55b5aef0c9 100644 --- a/harbour/source/rtl/dbedit.prg +++ b/harbour/source/rtl/dbedit.prg @@ -50,8 +50,6 @@ * */ -#include "hbsetup.ch" - #include "common.ch" #include "dbedit.ch" #include "inkey.ch" @@ -164,34 +162,6 @@ FUNCTION dbEdit(; cBlock := FieldName( nPos ) cHeading := cBlock ENDIF - -#ifdef HB_C52_STRICT - - IF Type( cBlock ) == "M" - - bBlock := {|| " " } - - ELSEIF "->" $ cBlock - - IF Upper( cAlias ) == "M" - bBlock := MemvarBlock( cBlock ) - ELSEIF Upper( cAlias ) == "FIELD" - bBlock := FieldWBlock( cFieldName, Select() ) - ELSE - bBlock := FieldWBlock( cFieldName, Select( cAlias ) ) - ENDIF - - ELSEIF !Empty( FieldPos( cBlock ) ) - bBlock := FieldWBlock( cBlock, Select() ) - ELSE - bBlock := NIL - ENDIF - - IF bBlock == NIL - bBlock := &( "{||" + cBlock + "}" ) - ENDIF - -#else /* Simplified logic compared to CA-Cl*pper. In the latter there is logic to detect several typical cBlock types (memvar, @@ -200,17 +170,11 @@ FUNCTION dbEdit(; simple macro compilation will result in faster code for all situations. As Maurilio Longo has pointed, there is no point in creating codeblocks which are able to _assign_ values, as dbEdit() - is actually a read-only function. [vszakats] */ + is a read-only function. [vszakats] */ - bBlock := &( "{||" + cBlock + "}" ) + bBlock := iif( Type( cBlock ) == "M", {|| " " }, &( "{||" + cBlock + "}" ) ) - /* NOTE: There is an extra Eval() here compared to CA-Cl*pper. */ - - IF ISMEMO( Eval( bBlock ) ) - bBlock := {|| " " } - ENDIF - -#endif + /* ; */ IF ISARRAY( xColumnHeaders ) .AND. Len( xColumnHeaders ) >= nPos .AND. ISCHARACTER( xColumnHeaders[ nPos ] ) cHeading := xColumnHeaders[ nPos ]