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

Function remove_autopickup_exception

src/options.c:9348–9369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9346}
9347
9348staticfn void
9349remove_autopickup_exception(struct autopickup_exception *whichape)
9350{
9351 struct autopickup_exception *ape, *freeape, *prev = 0;
9352
9353 for (ape = ga.apelist; ape;) {
9354 if (ape == whichape) {
9355 freeape = ape;
9356 ape = ape->next;
9357 if (prev)
9358 prev->next = ape;
9359 else
9360 ga.apelist = ape;
9361 regex_free(freeape->regex);
9362 free((genericptr_t) freeape->pattern);
9363 free((genericptr_t) freeape);
9364 } else {
9365 prev = ape;
9366 ape = ape->next;
9367 }
9368 }
9369}
9370
9371void
9372free_autopickup_exceptions(void)

Callers 1

Calls 1

regex_freeFunction · 0.50

Tested by

no test coverage detected