From: <man...@us...> - 2013-11-10 19:10:34
|
Revision: 3184 http://sourceforge.net/p/modplug/code/3184 Author: manxorist Date: 2013-11-10 19:10:25 +0000 (Sun, 10 Nov 2013) Log Message: ----------- [Ref] Split mpt::PathString into its own header file. Modified Paths: -------------- trunk/OpenMPT/common/mptString.cpp trunk/OpenMPT/common/mptString.h trunk/OpenMPT/common/stdafx.h trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters trunk/OpenMPT/mptrack/mptrack_08.vcproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters Added Paths: ----------- trunk/OpenMPT/common/mptPathString.cpp trunk/OpenMPT/common/mptPathString.h Added: trunk/OpenMPT/common/mptPathString.cpp =================================================================== --- trunk/OpenMPT/common/mptPathString.cpp (rev 0) +++ trunk/OpenMPT/common/mptPathString.cpp 2013-11-10 19:10:25 UTC (rev 3184) @@ -0,0 +1,183 @@ +/* + * mptPathString.cpp + * ----------------- + * Purpose: Wrapper class around the platform-native representation of path names. Should be the only type that is used to store path names. + * Notes : Currently none. + * Authors: OpenMPT Devs + * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. + */ + +#include "stdafx.h" +#include "mptPathString.h" + + +#if defined(MODPLUG_TRACKER) + +namespace mpt +{ + +void PathString::SplitPath(PathString *drive, PathString *dir, PathString *fname, PathString *ext) const +//------------------------------------------------------------------------------------------------------ +{ + wchar_t tempDrive[_MAX_DRIVE]; + wchar_t tempDir[_MAX_DIR]; + wchar_t tempFname[_MAX_FNAME]; + wchar_t tempExt[_MAX_EXT]; + _wsplitpath(path.c_str(), tempDrive, tempDir, tempFname, tempExt); + if(drive) *drive = mpt::PathString::FromNative(tempDrive); + if(dir) *dir = mpt::PathString::FromNative(tempDir); + if(fname) *fname = mpt::PathString::FromNative(tempFname); + if(ext) *ext = mpt::PathString::FromNative(tempExt); +} + +PathString PathString::GetDrive() const +{ + PathString drive; + SplitPath(&drive, nullptr, nullptr, nullptr); + return drive; +} +PathString PathString::GetDir() const +{ + PathString dir; + SplitPath(nullptr, &dir, nullptr, nullptr); + return dir; +} +PathString PathString::GetPath() const +{ + PathString drive, dir; + SplitPath(&drive, &dir, nullptr, nullptr); + return drive + dir; +} +PathString PathString::GetFileName() const +{ + PathString fname; + SplitPath(nullptr, nullptr, &fname, nullptr); + return fname; +} +PathString PathString::GetFileExt() const +{ + PathString ext; + SplitPath(nullptr, nullptr, nullptr, &ext); + return ext; +} + +} // namespace mpt + +#endif + + +FILE * mpt_fopen(const mpt::PathString &filename, const char *mode) +//----------------------------------------------------------------- +{ + #if defined(WIN32) + return _wfopen(filename.AsNative().c_str(), mode ? mpt::String::Decode(mode, mpt::CharsetLocale).c_str() : nullptr); + #else // !WIN32 + return fopen(filename.AsNative().c_str(), mode); + #endif // WIN32 +} + +FILE * mpt_fopen(const mpt::PathString &filename, const wchar_t *mode) +//-------------------------------------------------------------------- +{ + #if defined(WIN32) + return _wfopen(filename.AsNative().c_str(), mode); + #else // !WIN32 + return fopen(filename.AsNative().c_str(), mode ? mpt::String::Encode(mode, mpt::CharsetLocale).c_str() : nullptr); + #endif // WIN32 +} + + +#if defined(MODPLUG_TRACKER) + +static inline char SanitizeFilenameChar(char c) +//--------------------------------------------- +{ + if( c == '\\' || + c == '\"' || + c == '/' || + c == ':' || + c == '?' || + c == '<' || + c == '>' || + c == '*') + { + c = '_'; + } + return c; +} + +static inline wchar_t SanitizeFilenameChar(wchar_t c) +//--------------------------------------------------- +{ + if( c == L'\\' || + c == L'\"' || + c == L'/' || + c == L':' || + c == L'?' || + c == L'<' || + c == L'>' || + c == L'*') + { + c = L'_'; + } + return c; +} + +void SanitizeFilename(mpt::PathString &filename) +//---------------------------------------------- +{ + mpt::RawPathString tmp = filename.AsNative(); + for(mpt::RawPathString::iterator it = tmp.begin(); it != tmp.end(); ++it) + { + *it = SanitizeFilenameChar(*it); + } + filename = mpt::PathString::FromNative(tmp); +} + +void SanitizeFilename(char *beg, char *end) +//----------------------------------------- +{ + for(char *it = beg; it != end; ++it) + { + *it = SanitizeFilenameChar(*it); + } +} + +void SanitizeFilename(wchar_t *beg, wchar_t *end) +//----------------------------------------------- +{ + for(wchar_t *it = beg; it != end; ++it) + { + *it = SanitizeFilenameChar(*it); + } +} + +void SanitizeFilename(std::string &str) +//------------------------------------- +{ + for(size_t i = 0; i < str.length(); i++) + { + str[i] = SanitizeFilenameChar(str[i]); + } +} + +void SanitizeFilename(std::wstring &str) +//-------------------------------------- +{ + for(size_t i = 0; i < str.length(); i++) + { + str[i] = SanitizeFilenameChar(str[i]); + } +} + +#if defined(_MFC_VER) +void SanitizeFilename(CString &str) +//--------------------------------- +{ + std::basic_string<TCHAR> tmp = str; + SanitizeFilename(tmp); + str = tmp.c_str(); +} +#endif + +#endif // MODPLUG_TRACKER Property changes on: trunk/OpenMPT/common/mptPathString.cpp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-c++src \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/common/mptPathString.h =================================================================== --- trunk/OpenMPT/common/mptPathString.h (rev 0) +++ trunk/OpenMPT/common/mptPathString.h 2013-11-10 19:10:25 UTC (rev 3184) @@ -0,0 +1,196 @@ +/* + * mptPathString.h + * --------------- + * Purpose: Wrapper class around the platform-native representation of path names. Should be the only type that is used to store path names. + * Notes : Currently none. + * Authors: OpenMPT Devs + * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. + */ + + +#pragma once + +//#define MPT_DEPRECATED_PATH +#define MPT_DEPRECATED_PATH MPT_DEPRECATED + +namespace mpt +{ + +#if defined(WIN32) +typedef std::wstring RawPathString; +#else // !WIN32 +typedef std::string RawPathString; +#endif // WIN32 + +class PathString +{ +private: + RawPathString path; +private: + PathString(const RawPathString & path) + : path(path) + { + return; + } +public: + PathString() + { + return; + } + PathString(const PathString & other) + : path(other.path) + { + return; + } + PathString & assign(const PathString & other) + { + path = other.path; + return *this; + } + PathString & operator = (const PathString & other) + { + return assign(other); + } + PathString & append(const PathString & other) + { + path.append(other.path); + return *this; + } + PathString & operator += (const PathString & other) + { + return append(other); + } + friend PathString operator + (const PathString & a, const PathString & b) + { + return PathString(a).append(b); + } + friend bool operator == (const PathString & a, const PathString & b) + { + return a.AsNative() == b.AsNative(); + } + friend bool operator != (const PathString & a, const PathString & b) + { + return a.AsNative() != b.AsNative(); + } + bool empty() const { return path.empty(); } + const RawPathString &NativeRef() const + { + return path; + } + +#if defined(WIN32) + static int CompareNoCase(const PathString & a, const PathString & b) + { + return lstrcmpiW(a.ToWide().c_str(), b.ToWide().c_str()); + } +#endif + +public: + +#if defined(MODPLUG_TRACKER) + + void SplitPath(PathString *drive, PathString *dir, PathString *fname, PathString *ext) const; + PathString GetDrive() const; + PathString GetDir() const; + PathString GetPath() const; + PathString GetFileName() const; + PathString GetFileExt() const; + + bool HasTrailingSlash() const + { + if(empty()) + return false; +#if defined(WIN32) + if(path[path.length()-1] == L'\\' || path[path.length()-1] == L'/') + return true; +#else + if(path[path.length()-1] == '/') + return true; +#endif + return false; + } + +#endif // MODPLUG_TRACKER + +public: + +#if defined(WIN32) + + // conversions + MPT_DEPRECATED_PATH std::string ToLocale() const { return mpt::String::Encode(path, mpt::CharsetLocale); } + std::string ToUTF8() const { return mpt::String::Encode(path, mpt::CharsetUTF8); } + std::wstring ToWide() const { return path; } + MPT_DEPRECATED_PATH static PathString FromLocale(const std::string &path) { return PathString(mpt::String::Decode(path, mpt::CharsetLocale)); } + static PathString FromUTF8(const std::string &path) { return PathString(mpt::String::Decode(path, mpt::CharsetUTF8)); } + static PathString FromWide(const std::wstring &path) { return PathString(path); } + RawPathString AsNative() const { return path; } + static PathString FromNative(const RawPathString &path) { return PathString(path); } +#if defined(_MFC_VER) + // CString TCHAR, so this is CHAR or WCHAR, depending on UNICODE + MPT_DEPRECATED_PATH CString ToCString() const { return mpt::String::ToCString(path); } + MPT_DEPRECATED_PATH static PathString FromCString(const CString &path) { return PathString(mpt::String::FromCString(path)); } +#endif + +#else // !WIN32 + + // conversions + std::string ToLocale() const { return path; } + std::string ToUTF8() const { return mpt::String::Convert(path, mpt::CharsetLocale, mpt::CharsetUTF8); } + std::wstring ToWide() const { return mpt::String::Decode(path, mpt::CharsetLocale); } + static PathString FromLocale(const std::string &path) { return PathString(path); } + static PathString FromUTF8(const std::string &path) { return PathString(mpt::String::Convert(path, mpt::CharsetUTF8, mpt::CharsetLocale)); } + static PathString FromWide(const std::wstring &path) { return PathString(mpt::String::Encode(path, mpt::CharsetLocale)); } + RawPathString AsNative() const { return path; } + static PathString FromNative(const RawPathString &path) { return PathString(path); } + +#endif // WIN32 + +}; + +} // namespace mpt + +#if defined(WIN32) + +#define MPT_PATHSTRING(x) mpt::PathString::FromNative( L ## x ) + +#else // !WIN32 + +#define MPT_PATHSTRING(x) mpt::PathString::FromNative( x ) + +#endif // WIN32 + +FILE * mpt_fopen(const mpt::PathString &filename, const char *mode); +FILE * mpt_fopen(const mpt::PathString &filename, const wchar_t *mode); + +#if defined(MODPLUG_TRACKER) + +// Sanitize a filename (remove special chars) +void SanitizeFilename(mpt::PathString &filename); + +void SanitizeFilename(char *beg, char *end); +void SanitizeFilename(wchar_t *beg, wchar_t *end); + +void SanitizeFilename(std::string &str); +void SanitizeFilename(std::wstring &str); + +template <std::size_t size> +void SanitizeFilename(char (&buffer)[size]) +//----------------------------------------- +{ + STATIC_ASSERT(size > 0); + SanitizeFilename(buffer, buffer + size); +} + +template <std::size_t size> +void SanitizeFilename(wchar_t (&buffer)[size]) +//-------------------------------------------- +{ + STATIC_ASSERT(size > 0); + SanitizeFilename(buffer, buffer + size); +} + +#if defined(_MFC_VER) +MPT_DEPRECATED_PATH void SanitizeFilename(CString &str); +#endif + +#endif // MODPLUG_TRACKER Property changes on: trunk/OpenMPT/common/mptPathString.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-chdr \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: trunk/OpenMPT/common/mptString.cpp =================================================================== --- trunk/OpenMPT/common/mptString.cpp 2013-11-10 19:05:34 UTC (rev 3183) +++ trunk/OpenMPT/common/mptString.cpp 2013-11-10 19:10:25 UTC (rev 3184) @@ -294,174 +294,3 @@ } } // namespace mpt::String - -#if defined(MODPLUG_TRACKER) - -namespace mpt -{ - -void PathString::SplitPath(PathString *drive, PathString *dir, PathString *fname, PathString *ext) const -//------------------------------------------------------------------------------------------------------ -{ - wchar_t tempDrive[_MAX_DRIVE]; - wchar_t tempDir[_MAX_DIR]; - wchar_t tempFname[_MAX_FNAME]; - wchar_t tempExt[_MAX_EXT]; - _wsplitpath(path.c_str(), tempDrive, tempDir, tempFname, tempExt); - if(drive) *drive = mpt::PathString::FromNative(tempDrive); - if(dir) *dir = mpt::PathString::FromNative(tempDir); - if(fname) *fname = mpt::PathString::FromNative(tempFname); - if(ext) *ext = mpt::PathString::FromNative(tempExt); -} - -PathString PathString::GetDrive() const -{ - PathString drive; - SplitPath(&drive, nullptr, nullptr, nullptr); - return drive; -} -PathString PathString::GetDir() const -{ - PathString dir; - SplitPath(nullptr, &dir, nullptr, nullptr); - return dir; -} -PathString PathString::GetPath() const -{ - PathString drive, dir; - SplitPath(&drive, &dir, nullptr, nullptr); - return drive + dir; -} -PathString PathString::GetFileName() const -{ - PathString fname; - SplitPath(nullptr, nullptr, &fname, nullptr); - return fname; -} -PathString PathString::GetFileExt() const -{ - PathString ext; - SplitPath(nullptr, nullptr, nullptr, &ext); - return ext; -} - -} // namespace mpt - -#endif - - -FILE * mpt_fopen(const mpt::PathString &filename, const char *mode) -//----------------------------------------------------------------- -{ - #if defined(WIN32) - return _wfopen(filename.AsNative().c_str(), mode ? mpt::String::Decode(mode, mpt::CharsetLocale).c_str() : nullptr); - #else // !WIN32 - return fopen(filename.AsNative().c_str(), mode); - #endif // WIN32 -} - -FILE * mpt_fopen(const mpt::PathString &filename, const wchar_t *mode) -//-------------------------------------------------------------------- -{ - #if defined(WIN32) - return _wfopen(filename.AsNative().c_str(), mode); - #else // !WIN32 - return fopen(filename.AsNative().c_str(), mode ? mpt::String::Encode(mode, mpt::CharsetLocale).c_str() : nullptr); - #endif // WIN32 -} - - -#if defined(MODPLUG_TRACKER) - -static inline char SanitizeFilenameChar(char c) -//--------------------------------------------- -{ - if( c == '\\' || - c == '\"' || - c == '/' || - c == ':' || - c == '?' || - c == '<' || - c == '>' || - c == '*') - { - c = '_'; - } - return c; -} - -static inline wchar_t SanitizeFilenameChar(wchar_t c) -//--------------------------------------------------- -{ - if( c == L'\\' || - c == L'\"' || - c == L'/' || - c == L':' || - c == L'?' || - c == L'<' || - c == L'>' || - c == L'*') - { - c = L'_'; - } - return c; -} - -void SanitizeFilename(mpt::PathString &filename) -//---------------------------------------------- -{ - mpt::RawPathString tmp = filename.AsNative(); - for(mpt::RawPathString::iterator it = tmp.begin(); it != tmp.end(); ++it) - { - *it = SanitizeFilenameChar(*it); - } - filename = mpt::PathString::FromNative(tmp); -} - -void SanitizeFilename(char *beg, char *end) -//----------------------------------------- -{ - for(char *it = beg; it != end; ++it) - { - *it = SanitizeFilenameChar(*it); - } -} - -void SanitizeFilename(wchar_t *beg, wchar_t *end) -//----------------------------------------------- -{ - for(wchar_t *it = beg; it != end; ++it) - { - *it = SanitizeFilenameChar(*it); - } -} - -void SanitizeFilename(std::string &str) -//------------------------------------- -{ - for(size_t i = 0; i < str.length(); i++) - { - str[i] = SanitizeFilenameChar(str[i]); - } -} - -void SanitizeFilename(std::wstring &str) -//-------------------------------------- -{ - for(size_t i = 0; i < str.length(); i++) - { - str[i] = SanitizeFilenameChar(str[i]); - } -} - -#if defined(_MFC_VER) -void SanitizeFilename(CString &str) -//--------------------------------- -{ - std::basic_string<TCHAR> tmp = str; - SanitizeFilename(tmp); - str = tmp.c_str(); -} -#endif - -#endif // MODPLUG_TRACKER Modified: trunk/OpenMPT/common/mptString.h =================================================================== --- trunk/OpenMPT/common/mptString.h 2013-11-10 19:05:34 UTC (rev 3183) +++ trunk/OpenMPT/common/mptString.h 2013-11-10 19:10:25 UTC (rev 3184) @@ -178,186 +178,4 @@ } // namespace String - - -//#define MPT_DEPRECATED_PATH -#define MPT_DEPRECATED_PATH MPT_DEPRECATED - -#if defined(WIN32) -typedef std::wstring RawPathString; -#else // !WIN32 -typedef std::string RawPathString; -#endif // WIN32 - -class PathString -{ -private: - RawPathString path; -private: - PathString(const RawPathString & path) - : path(path) - { - return; - } -public: - PathString() - { - return; - } - PathString(const PathString & other) - : path(other.path) - { - return; - } - PathString & assign(const PathString & other) - { - path = other.path; - return *this; - } - PathString & operator = (const PathString & other) - { - return assign(other); - } - PathString & append(const PathString & other) - { - path.append(other.path); - return *this; - } - PathString & operator += (const PathString & other) - { - return append(other); - } - friend PathString operator + (const PathString & a, const PathString & b) - { - return PathString(a).append(b); - } - friend bool operator == (const PathString & a, const PathString & b) - { - return a.AsNative() == b.AsNative(); - } - friend bool operator != (const PathString & a, const PathString & b) - { - return a.AsNative() != b.AsNative(); - } - bool empty() const { return path.empty(); } - const RawPathString &NativeRef() const - { - return path; - } - -#if defined(WIN32) - static int CompareNoCase(const PathString & a, const PathString & b) - { - return lstrcmpiW(a.ToWide().c_str(), b.ToWide().c_str()); - } -#endif - -public: - -#if defined(MODPLUG_TRACKER) - - void SplitPath(PathString *drive, PathString *dir, PathString *fname, PathString *ext) const; - PathString GetDrive() const; - PathString GetDir() const; - PathString GetPath() const; - PathString GetFileName() const; - PathString GetFileExt() const; - - bool HasTrailingSlash() const - { - if(empty()) - return false; -#if defined(WIN32) - if(path[path.length()-1] == L'\\' || path[path.length()-1] == L'/') - return true; -#else - if(path[path.length()-1] == '/') - return true; -#endif - return false; - } - -#endif // MODPLUG_TRACKER - -public: - -#if defined(WIN32) - - // conversions - MPT_DEPRECATED_PATH std::string ToLocale() const { return mpt::String::Encode(path, mpt::CharsetLocale); } - std::string ToUTF8() const { return mpt::String::Encode(path, mpt::CharsetUTF8); } - std::wstring ToWide() const { return path; } - MPT_DEPRECATED_PATH static PathString FromLocale(const std::string &path) { return PathString(mpt::String::Decode(path, mpt::CharsetLocale)); } - static PathString FromUTF8(const std::string &path) { return PathString(mpt::String::Decode(path, mpt::CharsetUTF8)); } - static PathString FromWide(const std::wstring &path) { return PathString(path); } - RawPathString AsNative() const { return path; } - static PathString FromNative(const RawPathString &path) { return PathString(path); } -#if defined(_MFC_VER) - // CString TCHAR, so this is CHAR or WCHAR, depending on UNICODE - MPT_DEPRECATED_PATH CString ToCString() const { return mpt::String::ToCString(path); } - MPT_DEPRECATED_PATH static PathString FromCString(const CString &path) { return PathString(mpt::String::FromCString(path)); } -#endif - -#else // !WIN32 - - // conversions - std::string ToLocale() const { return path; } - std::string ToUTF8() const { return mpt::String::Convert(path, mpt::CharsetLocale, mpt::CharsetUTF8); } - std::wstring ToWide() const { return mpt::String::Decode(path, mpt::CharsetLocale); } - static PathString FromLocale(const std::string &path) { return PathString(path); } - static PathString FromUTF8(const std::string &path) { return PathString(mpt::String::Convert(path, mpt::CharsetUTF8, mpt::CharsetLocale)); } - static PathString FromWide(const std::wstring &path) { return PathString(mpt::String::Encode(path, mpt::CharsetLocale)); } - RawPathString AsNative() const { return path; } - static PathString FromNative(const RawPathString &path) { return PathString(path); } - -#endif // WIN32 - -}; - } // namespace mpt - -#if defined(WIN32) - -#define MPT_PATHSTRING(x) mpt::PathString::FromNative( L ## x ) - -#else // !WIN32 - -#define MPT_PATHSTRING(x) mpt::PathString::FromNative( x ) - -#endif // WIN32 - -FILE * mpt_fopen(const mpt::PathString &filename, const char *mode); -FILE * mpt_fopen(const mpt::PathString &filename, const wchar_t *mode); - -#if defined(MODPLUG_TRACKER) - -// Sanitize a filename (remove special chars) -void SanitizeFilename(mpt::PathString &filename); - -void SanitizeFilename(char *beg, char *end); -void SanitizeFilename(wchar_t *beg, wchar_t *end); - -void SanitizeFilename(std::string &str); -void SanitizeFilename(std::wstring &str); - -template <std::size_t size> -void SanitizeFilename(char (&buffer)[size]) -//----------------------------------------- -{ - STATIC_ASSERT(size > 0); - SanitizeFilename(buffer, buffer + size); -} - -template <std::size_t size> -void SanitizeFilename(wchar_t (&buffer)[size]) -//-------------------------------------------- -{ - STATIC_ASSERT(size > 0); - SanitizeFilename(buffer, buffer + size); -} - -#if defined(_MFC_VER) -MPT_DEPRECATED_PATH void SanitizeFilename(CString &str); -#endif - -#endif // MODPLUG_TRACKER Modified: trunk/OpenMPT/common/stdafx.h =================================================================== --- trunk/OpenMPT/common/stdafx.h 2013-11-10 19:05:34 UTC (rev 3183) +++ trunk/OpenMPT/common/stdafx.h 2013-11-10 19:10:25 UTC (rev 3184) @@ -63,6 +63,8 @@ // <cstdio> // <stdio.h> // <windows.h> or just basic typedefs found in there +#include "../common/mptString.h" +#include "../common/mptPathString.h" //{{AFX_INSERT_LOCATION}} Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-11-10 19:05:34 UTC (rev 3183) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-11-10 19:10:25 UTC (rev 3184) @@ -416,6 +416,7 @@ <ClInclude Include="..\common\Logging.h" /> <ClInclude Include="..\common\misc_util.h" /> <ClInclude Include="..\common\mptFstream.h" /> + <ClInclude Include="..\common\mptPathString.h" /> <ClInclude Include="..\common\mptString.h" /> <ClInclude Include="..\common\mutex.h" /> <ClInclude Include="..\common\Profiler.h" /> @@ -486,6 +487,7 @@ <ItemGroup> <ClCompile Include="..\common\AudioCriticalSection.cpp" /> <ClCompile Include="..\common\misc_util.cpp" /> + <ClCompile Include="..\common\mptPathString.cpp" /> <ClCompile Include="..\common\mptString.cpp" /> <ClCompile Include="..\common\Profiler.cpp" /> <ClCompile Include="..\common\serialization_utils.cpp" /> Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2013-11-10 19:05:34 UTC (rev 3183) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2013-11-10 19:10:25 UTC (rev 3184) @@ -257,6 +257,9 @@ <ClInclude Include="..\common\mptFstream.h"> <Filter>Header Files\common</Filter> </ClInclude> + <ClInclude Include="..\common\mptPathString.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\common\AudioCriticalSection.cpp"> @@ -517,5 +520,8 @@ <ClCompile Include="..\include\miniz\miniz.c"> <Filter>Source Files\miniz</Filter> </ClCompile> + <ClCompile Include="..\common\mptPathString.cpp"> + <Filter>Source Files\common</Filter> + </ClCompile> </ItemGroup> </Project> \ No newline at end of file Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2013-11-10 19:05:34 UTC (rev 3183) +++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2013-11-10 19:10:25 UTC (rev 3184) @@ -443,6 +443,10 @@ > </File> <File + RelativePath="..\common\mptPathString.cpp" + > + </File> + <File RelativePath=".\mptrack.cpp" > </File> @@ -1053,6 +1057,10 @@ > </File> <File + RelativePath="..\common\mptPathString.h" + > + </File> + <File RelativePath=".\mptrack.h" > </File> Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2013-11-10 19:05:34 UTC (rev 3183) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2013-11-10 19:10:25 UTC (rev 3184) @@ -440,6 +440,7 @@ <ItemGroup> <ClCompile Include="..\common\AudioCriticalSection.cpp" /> <ClCompile Include="..\common\misc_util.cpp" /> + <ClCompile Include="..\common\mptPathString.cpp" /> <ClCompile Include="..\common\mptString.cpp" /> <ClCompile Include="..\common\Profiler.cpp" /> <ClCompile Include="..\common\serialization_utils.cpp" /> @@ -624,6 +625,7 @@ <ClInclude Include="..\common\Logging.h" /> <ClInclude Include="..\common\misc_util.h" /> <ClInclude Include="..\common\mptFstream.h" /> + <ClInclude Include="..\common\mptPathString.h" /> <ClInclude Include="..\common\mptString.h" /> <ClInclude Include="..\common\mutex.h" /> <ClInclude Include="..\common\Profiler.h" /> Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters 2013-11-10 19:05:34 UTC (rev 3183) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters 2013-11-10 19:10:25 UTC (rev 3184) @@ -490,6 +490,9 @@ <ClCompile Include="FileDialog.cpp"> <Filter>Source Files\mptrack</Filter> </ClCompile> + <ClCompile Include="..\common\mptPathString.cpp"> + <Filter>Source Files\common</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\soundlib\Loaders.h"> @@ -945,6 +948,9 @@ <ClInclude Include="FileDialog.h"> <Filter>Header Files\mptrack</Filter> </ClInclude> + <ClInclude Include="..\common\mptPathString.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <None Include="res\bitmap1.bmp"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |