summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/Version.rc97
-rw-r--r--include/delphi/m_zlib.inc148
-rw-r--r--include/m_json.h4
-rw-r--r--libs/libjson/src/stdafx.cxx26
-rw-r--r--protocols/MSN/src/skylogin/crc.h2
-rw-r--r--src/core/stdssl/src/stdafx.h4
-rw-r--r--src/mir_app/src/netlib.cpp80
-rw-r--r--src/mir_app/src/netlib.h4
-rw-r--r--src/mir_app/src/netlibbind.cpp38
-rw-r--r--src/mir_core/src/sha1.cpp8
10 files changed, 206 insertions, 205 deletions
diff --git a/build/Version.rc b/build/Version.rc
index ba8b379216..6938dfd4af 100644
--- a/build/Version.rc
+++ b/build/Version.rc
@@ -1,50 +1,51 @@
-/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
#include "..\..\include\m_version.h"
- #define APSTUDIO_READONLY_SYMBOLS
-#include "afxres.h"
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION __FILEVERSION_STRING
- PRODUCTVERSION MIRANDA_VERSION_COREVERSION
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "000004b0"
- BEGIN
- VALUE "Author", __AUTHOR
- VALUE "FileDescription", __DESCRIPTION
- VALUE "FileVersion", __VERSION_STRING
- VALUE "InternalName", __FILENAME
- VALUE "LegalCopyright", __COPYRIGHT
- VALUE "OriginalFilename", __FILENAME
- VALUE "ProductName", __PLUGIN_NAME
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x0, 1200
- END
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
+
+#define APSTUDIO_READONLY_SYMBOLS
+#include "afxres.h"
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION MIRANDA_VERSION_COREVERSION
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "Author", __AUTHOR
+ VALUE "FileDescription", __DESCRIPTION
+ VALUE "FileVersion", __VERSION_STRING
+ VALUE "InternalName", __FILENAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "ProductName", __PLUGIN_NAME
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
diff --git a/include/delphi/m_zlib.inc b/include/delphi/m_zlib.inc
index 60a3a8b823..44cd9b6ac6 100644
--- a/include/delphi/m_zlib.inc
+++ b/include/delphi/m_zlib.inc
@@ -26,87 +26,87 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
const
ZlibDLL = 'zlib.mir';
- Z_NO_FLUSH = 0;
- Z_PARTIAL_FLUSH = 1;
- Z_SYNC_FLUSH = 2;
- Z_FULL_FLUSH = 3;
- Z_FINISH = 4;
- Z_BLOCK = 5;
- Z_TREES = 6;
-
- Z_OK = 0;
- Z_STREAM_END = 1;
- Z_NEED_DICT = 2;
- Z_ERRNO = -1;
- Z_STREAM_ERROR = -2;
- Z_DATA_ERROR = -3;
- Z_MEM_ERROR = -4;
- Z_BUF_ERROR = -5;
- Z_VERSION_ERROR = -6;
-
- Z_NO_COMPRESSION = 0;
- Z_BEST_SPEED = 1;
- Z_BEST_COMPRESSION = 9;
- Z_DEFAULT_COMPRESSION = -1;
-
- Z_FILTERED = 1;
- Z_HUFFMAN_ONLY = 2;
- Z_RLE = 3;
- Z_FIXED = 4;
- Z_DEFAULT_STRATEGY = 0;
-
- Z_BINARY = 0;
- Z_TEXT = 1;
- Z_ASCII = 1;
- Z_UNKNOWN = 2;
-
- Z_DEFLATED = 8;
+ Z_NO_FLUSH = 0;
+ Z_PARTIAL_FLUSH = 1;
+ Z_SYNC_FLUSH = 2;
+ Z_FULL_FLUSH = 3;
+ Z_FINISH = 4;
+ Z_BLOCK = 5;
+ Z_TREES = 6;
+
+ Z_OK = 0;
+ Z_STREAM_END = 1;
+ Z_NEED_DICT = 2;
+ Z_ERRNO = -1;
+ Z_STREAM_ERROR = -2;
+ Z_DATA_ERROR = -3;
+ Z_MEM_ERROR = -4;
+ Z_BUF_ERROR = -5;
+ Z_VERSION_ERROR = -6;
+
+ Z_NO_COMPRESSION = 0;
+ Z_BEST_SPEED = 1;
+ Z_BEST_COMPRESSION = 9;
+ Z_DEFAULT_COMPRESSION = -1;
+
+ Z_FILTERED = 1;
+ Z_HUFFMAN_ONLY = 2;
+ Z_RLE = 3;
+ Z_FIXED = 4;
+ Z_DEFAULT_STRATEGY = 0;
+
+ Z_BINARY = 0;
+ Z_TEXT = 1;
+ Z_ASCII = 1;
+ Z_UNKNOWN = 2;
+
+ Z_DEFLATED = 8;
type
- alloc_func = function(opaque: pointer; items, size: integer): pointer; cdecl;
- free_func = procedure(opaque, address: pointer); cdecl;
-
- in_func = function(opaque: pointer; var buf: PByte): integer; cdecl;
- out_func = function(opaque: pointer; buf: PByte; size: integer): integer; cdecl;
-
- z_streamp = ^z_stream;
- z_stream = packed record
- next_in: PChar; (* next input byte *)
- avail_in: integer; (* number of bytes available at next_in *)
- total_in: LongInt; (* total nb of input bytes read so far *)
-
- next_out: PChar; (* next output byte should be put there *)
- avail_out: integer; (* remaining free space at next_out *)
- total_out: LongInt; (* total nb of bytes output so far *)
-
- msg: PChar; (* last error message, NULL if no error *)
- state: pointer; (* not visible by applications *)
-
- zalloc: alloc_func; (* used to allocate the internal state *)
- zfree: free_func; (* used to free the internal state *)
- opaque: pointer; (* private data object passed to zalloc and zfree *)
-
- data_type: integer; (* best guess about the data type: ascii or binary *)
- adler: LongInt; (* adler32 value of the uncompressed data *)
- reserved: LongInt; (* reserved for future use *)
- end;
-
-function deflateInit(var strm: z_stream; level: integer): integer; cdecl;
+ alloc_func = function(opaque: pointer; items, size: integer): pointer; cdecl;
+ free_func = procedure(opaque, address: pointer); cdecl;
+
+ in_func = function(opaque: pointer; var buf: PByte): integer; cdecl;
+ out_func = function(opaque: pointer; buf: PByte; size: integer): integer; cdecl;
+
+ z_streamp = ^z_stream;
+ z_stream = packed record
+ next_in: PChar; (* next input byte *)
+ avail_in: integer; (* number of bytes available at next_in *)
+ total_in: LongInt; (* total nb of input bytes read so far *)
+
+ next_out: PChar; (* next output byte should be put there *)
+ avail_out: integer; (* remaining free space at next_out *)
+ total_out: LongInt; (* total nb of bytes output so far *)
+
+ msg: PChar; (* last error message, NULL if no error *)
+ state: pointer; (* not visible by applications *)
+
+ zalloc: alloc_func; (* used to allocate the internal state *)
+ zfree: free_func; (* used to free the internal state *)
+ opaque: pointer; (* private data object passed to zalloc and zfree *)
+
+ data_type: integer; (* best guess about the data type: ascii or binary *)
+ adler: LongInt; (* adler32 value of the uncompressed data *)
+ reserved: LongInt; (* reserved for future use *)
+ end;
+
+function deflateInit(var strm: z_stream; level: integer): integer; cdecl;
external ZlibDLL name 'deflateInit_';
-
-function deflate(var strm: z_stream; flush: integer): integer; cdecl;
+
+function deflate(var strm: z_stream; flush: integer): integer; cdecl;
external ZlibDLL name 'deflate';
-
-function deflateEnd(var strm: z_stream): integer; cdecl;
+
+function deflateEnd(var strm: z_stream): integer; cdecl;
external ZlibDLL name 'deflateEnd';
-
-function inflateInit(var strm: z_stream): integer; cdecl;
+
+function inflateInit(var strm: z_stream): integer; cdecl;
external ZlibDLL name 'inflateInit_';
-
-function inflate(var strm: z_stream; flush: integer): integer; cdecl;
+
+function inflate(var strm: z_stream; flush: integer): integer; cdecl;
external ZlibDLL name 'inflate';
-
-function inflateEnd(var strm: z_stream): integer; cdecl;
+
+function inflateEnd(var strm: z_stream): integer; cdecl;
external ZlibDLL name 'inflateEnd';
{$ENDIF}
diff --git a/include/m_json.h b/include/m_json.h
index 9df72cd305..10ce6779c6 100644
--- a/include/m_json.h
+++ b/include/m_json.h
@@ -164,8 +164,8 @@ LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const INT64_PARAM &param);
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const BOOL_PARAM &param);
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const CHAR_PARAM &param);
LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const WCHAR_PARAM &param);
-LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const NULL_PARAM &param);
-LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const JSON_PARAM &param);
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const NULL_PARAM &param);
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const JSON_PARAM &param);
#endif // __cplusplus
diff --git a/libs/libjson/src/stdafx.cxx b/libs/libjson/src/stdafx.cxx
index 32eb3c894f..bc86a96773 100644
--- a/libs/libjson/src/stdafx.cxx
+++ b/libs/libjson/src/stdafx.cxx
@@ -52,18 +52,18 @@ LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const WCHAR_PARAM &param)
return json;
}
-LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const NULL_PARAM &param)
-{
- JSONNode newOne(JSON_NULL);
- newOne.set_name(param.szName);
- json.push_back(newOne);
- return json;
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const NULL_PARAM &param)
+{
+ JSONNode newOne(JSON_NULL);
+ newOne.set_name(param.szName);
+ json.push_back(newOne);
+ return json;
}
-LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const JSON_PARAM &param)
-{
- JSONNode newOne(param.node);
- newOne.set_name(param.szName);
- json.push_back(newOne);
- return json;
-}
+LIBJSON_DLL(JSONNode&) operator<<(JSONNode &json, const JSON_PARAM &param)
+{
+ JSONNode newOne(param.node);
+ newOne.set_name(param.szName);
+ json.push_back(newOne);
+ return json;
+}
diff --git a/protocols/MSN/src/skylogin/crc.h b/protocols/MSN/src/skylogin/crc.h
index d2964e841b..27b997d314 100644
--- a/protocols/MSN/src/skylogin/crc.h
+++ b/protocols/MSN/src/skylogin/crc.h
@@ -3,4 +3,4 @@
/* This computes a 32 bit CRC of the data in the buffer, and returns the
CRC. The polynomial used is 0xedb88320. */
unsigned int crc32(const unsigned char *buf, unsigned int len, int salt);
-#endif /* CRC_H */
+#endif /* CRC_H */
diff --git a/src/core/stdssl/src/stdafx.h b/src/core/stdssl/src/stdafx.h
index 44b21097ba..e4100742dc 100644
--- a/src/core/stdssl/src/stdafx.h
+++ b/src/core/stdssl/src/stdafx.h
@@ -22,8 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
#define SECURITY_WIN32
-#define HSSL_DEFINED
-
+#define HSSL_DEFINED
+
typedef struct SslHandle *HSSL;
#include <windows.h>
diff --git a/src/mir_app/src/netlib.cpp b/src/mir_app/src/netlib.cpp
index 62cdeb8f9c..6e096cef27 100644
--- a/src/mir_app/src/netlib.cpp
+++ b/src/mir_app/src/netlib.cpp
@@ -215,17 +215,17 @@ MIR_APP_DLL(int) Netlib_GetUserSettings(HNETLIBUSER nlu, NETLIBUSERSETTINGS *nlu
return 1;
}
-MIR_APP_DLL(int) Netlib_GetUserSettingsByName(char * UserSettingsName, NETLIBUSERSETTINGS *nlus)
-{
- mir_cslock lck(csNetlibUser);
- for (auto &it : netlibUser)
- if (!mir_strcmp(it->user.szSettingsModule, UserSettingsName))
- return Netlib_GetUserSettings(it, nlus);
-
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
-}
-
+MIR_APP_DLL(int) Netlib_GetUserSettingsByName(char * UserSettingsName, NETLIBUSERSETTINGS *nlus)
+{
+ mir_cslock lck(csNetlibUser);
+ for (auto &it : netlibUser)
+ if (!mir_strcmp(it->user.szSettingsModule, UserSettingsName))
+ return Netlib_GetUserSettings(it, nlus);
+
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+}
+
MIR_APP_DLL(int) Netlib_SetUserSettings(HNETLIBUSER nlu, const NETLIBUSERSETTINGS *nlus)
{
if (GetNetlibHandleType(nlu) != NLH_USER || nlus == nullptr || nlus->cbSize != sizeof(NETLIBUSERSETTINGS)) {
@@ -237,16 +237,16 @@ MIR_APP_DLL(int) Netlib_SetUserSettings(HNETLIBUSER nlu, const NETLIBUSERSETTING
return 1;
}
-MIR_APP_DLL(int) Netlib_SetUserSettingsByName(char * UserSettingsName, NETLIBUSERSETTINGS *nlus)
-{
- mir_cslock lck(csNetlibUser);
- for (auto &it : netlibUser)
- if (!mir_strcmp(it->user.szSettingsModule, UserSettingsName))
- return Netlib_SetUserSettings(it, nlus);
-
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
-}
+MIR_APP_DLL(int) Netlib_SetUserSettingsByName(char * UserSettingsName, NETLIBUSERSETTINGS *nlus)
+{
+ mir_cslock lck(csNetlibUser);
+ for (auto &it : netlibUser)
+ if (!mir_strcmp(it->user.szSettingsModule, UserSettingsName))
+ return Netlib_SetUserSettings(it, nlus);
+
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -263,23 +263,23 @@ void NetlibDoCloseSocket(NetlibConnection *nlc, bool noShutdown)
}
NETLIBCONNECTIONEVENTINFO ncei;
- ZeroMemory(&ncei, sizeof(ncei));
- ncei.connected = 0;
- ncei.szSettingsModule = nlc->nlu->user.szSettingsModule;
- int size = sizeof(SOCKADDR_IN);
- getsockname(nlc->s, (SOCKADDR *)&ncei.local, &size);
- if (nlc->nlu->settings.useProxy) {
- size = sizeof(SOCKADDR_IN);
- getpeername(nlc->s, (SOCKADDR *)&ncei.proxy, &size);
-
- }
- else {
- size = sizeof(SOCKADDR_IN);
- getpeername(nlc->s, (SOCKADDR *)&ncei.remote, &size);
-
- }
- NotifyFastHook(hEventDisconnected, (WPARAM)&ncei, 0);
-
+ ZeroMemory(&ncei, sizeof(ncei));
+ ncei.connected = 0;
+ ncei.szSettingsModule = nlc->nlu->user.szSettingsModule;
+ int size = sizeof(SOCKADDR_IN);
+ getsockname(nlc->s, (SOCKADDR *)&ncei.local, &size);
+ if (nlc->nlu->settings.useProxy) {
+ size = sizeof(SOCKADDR_IN);
+ getpeername(nlc->s, (SOCKADDR *)&ncei.proxy, &size);
+
+ }
+ else {
+ size = sizeof(SOCKADDR_IN);
+ getpeername(nlc->s, (SOCKADDR *)&ncei.remote, &size);
+
+ }
+ NotifyFastHook(hEventDisconnected, (WPARAM)&ncei, 0);
+
closesocket(nlc->s);
nlc->s = INVALID_SOCKET;
}
@@ -507,8 +507,8 @@ int LoadNetlibModule(void)
hRecvEvent = CreateHookableEvent(ME_NETLIB_FASTRECV);
hSendEvent = CreateHookableEvent(ME_NETLIB_FASTSEND);
- hEventConnected = CreateHookableEvent(ME_NETLIB_EVENT_CONNECTED);
- hEventDisconnected = CreateHookableEvent(ME_NETLIB_EVENT_DISCONNECTED);
+ hEventConnected = CreateHookableEvent(ME_NETLIB_EVENT_CONNECTED);
+ hEventDisconnected = CreateHookableEvent(ME_NETLIB_EVENT_DISCONNECTED);
NetlibUPnPInit();
NetlibLoadIeProxy();
diff --git a/src/mir_app/src/netlib.h b/src/mir_app/src/netlib.h
index 7457d1bb50..be134f7da8 100644
--- a/src/mir_app/src/netlib.h
+++ b/src/mir_app/src/netlib.h
@@ -146,8 +146,8 @@ void NetlibLeaveNestedCS(NetlibNestedCriticalSection *nlncs);
extern mir_cs csNetlibUser;
extern LIST<NetlibUser> netlibUser;
-extern HANDLE hEventConnected;
-extern HANDLE hEventDisconnected;
+extern HANDLE hEventConnected;
+extern HANDLE hEventDisconnected;
// netlibautoproxy.c
void NetlibLoadIeProxy(void);
diff --git a/src/mir_app/src/netlibbind.cpp b/src/mir_app/src/netlibbind.cpp
index f56fe5a4a0..e5318536ec 100644
--- a/src/mir_app/src/netlibbind.cpp
+++ b/src/mir_app/src/netlibbind.cpp
@@ -111,16 +111,16 @@ bool BindSocketToPort(const char *szPorts, SOCKET s, SOCKET s6, int* portn)
int NetlibFreeBoundPort(NetlibBoundPort *nlbp)
{
- NETLIBCONNECTIONEVENTINFO ncei;
-
- ZeroMemory(&ncei, sizeof(ncei));
- ncei.connected = 0;
- ncei.listening = 1;
- ncei.szSettingsModule = nlbp->nlu->user.szSettingsModule;
- int size = sizeof(SOCKADDR_IN);
- getsockname(nlbp->s, (SOCKADDR *)&ncei.local, &size);
- NotifyFastHook(hEventDisconnected, (WPARAM)&ncei, 0);
-
+ NETLIBCONNECTIONEVENTINFO ncei;
+
+ ZeroMemory(&ncei, sizeof(ncei));
+ ncei.connected = 0;
+ ncei.listening = 1;
+ ncei.szSettingsModule = nlbp->nlu->user.szSettingsModule;
+ int size = sizeof(SOCKADDR_IN);
+ getsockname(nlbp->s, (SOCKADDR *)&ncei.local, &size);
+ NotifyFastHook(hEventDisconnected, (WPARAM)&ncei, 0);
+
nlbp->close();
if (nlbp->hThread)
WaitForSingleObject(nlbp->hThread, INFINITE);
@@ -291,16 +291,16 @@ LBL_Error:
}
nlbp->hThread = mir_forkThread<NetlibBoundPort>(NetlibBindAcceptThread, nlbp);
-
- if (GetSubscribersCount((THook*)hEventConnected)) {
+
+ if (GetSubscribersCount((THook*)hEventConnected)) {
NETLIBCONNECTIONEVENTINFO ncei = {};
- ncei.connected = 1;
- ncei.listening = 1;
- ncei.szSettingsModule = nlu->user.szSettingsModule;
- memcpy(&ncei.local, &sin, sizeof(sin));
- NotifyFastHook(hEventConnected, (WPARAM)&ncei, 0);
- }
-
+ ncei.connected = 1;
+ ncei.listening = 1;
+ ncei.szSettingsModule = nlu->user.szSettingsModule;
+ memcpy(&ncei.local, &sin, sizeof(sin));
+ NotifyFastHook(hEventConnected, (WPARAM)&ncei, 0);
+ }
+
return nlbp;
}
diff --git a/src/mir_core/src/sha1.cpp b/src/mir_core/src/sha1.cpp
index 894fc48011..10f47d7867 100644
--- a/src/mir_core/src/sha1.cpp
+++ b/src/mir_core/src/sha1.cpp
@@ -168,16 +168,16 @@ MIR_CORE_DLL(void) mir_hmac_sha1(BYTE hashout[MIR_SHA1_HASH_SIZE], const BYTE *k
}
else memcpy(usedKey, key, keylen);
- for (size_t i = 0; i < MIR_SHA_BLOCKSIZE; i++)
- usedKey[i] ^= 0x36;
+ for (size_t i = 0; i < MIR_SHA_BLOCKSIZE; i++)
+ usedKey[i] ^= 0x36;
mir_sha1_init(&ctx);
mir_sha1_append(&ctx, usedKey, MIR_SHA_BLOCKSIZE);
mir_sha1_append(&ctx, text, (int)textlen);
mir_sha1_finish(&ctx, hashout);
- for (size_t i = 0; i < MIR_SHA_BLOCKSIZE; i++)
- usedKey[i] ^= 0x5C ^ 0x36;
+ for (size_t i = 0; i < MIR_SHA_BLOCKSIZE; i++)
+ usedKey[i] ^= 0x5C ^ 0x36;
mir_sha1_init(&ctx);
mir_sha1_append(&ctx, usedKey, MIR_SHA_BLOCKSIZE);