Setup the assembler to use the new file reading code.

This commit is contained in:
2022-04-28 22:24:10 -05:00
parent 1968590654
commit 1900b504e7
6 changed files with 60 additions and 33 deletions
+3 -4
View File
@@ -5,16 +5,15 @@
int ReadAllString(const char* path, char** content_ptr, size_t* bytes_read) {
if (!path || !content_ptr || !bytes_read) return 0;
FILE *file;
file = fopen(path, "rb");
FILE *file = fopen(path, "rb");
if (!file) {
fprintf(stderr, "Failed to open '%s'. %s.\n", path, strerror(errno));
return 0;
}
char *content = NULL, *temp;
size_t used, capacity, read;
char *content = NULL, *temp = NULL;
size_t used = 0, capacity = 0, read = 0;
while(1) {
if (used + FUTIL_READ_SIZE + 1 > capacity) {