]> git.sur5r.net Git - c128-kasse/commitdiff
general und so..
authormatze <matze@af93e077-1a23-4f1e-9cbe-9382a9d578f5>
Sat, 28 Jul 2007 18:19:45 +0000 (18:19 +0000)
committermatze <matze@af93e077-1a23-4f1e-9cbe-9382a9d578f5>
Sat, 28 Jul 2007 18:19:45 +0000 (18:19 +0000)
git-svn-id: https://shell.noname-ev.de/svn/kasse/c128@13 af93e077-1a23-4f1e-9cbe-9382a9d578f5

config.c
config.h
general.h [new file with mode: 0644]
kasse.c
kasse.h

index 681f2ff1fc23419275718a554bfd0da0c3dce075..c4c28af895c36dfb1685aa725823c18e2123a8e9 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1,12 +1,16 @@
+#include <stdlib.h>
+#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;
index bea5c1729b85de8dce6980fa0f80569541f21786..f730bf52c1a50ca487872c7a7972e3e0e708bef1 100644 (file)
--- 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 (file)
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 25afd6f2c476e8d6c92adaa205f696a34b477373..b07a512a34a4f1c9c10b8b7ed60e3f9164e23509 100644 (file)
--- a/kasse.c
+++ b/kasse.c
@@ -2,6 +2,7 @@
 #include <conio.h>
 #include <stdlib.h>
 
+#include "general.h"
 #include "config.h"
 #include "kasse.h"
 // conf
diff --git a/kasse.h b/kasse.h
index 5fd2d8ccd35801cc3ea411d82ec034b4af3d5402..567d36903b1728e7f08c7d6da310c1d0f20cca30 100644 (file)
--- a/kasse.h
+++ b/kasse.h
@@ -1,3 +1,2 @@
 /* Abkürzung */
-#define uc     unsigned char