FGETWC(3) BSD Programmer's Manual FGETWC(3)NAME
fgetwc, getwc, getwchar - get wide-character code from stream
SYNOPSIS
#include <stdio.h>
#include <wchar.h>
wint_t
fgetwc(FILE *stream);
wint_t
getwc(FILE *stream);
wint_t
getwchar();
DESCRIPTION
The fgetwc() and getwc() functions are equivalent. The getwchar() func-
tion is equivalent to fgetwc(stdin). They all read the next wide-charac-
ter (if any) from the specified stream. This may cause more than a single
byte to be read from the input stream.
RETURN VALUES
If successful, these routines return the next requested object from the
stream. If the stream is at end-of-file or a read error occurs, the rou-
tines return EOF. The routines feof(3) and ferror(3) must be used to dis-
tinguish between end-of-file and error. If an error occurs, the global
variable errno is set to indicate the error. The end-of-file condition
is remembered, even on a terminal, and all subsequent attempts to read
will return EOF until the condition is cleared with clearerr(3).
SEE ALSOferror(3), fopen(3), fwputc(3), fwread(3)BSDI BSD/OS December 8, 1997 1