Skip to content

Instantly share code, notes, and snippets.

@jrsonline
Created May 31, 2024 15:08
Show Gist options
  • Save jrsonline/c73039e263007234abae2d16b18a1360 to your computer and use it in GitHub Desktop.
Save jrsonline/c73039e263007234abae2d16b18a1360 to your computer and use it in GitHub Desktop.
Version 1 of Apostrophe Fixes by Jonathan Simmons begins here.
Section 1 - Wrappers
To fix curly apostrophes:
(- CurlyQuoteFix(); players_command = 100 + WordCount(); -)
Section 2 (for Z-machine only)
Include (-
[ CurlyQuoteFix i;
for (i = 2 : i <= (buffer->1) + 1 : i++)
{
if ((buffer->i) == '?')
{ buffer->i = 39;
}
}
VM_Tokenise(buffer, parse);
];
-)
Section 3 (for Glulx only)
Include (-
[ CurlyQuoteFix i;
for (i = WORDSIZE : i <= (buffer-->0)+(WORDSIZE-1) : i++) {
if ((buffer->i) == '?')
{ buffer->i = 39;
}
}
VM_Tokenise(buffer, parse);
];
-)
Apostrophe Fixes ends here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment