about summary refs log tree commit diff
path: root/database.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--database.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/database.h b/database.h
index fbef0bb..d2db1f0 100644
--- a/database.h
+++ b/database.h
@@ -27,6 +27,7 @@
 
 #include <err.h>
 #include <errno.h>
+#include <getopt.h>
 #include <limits.h>
 #include <sqlite3.h>
 #include <stdbool.h>
@@ -40,6 +41,20 @@
 #define SQL(...) #__VA_ARGS__
 #define ARRAY_LEN(a) (sizeof(a) / sizeof((a)[0]))
 
+const char *configPath(
+	char *buf, size_t cap, const char **dirs, const char *path
+);
+const char *dataPath(
+	char *buf, size_t cap, const char **dirs, const char *path
+);
+FILE *configOpen(const char *path, const char *mode);
+FILE *dataOpen(const char *path, const char *mode);
+void dataMkdir(const char *path);
+int getopt_config(
+	int argc, char *const *argv, const char *optstring,
+	const struct option *longopts, int *longindex
+);
+
 #define DATABASE_PATH "litterbox/litterbox.sqlite"
 
 enum { DatabaseVersion = 5 };