read.c 371 B

1234567891011121314151617
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. #include "system.h"
  7. int
  8. sys_read(fp, bufptr, bufsiz, pnbytes)
  9. File *fp;
  10. char *bufptr;
  11. int bufsiz, *pnbytes;
  12. {
  13. if (! fp) return 0;
  14. return (*pnbytes = read(fp->o_fd, bufptr, bufsiz)) >= 0;
  15. }