diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-04-06 03:23:02 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-04-06 03:23:02 +0000 |
commit | 8f363ee967527cf9b91e909cd32684a4ac5a3ce9 (patch) | |
tree | bf90ac39dd3e5593d758ff4f200dc57b15319e01 /updater/utils.cpp | |
parent | fce9ccb39b38cb90458cb10947034c0202d087c6 (diff) |
More optimizations
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@500 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'updater/utils.cpp')
-rw-r--r-- | updater/utils.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/updater/utils.cpp b/updater/utils.cpp index e1ffdea..6e1afad 100644 --- a/updater/utils.cpp +++ b/updater/utils.cpp @@ -118,9 +118,8 @@ bool DeleteNonDlls(const TCHAR *folder) TCHAR szFilesPath[MAX_PATH];
{
- char buff[200], *ts;
- mir_snprintf(buff, SIZEOF(buff), "Deleting non-dlls in %s", (ts = mir_t2a(folder)));
- mir_free(ts);
+ TCHAR buff[200];
+ mir_sntprintf(buff, SIZEOF(buff), _T("Deleting non-dlls in %s"), folder);
NLog(buff);
}
@@ -140,9 +139,8 @@ bool DeleteNonDlls(const TCHAR *folder) if (_tcsstr(findData.cFileName, _T(".dll")) == 0)
{
{
- char buff[200], *ts;
- mir_snprintf(buff, SIZEOF(buff), "Deleting %s", (ts = mir_t2a(folder)));
- mir_free(ts);
+ TCHAR buff[200];
+ mir_sntprintf(buff, SIZEOF(buff), _T("Deleting %s"), folder);
NLog(buff);
}
DeleteFile(szFilesPath);
@@ -155,3 +153,17 @@ bool DeleteNonDlls(const TCHAR *folder) return true;
}
+
+void NLog(char *msg)
+{
+ CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)msg);
+}
+
+#ifdef _UNICODE
+void NLog(wchar_t *msg)
+{
+ char* a = mir_u2a(msg);
+ CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)a);
+ mir_free(a);
+}
+#endif
\ No newline at end of file |