Join me, friends, for a long-winded story of [ code ] quotes and commandlines, as I ramble!
(Short version: I donât think it can be done without editing library files in /usr, but it can be done.)
Hmm! This almost works:
But produces:
File "auto.inf"; Line 75 # Error: A 'Switches' directive must must come before the first constant definition
Grepping through stuff in /usr/share/gnome-inform7 seems to indicate that the first constant definition comes in Output.i6t, so I try:
Include (- Switches d2; -) before "Output.i6t".
Which results in:
File "auto.inf"; Line 21655 # Fatal error: The memory setting MAX_STATIC_DATA (which is 10000 at present) has been exceeded. Try running Inform again with $MAX_STATIC_DATA=<some-larger-number> on the command line.
This is worrisome! Iâm not sure how doublespace clobbering could make it use significantly more memory! It also generates an oddity at the top of auto.inf:
Switches d2; !% $MAX_ARRAYS=1500
!% $MAX_CLASSES=200
!% $MAX_VERBS=255
!% $MAX_LABELS=10000
!% $MAX_ZCODE_SIZE=100000
!% $MAX_STATIC_DATA=360000
!% $MAX_PROP_TABLE_SIZE=200000
!% $MAX_INDIV_PROP_TABLE_SIZE=20000
!% $MAX_STACK_SIZE=65536
!% $MAX_SYMBOLS=20000
!% $MAX_EXPRESSION_NODES=256
Not sure if I6N will parse that max_arrays directive on the same line as the switches! Letâs try:
Use MAX_STATIC_DATA of 360000.
Include (-Switches d2;
-) before "Output.i6t".
This results in an auto.inf header of:
Switches d2;
!% $MAX_ARRAYS=1500
!% $MAX_CLASSES=200
!% $MAX_VERBS=255
!% $MAX_LABELS=10000
!% $MAX_ZCODE_SIZE=100000
!% $MAX_STATIC_DATA=360000
!% $MAX_PROP_TABLE_SIZE=200000
!% $MAX_INDIV_PROP_TABLE_SIZE=20000
!% $MAX_STACK_SIZE=65536
!% $MAX_SYMBOLS=20000
!% $MAX_EXPRESSION_NODES=256
But the compilation log still complains that:
File "auto.inf"; Line 21656 # Fatal error: The memory setting MAX_STATIC_DATA (which is 10000 at present) has been exceeded. Try running Inform again with $MAX_STATIC_DATA=<some-larger-number> on the command line.
Hm! It still thinks it is set to 10000! Letâs see if we can figure out whatâs going onâŚ
leaf@Ereshkigal:~/EclipseWorkspaces/IF/Untitled-01$ grep -rn MAX_STATIC_DATA *
Untitled-01.inform/Build/auto.inf:7:!% $MAX_STATIC_DATA=360000
Untitled-01.inform/Source/story.ni:62:Use MAX_STATIC_DATA of 360000.
leaf@Ereshkigal:~/EclipseWorkspaces/IF/Untitled-01$ grep -rn MAX_STATIC_DATA ~/Inform/*
leaf@Ereshkigal:~/EclipseWorkspaces/IF/Untitled-01$ grep -rn MAX_STATIC_DATA /usr/share/gnome-inform7/*
/usr/share/gnome-inform7/Extensions/Graham Nelson/Standard Rules.i7x:288:Use MAX_STATIC_DATA of 180000.
So, I6N thinks MAX_STATIC_DATA is still 10000. The I6 code generated in my project tries to set it to 360000. Nothing that could be included from /usr/share/gnome-inform7/ in the generated code sets it to 10000, so I presume itâs not being overridden by some included file from the standard libraries or an extension.
âCuriouser and Curiouser!â cried the Leaf (though he was much lacking coffee, that for the moment he was quite groggy).
D:
My gut feeling is that the !%$ directives need to be the very, very first thing in the file. Letâs try getting medieval on its behind and editing some files in /usr/share/gnome-inform7/, as much as I hate to do things that way. -_-
Output.i6t:
[code]
{-call:Config::Inclusions::compile_icl_commands}
@p Leafy Hack: Clobber double-space after full stops.
I wonder if this will break anythingâŚ
@c
Switches d2;
@p Other Configuration.
[/code]
Untitled.ni has the switches option commented out now:
[ Pass options to I6N to clobber double space after full stops. ]
[Use MAX_STATIC_DATA of 360000.
Include (-Switches d2;
-) before "Output.i6t".]
Woot.
[code]Compiled with 1615 suppressed warnings
Compiler finished with code 0
[/code]
[code]!% $MAX_ARRAYS=1500
!% $MAX_CLASSES=200
!% $MAX_VERBS=255
!% $MAX_LABELS=10000
!% $MAX_ZCODE_SIZE=100000
!% $MAX_STATIC_DATA=180000
!% $MAX_PROP_TABLE_SIZE=200000
!% $MAX_INDIV_PROP_TABLE_SIZE=20000
!% $MAX_STACK_SIZE=65536
!% $MAX_SYMBOLS=20000
!% $MAX_EXPRESSION_NODES=256
Switches d2;
Constant Grammar__Version 2;
! This file was compiled by Inform 7: the build number and version of the
! I6 template layer used are as follows.
Constant NI_BUILD_COUNT â6G60â;
[/code]
And lo, there are no more double-spaces after full stops in a fixed-width terminal.
I donât think having to edit libraries in /usr is a very ideal way to go about things at all, but I reckon itâll work for now!
Unless perhaps there is some sneaky way to get it included at the end of the â{-call:Config::Inclusions::compile_icl_commands}â on line 17 of Output.i6t? I am thinking not, as it would probably get formatted into some kind of !#$ line by the function, and cause Baddness. :<