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

Function nextmbuf

src/do_name.c:19–27  ·  view source on GitHub ↗

manage a pool of BUFSZ buffers, so callers don't have to */

Source from the content-addressed store, hash-verified

17
18/* manage a pool of BUFSZ buffers, so callers don't have to */
19staticfn char *
20nextmbuf(void)
21{
22 static char NEARDATA bufs[NUMMBUF][BUFSZ];
23 static int bufidx = 0;
24
25 bufidx = (bufidx + 1) % NUMMBUF;
26 return bufs[bufidx];
27}
28
29/* allocate space for a monster's name; removes old name if there is one */
30void

Callers 3

do_name.cFile · 0.85
mon_nam_tooFunction · 0.85
minimal_monnamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected