|
|
|
|
@ -1554,6 +1554,7 @@ void yon_config_register(char *key, char *config_load, void *data){
|
|
|
|
|
key=yon_char_new(key);
|
|
|
|
|
config_load=yon_char_new(config_load);
|
|
|
|
|
yon_config_parameter *current = NULL;
|
|
|
|
|
if (data){
|
|
|
|
|
if (!__yon__config__strings||!(current=(yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key))){
|
|
|
|
|
{
|
|
|
|
|
if (__yon__config__strings){
|
|
|
|
|
@ -1596,6 +1597,16 @@ void yon_config_register(char *key, char *config_load, void *data){
|
|
|
|
|
yon_char_parsed_free(section,size);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if ((current = (yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key))) {
|
|
|
|
|
current->data=NULL;
|
|
|
|
|
current->flag1=0;
|
|
|
|
|
current->data_type=DICTIONARY_CHAR_TYPE;
|
|
|
|
|
current->load_command=config_load;
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
config_str yon_config_load(char *command, int *str_len){
|
|
|
|
|
@ -1855,7 +1866,7 @@ char *yon_config_save_simple(YON_CONFIG_TYPE target, char *path){
|
|
|
|
|
if (parameters){
|
|
|
|
|
yon_char_parsed_prepend_strings(parameters,parameters_size,ubconfig_set_command(path));
|
|
|
|
|
char *final_command = yon_char_parsed_to_string(parameters,parameters_size,";");
|
|
|
|
|
printf("%s\n",final_command);
|
|
|
|
|
yon_debug_output("%s\n",final_command);
|
|
|
|
|
FILE *file = popen(final_command,"r");
|
|
|
|
|
if (file){
|
|
|
|
|
int file_size=0;
|
|
|
|
|
|