From 43f65c76152017420ce723b4d4ef4230ff072818 Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Tue, 28 Nov 2023 08:38:19 +0100 Subject: browse: use khttp_template --- util.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 util.h (limited to 'util.h') diff --git a/util.h b/util.h new file mode 100644 index 0000000..056f5a8 --- /dev/null +++ b/util.h @@ -0,0 +1,12 @@ +#ifndef UTIL_H +#define UTIL_H + +/* + * Reads the file denoted by path into a newly allocated output buffer. Returns + * 0 for success, -1 for error. read_size is the size of output buffer (only to + * be used in case of success). + */ +int + read_file(char *path, char **output, size_t * read_size); + +#endif /* UTIL_H */ -- cgit v1.2.3