]> git.sesse.net Git - vlc/commitdiff
Use ANSI/POSIX float notation uniformly for the command line
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 19 Apr 2009 21:30:28 +0000 (00:30 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 19 Apr 2009 21:30:28 +0000 (00:30 +0300)
This is consistent with the vlcrc syntax. Shell scripts et al. are
unlikely to be aware of the locale decimal separator anyway.

src/config/cmdline.c

index c9fa3ce677c7baa2219779981b1586c2546140e7..cb9076a7a378a6443af5d58dab7fbe7685812820 100644 (file)
@@ -27,7 +27,8 @@
 
 #include <vlc_common.h>
 #include "../libvlc.h"
-#include "vlc_keys.h"
+#include <vlc_keys.h>
+#include <vlc_charset.h>
 
 #ifdef HAVE_GETOPT_LONG
 #   ifdef HAVE_GETOPT_H
@@ -297,7 +298,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
                         config_PutInt( p_this, psz_name, strtol(optarg, 0, 0));
                         break;
                     case CONFIG_ITEM_FLOAT:
-                        config_PutFloat( p_this, psz_name, (float)atof(optarg) );
+                        config_PutFloat( p_this, psz_name, us_atof(optarg) );
                         break;
                     case CONFIG_ITEM_KEY:
                         config_PutInt( p_this, psz_name, ConfigStringToKey( optarg ) );