putwc(3S)


putwc, putwchar, fputwc -- put wide character on a stream

Synopsis

   #include <stdio.h>
   #include <widec.h>
   

wint_t putwc(wint_t c, FILE *stream);

wint_t putwchar(wint_t c);

wint_t fputwc(wint_t c, FILE *stream);

Description

putwc transforms the wide character c into a multibyte character, and writes it to the output stream (at the position where the file pointer, if defined, is pointing). putwchar(c) is equivalent to putwc(c, stdout).

putwc behaves like fputwc, except that putwc may be implemented as a macro that evaluates stream more than once.

Errors

On success, these functions return the value they have written. On failure, they return the constant WEOF. If an I/O error occurs, the error indicator is set for the stream. If c does not correspond to a valid multibyte character, errno will be set to EILSEN.

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

References

fclose(3S), ferror(3S), fopen(3S), fprintf(3S), fread(3S), intro(3), Intro(3S), putws(3wide), setbuf(3S), widec(3S)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004