|
|
|
|
@ -1259,8 +1259,10 @@ int yon_config_load_config(YON_CONFIG_TYPE config_type, ...){
|
|
|
|
|
config_str parsed = yon_config_load(command[i],&parsed_size);
|
|
|
|
|
int command_parsed_size=0;
|
|
|
|
|
config_str command_parsed = yon_char_parse(command[i],&command_parsed_size," ");
|
|
|
|
|
yon_config_register(command_parsed[5], command[i],NULL);
|
|
|
|
|
yon_config_set_status(command_parsed[5],0);
|
|
|
|
|
if (!strstr(command_parsed[5],"[*]")){
|
|
|
|
|
yon_config_register(command_parsed[5], command[i],NULL);
|
|
|
|
|
yon_config_set_status(command_parsed[5],0);
|
|
|
|
|
}
|
|
|
|
|
yon_char_parsed_free(command_parsed,command_parsed_size);
|
|
|
|
|
if (parsed_size>0){
|
|
|
|
|
for (int j=0;j<parsed_size;j++){
|
|
|
|
|
@ -1607,7 +1609,7 @@ void yon_config_register(char *key, char *config_load, void *data){
|
|
|
|
|
current->data_type=DICTIONARY_CHAR_TYPE;
|
|
|
|
|
current->load_command=config_load;
|
|
|
|
|
if (yon_dictionary_get(&__yon_config_ignored, current->key)){
|
|
|
|
|
yon_dictionary_rip(__yon_config_ignored);
|
|
|
|
|
__yon_config_ignored = yon_dictionary_rip(__yon_config_ignored);
|
|
|
|
|
}
|
|
|
|
|
int size=0;
|
|
|
|
|
config_str section = yon_char_parse(config_load,&size," ");
|
|
|
|
|
@ -1624,6 +1626,50 @@ void yon_config_register(char *key, char *config_load, void *data){
|
|
|
|
|
config_str section = yon_char_parse(config_load,&size," ");
|
|
|
|
|
current->section=yon_char_new(section[4]);
|
|
|
|
|
yon_char_parsed_free(section,size);
|
|
|
|
|
} else {
|
|
|
|
|
if (!__yon__config__strings||!(current=(yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key))){
|
|
|
|
|
{
|
|
|
|
|
if (__yon__config__strings){
|
|
|
|
|
yon_config_parameter* dict=NULL;
|
|
|
|
|
for_dictionaries(dict,__yon__config__strings){
|
|
|
|
|
if (!dict->next){
|
|
|
|
|
__yon__config__strings=dict;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
__yon__config__strings=yon_config_parameter_append_with_data(__yon__config__strings,key,NULL);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
__yon__config__strings=yon_config_parameter_new_with_data(key,NULL);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
yon_config_set_ignore(key);
|
|
|
|
|
__yon__config__strings = (yon_config_parameter*)yon_dictionary_get_last((dictionary*)__yon__config__strings);
|
|
|
|
|
__yon__config__strings->flag1=0;
|
|
|
|
|
__yon__config__strings->data_type=DICTIONARY_CHAR_TYPE;
|
|
|
|
|
__yon__config__strings->load_command=config_load;
|
|
|
|
|
int size=0;
|
|
|
|
|
config_str section = yon_char_parse(config_load,&size," ");
|
|
|
|
|
__yon__config__strings->section=yon_char_new(section[4]);
|
|
|
|
|
yon_char_parsed_free(section,size);
|
|
|
|
|
}
|
|
|
|
|
else if ((current = (yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key))){
|
|
|
|
|
if ((current->data&&data!=__yon__config__strings->data&&strcmp(__yon__config__strings->data,data))||!current->data){
|
|
|
|
|
yon_config_set_ignore(key);
|
|
|
|
|
|
|
|
|
|
current->data=NULL;
|
|
|
|
|
current->flag1=0;
|
|
|
|
|
current->data_type=DICTIONARY_CHAR_TYPE;
|
|
|
|
|
current->load_command=config_load;
|
|
|
|
|
if (yon_dictionary_get(&__yon_config_ignored, current->key)){
|
|
|
|
|
__yon_config_ignored= yon_dictionary_rip(__yon_config_ignored);
|
|
|
|
|
}
|
|
|
|
|
int size=0;
|
|
|
|
|
config_str section = yon_char_parse(config_load,&size," ");
|
|
|
|
|
current->section=yon_char_new(section[4]);
|
|
|
|
|
yon_char_parsed_free(section,size);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|