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

Function endRecover

outdated/sys/mac/mrecover.c:1005–1034  ·  view source on GitHub ↗

no messages from here (since we might be quitting) */

Source from the content-addressed store, hash-verified

1003
1004/* no messages from here (since we might be quitting) */
1005static void
1006endRecover()
1007{
1008 in.Recover = 0;
1009
1010 oldCursor = curs_Init;
1011 SetCursor(&qd.arrow);
1012
1013 /* clean up abandoned files */
1014 if (gameRefNum >= 0)
1015 (void) FSClose(gameRefNum);
1016
1017 if (levRefNum >= 0)
1018 (void) FSClose(levRefNum);
1019
1020 if (saveRefNum >= 0) {
1021 (void) FSClose(saveRefNum);
1022 (void) FlushVol((StringPtr) 0L, vRefNum);
1023 /* its corrupted so trash it ... */
1024 (void) HDelete(vRefNum, dirID, savename);
1025 }
1026
1027 saveRefNum = gameRefNum = levRefNum = -1;
1028
1029 /* close the progress thermometer dialog */
1030 in.Dialog = 0;
1031 CloseDialog(DLGTHM);
1032 DisposHandle(dlgThermo.items);
1033 memActivity++;
1034}
1035
1036/* add friendly, non-essential resource strings to save file */
1037static short

Callers 12

eventLoopFunction · 0.85
cooldownFunction · 0.85
continueRecoverFunction · 0.85
set_levelfile_nameFunction · 0.85
open_levelfileFunction · 0.85
create_savefileFunction · 0.85
copy_bytesFunction · 0.85
restore_savefileFunction · 0.85
read_levelfileFunction · 0.85
write_savefileFunction · 0.85
close_fileFunction · 0.85
unlink_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected