Standard setup for writing C inspired by Casey Muratori, Ryan Fleury, Mr. 4th Programmer, and others in the handmade community.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 line
557 B

  1. #include <stdio.h>
  2. #include "core.cpp"
  3. int main(int argc, char **argv) {
  4. int statusCode = 0;
  5. initialiseCore();
  6. Arena *arena = arenaAlloc(Megabytes(64));
  7. list<string> args = getArgs(arena, argc, argv);
  8. log(strSplit(arena, strlit("-"), strlit("hallo-world")));
  9. while (true) {
  10. size_t arenaPos = arena->head;
  11. string line = PushString(arena, 128);
  12. fgets(line.str, (int)line.length, stdin);
  13. log(strSplit(arena, strlit("-"), line));
  14. arenaFreeFrom(arena, arenaPos);
  15. }
  16. return statusCode;
  17. }