From dd3b702fd104353970e8a047ab9b4382c935e5d2 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 20 Aug 2020 21:33:12 -0400 Subject: Import xdg.c from catgirl --- database.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'database.h') diff --git a/database.h b/database.h index fbef0bb..d2db1f0 100644 --- a/database.h +++ b/database.h @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -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 }; -- cgit 1.4.1