ack/plat/cpm/libsys/read.c

25 lines
321 B
C
Raw Normal View History

2007-04-27 22:42:41 +00:00
/* $Source$
* $State$
* $Revision$
*/
#include <stdio.h>
2007-04-27 22:42:41 +00:00
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <cpm.h>
ssize_t read(int fd, void* buffer, size_t count)
2007-04-27 22:42:41 +00:00
{
short save;
unsigned char before_n;
if (fd != 0)
2007-04-27 22:42:41 +00:00
{
errno = EBADF;
return -1;
}
return fread(buffer, 1, count, stdin);
2007-04-27 22:42:41 +00:00
}