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

Function open_levelfile

outdated/sys/mac/mrecover.c:1114–1132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1112}
1113
1114static short
1115open_levelfile(long lev)
1116{
1117 OSErr openErr;
1118 short fRefNum;
1119
1120 set_levelfile_name(lev);
1121 if (!in.Recover)
1122 return (-1);
1123
1124 if ((openErr = HOpen(vRefNum, dirID, lock, fsRdWrPerm, &fRefNum))
1125 && (openErr != fnfErr)) {
1126 endRecover();
1127 note(noErr, alidNote, "\pSorry: File Open Error");
1128 return (-1);
1129 }
1130
1131 return (openErr ? -1 : fRefNum);
1132}
1133
1134static short
1135create_savefile(unsigned char *savename)

Callers 1

restore_savefileFunction · 0.70

Calls 3

endRecoverFunction · 0.85
noteFunction · 0.85
set_levelfile_nameFunction · 0.70

Tested by

no test coverage detected