Standard setup for writing C inspired by Casey Muratori, Ryan Fleury, Mr. 4th Programmer, and others in the handmade community.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

před 1 měsícem
před 1 měsícem
před 1 měsícem
před 1 měsícem
před 2 týdny
před 1 měsícem
před 1 měsícem
1234567891011121314151617181920
  1. #ifndef OS_H
  2. #define OS_H
  3. #include "core.h"
  4. // ### Memory ###
  5. void *os_alloc(size_t capacity);
  6. void os_reserve(void *ptr);
  7. void os_decommit(void *ptr);
  8. void os_free(void *ptr, size_t freeSize);
  9. // ### File IO ###
  10. string os_readEntireFile(Arena *arena, string filename);
  11. bool os_writeEntireFile(Arena *arena, string filename, const byte *contents, size_t contentsLength);
  12. bool os_fileAppend(Arena *arena, string filename, const byte *contents, size_t contentsLength);
  13. // ### Standard IO ###
  14. void os_print(StdStream target, const char *fmt, va_list argList);
  15. #endif