1
0
advent-of-code-2025/aoc.h
2025-12-12 11:29:07 +01:00

40 lines
554 B
C

#ifndef AOC_H
#define AOC_H
#include <stdlib.h>
#include <string.h>
#include "rtcore.h"
typedef enum
{
DS_FULL,
DS_DEMO,
} dataset;
static inline dataset
ParseDatasetOption(int argc, char **argv)
{
dataset ds = DS_FULL;
if (argc >= 2)
{
if (strcmp(argv[1], "full") == 0)
ds = DS_FULL;
else if (strcmp(argv[1], "demo") == 0)
ds = DS_DEMO;
}
return ds;
}
static inline arena
CreateArena(void)
{
byte *mem = malloc(megabytes(256));
return (arena){
.begin = mem,
.end = mem + megabytes(256),
};
}
#endif