Function added

pull/56/head
parent 656cf1e42d
commit 9abb53b481
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -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);

@ -868,6 +868,9 @@ char *yon_config_command_get_section(const char *command);
int yon_config_command_get_path_pos(config_str parsed, int size); int yon_config_command_get_path_pos(config_str parsed, int size);
char *yon_config_command_get_path(const char *command); char *yon_config_command_get_path(const char *command);
char *yon_config_get_last_command();
void yon_config_set_last_command(char *command);
int yon_config_load_config(YON_CONFIG_TYPE config_type, ...); int yon_config_load_config(YON_CONFIG_TYPE config_type, ...);
int yon_config_change_key(char *target, char *key); int yon_config_change_key(char *target, char *key);

Loading…
Cancel
Save