X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Farrays.c;h=9c001ccb0ed57ec678f1c6542910ac257c8be8c2;hb=d8d68d0bd4c45af6f0dc69b4fc33d37d961aca85;hp=c1f410ce34b9d47f1513c957c6ac5af927aaf18d;hpb=8760c1ba6442153afe76bcac742e086f90c59fe8;p=inform.git diff --git a/src/arrays.c b/src/arrays.c index c1f410c..9c001cc 100644 --- a/src/arrays.c +++ b/src/arrays.c @@ -4,7 +4,7 @@ /* simpler form of the same thing. */ /* */ /* Part of Inform 6.35 */ -/* copyright (c) Graham Nelson 1993 - 2020 */ +/* copyright (c) Graham Nelson 1993 - 2021 */ /* */ /* Inform is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ @@ -292,6 +292,8 @@ extern void make_global(int array_flag, int name_only) int array_type, data_type; int is_static = FALSE; assembly_operand AO; + + int extraspace; int32 global_symbol; const char *global_name; @@ -525,21 +527,17 @@ extern void make_global(int array_flag, int name_only) /* Leave room to write the array size in later, if string/table array */ - int extraspace = 0; + extraspace = 0; if ((array_type==STRING_ARRAY) || (array_type==TABLE_ARRAY)) extraspace += array_entry_size; if (array_type==BUFFER_ARRAY) extraspace += WORDSIZE; - - int orig_area_size; if (!is_static) { - orig_area_size = dynamic_array_area_size; array_base = dynamic_array_area_size; dynamic_array_area_size += extraspace; } else { - orig_area_size = static_array_area_size; array_base = static_array_area_size; static_array_area_size += extraspace; } @@ -693,12 +691,14 @@ advance as part of 'Zcharacter table':", unicode); finish_array(i, is_static); if (debugfile_switch) - { debug_file_printf(""); + { + int32 new_area_size; + debug_file_printf(""); debug_file_printf("%s", global_name); debug_file_printf(""); write_debug_array_backpatch(svals[global_symbol]); debug_file_printf(""); - int32 new_area_size = (!is_static ? dynamic_array_area_size : static_array_area_size); + new_area_size = (!is_static ? dynamic_array_area_size : static_array_area_size); debug_file_printf ("%d", new_area_size - array_base);