summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-01-24 05:15:42 +0000
committerDavid Robillard <d@drobilla.net>2008-01-24 05:15:42 +0000
commit584ba20bd31fede8d71c5659208d4a16d55012a3 (patch)
treecfd8e31a7460bc40501349dfc885630432a65188 /src/libs
parentee5c2aababe8bf885040a38490435f6aa1532194 (diff)
downloadingen-584ba20bd31fede8d71c5659208d4a16d55012a3.tar.gz
ingen-584ba20bd31fede8d71c5659208d4a16d55012a3.tar.bz2
ingen-584ba20bd31fede8d71c5659208d4a16d55012a3.zip
Fix locale problems in ingen, flowcanvas, and redlandmm (',' decimal point).
git-svn-id: http://svn.drobilla.net/lad/ingen@1111 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/client/DeprecatedLoader.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libs/client/DeprecatedLoader.cpp b/src/libs/client/DeprecatedLoader.cpp
index 8c8d3936..b193c86f 100644
--- a/src/libs/client/DeprecatedLoader.cpp
+++ b/src/libs/client/DeprecatedLoader.cpp
@@ -94,7 +94,14 @@ DeprecatedLoader::add_variable(GraphObject::Variables& data, string old_key, str
// Hack to make module-x and module-y set as floats
char* c_val = strdup(value.c_str());
char* endptr = NULL;
+
+ // FIXME: locale kludges
+ char* locale = strdup(setlocale(LC_NUMERIC, NULL));
+
float fval = strtof(c_val, &endptr);
+
+ setlocale(LC_NUMERIC, locale);
+ free(locale);
if (endptr != c_val && *endptr == '\0')
data[key] = Atom(fval);