MCPcopy Index your code
hub / github.com/NetHack/NetHack / nhl_getlin

Function nhl_getlin

src/nhlua.c:694–711  ·  view source on GitHub ↗

str = getlin("What do you want to call this dungeon level?"); */

Source from the content-addressed store, hash-verified

692 str = getlin("What do you want to call this dungeon level?");
693 */
694staticfn int
695nhl_getlin(lua_State *L)
696{
697 int argc = lua_gettop(L);
698
699 if (argc == 1) {
700 const char *prompt = luaL_checkstring(L, 1);
701 char buf[BUFSZ];
702
703 getlin(prompt, buf);
704 lua_pushstring(L, buf);
705 return 1;
706 }
707
708 nhl_error(L, "Wrong args");
709 /*NOTREACHED*/
710 return 0;
711}
712
713/*
714 selected = menu("prompt",default,pickX,{"a"="option a", "b"="option b",...})

Callers

nothing calls this directly

Calls 2

getlinFunction · 0.85
nhl_errorFunction · 0.85

Tested by

no test coverage detected