include/charset_umlauts.h:
./util/mkfont assets/umlauts.pbm chars_umlauts > $@
-kasse: build/config.o build/kasse.o build/general.o build/credit_manager.o build/c128time.o build/print.o build/vdc_patch_charset.o build/vdc_util.o
+kasse: build/config.o build/kasse.o build/general.o build/credit_manager.o build/c128time.o build/print.o build/vdc_patch_charset.o build/vdc_util.o build/globals.o
${LD} -Ln $@.lbl -t c128 $^ -o $@
-itemz: build/config.o build/itemz.o build/general.o build/credit_manager.o build/c128time.o build/print.o
+itemz: build/config.o build/itemz.o build/general.o build/credit_manager.o build/c128time.o build/print.o build/globals.o
${LD} -Ln $@.lbl -t c128 $^ -o $@
cat: build/general.o build/cat.o
* See LICENSE for license information
*
*/
-#define _IS_KASSE
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include "print.h"
#include "version.h"
#include "vdc_patch_charset.h"
+#include "globals.h"
// drucker 4 oder 5
// graphic 4,0,10
char *c;
char *time;
+ init_globals();
+
videomode(VIDEOMODE_80x25);
/* clock CPU at double the speed (a whopping 2 Mhz!) */
#include "general.h"
#define _IS_PRINT
#include "print.h"
+#include "globals.h"
/* NOTE: undocumented function which scratches files
We need to use this function because linking unistd.h
}
void print_the_buffer(void) {
- BYTE c;
+ BYTE status;
+ char *c;
+
+ if (!printing)
+ return;
+
RETRY:
- c = cbm_open((BYTE)4, (BYTE)4, (BYTE)0, NULL);
- if (c != 0) {
- c128_perror(c, "cbm_open(printer)");
- if (retry_or_quit() == 'q')
+ status = cbm_open((BYTE)4, (BYTE)4, (BYTE)0, NULL);
+ if (status != 0) {
+ c128_perror(status, "cbm_open(printer)");
+
+ do {
+ cprintf("\r\nr)etry, c)ontinue or q)uit?\r\n");
+ c = get_input();
+ } while ((*c != 'r') && (*c != 'c') && (*c != 'q'));
+
+ if (*c == 'q')
exit(1);
+ else if (*c == 'c') {
+ printing = 0;
+ return;
+ }
goto RETRY;
}
- c = cbm_write((BYTE)4, print_buffer, strlen(print_buffer));
- if (c != strlen(print_buffer)) {
- c128_perror(c, "write(printer)");
+ status = cbm_write((BYTE)4, print_buffer, strlen(print_buffer));
+ if (status != strlen(print_buffer)) {
+ c128_perror(status, "write(printer)");
if (retry_or_quit() == 'q')
exit(1);
goto RETRY;