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

Function exportascii_sfo_genericptr

util/sfexpasc.c:301–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299 const char *myname UNUSED);
300
301void
302exportascii_sfo_genericptr(NHFILE *nhfp, genericptr_t *d_genericptr, const char *myname UNUSED)
303{
304 unsigned long tmp;
305 char *byteptr = (char *) d_genericptr;
306 /*
307 * sbrooms is an array of pointers to mkroom.
308 * That array dimension is MAX_SUBROOMS.
309 * Even though the pointers themselves won't
310 * be valid, we need to account for the existence
311 * of that array and perhaps zero or non-zero.
312 */
313 tmp = (*d_genericptr) ? 1UL : 0UL;
314 Sprintf(outbuf, "%08lu", tmp);
315 put_savefield(nhfp, outbuf, sizeof outbuf);
316 byteptr += sizeof(void *);
317 d_genericptr = (genericptr_t) byteptr;
318}
319
320#if 0
321void

Callers

nothing calls this directly

Calls 1

put_savefieldFunction · 0.85

Tested by

no test coverage detected