diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5cf654187e..d4dee8cb45 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,17 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-19 00:08 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/gtwvg/gtwvg.c + * contrib/gtwvg/wvgcuig.c + * contrib/gtwvg/wvgwin.c + * contrib/gtwvg/wvgutils.c + * contrib/gtwvg/wincallb.c + * contrib/gtwvg/Makefile + * contrib/gtwvg/wvgcore.c + * Reverted to r11403 for Pritpal. + (now for real) + 2009-06-18 21:18 UTC+0200 Jean lefebvre (jfl at mafact dot com) * vm/runner.c + Added options to HB_HRBLOAD() : @@ -30,7 +41,7 @@ // then the function in HRB is converted // to STATIC one HB_HRB_KEEP_GLOBAL 2 // overload all existing public functions - // will disable HB_HRBUNLOAD() + // will disable HB_HRBUNLOAD() * vm/hvm.c + added function hb_vmSetFunction( PHB_SYMB pOldSym, PHB_SYMB pNewSym ) @@ -39,8 +50,6 @@ * include/hvm.h + added function hb_vmSetFunction( PHB_SYMB pOldSym, PHB_SYMB pNewSym ) (Thanks to Przemek) - - 2009-06-18 18:25 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/gtwvg/wvgscrlb.prg diff --git a/harbour/contrib/gtwvg/Makefile b/harbour/contrib/gtwvg/Makefile index 9b75ac1f2a..7e5a90e422 100644 --- a/harbour/contrib/gtwvg/Makefile +++ b/harbour/contrib/gtwvg/Makefile @@ -17,7 +17,7 @@ endif ifeq ($(HB_COMPILER),msvc) HB_WITH_GTWVG=yes endif -ifeq ($(HB_COMPILER),owatcom) +ifeq ($(HB_COMPILER),watcom) HB_WITH_GTWVG=yes endif ifeq ($(HB_COMPILER),pocc) diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index d50834a080..e3338f921a 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -4531,7 +4531,7 @@ PHB_GTWVT hb_wvt_gtGetWVT( void ) HB_FUNC( HB_GTINFOEX ) { - if( ISPOINTER( 1 ) && ISNUM( 2 ) ) + if( HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) ) { PHB_GT pGT = hb_gt_ItemBase( hb_param( 1, HB_IT_ANY ) ); diff --git a/harbour/contrib/gtwvg/wincallb.c b/harbour/contrib/gtwvg/wincallb.c index 654b8e8113..51c4d811ec 100644 --- a/harbour/contrib/gtwvg/wincallb.c +++ b/harbour/contrib/gtwvg/wincallb.c @@ -144,21 +144,21 @@ HB_FUNC( _ASCALLBACK ) int i, iParam; - if( ISBLOCK( 1 ) ) + if( HB_ISBLOCK( 1 ) ) { Callback.pDynSym = hb_dynsymGet( "EVAL" ); Callback.pSelf = hb_itemNew( hb_param( 1, HB_IT_BLOCK ) ); } else { - if( ISOBJECT( 2 ) ) + if( HB_ISOBJECT( 2 ) ) Callback.pSelf = hb_itemNew( hb_param( 2, HB_IT_OBJECT ) ); else Callback.pSelf = NULL; - if( ISCHAR( 1 ) ) + if( HB_ISCHAR( 1 ) ) Callback.pDynSym = hb_dynsymGet( hb_parc( 1 ) ); - else if( ISPOINTER( 1 ) ) + else if( HB_ISPOINTER( 1 ) ) Callback.pDynSym = ( ( PHB_SYMB ) hb_parptr( 1 ) )->pDynSym; else { @@ -175,8 +175,8 @@ HB_FUNC( _ASCALLBACK ) return; } - Callback.iFormalParams = ISNUM( 3 ) ? hb_parni( 3 ) : 4 ; /* default to 4 formal parameters */ - Callback.bVoid = ISLOG( 4 ) ? hb_parl ( 4 ) : FALSE; /* default to non-void function */ + Callback.iFormalParams = HB_ISNUM( 3 ) ? hb_parni( 3 ) : 4 ; /* default to 4 formal parameters */ + Callback.bVoid = HB_ISLOG( 4 ) ? hb_parl ( 4 ) : FALSE; /* default to non-void function */ Callback.iCargoParams = hb_pcount() - 4; Callback.pParams = ( PHB_ITEM * ) hb_xgrab( Callback.iCargoParams * sizeof( PHB_ITEM ) ); @@ -190,7 +190,7 @@ HB_FUNC( _ASCALLBACK ) /* debugging only */ /* to see what was generated */ - if ( ISBYREF( 5 ) ) + if ( HB_ISBYREF( 5 ) ) hb_storclen( ( char * ) pMem, 128, 5 ); } /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/gtwvg/wvgcore.c b/harbour/contrib/gtwvg/wvgcore.c index 967046b5bd..48d10910e2 100644 --- a/harbour/contrib/gtwvg/wvgcore.c +++ b/harbour/contrib/gtwvg/wvgcore.c @@ -938,11 +938,11 @@ static COLORREF hb_wvt_BgColorParam( int iParam ) COLORREF color; - if( ISNUM( iParam ) ) + if( HB_ISNUM( iParam ) ) color = ( COLORREF ) hb_parnl( iParam ); else { - int iColor = ISCHAR( iParam ) ? hb_gtColorToN( hb_parc( iParam ) ) : - 1; + int iColor = HB_ISCHAR( iParam ) ? hb_gtColorToN( hb_parc( iParam ) ) : - 1; if( iColor == -1 ) iColor = hb_gtGetCurrColor(); color = _s->COLORS[ ( ( iColor >> 4 ) & 0x0f ) ]; @@ -959,11 +959,11 @@ static COLORREF hb_wvt_FgColorParam( int iParam ) COLORREF color; - if( ISNUM( iParam ) ) + if( HB_ISNUM( iParam ) ) color = ( COLORREF ) hb_parnl( iParam ); else { - int iColor = ISCHAR( iParam ) ? hb_gtColorToN( hb_parc( iParam ) ) : - 1; + int iColor = HB_ISCHAR( iParam ) ? hb_gtColorToN( hb_parc( iParam ) ) : - 1; if( iColor == -1 ) iColor = hb_gtGetCurrColor(); color = _s->COLORS[ ( ( iColor >> 4 ) & 0x0f ) ]; @@ -1182,7 +1182,7 @@ HB_FUNC( WVT_DRAWIMAGE ) iBottom = xy.y - 1 + hb_parni( 6,3 ); iRight = xy.x - 1 + hb_parni( 6,4 ); - if ( ISNUM( 5 ) ) + if ( HB_ISNUM( 5 ) ) { hb_wvt_gtRenderPicture( iLeft, iTop, ( iRight - iLeft ) + 1, ( iBottom - iTop ) + 1, _s->pGUI->iPicture[ hb_parni( 5 )-1 ] ); } @@ -1294,7 +1294,7 @@ HB_FUNC( WVT_DRAWOUTLINE ) hOldPenGUI = hOldPen = 0; - if ( ISNUM( 5 ) ) + if ( HB_ISNUM( 5 ) ) { hPen = CreatePen( hb_parni( 5 ), 0, ( !HB_ISNUM( 7 ) ? 0 : ( COLORREF ) hb_parnl( 7 ) ) ); if ( hPen ) @@ -1809,7 +1809,7 @@ HB_FUNC( WVT_DRAWBUTTON ) LOGBRUSH lb = { 0,0,0 }; HBRUSH hBrush; - BOOL bText = ISCHAR( 5 ); + BOOL bText = HB_ISCHAR( 5 ); BOOL bImage = ( HB_ISNUM( 6 ) || HB_ISCHAR( 6 ) ); int iFormat = hb_parni( 7 ); COLORREF textColor = !HB_ISNUM( 8 ) ? _s->COLORS[ 0 ] : ( COLORREF ) hb_parnl( 8 ) ; @@ -1938,7 +1938,7 @@ HB_FUNC( WVT_DRAWBUTTON ) int iImageWidth = ( iRight - iLeft + 1 - 8 ); int iImageHeight = ( iBottom - iTop + 1 - 8 - iTextHeight ); - if ( ISNUM( 6 ) ) + if ( HB_ISNUM( 6 ) ) { IPicture *iPicture = _s->pGUI->iPicture[ hb_parni( 6 ) - 1 ]; hb_wvt_gtRenderPicture( iLeft+4, iTop+4, iImageWidth, iImageHeight, iPicture ); diff --git a/harbour/contrib/gtwvg/wvgcuig.c b/harbour/contrib/gtwvg/wvgcuig.c index cb92e8f03f..769179cf7a 100644 --- a/harbour/contrib/gtwvg/wvgcuig.c +++ b/harbour/contrib/gtwvg/wvgcuig.c @@ -184,7 +184,7 @@ HB_FUNC( WVG_SETGOBJSTATE ) { iOState = gObj->iState; - if( ISNUM( 2 ) ) + if( HB_ISNUM( 2 ) ) { int iState = hb_parni( 2 ); if( iOState != iState && iState > 0 && iState <= 4 ) @@ -227,19 +227,19 @@ HB_FUNC( WVG_SETGOBJDATA ) case GOBJ_OBJDATA_TEXT: if( gObj->lpText ) HB_TCHAR_FREE( gObj->lpText ); - gObj->lpText = HB_TCHAR_CONVTO( ISCHAR( 3 ) ? hb_parc( 3 ) : "" ); + gObj->lpText = HB_TCHAR_CONVTO( HB_ISCHAR( 3 ) ? hb_parc( 3 ) : "" ); break; #if ! defined( HB_OS_WIN_CE ) case GOBJ_OBJDATA_PICTURE: - if( ISNUM( 3 ) && hb_parni( 3 ) <= WVT_PICTURES_MAX ) + if( HB_ISNUM( 3 ) && hb_parni( 3 ) <= WVT_PICTURES_MAX ) gObj->iPicture = pWVT->pGUI->iPicture[ hb_parni( 3 ) - 1 ]; break; case GOBJ_OBJDATA_IMAGE: { IPicture * iPicture = NULL; - if( ISNUM( 3 ) ) + if( HB_ISNUM( 3 ) ) { if( hb_parni( 3 ) <= WVT_PICTURES_MAX ) iPicture = pWVT->pGUI->iPicture[ hb_parni( 3 ) - 1 ]; @@ -1276,7 +1276,7 @@ static void hb_wvg_TextBox( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop, HB_FUNC( WVG_PICTURE ) { #if ! defined( HB_OS_WIN_CE ) - if( ISNUM( 6 ) && hb_parni( 6 ) <= WVT_PICTURES_MAX ) + if( HB_ISNUM( 6 ) && hb_parni( 6 ) <= WVT_PICTURES_MAX ) { PHB_GTWVT pWVT = hb_wvt_gtGetWVT(); HB_GOBJS *gObj = hb_wvg_ObjectNew( pWVT ); @@ -1327,7 +1327,7 @@ HB_FUNC( WVG_IMAGE ) switch( iSource ) { case GOBJ_IMAGESOURCE_SLOT: - if( ISNUM( 7 ) && hb_parni( 7 ) <= WVT_PICTURES_MAX ) + if( HB_ISNUM( 7 ) && hb_parni( 7 ) <= WVT_PICTURES_MAX ) { iPicture = pWVT->pGUI->iPicture[ hb_parni( 7 ) - 1 ]; } diff --git a/harbour/contrib/gtwvg/wvgutils.c b/harbour/contrib/gtwvg/wvgutils.c index 31effa772f..56cea465d7 100644 --- a/harbour/contrib/gtwvg/wvgutils.c +++ b/harbour/contrib/gtwvg/wvgutils.c @@ -373,7 +373,7 @@ HB_FUNC( WVT_SETTOOLTIPWIDTH ) int iTipWidth = ( int ) SendMessage( _s->hWndTT, TTM_GETMAXTIPWIDTH, 0, 0 ); - if ( ISNUM( 1 ) ) + if ( HB_ISNUM( 1 ) ) { SendMessage( _s->hWndTT, TTM_SETMAXTIPWIDTH, 0, ( LPARAM ) ( HB_PTRDIFF ) hb_parnint( 1 ) ); } @@ -391,7 +391,7 @@ HB_FUNC( WVT_SETTOOLTIPBKCOLOR ) COLORREF cr = ( COLORREF ) SendMessage( _s->hWndTT, TTM_GETTIPBKCOLOR, 0, 0 ); - if ( ISNUM( 1 ) ) + if ( HB_ISNUM( 1 ) ) { SendMessage( _s->hWndTT, TTM_SETTIPBKCOLOR, ( WPARAM ) ( COLORREF ) hb_parnl( 1 ), 0 ); } @@ -408,7 +408,7 @@ HB_FUNC( WVT_SETTOOLTIPTEXTCOLOR ) COLORREF cr = ( COLORREF ) SendMessage( _s->hWndTT, TTM_GETTIPTEXTCOLOR, 0, 0 ); - if ( ISNUM( 1 ) ) + if ( HB_ISNUM( 1 ) ) { SendMessage( _s->hWndTT, TTM_SETTIPTEXTCOLOR, ( WPARAM ) ( COLORREF ) hb_parnl( 1 ), 0 ); } @@ -481,7 +481,7 @@ HB_FUNC( WVT_SETGUI ) BOOL bGui = _s->bGui; - if ( ISLOG( 1 ) ) + if ( HB_ISLOG( 1 ) ) { _s->bGui = hb_parl( 1 ); } @@ -621,7 +621,7 @@ HB_FUNC( WVT_SETMOUSEMOVE ) BOOL bMouseMove = _s->MouseMove; - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) _s->MouseMove = hb_parl( 1 ); hb_retl( bMouseMove ); @@ -774,7 +774,7 @@ HB_FUNC( WVT_SETLASTMENUEVENT ) PHB_GTWVT _s = hb_wvt_gtGetWVT(); int iEvent = _s->LastMenuEvent; - if ( ISNUM( 1 ) ) + if ( HB_ISNUM( 1 ) ) _s->LastMenuEvent = hb_parni( 1 ); hb_retni( iEvent ); @@ -788,7 +788,7 @@ HB_FUNC( WVT_SETMENUKEYEVENT ) int iOldEvent = _s->MenuKeyEvent; - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) _s->MenuKeyEvent = hb_parni( 1 ); hb_retni( iOldEvent ) ; @@ -811,7 +811,7 @@ HB_FUNC( WVT_ENABLESHORTCUTS ) BOOL bWas = _s->EnableShortCuts; - if( ISLOG( 1 ) ) + if( HB_ISLOG( 1 ) ) _s->EnableShortCuts = hb_parl( 1 ); hb_retl( bWas ); @@ -966,7 +966,7 @@ HB_FUNC( WVT_CREATEDIALOGDYNAMIC ) } { - if ( ISNUM( 3 ) ) + if ( HB_ISNUM( 3 ) ) { LPTSTR lpTemplate = HB_TCHAR_CONVTO( hb_parc( 1 ) ); hDlg = CreateDialogIndirect( ( HINSTANCE ) wvg_hInstance(), @@ -1342,7 +1342,7 @@ HB_FUNC( WVT_DLGSETICON ) { HICON hIcon; - if ( ISNUM( 2 ) ) + if ( HB_ISNUM( 2 ) ) { hIcon = LoadIcon( ( HINSTANCE ) wvg_hInstance(), MAKEINTRESOURCE( hb_parni( 2 ) ) ); } @@ -1491,7 +1491,7 @@ void wvt_Size2ArrayEx( SIZE *siz, PHB_ITEM aSize ) /*----------------------------------------------------------------------*/ -#define HB_PARTSTR( n ) ( ISCHAR( n ) ? HB_TCHAR_CONVTO( hb_parc(n) ) : NULL ) +#define HB_PARTSTR( n ) ( HB_ISCHAR( n ) ? HB_TCHAR_CONVTO( hb_parc(n) ) : NULL ) #define HB_PARTFREE( p ) do { if( p ) HB_TCHAR_FREE( p ); } while( 0 ) HB_FUNC( WVT__GETOPENFILENAME ) diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index 7facf058a6..3e2c044c6f 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -137,12 +137,12 @@ HB_FUNC( WVG_HINSTANCE ) HB_FUNC( WIN_SENDMESSAGE ) { - LPTSTR cText = ISBYREF( 4 ) ? HB_TCHAR_CONVTO( hb_parcx( 4 ) ) : NULL; + LPTSTR cText = HB_ISBYREF( 4 ) ? HB_TCHAR_CONVTO( hb_parcx( 4 ) ) : NULL; hb_retnl( ( ULONG ) SendMessage( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( UINT ) hb_parni( 2 ), ( !HB_ISNUM( 3 ) ? 0 : ( WPARAM ) hb_parnint( 3 ) ), - ( ISNIL( 4 ) ? 0 : ( cText ? ( LPARAM ) ( LPSTR ) cText : + ( HB_ISNIL( 4 ) ? 0 : ( cText ? ( LPARAM ) ( LPSTR ) cText : ( HB_ISCHAR( 4 ) ? ( LPARAM )( LPSTR ) hb_parc( 4 ) : ( LPARAM ) hb_parnint( 4 ) ) ) ) ) ); @@ -174,7 +174,7 @@ HB_FUNC( WIN_SENDDLGITEMMESSAGE ) hb_retnl( ( LONG ) SendDlgItemMessage( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) , ( int ) hb_parni( 2 ) , ( UINT ) hb_parni( 3 ) , - ( ISNUM( 4 ) ? ( WPARAM ) hb_parnint( 4 ) : 0 ), + ( HB_ISNUM( 4 ) ? ( WPARAM ) hb_parnint( 4 ) : 0 ), ( cText ? ( LPARAM ) cText : ( LPARAM ) hb_parnint( 5 ) ) ) ); @@ -307,7 +307,7 @@ HB_FUNC( WIN_GETDLGITEMTEXT ) HB_FUNC( WIN_CHECKDLGBUTTON ) { hb_retl( CheckDlgButton( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ), - ( UINT )( ISNUM( 3 ) ? hb_parni( 3 ) : hb_parl( 3 ) ) ) ); + ( UINT )( HB_ISNUM( 3 ) ? hb_parni( 3 ) : hb_parl( 3 ) ) ) ); } /*----------------------------------------------------------------------*/ @@ -353,7 +353,7 @@ HB_FUNC( WIN_MESSAGEBOX ) HB_FUNC( WIN_INVALIDATERECT ) { - if( ISARRAY( 2 ) ) + if( HB_ISARRAY( 2 ) ) { RECT rc = { 0, 0, 0, 0 }; @@ -682,7 +682,7 @@ HB_FUNC( WIN_CHOOSECOLOR ) int i; for( i = 0; i < ( int ) HB_SIZEOFARRAY( crCustClr ); i++ ) - crCustClr[ i ] = ( ISARRAY( 2 ) ? ( COLORREF ) hb_parnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ); + crCustClr[ i ] = ( HB_ISARRAY( 2 ) ? ( COLORREF ) hb_parnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ); cc.lStructSize = sizeof( CHOOSECOLOR ); cc.hwndOwner = HB_ISNUM( 4 ) ? ( HWND ) ( HB_PTRDIFF ) hb_parnint( 4 ) : NULL; @@ -775,7 +775,7 @@ HB_FUNC( WIN_APPENDMENU ) LPTSTR buffer; int i, iLen; - if( ISCHAR( 4 ) ) + if( HB_ISCHAR( 4 ) ) { iLen = hb_parclen( 4 ); if( iLen > 0 && iLen < 256 ) /* Translate '~' to '&' */ @@ -1361,7 +1361,7 @@ HB_FUNC( WIN_GETMESSAGETEXT ) { TCHAR cText[ 32000 ]; - SendMessage( wvg_parhwnd( 1 ), ( UINT ) hb_parni( 2 ), wvg_parwparam( 3 ), ( LPARAM ) &cText ); + SendMessage( wvg_parhwnd( 1 ), ( UINT ) hb_parni( 2 ), wvg_parwparam( 3 ), ( LPARAM ) cText ); { char * szText = HB_TCHAR_CONVFROM( cText ); @@ -1871,7 +1871,7 @@ HB_FUNC( WVG_CHOOSEFONT ) HWND hWnd = wvg_parhwnd( 1 ); TCHAR szStyle[ MAX_PATH + 1 ]; - if( ISCHAR( 3 ) ) + if( HB_ISCHAR( 3 ) ) { HB_TCHAR_CPTO( lf.lfFaceName, hb_parcx( 3 ), sizeof( lf.lfFaceName ) - 1 ); } @@ -1902,9 +1902,9 @@ HB_FUNC( WVG_CHOOSEFONT ) Flags = Flags | CF_NOSIMULATIONS; /* ::synthesizeFonts == .f. */ #endif - if( ISLOG( 5 ) && hb_parl( 5 ) ) + if( HB_ISLOG( 5 ) && hb_parl( 5 ) ) Flags = Flags | CF_SCREENFONTS; - if( ISLOG( 6 ) && hb_parl( 6 ) ) + if( HB_ISLOG( 6 ) && hb_parl( 6 ) ) Flags = Flags | CF_PRINTERFONTS; cf.lStructSize = sizeof( CHOOSEFONT ); @@ -2110,7 +2110,7 @@ HB_FUNC( WVG_ADDTOOLBARBUTTON ) HB_TCHAR_FREE( szCaption ); #if 1 - if( ISLOG( 6 ) && ( hb_parl( 6 ) ) ) + if( HB_ISLOG( 6 ) && ( hb_parl( 6 ) ) ) { SendMessage( hWndTB, TB_SETMAXTEXTROWS, ( WPARAM ) 0, ( LPARAM ) 0 ); }