Move resolve_tilde and get_config_path into libi3

This commit is contained in:
Deiz
2015-03-28 14:30:35 -04:00
parent d5f329694d
commit 4daed31c3e
7 changed files with 160 additions and 140 deletions

View File

@ -434,3 +434,21 @@ char *get_exe_path(const char *argv0);
*
*/
int logical_px(const int logical);
/**
* This function resolves ~ in pathnames.
* It may resolve wildcards in the first part of the path, but if no match
* or multiple matches are found, it just returns a copy of path as given.
*
*/
char *resolve_tilde(const char *path);
/**
* Get the path of the first configuration file found. If override_configpath
* is specified, that path is returned and saved for further calls. Otherwise,
* checks the home directory first, then the system directory first, always
* taking into account the XDG Base Directory Specification ($XDG_CONFIG_HOME,
* $XDG_CONFIG_DIRS)
*
*/
char *get_config_path(const char *override_configpath, bool use_system_paths);