diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2013-03-08 19:31:16 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2013-03-08 19:31:16 +0000 |
commit | 7e2a1c233ab2eac8e3f65dd1ee1647b336ef588c (patch) | |
tree | 55e4683d889d22dfe3d3a8bc8260fb2956828d74 /plugins | |
parent | 5e3d3e76ed1d3cae5c651b2cdb4dfed4dde5c498 (diff) |
fixed some compiler warnings
git-svn-id: http://svn.miranda-ng.org/main/trunk@3924 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ExternalAPI/m_folders.h | 23 | ||||
-rw-r--r-- | plugins/Folders/folders_10.vcxproj | 1 | ||||
-rw-r--r-- | plugins/Folders/folders_10.vcxproj.filters | 3 |
3 files changed, 12 insertions, 15 deletions
diff --git a/plugins/ExternalAPI/m_folders.h b/plugins/ExternalAPI/m_folders.h index 550f52f44c..bb8c1bfb56 100644 --- a/plugins/ExternalAPI/m_folders.h +++ b/plugins/ExternalAPI/m_folders.h @@ -141,12 +141,6 @@ typedef struct{ */
#define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-
__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
{
if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
@@ -179,7 +173,7 @@ __inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, co INT_PTR res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
if (res) {
char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
+ PathToAbsolute(notFound, buffer);
mir_snprintf(path, size, "%s", buffer);
}
@@ -196,7 +190,7 @@ __inline static INT_PTR FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *path INT_PTR res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
if (res) {
wchar_t buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTEW, (WPARAM) notFoundW, (LPARAM) buffer);
+ PathToAbsoluteW(notFoundW, buffer);
mir_sntprintf(pathW, size, _T("%s"), buffer);
}
@@ -212,17 +206,17 @@ __inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, INT_PTR res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
if (res) {
char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
+ PathToAbsolute(notFound, buffer);
mir_snprintf(path, size, "%s", buffer);
}
if (strlen(path) > 0)
- strcat(path, "\\");
+ strncat(path, "\\", size);
else
path[0] = '\0';
if (fileName)
- strcat(path, fileName);
+ strncat(path, fileName, size);
return res;
}
@@ -237,17 +231,17 @@ __inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pa INT_PTR res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
if (res) {
wchar_t buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTEW, (WPARAM) notFoundW, (LPARAM) buffer);
+ PathToAbsoluteW(notFoundW, buffer);
mir_sntprintf(pathW, size, _T("%s"), buffer);
}
if (wcslen(pathW) > 0)
- wcscat(pathW, L"\\");
+ wcsncat(pathW, L"\\",size);
else
pathW[0] = L'\0';
if (fileNameW)
- wcscat(pathW, fileNameW);
+ wcsncat(pathW, fileNameW, size);
return res;
}
@@ -263,6 +257,5 @@ __inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pa # define FoldersRegisterCustomPathT FoldersRegisterCustomPath
#endif
-#endif
#endif //M_CUSTOM_FOLDERS_H
\ No newline at end of file diff --git a/plugins/Folders/folders_10.vcxproj b/plugins/Folders/folders_10.vcxproj index d9dfeed4fd..afc415002e 100644 --- a/plugins/Folders/folders_10.vcxproj +++ b/plugins/Folders/folders_10.vcxproj @@ -192,6 +192,7 @@ <ClCompile Include="src\utils.cpp" />
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="..\ExternalAPI\m_folders.h" />
<ClInclude Include="src\commonheaders.h" />
<ClInclude Include="src\dlg_handlers.h" />
<ClInclude Include="src\events.h" />
diff --git a/plugins/Folders/folders_10.vcxproj.filters b/plugins/Folders/folders_10.vcxproj.filters index 2a6e8eea72..30086fbee5 100644 --- a/plugins/Folders/folders_10.vcxproj.filters +++ b/plugins/Folders/folders_10.vcxproj.filters @@ -74,6 +74,9 @@ <ClInclude Include="src\version.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\ExternalAPI\m_folders.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\folders.rc">
|