]> git.sur5r.net Git - c128-kasse/blobdiff - include/general.h
README: remove emulator configuration, we use -config vicerc
[c128-kasse] / include / general.h
index e07176eadf8cfe05fbc359bfb2cc860af7470570..0aec044f13f85f85876e3da64c8769770272c271 100644 (file)
@@ -1,7 +1,9 @@
-#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 {
@@ -13,9 +15,11 @@ input_terminator_t get_input_terminated_by(input_terminator_mask_t terminators,
                                            char *out, BYTE outlen);
 char *get_input(void);
 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;
 
@@ -62,6 +66,10 @@ 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) */
@@ -71,4 +79,4 @@ extern BYTE _oserror;
 #define max(a, b) ((a) > (b) ? (a) : (b))
 #define min(a, b) ((a) > (b) ? (b) : (a))
 
-#endif /*GENERAL_H_*/
+#endif /* GENERAL_H */