This commit is contained in:
2026-09-27 20:27:38 +02:00
parent 27c5c4a55b
commit 2f0a1f5087
9 changed files with 143 additions and 126 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
#include "cig.h"
#include <assert.h>
char *read_entire_file(const char *path, allocator_t allocator) {
char *read_entire_file(char const *path, allocator_t allocator) {
FILE *fp = fopen(path, "rb");
assert(fp != NULL);
fseek(fp, 0, SEEK_END);
@@ -17,7 +17,7 @@ char *read_entire_file(const char *path, allocator_t allocator) {
}
// Returns dynamic array, of fixed char strings.
char **read_all_file_lines(const char *path, allocator_t allocator) {
char **read_all_file_lines(char const *path, allocator_t allocator) {
char *contents = read_entire_file(path, allocator);
char **lines = make_arr(char*, allocator);
arr_append(lines, contents);