Skip to content

Commit c304f58

Browse files
committed
Update to patched version of Inform 6
This is not a 6.34 release, but contains two patches relative to the version of 6.33 that was shipped with Inform 6L02.
1 parent 2bedfa0 commit c304f58

4 files changed

Lines changed: 90 additions & 26 deletions

File tree

src/inform6/ReleaseNotes.html

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</head>
77
<body>
88
<h1>Inform Release Notes</h1>
9-
<h3>Inform Compiler 6.33, 6.32, 6.31, 6.30<br>Inform Library 6/11</h3>
9+
<h3>Inform Compiler 6.34, 6.33, 6.32, 6.31, 6.30<br>Inform Library 6/11</h3>
1010

1111
<h2>Introduction</h2>
1212
This is a maintenance release of the Inform system for creating adventure games, intended to address
@@ -44,15 +44,26 @@ <h2>Acknowledgements</h2>
4444
There are, naturally, sure to be imperfections in the release, and these should be reported through the
4545
<a href="http://inform7.com/mantis/">Inform bug tracker</a>.
4646

47+
<h2>Compiler 6.34</h2>
48+
These are the changes delivered in version 6.34 of the Inform compiler.
49+
<h3>Bugs fixed</h3>
50+
Items of the form [Mantis N] quote the bug&rsquo;s reference number in Inform 7&rsquo;s Mantis bug tracker.
51+
<ul>
52+
<li><p>The output for the <tt>$list</tt> command line argument now includes the value of the
53+
<tt>$MAX_ARRAYS</tt> setting. [Mantis 1355]
54+
<li><p>Memory settings can no longer overflow if set to very large values. These values are limited to a
55+
maximum of 999999999: setting them higher just results in a warning. [Mantis 1356]
56+
</ul>
57+
4758
<h2>Compiler 6.33</h2>
4859
These are the changes delivered in version 6.33 of the Inform compiler.
4960
<h3>Features added</h3>
5061
<ul>
5162
<li><p>Unused routines can now be detected and omitted from the compiled game, through two
52-
new settings. If <tt>$WARN_UNUSED_ROUTINES</tt> is set to 1, unused routines are reported during
53-
compilation. If <tt>$OMIT_UNUSED_ROUTINES</tt> is set to 1, unused routines (other than those in the
54-
Inform library) are omitted; if it is set to 2, unused routines anywhere, even in the library, are
55-
omitted.
63+
new settings. If <tt>$WARN_UNUSED_ROUTINES</tt> is set to 1, unused routines (other than those in
64+
the Inform library) are reported during compilation; if it is set to 2, unused routines anywhere,
65+
even in the library, are reported. If <tt>$OMIT_UNUSED_ROUTINES</tt> is set to 1, unused routines
66+
are omitted.
5667
<li><p>A new command line switch <tt><b>-Cu</b></tt> can be used to specify that the source file
5768
character set is UTF-8, allowing source files to contain Unicode characters beyond those defined in
5869
ISO 8859-1 to 8859-9.
@@ -105,7 +116,7 @@ <h3>Features added</h3>
105116
amount of additional space to add to each object record. The default is 0.
106117
</ul>
107118
<h3>Bugs fixed</h3>
108-
Items of the form [Mantis 510] quote the bug&rsquo;s reference number in Inform 7&rsquo;s Mantis bug tracker.
119+
Items of the form [Mantis N] quote the bug&rsquo;s reference number in Inform 7&rsquo;s Mantis bug tracker.
109120
<ul>
110121
<li><p>Function calls of the form <tt>f(g)(h)</tt> (that is, where <tt>f()</tt> returns the address of a
111122
function that is called with <tt>h</tt> as its argument) are now compiled correctly: previously, such calls were
@@ -145,12 +156,13 @@ <h3>Bugs fixed</h3>
145156
];
146157
</pre>
147158
is now supported for Glulx. [Mantis 1214]
159+
<li><p>The statistics produced by the <tt>-s</tt> compiler switch are now correct for Glulx. [Mantis 1267]
148160
</ul>
149161

