summaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h
index b4daadd..160bc42 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -24,8 +24,10 @@
#ifndef UTILS_H
#define UTILS_H 1
+#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
+#include <stdio.h>
#include <string.h>
#include <strings.h>
@@ -91,6 +93,12 @@ memdup(const void *mem, size_t nmemb, size_t size)
return p;
}
+bool
+map_file(FILE *file, const char **string_out, size_t *size_out);
+
+void
+unmap_file(const char *str, size_t size);
+
#define ARRAY_SIZE(arr) ((sizeof(arr) / sizeof(*(arr))))
#define MIN(a, b) ((a) < (b) ? (a) : (b))