nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man3c / puts.3c
blob24f0bc11dc822649c3454f140ea341657e411d2c
1 '\" te
2 .\" Copyright 1989 AT&T. Copyright (c) 2003, Sun Microsystems, Inc.  All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PUTS 3C "Jun 18, 2003"
7 .SH NAME
8 puts, fputs \- put a string on a stream
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <stdio.h>
14 \fBint\fR \fBputs\fR(\fBconst char *\fR\fIs\fR);
15 .fi
17 .LP
18 .nf
19 \fBint\fR \fBfputs\fR(\fBconst char *\fR\fIs\fR, \fBFILE *\fR\fIstream\fR);
20 .fi
22 .SH DESCRIPTION
23 .sp
24 .LP
25 The \fBputs()\fR function writes the string pointed to by \fIs\fR, followed by
26 a \fBNEWLINE\fR character, to the standard output stream \fBstdout\fR (see
27 \fBIntro\fR(3)). The terminating null byte is not written.
28 .sp
29 .LP
30 The \fBfputs()\fR function writes the null-terminated string pointed to by
31 \fIs\fR to the named output \fIstream\fR. The terminating null byte is not
32 written.
33 .sp
34 .LP
35 The \fBst_ctime\fR and \fBst_mtime\fR fields of the file will be marked for
36 update between the successful execution of \fBfputs()\fR and the next
37 successful completion of a call to \fBfflush\fR(3C) or \fBfclose\fR(3C) on the
38 same stream or a call to \fBexit\fR(2) or \fBabort\fR(3C).
39 .SH RETURN VALUES
40 .sp
41 .LP
42 On successful completion, both functions return the number of bytes written;
43 otherwise they return \fBEOF\fR and set \fBerrno\fR to indicate the error.
44 .SH ERRORS
45 .sp
46 .LP
47 Refer to \fBfputc\fR(3C).
48 .SH USAGE
49 .sp
50 .LP
51 Unlike \fBputs()\fR, the \fBfputs()\fR function does not write a NEWLINE
52 character at the end of the string.
53 .SH ATTRIBUTES
54 .sp
55 .LP
56 See \fBattributes\fR(5) for descriptions of the following attributes:
57 .sp
59 .sp
60 .TS
61 box;
62 c | c
63 l | l .
64 ATTRIBUTE TYPE  ATTRIBUTE VALUE
66 Interface Stability     Standard
68 MT-Level        MT-Safe
69 .TE
71 .SH SEE ALSO
72 .sp
73 .LP
74 \fBexit\fR(2), \fBwrite\fR(2), \fBIntro\fR(3), \fBabort\fR(3C),
75 \fBfclose\fR(3C), \fBferror\fR(3C), \fBfflush\fR(3C), \fBfopen\fR(3C),
76 \fBfputc\fR(3C), \fBprintf\fR(3C), \fBstdio\fR(3C), \fBattributes\fR(5),
77 \fBstandards\fR(5)