Import v6.12.6 of the Inform 6 standard library master v6.12.6
authorJason Self <j@jxself.org>
Sun, 29 May 2022 04:56:12 +0000 (21:56 -0700)
committerJason Self <j@jxself.org>
Sun, 29 May 2022 04:56:12 +0000 (21:56 -0700)
Modified to not print out the version of Inform and the version of the
standard library in use in the game's banner. Also relicensed to AGPL
per Section 4(c)(ii) of the Artistic License 2.0.

english.h
grammar.h
infix.h
linklpa.h
parser.h
readme.txt
verblib.h
version.h

index 6494b312c15df2063152fb3c28f89df8bdb6864b..24bc0fda9e7251f4421f6f131d5755d42f8f4f02 100644 (file)
--- a/english.h
+++ b/english.h
@@ -1,9 +1,9 @@
 ! ==============================================================================
 !   ENGLISH:  Language Definition File
 !
-!   Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605
+!   Supplied for use with Inform 6 -- Release 6.12.6 -- Serial number 220219
 !
-!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021
+!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2022
 !
 !   This file is free software: you can redistribute it and/or modify
 !   it under the terms of the GNU Affero General Public License as
@@ -1129,7 +1129,8 @@ Constant LIBRARYV__TX   = " Library v";
             print " ";
         5:  print "^Would you like to RESTART, RESTORE a saved game";
             #Ifdef DEATH_MENTION_UNDO;
-            print ", UNDO your last move";
+           if (undo_flag ~= 0)
+               print ", UNDO your last move";
             #Endif;
             if (TASKS_PROVIDED == 0) print ", give the FULL score for that game";
             if (deadflag == 2 && AMUSING_PROVIDED == 0)
index 8e359096cbd99d9d7ca18c2740ca12571b5cfd12..a62c978d15705356dd9d5488ea7b7c0e88a43ce6 100644 (file)
--- a/grammar.h
+++ b/grammar.h
@@ -1,9 +1,9 @@
 ! ==============================================================================
 !   GRAMMAR:  Grammar table entries for the standard verbs library.
 !
-!   Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605
+!   Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 220219
 !
-!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021
+!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2022
 !
 !   This file is free software: you can redistribute it and/or modify
 !   it under the terms of the GNU Affero General Public License as
diff --git a/infix.h b/infix.h
index 19628349ca96afbe068bd34278a088d266ebc370..e12af0473c3b3e32de8151f3d9649a707cea697e 100644 (file)
--- a/infix.h
+++ b/infix.h
@@ -1,9 +1,9 @@
 ! ==============================================================================
 !   INFIX:  Support for the optional library debugger extension "Infix".
 !
-!   Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605
+!   Supplied for use with Inform 6 -- Release 6.12.6 -- Serial number 220219
 !
-!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021
+!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2022
 !
 !   This file is free software: you can redistribute it and/or modify
 !   it under the terms of the GNU Affero General Public License as
index 364bf7d69ba10fbaa6f2e8c6784b207fe917b4c1..96177d361c5f7ec15e70d91e8b178136b9939e34 100644 (file)
--- a/linklpa.h
+++ b/linklpa.h
@@ -1,9 +1,9 @@
 ! ==============================================================================
 !   LINKLPA:  Link declarations of common properties and attributes.
 !
-!   Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605
+!   Supplied for use with Inform 6 -- Release 6.12.6 -- Serial number 220219
 !
-!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021
+!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2022
 !
 !   This file is free software: you can redistribute it and/or modify
 !   it under the terms of the GNU Affero General Public License as
@@ -75,8 +75,10 @@ Attribute neuter;
 Attribute pluralname;
 
 #Ifdef INFIX;
+#Ifndef infix__watching;
 Attribute infix__watching;
 #Endif;
+#Endif;
 
 ! ------------------------------------------------------------------------------
 
index 9ef53b10db275e615b1c90d28116f7f814641ec8..f72b571e42547f2620bcd86e33d3ae76f5b75c14 100644 (file)
--- a/parser.h
+++ b/parser.h
@@ -1,9 +1,9 @@
 ! ==============================================================================
 !   PARSER:  Front end to parser.
 !
-!   Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605
+!   Supplied for use with Inform 6 -- Release 6.12.6 -- Serial number 220219
 !
-!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021
+!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2022
 !
 !   This file is free software: you can redistribute it and/or modify
 !   it under the terms of the GNU Affero General Public License as
