It works with LC_NUMERIC "C" if Snd is compiled `--without-gui':

   LC_NUMERIC=fr_FR ./snd_nogui
   0.1
   ; => 0.1

   LC_NUMERIC=fr_FR ./snd    # motif or gtk
   0.1
   ; => 0,1.0

The attached patch is a possible solution for Motif and Gtk.
diff -ur snd-15~/snd-gmain.c snd-15/snd-gmain.c
--- snd-15~/snd-gmain.c 2015-06-19 22:22:34.662386069 +0200
+++ snd-15/snd-gmain.c  2015-06-19 22:22:49.254202626 +0200
@@ -423,6 +423,10 @@
   shell = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   sg_make_resizable(shell);
 
+#ifndef _MSC_VER
+  setlocale(LC_NUMERIC, "C");
+#endif
+
   auto_open_files = argc-1;
   if (argc > 1) auto_open_file_names = (char **)(argv + 1);
   ss->startup_title = mus_strdup("snd");
diff -ur snd-15~/snd-motif.c snd-15/snd-motif.c
--- snd-15~/snd-motif.c 2015-06-19 22:22:34.672385944 +0200
+++ snd-15/snd-motif.c  2015-06-19 22:22:49.258202575 +0200
@@ -30662,6 +30662,10 @@
                              NULL);
 #endif
 
+#ifndef _MSC_VER
+  setlocale(LC_NUMERIC, "C");
+#endif
+
   /* if user has *keyboardFocusPolicy: Pointer in .Xdefaults, it can screw up 
Snd's attempt to
    * keep the channel graphics window as the active widget in case of keyboard 
input.  So,
    * we try to force Snd's focus policy to be XmEXPLICIT
_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to