diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9938310a8a..e16dc1367c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,21 @@ past entries belonging to these authors: Viktor Szakats. */ +2009-05-22 12:07 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/debug/debugger.prg + * minor simplification + + * harbour/contrib/rddsql/sddodbc/odbcdd.c + ! added dummy unicode conversion macros to fix compilation in + non windows builds + + * harbour/contrib/hbwin/olecore.c + ! casting + + * harbour/contrib/hbwin/axcore.c + ! fixed unicode and WinCE compilation + ! casting + 2009-05-22 10:21 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * contrib/rddsql/sddodbc/odbcdd.c ! Added UNICODE support to the extent it compiles. Please diff --git a/harbour/contrib/hbwin/axcore.c b/harbour/contrib/hbwin/axcore.c index e9afbb778b..05af592fe8 100644 --- a/harbour/contrib/hbwin/axcore.c +++ b/harbour/contrib/hbwin/axcore.c @@ -53,10 +53,20 @@ #include "hbwinole.h" +#if defined( HB_OS_WIN_CE ) + #define HBTEXT( x ) TEXT( x ) +#else + #define HBTEXT( x ) x +#endif + +typedef BOOL ( CALLBACK * PHB_AX_WININIT )( void ); +typedef BOOL ( CALLBACK * PHB_AX_WINTERM )( void ); +typedef HRESULT ( CALLBACK * PHB_AX_GETCTRL )( HWND, IUnknown** ); + static HMODULE s_hLib = NULL; -static BOOL ( CALLBACK *s_pAtlAxWinTerm )( void ); -static HRESULT ( CALLBACK *s_pAtlAxGetControl )( HWND, IUnknown** ); +static PHB_AX_WINTERM s_pAtlAxWinTerm = NULL; +static PHB_AX_GETCTRL s_pAtlAxGetControl = NULL; static void hb_ax_exit( void* cargo ) @@ -78,20 +88,19 @@ static void hb_ax_exit( void* cargo ) static int hb_ax_init( void ) { - BOOL ( CALLBACK *pAtlAxWinInit )( void ); + PHB_AX_WININIT pAtlAxWinInit; if( s_hLib == NULL ) { - s_hLib = LoadLibrary( "atl.dll" ); + s_hLib = LoadLibrary( TEXT( "atl.dll" ) ); if( ( unsigned long ) s_hLib <= 32 ) { s_hLib = NULL; return 0; } - pAtlAxWinInit = GetProcAddress( s_hLib, "AtlAxWinInit" ); - s_pAtlAxWinTerm = GetProcAddress( s_hLib, "AtlAxWinTerm" ); - s_pAtlAxGetControl = GetProcAddress( s_hLib, "AtlAxGetControl" ); - + pAtlAxWinInit = ( PHB_AX_WININIT ) GetProcAddress( s_hLib, HBTEXT( "AtlAxWinInit" ) ); + s_pAtlAxWinTerm = ( PHB_AX_WINTERM ) GetProcAddress( s_hLib, HBTEXT( "AtlAxWinTerm" ) ); + s_pAtlAxGetControl = ( PHB_AX_GETCTRL ) GetProcAddress( s_hLib, HBTEXT( "AtlAxGetControl" ) ); if( pAtlAxWinInit ) ( *pAtlAxWinInit )(); @@ -319,10 +328,10 @@ HB_FUNC( __AXREGISTERHANDLER ) /* ( pDisp, bHandler ) --> pSink */ if( lOleError == S_OK ) { pSink = ( ISink* ) hb_gcAlloc( sizeof( ISink ), hb_sink_destructor ); /* TODO: GlobalAlloc GMEM_FIXED ??? */ - pSink->lpVtbl = &ISink_Vtbl; + pSink->lpVtbl = ( IDispatchVtbl * ) &ISink_Vtbl; pSink->count = 2; /* 1 for pCP->Advice() param and 1 for Harbour collectible pointer [Mindaugas] */ pSink->pItemHandler = hb_itemNew( pItemBlock ); - + #if HB_OLE_C_API lOleError = pCP->lpVtbl->Advise( pCP, ( IUnknown* ) pSink, &dwCookie ); #else @@ -330,7 +339,7 @@ HB_FUNC( __AXREGISTERHANDLER ) /* ( pDisp, bHandler ) --> pSink */ #endif pSink->pConnectionPoint = pCP; pSink->dwCookie = dwCookie; - + hb_retptrGC( pSink ); } #if HB_OLE_C_API diff --git a/harbour/contrib/hbwin/olecore.c b/harbour/contrib/hbwin/olecore.c index 7802c61ec5..52de43d56c 100644 --- a/harbour/contrib/hbwin/olecore.c +++ b/harbour/contrib/hbwin/olecore.c @@ -733,7 +733,7 @@ HB_FUNC( WIN_OLEERRORTEXT ) { char buf[ 16 ]; - hb_snprintf( buf, 16, "0x%08x", lOleError ); + hb_snprintf( buf, 16, "0x%08x", ( UINT ) ( HB_PTRUINT ) lOleError ); hb_retc( buf ); } } diff --git a/harbour/contrib/rddsql/sddodbc/odbcdd.c b/harbour/contrib/rddsql/sddodbc/odbcdd.c index 064bf77562..b363018e65 100644 --- a/harbour/contrib/rddsql/sddodbc/odbcdd.c +++ b/harbour/contrib/rddsql/sddodbc/odbcdd.c @@ -60,6 +60,11 @@ #include #include +#if !defined( HB_OS_WIN ) +# define HB_TCHAR_CONVTO( s ) ( ( char * ) ( s ) ) +# define HB_TCHAR_FREE( s ) HB_SYMBOL_UNUSED( s ) +#endif + static HB_ERRCODE odbcConnect( SQLDDCONNECTION* pConnection, PHB_ITEM pItem ); static HB_ERRCODE odbcDisconnect( SQLDDCONNECTION* pConnection ); static HB_ERRCODE odbcExecute( SQLDDCONNECTION* pConnection, PHB_ITEM pItem ); diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index cc9bd97998..fccc959ee3 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -1722,7 +1722,7 @@ METHOD LoadVars() CLASS HBDebugger // updates monitored variables FOR n := nCount TO 1 STEP -1 xValue := __mvDbgInfo( HB_MV_PRIVATE, n, @cName ) IF ! cName $ hSkip - AAdd( aBVars, { cName, xValue, "Private" + iif( m > 0, "", "^" ) } ) + AAdd( aBVars, { cName, xValue, iif( m > 0, "Private", "Private^" ) } ) hSkip[ cName ] := NIL ENDIF --m