/* Create the 'arg' table, which stores all arguments from the command line ('argv'). It should be aligned so that, at index 0, it has 'argv', which is the script name. The arguments to the script (everything after 'script') go to positive indices; other arguments (before the script name) go to negative indices. If there is no script name, assume interpreter's name as base.  */
static void createargtable(lua_State *L, char **argv, int argc, int script)
/* Create the 'arg' table, which stores all arguments from the command line ('argv'). It should be aligned so that, at index 0, it has 'argv', which is the script name. The arguments to the script (everything after 'script') go to positive indices; other arguments (before the script name) go to negative indices. If there is no script name, assume interpreter's name as base.  */
static void createargtable(lua_State *L, char **argv, int argc, int script)
{
    lua_pushstring(L, argv[i]);
    lua_rawseti(L, -2, i - script);
  }
  lua_setglobal(L, "arg");
}