Debian Codegraph @

upstream/debian-unstable/man3/fputws.3

raw
1 '\" t
2 .\" Copyright, Bruno Haible <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\"
7 .TH fputws 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 fputws \- write a wide-character string to a FILE stream
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <wchar.h>
16 .P
17 .BI "int fputws(const wchar_t *restrict " ws ", FILE *restrict " stream );
18 .fi
19 .SH DESCRIPTION
20 The
21 .BR fputws ()
22 function is the wide-character equivalent of
23 the
24 .BR fputs (3)
25 function.
26 It writes the wide-character string starting at
27 .IR ws ,
28 up to but not including the terminating null wide character (L\[aq]\[rs]0\[aq]),
29 to
30 .IR stream .
31 .P
32 For a nonlocking counterpart, see
33 .BR unlocked_stdio (3).
34 .SH RETURN VALUE
35 The
36 .BR fputws ()
37 function returns a
38 nonnegative integer if the operation was
39 successful, or \-1 to indicate an error.
40 .SH ATTRIBUTES
41 For an explanation of the terms used in this section, see
42 .BR attributes (7).
43 .TS
44 allbox;
45 lbx lb lb
46 l l l.
47 Interface Attribute Value
48 T{
49 .na
50 .nh
51 .BR fputws ()
52 T} Thread safety MT-Safe
53 .TE
54 .SH STANDARDS
55 C11, POSIX.1-2008.
56 .SH HISTORY
57 POSIX.1-2001, C99.
58 .SH NOTES
59 The behavior of
60 .BR fputws ()
61 depends on the
62 .B LC_CTYPE
63 category of the
64 current locale.
65 .P
66 In the absence of additional information passed to the
67 .BR fopen (3)
68 call, it is
69 reasonable to expect that
70 .BR fputws ()
71 will actually write the multibyte
72 string corresponding to the wide-character string
73 .IR ws .
74 .SH SEE ALSO
75 .BR fputwc (3),
76 .BR unlocked_stdio (3)