Standard setup for writing C inspired by Casey Muratori, Ryan Fleury, Mr. 4th Programmer, and others in the handmade community.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

32 rindas
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. }