opts[] is a null-terminated list */
| 1119 | |
| 1120 | /* opts[] is a null-terminated list */ |
| 1121 | int |
| 1122 | get_table_option(lua_State *L, |
| 1123 | const char *name, |
| 1124 | const char *defval, |
| 1125 | const char *const opts[]) |
| 1126 | { |
| 1127 | int ret; |
| 1128 | |
| 1129 | lua_getfield(L, -1, name); |
| 1130 | ret = luaL_checkoption(L, -1, defval, opts); |
| 1131 | lua_pop(L, 1); |
| 1132 | return ret; |
| 1133 | } |
| 1134 | |
| 1135 | #ifdef DUMPLOG |
| 1136 | /* local fname = dump_fmtstr("/tmp/nethack.%n.%d.log"); */ |
no outgoing calls
no test coverage detected