Update contrib.
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
16 * <<fputc>>---write a character on a stream or file
21 * int fputc(int <[ch]>, FILE *<[fp]>);
24 * int fputc(<[ch]>, <[fp]>)
27 * <<fputc>> converts the argument <[ch]> from an <<int>> to an
28 * <<unsigned char>>, then writes it to the file or stream identified by
30 * If the file was opened with append mode (or if the stream cannot
31 * support positioning), then the new character goes at the end of the
32 * file or stream. Otherwise, the new character is written at the
33 * current value of the position indicator, and the position indicator
35 * For a macro version of this function, see <<putc>>.
37 * If successful, <<fputc>> returns its argument <[ch]>. If an error
38 * intervenes, the result is <<EOF>>. You can use `<<ferror(<[fp]>)>>' to
41 * <<fputc>> is required by ANSI C.
42 * Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
43 * <<lseek>>, <<read>>, <<sbrk>>, <<write>>.
52 Write character to stream.
53 @return If there are no errors the written character is returned.
54 If an error occurs, EOF is returned.
55 @param ch Character to be written.
56 The function casts the int parameter to its unsigned char equivalent before writing it.
57 @param file pointer to an open file.
60 fputc (int ch, FILE * file)
62 return putc ((unsigned char)ch, file);