aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/config.h4
-rw-r--r--include/dbs/api.h (renamed from include/api.h)9
-rw-r--r--include/dbs/init.h (renamed from include/init.h)0
-rw-r--r--include/dbs/log.h (renamed from include/log.h)0
-rw-r--r--include/dbs/subsys.h (renamed from include/subsys.h)5
-rw-r--r--include/dbs/util.h (renamed from include/util.h)0
6 files changed, 7 insertions, 11 deletions
diff --git a/include/config.h b/include/config.h
deleted file mode 100644
index 4254edc..0000000
--- a/include/config.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#define VERSION "0.0.1"
-#define NAME_SHORTHAND "TCDBF"
-#define NAME "turret.'s C Discord Bot Framework"
-
diff --git a/include/api.h b/include/dbs/api.h
index a70d447..d421f08 100644
--- a/include/api.h
+++ b/include/dbs/api.h
@@ -1,6 +1,5 @@
#ifndef __API_H
#define __API_H
-#define _Nullable
typedef enum {
HTTP_GET,
@@ -10,15 +9,11 @@ typedef enum {
HTTP_PATCH
} HTTPMethod;
-#ifndef __API_INTERNAL
-
int http_request(HTTPMethod method, char *url,
- struct curl_slist *_Nullable headers, char *writebuf, size_t bufsiz);
+ struct curl_slist *headers, char *writebuf, size_t bufsiz);
int api_request(HTTPMethod method, char * url,
- struct curl_slist *_Nullable headers, char *writebuf, size_t bufsiz);
-
-#endif
+ struct curl_slist *headers, char *writebuf, size_t bufsiz);
#define http_get(...) http_request(HTTP_GET, __VA_ARGS__)
#define http_post(...) http_request(HTTP_POST, __VA_ARGS__)
diff --git a/include/init.h b/include/dbs/init.h
index 79e60f1..79e60f1 100644
--- a/include/init.h
+++ b/include/dbs/init.h
diff --git a/include/log.h b/include/dbs/log.h
index 30fec81..30fec81 100644
--- a/include/log.h
+++ b/include/dbs/log.h
diff --git a/include/subsys.h b/include/dbs/subsys.h
index 1515293..1885a80 100644
--- a/include/subsys.h
+++ b/include/dbs/subsys.h
@@ -3,5 +3,10 @@
int __impl_start_subsystem(char *name, int (*fn)(void));
#define start_subsystem(fn) __impl_start_subsystem(#fn, fn)
+#define declare_subsystem(fn) \
+ void subsys_start_##fn(void) { \
+ start_subsystem(fn); \
+ } \
+ l5_initcall(subsys_start_##fn)
#endif
diff --git a/include/util.h b/include/dbs/util.h
index bad4a33..bad4a33 100644
--- a/include/util.h
+++ b/include/dbs/util.h