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

NAME

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

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

47       None.
48

APPLICATION USAGE

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

RATIONALE

68       None.
69

FUTURE DIRECTIONS

71       None.
72

SEE ALSO

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