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

Function cmdbind_freeall

src/cmd.c:2179–2191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2177}
2178
2179void
2180cmdbind_freeall(void)
2181{
2182 struct Cmd_bind *next;
2183
2184 while (gc.Cmd.cmdbinds) {
2185 next = gc.Cmd.cmdbinds->next;
2186 if (gc.Cmd.cmdbinds->param)
2187 free(gc.Cmd.cmdbinds->param);
2188 free(gc.Cmd.cmdbinds);
2189 gc.Cmd.cmdbinds = next;
2190 }
2191}
2192
2193/* swap key bindings for key1 and key2. both bindings must exist. */
2194staticfn void

Callers 1

freedynamicdataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected