| 253 | } |
| 254 | |
| 255 | schar |
| 256 | get_table_mapchr_opt(lua_State *L, const char *name, schar defval) |
| 257 | { |
| 258 | char *ter; |
| 259 | xint8 typ; |
| 260 | |
| 261 | ter = get_table_str_opt(L, name, emptystr); |
| 262 | if (ter && *ter) { |
| 263 | typ = (xint8) check_mapchr(ter); |
| 264 | if (typ == INVALID_TYPE) |
| 265 | nhl_error(L, "Erroneous map char"); |
| 266 | } else |
| 267 | typ = (xint8) defval; |
| 268 | if (ter) |
| 269 | free(ter); |
| 270 | return typ; |
| 271 | } |
| 272 | |
| 273 | short |
| 274 | nhl_get_timertype(lua_State *L, int idx) |
no test coverage detected