]> git.sur5r.net Git - c128-kasse/blobdiff - include/general.h
fix print_log() format string
[c128-kasse] / include / general.h
index 82a0db926d521659b87131fbcb9cb899a91db4d7..4b7c99ba502db45d8be450fb2c22f3d42ec0d861 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 {
@@ -12,7 +14,10 @@ typedef input_terminator_t input_terminator_mask_t;
 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);
 void c128_perror(BYTE, char *);
@@ -61,6 +66,10 @@ extern BYTE _oserror;
 
 #define VIDEOMODE (((*(BYTE *)0xD7) == 0x80) ? 80 : 40)
 
+/* "999,99€" */
+#define EUR_FORMAT "%3d,%02d" EURSYM
+#define EUR_FORMAT_MINLEN 7
+
 /* 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) */
@@ -70,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 */