|
|
|
@ -331,6 +331,15 @@ char *yon_config_command_get_path(const char *command){
|
|
|
|
return section;
|
|
|
|
return section;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char *config_last_load_command = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char *yon_config_get_last_command(){
|
|
|
|
|
|
|
|
return(config_last_load_command);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void yon_config_set_last_command(char *command){
|
|
|
|
|
|
|
|
config_last_load_command=yon_char_new(command);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int yon_config_load_config(YON_CONFIG_TYPE config_type, ...){
|
|
|
|
int yon_config_load_config(YON_CONFIG_TYPE config_type, ...){
|
|
|
|
if (config_type!=YON_CONFIG_BOTH){
|
|
|
|
if (config_type!=YON_CONFIG_BOTH){
|
|
|
|
va_list args;
|
|
|
|
va_list args;
|
|
|
|
@ -341,6 +350,7 @@ int yon_config_load_config(YON_CONFIG_TYPE config_type, ...){
|
|
|
|
while ((current=va_arg(args,char*))){
|
|
|
|
while ((current=va_arg(args,char*))){
|
|
|
|
yon_config_command_prepare(&command,&command_size,current);
|
|
|
|
yon_config_command_prepare(&command,&command_size,current);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
yon_config_set_last_command(yon_char_parsed_to_string(command,command_size,";"));
|
|
|
|
for (int i=0;i<command_size;i++){
|
|
|
|
for (int i=0;i<command_size;i++){
|
|
|
|
int parsed_size;
|
|
|
|
int parsed_size;
|
|
|
|
config_str parsed = yon_config_load(command[i],&parsed_size);
|
|
|
|
config_str parsed = yon_config_load(command[i],&parsed_size);
|
|
|
|
|