X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fconfig%2Fcmdline.c;h=264f84ed2f9670e21e734439c44b84aeb67b1ad1;hb=9e26639a38c7174921f5e416c7233edacdc8cbca;hp=8de2e2224d8ff15e87b9acdc2150862caad27e45;hpb=687c86594fa47ce21b2c838b05c5b078fb51a288;p=vlc diff --git a/src/config/cmdline.c b/src/config/cmdline.c index 8de2e2224d..264f84ed2f 100644 --- a/src/config/cmdline.c +++ b/src/config/cmdline.c @@ -27,7 +27,8 @@ #include #include "../libvlc.h" -#include "vlc_keys.h" +#include +#include #ifdef HAVE_GETOPT_LONG # ifdef HAVE_GETOPT_H @@ -58,7 +59,6 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, int i_cmd, i_index, i_opts, i_shortopts, flag, i_verbose = 0; module_t *p_parser; struct option *p_longopts; - int i_modules_index; const char **argv_copy = NULL; /* Short options */ @@ -273,15 +273,14 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, psz_name = p_conf->psz_name; } - - if( p_conf->i_type != CONFIG_ITEM_BOOL && !optarg ) - { - fprintf( stderr, "Warning: missing argument for option --%s\n", p_conf->psz_name ); - fprintf( stderr, "Try specifying options as '--optionname=value' instead of '--optionname value'\n" ); - continue; - } - - +#ifdef __APPLE__ + if( p_conf->i_type != CONFIG_ITEM_BOOL && !optarg ) + { + fprintf( stderr, "Warning: missing argument for option --%s\n", p_conf->psz_name ); + fprintf( stderr, "Try specifying options as '--optionname=value' instead of '--optionname value'\n" ); + continue; + } +#endif switch( p_conf->i_type ) { case CONFIG_ITEM_STRING: @@ -298,7 +297,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 ) );