diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-12 01:56:42 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-12 01:56:42 +0000 |
commit | 126725660d4bebbab8570221c5681dc01d98fe86 (patch) | |
tree | 3ebdca9acf6fae38bfdba5b4159fbd16177da828 /cfgparser.h | |
parent | 0f622e2d6fe735d727b9d8fd12cea22e03fd954b (diff) | |
download | mpv-126725660d4bebbab8570221c5681dc01d98fe86.tar.bz2 mpv-126725660d4bebbab8570221c5681dc01d98fe86.tar.xz |
New config system + cleanup of header inter dependency
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8165 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'cfgparser.h')
-rw-r--r-- | cfgparser.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/cfgparser.h b/cfgparser.h index c2deb3af2e..2e627246d3 100644 --- a/cfgparser.h +++ b/cfgparser.h @@ -2,6 +2,14 @@ * command line and config file parser */ +#ifdef NEW_CONFIG +#ifdef MP_DEBUG +#warning "NEW_CONFIG defined but still using the old cfgparser.h" +#endif +#include "m_config.h" +#include "m_option.h" +#else + #ifndef __CONFIG_H #define __CONFIG_H @@ -32,13 +40,14 @@ #define CONF_NOCMD (1<<3) #define CONF_GLOBAL (1<<4) #define CONF_NOSAVE (1<<5) +#define CONF_OLD (1<<6) typedef struct config config_t; typedef struct m_config m_config_t; typedef struct config_save config_save_t; -#include "playtree.h" +struct play_tree; typedef void (*cfg_default_func_t)(config_t *, char*); @@ -62,9 +71,9 @@ struct m_config { int parser_mode; /* COMMAND_LINE or CONFIG_FILE */ int flags; char* sub_conf; // When we save a subconfig - play_tree_t* pt; // play tree we use for playlist option, etc - play_tree_t* last_entry; // last added entry - play_tree_t* last_parent; // if last_entry is NULL we must create child of this + struct play_tree* pt; // play tree we use for playlist option, etc + struct play_tree* last_entry; // last added entry + struct play_tree* last_parent; // if last_entry is NULL we must create child of this int recursion_depth; }; @@ -97,7 +106,7 @@ int m_config_parse_config_file(m_config_t *config, char *conffile); */ int m_config_parse_command_line(m_config_t* config, int argc, char **argv); -m_config_t* m_config_new(play_tree_t* pt); +m_config_t* m_config_new(struct play_tree* pt); void m_config_free(m_config_t* config); @@ -190,3 +199,5 @@ float m_config_get_float (m_config_t *config, char* arg,int* err_ret); #endif /* __CONFIG_H */ + +#endif /* NEW_CONFIG */ |