2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
10 #include <dos/dosextens.h>
11 #include <proto/exec.h>
12 #include <proto/dos.h>
16 /*****************************************************************************
27 Read one character from the stream. If there is no character
28 available or an error occurred, the function returns EOF.
31 stream - Read from this stream
34 The character read or EOF on end of file or error.
43 getc(), fputc(), putc()
47 ******************************************************************************/
50 fdesc
*fdesc
= __getfdesc(stream
->fd
);
55 stream
->flags
|= _STDIO_ERROR
;
59 /* Note: changes here might require changes in vfscanf.c!! */
61 c
= FGetC ((BPTR
)(fdesc
->fcb
->fh
));
68 errno
= __arosc_ioerr2errno (c
);
70 stream
->flags
|= _STDIO_ERROR
;
73 stream
->flags
|= _STDIO_EOF
;