MCPcopy Create free account
hub / github.com/NetHack/NetHack / l_selection_size_description

Function l_selection_size_description

src/nhlsel.c:961–977  ·  view source on GitHub ↗

local txt = sel:describe_size(); */ gives a textual description of the selection size */

Source from the content-addressed store, hash-verified

959/* local txt = sel:describe_size(); */
960/* gives a textual description of the selection size */
961staticfn int
962l_selection_size_description(lua_State *L)
963{
964 int argc = lua_gettop(L);
965
966 if (argc == 1) {
967 struct selectionvar *sel = l_selection_check(L, 1);
968 char buf[BUFSZ];
969
970 lua_pushstring(L, selection_size_description(sel, buf));
971 return 1;
972 } else {
973 nhl_error(L, "wrong parameters");
974 /*NOTREACHED*/
975 }
976 return 0;
977}
978
979RESTORE_WARNING_UNREACHABLE_CODE
980

Callers

nothing calls this directly

Calls 3

l_selection_checkFunction · 0.85
nhl_errorFunction · 0.85

Tested by

no test coverage detected