5 #include "vdc_patch_charset.h"
7 typedef unsigned char BYTE;
9 INPUT_TERMINATOR_RETURN = (1 << 0),
10 INPUT_TERMINATOR_SPACE = (1 << 1),
12 typedef input_terminator_t input_terminator_mask_t;
13 input_terminator_t get_input_terminated_by(input_terminator_mask_t terminators,
14 char *out, BYTE outlen);
15 char *get_input(void);
16 BYTE cgetn_input(char *s, BYTE len);
17 int16_t cget_number(int16_t default_val);
18 void cget_return(void);
19 char retry_or_quit(void);
20 char *format_euro(char *s, int maxlen, int cent);
21 void c128_perror(BYTE, char *);
24 /* C128 color codes, see PDF page 127 of
25 * http://www.pagetable.com/docs/Commodore%20128%20Programmer%27s%20Reference%20Guide.pdf
37 /* This is the good red */
38 #define TC_LIGHT_RED 10
39 #define TC_DARK_GRAY 11
40 #define TC_MEDIUM_GRAY 12
41 /* This is the good green */
42 #define TC_LIGHT_GREEN 13
43 #define TC_LIGHT_BLUE 14
44 #define TC_LIGHT_GRAY 15
49 #define PETSCII_DEL 20
51 #define PETSCII_ESC 27
65 #define VIDEOMODE (((*(BYTE *)0xD7) == 0x80) ? 80 : 40)
67 #define EUR_FORMAT "%3d,%02d" EURSYM
68 #define EUR_FORMAT_MINLEN (sizeof("999,99" EURSYM) + 1)
70 /* because there is no macro expansion when stringifying, we need to use two
71 * levels of macros to stringify the value of a macro (for example
72 * MAX_ITEM_NAME_LENGTH) */
73 #define xstr(s) str(s)
76 #define max(a, b) ((a) > (b) ? (a) : (b))
77 #define min(a, b) ((a) > (b) ? (b) : (a))