Use Glk with JavaScript

I looked at the glkapi.js in GlkOte more now, and here is a list of the differences between my program and that glkapi.js (although I may have missed some or made other mistakes):

  • There is no RefBox and RefStruct. Instead, this program uses arrays for references and structures.
  • Constants are not placed in a separate namespace.
  • Glk function names do not have “glk_” at front.
  • This program can use typed arrays when an array must be passed to/from Glk.
  • There is no “Do Not Return”.

Also, here is the output from “wc” to show the sizes of these files, in case anyone is interested: 385 699 9677 glkrun.c 274 684 11735 dispatch.js 294 621 9494 index.js 953 2004 30906 total