ack/modules/src/system/read.c

18 lines
371 B
C
Raw Normal View History

1987-03-09 15:15:03 +00:00
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
1994-06-24 11:31:16 +00:00
/* $Id$ */
1987-01-06 11:41:50 +00:00
#include <system.h>
int
sys_read(fp, bufptr, bufsiz, pnbytes)
File *fp;
char *bufptr;
int bufsiz, *pnbytes;
{
1989-06-30 14:46:27 +00:00
if (! fp) return 0;
1987-01-06 11:41:50 +00:00
return (*pnbytes = read(fp->o_fd, bufptr, bufsiz)) >= 0;
}