2014-12-29 20:27 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbznet.h
* src/rtl/hbinet.c
* src/rtl/hbinetz.c
* moved HB_INET_ERR_* macros to header file
+ added error and errorStr functions to hb_inet*() socket read/write
wrappers
! call close function of hb_inet*() socket read/write wrappers before
closing the socket
+ added hb_znetInetFD() C function
* src/rtl/teditor.prg
! use hb_ATokens( <cText>, .T. ) and MemoLine() to divide text into lines
to improve performance and fix TABs decoding
* src/rtl/memoedit.prg
* src/rtl/teditor.prg
* applied recent fixes and cleanups from Viktor's branch.
* src/rtl/tgetlist.prg
* applied recent fixes from Viktor's branch:
; (2014-12-19 01:00 UTC+0100 Viktor Szakats)
! HBGetList():GUIApplyKey(): fixed bug introduced with UNICODE
support in 93d3a46d84 (upstream).
That patch had an undocumented workaround for the problem inside
ListBox():findText(), which was not Cl*pper compatible, so
it was later removed in 6f8508ff54a3955822b36bf4a65a2775a11bab23.
This patch hopefully fixes the root cause.
Reported here: https://groups.google.com/d/msg/harbour-devel/7Cpax5TdHnY/n5XfXX8N9vMJ
This commit is contained in:
@@ -53,6 +53,12 @@
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
#define HB_INET_ERR_OK 0
|
||||
#define HB_INET_ERR_TIMEOUT ( -1 )
|
||||
#define HB_INET_ERR_CLOSEDCONN ( -2 )
|
||||
#define HB_INET_ERR_BUFFOVERRUN ( -3 )
|
||||
#define HB_INET_ERR_CLOSEDSOCKET ( -4 )
|
||||
|
||||
#if defined( _HB_ZNET_INTERNAL_ )
|
||||
struct _HB_ZNETSTREAM;
|
||||
typedef struct _HB_ZNETSTREAM * PHB_ZNETSTREAM;
|
||||
@@ -60,10 +66,12 @@ HB_EXTERN_BEGIN
|
||||
typedef void * PHB_ZNETSTREAM;
|
||||
#endif
|
||||
|
||||
typedef long ( * HB_INET_SFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, const void *, long, HB_MAXINT, long * );
|
||||
typedef long ( * HB_INET_RFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, void *, long, HB_MAXINT );
|
||||
typedef long ( * HB_INET_FFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, HB_MAXINT );
|
||||
typedef void ( * HB_INET_CFUNC ) ( PHB_ZNETSTREAM );
|
||||
typedef long ( * HB_INET_RDFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, void *, long, HB_MAXINT );
|
||||
typedef long ( * HB_INET_WRFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, const void *, long, HB_MAXINT, long * );
|
||||
typedef long ( * HB_INET_FLFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, HB_MAXINT );
|
||||
typedef void ( * HB_INET_CLFUNC ) ( PHB_ZNETSTREAM );
|
||||
typedef int ( * HB_INET_ERFUNC ) ( PHB_ZNETSTREAM );
|
||||
typedef const char * ( * HB_INET_ESFUNC ) ( PHB_ZNETSTREAM, int );
|
||||
|
||||
extern HB_EXPORT PHB_ZNETSTREAM hb_znetOpen( int level, int strategy );
|
||||
extern HB_EXPORT void hb_znetEncryptKey( PHB_ZNETSTREAM pStream, const void * keydata, int keylen );
|
||||
@@ -73,11 +81,14 @@ extern HB_EXPORT long hb_znetRead( PHB_ZNETSTREAM pStream, HB_SOCKET sd, void
|
||||
extern HB_EXPORT long hb_znetFlush( PHB_ZNETSTREAM pStream, HB_SOCKET sd, HB_MAXINT timeout );
|
||||
extern HB_EXPORT long hb_znetWrite( PHB_ZNETSTREAM pStream, HB_SOCKET sd, const void * buffer, long len, HB_MAXINT timeout, long * plast );
|
||||
|
||||
extern HB_EXPORT HB_SOCKET hb_znetInetFD( PHB_ITEM pItem, HB_BOOL fError );
|
||||
extern HB_EXPORT HB_BOOL hb_znetInetInitialize( PHB_ITEM, PHB_ZNETSTREAM,
|
||||
HB_INET_RFUNC,
|
||||
HB_INET_SFUNC,
|
||||
HB_INET_FFUNC,
|
||||
HB_INET_CFUNC );
|
||||
HB_INET_RDFUNC,
|
||||
HB_INET_WRFUNC,
|
||||
HB_INET_FLFUNC,
|
||||
HB_INET_CLFUNC,
|
||||
HB_INET_ERFUNC,
|
||||
HB_INET_ESFUNC );
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
|
||||
Reference in New Issue
Block a user