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: * <<fgetc>>---get a character from a file or stream
sl@0: * INDEX
sl@0: * fgetc
sl@0: * ANSI_SYNOPSIS
sl@0: * #include <stdio.h>
sl@0: * int fgetc(FILE *<[fp]>);
sl@0: * TRAD_SYNOPSIS
sl@0: * #include <stdio.h>
sl@0: * int fgetc(<[fp]>)
sl@0: * FILE *<[fp]>;
sl@0: * Use <<fgetc>> to get the next single character from the file or stream
sl@0: * identified by <[fp]>.  As a side effect, <<fgetc>> advances the file's
sl@0: * current position indicator.
sl@0: * For a macro version of this function, see <<getc>>.
sl@0: * RETURNS
sl@0: * The next character (read as an <<unsigned char>>, and cast to
sl@0: * <<int>>), unless there is no more data, or the host system reports a
sl@0: * read error; in either of these situations, <<fgetc>> returns <<EOF>>.
sl@0: * You can distinguish the two situations that cause an <<EOF>> result by
sl@0: * using the <<ferror>> and <<feof>> functions.
sl@0: * PORTABILITY
sl@0: * ANSI C requires <<fgetc>>.
sl@0: * Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
sl@0: * <<lseek>>, <<read>>, <<sbrk>>, <<write>>.
sl@0: * 
sl@0: *
sl@0: */
sl@0: 
sl@0: 
sl@0: 
sl@0: #include <stdio.h>
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: }