From 45232282b9b6031b7dbdb0a2865e255338230e11 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Fri, 8 Jan 2010 17:28:54 +0000 Subject: [PATCH] 2010-01-08 18:28 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/dynsym.c + accept also function name (not only symbol index) as parameter of __DYNSISFUN() * harbour/src/rtl/hbznet.c * pacified BCC warnings --- harbour/ChangeLog | 8 ++++++++ harbour/src/rtl/hbznet.c | 4 ++-- harbour/src/vm/dynsym.c | 4 +++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8a3c8f9346..909af22b7d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-08 18:28 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/vm/dynsym.c + + accept also function name (not only symbol index) as parameter + of __DYNSISFUN() + + * harbour/src/rtl/hbznet.c + * pacified BCC warnings + 2010-01-08 14:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbnetio/netiocli.c * pacified BCC warning diff --git a/harbour/src/rtl/hbznet.c b/harbour/src/rtl/hbznet.c index 127c545982..ab3e5ddcfb 100644 --- a/harbour/src/rtl/hbznet.c +++ b/harbour/src/rtl/hbznet.c @@ -244,7 +244,7 @@ long hb_znetRead( PHB_ZNETSTREAM pStream, HB_SOCKET sd, void * buffer, long len, for( l = 0; l < rec; l += 8 ) hb_znetDecrypt( pStream, pStream->rd.next_in + pStream->rd.avail_in + l ); pStream->crypt_in -= rec; - if( rec > pStream->crypt_size ) + if( ( uInt ) rec > pStream->crypt_size ) { pStream->skip_in = rec - pStream->crypt_size; rec = pStream->crypt_size; @@ -283,7 +283,7 @@ static long hb_znetStreamWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_LONG ti UINT16 uiLen = ( UINT16 ) ( size - 2 ); HB_PUT_BE_UINT16( pStream->crypt_out, uiLen ); uiLen = ( UINT16 ) ( ( ( size + 7 ) ^ 0x07 ) & 0x07 ); - if( uiLen > pStream->wr.avail_out ) + if( ( uInt ) uiLen > pStream->wr.avail_out ) { /* it may happen only if encryption was enabled in non empty * buffer and the unencrypted part has not been flushed yet. diff --git a/harbour/src/vm/dynsym.c b/harbour/src/vm/dynsym.c index 31d1a29bdb..eea1a7284f 100644 --- a/harbour/src/vm/dynsym.c +++ b/harbour/src/vm/dynsym.c @@ -638,7 +638,9 @@ HB_FUNC( __DYNSISFUN ) /* returns .t. if a symbol has a function/procedure point given its symbol index */ { HB_STACK_TLS_PRELOAD - PHB_DYNS pDynSym = hb_dynsymGetByIndex( hb_parnl( 1 ) ); + const char * szName = hb_parc( 1 ); + PHB_DYNS pDynSym = szName ? hb_dynsymFindName( szName ) : + hb_dynsymGetByIndex( hb_parnl( 1 ) ); hb_retl( pDynSym && hb_dynsymIsFunction( pDynSym ) ); }