diff --git a/ChangeLog.txt b/ChangeLog.txt index 465e82cc7c..c6627fe98d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,28 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2016-03-16 14:17 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * include/hbclass.ch + * disabled DECLARE to not generate ignored by compiler noise in .ppo + files + + * src/rdd/dbcmd.c + ! allow to use dbSetFilter() with string only parameter without + codeblock - Cl*pper compatibility fix. + Cl*pper allows to set text filter without codeblock. In local + RDDs it effectively does nothing and only dbFilter() returns it + but RDDs with automatic filter optimization like CL53/DBFCDX / + COMIX/ClipMore or RDDs working with remote data base servers + may use only text version of filter and ignore or use with + lower priority the codeblock so Harbour has to work like + Cl*pper here. + + * src/rdd/workarea.c + * typo in comment + + * contrib/rddads/ads1.c + * do not validate empty text filters + 2016-03-10 12:52 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/langcomp.prg ! added missing de-AT lang mapping diff --git a/contrib/rddads/ads1.c b/contrib/rddads/ads1.c index 17c1cda62c..8c520de600 100644 --- a/contrib/rddads/ads1.c +++ b/contrib/rddads/ads1.c @@ -4817,7 +4817,8 @@ static HB_ERRCODE adsSetFilter( ADSAREAP pArea, LPDBFILTERINFO pFilterInfo ) UNSIGNED32 u32RetVal = AE_INVALID_EXPRESSION; const char * pucFilter = hb_itemGetCPtr( pFilterInfo->abFilterText ); - AdsIsExprValid( pArea->hTable, ( UNSIGNED8 * ) HB_UNCONST( pucFilter ), &bValidExpr ); + if( *pucFilter ) + AdsIsExprValid( pArea->hTable, ( UNSIGNED8 * ) HB_UNCONST( pucFilter ), &bValidExpr ); if( bValidExpr ) { diff --git a/include/hbclass.ch b/include/hbclass.ch index 93d061fa11..c782477d1d 100644 --- a/include/hbclass.ch +++ b/include/hbclass.ch @@ -89,12 +89,12 @@ /* So Each class _inherit_ of HBObject by default and */ /* Each type logical or numerical is initiated to .F. and 0 by default */ -/* #define HB_CLS_NOTOBJECT */ /* Should be included in some compatibility include files as needed */ -/* #define HB_CLS_NOAUTOINIT */ /* Idem */ -/* #define HB_CLS_NO_DECORATION */ /* disable adding _ prefix to method function names */ -/* #define HB_CLS_NO_PARAMS_ERR */ /* disable parameters validation in method declaration and implementation */ -/* #define HB_CLS_NO_OO_ERR */ /* disable all code validation */ - +/* #define HB_CLS_NOTOBJECT */ /* Should be included in some compatibility include files as needed */ +/* #define HB_CLS_NOAUTOINIT */ /* Idem */ +/* #define HB_CLS_NO_DECORATION */ /* disable adding _ prefix to method function names */ +/* #define HB_CLS_NO_PARAMS_ERR */ /* disable parameters validation in method declaration and implementation */ +/* #define HB_CLS_NO_OO_ERR */ /* disable all code validation */ +/* #define HB_CLS_NO_DECLARATIONS */ /* disable value type declarations */ #ifndef HB_CLS_FWO #ifndef HB_CLS_CSY @@ -188,6 +188,8 @@ #xtranslate __HB_CLS_VARERR() => __HB_CLS_ERR( Invalid instance variable name \<> ) +/* disbaled by default to not generate ignored by compiler noice in .ppo files */ +#if 0 DECLARE HBClass ; New( cName AS String, OPTIONAL SuperParams ) AS CLASS HBClass ; Create() AS Object ; @@ -198,6 +200,7 @@ DECLARE HBClass ; AddMethod( cName AS String, @MethodName(), nScope AS Numeric ) ; AddInLine( cName AS String, bBlock AS CodeBlock, nScope AS Numeric ) ; AddVirtual( cName AS String ) +#endif /* * Class(y) like non virtual send operator but instead of using early diff --git a/src/rdd/dbcmd.c b/src/rdd/dbcmd.c index b3bbb04c5e..ca545a0895 100644 --- a/src/rdd/dbcmd.c +++ b/src/rdd/dbcmd.c @@ -808,10 +808,18 @@ HB_FUNC( DBSETFILTER ) { PHB_ITEM pBlock, pText; DBFILTERINFO pFilterInfo; + pBlock = hb_param( 1, HB_IT_BLOCK ); - if( pBlock ) + pText = hb_param( 2, HB_IT_STRING ); + /* Cl*pper allows to set text filter without codeblock. In local + RDDs it effectively does nothing and only dbFilter() returns it + but RDDs with automatic filter optimization like CL53/DBFCDX / + COMIX/ClipMore or RDDs working with remote data base servers + may use only text version of filter and ignore or use with + lower priority the codeblock so Harbour has to work like + Cl*pper here. [druzus] */ + if( pBlock || pText ) { - pText = hb_param( 2, HB_IT_STRING ); pFilterInfo.itmCobExpr = pBlock; if( pText ) pFilterInfo.abFilterText = pText; diff --git a/src/rdd/workarea.c b/src/rdd/workarea.c index 5f19043a50..b2194fc4d2 100644 --- a/src/rdd/workarea.c +++ b/src/rdd/workarea.c @@ -402,7 +402,7 @@ static HB_ERRCODE hb_waCreateFields( AREAP pArea, PHB_ITEM pStruct ) dbFieldInfo.uiType = HB_FT_LONG; dbFieldInfo.uiDec = uiDec; /* DBASE documentation defines maximum numeric field size as 20 - * but Clipper alows to create longer fileds so I remove this + * but Clipper allows to create longer fileds so I remove this * limit, Druzus */ /*