|
|
|
@ -332,10 +332,10 @@ config_str yon_config_command_get_parameters(const char *command, int *size){
|
|
|
|
if (yon_char_is_empty(command)) return NULL;
|
|
|
|
if (yon_char_is_empty(command)) return NULL;
|
|
|
|
|
|
|
|
|
|
|
|
int parsed_size;
|
|
|
|
int parsed_size;
|
|
|
|
config_str parsed = yon_char_parse(command,&parsed_size,"");
|
|
|
|
config_str parsed = yon_char_parse(command,&parsed_size," ");
|
|
|
|
int pos = yon_config_command_get_section_pos(command);
|
|
|
|
int pos = yon_config_command_get_section_pos(command);
|
|
|
|
if (pos>-1){
|
|
|
|
if (pos>-1){
|
|
|
|
for (int i=0;i<pos;i++){
|
|
|
|
for (int i=0;i<pos+1;i++){
|
|
|
|
parsed = yon_char_parsed_rip(parsed,&parsed_size,0);
|
|
|
|
parsed = yon_char_parsed_rip(parsed,&parsed_size,0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (parsed_size>0){
|
|
|
|
if (parsed_size>0){
|
|
|
|
@ -439,7 +439,7 @@ int yon_config_load_config(YON_CONFIG_TYPE config_type, ...){
|
|
|
|
char *value = yon_char_new(parameters[i]);
|
|
|
|
char *value = yon_char_new(parameters[i]);
|
|
|
|
char *parameter = yon_char_divide_search(value,"=",-1);
|
|
|
|
char *parameter = yon_char_divide_search(value,"=",-1);
|
|
|
|
char *section = NULL;
|
|
|
|
char *section = NULL;
|
|
|
|
if (strstr(parameter," -ea ")){
|
|
|
|
if (strstr(final_command," -ea ")){
|
|
|
|
section = yon_char_divide_search(parameter," ",-1);
|
|
|
|
section = yon_char_divide_search(parameter," ",-1);
|
|
|
|
free(yon_char_divide(section,yon_char_find_last(section,'/')));
|
|
|
|
free(yon_char_divide(section,yon_char_find_last(section,'/')));
|
|
|
|
yon_char_remove_last_symbol(section,']');
|
|
|
|
yon_char_remove_last_symbol(section,']');
|
|
|
|
@ -1261,8 +1261,11 @@ char *yon_config_parameter_prepare_command(char *command, char *path, char *sect
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (parameter){
|
|
|
|
if (parameter){
|
|
|
|
if (size>=get_pos+2){
|
|
|
|
if (size>=get_pos+2){
|
|
|
|
free(parsed[get_pos+2]);
|
|
|
|
config_str temp = yon_char_parsed_copy(parsed,get_pos+1);
|
|
|
|
parsed[get_pos+2] = yon_char_new(parameter);
|
|
|
|
yon_char_parsed_free(parsed,size);
|
|
|
|
|
|
|
|
parsed = temp;
|
|
|
|
|
|
|
|
size=get_pos+1;
|
|
|
|
|
|
|
|
yon_char_parsed_add_or_create_if_exists(parsed,&size,parameter);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
char *final = yon_char_parsed_to_string(parsed,size," ");
|
|
|
|
char *final = yon_char_parsed_to_string(parsed,size," ");
|
|
|
|
|