Add easy log macros; add vec_init; windows managed by vec now

This commit is contained in:
2022-06-27 19:12:26 +00:00
parent bccb0a53fd
commit 9c5767436d
9 changed files with 67 additions and 47 deletions

View File

@@ -3,6 +3,16 @@
#include <string.h>
#include <stdlib.h>
struct vec vec_init(size_t width, int size)
{
struct vec v;
v.size = size;
v.width = width;
v.len = 0;
v.data = calloc(v.size, v.width);
return v;
}
struct vec *vec_make(size_t width, int size)
{
struct vec *new = calloc(1, sizeof(struct vec));