diff -r 000000000000 -r e4d67989cc36 genericopenlibs/cstdlib/LSTDIO/FPUTC.C --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/genericopenlibs/cstdlib/LSTDIO/FPUTC.C Tue Feb 02 02:01:42 2010 +0200 @@ -0,0 +1,63 @@ +/* +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* FUNCTION +* <>---write a character on a stream or file +* INDEX +* fputc +* ANSI_SYNOPSIS +* #include +* int fputc(int <[ch]>, FILE *<[fp]>); +* TRAD_SYNOPSIS +* #include +* int fputc(<[ch]>, <[fp]>) +* int <[ch]>; +* FILE *<[fp]>; +* <> converts the argument <[ch]> from an <> to an +* <>, then writes it to the file or stream identified by +* <[fp]>. +* If the file was opened with append mode (or if the stream cannot +* support positioning), then the new character goes at the end of the +* file or stream. Otherwise, the new character is written at the +* current value of the position indicator, and the position indicator +* advances by one. +* For a macro version of this function, see <>. +* RETURNS +* If successful, <> returns its argument <[ch]>. If an error +* intervenes, the result is <>. You can use `<)>>' to +* query for errors. +* PORTABILITY +* <> is required by ANSI C. +* Supporting OS subroutines required: <>, <>, <>, +* <>, <>, <>, <>. +* +* +*/ + + + +#include +/** +Write character to stream. +@return If there are no errors the written character is returned. +If an error occurs, EOF is returned. +@param ch Character to be written. +The function casts the int parameter to its unsigned char equivalent before writing it. +@param file pointer to an open file. +*/ +EXPORT_C int +fputc (int ch, FILE * file) +{ + return putc ((unsigned char)ch, file); +}