diff options
author | Maxime Curioni <maxime.curioni@gmail.com> | 2008-05-12 00:28:47 +0400 |
---|---|---|
committer | Maxime Curioni <maxime.curioni@gmail.com> | 2008-05-12 00:28:47 +0400 |
commit | c785d7493ea72797afd369152e929f80f88795ae (patch) | |
tree | 9758fc7dd8a1b902603c79ec34eaa5680b3ecbe4 /source/blender/freestyle/intern/system/StringUtils.cpp | |
parent | fd9ad582983939741a4c4fa5f2707f29365d6c09 (diff) | |
parent | 96486b356f7d035a7abc835adbef850c3f314264 (diff) |
soc-2008-mxcurioni: merged changes to revision 14798, compilation works for rendering/ directry. Still needs to figure out how to compile on non-Unix machines.
Diffstat (limited to 'source/blender/freestyle/intern/system/StringUtils.cpp')
-rwxr-xr-x | source/blender/freestyle/intern/system/StringUtils.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/system/StringUtils.cpp b/source/blender/freestyle/intern/system/StringUtils.cpp index 1afee94d962..556299e45c5 100755 --- a/source/blender/freestyle/intern/system/StringUtils.cpp +++ b/source/blender/freestyle/intern/system/StringUtils.cpp @@ -23,10 +23,6 @@ #include "FreestyleConfig.h" #include "StringUtils.h" -//soc -#include "BKE_utildefines.h" -#include "BLI_blenlib.h" - namespace StringUtils { void getPathName(const string& path, const string& base, vector<string>& pathnames) { @@ -45,7 +41,7 @@ namespace StringUtils { char cleaned[FILE_MAX]; BLI_strncpy(cleaned, dir.c_str(), FILE_MAX); BLI_cleanup_file(NULL, cleaned); - string res(cleaned); + string res = toAscii( string(cleaned) ); if (!base.empty()) res += Config::DIR_SEP + base; @@ -53,4 +49,22 @@ namespace StringUtils { } } + string toAscii( const string &str ){ + stringstream out(""); + char s; + + for(uint i=0; i < str.size() ; i++){ + s = ((char)(str.at(i) & 0x7F)); + out << s; + } + + return out.str(); + } + + const char* toAscii( const char *str ){ + return toAscii(string(str)).c_str(); + } + + + } // end of namespace StringUtils |