|
|
|
@ -1263,7 +1263,6 @@ char *yon_config_save_simple(YON_CONFIG_TYPE target, char *path){
|
|
|
|
if (parameters){
|
|
|
|
if (parameters){
|
|
|
|
yon_char_parsed_prepend_strings(parameters,parameters_size,ubconfig_set_command(path));
|
|
|
|
yon_char_parsed_prepend_strings(parameters,parameters_size,ubconfig_set_command(path));
|
|
|
|
char *final_command = yon_char_parsed_to_string(parameters,parameters_size,";");
|
|
|
|
char *final_command = yon_char_parsed_to_string(parameters,parameters_size,";");
|
|
|
|
printf("%s\n",final_command);
|
|
|
|
|
|
|
|
FILE *file = popen(final_command,"r");
|
|
|
|
FILE *file = popen(final_command,"r");
|
|
|
|
if (file){
|
|
|
|
if (file){
|
|
|
|
int file_size=0;
|
|
|
|
int file_size=0;
|
|
|
|
@ -1353,14 +1352,12 @@ int yon_config_save_registered(char *path){
|
|
|
|
for_dictionaries(dct,sections_add){
|
|
|
|
for_dictionaries(dct,sections_add){
|
|
|
|
char *command = yon_dictionary_get_data(dct,char*);
|
|
|
|
char *command = yon_dictionary_get_data(dct,char*);
|
|
|
|
yon_launch(command);
|
|
|
|
yon_launch(command);
|
|
|
|
printf("%s\n",command);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_dictionary_free_all(sections_add,free);
|
|
|
|
yon_dictionary_free_all(sections_add,free);
|
|
|
|
if (sections_remove)
|
|
|
|
if (sections_remove)
|
|
|
|
for_dictionaries(dct,sections_remove){
|
|
|
|
for_dictionaries(dct,sections_remove){
|
|
|
|
char *command = yon_dictionary_get_data(dct,char*);
|
|
|
|
char *command = yon_dictionary_get_data(dct,char*);
|
|
|
|
yon_launch(command);
|
|
|
|
yon_launch(command);
|
|
|
|
printf("%s\n",command);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_dictionary_free_all(sections_remove,free);
|
|
|
|
yon_dictionary_free_all(sections_remove,free);
|
|
|
|
if (sections_add||sections_remove)
|
|
|
|
if (sections_add||sections_remove)
|
|
|
|
|