From: matze Date: Sat, 28 Jul 2007 18:19:45 +0000 (+0000) Subject: general und so.. X-Git-Tag: rgb2rv6~96 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=68ae910fd6a7b3770d4f467cd05ac9acc4aa5b3c;p=c128-kasse general und so.. git-svn-id: https://shell.noname-ev.de/svn/kasse/c128@13 af93e077-1a23-4f1e-9cbe-9382a9d578f5 --- diff --git a/config.c b/config.c index 681f2ff..c4c28af 100644 --- a/config.c +++ b/config.c @@ -1,12 +1,16 @@ +#include +#include "general.h" #include "config.h" unsigned long int money = 0; unsigned long int num_items = 0; unsigned long int items_sold = 0; +struct status_t status[MAX_ITEMS+1]; void load_config(); void load_items(){ + char c; num_items=3; status[0].item_name = "cola"; status[0].price = 230; diff --git a/config.h b/config.h index bea5c17..f730bf5 100644 --- a/config.h +++ b/config.h @@ -18,7 +18,7 @@ struct status_t { }; #define MAX_ITEMS 15 -static struct status_t status[MAX_ITEMS+1]; +extern struct status_t* status; // unklar bis jetzt was das tun wird void load_config(); diff --git a/general.h b/general.h new file mode 100644 index 0000000..93e996b --- /dev/null +++ b/general.h @@ -0,0 +1,5 @@ +#ifndef GENERAL_H_ +#define GENERAL_H_ +#define uc unsigned char +#define NULL 0 +#endif /*GENERAL_H_*/ diff --git a/kasse.c b/kasse.c index 25afd6f..b07a512 100644 --- a/kasse.c +++ b/kasse.c @@ -2,6 +2,7 @@ #include #include +#include "general.h" #include "config.h" #include "kasse.h" // conf diff --git a/kasse.h b/kasse.h index 5fd2d8c..567d369 100644 --- a/kasse.h +++ b/kasse.h @@ -1,3 +1,2 @@ /* Abkürzung */ -#define uc unsigned char