From fb33e286b5c23dbe8d0aeaf63cd3490bed3906e3 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 26 Apr 2008 10:44:59 +0300 Subject: Move global mconfig to mpctx The global was used in the function cfg_include which handles the -include option. Make the address available in that function by creating a new dynamically allocated option in m_config_new that has the address in the option's private data. asxparser.c also used the global. Making it available through all ways the code could get called required a number of relatively straightforward changes to playtree and menu code. --- playtree.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'playtree.h') diff --git a/playtree.h b/playtree.h index 78543db995..dfd30d6707 100644 --- a/playtree.h +++ b/playtree.h @@ -227,8 +227,9 @@ play_tree_iter_get_file(play_tree_iter_t* iter, int d); /// Create a playtree from a playlist file. /** \ingroup PlaytreeParser */ +struct m_config; play_tree_t* -parse_playtree(struct stream *stream, int forced); +parse_playtree(struct stream *stream, struct m_config *mconfig, int forced); /// Clean a tree by destroying all empty elements. play_tree_t* @@ -238,7 +239,7 @@ play_tree_cleanup(play_tree_t* pt); /** \ingroup PlaytreeParser */ play_tree_t* -parse_playlist_file(char* file); +parse_playlist_file(struct m_config *mconfig, char* file); /// \defgroup PtAPI Playtree highlevel API /// \ingroup Playtree -- cgit v1.2.3