| 325 | |
| 326 | |
| 327 | static int handle_luainit (lua_State *L) { |
| 328 | const char *name = "=" LUA_INITVARVERSION; |
| 329 | const char *init = getenv(name + 1); |
| 330 | if (init == NULL) { |
| 331 | name = "=" LUA_INIT_VAR; |
| 332 | init = getenv(name + 1); /* try alternative name */ |
| 333 | } |
| 334 | if (init == NULL) return LUA_OK; |
| 335 | else if (init[0] == '@') |
| 336 | return dofile(L, init+1); |
| 337 | else |
| 338 | return dostring(L, init, name); |
| 339 | } |
| 340 | |
| 341 | |
| 342 | /* |