summaryrefslogtreecommitdiff
path: root/plugins/LotusNotify/src/debug.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-02 12:32:44 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-02 12:32:55 +0300
commit931a7dc1ac0dbc7e6c1083583ced915e572f5b47 (patch)
tree9fe9a6448d44030e26aa7107ce16044ed413e0d0 /plugins/LotusNotify/src/debug.cpp
parentdd7d9954042254e66e3bbbec7195c6be8b1a0663 (diff)
all protocols (even virtual ones) moved to the Protocols folder
Diffstat (limited to 'plugins/LotusNotify/src/debug.cpp')
-rw-r--r--plugins/LotusNotify/src/debug.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/plugins/LotusNotify/src/debug.cpp b/plugins/LotusNotify/src/debug.cpp
deleted file mode 100644
index 91baeb82e5..0000000000
--- a/plugins/LotusNotify/src/debug.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "stdafx.h"
-#include "debug.h"
-
-HNETLIBUSER netlibHandle;
-
-void logRegister(){
- // Register netlib user for logging function
- NETLIBUSER nlu = {};
- nlu.flags = NUF_UNICODE | NUF_NOOPTIONS;
- nlu.szSettingsModule = MODULENAME;
- nlu.szDescriptiveName.w = mir_a2u(MODULENAME);
- netlibHandle = Netlib_RegisterUser(&nlu);
-}
-
-void logUnregister(){
- Netlib_CloseHandle(netlibHandle);
- netlibHandle = nullptr;
-}
-
-void log(const wchar_t* szText){
-
- if (netlibHandle) {
- Netlib_LogW(netlibHandle, szText);
- }
-
- #ifdef _DEBUG
- OutputDebugString(szText);
- #endif //_DEBUG
-}
-
-void log_p(const wchar_t* szText, ...){
- va_list args;
- va_start(args, szText);
- int len = _vscwprintf(szText, args ) + 1; // _vscprintf doesn't count terminating '\0' //!!!!!!!!!!!!!!!!
- wchar_t* buffer = new wchar_t[len * sizeof(wchar_t)];
- mir_vsnwprintf(buffer, len, szText, args);
- va_end(args);
- log(buffer);
- delete[] buffer;
-}
-