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