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

Function macread

outdated/sys/mac/macfile.c:290–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290int
291macread(int fd, void *ptr, unsigned len)
292{
293 long amt = len;
294
295 if (IsHandleFile(fd)) {
296 return ReadHandleFile(fd, ptr, amt);
297 } else {
298 short err = FSRead(fd, &amt, ptr);
299
300 return ((err == noErr) || (err == eofErr && len)) ? amt : -1;
301 }
302}
303
304#if 0 /* this function isn't used, if you use it, uncomment prototype in \
305 macwin.h */

Callers 1

macgetsFunction · 0.85

Calls 2

IsHandleFileFunction · 0.85
ReadHandleFileFunction · 0.85

Tested by

no test coverage detected