added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / rom / dos / fputc.c
blob28ab3017893f9c6a7e80baa9e9f6ceb849a6f0e8
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
8 #include <exec/memory.h>
9 #include <proto/exec.h>
11 #include <dos/stdio.h>
12 #include <dos/dosextens.h>
14 #include "dos_intern.h"
16 #include <aros/debug.h>
18 /*****************************************************************************
20 NAME */
21 #include <proto/dos.h>
23 AROS_LH2(LONG, FPutC,
25 /* SYNOPSIS */
26 AROS_LHA(BPTR, file, D1),
27 AROS_LHA(LONG, character, D2),
29 /* LOCATION */
30 struct DosLibrary *, DOSBase, 52, Dos)
32 /* FUNCTION
34 INPUTS
35 file - Filehandle to write to.
36 character - Character to write.
38 RESULT
39 The character written or EOF in case of an error.
40 IoErr() gives additional information in that case.
42 NOTES
44 EXAMPLE
46 BUGS
48 SEE ALSO
49 FGetC(), IoErr()
51 INTERNALS
53 *****************************************************************************/
55 AROS_LIBFUNC_INIT
57 BYTE c = character;
58 return (1 == FWriteChars(file, &c, 1, DOSBase))
59 ? character
60 : EOF;
62 AROS_LIBFUNC_EXIT
63 } /* FPutC */