The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

getwc - get a wide character from a stream

 SYNOPSIS



#include <stdio.h>
#include <wchar.h>

wint_t getwc(FILE *stream);

 DESCRIPTION

The getwc() function is equivalent to fgetwc(), except that if it is implemented as a macro it may evaluate stream more than once, so the argument should never be an expression with side effects.

 RETURN VALUE

Refer to fgetwc().

 ERRORS

Refer to fgetwc().

 EXAMPLES

None.

 APPLICATION USAGE

Because it may be implemented as a macro, getwc() may treat incorrectly a stream argument with side effects. In particular, getwc(*f++) will not necessarily work as expected. Therefore, use of this interface is not recommended; fgetwc() should be used instead.

 FUTURE DIRECTIONS

None.

 SEE ALSO

fgetwc(), <stdio.h>, <wchar.h>.

DERIVATION

Derived from the MSE working draft.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]