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

Function read_levelfile

outdated/sys/mac/mrecover.c:1289–1302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1287}
1288
1289static long
1290read_levelfile(short rdRefNum, Ptr bufPtr, long count)
1291{
1292 OSErr rdErr;
1293 long rdCount = count;
1294
1295 if ((rdErr = FSRead(rdRefNum, &rdCount, bufPtr)) && (rdErr != eofErr)) {
1296 endRecover();
1297 note(noErr, alidNote, "\pSorry: File Read Error");
1298 return (-1L);
1299 }
1300
1301 return rdCount;
1302}
1303
1304static long
1305write_savefile(short wrRefNum, Ptr bufPtr, long count)

Callers 2

copy_bytesFunction · 0.85
restore_savefileFunction · 0.85

Calls 2

endRecoverFunction · 0.85
noteFunction · 0.85

Tested by

no test coverage detected