150162
<h2>Compiler 6.32</h2>
151163
These are the changes delivered in version 6.32 of the Inform compiler.
152164
<h3>Features added</h3>
153-
Items of the form [C63104] quote the feature&rsquo;s reference number in the &lsquo;Compiler&rsquo; section of the Inform
165+
Items of the form [C63NNN] quote the feature&rsquo;s reference number in the &lsquo;Compiler&rsquo; section of the Inform
154166
Patch List.
155167
<ul>
156168
<li><p>The Z-machine opcodes for pushing and pulling values from the stack are <tt>@push</tt> and <tt>@pull</tt>, used like this:
@@ -219,7 +231,7 @@ <h3>Features added</h3>
219231
However, this also requires library changes to be useful, as the library makes use of this dictionary table.
220232
</ul>
221233
<h3>Bugs fixed</h3>
222-
Items of the form [C63102] quote the bug&rsquo;s reference number in the &lsquo;Compiler&rsquo; section of the Inform
234+
Items of the form [C63NNN] quote the bug&rsquo;s reference number in the &lsquo;Compiler&rsquo; section of the Inform
223235
Patch List.
224236
<ul>
225237
<li><p>Strict mode is no longer enabled by default when generating V3 and V4 Z-code files, as strict mode
@@ -248,7 +260,7 @@ <h3>Bugs fixed</h3>
248260
<h2>Compiler 6.31</h2>
249261
These are the changes delivered in version 6.31 of the Inform compiler.
250262
<h3>Bugs fixed</h3>
251-
Items of the form [C63016] quote the bug&rsquo;s reference number in the &lsquo;Compiler&rsquo; section of the Inform
263+
Items of the form [C63NNN] quote the bug&rsquo;s reference number in the &lsquo;Compiler&rsquo; section of the Inform
252264
Patch List.
253265
<ul>
254266
<li><p>When individual properties are read (successfully), there is no longer a futile attempt to look up
@@ -370,7 +382,7 @@ <h3>Features added</h3>
370382
typing <tt>name 'g' 'string'</tt> when you intended <tt>name 'g//' 'string'</tt>.
371383
</ul>
372384
<h3>Bugs fixed</h3>
373-
Items of the form [C62127] quote the bug&rsquo;s reference number in the &lsquo;Compiler&rsquo; section of the Inform
385+
Items of the form [C62NNN] quote the bug&rsquo;s reference number in the &lsquo;Compiler&rsquo; section of the Inform
374386
Patch List.
375387
<ul>
376388
<li><p>A problem with multiple assignment involving pointer arithmetic in Strict mode giving the wrong
@@ -707,7 +719,7 @@ <h3>Library routines</h3>
707719
prints that string (with a terminating newline unless <tt><i>flag</i></tt> is
708720
true).</blockquote>
709721
<h3>Bugs fixed</h3>
710-
Items of the form [L61036] quote the bug&rsquo;s reference number in the &lsquo;Library&rsquo; section of the Inform
722+
Items of the form [L610NN] quote the bug&rsquo;s reference number in the &lsquo;Library&rsquo; section of the Inform
711723
Patch List.
712724
<ul>
713725
<li><p>A command like EMPTY ME no longer replies &ldquo;yourself can't contain things&rdquo;. [L61036]

src/inform6/header.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
/* */
3131
/* ------------------------------------------------------------------------- */
3232

33-
#define RELEASE_DATE "18th April 2014"
33+
#define RELEASE_DATE "20th August 2014"
3434
#define RELEASE_NUMBER 1633
3535
#define GLULX_RELEASE_NUMBER 38
3636
#define MODULE_VERSION_NUMBER 1
3737
#define VNUMBER RELEASE_NUMBER
3838

3939
/* N indicates an intermediate release for Inform 7 */
40-
/*#define RELEASE_SUFFIX "N"*/
40+
#define RELEASE_SUFFIX "N"
4141

4242
/* ------------------------------------------------------------------------- */
4343
/* Our host machine or OS for today is... */

src/inform6/memory.c

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ static void list_memory_sizes(void)
290290
printf("| %25s = %-7d |\n","MAX_ACTIONS",MAX_ACTIONS);
291291
printf("| %25s = %-7d |\n","MAX_ADJECTIVES",MAX_ADJECTIVES);
292292
printf("| %25s = %-7d |\n","ALLOC_CHUNK_SIZE",ALLOC_CHUNK_SIZE);
293+
printf("| %25s = %-7d |\n","MAX_ARRAYS",MAX_ARRAYS);
293294
printf("| %25s = %-7d |\n","NUM_ATTR_BYTES",NUM_ATTR_BYTES);
294295
printf("| %25s = %-7d |\n","MAX_CLASSES",MAX_CLASSES);
295296
printf("| %25s = %-7d |\n","MAX_DICT_ENTRIES",MAX_DICT_ENTRIES);
@@ -861,6 +862,59 @@ static void explain_parameter(char *command)
861862
return;
862863
}
863864

