#include "match.h" #include struct leg *leg_init(int points, char *name) { struct leg *l = calloc(1, sizeof(*l)); l->name = name; l->start = l->rem = points; l->visits = calloc(1000, sizeof(*(l->visits))); // FIXME return l; } void leg_free(struct leg *l) { for (int i = 0; i < l->n_visits; ++i) { if (l->visits[i].darts) free(l->visits[i].darts); if (l->visits[i].ccoords) free(l->visits[i].ccoords); } free(l->visits); free(l); }