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

Function nhl_dump_fmtstr

src/nhlua.c:1137–1148  ·  view source on GitHub ↗

local fname = dump_fmtstr("/tmp/nethack.%n.%d.log"); */

Source from the content-addressed store, hash-verified

1135#ifdef DUMPLOG
1136/* local fname = dump_fmtstr("/tmp/nethack.%n.%d.log"); */
1137staticfn int
1138nhl_dump_fmtstr(lua_State *L)
1139{
1140 int argc = lua_gettop(L);
1141 char buf[512];
1142
1143 if (argc == 1)
1144 lua_pushstring(L, dump_fmtstr(luaL_checkstring(L, 1), buf, TRUE));
1145 else
1146 nhl_error(L, "Expected a string parameter");
1147 return 1;
1148}
1149#endif /* DUMPLOG */
1150
1151/* local dungeon_name = dnum_name(u.dnum); */

Callers

nothing calls this directly

Calls 2

dump_fmtstrFunction · 0.85
nhl_errorFunction · 0.85

Tested by

no test coverage detected