From 5d5ca22a6d9e87d3865ea2feb54218a6e0dfffea Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Fri, 29 Jul 2011 07:24:09 +0300 Subject: options: commandline: accept --foo=xyz style options Allow writing commandline options with two leading dashes. In this mode a parameter for the option, if any, follows after a '='; following separate commandline arguments are never consumed as a parameter to a previous double-dash option. Flag options may omit parameter and behave like old single-dash syntax. "--fs=yes", "--fs=no" and "--fs" are all valid; the first two behave like configuration file "fs=yes" and "fs=no", and last is the same as old "-fs" (same effect as "--fs=yes"). --- mplayer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index b0c49fcc14..23a2636989 100644 --- a/mplayer.c +++ b/mplayer.c @@ -1052,7 +1052,7 @@ static int libmpdemux_was_interrupted(struct MPContext *mpctx, int stop_play) static int playtree_add_playlist(struct MPContext *mpctx, play_tree_t* entry) { - play_tree_add_bpf(entry,mpctx->filename); + play_tree_add_bpf(entry, bstr(mpctx->filename)); { if(!entry) { @@ -4191,7 +4191,7 @@ while (opts->player_idle_mode && !mpctx->filename) { // The entry is added to the main playtree after the switch(). break; case MP_CMD_LOADLIST: - entry = parse_playlist_file(mpctx->mconfig, cmd->args[0].v.s); + entry = parse_playlist_file(mpctx->mconfig, bstr(cmd->args[0].v.s)); break; case MP_CMD_QUIT: exit_player_with_rc(mpctx, EXIT_QUIT, (cmd->nargs > 0)? cmd->args[0].v.i : 0); -- cgit v1.2.3