865+
/* Parse a decimal number as an int32. Return true if a valid number
866+
was found; otherwise print a warning and return false.
867+
868+
Anything over nine digits is considered an overflow; we report a
869+
warning but return +/- 999999999 (and true). This is not entirely
870+
clever about leading zeroes ("0000000001" is treated as an
871+
overflow) but this is better than trying to detect genuine
872+
overflows in a long.
873+
874+
(Some Glulx settings might conceivably want to go up to $7FFFFFFF,
875+
which is a ten-digit number, but we're not going to allow that
876+
today.)
877+
878+
This used to rely on atoi(), and we retain the atoi() behavior of
879+
ignoring garbage characters after a valid decimal number.
880+
*/
881+
static int parse_memory_setting(char *str, char *label, int32 *result)
882+
{
883+
char *cx = str;
884+
char *ex;
885+
long val;
886+
887+
*result = 0;
888+
889+
while (*cx == ' ') cx++;
890+
891+
val = strtol(cx, &ex, 10);
892+
893+
if (ex == cx) {
894+
printf("Bad numerical setting in $ command \"%s=%s\"\n",
895+
label, str);
896+
return 0;
897+
}
898+
899+
if (*cx == '-') {
900+
if (ex > cx+10) {
901+
val = -999999999;
902+
printf("Numerical setting underflowed in $ command \"%s=%s\" (limiting to %ld)\n",
903+
label, str, val);
904+
}
905+
}
906+
else {
907+
if (ex > cx+9) {
908+
val = 999999999;
909+
printf("Numerical setting overflowed in $ command \"%s=%s\" (limiting to %ld)\n",
910+
label, str, val);
911+
}
912+
}
913+
914+
*result = (int32)val;
915+
return 1;
916+
}
917+
864918
extern void memory_command(char *command)
865919
{ int i, k, flag=0; int32 j;
866920

@@ -876,10 +930,7 @@ extern void memory_command(char *command)
876930
for (i=0; command[i]!=0; i++)
877931
{ if (command[i]=='=')
878932
{ command[i]=0;
879-
j=(int32) atoi(command+i+1);
880-
if ((j==0) && (command[i+1]!='0'))
881-
{ printf("Bad numerical setting in $ command \"%s=%s\"\n",
882-
command,command+i+1);
933+
if (!parse_memory_setting(command+i+1, command, &j)) {
883934
return;
884935
}
885936
if (strcmp(command,"BUFFER_LENGTH")==0)

src/inform6/tables.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,25 +1633,25 @@ Out: %s %s %d.%c%c%c%c%c%c (%ld%sK long):\n",
16331633

16341634
printf("\
16351635
%6d classes (maximum %3d) %6d objects (maximum %3d)\n\
1636-
%6d global vars (maximum 233) %6d variable/array space (maximum %d)\n",
1636+
%6d global vars (maximum %3d) %6d variable/array space (maximum %d)\n",
16371637
no_classes, MAX_CLASSES,
1638-
no_objects, ((version_number==3)?255:(MAX_OBJECTS-1)),
1639-
no_globals,
1638+
no_objects, MAX_OBJECTS,
1639+
no_globals, MAX_GLOBAL_VARIABLES,
16401640
dynamic_array_area_size, MAX_STATIC_DATA);
16411641

16421642
printf(
16431643
"%6d verbs (maximum %3d) %6d dictionary entries (maximum %d)\n\
16441644
%6d grammar lines (version %d) %6d grammar tokens (unlimited)\n\
16451645
%6d actions (maximum %3d) %6d attributes (maximum %2d)\n\
1646-
%6d common props (maximum %2d) %6d individual props (unlimited)\n",
1646+
%6d common props (maximum %3d) %6d individual props (unlimited)\n",
16471647
no_Inform_verbs, MAX_VERBS,
16481648
dict_entries, MAX_DICT_ENTRIES,
16491649
no_grammar_lines, grammar_version_number,
16501650
no_grammar_tokens,
16511651
no_actions, MAX_ACTIONS,
1652-
no_attributes, ((version_number==3)?32:48),
1653-
no_properties-2, ((version_number==3)?30:62),
1654-
no_individual_properties - 64);
1652+
no_attributes, NUM_ATTR_BYTES*8,
1653+
no_properties, INDIV_PROP_START,
1654+
no_individual_properties - INDIV_PROP_START);
16551655

16561656
if (track_unused_routines)
16571657
{
@@ -1667,7 +1667,7 @@ Out: %s %s %d.%c%c%c%c%c%c (%ld%sK long):\n",
16671667
"%6ld characters used in text %6ld bytes compressed (rate %d.%3ld)\n\
16681668
%6d abbreviations (maximum %d) %6d routines (unlimited)\n\
16691669
%6ld instructions of code %6d sequence points\n\
1670-
%6ld bytes readable memory used (maximum 65536)\n\
1670+
%6ld bytes writable memory used %6ld bytes read-only memory used\n\
16711671
%6ld bytes used in machine %10ld bytes free in machine\n",
16721672
(long int) total_chars_trans,
16731673
(long int) strings_length,
@@ -1676,7 +1676,8 @@ Out: %s %s %d.%c%c%c%c%c%c (%ld%sK long):\n",
16761676
no_abbreviations, MAX_ABBREVS,
16771677
no_routines,
16781678
(long int) no_instructions, no_sequence_points,
1679-
(long int) Write_Code_At,
1679+
(long int) (Out_Size - Write_RAM_At),
1680+
(long int) Write_RAM_At,
16801681
(long int) Out_Size,
16811682
(long int)
16821683
(((long int) (limit*1024L)) - ((long int) Out_Size)));

0 commit comments

Comments
 (0)