Replaced Popscren with a custom pop-up list for selecting public screen. Now it conta...
[tangerine.git] / compiler / clib / fputc.c
bloba56b70f58d5be4b4da49fe7bb23020622aee278b
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
5 ANSI C 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 "__open.h"
14 #include "__errno.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((BPTR)fdesc->fcb->fh, c) == EOF)
59 errno = IoErr2errno(IoErr());
60 c = EOF;
63 return c;
64 } /* fputc */