local debug_themerm = nh.debug_themerm(isfill) * if isfill is false, returns value of env variable THEMERM * if isfill is true, returns value of env variable THEMERMFILL * return nil if not in wizard mode or the variable isn't set */
| 990 | * if isfill is true, returns value of env variable THEMERMFILL |
| 991 | * return nil if not in wizard mode or the variable isn't set */ |
| 992 | staticfn int |
| 993 | nhl_get_debug_themerm_name(lua_State *L) |
| 994 | { |
| 995 | int argc = lua_gettop(L); |
| 996 | if (argc == 1) { |
| 997 | char *dbg_themerm = (char *) 0; |
| 998 | boolean is_fill = lua_toboolean(L, 1); |
| 999 | lua_pop(L, 1); |
| 1000 | if (wizard) |
| 1001 | dbg_themerm = getenv(is_fill ? "THEMERMFILL" : "THEMERM"); |
| 1002 | if (!dbg_themerm || !*dbg_themerm) { |
| 1003 | lua_pushnil(L); |
| 1004 | } else { |
| 1005 | lua_pushstring(L, dbg_themerm); |
| 1006 | } |
| 1007 | } else { |
| 1008 | nhl_error(L, "debug_themerm should have 1 boolean arg"); |
| 1009 | } |
| 1010 | return 1; |
| 1011 | } |
| 1012 | |
| 1013 | RESTORE_WARNING_UNREACHABLE_CODE |
| 1014 |
nothing calls this directly
no test coverage detected