DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

getwc(3S)


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 set 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.

These functions fail if the file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.

References

fclose(3S), ferror(3S), fopen(3S), fscanf(3S), getws(3wide), intro(3), Intro(3S), putwc(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.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004