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>
16 /*****************************************************************************
28 Push the character c character back into the stream.
31 c - Put this character back into the stream. The next read will
32 return this character. If you push back more than one
33 character, then they will be returned in reverse order.
34 The function gurantees that one character can be
35 pushed back but no more. It is possible to push the EOF
36 character back into the stream.
37 stream - Read from this stream
49 fgetc(), getc(), fputc(), putc()
53 ******************************************************************************/
55 fdesc
*fdesc
= __getfdesc(stream
->fd
);
59 stream
->flags
|= __POSIXC_STDIO_ERROR
;
64 /* Note: changes here might require changes in vfscanf.c!! */
69 if (!UnGetC (fdesc
->fcb
->handle
, c
))
71 errno
= __stdc_ioerr2errno (IoErr ());
74 stream
->flags
|= __POSIXC_STDIO_ERROR
;
76 stream
->flags
|= __POSIXC_STDIO_EOF
;