Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 749 Bytes

File metadata and controls

35 lines (22 loc) · 749 Bytes

NAME

FGetC -- Read a character from the specified input (buffered) (V36)

SYNOPSIS

    char = FGetC(fh)
    D0           D1

    LONG FGetC(BPTR)

FUNCTION

Reads the next character from the input stream. A -1 is returned when EOF or an error is encountered. This call is buffered. Use Flush between buffered and unbuffered I/O on a filehandle.

INPUTS

fh - filehandle to use for buffered I/O

RESULT char - character read (0-255) or -1

BUGS In V36, after an EOF was read, EOF would always be returned from FGetC() from then on. Starting in V37, it tries to read from the handler again each time (unless UnGetC(fh,-1) was called).

SEE ALSO

FPutC, UnGetC, Flush