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"). --- playtree.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'playtree.h') diff --git a/playtree.h b/playtree.h index 380f989133..7af1518fd0 100644 --- a/playtree.h +++ b/playtree.h @@ -19,6 +19,8 @@ #ifndef MPLAYER_PLAYTREE_H #define MPLAYER_PLAYTREE_H +#include "bstr.h" + /// \file /// \ingroup Playtree @@ -188,7 +190,7 @@ play_tree_remove_file(play_tree_t* pt,const char* file); /// Add a config paramter to an item. void -play_tree_set_param(play_tree_t* pt, const char* name, const char* val); +play_tree_set_param(play_tree_t* pt, struct bstr name, struct bstr val); /// Remove a config parameter from an item. int @@ -257,7 +259,7 @@ play_tree_cleanup(play_tree_t* pt); /** \ingroup PlaytreeParser */ play_tree_t* -parse_playlist_file(struct m_config *mconfig, char* file); +parse_playlist_file(struct m_config *mconfig, struct bstr file); /// \defgroup PtAPI Playtree highlevel API /// \ingroup Playtree -- cgit v1.2.3