From a403aeb9f530224612176dd950ab2a111165d7d6 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 23 Feb 2009 15:43:05 +0000 Subject: [PATCH] 2009-02-23 16:40 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * bin/hb-mkdll.bat - Removed no longer relevant NOTE. BCC tlib can actually handle dots in pathname if put between quotes, which is how it is. * contrib/gtwvg/gtwvg.h * contrib/gtwvg/wvggui.h ! Applied former owatcom fix to GTWVG, too. Please retry, I didn't test it. ! Converted failing declarations to use HB_ID_REF(). ! Applied more casting fixes shown by owatcom 1.8. ; Remaining errors and warnings posted on the list. --- harbour/ChangeLog | 15 +++++++++++++++ harbour/bin/hb-mkdll.bat | 6 ++---- harbour/contrib/gtwvg/gtwvg.h | 2 +- harbour/contrib/gtwvg/wvggui.h | 2 +- harbour/contrib/gtwvg/wvgutils.c | 4 ++-- harbour/contrib/gtwvg/wvgwin.c | 18 ++++++++---------- 6 files changed, 29 insertions(+), 18 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 40aba5616e..03bb3659ff 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,21 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-02-23 16:40 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * bin/hb-mkdll.bat + - Removed no longer relevant NOTE. BCC tlib can actually + handle dots in pathname if put between quotes, which + is how it is. + + * contrib/gtwvg/gtwvg.h + * contrib/gtwvg/wvggui.h + ! Applied former owatcom fix to GTWVG, too. Please retry, + I didn't test it. + ! Converted failing declarations to use HB_ID_REF(). + ! Applied more casting fixes shown by owatcom 1.8. + + ; Remaining errors and warnings posted on the list. + 2009-02-23 15:14 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * bin/postinst.bat ! Protected command from pre-NT systems. diff --git a/harbour/bin/hb-mkdll.bat b/harbour/bin/hb-mkdll.bat index ff7af98b98..c930ca4d0f 100644 --- a/harbour/bin/hb-mkdll.bat +++ b/harbour/bin/hb-mkdll.bat @@ -9,10 +9,8 @@ rem Copyright 2009 Viktor Szakats (harbour.01 syenar.hu) rem See doc/license.txt for licensing terms. rem --------------------------------------------------------------- -rem NOTE: .prg files have to be built with -n1 -rem NOTE: .c files have to be built with -DHB_DYNLIB -rem NOTE: Borland tlib doesn't work if the source library path -rem contains '.' char. (as of version 5.8.2) +rem NOTE: .prg files have to be compiled with -n1 +rem NOTE: .c files have to be compiled with -DHB_DYNLIB if not "%OS%" == "Windows_NT" ( echo This script needs Windows NT or newer. && goto END ) if "%HB_ARCHITECTURE%" == "" ( echo HB_ARCHITECTURE needs to be set. && goto END ) diff --git a/harbour/contrib/gtwvg/gtwvg.h b/harbour/contrib/gtwvg/gtwvg.h index 4ded8c6be5..1237851d42 100644 --- a/harbour/contrib/gtwvg/gtwvg.h +++ b/harbour/contrib/gtwvg/gtwvg.h @@ -206,7 +206,7 @@ HB_EXTERN_BEGIN #endif -#if defined( __cplusplus ) && ( defined( __BORLANDC__ ) || defined( _MSC_VER ) ) +#if defined( __cplusplus ) && ( defined( __BORLANDC__ ) || defined( _MSC_VER ) || ( defined(__WATCOMC__) && ( __WATCOMC__ >= 1280 ) ) ) # define HB_ID_REF( type, id ) id #else # define HB_ID_REF( type, id ) ( ( type ) &id ) diff --git a/harbour/contrib/gtwvg/wvggui.h b/harbour/contrib/gtwvg/wvggui.h index 5d0e2392ba..1687aec8ab 100644 --- a/harbour/contrib/gtwvg/wvggui.h +++ b/harbour/contrib/gtwvg/wvggui.h @@ -206,7 +206,7 @@ HB_EXTERN_BEGIN #endif -#if defined( __cplusplus ) && ( defined( __BORLANDC__ ) || defined( _MSC_VER ) ) +#if defined( __cplusplus ) && ( defined( __BORLANDC__ ) || defined( _MSC_VER ) || ( defined(__WATCOMC__) && ( __WATCOMC__ >= 1280 ) ) ) # define HB_ID_REF( type, id ) id #else # define HB_ID_REF( type, id ) ( ( type ) &id ) diff --git a/harbour/contrib/gtwvg/wvgutils.c b/harbour/contrib/gtwvg/wvgutils.c index 44a8a50687..83c835f745 100644 --- a/harbour/contrib/gtwvg/wvgutils.c +++ b/harbour/contrib/gtwvg/wvgutils.c @@ -102,13 +102,13 @@ extern void wvt_Size2ArrayEx( SIZE *siz ,PHB_ITEM aSize ); HB_EXTERN_END #endif -static HANDLE wvg_hInstance( void ) +static HINSTANCE wvg_hInstance( void ) { HANDLE hInstance; hb_winmainArgGet( &hInstance, NULL, NULL ); - return hInstance; + return ( HINSTANCE ) hInstance; } //-------------------------------------------------------------------// diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index 7fed00f1ac..a09cb566ee 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -104,13 +104,13 @@ //----------------------------------------------------------------------// -static HANDLE wvg_hInstance( void ) +static HINSTANCE wvg_hInstance( void ) { HANDLE hInstance; hb_winmainArgGet( &hInstance, NULL, NULL ); - return hInstance; + return ( HINSTANCE ) hInstance; } //----------------------------------------------------------------------// @@ -903,7 +903,7 @@ HB_FUNC( WIN_CREATEWINDOWEX ) hb_parni( 7 ), hb_parni( 8 ), ( HWND ) ( HB_PTRDIFF ) hb_parnint( 9 ), ISNIL( 10 ) ? NULL : ( HMENU ) ( HB_PTRDIFF ) hb_parnint( 10 ), - ISNIL( 11 ) ? wvg_hInstance() : ( HINSTANCE ) ( HB_PTRDIFF ) hb_parnint( 11 ), + ISNIL( 11 ) ? ( HINSTANCE ) wvg_hInstance() : ( HINSTANCE ) ( HB_PTRDIFF ) hb_parnint( 11 ), NULL ); HB_TCHAR_FREE( szClassName ); @@ -923,7 +923,7 @@ HB_FUNC( WIN_CREATETOOLBAREX ) hb_parni( 4 ), ISNIL( 5 ) ? NULL : ( HINSTANCE ) ( HB_PTRDIFF ) hb_parnint( 5 ), ISNIL( 6 ) ? 0 : hb_parnint( 6 ), - ISNIL( 7 ) ? NULL : ( HANDLE ) ( HB_PTRDIFF ) hb_parnint( 7 ), + ISNIL( 7 ) ? NULL : ( LPCTBBUTTON ) ( HB_PTRDIFF ) hb_parnint( 7 ), hb_parni( 8 ), hb_parni( 9 ), hb_parni( 10 ), @@ -1197,7 +1197,7 @@ static HBITMAP hPrepareBitmap( char * szBitmapX, UINT uiBitmap, szBitmap = HB_TCHAR_CONVTO( szBitmapX ); hBitmap = ( HBITMAP ) LoadImage( - wvg_hInstance(), + ( HINSTANCE ) wvg_hInstance(), ( LPCTSTR ) szBitmap, IMAGE_BITMAP, iExpWidth, @@ -1218,7 +1218,7 @@ static HBITMAP hPrepareBitmap( char * szBitmapX, UINT uiBitmap, hb_snprintf( szResname, sizeof( szResname ), "?%u", uiBitmap ); hBitmap = ( HBITMAP ) LoadImage( - wvg_hInstance(), + ( HINSTANCE ) wvg_hInstance(), ( LPCTSTR ) MAKEINTRESOURCE( ( WORD ) uiBitmap ), IMAGE_BITMAP, iExpWidth, @@ -1619,7 +1619,7 @@ HB_FUNC( WVG_TREEVIEW_ADDITEM ) TVIS_OVERLAYMASK | TVIS_STATEIMAGEMASK | TVIS_USERMASK ; tvis.item.state = 0; // TVI_BOLD - tvis.hParent = ISNIL( 2 ) ? NULL : wvg_parhandle( 2 ); + tvis.hParent = ISNIL( 2 ) ? NULL : ( HTREEITEM ) wvg_parhandle( 2 ); tvis.item.pszText = text; hb_retnint( ( HB_PTRDIFF ) TreeView_InsertItem( wvg_parhwnd( 1 ), &tvis ) ); @@ -2628,7 +2628,7 @@ HB_FUNC( WVG_REGISTERCLASS_BYNAME ) memset( &wndclass, 0, sizeof( WNDCLASS ) ); wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS; wndclass.lpfnWndProc = DefWindowProc; - wndclass.hInstance = wvg_hInstance(); + wndclass.hInstance = ( HINSTANCE ) wvg_hInstance(); wndclass.hIcon = NULL; wndclass.hCursor = LoadCursor( NULL, IDC_ARROW ); wndclass.hbrBackground = NULL; @@ -2927,5 +2927,3 @@ HB_FUNC( WVG_RELEASEWINDOWPROCBLOCK ) } /*----------------------------------------------------------------------*/ - -