diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 05b1339130..189143ac07 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-17 15:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * tests/wvtext.prg + * Updates. Formatting. Show msgbox when MT is not present. + + * contrib/hbxbp/Makefile + + Enabled for mingw64. + + * contrib/hbxpp/xppop.prg + * contrib/hbxpp/xppopc.c + + Added Xbase++ compatible operator overloading for $ on arrays. + 2010-06-17 13:11 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/harbinit.prg * harbour/src/vm/runner.c diff --git a/harbour/contrib/hbxbp/Makefile b/harbour/contrib/hbxbp/Makefile index 070db63633..929e0591f2 100644 --- a/harbour/contrib/hbxbp/Makefile +++ b/harbour/contrib/hbxbp/Makefile @@ -54,7 +54,7 @@ PRG_HEADERS := \ # Try to be in sync with hbqt, but not too hard, since this # lib doesn't need QT external component directly. ifeq ($(filter $(HB_PLATFORM),dos),) - ifeq ($(filter $(HB_COMPILER),mingw64 watcom bcc pocc pocc64 poccarm),) + ifeq ($(filter $(HB_COMPILER),watcom bcc pocc pocc64 poccarm msvcia64),) ifneq ($(HB_WITH_QT),no) HB_INC_DEPEND := -I$(TOP)$(ROOT)contrib/hbqt diff --git a/harbour/contrib/hbxpp/xppop.prg b/harbour/contrib/hbxpp/xppop.prg index f40caf72fd..4ceeb92271 100644 --- a/harbour/contrib/hbxpp/xppop.prg +++ b/harbour/contrib/hbxpp/xppop.prg @@ -65,9 +65,15 @@ ANNOUNCE XPP_OP_OVERLOAD INIT PROCEDURE xpp_Init() ASSOCIATE CLASS xpp_op_Character WITH TYPE Character + ASSOCIATE CLASS xpp_op_Array WITH TYPE Array RETURN CREATE CLASS Character FUNCTION xpp_op_Character OPTIONAL INHERIT HBCharacter OPERATOR "[]" FUNCTION XPP_INDEX() ENDCLASS + +CREATE CLASS Array FUNCTION xpp_op_Array + OPTIONAL INHERIT HBArray + OPERATOR "$$" FUNCTION XPP_INCLUDE() +ENDCLASS diff --git a/harbour/contrib/hbxpp/xppopc.c b/harbour/contrib/hbxpp/xppopc.c index f6e465349e..ad667b3da7 100644 --- a/harbour/contrib/hbxpp/xppopc.c +++ b/harbour/contrib/hbxpp/xppopc.c @@ -142,3 +142,20 @@ HB_FUNC( XPP_INDEX ) } } } + +HB_FUNC( XPP_INCLUDE ) +{ + PHB_ITEM pSelf = hb_stackSelfItem(); + PHB_ITEM pKey = hb_param( 1, HB_IT_ANY ); + + if( HB_IS_ARRAY( pSelf ) ) + { + hb_retl( hb_arrayScan( pSelf, pKey, NULL, NULL, HB_FALSE ) != 0 ); + } + else + { + PHB_ITEM pResult = hb_errRT_BASE_Subst( EG_ARG, 1109, NULL, "$", 2, pKey, pSelf ); + if( pResult ) + hb_itemReturnRelease( pResult ); + } +} diff --git a/harbour/tests/wvtext.prg b/harbour/tests/wvtext.prg index 4fd97bcc62..d9705c187f 100644 --- a/harbour/tests/wvtext.prg +++ b/harbour/tests/wvtext.prg @@ -90,7 +90,11 @@ PROCEDURE Main() hb_GTInfo( HB_GTI_RESIZEMODE, iif( hb_GTInfo( HB_GTI_RESIZEMODE ) == HB_GTI_RESIZEMODE_ROWS, HB_GTI_RESIZEMODE_FONT, HB_GTI_RESIZEMODE_ROWS ) ) CASE nKey == K_F10 - hb_threadStart( @thFunc() ) + IF hb_MTVM() + hb_threadStart( @thFunc() ) + ELSE + Alert( "MT mode not available. Rebuild this program with -mt switch and try again." ) + ENDIF CASE nKey == HB_K_RESIZE DispScreen() @@ -236,7 +240,7 @@ PROCEDURE thFunc() ' Rows and ' + hb_ntos( MaxCol() ) + ' Columns' DispOutAt( 0, 0, padc( cTitle, maxcol() + 1 ), 'N/GR*' ) - use test shared + USE test SHARED aStruct := DbStruct() oBrowse := TBrowse():New( 1, 0, maxrow(), maxcol() ) @@ -329,71 +333,32 @@ STATIC FUNCTION TBPrev( oTbr ) RETURN lMoved //-------------------------------------------------------------------// STATIC FUNCTION BlockField( i ) - RETURN {|| fieldget( i ) } + RETURN {|| fieldget( i ) } //-------------------------------------------------------------------// STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd ) LOCAL lRet := .T. DO CASE - CASE nKey == K_ESC - lEnd := .T. - - CASE nKey == K_ENTER - lEnd := .T. - - CASE nKey == K_DOWN - oBrowse:Down() - - CASE nKey == K_UP - oBrowse:Up() - - CASE nKey == K_LEFT - oBrowse:Left() - - CASE nKey == K_RIGHT - oBrowse:Right() - - CASE nKey == K_PGDN - oBrowse:pageDown() - - CASE nKey == K_PGUP - oBrowse:pageUp() - - CASE nKey == K_CTRL_PGUP - oBrowse:goTop() - - CASE nKey == K_CTRL_PGDN - oBrowse:goBottom() - - CASE nKey == K_HOME - oBrowse:home() - - CASE nKey == K_END - oBrowse:end() - - CASE nKey == K_CTRL_LEFT - oBrowse:panLeft() - - CASE nKey == K_CTRL_RIGHT - oBrowse:panRight() - - CASE nKey == K_CTRL_HOME - oBrowse:panHome() - - CASE nKey == K_CTRL_END - oBrowse:panEnd() - - CASE nKey == K_MWBACKWARD - oBrowse:down() - - CASE nKey == K_MWFORWARD - oBrowse:up() - - OTHERWISE - lRet := .F. - + CASE nKey == K_ESC ; lEnd := .T. + CASE nKey == K_ENTER ; lEnd := .T. + CASE nKey == K_DOWN ; oBrowse:Down() + CASE nKey == K_UP ; oBrowse:Up() + CASE nKey == K_LEFT ; oBrowse:Left() + CASE nKey == K_RIGHT ; oBrowse:Right() + CASE nKey == K_PGDN ; oBrowse:pageDown() + CASE nKey == K_PGUP ; oBrowse:pageUp() + CASE nKey == K_CTRL_PGUP ; oBrowse:goTop() + CASE nKey == K_CTRL_PGDN ; oBrowse:goBottom() + CASE nKey == K_HOME ; oBrowse:home() + CASE nKey == K_END ; oBrowse:end() + CASE nKey == K_CTRL_LEFT ; oBrowse:panLeft() + CASE nKey == K_CTRL_RIGHT ; oBrowse:panRight() + CASE nKey == K_CTRL_HOME ; oBrowse:panHome() + CASE nKey == K_CTRL_END ; oBrowse:panEnd() + CASE nKey == K_MWBACKWARD ; oBrowse:down() + CASE nKey == K_MWFORWARD ; oBrowse:up() + OTHERWISE ; lRet := .F. ENDCASE RETURN lRet - //-------------------------------------------------------------------//