1FPUTWC(3P)                 POSIX Programmer's Manual                FPUTWC(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       fputwc - put a wide-character code on a stream
13

SYNOPSIS

15       #include <stdio.h>
16       #include <wchar.h>
17
18       wint_t fputwc(wchar_t wc, FILE *stream);
19
20

DESCRIPTION

22       The fputwc() function shall write the character  corresponding  to  the
23       wide-character  code  wc  to the output stream pointed to by stream, at
24       the position indicated by the associated  file-position  indicator  for
25       the  stream  (if defined), and advances the indicator appropriately. If
26       the file cannot support positioning requests,  or  if  the  stream  was
27       opened  with  append  mode,  the  character  is  appended to the output
28       stream. If an error occurs while writing the character, the shift state
29       of the output file is left in an undefined state.
30
31       The st_ctime and st_mtime fields of the file shall be marked for update
32       between the successful execution of fputwc() and  the  next  successful
33       completion  of  a  call to fflush() or fclose() on the same stream or a
34       call to exit() or abort().
35

RETURN VALUE

37       Upon successful completion, fputwc() shall return  wc.   Otherwise,  it
38       shall  return  WEOF,  the  error indicator for the stream shall be set,
39       and errno shall be set to indicate the error.
40

ERRORS

42       The fputwc() function shall fail if either the stream is unbuffered  or
43       data in the stream's buffer needs to be written, and:
44
45       EAGAIN The  O_NONBLOCK  flag  is set for the file descriptor underlying
46              stream and the process would be delayed in the write operation.
47
48       EBADF  The file descriptor  underlying  stream  is  not  a  valid  file
49              descriptor open for writing.
50
51       EFBIG  An  attempt was made to write to a file that exceeds the maximum
52              file size or the process' file size limit.
53
54       EFBIG  The file is a regular file and an attempt was made to  write  at
55              or  beyond  the offset maximum associated with the corresponding
56              stream.
57
58       EILSEQ The wide-character code wc does not correspond to a valid  char‐
59              acter.
60
61       EINTR  The  write operation was terminated due to the receipt of a sig‐
62              nal, and no data was transferred.
63
64       EIO    A physical I/O error has occurred, or the process is a member of
65              a  background  process group attempting to write to its control‐
66              ling terminal, TOSTOP is set, the process  is  neither  ignoring
67              nor  blocking  SIGTTOU,  and the process group of the process is
68              orphaned.  This error may also be returned under implementation-
69              defined conditions.
70
71       ENOSPC There  was  no free space remaining on the device containing the
72              file.
73
74       EPIPE  An attempt is made to write to a pipe or FIFO that is  not  open
75              for  reading by any process. A SIGPIPE signal shall also be sent
76              to the thread.
77
78
79       The fputwc() function may fail if:
80
81       ENOMEM Insufficient storage space is available.
82
83       ENXIO  A request was made of a nonexistent device, or the  request  was
84              outside the capabilities of the device.
85
86
87       The following sections are informative.
88

EXAMPLES

90       None.
91

APPLICATION USAGE

93       None.
94

RATIONALE

96       None.
97

FUTURE DIRECTIONS

99       None.
100

SEE ALSO

102       ferror(),  fopen(),  setbuf(), ulimit(), the Base Definitions volume of
103       IEEE Std 1003.1-2001, <stdio.h>, <wchar.h>
104
106       Portions of this text are reprinted and reproduced in  electronic  form
107       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
108       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
109       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
110       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
111       event of any discrepancy between this version and the original IEEE and
112       The Open Group Standard, the original IEEE and The Open Group  Standard
113       is  the  referee document. The original Standard can be obtained online
114       at http://www.opengroup.org/unix/online.html .
115
116
117
118IEEE/The Open Group                  2003                           FPUTWC(3P)
Impressum