diff -r 000000000000 -r bde4ae8d615e os/ossrv/genericopenlibs/cstdlib/LSTDIO/FGETC.C --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/ossrv/genericopenlibs/cstdlib/LSTDIO/FGETC.C Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,62 @@ +/* +* 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 +* <>---get a character from a file or stream +* INDEX +* fgetc +* ANSI_SYNOPSIS +* #include +* int fgetc(FILE *<[fp]>); +* TRAD_SYNOPSIS +* #include +* int fgetc(<[fp]>) +* FILE *<[fp]>; +* Use <> to get the next single character from the file or stream +* identified by <[fp]>. As a side effect, <> advances the file's +* current position indicator. +* For a macro version of this function, see <>. +* RETURNS +* The next character (read as an <>, and cast to +* <>), unless there is no more data, or the host system reports a +* read error; in either of these situations, <> returns <>. +* You can distinguish the two situations that cause an <> result by +* using the <> and <> functions. +* PORTABILITY +* ANSI C requires <>. +* Supporting OS subroutines required: <>, <>, <>, +* <>, <>, <>, <>. +* +* +*/ + + + +#include +#include "LOCAL.H" + +/** +Get the next character from a stream. +Returns the next character of the stream and increases the file pointer +to point to the following one. +@return The character read is returned as an int value. +If the End Of File has been reached or there has been an error reading, +the function returns EOF. +@param fp pointer to an open file. +*/ +EXPORT_C int +fgetc (FILE * fp) +{ + return __sgetc (fp); +}