32 lines
713 B
C++
32 lines
713 B
C++
#include <stdio.h>
|
|
#include "core.cpp"
|
|
#include "core.h"
|
|
|
|
int main(int argc, char **argv) {
|
|
int statusCode = 0;
|
|
initialiseCore();
|
|
Arena *arena = arenaAlloc(Megabytes(64));
|
|
list<string> args = getArgs(arena, argc, argv);
|
|
|
|
log(strSplit(arena, "-"_s, "hallo-world"_s));
|
|
|
|
while (true) {
|
|
string line;
|
|
list<string> split;
|
|
|
|
WithScratch(temp) {
|
|
line = PushString(temp.arena, 128);
|
|
fgets(line.str, (int)line.length, stdin);
|
|
split = strSplit(temp.arena, "-"_s, line);
|
|
}
|
|
|
|
if (line.str[0] == '\n' && line.str[1] == '\0') {
|
|
break;
|
|
} else {
|
|
log(split);
|
|
}
|
|
}
|
|
|
|
return statusCode;
|
|
}
|