Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-05-12 00:28:47 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-05-12 00:28:47 +0400
commitc785d7493ea72797afd369152e929f80f88795ae (patch)
tree9758fc7dd8a1b902603c79ec34eaa5680b3ecbe4 /source/blender/freestyle/intern/system
parentfd9ad582983939741a4c4fa5f2707f29365d6c09 (diff)
parent96486b356f7d035a7abc835adbef850c3f314264 (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')
-rwxr-xr-xsource/blender/freestyle/intern/system/StringUtils.cpp24
-rwxr-xr-xsource/blender/freestyle/intern/system/StringUtils.h7
2 files changed, 26 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
diff --git a/source/blender/freestyle/intern/system/StringUtils.h b/source/blender/freestyle/intern/system/StringUtils.h
index 44adfc2b044..efc16953e48 100755
--- a/source/blender/freestyle/intern/system/StringUtils.h
+++ b/source/blender/freestyle/intern/system/StringUtils.h
@@ -30,14 +30,21 @@
# include <vector>
# include <string>
+# include <sstream>
# include "FreestyleConfig.h"
+//soc
+#include "BKE_utildefines.h"
+#include "BLI_blenlib.h"
+
using namespace std;
namespace StringUtils {
LIB_SYSTEM_EXPORT
void getPathName(const string& path, const string& base, vector<string>& pathnames);
+ string toAscii( const string &str );
+ const char* toAscii( const char *str );
// STL related
struct ltstr{