Mercurial > mplayer.hg
diff input/input.c @ 10594:57bdcdb061d7
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.
| author | alex |
|---|---|
| date | Wed, 13 Aug 2003 16:29:32 +0000 |
| parents | e4c79edf2be9 |
| children | cdfd4a43c406 |
line wrap: on
line diff
--- a/input/input.c Wed Aug 13 16:01:53 2003 +0000 +++ b/input/input.c Wed Aug 13 16:29:32 2003 +0000 @@ -25,7 +25,8 @@ #include "../osdep/keycodes.h" #include "../osdep/timer.h" #include "../mp_msg.h" -#include "../cfgparser.h" +#include "../m_config.h" +#include "../m_option.h" #include "joystick.h" @@ -399,11 +400,11 @@ static char* in_file = NULL; static int in_file_fd = -1; -static int mp_input_print_key_list(config_t* cfg); -static int mp_input_print_cmd_list(config_t* cfg); +static int mp_input_print_key_list(m_option_t* cfg); +static int mp_input_print_cmd_list(m_option_t* cfg); // Our command line options -static config_t input_conf[] = { +static m_option_t input_conf[] = { { "conf", &config_file, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL }, { "ar-delay", &ar_delay, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, NULL }, { "ar-rate", &ar_rate, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, NULL }, @@ -414,7 +415,7 @@ { NULL, NULL, 0, 0, 0, 0, NULL} }; -static config_t mp_input_opts[] = { +static m_option_t mp_input_opts[] = { { "input", &input_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, { "nojoystick", &use_joystick, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL }, { "joystick", &use_joystick, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL }, @@ -1537,7 +1538,7 @@ m_config_register_options(cfg,mp_input_opts); } -static int mp_input_print_key_list(config_t* cfg) { +static int mp_input_print_key_list(m_option_t* cfg) { int i; printf("\n"); for(i= 0; key_names[i].name != NULL ; i++) @@ -1545,7 +1546,7 @@ exit(0); } -static int mp_input_print_cmd_list(config_t* cfg) { +static int mp_input_print_cmd_list(m_option_t* cfg) { mp_cmd_t *cmd; int i,j; char* type; @@ -1596,5 +1597,3 @@ mp_cmd_free(cmd); return 0; } - -
