From 18da88d69232b5c13cb2eb7ae4e690e58d239f31 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Jul 2015 11:14:35 +0000 Subject: - warning fixes; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@14719 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_modernopt.h | 9 +++++---- include/m_ssl.h | 32 ++++++++++++++++++++------------ 2 files changed, 25 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/m_modernopt.h b/include/m_modernopt.h index 937c72d434..d559bc6415 100644 --- a/include/m_modernopt.h +++ b/include/m_modernopt.h @@ -45,7 +45,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MODEROPT_FLG_TCHAR 0 #endif -typedef enum { +enum { MODERNOPT_TYPE_SECTIONPAGE, MODERNOPT_TYPE_SUBSECTIONPAGE, MODERNOPT_TYPE_IGNOREOBJECT, @@ -53,7 +53,7 @@ typedef enum { MODERNOPT_TYPE_COUNT }; -typedef enum { +enum { MODERNOPT_PAGE_HOME, MODERNOPT_PAGE_ACCOUNTS, MODERNOPT_PAGE_SKINS, @@ -68,7 +68,8 @@ typedef enum { #define MODERNOPT_CTRL_LAST 0 -typedef struct { +struct MODERNOPTOBJECT +{ int cbSize; DWORD dwFlags; int iType; @@ -101,7 +102,7 @@ typedef struct { // Selector type page char *lpzThemeExtension; char *lpzThemeModuleName; -} MODERNOPTOBJECT; +}; #define MS_MODERNOPT_ADDOBJECT "ModernOpt/AddObject" diff --git a/include/m_ssl.h b/include/m_ssl.h index 9103df4a10..eb177b4ef2 100644 --- a/include/m_ssl.h +++ b/include/m_ssl.h @@ -27,20 +27,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include -DECLARE_HANDLE(HSSL); - -typedef struct +#if !defined(HSSL_DEFINED) + DECLARE_HANDLE(HSSL); +#endif + +typedef HSSL (__cdecl *pfnConnect)(SOCKET s, const char* host, int verify); +typedef BOOL (__cdecl *pfnPending)(HSSL ssl); +typedef int (__cdecl *pfnRead)(HSSL ssl, char *buf, int num, int peek); +typedef int (__cdecl *pfnWrite)(HSSL ssl, const char *buf, int num); +typedef void (__cdecl *pfnShutdown)(HSSL ssl); +typedef void (__cdecl *pfnSfree)(HSSL ssl); + +struct SSL_API { int cbSize; - HSSL ( *connect ) ( SOCKET s, const char* host, int verify ); - BOOL ( *pending ) ( HSSL ssl ); - int ( *read ) ( HSSL ssl, char *buf, int num, int peek ); - int ( *write ) ( HSSL ssl, const char *buf, int num ); - void ( *shutdown )( HSSL ssl ); - void ( *sfree ) ( HSSL ssl ); -} - SSL_API; + pfnConnect connect; + pfnPending pending; + pfnRead read; + pfnWrite write; + pfnShutdown shutdown; + pfnSfree sfree; +}; /* every protocol should declare this variable to use the SSL API */ extern SSL_API si; @@ -56,7 +64,7 @@ returns TRUE if all is Ok, and FALSE otherwise #define MS_SYSTEM_GET_SI "Miranda/System/GetSslApi" -__forceinline INT_PTR mir_getSI( SSL_API* dest ) +__forceinline INT_PTR mir_getSI(SSL_API* dest) { dest->cbSize = sizeof(*dest); return CallService(MS_SYSTEM_GET_SI, 0, (LPARAM)dest); -- cgit v1.2.3