Add a file utility to allow me to read in an entire file instead of doing so line by line.

This commit is contained in:
2022-02-23 21:29:53 +00:00
parent 1fd5c3af57
commit 1968590654
2 changed files with 74 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#ifndef FUTIL_H
#define FUTIL_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#ifndef FUTIL_READ_SIZE
#define FUTIL_READ_SIZE 2097152 //Default here is 2MiB
#endif
int ReadAllString(const char*, char**, size_t*);
#endif