BYTE printer_port = 4;
struct status_t status[MAX_ITEMS+1];
struct credits_t credits[MAX_CREDIT_ITEMS+1];
-#define REAL_DATA
-#ifdef REAL_DATA
-void load_config();
+void load_config();
void load_items(){
FILE* f;
*/
void load_config() {
}
-
-#else
-
-void load_config() {
-}
-
-void load_items() {
- BYTE c;
- num_items=2;
- strcpy(status[0].item_name, "cola");
- status[0].price = 230;
- status[0].times_sold = 0;
- strcpy(status[1].item_name, "mate");
- status[1].price = 150;
- status[1].times_sold = 0;
- for (c = 2; c < MAX_ITEMS; ++c)
- status[c].item_name[0] = 0;
-}
-
-void load_state() {
- status[0].times_sold=23;
- status[1].times_sold=42;
-}
-
-void load_credits() {
-}
-
-void save_state() {
-}
-
-void save_credits() {}
-#endif
cprintf("\r\nBefehle: s) Daten sichern d) Drucken umschalten\r\ng) Guthabenverwaltung z) Zeit setzen\r\n");
}
+void log_file(char * s) {
+ FILE * f;
+ if (s==NULL)
+ return;
+ f = fopen("log", "a");
+ if (f==NULL)
+ c128_perror(23, "kann logfile nicht oeffnen");
+ fputs(f, s);
+ fclose(f);
+}
+
/* Druckt eine entsprechende Zeile aus */
void print_log(BYTE n, int einheiten, char *nickname) {
BYTE c;
exit(1);
}
cbm_close((BYTE)4);
+ log_file(print_buffer);
}
/* Dialog, der einen durch's Abrechnen der Einträge führt */