Everything

getwc


Inputs one wide character from a stream input/output file.

[Format]

#include <stdio.h>

#include <wchar.h>

long getwc(FILE *fp);

[Parameters]

fp File pointer

[Return values]

Normal: End-of-file: WEOF

Otherwise: Input wide character

Abnormal: EOF

[Remarks]

When a read error occurs, the error indicator for that file is set.

The getwc function is equivalent to fgetwc, but getwc may evaluate fp two or more times because it is implemented as a macro. Accordingly, specify an expression without side effects for fp.