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

Function close_nhfile

src/files.c:517–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515}
516
517void
518close_nhfile(NHFILE *nhfp)
519{
520 if (nhfp->structlevel && nhfp->fd != -1)
521 (void) nhclose(nhfp->fd), nhfp->fd = -1;
522 else if (nhfp->fpdef)
523 (void) fclose(nhfp->fpdef), nhfp->fpdef = (FILE *) 0;
524 if (nhfp->fplog)
525 (void) fprintf(nhfp->fplog, "# closing\n");
526 if (nhfp->fplog)
527 (void) fclose(nhfp->fplog);
528 if (nhfp->fpdebug)
529 (void) fclose(nhfp->fpdebug);
530 free_nhfile(nhfp);
531}
532
533void
534rewind_nhfile(NHFILE *nhfp)

Callers 15

MAINFunction · 0.85
pcmainFunction · 0.85
savebonesFunction · 0.85
getbonesFunction · 0.85
save_currentstateFunction · 0.85
goto_levelFunction · 0.85
restlevelfileFunction · 0.85
dorecoverFunction · 0.85
restore_saved_gameFunction · 0.85
plname_from_fileFunction · 0.85
recover_savefileFunction · 0.85
ifFunction · 0.85

Calls 4

nhcloseFunction · 0.85
fcloseFunction · 0.85
fprintfFunction · 0.85
free_nhfileFunction · 0.85

Tested by

no test coverage detected