@@ -115,8 +115,13 @@ Constant HDR_SCREENHLINES  $20;     ! byte
 Constant HDR_SCREENWCHARS  $21;     ! byte
 Constant HDR_SCREENWUNITS  $22;     ! word
 Constant HDR_SCREENHUNITS  $24;     ! word
+#Iftrue (#version_number == 6);
+Constant HDR_FONTHUNITS    $26;     ! byte
+Constant HDR_FONTWUNITS    $27;     ! byte
+#Ifnot;
 Constant HDR_FONTWUNITS    $26;     ! byte
 Constant HDR_FONTHUNITS    $27;     ! byte
+#Endif;
 Constant HDR_ROUTINEOFFSET $28;     ! word
 Constant HDR_STRINGOFFSET  $2A;     ! word
 Constant HDR_BGCOLOUR      $2C;     ! byte
@@ -1707,6 +1712,9 @@ Object  InformParser "(Inform Parser)"
 
     if (usual_grammar_after == 0) {
         j = verb_wordnum;
+        #Ifdef TARGET_ZCODE;
+               parser_one = 0;
+        #Endif;
         i = RunRoutines(actor, grammar);
         #Ifdef DEBUG;
         if (parser_trace >= 2 && actor.grammar ~= 0 or NULL)
@@ -1715,9 +1723,10 @@ Object  InformParser "(Inform Parser)"
 
         #Ifdef TARGET_ZCODE;
         if ((i ~= 0 or 1) &&
+           (parser_one ~= 0 ||
             (UnsignedCompare(i, dict_start) < 0 ||
              UnsignedCompare(i, dict_end) >= 0 ||
-             (i - dict_start) % dict_entry_size ~= 0)) {
+             (i - dict_start) % dict_entry_size ~= 0))) {
             usual_grammar_after = j;
             i=-i;
         }
@@ -4561,22 +4570,29 @@ Constant SCORE__DIVISOR     = 20;
     #Ifdef DEBUG;
     if (threshold >= 0 && parser_trace >= 5) print "    ParseNoun returned ", threshold, "^";
     #Endif; ! DEBUG
