Mono Class Library: Mono.Unix.Native.Stdlib Overview | Members

Mono.Unix.Native.Stdlib.getc Method

Get next character from a FILE input stream. [Edit]

public static int getc (IntPtr stream)

Parameters

stream
FILE stream to read a character from. [Edit]

Returns

If successful, returns the next requested object from the stream. Character values are returned as an unsigned char converted to an int. If the stream is at end-of-file or a read error occurs, the routines return Stdlib.EOF. The routines Stdlib.feof(3) and Stdlib.ferror(3) must be used to distinguish between end-of-file and error. If an error occurs, use Stdlib.GetLastError indicates the error. The end-of-file condition is remembered, even on a terminal, and all subsequent attempts to read will return Stdlib.EOF until the condition is cleared with Stdlib.clearerr(3). [Edit]

Remarks

The getc() function obtains the next input character (if present) from the stream pointed at by stream, or the next character pushed back on the stream via Stdlib.ungetc(3). [Edit]

Requirements

Namespace: Mono.Unix.Native
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0