aboutsummaryrefslogtreecommitdiff
path: root/lib/configuration/locale.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/configuration/locale.c')
-rw-r--r--lib/configuration/locale.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/configuration/locale.c b/lib/configuration/locale.c
new file mode 100644
index 0000000..eeafd26
--- /dev/null
+++ b/lib/configuration/locale.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include <locale.h>
+#include <caml/memory.h>
+#include <caml/alloc.h>
+
+CAMLprim value set_locale( value param )
+{
+ const char *s;
+ s = String_val(param);
+ setlocale(LC_NUMERIC, s);
+ return Val_unit;
+}