aboutsummaryrefslogtreecommitdiffstats
path: root/src/filepath.h
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2014-07-29 00:51:25 +0200
committerTharre <tharre3@gmail.com>2014-07-29 00:52:01 +0200
commit754ab792e43ab4b95350fee2f5e841186af13653 (patch)
treeec9b81f09fe4bf93c57ec5dde963d29e8f156a57 /src/filepath.h
parentcabc74b6a557705043e248ebdbd969ebcc247311 (diff)
downloadredo-754ab792e43ab4b95350fee2f5e841186af13653.tar.gz
redo-754ab792e43ab4b95350fee2f5e841186af13653.tar.xz
redo-754ab792e43ab4b95350fee2f5e841186af13653.zip
Add filepath.c, refactor out parse_shebang() and rewrite most of the error checking code to use predefined error macros
Diffstat (limited to 'src/filepath.h')
-rw-r--r--src/filepath.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/filepath.h b/src/filepath.h
new file mode 100644
index 0000000..91f4623
--- /dev/null
+++ b/src/filepath.h
@@ -0,0 +1,15 @@
+#ifndef __FILEPATH_H__
+#define __FILEPATH_H__
+
+#include <stdbool.h>
+
+extern bool is_absolute(const char* path);
+extern char *remove_ext(const char *str);
+extern char *take_extension(const char *target);
+extern const char *make_relative(const char *target, const char *to);
+extern char *transform_path(const char *target);
+extern char *xbasename(const char *path);
+extern bool fexists(const char *target);
+extern off_t fsize(const char *fn);
+
+#endif