466
|
1 <refentry id="gets">
|
|
2 <refnamediv>
|
570
|
3 <refname>Gets</refname>
|
|
4 <refname>Fgets</refname>
|
|
5 <refpurpose>input a string</refpurpose>
|
466
|
6 </refnamediv>
|
|
7
|
|
8 <refsynopsisdiv>
|
|
9 <funcsynopsis>
|
468
|
10 <funcsynopsisinfo>
|
|
11 #include <stdio.h>
|
|
12 </funcsynopsisinfo>
|
466
|
13 <funcprototype>
|
570
|
14 <funcdef>char *<function>gets</function></funcdef>
|
|
15 <paramdef>char *<parameter>s</parameter></paramdef>
|
|
16 </funcprototype>
|
|
17
|
|
18 <funcprototype>
|
|
19 <funcdef>char *<function>fgets</function></funcdef>
|
|
20 <paramdef>char *<parameter>s</parameter></paramdef>
|
|
21 <paramdef>int <parameter>n</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>
|
|
30 Placeholder
|
|
31 </para>
|
|
32 </refsect1>
|
542
|
33
|
552
|
34 <refsect1><title>Caveats</title>
|
|
35 <para>
|
|
36 The different treatment of the "\n" by these functions is
|
|
37 retained here for portability reasons.
|
|
38 </para>
|
|
39 </refsect1>
|
|
40
|
|
41 <refsect1><title>Diagnostics</title>
|
|
42 <para>
|
|
43 Both functions return NULL on end-of-file or error.
|
|
44 </para>
|
|
45 </refsect1>
|
|
46
|
542
|
47 <refsect1><title>See Also</title>
|
|
48 <para>
|
|
49 <link linkend="puts">puts()</link>,
|
|
50 <link linkend="getc">getc()</link>,
|
|
51 <link linkend="scanf">scanf()</link>,
|
|
52 <link linkend="fread">fread()</link>
|
|
53 </para>
|
|
54 </refsect1>
|
|
55
|
466
|
56 </refentry>
|