New failable based error handling. Labelled break/continue/next.

This commit is contained in:
Christoffer Lerno
2020-06-22 11:37:42 +02:00
committed by Christoffer Lerno
parent 10f715cec0
commit dc86c21210
40 changed files with 3727 additions and 2808 deletions

View File

@@ -23,6 +23,14 @@ char *strformat(const char *var, ...)
return buffer;
}
char *strcopy(const char *start, size_t len)
{
char *buffer = malloc_arena(len + 1);
memcpy(buffer, start, len);
buffer[len] = '\0';
return buffer;
}
char *strcat_arena(const char *a, const char *b)
{
unsigned a_len = strlen(a);