From 0cf77adbaf90cb3cd94a8ac263c5f5b6b77b3d2a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 10 Jul 2009 18:20:49 +0000 Subject: [PATCH] 2009-07-10 20:19 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbxbp/xbpdev.ch + Added SVN ID. * source/rtl/hbinet.c + Added hbU16 casts to silence very old warnings. * source/rtl/gtapiu.c * Tweaked type and constant usage. --- harbour/ChangeLog | 10 ++++++++++ harbour/contrib/hbxbp/xbpdev.ch | 8 +++++--- harbour/source/rtl/gtapiu.c | 28 ++++++++++++++-------------- harbour/source/rtl/hbinet.c | 18 +++++++++--------- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 40b2a712e4..16869420ab 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,16 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-10 20:19 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbxbp/xbpdev.ch + + Added SVN ID. + + * source/rtl/hbinet.c + + Added hbU16 casts to silence very old warnings. + + * source/rtl/gtapiu.c + * Tweaked type and constant usage. + 2009-07-10 18:32 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbgtcore.h * include/hbapigt.h diff --git a/harbour/contrib/hbxbp/xbpdev.ch b/harbour/contrib/hbxbp/xbpdev.ch index 68884e3c9a..b673c2b363 100644 --- a/harbour/contrib/hbxbp/xbpdev.ch +++ b/harbour/contrib/hbxbp/xbpdev.ch @@ -1,5 +1,8 @@ +/* + * $Id$ + */ -#ifndef _XBPDEV_CH +#ifndef _XBPDEV_CH /*----------------------------------------------------------------------*/ @@ -121,6 +124,5 @@ /*----------------------------------------------------------------------*/ -#define _XBPDEV_CH +#define _XBPDEV_CH #endif - diff --git a/harbour/source/rtl/gtapiu.c b/harbour/source/rtl/gtapiu.c index 7e97119fb6..feb259f2f0 100644 --- a/harbour/source/rtl/gtapiu.c +++ b/harbour/source/rtl/gtapiu.c @@ -96,65 +96,65 @@ void hb_gtWPos( HB_GT_WND * wnd, HB_GT_RECT * rect ) HB_SYMBOL_UNUSED( rect ); } -BOOL hb_gtWVis( HB_GT_WND * wnd, USHORT uiStatus ) +BOOL hb_gtWVis( HB_GT_WND * wnd, int iStatus ) /* USHORT in CA-Cl*pper [vszakats] */ { /* TODO: */ HB_SYMBOL_UNUSED( wnd ); - HB_SYMBOL_UNUSED( uiStatus ); + HB_SYMBOL_UNUSED( iStatus ); return FALSE; } -USHORT hb_gtSLR( HB_GT_SLR * pSLR ) /* System Level Request */ +HB_ERRCODE hb_gtSLR( HB_GT_SLR * pSLR ) /* System Level Request */ { /* Do nothing in Harbour, since the low-level GT API is implemented with a different method than in CA-Cl*pper. */ HB_SYMBOL_UNUSED( pSLR ); - return 1; + return HB_FAILURE; } -USHORT hb_gtModalRead( void * dummy ) +HB_ERRCODE hb_gtModalRead( void * dummy ) { /* TODO: */ HB_SYMBOL_UNUSED( dummy ); - return 1; + return HB_FAILURE; } -USHORT hb_gtFlushCursor( void ) +HB_ERRCODE hb_gtFlushCursor( void ) { /* TODO: */ - return 1; + return HB_FAILURE; } -USHORT hb_gtSetColor( HB_GT_RGB * color ) +HB_ERRCODE hb_gtSetColor( HB_GT_RGB * color ) { /* TODO: */ HB_SYMBOL_UNUSED( color ); - return 1; + return HB_FAILURE; } -USHORT hb_gtGetColor( HB_GT_RGB * color ) +HB_ERRCODE hb_gtGetColor( HB_GT_RGB * color ) { /* TODO: */ HB_SYMBOL_UNUSED( color ); - return 1; + return HB_FAILURE; } -USHORT hb_gtSetBorder( HB_GT_RGB * color ) +HB_ERRCODE hb_gtSetBorder( HB_GT_RGB * color ) { /* TODO: */ HB_SYMBOL_UNUSED( color ); - return 1; + return HB_FAILURE; } diff --git a/harbour/source/rtl/hbinet.c b/harbour/source/rtl/hbinet.c index c0807d4b61..1f1f805079 100644 --- a/harbour/source/rtl/hbinet.c +++ b/harbour/source/rtl/hbinet.c @@ -1663,10 +1663,10 @@ HB_FUNC( HB_INETSERVER ) /* Reusable socket; under unix, do not wait it is unused */ setsockopt( Socket->com, SOL_SOCKET, SO_REUSEADDR, ( const char * ) &iOpt, sizeof( iOpt ) ); - iPort = htons( hb_parni( 1 ) ); + iPort = htons( ( hbU16 ) hb_parni( 1 ) ); Socket->remote.sin_family = AF_INET; - Socket->remote.sin_port = iPort; + Socket->remote.sin_port = ( hbU16 ) iPort; szAddress = hb_parc( 2 ); Socket->remote.sin_addr.s_addr = szAddress ? inet_addr( szAddress ) : INADDR_ANY; @@ -1825,10 +1825,10 @@ HB_FUNC( HB_INETCONNECT ) } else { - iPort = htons( hb_parni( 2 ) ); + iPort = htons( ( hbU16 ) hb_parni( 2 ) ); Socket->remote.sin_family = AF_INET; - Socket->remote.sin_port= iPort; + Socket->remote.sin_port = ( hbU16 ) iPort; Socket->remote.sin_addr.s_addr = ( * ( UINT * ) Host->h_addr_list[ 0 ] ); hb_socketConnect( Socket ); @@ -1882,10 +1882,10 @@ HB_FUNC( HB_INETCONNECTIP ) } else { - iPort = htons( iPort ); + iPort = htons( ( hbU16 ) iPort ); Socket->remote.sin_family = AF_INET; - Socket->remote.sin_port = iPort; + Socket->remote.sin_port = ( hbU16 ) iPort; Socket->remote.sin_addr.s_addr = inet_addr( szHost ); hb_socketConnect( Socket ); @@ -1943,10 +1943,10 @@ HB_FUNC( HB_INETDGRAMBIND ) } /* Binding here */ - iPort = htons( iPort ); + iPort = htons( ( hbU16 ) iPort ); Socket->remote.sin_family = AF_INET; - Socket->remote.sin_port = iPort; + Socket->remote.sin_port = ( hbU16 ) iPort; szAddress = hb_parc( 2 ); Socket->remote.sin_addr.s_addr = szAddress ? inet_addr( szAddress ) : INADDR_ANY; @@ -2055,7 +2055,7 @@ HB_FUNC( HB_INETDGRAMSEND ) } Socket->remote.sin_family = AF_INET; - Socket->remote.sin_port = htons( iPort ); + Socket->remote.sin_port = htons( ( hbU16 ) iPort ); Socket->remote.sin_addr.s_addr = inet_addr( szAddress ); szBuffer = hb_itemGetCPtr( pBuffer );