Skip to content
Snippets Groups Projects
Commit af93ece1 authored by Dmitriy A. Gerasimov's avatar Dmitriy A. Gerasimov
Browse files

[+] dap_config_path()

parent 600ed913
No related branches found
No related tags found
No related merge requests found
......@@ -58,13 +58,19 @@ int dap_config_init(const char * a_configs_path)
}
#endif
if(dir_test(a_configs_path) || !mkdir_with_parents(a_configs_path)) {
strcpy(s_configs_path, a_configs_path);
strncpy(s_configs_path, a_configs_path,sizeof(s_configs_path));
return 0;
}
}
return -1;
}
const char * dap_config_path()
{
return s_configs_path;
}
/**
* @brief dap_config_deinit Deinitialize settings
*/
......
......@@ -43,6 +43,8 @@ void dap_config_deinit();
dap_config_t * dap_config_open(const char * a_name);
void dap_config_close(dap_config_t * a_config);
const char * dap_config_path();
int32_t dap_config_get_item_int32(dap_config_t * a_config, const char * a_section_path, const char * a_item_name);
int32_t dap_config_get_item_int32_default(dap_config_t * a_config, const char * a_section_path, const char * a_item_name, int32_t a_default);
const char * dap_config_get_item_str(dap_config_t * a_config, const char * a_section_path, const char * a_item_name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment