From ec98567cc51fa1d559cf1fe076898b6537053499 Mon Sep 17 00:00:00 2001 From: Mario Kilies Date: Tue, 25 Jan 2011 13:28:15 +0100 Subject: Minor changes. Renamed global.[ch] to data_store.[ch], data_store to data_store_t and datamodel() to data_store(). --- src/data_store.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/data_store.c (limited to 'src/data_store.c') diff --git a/src/data_store.c b/src/data_store.c new file mode 100644 index 0000000..e9cd782 --- /dev/null +++ b/src/data_store.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include "data_store.h" + +static data_store_t *d = NULL; + +// returns global data store +data_store_t* data_store(void) +{ + if(!d) + { + d = malloc(sizeof(data_store_t)); + memset(d, 0, sizeof(data_store_t)); + } + + return d; +} -- cgit v1.2.3