466
|
1 <refentry id="puts">
|
|
2 <refnamediv>
|
573
|
3 <refname>Puts</refname>
|
|
4 <refname>Fputs</refname>
|
|
5 <refpurpose>put a string on a file</refpurpose>
|
466
|
6 </refnamediv>
|
|
7
|
|
8 <refsynopsisdiv>
|
|
9 <funcsynopsis>
|
468
|
10 <funcsynopsisinfo>
|
|
11 #include <stdio.h>
|
|
12 </funcsynopsisinfo>
|
542
|
13
|
466
|
14 <funcprototype>
|
|
15 <funcdef><function>puts</function></funcdef>
|
542
|
16 <paramdef>char *<parameter>s</parameter></paramdef>
|
|
17 </funcprototype>
|
|
18
|
|
19 <funcprototype>
|
|
20 <funcdef><function>fputs</function></funcdef>
|
|
21 <paramdef>char *<parameter>s</parameter></paramdef>
|
|
22 <paramdef>FILE *<parameter>fp</parameter></paramdef>
|
466
|
23 </funcprototype>
|
|
24 </funcsynopsis>
|
|
25
|
|
26 </refsynopsisdiv>
|
|
27
|
|
28 <refsect1><title>Description</title>
|
|
29 <para>
|
542
|
30 Fputs copies the (null-terminated) string pointed to by "s"
|
|
31 onto the file "fp".
|
|
32 </para>
|
|
33 <para>
|
|
34 Puts copies the string "s" onto the standard output and
|
|
35 appends "\n".
|
|
36 </para>
|
|
37 <para>
|
|
38 The terminating null is not copied by either function.
|
|
39 </para>
|
|
40 </refsect1>
|
|
41
|
|
42 <refsect1><title>Caveats</title>
|
|
43 <para>
|
|
44 The inconsistency of the new-line being appended by puts and
|
|
45 not by fputs is dictated by history and the desire for
|
|
46 compatibility.
|
466
|
47 </para>
|
|
48 </refsect1>
|
|
49 </refentry>
|