1*61180Sbostic.\" Copyright (c) 1990, 1991, 1993 2*61180Sbostic.\" The Regents of the University of California. All rights reserved. 320364Smckusick.\" 447011Sbostic.\" This code is derived from software contributed to Berkeley by 550298Sbostic.\" Chris Torek and the American National Standards Committee X3, 650298Sbostic.\" on Information Processing Systems. 750298Sbostic.\" 847011Sbostic.\" %sccs.include.redist.man% 947011Sbostic.\" 10*61180Sbostic.\" @(#)fputs.3 8.1 (Berkeley) 06/04/93 1147011Sbostic.\" 1248351Scael.Dd 1348351Scael.Dt FPUTS 3 1448351Scael.Os 1548351Scael.Sh NAME 1648351Scael.Nm fputs , 1748351Scael.Nm puts 1848351Scael.Nd output a line to a stream 1948351Scael.Sh SYNOPSIS 2048351Scael.Fd #include <stdio.h> 2148351Scael.Ft int 2248351Scael.Fn fputs "const char *str" "FILE *stream" 2348351Scael.Ft int 2448351Scael.Fn puts "const char *str" 2548351Scael.Sh DESCRIPTION 2648351ScaelThe function 2748351Scael.Fn fputs 2848351Scaelwrites the string pointed to by 2948351Scael.Fa str 3048351Scaelto the stream pointed to by 3148351Scael.Fa stream . 3248351Scael.\" The terminating 3348351Scael.\" .Dv NUL 3448351Scael.\" character is not written. 3548351Scael.Pp 3648351ScaelThe function 3748351Scael.Fn puts 3847011Sbosticwrites the string 3948351Scael.Fa str , 4048351Scaeland a terminating newline character, 4148351Scaelto the stream 4248351Scael.Em stdout . 4348351Scael.Sh RETURN VALUES 4448351ScaelThe 4548351Scael.Fn fputs 4648351Scaelfunction 4748351Scaelreturns 0 on success and 4848351Scael.Dv EOF 4947011Sbosticon error; 5048351Scael.Fn puts 5148351Scaelreturns a nonnegative integer on success and 5248351Scael.Dv EOF 5347011Sbosticon error. 5448351Scael.Sh ERRORS 5548351Scael.Bl -tag -width [EBADF] 5648351Scael.It Bq Er EBADF 5748351ScaelThe 5848351Scael.Fa stream 5948351Scaelsupplied 6047011Sbosticis not a writable stream. 6148351Scael.El 6248351Scael.Pp 6348351ScaelThe functions 6448351Scael.Fn fputs 6547011Sbosticand 6648351Scael.Fn puts 6747011Sbosticmay also fail and set 6848351Scael.Va errno 6947011Sbosticfor any of the errors specified for the routines 7048351Scael.Xr write 2 . 7148351Scael.Sh SEE ALSO 7248351Scael.Xr putc 3 , 7348351Scael.Xr ferror 3 , 7448351Scael.Xr stdio 3 7548351Scael.Sh STANDARDS 7648351ScaelThe functions 7748351Scael.Fn fputs 7847011Sbosticand 7948351Scael.Fn puts 8048351Scaelconform to 8148351Scael.St -ansiC . 82