getwc(3I) manual page
Table of Contents
getwc, getwchar, fgetwc - convert EUC character from the stream to
Process Code
cc [ flag ... ] file ... -lw [ library ... ]
#include <stdio.h>
#include <widec.h>
wint_t getwc(FILE
*stream);
wint_t getwchar(void);
wint_t fgetwc (FILE
*stream);
MT-Safe
getwc() and fgetwc() convert
the next Extended Unix Code (EUC) character from the named input stream
into a wchar_t Process Code character, and return it as an integer. They
also move the file pointer, if defined, ahead one EUC
character in the
stream. getwchar() is defined as fgetwc(stdin). getwc() and getwchar() are
macros.
These functions return the integer constant EOF
at
end-of-file or upon an 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() (see ferror(3S)
).
ferror(3S)
,
fopen(3S)
, fread(3S)
, getws(3I)
, putwc(3I)
, scanf(3S)
, ungetwc(3I)
If
the integer value returned by getwc(), getwchar(), or fgetwc()" is stored
into a wchar_t variable and then compared against the integer constant
EOF
, the comparison will not succeed, because wchar_t is defined as unsigned.
Table of Contents