| 534 | |
| 535 | |
| 536 | static int handle_luainit (lua_State *L) { |
| 537 | const char *name = "=" LUA_INITVARVERSION; |
| 538 | const char *init = getenv(name + 1); |
| 539 | if (init == NULL) { |
| 540 | name = "=" LUA_INIT_VAR; |
| 541 | init = getenv(name + 1); /* try alternative name */ |
| 542 | } |
| 543 | if (init == NULL) return LUA_OK; |
| 544 | else if (init[0] == '@') |
| 545 | return dofile(L, init+1); |
| 546 | else |
| 547 | return dostring(L, init, name); |
| 548 | } |
| 549 | |
| 550 | |
| 551 | /* |