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

Function rewind_nhfile

src/files.c:533–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533void
534rewind_nhfile(NHFILE *nhfp)
535{
536 if (nhfp->structlevel) {
537#ifdef BSD
538 (void) lseek(nhfp->fd, 0L, 0);
539#else
540 (void) lseek(nhfp->fd, (off_t) 0, 0);
541#endif
542 } else {
543 rewind(nhfp->fpdef);
544 }
545}
546
547#ifndef SFCTOOL
548staticfn NHFILE *

Callers 2

dorecoverFunction · 0.85
process_savefileFunction · 0.85

Calls 1

lseekFunction · 0.85

Tested by

no test coverage detected