muimaster.library: support Listview_List in List
[AROS.git] / compiler / posixc / fputc.c
blob96bd1a6b39e41538b946be94c01218dc0ca7f6b3
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function fputc().
6 */
8 #include <errno.h>
9 #include <dos/dos.h>
10 #include <dos/dosextens.h>
11 #include <proto/exec.h>
12 #include <proto/dos.h>
13 #include "__fdesc.h"
14 #include "__stdio.h"
16 /*****************************************************************************
18 NAME */
19 #include <stdio.h>
21 int fputc (
23 /* SYNOPSIS */
24 int c,
25 FILE * stream)
27 /* FUNCTION
28 Write one character to the specified stream.
30 INPUTS
31 c - The character to output
32 stream - The character is written to this stream
34 RESULT
35 The character written or EOF on error.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 ******************************************************************************/
49 fdesc *fdesc = __getfdesc(stream->fd);
51 if (!fdesc)
53 errno = EBADF;
54 return EOF;
57 if (FPutC(fdesc->fcb->handle, c) == EOF)
59 errno = __stdc_ioerr2errno(IoErr());
60 c = EOF;
63 return c;
64 } /* fputc */