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