diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-07-21 18:16:36 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-07-21 18:16:36 +0000 |
commit | 69f098ce2dff7dc87607fcccafc550a965ca6e6a (patch) | |
tree | eda44f16ccc48cfa58d8454340977de6a86682fa | |
parent | e398ab10b327757fdc1ea37da21cb401f4d5d5e5 (diff) |
remove not used functions
git-svn-id: http://svn.miranda-ng.org/main/trunk@5443 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/VersionInfo/src/CVersionInfo.cpp | 2 | ||||
-rw-r--r-- | plugins/VersionInfo/src/dlgHandlers.cpp | 6 | ||||
-rw-r--r-- | plugins/VersionInfo/src/utils.cpp | 87 | ||||
-rw-r--r-- | plugins/VersionInfo/src/utils.h | 6 |
4 files changed, 4 insertions, 97 deletions
diff --git a/plugins/VersionInfo/src/CVersionInfo.cpp b/plugins/VersionInfo/src/CVersionInfo.cpp index a58bc5bb72..ed8e839e4d 100644 --- a/plugins/VersionInfo/src/CVersionInfo.cpp +++ b/plugins/VersionInfo/src/CVersionInfo.cpp @@ -1172,7 +1172,7 @@ void CVersionInfo::PrintInformationsToFile(const TCHAR *info) }
else GetStringFromDatabase("OutputFile", _T("VersionInfo.txt"), buffer, SIZEOF(buffer));
- RelativePathToAbsolute(buffer, outputFileName, SIZEOF(buffer));
+ PathToAbsoluteT(buffer, outputFileName);
FILE *fp = _tfopen(outputFileName, _T("wb"));
if ( fp != NULL ) {
diff --git a/plugins/VersionInfo/src/dlgHandlers.cpp b/plugins/VersionInfo/src/dlgHandlers.cpp index e6242c6bf6..d7e9024894 100644 --- a/plugins/VersionInfo/src/dlgHandlers.cpp +++ b/plugins/VersionInfo/src/dlgHandlers.cpp @@ -259,9 +259,9 @@ INT_PTR CALLBACK DlgProcOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) TCHAR notFound[1024];
if (db_get_ts(NULL, ModuleName, "OutputFile", &dbv) == 0)
- RelativePathToAbsolute(dbv.ptszVal, notFound, SIZEOF(notFound));
+ PathToAbsoluteT(dbv.ptszVal, notFound);
else
- RelativePathToAbsolute( _T("VersionInfo.txt"), notFound, SIZEOF(notFound));
+ PathToAbsoluteT(_T("VersionInfo.txt"), notFound);
if (hOutputLocation)
_tcscpy(buffer, TranslateT("Customize using folders plugin"));
@@ -463,7 +463,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) if (!hOutputLocation) {
TCHAR filePath[MAX_PATH], fileName[MAX_PATH];
GetDlgItemText(hWnd, IDC_FILENAME, fileName, MAX_PATH);
- AbsolutePathToRelative(fileName, filePath, SIZEOF(filePath));
+ PathToRelativeT(fileName, filePath);
db_set_ts(NULL, ModuleName, "OutputFile", filePath); //store relative path
}
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 <imagehlp.h>
-
-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);
diff --git a/plugins/VersionInfo/src/utils.h b/plugins/VersionInfo/src/utils.h index c53678c933..7c8711ad3e 100644 --- a/plugins/VersionInfo/src/utils.h +++ b/plugins/VersionInfo/src/utils.h @@ -2,14 +2,9 @@ #define _M_VERSIONINFO_UTILS_H
//utils.cpp
-void MB(const TCHAR*);
void Log(const TCHAR*);
TCHAR *StrTrim(TCHAR *, const TCHAR *);
-//utils.cpp
-TCHAR *RelativePathToAbsolute(TCHAR *szRelative, TCHAR *szAbsolute, size_t size);
-TCHAR *AbsolutePathToRelative(TCHAR *szAbsolute, TCHAR *szRelative, size_t size);
-
//returns a string from the database and uses MirandaFree to deallocate the string, leaving only the local copy
//utils.cpp
int GetStringFromDatabase(char *szSettingName, TCHAR *szError, TCHAR *szResult, size_t size);
@@ -27,7 +22,6 @@ void GetISO8061Time(SYSTEMTIME* stLocal, LPTSTR lpszString, DWORD dwSize); void NotifyError(DWORD, const TCHAR*, int);
//utils.cpp
-PLUGININFOEX *GetPluginInfo(const char *,HINSTANCE *);
PLUGININFOEX *CopyPluginInfo(PLUGININFOEX *);
void FreePluginInfo(PLUGININFOEX *);
|