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.
 
 
 
 

32 lines
713 B

  1. #include <stdio.h>
  2. #include "core.cpp"
  3. #include "core.h"
  4. int main(int argc, char **argv) {
  5. int statusCode = 0;
  6. initialiseCore();
  7. Arena *arena = arenaAlloc(Megabytes(64));
  8. list<string> args = getArgs(arena, argc, argv);
  9. log(strSplit(arena, "-"_s, "hallo-world"_s));
  10. while (true) {
  11. string line;
  12. list<string> split;
  13. WithScratch(temp) {
  14. line = PushString(temp.arena, 128);
  15. fgets(line.str, (int)line.length, stdin);
  16. split = strSplit(temp.arena, "-"_s, line);
  17. }
  18. if (line.str[0] == '\n' && line.str[1] == '\0') {
  19. break;
  20. } else {
  21. log(split);
  22. }
  23. }
  24. return statusCode;
  25. }