Sync with upstream
[inform.git] / inform.c
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);