| 353 | |
| 354 | |
| 355 | static int handle_luainit (lua_State *L) { |
| 356 | const char *name = "=" LUA_INITVARVERSION; |
| 357 | const char *init = getenv(name + 1); |
| 358 | if (init == NULL) { |
| 359 | name = "=" LUA_INIT_VAR; |
| 360 | init = getenv(name + 1); /* try alternative name */ |
| 361 | } |
| 362 | if (init == NULL) return LUA_OK; |
| 363 | else if (init[0] == '@') |
| 364 | return dofile(L, init+1); |
| 365 | else |
| 366 | return dostring(L, init, name); |
| 367 | } |
| 368 | |
| 369 | |
| 370 | /* |