summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-16 21:35:16 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-16 21:35:16 +0100
commit61a369b85e51e0d54e1651e4ff8c11fe4815a0c0 (patch)
tree37273e4881e917b7402b66d563acc2f1359b7a08 /config.h
parent968cee422ab1d61b4234127892d75f0497d8d8c2 (diff)
Move default configuration file location to $HOME/.blabouncer/ and create a default file automatically if it doesn't exist.
Diffstat (limited to 'config.h')
-rw-r--r--config.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/config.h b/config.h
index 3e96c19..4043f36 100644
--- a/config.h
+++ b/config.h
@@ -4,6 +4,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <libgen.h>
+#include <sys/stat.h>
+#include <limits.h>
#define MAXCHAR 1000
@@ -22,4 +25,8 @@ int getconfint(char *confname, char *filename);
// Return 0 for password mismatch, or 1 for password match.
int checkpassword(char *password, char *filename);
+// Create the default configuration file.
+// Return 1 on success, 0 on failure.
+int createconfigfile(char *filename);
+
#endif