1FPUTWS(3P)                 POSIX Programmer's Manual                FPUTWS(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
11

NAME

13       fputws — put a wide-character string on a stream
14

SYNOPSIS

16       #include <stdio.h>
17       #include <wchar.h>
18
19       int fputws(const wchar_t *restrict ws, FILE *restrict stream);
20

DESCRIPTION

22       The functionality described on this reference page is aligned with  the
23       ISO C  standard.  Any  conflict between the requirements described here
24       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2008
25       defers to the ISO C standard.
26
27       The  fputws()  function shall write a character string corresponding to
28       the (null-terminated) wide-character string pointed to  by  ws  to  the
29       stream  pointed to by stream.  No character corresponding to the termi‐
30       nating null wide-character code shall be written.
31
32       The last data modification and last file status  change  timestamps  of
33       the file shall be marked for update between the successful execution of
34       fputws() and the next successful completion of a call  to  fflush()  or
35       fclose() on the same stream or a call to exit() or abort().
36

RETURN VALUE

38       Upon  successful  completion, fputws() shall return a non-negative num‐
39       ber. Otherwise, it shall return −1, set  an  error  indicator  for  the
40       stream, and set errno to indicate the error.
41

ERRORS

43       Refer to fputwc().
44
45       The following sections are informative.
46

EXAMPLES

48       None.
49

APPLICATION USAGE

51       The fputws() function does not append a <newline>.
52
53       This  volume of POSIX.1‐2008 requires that successful completion simply
54       return a non-negative integer. There are at least three known different
55       implementation conventions for this requirement:
56
57        *  Return a constant value.
58
59        *  Return the last character written.
60
61        *  Return  the  number of bytes written. Note that this implementation
62           convention cannot be adhered to for strings longer  than  {INT_MAX}
63           bytes as the value would not be representable in the return type of
64           the  function.  For  backwards-compatibility,  implementations  can
65           return  the  number  of bytes for strings of up to {INT_MAX} bytes,
66           and return {INT_MAX} for all longer strings.
67

RATIONALE

69       None.
70

FUTURE DIRECTIONS

72       None.
73

SEE ALSO

75       Section 2.5, Standard I/O Streams, fopen()
76
77       The Base Definitions volume of POSIX.1‐2008, <stdio.h>, <wchar.h>
78
80       Portions of this text are reprinted and reproduced in  electronic  form
81       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
82       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
83       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
84       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
85       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
86       event of any discrepancy between this version and the original IEEE and
87       The  Open Group Standard, the original IEEE and The Open Group Standard
88       is the referee document. The original Standard can be  obtained  online
89       at http://www.unix.org/online.html .
90
91       Any  typographical  or  formatting  errors that appear in this page are
92       most likely to have been introduced during the conversion of the source
93       files  to  man page format. To report such errors, see https://www.ker
94       nel.org/doc/man-pages/reporting_bugs.html .
95
96
97
98IEEE/The Open Group                  2013                           FPUTWS(3P)
Impressum