-    if (threshold < 0) wn++;
-    if (threshold > 0) { k = threshold; jump MMbyPN; }
-
-    if (threshold == 0 || Refers(obj,wn-1) == 0) {
-      .NoWordsMatch;
-        if (indef_mode ~= 0) {
-            k = 0; parser_action = NULL;
-            jump MMbyPN;
-        }
-        rfalse;
+    ! Don't arbitrarily increase wn when ParseNoun() returns -1
+    if (threshold > 0) {
+       k = threshold;
+       wn = j + k;
+       jump MMbyPN;
+    }
+    ! Check wn instead of wn - 1
+    if (threshold == 0 || Refers(obj,wn) == 0) {
+       .NoWordsMatch;
+       if (indef_mode ~= 0) {
+               ! Restore wn to pre-ParseNoun() state
+               k = 0; parser_action = NULL; wn = j;
+               jump MMbyPN;
+       }
+       rfalse;
     }
 
     if (threshold < 0) {
-        threshold = 1;
-        dict_flags_of_noun = (w->#dict_par1) & (DICT_X654+DICT_PLUR);!$$01110100;
-        w = NextWord();
+       ! Set threshold to reflect any words consumed by ParseNoun()
+       threshold = wn - j;
+       w = NextWord(); ! Ensure w contains actual first word of noun phrase
+                       ! if ParseNoun() moved wn.
+       dict_flags_of_noun = (w->#dict_par1) & (DICT_X654+DICT_PLUR);!$$01110100;
         while (Refers(obj, wn-1)) {
             threshold++;
             if (w)
@@ -4913,8 +4929,19 @@ Constant MAX_DECIMAL_BASE 214748364;
 
 #Ifdef TARGET_ZCODE;
 
-[ Dword__No w; return (w-(HDR_DICTIONARY-->0 + 7))/9; ];
-[ No__Dword n; return HDR_DICTIONARY-->0 + 7 + 9*n; ];
+[ Dword__No w dp dh;
+       dp = HDR_DICTIONARY-->0;
+       dh = dp->0 + 4;
+       dp = dp + dp->0 + 1;
+       return (w-(HDR_DICTIONARY-->0 + dh )) / (dp->0);
+];
+
+[ No__Dword n dp dh;
+       dp = HDR_DICTIONARY-->0;
+       dh = dp->0 + 4;
+       dp = dp + dp->0 + 1;
+       return HDR_DICTIONARY-->0 + dh + (dp->0 *n);
+];
 
 #Ifnot; ! TARGET_GLULX
 
@@ -6495,7 +6522,7 @@ Object  InformLibrary "(Inform Library)"
 #Endif; ! TARGET_ZCODE
 
 #Ifndef DrawStatusLine;
-[ DrawStatusLine width posa posb posc;
+[ DrawStatusLine width posa posb posc posd pose;
     #Ifdef TARGET_GLULX;
     ! If we have no status window, we must not try to redraw it.
     if (gg_statuswin == 0)
@@ -6510,9 +6537,13 @@ Object  InformLibrary "(Inform Library)"
     MoveCursor(1, 1);
 
     width = ScreenWidth();
-    posa = width-26;
+    posa = width-26;   ! For standard move/score display.
     posb = width-13;
     posc = width-5;
+
+    posd = width-19;   ! For time display.
+    pose = width-14;
+
     spaces width;
 
     MoveCursor(1, 2);
@@ -6526,13 +6557,17 @@ Object  InformLibrary "(Inform Library)"
         else
             print (The) visibility_ceiling;
     }
-
-    if (sys_statusline_flag && width > 53) {
-        MoveCursor(1, posa);
-        print (string) TIME__TX;
-        LanguageTimeOfDay(sline1, sline2);
-    }
-    else {
+    if (sys_statusline_flag) {
+       if (width > 29) {
+           if (width > 39)
+               MoveCursor(1, posd);
+           else
+               MoveCursor(1, pose);
+           print (string) TIME__TX;
+           LanguageTimeOfDay(sline1, sline2);
+       } else
+           jump DSLContinue;
+    } else {
         if (width > 66) {
             #Ifndef NO_SCORE;
             MoveCursor(1, posa);
@@ -6558,7 +6593,7 @@ Object  InformLibrary "(Inform Library)"
           #Endif;
        }
     }
-
+    .DSLContinue;
     MainWindow(); ! set_window
 ];
 #Endif;
index 9cf4047ca61502536cdbe9e485be2ca10edf056f..b6a7a7c0e0e71560e90f5a3e4f228218d80195d2 100644 (file)
@@ -1,4 +1,4 @@
-This directory contains version 6.12.5 of the Inform 6 standard
+This directory contains version 6.12.6 of the Inform 6 standard
 library. It has been modified slightly to not print out the version of 
 Inform and the version of the standard library in use in the game's 
 banner.
index ff27fab0464743e898503fd7e845ca204e2f8fcc..1f1b30411ad729b367b6f45b140a0973fe9d83ce 100644 (file)
--- a/verblib.h
+++ b/verblib.h
@@ -1,9 +1,9 @@
 ! ==============================================================================
 !   VERBLIB:  Front end to standard verbs library.
 !
-!   Supplied for use with Inform 6 -- Release 6.12.5 -- Serial number 210605
+!   Supplied for use with Inform 6 -- Release 6.12.6 -- Serial number 220219
 !
-!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2021
+!   Copyright Graham Nelson 1993-2004 and David Griffith 2012-2022
 !
 !   This file is free software: you can redistribute it and/or modify
 !   it under the terms of the GNU Affero General Public License as
@@ -17,7 +17,7 @@
 !
 !   You should have received a copy of the GNU Affero General Public
 !   License along with this program. If not, see
-!   https://gnu.org/licenses/.
+!   https://gnu.org/licenses/
 !
 !   In your game file, Include three library files in this order:
 !       Include "parser";
@@ -2587,7 +2587,7 @@ Constant ID_BIT        $2000;       ! Print object id after each entry
     if (noun has open)       return L__M(##Open, 3, noun);
     give noun open;
 
-    if (keep_silent || AfterRoutines()) return;
+    if (AfterRoutines() || keep_silent) return;
 
     if (noun hasnt container)
        return L__M(##Open, 5, noun);
index 1ce9426b4f04874941f1553ba8485e3a7a980dcd..2fdc449740bf85b160b1ef4789664fa9e2fc3547 100644 (file)
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
 System_file;
 
-Constant LibSerial       "210605";
-Constant LibRelease      "6.12.5";
+Constant LibSerial       "220219";
+Constant LibRelease      "6.12.6";
 Constant LIBRARY_VERSION  612;
 Constant Grammar__Version 2;