From 69f098ce2dff7dc87607fcccafc550a965ca6e6a Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 21 Jul 2013 18:16:36 +0000 Subject: remove not used functions git-svn-id: http://svn.miranda-ng.org/main/trunk@5443 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/VersionInfo/src/utils.cpp | 87 --------------------------------------- 1 file changed, 87 deletions(-) (limited to 'plugins/VersionInfo/src/utils.cpp') diff --git a/plugins/VersionInfo/src/utils.cpp b/plugins/VersionInfo/src/utils.cpp index f5b23d10b7..718dbd8881 100644 --- a/plugins/VersionInfo/src/utils.cpp +++ b/plugins/VersionInfo/src/utils.cpp @@ -18,18 +18,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -//#define USE_LOG_FUNCTIONS - #include "common.h" -/* -My usual MessageBoxes :-) -*/ -void MB(const TCHAR* message) -{ - if (verbose) MessageBox(NULL, message, _T("VersionInfo"), MB_OK | MB_ICONEXCLAMATION); -} - void Log(const TCHAR* message) { if (ServiceExists(MS_POPUP_ADDPOPUPT)) { @@ -81,30 +71,6 @@ int GetStringFromDatabase(char *szSettingName, TCHAR *szError, TCHAR *szResult, return res; } -TCHAR *RelativePathToAbsolute(TCHAR *szRelative, TCHAR *szAbsolute, size_t size) -{ - if (size < MAX_PATH) { - TCHAR buffer[MAX_PATH]; //new path should be at least MAX_PATH chars - PathToAbsoluteT(szRelative, buffer); - _tcsncpy(szAbsolute, buffer, size); - } - else PathToAbsoluteT(szRelative, szAbsolute); - - return szAbsolute; -} - -TCHAR *AbsolutePathToRelative(TCHAR *szAbsolute, TCHAR *szRelative, size_t size) -{ - if (size < MAX_PATH) { - TCHAR buffer[MAX_PATH]; - PathToRelativeT(szAbsolute, szRelative); - _tcsncpy(szRelative, buffer, size); - } - else PathToRelativeT(szAbsolute, szRelative); - - return szRelative; -} - #define GetFacility(dwError) (HIWORD(dwError) && 0x0000111111111111) #define GetErrorCode(dwError) (LOWORD(dwError)) @@ -146,58 +112,6 @@ bool DoesDllExist(char *dllName) return false; } -//========== From Cyreve ========== -PLUGININFOEX *GetPluginInfo(const TCHAR *filename,HINSTANCE *hPlugin) -{ - TCHAR szMirandaPath[MAX_PATH], szPluginPath[MAX_PATH]; - PLUGININFOEX *(*MirandaPluginInfo)(DWORD); - PLUGININFOEX *pPlugInfo; - HMODULE hLoadedModule; - DWORD mirandaVersion = CallService(MS_SYSTEM_GETVERSION,0,0); - - GetModuleFileName(GetModuleHandle(NULL), szMirandaPath, SIZEOF(szMirandaPath)); - TCHAR* str2 = _tcsrchr(szMirandaPath,'\\'); - if(str2!=NULL) *str2=0; - - hLoadedModule = GetModuleHandle(filename); - if(hLoadedModule!=NULL) { - *hPlugin=NULL; - MirandaPluginInfo=(PLUGININFOEX *(*)(DWORD))GetProcAddress(hLoadedModule,"MirandaPluginInfo"); - return MirandaPluginInfo(mirandaVersion); - } - wsprintf(szPluginPath, _T("%s\\Plugins\\%s"), szMirandaPath, filename); - *hPlugin=LoadLibrary(szPluginPath); - if (*hPlugin==NULL) return NULL; - MirandaPluginInfo=(PLUGININFOEX *(*)(DWORD))GetProcAddress(*hPlugin,"MirandaPluginInfo"); - if(MirandaPluginInfo==NULL) {FreeLibrary(*hPlugin); *hPlugin=NULL; return NULL;} - pPlugInfo=MirandaPluginInfo(mirandaVersion); - if(pPlugInfo==NULL) {FreeLibrary(*hPlugin); *hPlugin=NULL; return NULL;} - if(pPlugInfo->cbSize != sizeof(PLUGININFOEX)) {FreeLibrary(*hPlugin); *hPlugin=NULL; return NULL;} - return pPlugInfo; -} - -//========== from Frank Cheng (wintime98) ========== -// I've changed something to suit VersionInfo :-) -#include - -void TimeStampToSysTime(DWORD Unix,SYSTEMTIME* SysTime) -{ - SYSTEMTIME S; - DWORDLONG FileReal,UnixReal; - S.wYear=1970; - S.wMonth=1; - S.wDay=1; - S.wHour=0; - S.wMinute=0; - S.wSecond=0; - S.wMilliseconds=0; - SystemTimeToFileTime(&S,(FILETIME*)&FileReal); - UnixReal = Unix; - UnixReal*=10000000; - FileReal+=UnixReal; - FileTimeToSystemTime((FILETIME*)&FileReal,SysTime); -} - void GetISO8061Time(SYSTEMTIME* stLocal, LPTSTR lpszString, DWORD dwSize) { SYSTEMTIME loctime; @@ -484,7 +398,6 @@ BOOL GetInternetExplorerVersion(TCHAR *ieVersion, size_t ieSize) return TRUE; } - TCHAR *GetLanguageName(LANGID language) { LCID lc = MAKELCID(language, SORT_DEFAULT); -- cgit v1.2.3