getwc(3S) getwc(3S)
NAME
getwc, getwchar, fgetwc - get next wide character from a
stream
SYNOPSIS
#include <stdio.h>
#include <wchar.h>
wint_t getwc(FILE *stream);
wint_t getwchar(void);
wint_t fgetwc(FILE *stream);
DESCRIPTION
fgetwc transforms the next multibyte character from the named
input stream into a wide character, and returns it. It also
increments the file pointer, if defined, by one multibyte
character. getwchar is defined as getwc(stdin).
getwc behaves like fgetwc, except that getwc may be
implemented as a macro which evaluates stream more than once.
Errors
These functions return the constant WEOF and sets the stream's
end-of-file indicator at the end-of-file. They return WEOF if
an error is found. If the error is an I/O error, the error
indicator is set. If it is due to an invalid or incomplete
multibyte character, errno is set to EILSEQ.
REFERENCES
fclose(3S), ferror(3S), fopen(3S), fscanf(3S), getws(3W),
putwc(3S), stdio(3S), widec(3S)
NOTICES
If the value returned by getwc, getwchar, or fgetwc is
compared with the integer constant WEOF after being stored in
a wchar_t object, the comparison may not succeed.
Copyright 1994 Novell, Inc. Page 1