Sync with upstream
authorJason Self <j@jxself.org>
Mon, 2 Jul 2018 22:40:51 +0000 (15:40 -0700)
committerJason Self <j@jxself.org>
Mon, 2 Jul 2018 22:40:51 +0000 (15:40 -0700)
Updating compiler to commit a44f7597596539f2201f8ccc6a87dbd3b829a8ad
from upstream dated June 28 2018. These changes are similiarly
relicensed to GPL per Section 4(c)(ii) of the Artistic License 2.0.

22 files changed:
arrays.c
asm.c
bpatch.c
chars.c
directs.c
errors.c
expressc.c
expressp.c
files.c
header.h
inform.c
lexer.c
linker.c
memory.c
objects.c
states.c
symbols.c
syntax.c
tables.c
text.c
veneer.c
verbs.c

index 0f1d3e51e882242b6b662ae1eb4c5fdeda80fcb2..93cc31ee6f75394b6ba1fe8d3490b96787393216 100644 (file)
--- a/arrays.c
+++ b/arrays.c
@@ -3,7 +3,7 @@
 /*               likewise global variables, which are in some ways a         */
 /*               simpler form of the same thing.                             */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
diff --git a/asm.c b/asm.c
index d3a9d995b8cb13d2d9eadd5fd2486ce9269e288f..a5444fd589d92f71d0838a53bfb0493b17d3d66a 100644 (file)
--- a/asm.c
+++ b/asm.c
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "asm" : The Inform assembler                                            */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index 2775f4540a196eecf2841adaae2202f6ee25da5a..ccc87badabc23049659ce1bf93f754e3487620b9 100644 (file)
--- a/bpatch.c
+++ b/bpatch.c
@@ -2,7 +2,7 @@
 /*   "bpatch" : Keeps track of, and finally acts on, backpatch markers,      */
 /*              correcting symbol values not known at compilation time       */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
