summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-05-17 08:57:21 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-05-17 08:57:21 +0000
commitec68f2752b66070c82af845fef86d99fdd0857e4 (patch)
treeb4b99a3c185d2b623bcd73294337ce398c647361
parent2907abb0f7c2f5387cfa3141487a532b6aa0ff23 (diff)
folders - now compiles with standard m_variables.h
git-svn-id: http://svn.miranda-ng.org/main/trunk@9 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/folders/folders.sln18
-rw-r--r--plugins/folders/folders/commonheaders.h4
-rw-r--r--plugins/folders/folders/services.cpp28
3 files changed, 35 insertions, 15 deletions
diff --git a/plugins/folders/folders.sln b/plugins/folders/folders.sln
index 1d1e0952d9..c08888949c 100644
--- a/plugins/folders/folders.sln
+++ b/plugins/folders/folders.sln
@@ -1,20 +1,32 @@

-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "folders", "folders\folders.vcproj", "{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}"
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "folders", "folders\folders.vcxproj", "{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug Unicode|Win32 = Debug Unicode|Win32
+ Debug Unicode|x64 = Debug Unicode|x64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
+ Release Unicode|Win32 = Release Unicode|Win32
+ Release Unicode|x64 = Release Unicode|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
+ {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.ActiveCfg = Debug|Win32
{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.Build.0 = Debug|Win32
{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.ActiveCfg = Debug|x64
{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.Build.0 = Debug|x64
+ {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release Unicode|x64.Build.0 = Release Unicode|x64
{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.ActiveCfg = Release|Win32
{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.Build.0 = Release|Win32
{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.ActiveCfg = Release|x64
diff --git a/plugins/folders/folders/commonheaders.h b/plugins/folders/folders/commonheaders.h
index af2f0e3b9c..2d21c0f0a0 100644
--- a/plugins/folders/folders/commonheaders.h
+++ b/plugins/folders/folders/commonheaders.h
@@ -50,8 +50,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "m_contacts.h"
#include "m_popup.h"
#include "m_fontservice.h"
-#include "sdk/m_updater.h"
-#include "sdk/m_variables.h"
+#include "m_updater.h"
+#include "m_variables.h"
#ifndef MS_DB_GETPROFILEPATH_BASIC //db3xSA
#define MS_DB_GETPROFILEPATH_BASIC "DB/GetProfilePathBasic"
diff --git a/plugins/folders/folders/services.cpp b/plugins/folders/folders/services.cpp
index 5fa423aab7..f811bf2246 100644
--- a/plugins/folders/folders/services.cpp
+++ b/plugins/folders/folders/services.cpp
@@ -84,19 +84,23 @@ INT_PTR ExpandPath(char *szResult, char *format, int size)
if (ServiceExists(MS_VARS_FORMATSTRING))
{
- char *vars_result = variables_parse_char(format, NULL, NULL);
+ TCHAR* tmp_format = mir_a2t(format);
+ TCHAR *vars_result_tmp = variables_parse(tmp_format, NULL, NULL);
+ mir_free(tmp_format);
+ char *vars_result = mir_t2a(vars_result_tmp);
if (vars_result != NULL)
{
- input = _strdup(vars_result);
+ input = mir_strdup(vars_result);
- variables_free(vars_result);
+ variables_free(vars_result_tmp);
}
+ mir_free(vars_result);
}
if (input == NULL)
{
- input = _strdup(format);
+ input = mir_strdup(format);
}
char *core_result = Utils_ReplaceVars(input);
@@ -111,7 +115,7 @@ INT_PTR ExpandPath(char *szResult, char *format, int size)
StrTrim(szResult, "\t \\");
- free(input);
+ mir_free(input);
return strlen(szResult);
}
@@ -123,19 +127,23 @@ INT_PTR ExpandPathW(wchar_t *szResult, wchar_t *format, int size)
if (ServiceExists(MS_VARS_FORMATSTRING))
{
- wchar_t *vars_result = variables_parse_wchar(format, NULL, NULL);
+ TCHAR* tmp_format = mir_u2t(format);
+ TCHAR *vars_result_tmp = variables_parse(tmp_format, NULL, NULL);
+ mir_free(tmp_format);
+ wchar_t *vars_result = mir_t2u(vars_result_tmp);
if (vars_result != NULL)
{
- input = _wcsdup(vars_result);
+ input = mir_wstrdup(vars_result);
- variables_free(vars_result);
+ variables_free(vars_result_tmp);
}
+ mir_free(vars_result);
}
if (input == NULL)
{
- input = _wcsdup(format);
+ input = mir_wstrdup(format);
}
wchar_t *core_result = Utils_ReplaceVarsW(input);
@@ -156,7 +164,7 @@ INT_PTR ExpandPathW(wchar_t *szResult, wchar_t *format, int size)
StrTrim(szResult, L"\t \\");
- free(input);
+ mir_free(input);
return wcslen(szResult);
}