From b2ea75716651aac295efc12c01f37847bab31e1a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 8 Feb 2010 18:04:28 +0000 Subject: [PATCH] 2010-02-08 19:03 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/gtwin/gtwin.c * ULONG -> HB_SIZE * src/rtl/gtwvt/gtwvt.c * LONG -> int * ULONG -> HB_SIZE * contrib/gtwvg/gtwvg.c * contrib/gtwvg/wvggui.c * LONG -> int * ULONG -> HB_SIZE * contrib/gtwvg/wvgwin.c * ULONG -> HB_ULONG * LONG -> long * contrib/gtwvg/wvgutils.c * contrib/gtwvg/wvgsink.c * contrib/gtwvg/wvgwing.c * contrib/hbwin/axcore.c * LONG -> long * contrib/gtwvg/wvgutils.c * "" -> NULL --- harbour/ChangeLog | 26 ++++++++++++++++++++++ harbour/contrib/gtwvg/gtwvg.c | 16 +++++++------- harbour/contrib/gtwvg/wvggui.c | 2 +- harbour/contrib/gtwvg/wvgsink.c | 4 ++-- harbour/contrib/gtwvg/wvgutils.c | 6 ++--- harbour/contrib/gtwvg/wvgwin.c | 22 +++++++++--------- harbour/contrib/gtwvg/wvgwing.c | 4 ++-- harbour/contrib/hbwin/axcore.c | 4 ++-- harbour/src/rtl/gtwin/gtwin.c | 38 ++++++++++++++++---------------- harbour/src/rtl/gtwvt/gtwvt.c | 14 ++++++------ 10 files changed, 81 insertions(+), 55 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index cead14721f..5ab3acc94c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,32 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-08 19:03 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/gtwin/gtwin.c + * ULONG -> HB_SIZE + + * src/rtl/gtwvt/gtwvt.c + * LONG -> int + * ULONG -> HB_SIZE + + * contrib/gtwvg/gtwvg.c + * contrib/gtwvg/wvggui.c + * LONG -> int + * ULONG -> HB_SIZE + + * contrib/gtwvg/wvgwin.c + * ULONG -> HB_ULONG + * LONG -> long + + * contrib/gtwvg/wvgutils.c + * contrib/gtwvg/wvgsink.c + * contrib/gtwvg/wvgwing.c + * contrib/hbwin/axcore.c + * LONG -> long + + * contrib/gtwvg/wvgutils.c + * "" -> NULL + 2010-02-08 18:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbbmcdx/bmdbfcdx.c * Some more syncing. diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index 72094897c9..39d4d5422d 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -805,8 +805,8 @@ static HB_BOOL hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) if( hFont ) { HDC hdc; - LONG width; - LONG height; + int width; + int height; TEXTMETRIC tm; hdc = GetDC( pWVT->hWnd ); @@ -1213,11 +1213,11 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L RedrawWindow( pWVT->hWnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW ); { - ULONG ulSize; - int irow, icol, j, top, left, bottom, right; - char * sBuffer; - RECT rect = { 0, 0, 0, 0 }; - RECT colrowRC = { 0, 0, 0, 0 }; + HB_SIZE ulSize; + int irow, icol, j, top, left, bottom, right; + char * sBuffer; + RECT rect = { 0, 0, 0, 0 }; + RECT colrowRC = { 0, 0, 0, 0 }; rect.left = HB_MIN( pWVT->sRectNew.left, pWVT->sRectNew.right ); rect.top = HB_MIN( pWVT->sRectNew.top , pWVT->sRectNew.bottom ); @@ -3212,7 +3212,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) else { char * szClipboardData; - ULONG ulLen; + HB_SIZE ulLen; if( hb_gt_winapi_getClipboard( pWVT->CodePage == OEM_CHARSET ? CF_OEMTEXT : CF_TEXT, &szClipboardData, &ulLen ) ) diff --git a/harbour/contrib/gtwvg/wvggui.c b/harbour/contrib/gtwvg/wvggui.c index 9dc1a718d5..fa121f17d5 100644 --- a/harbour/contrib/gtwvg/wvggui.c +++ b/harbour/contrib/gtwvg/wvggui.c @@ -1690,7 +1690,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) else { char * szClipboardData; - ULONG ulLen; + HB_SIZE ulLen; if( hb_gt_winapi_getClipboard( pWVT->CodePage == OEM_CHARSET ? CF_OEMTEXT : CF_TEXT, &szClipboardData, &ulLen ) ) diff --git a/harbour/contrib/gtwvg/wvgsink.c b/harbour/contrib/gtwvg/wvgsink.c index 48f6fafc5b..dad4a6a992 100644 --- a/harbour/contrib/gtwvg/wvgsink.c +++ b/harbour/contrib/gtwvg/wvgsink.c @@ -238,7 +238,7 @@ static HRESULT STDMETHODCALLTYPE Invoke( IEventHandler *lpThis, DISPID dispid, R if( HB_IS_HASH( pAction ) ) { - pKey = hb_itemPutNL( pKey, ( LONG ) dispid ); + pKey = hb_itemPutNL( pKey, ( long ) dispid ); pAction = hb_hashGetItemPtr( pAction, pKey, 0 ); hb_itemRelease( pKey ); } @@ -258,7 +258,7 @@ static HRESULT STDMETHODCALLTYPE Invoke( IEventHandler *lpThis, DISPID dispid, R hb_vmPushEvalSym(); hb_vmPush( pAction ); if( pKey == NULL ) - hb_vmPushLong( ( LONG ) dispid ); + hb_vmPushLong( ( long ) dispid ); for( i = 1, ii = 0; i <= iCount; i++ ) { diff --git a/harbour/contrib/gtwvg/wvgutils.c b/harbour/contrib/gtwvg/wvgutils.c index 96540df5be..eae2879bdd 100644 --- a/harbour/contrib/gtwvg/wvgutils.c +++ b/harbour/contrib/gtwvg/wvgutils.c @@ -182,7 +182,7 @@ HB_FUNC( WVT_CHOOSEFONT ) hb_reta( 9 ); hb_storvc( szFaceName , -1, 1 ); - hb_storvnl( ( LONG ) PointSize, -1, 2 ); + hb_storvnl( ( long ) PointSize, -1, 2 ); hb_storvni( lf.lfWidth , -1, 3 ); hb_storvni( lf.lfWeight , -1, 4 ); hb_storvni( lf.lfQuality , -1, 5 ); @@ -196,8 +196,8 @@ HB_FUNC( WVT_CHOOSEFONT ) else { hb_reta( 9 ); - hb_storvc( "" , -1, 1 ); - hb_storvnl( ( LONG ) 0, -1, 2 ); + hb_storvc( NULL , -1, 1 ); + hb_storvnl( ( long ) 0, -1, 2 ); hb_storvni( 0 , -1, 3 ); hb_storvni( 0 , -1, 4 ); hb_storvni( 0 , -1, 5 ); diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index 23ad098c40..56aa74cade 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -132,12 +132,12 @@ HB_FUNC( WVG_SENDMESSAGE ) { 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 ) ), - ( HB_ISNIL( 4 ) ? 0 : ( cText ? ( LPARAM ) ( LPSTR ) cText : - ( HB_ISCHAR( 4 ) ? ( LPARAM )( LPSTR ) hb_parc( 4 ) : - ( LPARAM ) hb_parnint( 4 ) ) ) ) ) + hb_retnl( ( HB_ULONG ) SendMessage( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), + ( UINT ) hb_parni( 2 ), + ( !HB_ISNUM( 3 ) ? 0 : ( WPARAM ) hb_parnint( 3 ) ), + ( HB_ISNIL( 4 ) ? 0 : ( cText ? ( LPARAM ) ( LPSTR ) cText : + ( HB_ISCHAR( 4 ) ? ( LPARAM )( LPSTR ) hb_parc( 4 ) : + ( LPARAM ) hb_parnint( 4 ) ) ) ) ) ); if( cText ) @@ -164,7 +164,7 @@ HB_FUNC( WVG_SENDDLGITEMMESSAGE ) hb_xmemcpy( cText, hb_itemGetCPtr( pText ), iLen + 1 ); } - hb_retnl( ( LONG ) SendDlgItemMessage( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) , + hb_retnl( ( long ) SendDlgItemMessage( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) , ( int ) hb_parni( 2 ) , ( UINT ) hb_parni( 3 ) , ( HB_ISNUM( 4 ) ? ( WPARAM ) hb_parnint( 4 ) : 0 ), @@ -198,14 +198,14 @@ HB_FUNC( WVG_SETFOCUS ) HB_FUNC( WVG_SETTEXTCOLOR ) { - hb_retnl( ( ULONG ) SetTextColor( ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( COLORREF ) hb_parnl( 2 ) ) ); + hb_retnl( ( HB_ULONG ) SetTextColor( ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( COLORREF ) hb_parnl( 2 ) ) ); } /*----------------------------------------------------------------------*/ HB_FUNC( WVG_SETBKCOLOR ) { - hb_retnl( ( ULONG ) SetBkColor( ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( COLORREF ) hb_parnl( 2 ) ) ); + hb_retnl( ( HB_ULONG ) SetBkColor( ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( COLORREF ) hb_parnl( 2 ) ) ); } /*----------------------------------------------------------------------*/ @@ -254,14 +254,14 @@ HB_FUNC( WVG_HIWORD ) #if 0 HB_FUNC( WVG_MULDIV ) { - hb_retni( MulDiv( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) ); + hb_retnl( MulDiv( hb_parnl( 1 ), hb_parnl( 2 ), hb_parnl( 3 ) ) ); } #endif /*----------------------------------------------------------------------*/ HB_FUNC( WVG_GETDIALOGBASEUNITS ) { - hb_retnl( ( LONG ) GetDialogBaseUnits() ); + hb_retnl( ( long ) GetDialogBaseUnits() ); } /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/gtwvg/wvgwing.c b/harbour/contrib/gtwvg/wvgwing.c index 31cefef318..08c5e26ee5 100644 --- a/harbour/contrib/gtwvg/wvgwing.c +++ b/harbour/contrib/gtwvg/wvgwing.c @@ -1013,7 +1013,7 @@ HB_FUNC( WVG_POINTSIZETOHEIGHT ) { HDC hdc = HB_ISNUM( 1 ) ? wvg_parhdc( 1 ) : GetDC( GetDesktopWindow() ); - hb_retnl( ( LONG ) -MulDiv( ( LONG ) hb_parnl( 2 ), GetDeviceCaps( hdc, LOGPIXELSY ), 72 ) ); + hb_retnl( ( long ) -MulDiv( ( LONG ) hb_parnl( 2 ), GetDeviceCaps( hdc, LOGPIXELSY ), 72 ) ); if( !HB_ISNUM( 1 ) ) ReleaseDC( GetDesktopWindow(), hdc ); @@ -1027,7 +1027,7 @@ HB_FUNC( WVG_HEIGHTTOPOINTSIZE ) { HDC hdc = HB_ISNUM( 1 ) ? wvg_parhdc( 1 ) : GetDC( GetDesktopWindow() ); - hb_retnl( ( LONG ) -MulDiv( hb_parnl( 2 ), 72, GetDeviceCaps( hdc, LOGPIXELSY ) ) ); + hb_retnl( ( long ) -MulDiv( ( LONG ) hb_parnl( 2 ), 72, GetDeviceCaps( hdc, LOGPIXELSY ) ) ); if( !HB_ISNUM( 1 ) ) ReleaseDC( GetDesktopWindow(), hdc ); diff --git a/harbour/contrib/hbwin/axcore.c b/harbour/contrib/hbwin/axcore.c index 76aae07f61..fbd87c7f6e 100644 --- a/harbour/contrib/hbwin/axcore.c +++ b/harbour/contrib/hbwin/axcore.c @@ -345,7 +345,7 @@ static HRESULT STDMETHODCALLTYPE Invoke( IDispatch* lpThis, DISPID dispid, REFII if( HB_IS_HASH( pAction ) ) { - pKey = hb_itemPutNL( pKey, ( LONG ) dispid ); + pKey = hb_itemPutNL( pKey, ( long ) dispid ); pAction = hb_hashGetItemPtr( pAction, pKey, 0 ); hb_itemRelease( pKey ); } @@ -365,7 +365,7 @@ static HRESULT STDMETHODCALLTYPE Invoke( IDispatch* lpThis, DISPID dispid, REFII hb_vmPushEvalSym(); hb_vmPush( pAction ); if( pKey == NULL ) - hb_vmPushLong( ( LONG ) dispid ); + hb_vmPushLong( ( long ) dispid ); for( i = 1, ii = 0; i <= iCount; i++ ) { diff --git a/harbour/src/rtl/gtwin/gtwin.c b/harbour/src/rtl/gtwin/gtwin.c index e5a5ddf1c2..c292d8a4cd 100644 --- a/harbour/src/rtl/gtwin/gtwin.c +++ b/harbour/src/rtl/gtwin/gtwin.c @@ -146,26 +146,26 @@ static HB_GT_FUNCS SuperTable; #define HB_GTSUPER (&SuperTable) #define HB_GTID_PTR (&s_GtId) -static HB_BOOL s_bSpecialKeyHandling; -static HB_BOOL s_bAltKeyHandling; -static DWORD s_dwAltGrBits; /* JC: used to verify ALT+GR on different platforms */ -static HB_BOOL s_bBreak; /* Used to signal Ctrl+Break to hb_inkeyPoll() */ -static int s_iCursorStyle; -static int s_iOldCurStyle; -static int s_iCurRow; -static int s_iCurCol; -static int s_iUpdtTop; -static int s_iUpdtBottom; -static int s_iUpdtLeft; -static int s_iUpdtRight; +static HB_BOOL s_bSpecialKeyHandling; +static HB_BOOL s_bAltKeyHandling; +static DWORD s_dwAltGrBits; /* JC: used to verify ALT+GR on different platforms */ +static HB_BOOL s_bBreak; /* Used to signal Ctrl+Break to hb_inkeyPoll() */ +static int s_iCursorStyle; +static int s_iOldCurStyle; +static int s_iCurRow; +static int s_iCurCol; +static int s_iUpdtTop; +static int s_iUpdtBottom; +static int s_iUpdtLeft; +static int s_iUpdtRight; static CHAR_INFO * s_pCharInfoScreen = NULL; -static ULONG s_ulScreenBuffSize = 0; +static HB_SIZE s_ulScreenBuffSize = 0; -static HB_FHANDLE s_hStdIn, s_hStdOut, s_hStdErr; +static HB_FHANDLE s_hStdIn, s_hStdOut, s_hStdErr; -static HANDLE s_HInput = INVALID_HANDLE_VALUE; -static HANDLE s_HOutput = INVALID_HANDLE_VALUE; -static DWORD s_dwimode, s_dwomode; +static HANDLE s_HInput = INVALID_HANDLE_VALUE; +static HANDLE s_HOutput = INVALID_HANDLE_VALUE; +static DWORD s_dwimode, s_dwomode; static CONSOLE_SCREEN_BUFFER_INFO s_csbi, /* active screen mode */ s_origCsbi; /* to restore screen mode on exit */ @@ -626,8 +626,8 @@ static void hb_gt_win_xInitScreenParam( PHB_GT pGT ) { COORD coDest; SMALL_RECT srWin; - ULONG ulSize = ( ULONG ) _GetScreenWidth() * _GetScreenHeight() * - sizeof( CHAR_INFO ); + HB_SIZE ulSize = ( HB_SIZE ) _GetScreenWidth() * _GetScreenHeight() * + sizeof( CHAR_INFO ); HB_GTSELF_RESIZE( pGT, _GetScreenHeight(), _GetScreenWidth() ); diff --git a/harbour/src/rtl/gtwvt/gtwvt.c b/harbour/src/rtl/gtwvt/gtwvt.c index 26d43c5061..5c0e8a7d92 100644 --- a/harbour/src/rtl/gtwvt/gtwvt.c +++ b/harbour/src/rtl/gtwvt/gtwvt.c @@ -659,8 +659,8 @@ static void hb_gt_wvt_FitSize( PHB_GTWVT pWVT ) if( hFont ) { HDC hdc; - LONG width; - LONG height; + int width; + int height; TEXTMETRIC tm; hdc = GetDC( pWVT->hWnd ); @@ -1041,11 +1041,11 @@ static void hb_gt_wvt_MouseEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam, L RedrawWindow( pWVT->hWnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW ); { - ULONG ulSize; - int irow, icol, j, top, left, bottom, right; - char * sBuffer; - RECT rect = { 0, 0, 0, 0 }; - RECT colrowRC = { 0, 0, 0, 0 }; + HB_SIZE ulSize; + int irow, icol, j, top, left, bottom, right; + char * sBuffer; + RECT rect = { 0, 0, 0, 0 }; + RECT colrowRC = { 0, 0, 0, 0 }; rect.left = HB_MIN( pWVT->sRectNew.left, pWVT->sRectNew.right ); rect.top = HB_MIN( pWVT->sRectNew.top , pWVT->sRectNew.bottom );