Commit | Line | Data |
---|---|---|
a0cc2186 | 1 | .\" @(#)fputs.3 6.1 (Berkeley) %G% |
85d99438 | 2 | .\" |
a0cc2186 | 3 | .TH PUTS 3S "" |
85d99438 KM |
4 | .AT 3 |
5 | .SH NAME | |
6 | puts, fputs \- put a string on a stream | |
7 | .SH SYNOPSIS | |
8 | .B #include <stdio.h> | |
9 | .PP | |
10 | .B puts(s) | |
11 | .br | |
12 | .B char *s; | |
13 | .PP | |
14 | .B fputs(s, stream) | |
15 | .br | |
16 | .B char *s; | |
17 | .br | |
18 | .SM | |
19 | .B FILE | |
20 | .B *stream; | |
21 | .SH DESCRIPTION | |
22 | .I Puts | |
23 | copies the null-terminated string | |
24 | .I s | |
25 | to the standard output stream | |
8f89355d | 26 | .B stdout |
85d99438 KM |
27 | and appends a |
28 | newline character. | |
29 | .PP | |
30 | .I Fputs | |
31 | copies the null-terminated string | |
32 | .I s | |
33 | to the named output | |
34 | .IR stream . | |
35 | .PP | |
36 | Neither routine copies the terminal null character. | |
37 | .SH "SEE ALSO" | |
8f89355d KM |
38 | fopen(3S), |
39 | gets(3S), | |
40 | putc(3S), | |
41 | printf(3S), | |
42 | ferror(3S) | |
85d99438 | 43 | .br |
8f89355d | 44 | fread(3S) for |
85d99438 KM |
45 | .I fwrite |
46 | .SH BUGS | |
47 | .I Puts | |
48 | appends a newline, | |
49 | .I fputs | |
50 | does not, all in the name of backward compatibility. |