diff --git a/chars.c b/chars.c
index f0fb36b231d1f8282b114d9e78f49f31bbf0c5d6..e91e9c191f9d041f91a0bb3f3ef56ca217ed8732 100644 (file)
--- a/chars.c
+++ b/chars.c
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "chars" : Character set mappings and the Z-machine alphabet table       */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index 5c622ba547b2bccab0ba285f31e489c79ff450e8..d3b7f32c6032e1f7548700b691f8ff3c7212a05a 100644 (file)
--- a/directs.c
+++ b/directs.c
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "directs" : Directives (# commands)                                     */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index 0ea92b18d9bb7dd8f36429d9961272c389cf6769..b76aa7d5658dbe9398b75280a5d9e228259ac73f 100644 (file)
--- a/errors.c
+++ b/errors.c
@@ -2,7 +2,7 @@
 /*   "errors" : Warnings, errors and fatal errors                            */
 /*              (with error throwback code for RISC OS machines)             */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index e0e8c2f85e17a8a55554431636d410924796866f..e6db119c32cd23378932b4eff41b98a60a483847 100644 (file)
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "expressc" :  The expression code generator                             */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index 270f308991371c09b1868c195b191a098453cea6..79f7c7a30227b01e69d7cff5c03fab16870eefde 100644 (file)
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "expressp" :  The expression parser                                     */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
diff --git a/files.c b/files.c
index 4e7377e4cb9c661db45c0abbb59c484333063aab..6e4bec4314c757805640562a28cb57b75041902d 100644 (file)
--- a/files.c
+++ b/files.c
@@ -7,7 +7,7 @@
 /*             routines in "inform.c", since they are tied up with ICL       */
 /*             settings and are very host OS-dependent.                      */
 /*                                                                           */
-/*  Copyright (c) Graham Nelson 1993 - 2016                                  */
+/*  Copyright (c) Graham Nelson 1993 - 2018                                  */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index 90715a5785a0f1042dd703d125ebcf4a779042b0..3faa6a45849413cca2b28404f26b1e35a245a5a8 100644 (file)
--- a/header.h
+++ b/header.h
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   Header file for Inform:  Z-machine ("Infocom" format) compiler          */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2017                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
@@ -32,7 +32,7 @@
 /*                                                                           */
 /* ------------------------------------------------------------------------- */
 
-#define RELEASE_DATE "16 Aug 2017"
+#define RELEASE_DATE "28th June 2018"
 #define RELEASE_NUMBER 1634
 #define GLULX_RELEASE_NUMBER 38
 #define MODULE_VERSION_NUMBER 1
index bb845c588c388b47e83fb38a615400b30146b044..793d534aa955c4f5bca566d71c41e54dc0d40c53 100644 (file)
--- a/inform.c
+++ b/inform.c
@@ -2,7 +2,7 @@
 /*   "inform" :  The top level of Inform: switches, pathnames, filenaming    */
 /*               conventions, ICL (Inform Command Line) files, main          */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
@@ -121,8 +121,11 @@ static void select_target(int targ)
     /* Z-machine */
     WORDSIZE = 2;
     MAXINTWORD = 0x7FFF;
-    INDIV_PROP_START = 64;
 
+    if (INDIV_PROP_START != 64) {
+        INDIV_PROP_START = 64;
+        fatalerror("You cannot change INDIV_PROP_START in Z-code");
+    }
     if (DICT_WORD_SIZE != 6) {
       DICT_WORD_SIZE = 6;
       fatalerror("You cannot change DICT_WORD_SIZE in Z-code");
@@ -152,9 +155,13 @@ static void select_target(int targ)
     /* Glulx */
     WORDSIZE = 4;
     MAXINTWORD = 0x7FFFFFFF;
-    INDIV_PROP_START = 256; /* This could be a memory setting */
     scale_factor = 0; /* It should never even get used in Glulx */
 
+    if (INDIV_PROP_START < 256) {
+        INDIV_PROP_START = 256;
+        warning_numbered("INDIV_PROP_START should be at least 256 in Glulx. Setting to", INDIV_PROP_START);
+    }
+
     if (NUM_ATTR_BYTES % 4 != 3) {
       NUM_ATTR_BYTES += (3 - (NUM_ATTR_BYTES % 4)); 
       warning_numbered("NUM_ATTR_BYTES must be a multiple of four, plus three. Increasing to", NUM_ATTR_BYTES);
diff --git a/lexer.c b/lexer.c
index 5cccffea04b6d72031c29b755381549259019fb3..f03aba5703428703b503cf1f2c5e3c002167f541 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "lexer" : Lexical analyser                                              */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index 943992066bd87a157d4b86e5d29134a2c5bfffb6..5841fdc4c57b1f4016b3c9496fef54110746a612 100644 (file)
--- a/linker.c
+++ b/linker.c
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "linker" : For compiling and linking modules                            */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index 2108bfb51a1a75c14c63edbcbc12c67319bac97a..fc8a446f1c7d83219231d063054be2d2bd8b5024 100644 (file)
--- a/memory.c
+++ b/memory.c
@@ -2,7 +2,7 @@
 /*   "memory" : Memory management and ICL memory setting commands            */
 /*              (For "memoryerror", see "errors.c")                          */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
@@ -319,8 +319,8 @@ static void list_memory_sizes(void)
     if (!glulx_mode)
       printf("|  %25s = %-7d |\n","ZCODE_HEADER_FLAGS_3",ZCODE_HEADER_FLAGS_3);
     printf("|  %25s = %-7d |\n","MAX_INCLUSION_DEPTH",MAX_INCLUSION_DEPTH);
-    printf("|  %25s = %-7d |\n","MAX_INDIV_PROP_TABLE_SIZE",
-        MAX_INDIV_PROP_TABLE_SIZE);
+    printf("|  %25s = %-7d |\n","MAX_INDIV_PROP_TABLE_SIZE", MAX_INDIV_PROP_TABLE_SIZE);
+    printf("|  %25s = %-7d |\n","INDIV_PROP_START", INDIV_PROP_START);
     printf("|  %25s = %-7d |\n","MAX_LABELS",MAX_LABELS);
     printf("|  %25s = %-7d |\n","MAX_LINESPACE",MAX_LINESPACE);
     printf("|  %25s = %-7d |\n","MAX_LINK_DATA_SIZE",MAX_LINK_DATA_SIZE);
@@ -561,6 +561,7 @@ extern void adjust_memory_sizes()
     DICT_WORD_SIZE = DICT_WORD_SIZE_z;
     NUM_ATTR_BYTES = NUM_ATTR_BYTES_z;
     ALLOC_CHUNK_SIZE = ALLOC_CHUNK_SIZE_z;
+    INDIV_PROP_START = 64;
   }
   else {
     MAX_ZCODE_SIZE = MAX_ZCODE_SIZE_g;
@@ -570,6 +571,7 @@ extern void adjust_memory_sizes()
     DICT_WORD_SIZE = DICT_WORD_SIZE_g;
     NUM_ATTR_BYTES = NUM_ATTR_BYTES_g;
     ALLOC_CHUNK_SIZE = ALLOC_CHUNK_SIZE_g;
+    INDIV_PROP_START = 256;
   }
 }
 
@@ -794,6 +796,12 @@ static void explain_parameter(char *command)
   table of ..variable values.\n");
         return;
     }
