From 1b9f36054bddeef87d4f9c139877d28c4e6b1702 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 1 Sep 2015 15:17:39 +0000 Subject: - strdel()/strdelw() moved to the core; - custom implementations removed git-svn-id: http://svn.miranda-ng.org/main/trunk@15135 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PluginUpdater/src/Compat/compat.h | 8 ++++++++ plugins/PluginUpdater/src/DlgUpdate.cpp | 4 ++-- plugins/PluginUpdater/src/Utils.cpp | 9 --------- plugins/PluginUpdater/src/stdafx.h | 1 - 4 files changed, 10 insertions(+), 12 deletions(-) (limited to 'plugins/PluginUpdater') diff --git a/plugins/PluginUpdater/src/Compat/compat.h b/plugins/PluginUpdater/src/Compat/compat.h index 5818adcef1..4c0d0849eb 100644 --- a/plugins/PluginUpdater/src/Compat/compat.h +++ b/plugins/PluginUpdater/src/Compat/compat.h @@ -155,5 +155,13 @@ __forceinline TCHAR *Utils_ReplaceVarsT(const TCHAR *szData, MCONTACT hContact, return (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)szData, (LPARAM)&vars); } +void strdelt(TCHAR *parBuffer, int len) +{ + TCHAR* p; + for (p = parBuffer + len; *p != 0; p++) + p[-len] = *p; + + p[-len] = '\0'; +} #define _qtoupper(_c) (((_c) >= 'a' && (_c) <= 'z')?((_c)-('a'+'A')):(_c)) diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index b3298611f1..cba35cebe7 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -646,13 +646,13 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, int level, const // remove trailing w or W and try again int iPos = int(p - tszNewName) - 1; - strdel(p - 1, 1); + strdelt(p - 1, 1); if ((item = hashes.find((ServListEntry*)&pName)) == NULL) { Netlib_LogfT(hNetlibUser, _T("File %s: Not found on server, skipping"), ffd.cFileName); continue; } - strdel(tszNewName + iPos, 1); + strdelt(tszNewName + iPos, 1); } #if MIRANDA_VER >= 0x0A00 diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 30f212abe1..47e73a0e53 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -313,15 +313,6 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc) return ret; } -void strdel(TCHAR *parBuffer, int len) -{ - TCHAR* p; - for (p = parBuffer + len; *p != 0; p++) - p[-len] = *p; - - p[-len] = '\0'; -} - void __stdcall OpenPluginOptions(void*) { OPENOPTIONSDIALOG ood = {0}; diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h index 146c1ac49c..5491dd325b 100644 --- a/plugins/PluginUpdater/src/stdafx.h +++ b/plugins/PluginUpdater/src/stdafx.h @@ -226,7 +226,6 @@ void CheckUpdateOnStartup(); void InitTimer(void *type); bool unzip(const TCHAR *ptszZipFile, TCHAR *ptszDestPath, TCHAR *ptszBackPath,bool ch); -void strdel(TCHAR *parBuffer, int len); /////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3