FreeBSD manual
download PDF document: peekc.3.pdf
PEEKC(3) Schily's LIBRARY FUNCTIONS PEEKC(3)
NAME
peekc() - shows the next character in the file
SYNOPSIS
int peekc(f)
FILE *f;
DESCRIPTION
peekc() shows the next character in the file. It does not remove the
character. The next call to peekc() or getc() will return the same
character.
RETURNS
Returns the next character in the file or EOF if the file is at the end
of data.
NOTES
This call may be used only on buffered files.
Notice that peekc() is not declared as type char, since EOF is not a
valid value for a char object.
Joerg Schilling 2022/09/09 PEEKC(3)