static int dofile (lua_State *L, const char *name) { #if defined( LUA_USES_LOADF ) return dochunk(L, luaL_loadfile(L, name)); #else return dochunk(L, luaL_loadfsfile(L, name)); #endif }
int doframe(FILE *f1) { int c; long framestart; framestart=ftell(f1); fread(&frameheader,sizeof(frameheader),1,f1); for(c=0;c<frameheader.chunks;c++) dochunk(f1); fseek(f1,framestart+frameheader.size,SEEK_SET); return(0); }
static int dostring (lua_State *L, const char *s, const char *name) { return dochunk(L, luaL_loadbuffer(L, s, strlen(s), name)); }
static int dofile (lua_State *L, const char *name) { return dochunk(L, luaL_loadfile(L, name)); }