From da625e5db834be7e964fddf1d3c87aeb027ad88b Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 7 Aug 2008 07:13:10 +0000 Subject: [PATCH] 2008-08-07 09:10 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * include/hbdefs.h ! Changed HB_SYMBOL_UNUSED() to better work for all compilers, notably Pelles C. ! Fix to PFLL, although it didn't fix all GCC 4.3.1 warnings. These remained: ../../genc.c:1582: warning: unknown conversion type character 'l' in format ../../genc.c:1582: warning: too many arguments for format [ This changed got merged with existing commit. ] ; Thanks to Przemek for these patches. * contrib/hbfbird/firebird.c % Using PFLL instead of local logic. * contrib/gtwvg/wvgutils.c ! Reverted some wrong fixes from previous commit. --- harbour/ChangeLog | 17 +++++++++++++++++ harbour/contrib/gtwvg/wvgutils.c | 14 +++++++------- harbour/contrib/hbfbird/firebird.c | 6 +----- harbour/include/hbdefs.h | 2 +- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c6d5ba6874..33583e4004 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,23 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-08-07 09:10 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * include/hbdefs.h + ! Changed HB_SYMBOL_UNUSED() to better work for all + compilers, notably Pelles C. + ! Fix to PFLL, although it didn't fix all GCC 4.3.1 warnings. + These remained: + ../../genc.c:1582: warning: unknown conversion type character 'l' in format + ../../genc.c:1582: warning: too many arguments for format + [ This changed got merged with existing commit. ] + ; Thanks to Przemek for these patches. + + * contrib/hbfbird/firebird.c + % Using PFLL instead of local logic. + + * contrib/gtwvg/wvgutils.c + ! Reverted some wrong fixes from previous commit. + 2008-08-06 22:30 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/source/rtl/achoice.prg + Implemented mouse operations as follows. diff --git a/harbour/contrib/gtwvg/wvgutils.c b/harbour/contrib/gtwvg/wvgutils.c index 9c4722b077..219ac9f3f6 100644 --- a/harbour/contrib/gtwvg/wvgutils.c +++ b/harbour/contrib/gtwvg/wvgutils.c @@ -1504,14 +1504,14 @@ HB_FUNC( WIN_GETSTOCKOBJECT ) HB_FUNC( WIN_DELETEOBJECT ) { - hb_retl( DeleteObject( ( HGDIOBJ ) hb_parnint( 1 ) ) ); + hb_retl( DeleteObject( ( HGDIOBJ ) hb_parnl( 1 ) ) ); } //-------------------------------------------------------------------// HB_FUNC( WIN_SELECTOBJECT ) { - hb_retnint( ( LONG_PTR ) SelectObject( ( HDC ) hb_parnint( 1 ), ( HGDIOBJ ) hb_parnint( 2 ) ) ); + hb_retnint( ( LONG_PTR ) SelectObject( ( HDC ) hb_parnl( 1 ), ( HGDIOBJ ) hb_parnl( 2 ) ) ); } //-------------------------------------------------------------------// @@ -1610,7 +1610,7 @@ HB_FUNC( WIN_CHECKRADIOBUTTON ) HB_FUNC( WIN_GETDLGITEM ) { - hb_retnint( ( LONG_PTR ) GetDlgItem( ( HWND ) hb_parnint( 1 ), hb_parni( 2 ) ) ); + hb_retnint( ( LONG_PTR ) GetDlgItem( ( HWND ) hb_parnl( 1 ), hb_parni( 2 ) ) ); } //-------------------------------------------------------------------// @@ -1620,7 +1620,7 @@ HB_FUNC( WIN_MESSAGEBOX ) LPTSTR lpBuffer = HB_TCHAR_CONVTO( hb_parc( 2 ) ); LPTSTR lpBuffer2 = HB_TCHAR_CONVTO( hb_parc( 3 ) ); - hb_retni( MessageBox( ( HWND ) hb_parnint( 1 ), lpBuffer, lpBuffer2, ISNIL( 4 ) ? MB_OK : hb_parni( 4 ) ) ) ; + hb_retni( MessageBox( ( HWND ) hb_parnl( 1 ), lpBuffer, lpBuffer2, ISNIL( 4 ) ? MB_OK : hb_parni( 4 ) ) ) ; HB_TCHAR_FREE( lpBuffer ); HB_TCHAR_FREE( lpBuffer2 ); @@ -1773,7 +1773,7 @@ HB_FUNC( WIN_GETWINDOWRECT ) RECT rc; PHB_ITEM info = hb_itemArrayNew( 4 ); - GetWindowRect( ( HWND ) hb_parnint( 1 ), &rc ); + GetWindowRect( ( HWND ) hb_parnl( 1 ), &rc ); hb_arraySetNI( info, 1, rc.left ); hb_arraySetNI( info, 2, rc.top ); @@ -1794,14 +1794,14 @@ HB_FUNC( WIN_MOVEWINDOW ) HB_FUNC( WIN_SETPARENT ) { - hb_retnint( ( LONG_PTR ) SetParent( (HWND) hb_parnint( 1 ), (HWND) hb_parnint( 2 ) ) ); + hb_retnint( ( LONG_PTR ) SetParent( (HWND) hb_parnl( 1 ), (HWND) hb_parnl( 2 ) ) ); } //-------------------------------------------------------------------// HB_FUNC( WIN_SETWINDOWLONG ) { - hb_retnl( SetWindowLong( ( HWND ) hb_parnint( 1 ), hb_parni( 2 ), hb_parnl( 3 ) ) ); + hb_retnl( SetWindowLong( ( HWND ) hb_parnl( 1 ), hb_parni( 2 ), hb_parnl( 3 ) ) ); } //-------------------------------------------------------------------// diff --git a/harbour/contrib/hbfbird/firebird.c b/harbour/contrib/hbfbird/firebird.c index 144ee2efa7..518158dd7b 100644 --- a/harbour/contrib/hbfbird/firebird.c +++ b/harbour/contrib/hbfbird/firebird.c @@ -70,11 +70,7 @@ #define ERREXIT( status ) { hb_retnl( isc_sqlcode( status ) ); return; } #ifndef ISC_INT64_FORMAT - #if (defined(_MSC_VER) && defined(WIN32)) || (defined(__BORLANDC__) && defined(__WIN32__)) - #define ISC_INT64_FORMAT "I64" - #else - #define ISC_INT64_FORMAT "ll" - #endif + #define ISC_INT64_FORMAT PFLL #endif HB_FUNC( FBCREATEDB ) diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index 71d9113a3d..003d5cd4d1 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -1139,7 +1139,7 @@ typedef unsigned long HB_COUNTER; #define HB_MACRO2STRING( macro ) HB_MACRO2STRING_( macro ) #define HB_MACRO2STRING_( macro ) #macro -#define HB_SYMBOL_UNUSED( symbol ) ( void ) symbol +#define HB_SYMBOL_UNUSED( symbol ) do if( symbol ) {;} while( 0 ) /* *********************************************************************** * The name of starting procedure