162f08720SJoerg Sonnenberger.\" Copyright (c) 1990, 1991, 1993 262f08720SJoerg Sonnenberger.\" The Regents of the University of California. All rights reserved. 362f08720SJoerg Sonnenberger.\" 462f08720SJoerg Sonnenberger.\" This code is derived from software contributed to Berkeley by 562f08720SJoerg Sonnenberger.\" Chris Torek and the American National Standards Committee X3, 662f08720SJoerg Sonnenberger.\" on Information Processing Systems. 762f08720SJoerg Sonnenberger.\" 862f08720SJoerg Sonnenberger.\" Redistribution and use in source and binary forms, with or without 962f08720SJoerg Sonnenberger.\" modification, are permitted provided that the following conditions 1062f08720SJoerg Sonnenberger.\" are met: 1162f08720SJoerg Sonnenberger.\" 1. Redistributions of source code must retain the above copyright 1262f08720SJoerg Sonnenberger.\" notice, this list of conditions and the following disclaimer. 1362f08720SJoerg Sonnenberger.\" 2. Redistributions in binary form must reproduce the above copyright 1462f08720SJoerg Sonnenberger.\" notice, this list of conditions and the following disclaimer in the 1562f08720SJoerg Sonnenberger.\" documentation and/or other materials provided with the distribution. 1662f08720SJoerg Sonnenberger.\" 3. Neither the name of the University nor the names of its contributors 1762f08720SJoerg Sonnenberger.\" may be used to endorse or promote products derived from this software 1862f08720SJoerg Sonnenberger.\" without specific prior written permission. 1962f08720SJoerg Sonnenberger.\" 2062f08720SJoerg Sonnenberger.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2162f08720SJoerg Sonnenberger.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2262f08720SJoerg Sonnenberger.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2362f08720SJoerg Sonnenberger.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2462f08720SJoerg Sonnenberger.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2562f08720SJoerg Sonnenberger.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2662f08720SJoerg Sonnenberger.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2762f08720SJoerg Sonnenberger.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2862f08720SJoerg Sonnenberger.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2962f08720SJoerg Sonnenberger.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3062f08720SJoerg Sonnenberger.\" SUCH DAMAGE. 3162f08720SJoerg Sonnenberger.\" 3262f08720SJoerg Sonnenberger.\" @(#)fputs.3 8.1 (Berkeley) 6/4/93 330d5acd74SJohn Marino.\" $FreeBSD: head/lib/libc/stdio/fputws.3 165903 2007-01-09 00:28:16Z imp $ 3462f08720SJoerg Sonnenberger.\" 35*3623cebdSSascha Wildner.Dd December 26, 2013 3662f08720SJoerg Sonnenberger.Dt FPUTWS 3 3762f08720SJoerg Sonnenberger.Os 3862f08720SJoerg Sonnenberger.Sh NAME 39*3623cebdSSascha Wildner.Nm fputws , 40*3623cebdSSascha Wildner.Nm fputws_l 4162f08720SJoerg Sonnenberger.Nd output a line of wide characters to a stream 4262f08720SJoerg Sonnenberger.Sh LIBRARY 4362f08720SJoerg Sonnenberger.Lb libc 4462f08720SJoerg Sonnenberger.Sh SYNOPSIS 4562f08720SJoerg Sonnenberger.In stdio.h 4662f08720SJoerg Sonnenberger.In wchar.h 4762f08720SJoerg Sonnenberger.Ft int 4862f08720SJoerg Sonnenberger.Fn fputws "const wchar_t * restrict ws" "FILE * restrict fp" 49*3623cebdSSascha Wildner.In xlocale.h 50*3623cebdSSascha Wildner.Ft int 51*3623cebdSSascha Wildner.Fn fputws_l "const wchar_t * restrict ws" "FILE * restrict fp" "locale_t locale" 5262f08720SJoerg Sonnenberger.Sh DESCRIPTION 5362f08720SJoerg SonnenbergerThe 5462f08720SJoerg Sonnenberger.Fn fputws 55*3623cebdSSascha Wildnerand 56*3623cebdSSascha Wildner.Fn fputws_l 57*3623cebdSSascha Wildnerfunctions write the wide character string pointed to by 5862f08720SJoerg Sonnenberger.Fa ws 5962f08720SJoerg Sonnenbergerto the stream pointed to by 6062f08720SJoerg Sonnenberger.Fa fp . 61*3623cebdSSascha Wildner.Pp 62*3623cebdSSascha WildnerThe 63*3623cebdSSascha Wildner.Fn fputws_l 64*3623cebdSSascha Wildnerfunction takes an explicit 65*3623cebdSSascha Wildner.Fa locale 66*3623cebdSSascha Wildnerargument, whereas the 67*3623cebdSSascha Wildner.Fn fputws 68*3623cebdSSascha Wildnerfunction uses the current global or per-thread locale. 6962f08720SJoerg Sonnenberger.Sh RETURN VALUES 7062f08720SJoerg SonnenbergerThe 7162f08720SJoerg Sonnenberger.Fn fputws 72*3623cebdSSascha Wildnerand 73*3623cebdSSascha Wildner.Fn fputws_l 74*3623cebdSSascha Wildnerfunctions return 0 on success and \-1 on error. 7562f08720SJoerg Sonnenberger.Sh ERRORS 760d5acd74SJohn MarinoThe 770d5acd74SJohn Marino.Fn fputws 78*3623cebdSSascha Wildnerand 79*3623cebdSSascha Wildner.Fn fputws_l 80*3623cebdSSascha Wildnerfunctions will fail if: 8162f08720SJoerg Sonnenberger.Bl -tag -width Er 8262f08720SJoerg Sonnenberger.It Bq Er EBADF 8362f08720SJoerg SonnenbergerThe 8462f08720SJoerg Sonnenberger.Fa fp 8562f08720SJoerg Sonnenbergerargument supplied 8662f08720SJoerg Sonnenbergeris not a writable stream. 8762f08720SJoerg Sonnenberger.El 8862f08720SJoerg Sonnenberger.Pp 8962f08720SJoerg SonnenbergerThe 9062f08720SJoerg Sonnenberger.Fn fputws 91*3623cebdSSascha Wildnerand 92*3623cebdSSascha Wildner.Fn fputws_l 93*3623cebdSSascha Wildnerfunctions may also fail and set 9462f08720SJoerg Sonnenberger.Va errno 9562f08720SJoerg Sonnenbergerfor any of the errors specified for the routine 9662f08720SJoerg Sonnenberger.Xr write 2 . 9762f08720SJoerg Sonnenberger.Sh SEE ALSO 9862f08720SJoerg Sonnenberger.Xr ferror 3 , 9962f08720SJoerg Sonnenberger.Xr fputs 3 , 10062f08720SJoerg Sonnenberger.Xr putwc 3 , 101*3623cebdSSascha Wildner.Xr stdio 3 , 102*3623cebdSSascha Wildner.Xr xlocale 3 10362f08720SJoerg Sonnenberger.Sh STANDARDS 10462f08720SJoerg SonnenbergerThe 10562f08720SJoerg Sonnenberger.Fn fputws 10662f08720SJoerg Sonnenbergerfunction conforms to 10762f08720SJoerg Sonnenberger.St -p1003.1-2001 . 108