diff options
Diffstat (limited to 'readfile.c')
| -rw-r--r-- | readfile.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/readfile.c b/readfile.c deleted file mode 100644 index d4d17f8..0000000 --- a/readfile.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "cccl.h" - -#include <stdlib.h> - -#include <sys/stat.h> - - -int cccl_allocfile(const char *path, struct cccl_File *file) -{ - struct stat st; - int err = stat(path, &st); - if (err) - return err; - - file->size = st.st_size; - file->buffer = malloc(file->size); - - return !file->buffer; -} |