]> git.lizzy.rs Git - uwu-lang.git/blobdiff - src/load.c
Use uwu-common as submodule
[uwu-lang.git] / src / load.c
index 4a05915e28320b6949ed587f15f9668f683d5344..4eee71710b443c32b4cc39e4fecb7e9ecc0568d3 100644 (file)
@@ -2,31 +2,17 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdarg.h>
-#include <libgen.h>
 #include <dlfcn.h>
 #include "common/err.h"
 #include "common/str.h"
 #include "common/file.h"
 #include "common/dl.h"
+#include "common/dir.h"
 #include "load.h"
 #include "parse.h"
 
 #define DEBUG 0
 
-// helper functions
-
-static char *dirname_wrapper(const char *name)
-{
-       char *copy = strdup(name);
-       char *result = dirname(copy);
-       char *result_copy = strdup(result);
-
-       free(copy);
-       return result_copy;
-}
-
-// type definitions
-
 typedef struct
 {
        char *name;