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 c9fa3ce..cb9076a 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 ) );