mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-23 15:01:32 -04:00
ea83e49e6e
* Makefile adjustments and additions to build fado * Fix typo in makefile * Fix it, maybe? * Update build tools * Update build tools * rm cfg files
25 lines
552 B
C
25 lines
552 B
C
#ifndef UTIL_H
|
|
#define UTIL_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
#define ERRMSG_START "\x1b[91merror\x1b[97m: "
|
|
#define ERRMSG_END "\x1b[0m"
|
|
|
|
#ifdef __GNUC__
|
|
__attribute__((format(printf, 1, 2), noreturn))
|
|
#endif
|
|
void util_fatal_error(const char *msgfmt, ...);
|
|
|
|
void* util_read_whole_file(const char* filename, size_t* pSize);
|
|
|
|
void util_write_whole_file(const char* filename, const void* data, size_t size);
|
|
|
|
uint32_t util_read_uint32_be(const uint8_t* data);
|
|
|
|
void util_write_uint32_be(uint8_t* data, uint32_t val);
|
|
|
|
#endif
|