466
|
1 <refentry id="putc">
|
|
2 <refnamediv>
|
573
|
3 <refname>Putc</refname>
|
|
4 <refname>Putchar</refname>
|
|
5 <refname>Putw</refname>
|
|
6 <refpurpose>put character or word in a file</refpurpose>
|
466
|
7 </refnamediv>
|
|
8
|
|
9 <refsynopsisdiv>
|
|
10 <funcsynopsis>
|
468
|
11 <funcsynopsisinfo>
|
|
12 #include <stdio.h>
|
|
13 </funcsynopsisinfo>
|
466
|
14 <funcprototype>
|
|
15 <funcdef><function>putc</function></funcdef>
|
573
|
16 <paramdef>char <parameter>ch</parameter></paramdef>
|
|
17 <paramdef>FILE *<parameter>fp</parameter></paramdef>
|
|
18 </funcprototype>
|
|
19
|
|
20 <funcprototype>
|
|
21 <funcdef><function>putchar</function></funcdef>
|
|
22 <paramdef>char <parameter>ch</parameter></paramdef>
|
|
23 </funcprototype>
|
|
24
|
|
25 <funcprototype>
|
|
26 <funcdef><function>putw</function></funcdef>
|
|
27 <paramdef>int <parameter>n</parameter></paramdef>
|
|
28 <paramdef>FILE *<parameter>fp</parameter></paramdef>
|
466
|
29 </funcprototype>
|
|
30 </funcsynopsis>
|
|
31
|
|
32 </refsynopsisdiv>
|
|
33
|
|
34 <refsect1><title>Description</title>
|
|
35 <para>
|
573
|
36 Putc add the character "ch" to the file "fp" at the current
|
|
37 writing position and advances the position pointer.
|
|
38 </para>
|
|
39 <para>
|
|
40 Putchar is implemented as a macro (defined in the header file)
|
|
41 and is equivalent to "putc(ch,stdout)".
|
|
42 </para>
|
|
43 <para>
|
|
44 Putw adds the (two byte) machine word "n" to the file "fp" in
|
|
45 the manner of putc.
|
|
46 </para>
|
|
47 <para>
|
|
48 Output via putc is normally buffered except;
|
|
49 (a) when the buffering is disabled by "setbuf()", and
|
|
50 (b) the standard error output is always unbuffered.
|
466
|
51 </para>
|
|
52 </refsect1>
|
542
|
53
|
552
|
54 <refsect1><title>Diagnostics</title>
|
|
55 <para>
|
|
56 Putc and putchar return the character argument from a
|
|
57 successful call, and EOF on end-of-file or error.
|
|
58 </para>
|
|
59 </refsect1>
|
|
60
|
542
|
61 <refsect1><title>See Also</title>
|
|
62 <para>
|
|
63 <link linkend="fopen">fopen()</link>,
|
573
|
64 <link linkend="fclose">fclose(), fflush()</link>,
|
542
|
65 <link linkend="getc">getc()</link>,
|
|
66 <link linkend="puts">puts()</link>,
|
|
67 <link linkend="printf">printf()</link>,
|
|
68 <link linkend="fread">fread()</link>
|
|
69 </para>
|
|
70 </refsect1>
|
|
71
|
466
|
72 </refentry>
|