summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-10-28 21:48:46 -0700
committerMike Pavone <pavone@retrodev.com>2013-10-28 21:48:46 -0700
commit94eea1e7324e6599decb73b78d13b111dd5b2621 (patch)
tree19dd4d605eccceba3b802089c7062b42fa13926c /util.h
parentda665eb04a793552ed32ed8944dffbeb5220d7ae (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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/util.h b/util.h
index e3e2e86..d82ac50 100644
--- a/util.h
+++ b/util.h
@@ -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_