From 4e1a5e81f066e17d0825a439236b2e6d9fea150b Mon Sep 17 00:00:00 2001 From: Colpocorto Date: Thu, 26 Oct 2023 21:35:54 +0200 Subject: [PATCH] Fixed C89 compatibility --- src/cli/basbinizer.c | 2 +- src/cli/basbinizer.h | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/cli/basbinizer.c b/src/cli/basbinizer.c index 17cc8aa..a867dc5 100644 --- a/src/cli/basbinizer.c +++ b/src/cli/basbinizer.c @@ -397,7 +397,7 @@ bool write_cas(byte *buffer, off_t buf_size, byte *scr_buf, off_t scr_buf_size, cas_loader_data[SCR_PATCH_POS2] = (byte)((scr_buf_size - 7) & 0xff); cas_loader_data[SCR_PATCH_POS1 + 1] = (byte)(((scr_buf_size - 7) & 0xff00) >> 8); cas_loader_data[SCR_PATCH_POS2 + 1] = (byte)(((scr_buf_size - 7) & 0xff00) >> 8); - cas_loader_data[SCR_PATCH_POS3] = 0; // NOP the JR to make the screen loading routine work + cas_loader_data[SCR_PATCH_POS3] = 0; cas_loader_data[VM_PATCH_POS] = options.scr_mode; } diff --git a/src/cli/basbinizer.h b/src/cli/basbinizer.h index 430baec..f848c15 100644 --- a/src/cli/basbinizer.h +++ b/src/cli/basbinizer.h @@ -76,13 +76,13 @@ byte bin_loader_data[BIN_LOADER_SIZE] = { }; byte cas_loader_data[CAS_LOADER_SIZE] = { - 0x1F, 0xA6, 0xDE, 0xBA, 0xCC, 0x13, 0x7D, 0x74, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, //#00 - 0xD0, 0xD0, 0x47, 0x41, 0x4D, 0x45, 0x20, 0x20, 0x1F, 0xA6, 0xDE, 0xBA, 0xCC, 0x13, 0x7D, 0x74, //#10 - 0x75, 0xF9, 0x10, 0xFA, 0x75, 0xF9, 0xF3, 0x3E, 0xC9, 0x32, 0x9A, 0xFD, 0x32, 0x9F, 0xFD, 0x3E, //#20 - 0x01, 0x21, 0xE9, 0xF3, 0x77, 0x3E, 0x01, 0x23, 0x77, 0x23, 0x77, 0xCD, 0x62, 0x00, 0x18, 0x20, //#30 - 0x21, 0x00, 0x80, 0x01, 0x00, 0x40, 0xCD, 0xCD, 0xF9, 0x3E, 0x02, 0xCD, 0x5F, 0x00, 0xCD, 0x41, //#40 - 0x00, 0x21, 0x00, 0x80, 0x11, 0x00, 0x00, 0x01, 0x00, 0x40, 0xCD, 0x5C, 0x00, 0xCD, 0x44, 0x00, //#50 - 0x21, 0x00, 0x80, 0x01, 0x00, 0x00, 0xCD, 0xCD, 0xF9, 0xF3, 0x22, 0xC2, 0xF6, 0x21, 0x01, 0x80, //#60 + 0x1F, 0xA6, 0xDE, 0xBA, 0xCC, 0x13, 0x7D, 0x74, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, + 0xD0, 0xD0, 0x47, 0x41, 0x4D, 0x45, 0x20, 0x20, 0x1F, 0xA6, 0xDE, 0xBA, 0xCC, 0x13, 0x7D, 0x74, + 0x75, 0xF9, 0x10, 0xFA, 0x75, 0xF9, 0xF3, 0x3E, 0xC9, 0x32, 0x9A, 0xFD, 0x32, 0x9F, 0xFD, 0x3E, + 0x01, 0x21, 0xE9, 0xF3, 0x77, 0x3E, 0x01, 0x23, 0x77, 0x23, 0x77, 0xCD, 0x62, 0x00, 0x18, 0x20, + 0x21, 0x00, 0x80, 0x01, 0x00, 0x40, 0xCD, 0xCD, 0xF9, 0x3E, 0x02, 0xCD, 0x5F, 0x00, 0xCD, 0x41, + 0x00, 0x21, 0x00, 0x80, 0x11, 0x00, 0x00, 0x01, 0x00, 0x40, 0xCD, 0x5C, 0x00, 0xCD, 0x44, 0x00, + 0x21, 0x00, 0x80, 0x01, 0x00, 0x00, 0xCD, 0xCD, 0xF9, 0xF3, 0x22, 0xC2, 0xF6, 0x21, 0x01, 0x80, 0x22, 0x76, 0xF6, 0x2B, 0x22, 0x48, 0xFC, 0xAF, 0x32, 0x00, 0x80, 0xC3, 0xAC, 0x73, 0xF3, 0xC5, 0xE5, 0x3A, 0x07, 0x00, 0x3C, 0x32, 0x0B, 0xFA, 0x32, 0x0F, 0xFA, 0xCD, 0xE1, 0x00, 0x38, 0xFB, 0xCD, 0xE4, 0x00, 0x38, 0xFB, 0xE1, 0x77, 0x23, 0x3A, 0x08, 0xFA, 0xEE, 0x06, 0x32, 0x08, 0xFA, @@ -127,7 +127,6 @@ options_t options; */ uint16_t get_word_value(byte *pointer); int get_octal(byte *buffer, int pos, FILE *output); -//int get_file_size(FILE *fi); byte *get_input_file(char *infile, off_t infile_s); int get_float(byte *buffer, int pos, FILE *output, bool is_double); int8_t read_mantissa(byte *buffer, char *mantissa, int8_t length);