| 190 | } |
| 191 | |
| 192 | int main(int argc, char* argv[]) |
| 193 | { |
| 194 | lua_State* L; |
| 195 | int i=doargs(argc,argv); |
| 196 | argc-=i; argv+=i; |
| 197 | if (argc<=0) usage("no input files given"); |
| 198 | L=luaL_newstate(); |
| 199 | if (L==NULL) fatal("cannot create state: not enough memory"); |
| 200 | lua_pushcfunction(L,&pmain); |
| 201 | lua_pushinteger(L,argc); |
| 202 | lua_pushlightuserdata(L,argv); |
| 203 | if (lua_pcall(L,2,0,0)!=LUA_OK) fatal(lua_tostring(L,-1)); |
| 204 | lua_close(L); |
| 205 | return EXIT_SUCCESS; |
| 206 | } |
| 207 | |
| 208 | /* |
| 209 | ** $Id: luac.c,v 1.76 2018/06/19 01:32:02 lhf Exp $ |
nothing calls this directly
no test coverage detected