diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-10-28 21:48:46 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-10-28 21:48:46 -0700 |
commit | 94eea1e7324e6599decb73b78d13b111dd5b2621 (patch) | |
tree | 19dd4d605eccceba3b802089c7062b42fa13926c /util.h | |
parent | da665eb04a793552ed32ed8944dffbeb5220d7ae (diff) |
Extract function to determine executable directory from load_config so it can be used elsewhere
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -13,6 +13,13 @@ char * alloc_concat_m(int num_parts, char ** parts); long file_size(FILE * f); //Strips whitespace and non-printable characters from the beginning and end of a string char * strip_ws(char * text); +//Inserts a null after the first word, returns a pointer to the second word char * split_keyval(char * text); +//Should be called by main with the value of argv[0] for use by get_exe_dir +void set_exe_str(char * str); +//Returns the directory the executable is in +char * get_exe_dir(); +//Returns the contents of a symlink in a newly allocated string +char * readlink_alloc(char * path); #endif //UTIL_H_ |