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

Function wish_history_flush

src/zap.c:6258–6270  ·  view source on GitHub ↗

release any old wish text; called from freedynamicdata(save.c) */

Source from the content-addressed store, hash-verified

6256
6257/* release any old wish text; called from freedynamicdata(save.c) */
6258void
6259wish_history_flush(void)
6260{
6261#ifdef DEBUG
6262 int idx;
6263
6264 for (idx = 0; idx < MAX_WISH_HISTORY; ++idx) {
6265 if (wish_history[idx])
6266 free((genericptr_t) wish_history[idx]), wish_history[idx] = NULL;
6267 }
6268 wish_history_idx = 0;
6269#endif
6270}
6271
6272/* shows menu of previous wishes, copies selected into buf, max BUFSZ len.
6273 buf is not modified, if nothing was selected. */

Callers 1

freedynamicdataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected