|
|
|
@ -731,7 +731,7 @@ char *yon_char_parsed_to_string(config_str parsed, int size, char *divider_repla
|
|
|
|
if (!yon_char_is_empty(final_string)){
|
|
|
|
if (!yon_char_is_empty(final_string)){
|
|
|
|
return final_string;
|
|
|
|
return final_string;
|
|
|
|
} else return NULL;
|
|
|
|
} else return NULL;
|
|
|
|
}
|
|
|
|
} else if (size==0&&!parsed) return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int yon_ubl_check_root(){
|
|
|
|
int yon_ubl_check_root(){
|
|
|
|
@ -1067,7 +1067,12 @@ int yon_config_remove_element(char *key, char *delete, char *divider){
|
|
|
|
found = 1;
|
|
|
|
found = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
char *final_string = yon_char_parsed_to_string(parsed,size,divider);
|
|
|
|
char *final_string = NULL;
|
|
|
|
|
|
|
|
if (size>0) final_string = yon_char_parsed_to_string(parsed,size,divider);
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
final_string = malloc(sizeof(char)*1);
|
|
|
|
|
|
|
|
final_string[0]='\0';
|
|
|
|
|
|
|
|
}
|
|
|
|
if (final_string){
|
|
|
|
if (final_string){
|
|
|
|
free(dict->data);
|
|
|
|
free(dict->data);
|
|
|
|
dict->data=final_string;
|
|
|
|
dict->data=final_string;
|
|
|
|
@ -1090,7 +1095,17 @@ int yon_config_append_element(char *key, char *append, char *divider){
|
|
|
|
} else return 0;
|
|
|
|
} else return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void yon_config_set_status(int status){
|
|
|
|
int yon_config_set_status(char *key, int status){
|
|
|
|
|
|
|
|
check_config{
|
|
|
|
|
|
|
|
if(yon_dictionary_get((dictionary**)&__yon__config__strings,key)){
|
|
|
|
|
|
|
|
((yon_config_parameter*)__yon__config__strings)->flag1=status;
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void yon_config_set_status_full(int status){
|
|
|
|
check_config{
|
|
|
|
check_config{
|
|
|
|
for_config{
|
|
|
|
for_config{
|
|
|
|
((yon_config_parameter*)temp)->flag1=status;
|
|
|
|
((yon_config_parameter*)temp)->flag1=status;
|
|
|
|
@ -1195,14 +1210,18 @@ int yon_config_set(char *key, void *data){
|
|
|
|
} else return 0;
|
|
|
|
} else return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int yon_config_append(char *key, char *data){
|
|
|
|
int yon_config_append(char *key, char *data, char *divider){
|
|
|
|
check_config{
|
|
|
|
check_config{
|
|
|
|
yon_config_parameter *dict = (yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key);
|
|
|
|
yon_config_parameter *dict = (yon_config_parameter*)yon_dictionary_get((dictionary**)&__yon__config__strings,key);
|
|
|
|
if (strcmp(((char*)dict->data),"")!=0)
|
|
|
|
if (dict){
|
|
|
|
dict->data=(void*)(yon_char_unite((char*)dict->data," ",data,NULL));
|
|
|
|
if (strcmp(((char*)dict->data),"")!=0){
|
|
|
|
else dict->data=(void*)data;
|
|
|
|
char *str = (char*)dict->data;
|
|
|
|
dict->flag1=1;
|
|
|
|
dict->data=(void*)(yon_char_unite(yon_char_is_empty(str)?"":str,yon_char_is_empty(str)?"":",",divider,data,NULL));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
else dict->data=(void*)yon_char_new(data);
|
|
|
|
|
|
|
|
dict->flag1=1;
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
} else return 0;
|
|
|
|
} else return 0;
|
|
|
|
} else return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|