From c9456a1a73a8b781f4460d48c541a8977e249b91 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 14 Feb 2019 16:02:43 +0100 Subject: Skeleton parser structure --- libstorycode/slide.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 libstorycode/slide.c (limited to 'libstorycode/slide.c') diff --git a/libstorycode/slide.c b/libstorycode/slide.c new file mode 100644 index 0000000..28a4ee3 --- /dev/null +++ b/libstorycode/slide.c @@ -0,0 +1,54 @@ +/* + * slide.c + * + * Copyright © 2019 Thomas White + * + * This file is part of Colloquium. + * + * Colloquium is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +#include "slide.h" + +struct _slide +{ + int n_items; + struct slide_item *items; +}; + + +Slide *slide_new() +{ + Slide *s; + s = malloc(sizeof(*s)); + if ( s == NULL ) return NULL; + s->n_items = 0; + s->items = NULL; + return s; +} + +void slide_free(Slide *s) +{ + free(s->items); + free(s); +} -- cgit v1.2.3