comparison m_config.c @ 25962:afa125da85cf

typo fix: inited --> initialized
author diego
date Thu, 14 Feb 2008 14:23:55 +0000
parents 4344e84f7a9f
children 6e53dfe38594
comparison
equal deleted inserted replaced
25961:354ad909efcf 25962:afa125da85cf
35 list_options(m_option_t *opt, char* name, char *param); 35 list_options(m_option_t *opt, char* name, char *param);
36 36
37 m_config_t* 37 m_config_t*
38 m_config_new(void) { 38 m_config_new(void) {
39 m_config_t* config; 39 m_config_t* config;
40 static int inited = 0; 40 static int initialized = 0;
41 static m_option_type_t profile_opt_type; 41 static m_option_type_t profile_opt_type;
42 static m_option_t ref_opts[] = { 42 static m_option_t ref_opts[] = {
43 { "profile", NULL, &profile_opt_type, CONF_NOSAVE, 0, 0, NULL }, 43 { "profile", NULL, &profile_opt_type, CONF_NOSAVE, 0, 0, NULL },
44 { "show-profile", show_profile, CONF_TYPE_PRINT_FUNC, CONF_NOCFG, 0, 0, NULL }, 44 { "show-profile", show_profile, CONF_TYPE_PRINT_FUNC, CONF_NOCFG, 0, 0, NULL },
45 { "list-options", list_options, CONF_TYPE_PRINT_FUNC, CONF_NOCFG, 0, 0, NULL }, 45 { "list-options", list_options, CONF_TYPE_PRINT_FUNC, CONF_NOCFG, 0, 0, NULL },
47 }; 47 };
48 int i; 48 int i;
49 49
50 config = calloc(1,sizeof(m_config_t)); 50 config = calloc(1,sizeof(m_config_t));
51 config->lvl = 1; // 0 Is the defaults 51 config->lvl = 1; // 0 Is the defaults
52 if(!inited) { 52 if(!initialized) {
53 inited = 1; 53 initialized = 1;
54 profile_opt_type = m_option_type_string_list; 54 profile_opt_type = m_option_type_string_list;
55 profile_opt_type.parse = parse_profile; 55 profile_opt_type.parse = parse_profile;
56 profile_opt_type.set = set_profile; 56 profile_opt_type.set = set_profile;
57 } 57 }
58 config->self_opts = malloc(sizeof(ref_opts)); 58 config->self_opts = malloc(sizeof(ref_opts));