23 lines
No EOL
473 B
C
23 lines
No EOL
473 B
C
#ifndef IO_H
|
|
#define IO_H
|
|
|
|
#define _XOPEN_SOURCE
|
|
|
|
#include <errno.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/stat.h>
|
|
|
|
/**
|
|
* @brief reads a file at a path
|
|
*
|
|
* @param path the filepath
|
|
* @param data where to store the pointer to the data
|
|
* @param size a pointer where the size of the result should be stored
|
|
* @return the raw data
|
|
*/
|
|
bool read_file(const char* path, uint8_t** data, size_t* size);
|
|
|
|
#endif // IO_H
|