getwc(3I)
NAME
getwc, getwchar, fgetwc − convert EUC character from the stream to Process Code
SYNOPSIS
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-LEVEL
MT-Safe
DESCRIPTION
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.
RETURN VALUES
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)).
SEE ALSO
ferror(3S), fopen(3S), fread(3S), getws(3I), putwc(3I), scanf(3S), ungetwc(3I)
WARNING
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.
SunOS 5.5/x86 — Last change: 22 Jan 1993