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

Function newegd

src/vault.c:22–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20staticfn void gd_letknow(struct monst *) NONNULLARG1;
21
22void
23newegd(struct monst *mtmp)
24{
25 if (!mtmp->mextra)
26 mtmp->mextra = newmextra();
27 if (!EGD(mtmp)) {
28 EGD(mtmp) = (struct egd *) alloc(sizeof (struct egd));
29 (void) memset((genericptr_t) EGD(mtmp), 0, sizeof (struct egd));
30 EGD(mtmp)->parentmid = mtmp->m_id;
31 }
32}
33
34void
35free_egd(struct monst *mtmp)

Callers 3

restmonFunction · 0.70
copy_mextraFunction · 0.70
makemonFunction · 0.70

Calls 2

newmextraFunction · 0.70
allocFunction · 0.70

Tested by

no test coverage detected