2021-03-20 12:38:52 -04:00
|
|
|
#ifndef UTILS_H_INCLUDED
|
|
|
|
#define UTILS_H_INCLUDED
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2021-03-20 14:04:57 -04:00
|
|
|
#include "retvals.h"
|
2021-03-20 12:52:13 -04:00
|
|
|
|
|
|
|
int read_file(const char *filename, uint8_t** out_file_data, uint32_t *out_file_size);
|
2021-03-23 17:38:58 -04:00
|
|
|
int write_file(const char *filename, const uint8_t *data, size_t size);
|
2021-03-20 12:38:52 -04:00
|
|
|
int get_filesize(const char *filename, size_t *out_size);
|
|
|
|
const char* path_to_filename(const char *path);
|
|
|
|
char* append_string(const char *a, const char *b);
|
|
|
|
|
|
|
|
#endif
|