6 typedef unsigned char BYTE;
8 INPUT_TERMINATOR_RETURN = (1 << 0),
9 INPUT_TERMINATOR_SPACE = (1 << 1),
11 typedef input_terminator_t input_terminator_mask_t;
12 input_terminator_t get_input_terminated_by(input_terminator_mask_t terminators,
13 char *out, BYTE outlen);
14 char *get_input(void);
15 char retry_or_quit(void);
16 char *format_euro(char *s, int maxlen, int cent);
17 void c128_perror(BYTE, char *);
20 /* C128 color codes, see PDF page 127 of
21 * http://www.pagetable.com/docs/Commodore%20128%20Programmer%27s%20Reference%20Guide.pdf
33 /* This is the good red */
34 #define TC_LIGHT_RED 10
35 #define TC_DARK_GRAY 11
36 #define TC_MEDIUM_GRAY 12
37 /* This is the good green */
38 #define TC_LIGHT_GREEN 13
39 #define TC_LIGHT_BLUE 14
40 #define TC_LIGHT_GRAY 15
45 #define PETSCII_DEL 20
59 #define VIDEOMODE (((*(BYTE *)0xD7) == 0x80) ? 80 : 40)
61 /* because there is no macro expansion when stringifying, we need to use two
62 * levels of macros to stringify the value of a macro (for example
63 * MAX_ITEM_NAME_LENGTH) */
64 #define xstr(s) str(s)
67 #define max(a, b) ((a) > (b) ? (a) : (b))
68 #define min(a, b) ((a) > (b) ? (b) : (a))