sl@0: /* sl@0: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * FUNCTION sl@0: * <>---get a character from a file or stream sl@0: * INDEX sl@0: * fgetc sl@0: * ANSI_SYNOPSIS sl@0: * #include sl@0: * int fgetc(FILE *<[fp]>); sl@0: * TRAD_SYNOPSIS sl@0: * #include sl@0: * int fgetc(<[fp]>) sl@0: * FILE *<[fp]>; sl@0: * Use <> to get the next single character from the file or stream sl@0: * identified by <[fp]>. As a side effect, <> advances the file's sl@0: * current position indicator. sl@0: * For a macro version of this function, see <>. sl@0: * RETURNS sl@0: * The next character (read as an <>, and cast to sl@0: * <>), unless there is no more data, or the host system reports a sl@0: * read error; in either of these situations, <> returns <>. sl@0: * You can distinguish the two situations that cause an <> result by sl@0: * using the <> and <> functions. sl@0: * PORTABILITY sl@0: * ANSI C requires <>. sl@0: * Supporting OS subroutines required: <>, <>, <>, sl@0: * <>, <>, <>, <>. sl@0: * sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #include sl@0: #include "LOCAL.H" sl@0: sl@0: /** sl@0: Get the next character from a stream. sl@0: Returns the next character of the stream and increases the file pointer sl@0: to point to the following one. sl@0: @return The character read is returned as an int value. sl@0: If the End Of File has been reached or there has been an error reading, sl@0: the function returns EOF. sl@0: @param fp pointer to an open file. sl@0: */ sl@0: EXPORT_C int sl@0: fgetc (FILE * fp) sl@0: { sl@0: return __sgetc (fp); sl@0: }