#ifndef _KASSE_H
#define _KASSE_H
+void print_the_buffer();
+
#ifdef _IS_KASSE
BYTE printing = 1;
char print_buffer[81];
#else
extern int log_num;
extern int log_lines_written;
+extern char print_buffer[81];
#endif
#endif
#include "config.h"
#include "general.h"
+#include "kasse.h"
static char *filter = NULL;
static BYTE filter_len;
credit->credit += deposit;
toggle_videomode();
- cprintf("%d Cent eingezahlt fuer %s.\r\nRestguthaben: %d\r\n", deposit, credit->nickname, credit->credit);
+ cprintf("%d Cent eingezahlt fuer %s.\r\nRestguthaben: %d\r\n", deposit, credit->nickname);
+ sprintf(print_buffer, "%c%d Cent eingezahlt fuer %s. Restguthaben: %d Cent\r", 17, deposit, credit->nickname, credit->credit);
+ cprintf("%s", print_buffer);
toggle_videomode();
- cprintf("\r\nEinzahlung durchgefuehrt, drucke RETURN...\r\n");
+ print_the_buffer();
+ cprintf("\r\nEinzahlung durchgefuehrt, druecke RETURN...\r\n");
input = get_input();
toggle_videomode();
clrscr();
return;
strcpy(credits.credits[credits.num_items].nickname, name);
credits.credits[credits.num_items].credit = credit;
+
+ sprintf(print_buffer, "%cGuthaben mit %d Cent fuer %s angelegt\r", 17, credit, name);
+ print_the_buffer();
+
credits.num_items++;
free(name);
}
/* Prints a line and logs it to file */
static void print_log(char *name, int item_price, int einheiten, char *nickname, char *rest) {
- BYTE c;
char *time = get_time();
char price[10];
/* Format:
sprintf(print_buffer, "%c[%lu] %s - %-9s - %s - r %s - %d - an %s\r", 17,
items_sold, time, name, price, rest,
einheiten, (*nickname != '\0' ? nickname : "Unbekannt"));
+ print_the_buffer();
+}
+
+void print_the_buffer() {
+ BYTE c;
RETRY:
c = cbm_open((BYTE)4, (BYTE)4, (BYTE)0, NULL);
if (c != 0) {