From c82626bc3d263f09642c4fc4de8001ebc2931e02 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Thu, 26 Jun 2008 09:47:58 +0000 Subject: [PATCH] 2008-06-26 11:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbmsql/msql.c ! changed msqlGetErrMsg( NULL ) => msqlErrMsg * harbour/contrib/hbsqlit3/hbsqlit3.c ! include harbour header files after sqlite3.c which needs some extra sets for system header files * harbour/contrib/hbgf/hbgfw32/win32.c ! removed wrongly used TEXT( hb_parc( 1 ) ) macro. The TEXT() macro can be used _ONLY_ for literal strings. * harbour/contrib/hbgf/hbgfgtk/Makefile * harbour/contrib/hbgf/hbgfgtk/dispatch.c * harbour/contrib/hbgf/hbgfgtk/msginfo.c * harbour/contrib/hbgf/hbgfgtk/form.prg * harbour/contrib/hbgf/hbgfgtk/creawin.c ! fixed compilation in Linux * harbour/source/rtl/gtclip.c * pacified warning --- harbour/ChangeLog | 22 +++++++++++ harbour/contrib/hbgf/hbgfgtk/Makefile | 3 ++ harbour/contrib/hbgf/hbgfgtk/creawin.c | 4 +- harbour/contrib/hbgf/hbgfgtk/dispatch.c | 2 +- harbour/contrib/hbgf/hbgfgtk/form.prg | 12 ++++++ harbour/contrib/hbgf/hbgfgtk/msginfo.c | 2 + harbour/contrib/hbgf/hbgfw32/win32.c | 2 +- harbour/contrib/hbmsql/msql.c | 2 +- harbour/contrib/hbsqlit3/hbsqlit3.c | 14 +++---- harbour/source/rtl/gtclip.c | 49 ++++++++++++------------- 10 files changed, 76 insertions(+), 36 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e132c4c24b..6d7a648022 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,28 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-06-26 11:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbmsql/msql.c + ! changed msqlGetErrMsg( NULL ) => msqlErrMsg + + * harbour/contrib/hbsqlit3/hbsqlit3.c + ! include harbour header files after sqlite3.c which needs some + extra sets for system header files + + * harbour/contrib/hbgf/hbgfw32/win32.c + ! removed wrongly used TEXT( hb_parc( 1 ) ) macro. The TEXT() + macro can be used _ONLY_ for literal strings. + + * harbour/contrib/hbgf/hbgfgtk/Makefile + * harbour/contrib/hbgf/hbgfgtk/dispatch.c + * harbour/contrib/hbgf/hbgfgtk/msginfo.c + * harbour/contrib/hbgf/hbgfgtk/form.prg + * harbour/contrib/hbgf/hbgfgtk/creawin.c + ! fixed compilation in Linux + + * harbour/source/rtl/gtclip.c + * pacified warning + 2008-06-26 11:21 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/common/hbver.c * Changed version information layout: diff --git a/harbour/contrib/hbgf/hbgfgtk/Makefile b/harbour/contrib/hbgf/hbgfgtk/Makefile index 0555f7391f..96962040ae 100644 --- a/harbour/contrib/hbgf/hbgfgtk/Makefile +++ b/harbour/contrib/hbgf/hbgfgtk/Makefile @@ -24,6 +24,9 @@ PRG_SOURCES=\ LIBNAME=hbgfgtk +C_USR += `pkg-config --cflags gtk+-2.0` + + include $(TOP)$(ROOT)config/lib.cf endif diff --git a/harbour/contrib/hbgf/hbgfgtk/creawin.c b/harbour/contrib/hbgf/hbgfgtk/creawin.c index a0875586fe..df49e6ccec 100644 --- a/harbour/contrib/hbgf/hbgfgtk/creawin.c +++ b/harbour/contrib/hbgf/hbgfgtk/creawin.c @@ -62,7 +62,9 @@ static gint DeleteEventWindowCallback( GtkWidget *Widget, GdkEventAny *Event, gpointer Data ) { - return( CallHarbour( Widget, Widget, HGF_EV_CLOSE, GPOINTER_TO_INT( Data ), ( PHB_ITEM )NULL ) ); + HB_SYMBOL_UNUSED( Event ); + + return( CallHarbour( Widget, Widget, HGF_EV_CLOSE, GPOINTER_TO_INT( Data ), ( PHB_ITEM ) NULL ) ); } /* ********************************************************************* */ diff --git a/harbour/contrib/hbgf/hbgfgtk/dispatch.c b/harbour/contrib/hbgf/hbgfgtk/dispatch.c index 040b5fad67..0023e7b450 100644 --- a/harbour/contrib/hbgf/hbgfgtk/dispatch.c +++ b/harbour/contrib/hbgf/hbgfgtk/dispatch.c @@ -66,7 +66,7 @@ glong CallHarbour( GtkWidget *hWnd, GtkWidget *Widget, glong Command, gint ObjId if( pDynSym ) { - hb_vmPushSymbol( pDynSym->pSymbol ); + hb_vmPushDynSym( pDynSym ); hb_vmPushNil(); hb_vmPushLong( GPOINTER_TO_UINT( hWnd ) ); hb_vmPushLong( GPOINTER_TO_UINT( Widget ) ); diff --git a/harbour/contrib/hbgf/hbgfgtk/form.prg b/harbour/contrib/hbgf/hbgfgtk/form.prg index c54b9b37e4..3f8b099268 100644 --- a/harbour/contrib/hbgf/hbgfgtk/form.prg +++ b/harbour/contrib/hbgf/hbgfgtk/form.prg @@ -111,6 +111,9 @@ RETURN Self METHOD Command( nCmd, nID, aEventData ) CLASS HBForm LOCAL oMenuItem + HB_SYMBOL_UNUSED( nCmd ) + HB_SYMBOL_UNUSED( aEventData ) + IF ::Menu != nil IF ( oMenuItem := ::Menu:FindItem( nId ) ) != nil IF oMenuItem:OnClick != nil @@ -125,6 +128,9 @@ RETURN nil METHOD CtrlCommand( nCmd, nID, aEventData ) CLASS HBForm LOCAL nAt, oControl + HB_SYMBOL_UNUSED( nCmd ) + HB_SYMBOL_UNUSED( aEventData ) + IF ( nAt := AScan( ::aControls, { | o | o:nID == nID } ) ) != 0 oControl := ::aControls[ nAt ] IF oControl:OnClick != nil @@ -137,6 +143,10 @@ RETURN 1 /* ********************************************************************* */ METHOD LButtonDown( nCmd, nID, aEventData ) CLASS HBForm + + HB_SYMBOL_UNUSED( nCmd ) + HB_SYMBOL_UNUSED( nID ) + IF ::OnClick != nil /* NOTE: aEventData[ 1 ] conatins mouse y position */ /* aEventData[ 2 ] conatins mouse x position */ @@ -203,6 +213,8 @@ FUNCTION HB_GUI( hWnd, Widget, nCmd, nID, aEventData ) LOCAL aReturn := 0 LOCAL nForm := AScan( aForms, { | oForm | oForm:hWnd[ 1 ] == hWnd } ) + HB_SYMBOL_UNUSED( Widget ) + IF nForm != 0 aReturn := aForms[ nForm ]:HandleEvent( nCmd, nID, aEventData ) ENDIF diff --git a/harbour/contrib/hbgf/hbgfgtk/msginfo.c b/harbour/contrib/hbgf/hbgfgtk/msginfo.c index acdbf7b15b..6c75956136 100644 --- a/harbour/contrib/hbgf/hbgfgtk/msginfo.c +++ b/harbour/contrib/hbgf/hbgfgtk/msginfo.c @@ -62,6 +62,8 @@ static void GtkMsgInfoCallback( GtkWidget *Widget, gpointer Data ) { + HB_SYMBOL_UNUSED( Widget ); + if( GTK_IS_WIDGET( ( GtkWidget * ) Data ) ) gtk_widget_destroy( ( GtkWidget * ) Data ); diff --git a/harbour/contrib/hbgf/hbgfw32/win32.c b/harbour/contrib/hbgf/hbgfw32/win32.c index 4bc4f935a5..9c1df8e540 100644 --- a/harbour/contrib/hbgf/hbgfw32/win32.c +++ b/harbour/contrib/hbgf/hbgfw32/win32.c @@ -63,7 +63,7 @@ HB_FUNC( WINREGISTERCLASS ) { WNDCLASS wndclass ; - wndclass.lpszClassName = TEXT( hb_parc( 1 ) ); + wndclass.lpszClassName = hb_parc( 1 ); wndclass.style = CS_OWNDC | CS_VREDRAW | CS_HREDRAW; // hb_parnl( 2 ); wndclass.cbClsExtra = hb_parnl( 3 ); wndclass.cbWndExtra = 0; diff --git a/harbour/contrib/hbmsql/msql.c b/harbour/contrib/hbmsql/msql.c index e5a65d8f27..2fe1c480f7 100644 --- a/harbour/contrib/hbmsql/msql.c +++ b/harbour/contrib/hbmsql/msql.c @@ -152,7 +152,7 @@ HB_FUNC( MSQLLISTFI ) /* m_result *msqlListFields(int, char *); */ HB_FUNC( MSQLGETERR ) /* char *msqlGetErrMsg(char *); */ { - hb_retc( msqlGetErrMsg( NULL ) ); + hb_retc( msqlErrMsg ); } HB_FUNC( MSQLLISTDB ) /* m_result * msqlListDBs(int); */ diff --git a/harbour/contrib/hbsqlit3/hbsqlit3.c b/harbour/contrib/hbsqlit3/hbsqlit3.c index efbb717c22..3cc0f8f319 100644 --- a/harbour/contrib/hbsqlit3/hbsqlit3.c +++ b/harbour/contrib/hbsqlit3/hbsqlit3.c @@ -20,13 +20,6 @@ * */ -#include "hbvm.h" -#include "hbapi.h" -#include "hbapiitm.h" -#include "hbapierr.h" -#include "hbapifs.h" -#include "hbver.h" - /* TODO?: Formatted String Printing Functions @@ -65,6 +58,13 @@ #pragma warning( default: 4018 4244 ) #endif +#include "hbvm.h" +#include "hbapi.h" +#include "hbapiitm.h" +#include "hbapierr.h" +#include "hbapifs.h" +#include "hbver.h" + #ifdef NODLL extern char * sqlite3_temp_directory; #endif diff --git a/harbour/source/rtl/gtclip.c b/harbour/source/rtl/gtclip.c index 1ab8ba7d29..2d89b46d61 100644 --- a/harbour/source/rtl/gtclip.c +++ b/harbour/source/rtl/gtclip.c @@ -142,32 +142,31 @@ BOOL hb_gt_w32_getClipboard( UINT uFormat, char ** pszClipData, ULONG *pulLen ) { switch( uFormat ) { - case CF_UNICODETEXT: - *pulLen = wcslen( ( LPWSTR ) lptstr ); - if( *pulLen ) - *pszClipData = hb_wctomb( ( LPWSTR ) lptstr ); - break; - case CF_OEMTEXT: - case CF_TEXT: - *pulLen = strlen( lptstr ); - if( *pulLen ) - { - *pszClipData = ( char * ) hb_xgrab( *pulLen + 1 ); - memcpy( *pszClipData, lptstr, *pulLen ); - ( *pszClipData )[ *pulLen ] = '\0'; - } - break; - default: - *pulLen = GlobalSize( hglb ); - if( *pulLen ) - { - *pszClipData = ( char * ) hb_xgrab( *pulLen + 1 ); - memcpy( *pszClipData, lptstr, *pulLen ); - ( *pszClipData )[ *pulLen ] = '\0'; - } - break; + case CF_UNICODETEXT: + *pulLen = wcslen( ( LPWSTR ) lptstr ); + if( *pulLen ) + *pszClipData = hb_wctomb( ( LPWSTR ) lptstr ); + break; + case CF_OEMTEXT: + case CF_TEXT: + *pulLen = strlen( ( char * ) lptstr ); + if( *pulLen ) + { + *pszClipData = ( char * ) hb_xgrab( *pulLen + 1 ); + memcpy( *pszClipData, lptstr, *pulLen ); + ( *pszClipData )[ *pulLen ] = '\0'; + } + break; + default: + *pulLen = GlobalSize( hglb ); + if( *pulLen ) + { + *pszClipData = ( char * ) hb_xgrab( *pulLen + 1 ); + memcpy( *pszClipData, lptstr, *pulLen ); + ( *pszClipData )[ *pulLen ] = '\0'; + } + break; } - GlobalUnlock( hglb ); } }