-#ifndef GENERAL_H_
-#define GENERAL_H_
+#ifndef GENERAL_H
+#define GENERAL_H
#include <peekpoke.h>
+#include <stdint.h>
+#include "vdc_patch_charset.h"
typedef unsigned char BYTE;
typedef enum {
BYTE cgetn_input(char *s, BYTE len);
int16_t cget_number(int16_t default_val);
void cget_return(void);
+uint8_t cget_nickname(char *buf, uint8_t len);
char retry_or_quit(void);
-char *format_euro(char *s, int maxlen, int cent);
+char *format_euro(char *s, int maxlen, int32_t cent);
void c128_perror(BYTE, char *);
extern BYTE _oserror;
#define VIDEOMODE (((*(BYTE *)0xD7) == 0x80) ? 80 : 40)
+/* "-999,99€" */
+#define EUR_FORMAT "%3ld,%02lu" EURSYM
+#define EUR_FORMAT_MINLEN 8
+
/* because there is no macro expansion when stringifying, we need to use two
* levels of macros to stringify the value of a macro (for example
* MAX_ITEM_NAME_LENGTH) */
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) > (b) ? (b) : (a))
-#endif /*GENERAL_H_*/
+#endif /* GENERAL_H */