pull/61/head
parent 943d2332d1
commit e1050bc706
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -300,6 +300,7 @@ char *yon_char_replace_single(char *source, char *find, char *replace){
char **yon_char_parse(const char * parameters, int *size, char * divider){
*size=0;
if (parameters&&!yon_char_is_empty(divider)){
if (!strstr(parameters,divider)) return yon_char_parsed_new(size,parameters,NULL);
char **string=NULL;
char *paramline=yon_char_new(parameters);
char *param = strstr(paramline,divider);
@ -309,7 +310,7 @@ char **yon_char_parse(const char * parameters, int *size, char * divider){
string[(*size)] = malloc(cur_size+1);
memset(string[(*size)],0,cur_size+1);
memcpy(string[(*size)],paramline,cur_size);
memcpy(paramline,paramline+strlen(string[(*size)])+strlen(divider),strlen(param));
memmove(paramline,paramline+strlen(string[(*size)])+strlen(divider),strlen(param) - strlen(divider) + 1);
// string[(*size)]=yon_char_divide(paramline,strlen(paramline)-strlen(param));
*size=(*size)+1;
}

@ -1263,7 +1263,6 @@ 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);
FILE *file = popen(final_command,"r");
if (file){
int file_size=0;
@ -1353,14 +1352,12 @@ int yon_config_save_registered(char *path){
for_dictionaries(dct,sections_add){
char *command = yon_dictionary_get_data(dct,char*);
yon_launch(command);
printf("%s\n",command);
}
yon_dictionary_free_all(sections_add,free);
if (sections_remove)
for_dictionaries(dct,sections_remove){
char *command = yon_dictionary_get_data(dct,char*);
yon_launch(command);
printf("%s\n",command);
}
yon_dictionary_free_all(sections_remove,free);
if (sections_add||sections_remove)

@ -61,7 +61,7 @@ void yon_locale_set(struct yon_locale *target,char *locale_name){
free(target->title);
target->title = yon_char_new(temp);
}
yon_char_parsed_free(locale_string,size);
// yon_char_parsed_free(locale_string,size);
free(path);
}

Loading…
Cancel
Save