+    if (strcmp(command,"INDIV_PROP_START")==0)
+    {   printf(
+"  Properties 1 to INDIV_PROP_START-1 are common properties; individual\n\
+  properties are numbered INDIV_PROP_START and up.\n");
+        return;
+    }
     if (strcmp(command,"MAX_OBJ_PROP_COUNT")==0)
     {   printf(
 "  MAX_OBJ_PROP_COUNT is the maximum number of properties a single object \n\
@@ -1054,6 +1062,8 @@ extern void memory_command(char *command)
                 MAX_SOURCE_FILES=j, flag=1;
             if (strcmp(command,"MAX_INDIV_PROP_TABLE_SIZE")==0)
                 MAX_INDIV_PROP_TABLE_SIZE=j, flag=1;
+            if (strcmp(command,"INDIV_PROP_START")==0)
+                INDIV_PROP_START=j, flag=1;
             if (strcmp(command,"MAX_OBJ_PROP_TABLE_SIZE")==0)
                 MAX_OBJ_PROP_TABLE_SIZE=j, flag=1;
             if (strcmp(command,"MAX_OBJ_PROP_COUNT")==0)
index c29b260095e39a14ce84cac2e1eae2c3a05bcea8..88b1b6ab03f6fbdc49db305b9417e2eccf823da5 100644 (file)
--- a/objects.c
+++ b/objects.c
@@ -6,7 +6,7 @@
 /*                    checks syntax and translates such directives into      */
 /*                    specifications for the object-maker.                   */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
@@ -200,7 +200,6 @@ Advanced game to get an extra 62)");
         }
     }
     else {
-        /* INDIV_PROP_START could be a memory setting */
         if (no_properties==INDIV_PROP_START) {
             discard_token_location(beginning_debug_location);
             error_numbered("All properties already declared -- max is",
index d8c69ff86874cb623c06a91415d2dd9e23f36d4e..cd3b695a5777486926eec58c57e950c634bc8dc5 100644 (file)
--- a/states.c
+++ b/states.c
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "states" :  Statement translator                                        */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index 13a5aee313f5d81f98da6fd9c96d1bd4899f13d7..326316651af503cb2237cdd5bf86f6e72f3e8160 100644 (file)
--- a/symbols.c
+++ b/symbols.c
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "symbols" :  The symbols table; creating stock of reserved words        */
 /*                                                                           */
-/*  Copyright (c) Graham Nelson 1993 - 2016                                  */
+/*  Copyright (c) Graham Nelson 1993 - 2018                                  */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index 505269abce0b024c444410264f64efc98ec6a1f3..2486decb8969cd421de2bed9c24c74b5d376e72f 100644 (file)
--- a/syntax.c
+++ b/syntax.c
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "syntax" : Syntax analyser and compiler                                 */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index 7a18dbdc33f79066464c4819b4d0b2f2f107ef59..103f6f91e432566d96b63bf53f085c805113c9e5 100644 (file)
--- a/tables.c
+++ b/tables.c
@@ -3,7 +3,7 @@
 /*               end of dynamic memory, gluing together all the required     */
 /*               tables.                                                     */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
diff --git a/text.c b/text.c
index 1831057ba414e735932f1e5fcfd6604d142a618e..cd2fcd8c7b589fc8a642eb983621cb635f1d6aa1 100644 (file)
--- a/text.c
+++ b/text.c
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------------- */
 /*   "text" : Text translation, the abbreviations optimiser, the dictionary  */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
index ca27590b27ecc47bdbf5f9ffa24a1b22fc6ace4c..2f701595ebe104b6a7a0237edc820a800260583e 100644 (file)
--- a/veneer.c
+++ b/veneer.c
@@ -3,7 +3,7 @@
 /*              by the compiler (e.g. DefArt) which the program doesn't      */
 /*              provide                                                      */
 /*                                                                           */
-/* Copyright (c) Graham Nelson 1993 - 2016                                   */
+/* Copyright (c) Graham Nelson 1993 - 2018                                   */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */
diff --git a/verbs.c b/verbs.c
index c4e5027a329e3c204c5f0d1e9215800ec23cda3d..1116e096f4c7cada59d97ef9c5e929882a0a4b31 100644 (file)
--- a/verbs.c
+++ b/verbs.c
@@ -2,7 +2,7 @@
 /*   "verbs" :  Manages actions and grammar tables; parses the directives    */
 /*              Verb and Extend.                                             */
 /*                                                                           */
-/*  Copyright (c) Graham Nelson 1993 - 2017                                  */
+/*  Copyright (c) Graham Nelson 1993 - 2018                                  */
 /*                                                                           */
 /* This file is part of Inform.                                              */
 /*                                                                           */