| 195 | } |
| 196 | |
| 197 | int main(int argc, char* argv[]) |
| 198 | { |
| 199 | lua_State* L; |
| 200 | int i=doargs(argc,argv); |
| 201 | argc-=i; argv+=i; |
| 202 | if (argc<=0) usage("no input files given"); |
| 203 | L=luaL_newstate(); |
| 204 | if (L==NULL) fatal("cannot create state: not enough memory"); |
| 205 | lua_pushcfunction(L,&pmain); |
| 206 | lua_pushinteger(L,argc); |
| 207 | lua_pushlightuserdata(L,argv); |
| 208 | if (lua_pcall(L,2,0,0)!=LUA_OK) fatal(lua_tostring(L,-1)); |
| 209 | lua_close(L); |
| 210 | return EXIT_SUCCESS; |
| 211 | } |
| 212 | |
| 213 | /* |
| 214 | ** print bytecodes |
nothing calls this directly
no test coverage detected