2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
10 #include <dos/dosextens.h>
11 #include <proto/exec.h>
12 #include <proto/dos.h>
17 #include <aros/debug.h>
19 /*****************************************************************************
30 Read one character from the stream. If there is no character
31 available or an error occurred, the function returns EOF.
34 stream - Read from this stream
37 The character read or EOF on end of file or error.
46 getc(), fputc(), putc()
50 ******************************************************************************/
53 fdesc
*fdesc
= __getfdesc(stream
->fd
);
58 stream
->flags
|= __POSIXC_STDIO_ERROR
;
62 /* Note: changes here might require changes in vfscanf.c!! */
66 c
= FGetC (fdesc
->fcb
->handle
);
73 errno
= __stdc_ioerr2errno (c
);
75 stream
->flags
|= __POSIXC_STDIO_ERROR
;
78 stream
->flags
|= __POSIXC_STDIO_EOF
;