This commit is contained in:
Daniel Ledda
2025-01-10 13:51:38 +01:00
parent 49e379dd54
commit fb29608871
3 changed files with 14 additions and 24 deletions

19
app.cpp
View File

@@ -8,24 +8,7 @@ int main(int argc, char **argv) {
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);
}
}
prinft("%S", strSplit(arena, "-"_s, "hallo-world"_s));
return statusCode;
}