From 017debeb6e81630310fd0a96ecc79acd757e9530 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 7 Mar 2011 11:44:42 +0000 Subject: [PATCH] 2011-03-07 12:44 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/valtype.c * modified to work with any HB_IT_STRING flags we may add in the future * harbour/src/rdd/dbcmd.c * eliminated explicit hb_parinfo() usage * harbour/src/compiler/harbour.y * added casting which seems to be necessary for some newer bison versions * harbour/doc/xhb-diff.txt * typo --- harbour/ChangeLog | 13 +++++++++++++ harbour/doc/xhb-diff.txt | 8 ++++---- harbour/src/compiler/harbour.y | 2 +- harbour/src/rdd/dbcmd.c | 8 +++++--- harbour/src/rtl/valtype.c | 2 +- 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 30ee12735b..507c0c7d2f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,19 @@ The license applies to all entries newer than 2009-04-28. */ +2011-03-07 12:44 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/valtype.c + * modified to work with any HB_IT_STRING flags we may add in the future + + * harbour/src/rdd/dbcmd.c + * eliminated explicit hb_parinfo() usage + + * harbour/src/compiler/harbour.y + * added casting which seems to be necessary for some newer bison versions + + * harbour/doc/xhb-diff.txt + * typo + 2011-03-07 12:31 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg ! Two minor fixes to prev. diff --git a/harbour/doc/xhb-diff.txt b/harbour/doc/xhb-diff.txt index 71157a8791..a1eff3d847 100644 --- a/harbour/doc/xhb-diff.txt +++ b/harbour/doc/xhb-diff.txt @@ -1018,10 +1018,10 @@ In Harbour it's new type TIMESTAMP for which VALTYPE() function returns "T". It has its own HVM arithmetic similar to the one used by DATE type but not exactly the same. The difference (-) between two TIMESTAMP values is represented as number where integer part is number of days and fractional -part is time in given day. Non-exact comparison (=, >, <, >=, <=) -comparison for TIMESTAMP and DATA value assumes that both values are equal -if the date part is the same. Such semantic is also respected by native RDDs -when mixed DATE and TIMESTAMP values are used in indexes, seeks, scopes, etc. +part is time in given day. Non-exact comparison (=, >, <, >=, <=) for +TIMESTAMP and DATA value assumes that both values are equal if the date +part is the same. Such semantic is also respected by native RDDs when +mixed DATE and TIMESTAMP values are used in indexes, seeks, scopes, etc. When number is added to DATE type then like in Clipper only integer part increase (decrease) DATE value but when it's added to TIMESTAMP value then fractional part is also significant. When TIMESTAMP value is added to DATE diff --git a/harbour/src/compiler/harbour.y b/harbour/src/compiler/harbour.y index 513e943e14..187060e06f 100644 --- a/harbour/src/compiler/harbour.y +++ b/harbour/src/compiler/harbour.y @@ -1007,7 +1007,7 @@ ElemList : ExtArgument { $$ = hb_compExprNewList( $1, HB_COMP_PA | ElemList ',' ExtArgument { $$ = hb_compExprAddListExpr( $1, $3 ); } ; -BlockHead : CBSTART { $$ = hb_compExprNewCodeBlock( $1.string, $1.length, $1.flags, HB_COMP_PARAM ); $1.string = NULL; } +BlockHead : CBSTART { $$ = hb_compExprNewCodeBlock( $1.string, $1.length, $1.flags, HB_COMP_PARAM ); $1.string = NULL; } BlockVars '|' { $$ = $2; } ; diff --git a/harbour/src/rdd/dbcmd.c b/harbour/src/rdd/dbcmd.c index b6c41127cc..c149522ab3 100644 --- a/harbour/src/rdd/dbcmd.c +++ b/harbour/src/rdd/dbcmd.c @@ -1634,7 +1634,7 @@ HB_FUNC( RLOCK ) HB_FUNC( SELECT ) { - if( hb_parinfo( 0 ) == 0 ) + if( hb_pcount() == 0 ) { hb_retni( hb_rddGetCurrentWorkAreaNumber() ); } @@ -1770,13 +1770,15 @@ HB_FUNC( DBSETRELATION ) HB_USHORT uiChildArea; char * szAlias = NULL; - if( hb_pcount() < 2 || ( !( hb_parinfo( 1 ) & HB_IT_NUMERIC ) && ( hb_parinfo( 1 ) != HB_IT_STRING ) ) || !( HB_ISNIL( 4 ) || HB_ISLOG( 4 ) ) ) + if( hb_pcount() < 2 || + hb_param( 1, HB_IT_NUMERIC | HB_IT_STRING ) == NULL || + !( HB_ISNIL( 4 ) || HB_ISLOG( 4 ) ) ) { hb_errRT_DBCMD( EG_ARG, EDBCMD_REL_BADPARAMETER, NULL, HB_ERR_FUNCNAME ); return; } - if( hb_parinfo( 1 ) & HB_IT_NUMERIC ) + if( HB_ISNUM( 1 ) ) { uiChildArea = ( HB_AREANO ) hb_parni( 1 ); } diff --git a/harbour/src/rtl/valtype.c b/harbour/src/rtl/valtype.c index 0eb4db4e5c..8916b078e6 100644 --- a/harbour/src/rtl/valtype.c +++ b/harbour/src/rtl/valtype.c @@ -138,7 +138,7 @@ HB_FUNC( HB_ISSTRING ) HB_FUNC( HB_ISCHAR ) { - hb_retl( ( hb_parinfo( 1 ) & HB_IT_MEMO ) == HB_IT_STRING ); + hb_retl( ( hb_parinfo( 1 ) & ( HB_IT_MEMO | HB_IT_STRING ) ) == HB_IT_STRING ); } HB_FUNC( HB_ISMEMO )