summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-07-08 15:06:33 -0300
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-07-08 15:06:33 -0300
commit7a388dad85152a203033c14fee3c64607301865a (patch)
tree054b7bb03883576a8b68da8470908ff259e029d4 /include/util.h
libactivity: (tmp name) http request parse
the parse works via callbacks, registered to a method and path. further work will be done to simplify extraction of path, and to make the request struct more private. missing the parsing and handling of reponses. Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
new file mode 100644
index 0000000..c4856db
--- /dev/null
+++ b/include/util.h
@@ -0,0 +1,12 @@
+#ifndef _UTIL_H_
+#define _UTIL_H_
+
+#include <stdarg.h>
+#include <stdlib.h>
+
+int vasprintf(char **dest, const char *fmt, va_list ap);
+int asprintf(char **dest, const char *fmt, ...);
+
+size_t hash(const char *str, int max_val);
+
+#endif