aboutsummaryrefslogtreecommitdiff
path: root/chad/root.h
diff options
context:
space:
mode:
Diffstat (limited to 'chad/root.h')
-rw-r--r--chad/root.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/chad/root.h b/chad/root.h
deleted file mode 100644
index 95a3f8b..0000000
--- a/chad/root.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifdef CHAD_ROOT_H
-#define CHAD_ROOT_H
-#include <limits.h>
-#include "macros.h"
-/* check errno -- chdir */
-always_inline void Root(char * filename) {
- extern char * realpath(const char * restrict path, char * restrict resolved_path);
- extern int chdir(const char * path);
- attribute(noreturn) void abort(void);
- char path[PATH_MAX], * terminator;
- if (!realpath(filename, path)) { return; }
- if ((terminator = strrchr(path, '/'))) {
- *terminator = '\0';
- chdir(path);
- }
-}
-#endif /* CHAD_ROOT_H */