Files
djstdlib/os.h
Daniel Ledda f12b4091d7 update naming
2025-02-09 14:02:44 +01:00

21 lines
572 B
C

#ifndef OS_H
#define OS_H
#include "core.h"
// ### Memory ###
void *os_alloc(size_t capacity);
void os_reserve(void *ptr);
void os_decommit(void *ptr);
void os_free(void *ptr, size_t freeSize);
// ### File IO ###
string os_readEntireFile(Arena *arena, string filename);
bool os_writeEntireFile(Arena *arena, string filename, const byte *contents, size_t contentsLength);
bool os_fileAppend(Arena *arena, string filename, const byte *contents, size_t contentsLength);
// ### Standard IO ###
void os_print(StdStream target, const char *fmt, va_list argList);
#endif