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