Make alternative sigcontextpath a little more generic.
[AROS.git] / compiler / clib / fputc.c
blob9562de53a30c685b37c56f77399d285a254bc002
1 /*
2 Copyright © 1995-2012, 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 "__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((BPTR)fdesc->fcb->fh, c) == EOF)
59 errno = __arosc_ioerr2errno(IoErr());
60 c = EOF;
63 return c;
64 } /* fputc */