Displaying 1 result from an estimated 1 matches for "val_name".
Did you mean:
ctl_name
2014 Jan 30
2
[PATCH] builder: output translated notes
...clude <caml/memory.h>
+#include <caml/mlvalues.h>
+
+static const int lc_string_table[7] = {
+ LC_ALL,
+ LC_CTYPE,
+ LC_NUMERIC,
+ LC_TIME,
+ LC_COLLATE,
+ LC_MONETARY,
+ LC_MESSAGES
+};
+
+#define Val_none (Val_int (0))
+
+value
+virt_builder_setlocale (value val_category, value val_name)
+{
+ CAMLparam2 (val_category, val_name);
+ CAMLlocal2 (rv, rv2);
+ char *ret, *locstring;
+ int category;
+
+ category = lc_string_table[Int_val (val_category)];
+ locstring = val_name == Val_none ? NULL : String_val (Field (val_name, 0));
+ ret = setlocale (category, locstring);
+ if (re...