aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/files.h5
-rw-r--r--include/lua_state.h13
-rw-r--r--include/pkg.h2
3 files changed, 6 insertions, 14 deletions
diff --git a/include/files.h b/include/files.h
index 24712e9..052c5f4 100644
--- a/include/files.h
+++ b/include/files.h
@@ -23,7 +23,12 @@
#include <stdbool.h>
+#include "str.h"
+
bool file_exists(const char *path);
bool is_directory(const char *path);
+bool rmrf(str *path);
+bool file_write(str *content, str *path);
+str file_read(str *path);
#endif
diff --git a/include/lua_state.h b/include/lua_state.h
index 6c36f37..97740e7 100644
--- a/include/lua_state.h
+++ b/include/lua_state.h
@@ -25,19 +25,6 @@ void free_lua_config(void);
} \
} while (0)
-#define lua_get_table(name, file, pop_num) \
- do { \
- lua_pushstring(L, name); \
- lua_gettable(L, -2); \
- lua_pop(L, 1); \
- if (!lua_istable(L, -1)) { \
- log_error("lua: expected type 'table' for '%s' in '%.*s'", \
- name, str_fmt(file)); \
- /*lua_pop(L, pop_num);*/ \
- return false; \
- } \
- } while (0)
-
#define lua_run_function(name, file, params, returns, pop_num) \
do { \
if (lua_pcall(L, params, returns, 0)) { \
diff --git a/include/pkg.h b/include/pkg.h
index af720d5..d6e6cf0 100644
--- a/include/pkg.h
+++ b/include/pkg.h
@@ -4,7 +4,7 @@
#include "str.h"
typedef struct package_t {
- str name, version, url, src;
+ str name, version, url, src, root;
unsigned int dep_count;
bool is_local;
} package_t;