From 754ab792e43ab4b95350fee2f5e841186af13653 Mon Sep 17 00:00:00 2001 From: Tharre Date: Tue, 29 Jul 2014 00:51:25 +0200 Subject: Add filepath.c, refactor out parse_shebang() and rewrite most of the error checking code to use predefined error macros --- src/filepath.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/filepath.h (limited to 'src/filepath.h') 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 + +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 -- cgit v1.2.3-70-g09d2