Update of /cvsroot/mplayer/main In directory mail:/var/tmp.root/cvs-serv4769 Modified Files: Makefile cfg-common.h cfg-mencoder.h cfg-mplayer.h configure m_config.c m_config.h m_option.c m_option.h m_struct.c m_struct.h mencoder.c mplayer.c parser-cfg.c parser-mecmd.c parser-mpcmd.c Removed Files: cfgparser.c cfgparser.h Log Message: Removed the historic cfgparser and switched full to the new config parser (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies. Index: Makefile =================================================================== RCS file: /cvsroot/mplayer/main/Makefile,v retrieving revision 1.271 retrieving revision 1.272 diff -u -r1.271 -r1.272 --- Makefile 11 Aug 2003 20:52:24 -0000 1.271 +++ Makefile 13 Aug 2003 16:29:00 -0000 1.272 @@ -22,7 +22,7 @@ DO_MAKE = @ for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done endif -SRCS_COMMON = cpudetect.c codec-cfg.c cfgparser.c spudec.c playtree.c playtreeparser.c asxparser.c vobsub.c subreader.c sub_cc.c find_sub.c m_config.c m_option.c parser-cfg.c m_struct.c +SRCS_COMMON = cpudetect.c codec-cfg.c spudec.c playtree.c playtreeparser.c asxparser.c vobsub.c subreader.c sub_cc.c find_sub.c m_config.c m_option.c parser-cfg.c m_struct.c SRCS_MENCODER = mencoder.c mp_msg-mencoder.c $(SRCS_COMMON) libao2/afmt.c divx4_vbr.c libvo/aclib.c libvo/osd.c libvo/sub.c libvo/font_load.c libvo/font_load_ft.c xvid_vbr.c parser-mecmd.c SRCS_MPLAYER = mplayer.c mp_msg.c $(SRCS_COMMON) mixer.c parser-mpcmd.c Index: cfg-common.h =================================================================== RCS file: /cvsroot/mplayer/main/cfg-common.h,v retrieving revision 1.105 retrieving revision 1.106 diff -u -r1.105 -r1.106 --- cfg-common.h 11 Aug 2003 01:38:50 -0000 1.105 +++ cfg-common.h 13 Aug 2003 16:29:00 -0000 1.106 @@ -266,9 +266,9 @@ /* defined in libmpdemux: */ extern int hr_mp3_seek; -extern config_t demux_rawaudio_opts[]; -extern config_t demux_rawvideo_opts[]; -extern config_t cdda_opts[]; +extern m_option_t demux_rawaudio_opts[]; +extern m_option_t demux_rawvideo_opts[]; +extern m_option_t cdda_opts[]; extern char* audio_stream; extern char* sub_stream; @@ -283,7 +283,7 @@ #endif #ifdef USE_TV -struct config tvopts_conf[]={ +m_option_t tvopts_conf[]={ {"on", "-tv on is deprecated, use tv:// instead\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, #ifdef HAVE_TV_BSDBT848 {"immediatemode", &tv_param_immediate, CONF_TYPE_FLAG, 0, 0, 0, NULL}, @@ -345,7 +345,7 @@ extern float sws_chr_sharpen; extern float sws_lum_sharpen; -struct config scaler_filter_conf[]={ +m_option_t scaler_filter_conf[]={ {"lgb", &sws_lum_gblur, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL}, {"cgb", &sws_chr_gblur, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL}, {"cvs", &sws_chr_vshift, CONF_TYPE_INT, 0, 0, 0, NULL}, @@ -366,7 +366,7 @@ extern int vivo_param_vformat; extern char *dvd_device, *cdrom_device; -struct config vivoopts_conf[]={ +m_option_t vivoopts_conf[]={ {"version", &vivo_param_version, CONF_TYPE_INT, 0, 0, 0, NULL}, /* audio options */ {"acodec", &vivo_param_acodec, CONF_TYPE_STRING, 0, 0, 0, NULL}, @@ -387,7 +387,7 @@ extern m_obj_settings_t* vf_settings; extern m_obj_list_t vf_obj_list; -struct config mfopts_conf[]={ +m_option_t mfopts_conf[]={ {"on", "-mf on is deprecated, use mf://files instead\n", CONF_TYPE_PRINT, 0, 0, 1, NULL}, {"w", &mf_w, CONF_TYPE_INT, 0, 0, 0, NULL}, {"h", &mf_h, CONF_TYPE_INT, 0, 0, 0, NULL}, @@ -400,18 +400,20 @@ #include "libaf/af.h" extern af_cfg_t af_cfg; // Audio filter configuration, defined in libmpcodecs/dec_audio.c -struct config audio_filter_conf[]={ +m_option_t audio_filter_conf[]={ {"list", &af_cfg.list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL}, {"force", &af_cfg.force, CONF_TYPE_INT, CONF_RANGE, 0, 7, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; #ifdef USE_LIBAVCODEC -extern struct config lavc_decode_opts_conf[]; +extern m_option_t lavc_decode_opts_conf[]; #endif #ifdef HAVE_XVID -extern struct config xvid_dec_opts[]; +extern m_option_t xvid_dec_opts[]; #endif + +int dvd_parse_chapter_range(m_option_t*, const char*); #endif Index: cfg-mencoder.h =================================================================== RCS file: /cvsroot/mplayer/main/cfg-mencoder.h,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- cfg-mencoder.h 11 Aug 2003 01:38:50 -0000 1.68 +++ cfg-mencoder.h 13 Aug 2003 16:29:00 -0000 1.69 @@ -17,11 +17,11 @@ extern char *pp_help; #ifdef HAVE_DIVX4ENCORE -extern struct config divx4opts_conf[]; +extern m_option_t divx4opts_conf[]; #endif #ifdef HAVE_MP3LAME -struct config lameopts_conf[]={ +m_option_t lameopts_conf[]={ {"q", &lame_param_quality, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL}, {"aq", &lame_param_algqual, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL}, {"vbr", &lame_param_vbr, CONF_TYPE_INT, CONF_RANGE, 0, vbr_max_indicator, NULL}, @@ -45,20 +45,20 @@ #endif #ifdef USE_LIBAVCODEC -extern struct config lavcopts_conf[]; +extern m_option_t lavcopts_conf[]; #endif #ifdef USE_WIN32DLL -extern struct config vfwopts_conf[]; +extern m_option_t vfwopts_conf[]; #endif #ifdef HAVE_XVID -extern struct config xvidencopts_conf[]; +extern m_option_t xvidencopts_conf[]; #endif -extern struct config nuvopts_conf[]; +extern m_option_t nuvopts_conf[]; -struct config ovc_conf[]={ +m_option_t ovc_conf[]={ {"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL}, {"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL}, {"divx4", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_DIVX4, NULL}, @@ -99,7 +99,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL} }; -struct config oac_conf[]={ +m_option_t oac_conf[]={ {"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL}, {"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL}, #ifdef HAVE_MP3LAME @@ -117,7 +117,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL} }; -struct config info_conf[]={ +m_option_t info_conf[]={ {"name", &info_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"artist", &info_artist, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"genre", &info_genre, CONF_TYPE_STRING, 0, 0, 0, NULL}, @@ -137,7 +137,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL} }; -struct config of_conf[]={ +m_option_t of_conf[]={ {"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL}, {"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL}, {"help", "\nAvailable output formats:\n" @@ -147,7 +147,7 @@ {NULL, NULL, 0, 0, 0, 0, NULL} }; -static config_t mencoder_opts[]={ +m_option_t mencoder_opts[]={ /* name, pointer, type, flags, min, max */ {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, /* this must be the first!!! */ Index: cfg-mplayer.h =================================================================== RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v retrieving revision 1.201 retrieving revision 1.202 diff -u -r1.201 -r1.202 --- cfg-mplayer.h 11 Aug 2003 01:38:50 -0000 1.201 +++ cfg-mplayer.h 13 Aug 2003 16:29:00 -0000 1.202 @@ -86,17 +86,17 @@ #endif #ifdef HAVE_AA -extern int vo_aa_parseoption(struct config * conf, char *opt, char * param); -extern void vo_aa_revertoption(config_t* opt,char* param); +extern int vo_aa_parseoption(m_option_t* conf, char *opt, char * param); +extern void vo_aa_revertoption(m_option_t* opt,char* param); #endif #ifdef HAVE_ZR -extern int vo_zr_parseoption(struct config * conf, char *opt, char * param); -extern void vo_zr_revertoption(config_t* opt,char* pram); +extern int vo_zr_parseoption(m_option_t* conf, char *opt, char * param); +extern void vo_zr_revertoption(m_option_t* opt,char* pram); #endif #ifdef HAVE_DXR2 -extern config_t dxr2_opts[]; +extern m_option_t dxr2_opts[]; #endif #ifdef STREAMING_LIVE_DOT_COM @@ -126,7 +126,7 @@ extern float monitor_aspect; /* Options related to audio out plugins */ -struct config ao_plugin_conf[]={ +m_option_t ao_plugin_conf[]={ {"list", &ao_plugin_cfg.plugin_list, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"delay", &ao_plugin_cfg.pl_delay_len, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, {"format", &ao_plugin_cfg.pl_format_type, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, @@ -138,7 +138,7 @@ }; #ifdef HAVE_JPEG -struct config jpeg_conf[]={ +m_option_t jpeg_conf[]={ {"progressive", &jpeg_progressive_mode, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noprogressive", &jpeg_progressive_mode, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"baseline", &jpeg_baseline, CONF_TYPE_FLAG, 0, 0, 1, NULL}, @@ -169,7 +169,7 @@ * by Folke */ -static config_t mplayer_opts[]={ +m_option_t mplayer_opts[]={ /* name, pointer, type, flags, min, max */ {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, /* this don't need anymore to be the first!!! */ Index: configure =================================================================== RCS file: /cvsroot/mplayer/main/configure,v retrieving revision 1.749 retrieving revision 1.750 diff -u -r1.749 -r1.750 --- configure 12 Aug 2003 23:18:02 -0000 1.749 +++ configure 13 Aug 2003 16:29:00 -0000 1.750 @@ -165,7 +165,6 @@ --disable-cdparanoia Disable cdparanoia support [autodetect] --disable-freetype Disable freetype2 font rendering support [autodetect] --disable-unrarlib Disable Unique RAR File Library [enabled] - --disable-new-conf Disable new experimental config parser code [enabled] --enable-menu Enable OSD menu support (NOT DVD MENU) [disabled] --disable-sortsub Disable subtitles sorting [enabled] --enable-fribidi Enable using the FriBiDi libs [disabled] @@ -1131,7 +1130,6 @@ _big_endian=auto _freetype=auto _shared_pp=no -_new_conf=yes _menu=no _qtx=auto _macosx=auto @@ -1355,9 +1353,6 @@ --enable-shared-pp) _shared_pp=yes ;; --disable-shared-pp) _shared_pp=no ;; - --enable-new-conf) _new_conf=yes ;; - --disable-new-conf) _new_conf=no ;; - --enable-menu) _menu=yes ;; --disable-menu) _menu=no ;; @@ -4980,17 +4975,8 @@ echocheck "shared postprocess lib" echores "$_shared_pp" -echocheck "New config" -if test "$_new_conf" = yes ; then - _def_new_conf='#define NEW_CONFIG 1' -else - _def_new_conf='#undef NEW_CONFIG' -fi -echores "$_new_conf" - echocheck "OSD menu" if test "$_menu" = yes ; then - test "$_new_conf" != yes && die "New config support needed for the OSD menu (--enable-new-conf)." _def_menu='#define HAVE_MENU 1' else _def_menu='#undef HAVE_MENU' @@ -5942,9 +5928,6 @@ /* enables / disables new input joystick support */ $_def_joystick - -/* enables / disables new config */ -$_def_new_conf /* enables / disables QTX codecs */ $_def_qtx Index: m_config.c =================================================================== RCS file: /cvsroot/mplayer/main/m_config.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- m_config.c 12 Apr 2003 13:40:30 -0000 1.7 +++ m_config.c 13 Aug 2003 16:29:00 -0000 1.8 @@ -1,8 +1,5 @@ - #include "config.h" -#ifdef NEW_CONFIG - #include <stdlib.h> #include <stdio.h> #include <errno.h> @@ -11,7 +8,6 @@ #include <assert.h> #endif - #include "m_config.h" #include "m_option.h" #include "mp_msg.h" @@ -379,5 +375,3 @@ } printf("\nTotal: %d options\n",count); } - -#endif // NEW_CONFIG Index: m_config.h =================================================================== RCS file: /cvsroot/mplayer/main/m_config.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- m_config.h 12 Aug 2003 18:00:08 -0000 1.4 +++ m_config.h 13 Aug 2003 16:29:00 -0000 1.5 @@ -1,7 +1,5 @@ - -#ifndef NEW_CONFIG -#warning "Including m_config.h but NEW_CONFIG is disabled" -#else +#ifndef _M_CONFIG_H +#define _M_CONFIG_H typedef struct m_config_option m_config_option_t; typedef struct m_config_save_slot m_config_save_slot_t; @@ -61,33 +59,4 @@ void m_config_print_option_list(m_config_t *config); -///////////////////////////////////////////////////////////////////////////////////// -/////////////////////////// Backward compat. stuff //////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////// - -typedef struct config config_t; -struct config { - char *name; - void *p; - struct m_option_type* type; - unsigned int flags; - double min,max; - void* priv; -}; - - -#define CONF_MIN (1<<0) -#define CONF_MAX (1<<1) -#define CONF_RANGE (CONF_MIN|CONF_MAX) -#define CONF_NOCFG (1<<2) -#define CONF_NOCMD (1<<3) -#define CONF_GLOBAL (1<<4) -#define CONF_NOSAVE (1<<5) -#define CONF_OLD (1<<6) - -#define ERR_NOT_AN_OPTION -1 -#define ERR_MISSING_PARAM -2 -#define ERR_OUT_OF_RANGE -3 -#define ERR_FUNC_ERR -4 - -#endif +#endif /* _M_CONFIG_H */ Index: m_option.c =================================================================== RCS file: /cvsroot/mplayer/main/m_option.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- m_option.c 13 Aug 2003 12:09:25 -0000 1.15 +++ m_option.c 13 Aug 2003 16:29:00 -0000 1.16 @@ -1,8 +1,5 @@ - #include "config.h" -#ifdef NEW_CONFIG - #include <stdlib.h> #include <string.h> #include <math.h> @@ -1787,5 +1784,3 @@ NULL, NULL }; - -#endif Index: m_option.h =================================================================== RCS file: /cvsroot/mplayer/main/m_option.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- m_option.h 13 Aug 2003 09:42:53 -0000 1.7 +++ m_option.h 13 Aug 2003 16:29:00 -0000 1.8 @@ -1,7 +1,5 @@ - -#ifndef NEW_CONFIG -#warning "Including m_option.h but NEW_CONFIG is disabled" -#else +#ifndef _M_OPTION_H +#define _M_OPTION_H typedef struct m_option_type m_option_type_t; typedef struct m_option m_option_t; @@ -76,25 +74,25 @@ extern m_obj_params_t m_span_params_def; -// Don't be stupid keep tho old names ;-) +// FIXME: backward compatibility #define CONF_TYPE_FLAG (&m_option_type_flag) #define CONF_TYPE_INT (&m_option_type_int) #define CONF_TYPE_FLOAT (&m_option_type_float) -#define CONF_TYPE_STRING (&m_option_type_string) +#define CONF_TYPE_STRING (&m_option_type_string) #define CONF_TYPE_FUNC (&m_option_type_func) #define CONF_TYPE_FUNC_PARAM (&m_option_type_func_param) #define CONF_TYPE_PRINT (&m_option_type_print) #define CONF_TYPE_PRINT_INDIRECT (&m_option_type_print_indirect) #define CONF_TYPE_FUNC_FULL (&m_option_type_func_full) #define CONF_TYPE_SUBCONFIG (&m_option_type_subconfig) -#define CONF_TYPE_STRING_LIST (&m_option_type_string_list) +#define CONF_TYPE_STRING_LIST (&m_option_type_string_list) #define CONF_TYPE_POSITION (&m_option_type_position) -#define CONF_TYPE_IMGFMT (&m_option_type_imgfmt) +#define CONF_TYPE_IMGFMT (&m_option_type_imgfmt) #define CONF_TYPE_SPAN (&m_option_type_span) #define CONF_TYPE_OBJ_SETTINGS_LIST (&m_option_type_obj_settings_list) -#define CONF_TYPE_OBJ_PRESETS (&m_option_type_obj_presets) -#define CONF_TYPE_CUSTOM_URL (&m_option_type_custom_url) -#define CONF_TYPE_OBJ_PARAMS (&m_option_type_obj_params) +#define CONF_TYPE_OBJ_PRESETS (&m_option_type_obj_presets) +#define CONF_TYPE_CUSTOM_URL (&m_option_type_custom_url) +#define CONF_TYPE_OBJ_PARAMS (&m_option_type_obj_params) ///////////////////////////////////////////////////////////////////////////////////////////// @@ -126,9 +124,6 @@ void (*free)(void* dst); }; -/// This is the same thing as a struct config it have been renamed -/// to remove this config_t, m_config_t mess. Sorry about that, -/// config_t is still provided for backward compat. struct m_option { char *name; void *p; @@ -161,6 +156,16 @@ // Emulate old behaviour by pushing the option only if it was set by the user #define M_OPT_OLD (1<<6) +// FIXME: backward compatibility +#define CONF_MIN M_OPT_MIN +#define CONF_MAX M_OPT_MAX +#define CONF_RANGE M_OPT_RANGE +#define CONF_NOCFG M_OPT_NOCFG +#define CONF_NOCMD M_OPT_NOCMD +#define CONF_GLOBAL M_OPT_GLOBAL +#define CONF_NOSAVE M_OPT_NOSAVE +#define CONF_OLD M_OPT_OLD + ///////////////////////////// Option type flags /////////////////////////////////// @@ -206,9 +211,15 @@ #define M_OPT_MISSING_PARAM -2 #define M_OPT_INVALID -3 #define M_OPT_OUT_OF_RANGE -4 -#define M_OPT_PARSER_ERR -5 +#define M_OPT_PARSER_ERR -5 #define M_OPT_EXIT -6 +// FIXME: backward compatibility +#define ERR_NOT_AN_OPTION M_OPT_UNKNOWN +#define ERR_MISSING_PARAM M_OPT_MISSING_PARAM +#define ERR_OUT_OF_RANGE M_OPT_OUT_OF_RANGE +#define ERR_FUNC_ERR M_OPT_PARSER_ERR + m_option_t* m_option_list_find(m_option_t* list,char* name); inline static int @@ -250,4 +261,4 @@ opt->type->free(dst); } -#endif +#endif /* _M_OPTION_H */ Index: m_struct.c =================================================================== RCS file: /cvsroot/mplayer/main/m_struct.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- m_struct.c 2 Apr 2003 16:05:21 -0000 1.2 +++ m_struct.c 13 Aug 2003 16:29:00 -0000 1.3 @@ -1,8 +1,5 @@ - #include "config.h" -#ifdef NEW_CONFIG - #include <stdlib.h> #include <string.h> @@ -113,7 +110,3 @@ return r; } - - - -#endif // NEW_CONFIG Index: m_struct.h =================================================================== RCS file: /cvsroot/mplayer/main/m_struct.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- m_struct.h 14 Mar 2003 17:50:58 -0000 1.2 +++ m_struct.h 13 Aug 2003 16:29:00 -0000 1.3 @@ -1,7 +1,5 @@ - -#ifndef NEW_CONFIG -#warning "Including m_struct.h but NEW_CONFIG is disabled" -#else +#ifndef _M_STRUCT_H +#define _M_STRUCT_H ///////////////////// A struct setter //////////////////////// @@ -47,4 +45,4 @@ struct m_option* m_struct_get_field(m_struct_t* st,char* f); -#endif +#endif /* _M_STRUCT_H */ Index: mencoder.c =================================================================== RCS file: /cvsroot/mplayer/main/mencoder.c,v retrieving revision 1.217 retrieving revision 1.218 diff -u -r1.217 -r1.218 --- mencoder.c 22 Jul 2003 10:46:22 -0000 1.217 +++ mencoder.c 13 Aug 2003 16:29:00 -0000 1.218 @@ -33,14 +33,9 @@ #include "cpudetect.h" #include "codec-cfg.h" -#ifdef NEW_CONFIG #include "m_option.h" #include "m_config.h" #include "parser-mecmd.h" -#else -#include "cfgparser.h" -#include "playtree.h" -#endif #include "libmpdemux/stream.h" #include "libmpdemux/demuxer.h" @@ -212,22 +207,18 @@ m_config_t* mconfig; -#ifdef NEW_CONFIG -extern int -m_config_parse_config_file(m_config_t* config, char *conffile); -#endif - +extern int m_config_parse_config_file(m_config_t* config, char *conffile); -static int cfg_inc_verbose(struct config *conf){ ++verbose; return 0;} +static int cfg_inc_verbose(m_option_t *conf){ ++verbose; return 0;} -static int cfg_include(struct config *conf, char *filename){ +static int cfg_include(m_option_t *conf, char *filename){ return m_config_parse_config_file(mconfig, filename); } static char *seek_to_sec=NULL; static off_t seek_to_byte=0; -static int parse_end_at(struct config *conf, const char* param); +static int parse_end_at(m_option_t *conf, const char* param); //static uint8_t* flip_upside_down(uint8_t* dst, const uint8_t* src, int width, int height); #include "get_path.c" @@ -343,12 +334,7 @@ double v_pts_corr=0; double v_timer_corr=0; -#ifdef NEW_CONFIG m_entry_t* filelist = NULL; -#else -play_tree_t* playtree; -play_tree_iter_t* playtree_iter; -#endif char* filename=NULL; char* frameno_filename="frameno.avi"; @@ -413,8 +399,6 @@ else mp_msg(MSGT_DEMUXER,MSGL_ERR,MSGTR_FormatNotRecognized); } - // New config code -#ifdef NEW_CONFIG mconfig = m_config_new(); m_config_register_options(mconfig,mencoder_opts); parse_cfgfiles(mconfig); @@ -422,26 +406,6 @@ if(!filelist) mencoder_exit(1, "error parsing cmdline"); m_entry_set_options(mconfig,&filelist[0]); filename = filelist[0].name; - // Warn the user if he put more than 1 filename ? -#else - playtree = play_tree_new(); - mconfig = m_config_new(playtree); - m_config_register_options(mconfig,mencoder_opts); - parse_cfgfiles(mconfig); - - if(m_config_parse_command_line(mconfig, argc, argv) < 0) mencoder_exit(1, "error parsing cmdline"); - playtree = play_tree_cleanup(playtree); - if(playtree) { - playtree_iter = play_tree_iter_new(playtree,mconfig); - if(playtree_iter) { - if(play_tree_iter_step(playtree_iter,0,0) != PLAY_TREE_ITER_ENTRY) { - play_tree_iter_free(playtree_iter); - playtree_iter = NULL; - } - filename = play_tree_iter_get_file(playtree_iter,1); - } - } -#endif if(!filename){ printf(MSGTR_MissingFilename); @@ -1333,7 +1297,7 @@ return interrupted; } -static int parse_end_at(struct config *conf, const char* param) +static int parse_end_at(m_option_t *conf, const char* param) { end_at_type = END_AT_NONE; Index: mplayer.c =================================================================== RCS file: /cvsroot/mplayer/main/mplayer.c,v retrieving revision 1.715 retrieving revision 1.716 diff -u -r1.715 -r1.716 --- mplayer.c 12 Aug 2003 13:22:09 -0000 1.715 +++ mplayer.c 13 Aug 2003 16:29:00 -0000 1.716 @@ -138,9 +138,9 @@ // Config file //**************************************************************************// -static int cfg_inc_verbose(struct config *conf){ ++verbose; return 0;} +static int cfg_inc_verbose(m_option_t *conf){ ++verbose; return 0;} -static int cfg_include(struct config *conf, char *filename){ +static int cfg_include(m_option_t *conf, char *filename){ return m_config_parse_config_file(mconfig, filename); } Index: parser-cfg.c =================================================================== RCS file: /cvsroot/mplayer/main/parser-cfg.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- parser-cfg.c 4 Jun 2003 22:06:44 -0000 1.4 +++ parser-cfg.c 13 Aug 2003 16:29:01 -0000 1.5 @@ -1,8 +1,5 @@ - #include "config.h" -#ifdef NEW_CONFIG - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -211,5 +208,3 @@ --recursion_depth; return ret; } - -#endif Index: parser-mecmd.c =================================================================== RCS file: /cvsroot/mplayer/main/parser-mecmd.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- parser-mecmd.c 2 Apr 2003 16:13:16 -0000 1.5 +++ parser-mecmd.c 13 Aug 2003 16:29:01 -0000 1.6 @@ -1,8 +1,5 @@ - #include "config.h" -#ifdef NEW_CONFIG - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -17,7 +14,6 @@ #include "m_config.h" #include "parser-mecmd.h" - void m_entry_list_free(m_entry_t* lst) { int i,j; @@ -139,5 +135,3 @@ m_entry_list_free(lst); return NULL; } - -#endif Index: parser-mpcmd.c =================================================================== RCS file: /cvsroot/mplayer/main/parser-mpcmd.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- parser-mpcmd.c 8 Aug 2003 20:07:38 -0000 1.12 +++ parser-mpcmd.c 13 Aug 2003 16:29:01 -0000 1.13 @@ -1,8 +1,5 @@ - #include "config.h" -#ifdef NEW_CONFIG - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -219,5 +216,3 @@ play_tree_free(root,1); return NULL; } - -#endif --- cfgparser.c DELETED --- --- cfgparser.h DELETED ---