#ifndef TIME_H_
#define TIME_H_
void set_time(BYTE hrs, BYTE min, BYTE sec);
-char *get_time();
+char *get_time(void);
#endif
#endif
/* Lädt Dinge wie die Druckeradresse */
-void load_config();
-void load_items();
-void load_credits();
-//void dump_state();
+void load_config(void);
+void load_items(void);
+void load_credits(void);
+//void dump_state(void);
-void save_items();
-void save_credits();
+void save_items(void);
+void save_credits(void);
#endif /*CONFIG_H_*/
#ifndef CREDIT_MANAGER_H_
#define CREDIT_MANAGER_H_
struct credits_t *find_credit(char *name);
-void deposit_credit();
-void credit_manager();
+void deposit_credit(char *input);
+void credit_manager(void);
#endif
#ifndef GENERAL_H_
#define GENERAL_H_
typedef unsigned char BYTE;
-char *get_input();
-char retry_or_quit();
+char *get_input(void);
+char retry_or_quit(void);
char *format_euro(char * s, int maxlen, int cent);
void c128_perror(BYTE, char*);
extern BYTE _oserror;
#ifndef _KASSE_H
#define _KASSE_H
-void print_the_buffer();
+void print_the_buffer(void);
#ifdef _IS_KASSE
BYTE printing = 1;
#ifndef _PRINT_H
#define _PRINT_H
-void init_log();
-void print_the_buffer();
-void print_header();
+void init_log(void);
+void print_the_buffer(void);
+void print_header(void);
void log_file(const char *s);
void log_flush(void);
#include "general.h"
#include <stdint.h>
-char *get_time() {
+char *get_time(void) {
uint32_t h = PEEK(0x00A0) * 65536,
m = PEEK(0x00A1) * 256,
s = PEEK(0x00A2);
#define x2(x) (buffer[x] <= 0xF ? "0" : ""), buffer[x]
-int main() {
+int main(void) {
char *filename = NULL;
FILE *file;
unsigned int c;
* files directly)
*
*/
-static void lookup_needed_files() {
+static void lookup_needed_files(void) {
BYTE lfn = 8, c;
struct cbm_dirent dirent;
char filename[8];
}
}
-void load_items() {
+void load_items(void) {
BYTE c;
if (items_exists) {
memset(&status, 0, sizeof(struct status_array_t));
}
-void load_credits() {
+void load_credits(void) {
if (credits_exists)
cbm_load("credits", (BYTE)8, &credits);
else
memset(&credits, 0, sizeof(struct credits_array_t));
}
-void save_items() {
+void save_items(void) {
if (items_exists)
_sysremove("items");
cbm_save("items", (BYTE)8, &status, sizeof(struct status_array_t));
items_exists = true;
}
-void save_credits() {
+void save_credits(void) {
if (credits_exists)
_sysremove("credits");
cbm_save("credits", (BYTE)8, &credits, sizeof(struct credits_array_t));
credits_exists = true;
}
-void load_config() {
+void load_config(void) {
lookup_needed_files();
}
static BYTE current_credits_page = 0;
-static void credit_print_screen() {
+static void credit_print_screen(void) {
BYTE i, pages;
char buffer[10];
toggle_videomode();
}
-static void new_credit() {
+static void new_credit(void) {
char *input, *name;
char *time;
int credit;
credits.credits[num].credit = 0;
}
-static void delete_credit() {
+static void delete_credit(void) {
char *input;
BYTE num, last;
* erneut aufruft
*
*/
-char *get_input() {
+char *get_input(void) {
BYTE i = 0;
BYTE c, x, y;
static char output[32];
return output;
}
-char retry_or_quit() {
+char retry_or_quit(void) {
char *c;
do {
cprintf("\r\nr)etry or q)uit?\r\n");
#include "credit_manager.h"
#include "version.h"
-static void itemz_print_screen() {
+static void itemz_print_screen(void) {
BYTE i;
char buffer[10];
cprintf("\r\nn) Neu d) Loeschen s) Speichern m) Credit Modus q) Beenden\r\nr) Reset des Verkauft-Zaehlers\r\n");
}
-static void new_item() {
+static void new_item(void) {
char *input, *name;
int price;
status.status[num].times_sold = 0;
}
-static void delete_item() {
+static void delete_item(void) {
char *input;
BYTE num, last;
}
}
-int main() {
+int main(void) {
if (VIDEOMODE == 40)
toggle_videomode();
credits.num_items = 0;
// drucker 4 oder 5
// graphic 4,0,10
-static void sane_exit() {
- save_items();
- save_credits();
- exit(1);
-}
-
/* Hauptbildschirm ausgeben */
-static void print_screen() {
+static void print_screen(void) {
BYTE i = 0;
char *time = get_time();
char profit[10];
status.status[n].times_sold += buy(status.status[n].item_name, status.status[n].price);
}
-void buy_custom() {
+void buy_custom(void) {
BYTE c = 0, i = 0;
int negative = 1;
char entered[5] = {'1', 0, 0, 0, 0};
buy(name, price);
}
-void set_time_interactive() {
+void set_time_interactive(void) {
BYTE part[3] = {'0', '0', '\0'};
BYTE tp1, tp2, tp3;
char *time_input, *time;
cprintf("\r\nZeit gesetzt: %s\r\n", time);
}
-int main() {
+int main(void) {
char *c;
char *time;
const int LOG_SIZE = 8192;
-void init_log() {
+void init_log(void) {
log_heap_buf = malloc(sizeof(char) * LOG_SIZE);
if (log_heap_buf == NULL) {
cprintf("malloc(log_heap_buf) failed");
}
}
-void print_the_buffer() {
+void print_the_buffer(void) {
BYTE c;
RETRY:
c = cbm_open((BYTE)4, (BYTE)4, (BYTE)0, NULL);
log_file(print_buffer);
}
-void print_header() {
+void print_header(void) {
sprintf(print_buffer, "%c--------------------------------------------------------------------------------\r", 17);
print_the_buffer();