view docs/ccguide/putc.refentry @ 2342:82c9672489a0

Made change to workings of SHARE. bit to what I believe is the proper way.
author boisy
date Fri, 15 Jan 2010 15:54:53 +0000
parents d9ab3688bb71
children
line wrap: on
line source

<refentry id="putc">
<refnamediv>
<refname>Putc</refname>
<refname>Putchar</refname>
<refname>Putw</refname>
<refpurpose>put character or word in a file</refpurpose>
</refnamediv>

<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>
#include &lt;stdio.h&gt;
</funcsynopsisinfo>
<funcprototype>
  <funcdef><function>putc</function></funcdef>
  <paramdef>char <parameter>ch</parameter></paramdef>
  <paramdef>FILE *<parameter>fp</parameter></paramdef>
</funcprototype>

<funcprototype>
  <funcdef><function>putchar</function></funcdef>
  <paramdef>char <parameter>ch</parameter></paramdef>
</funcprototype>

<funcprototype>
  <funcdef><function>putw</function></funcdef>
  <paramdef>int <parameter>n</parameter></paramdef>
  <paramdef>FILE *<parameter>fp</parameter></paramdef>
</funcprototype>
</funcsynopsis>

</refsynopsisdiv>

<refsect1><title>Description</title>
<para>
Putc add the character "ch" to the file "fp" at the current
writing position and advances the position pointer.
</para>
<para>
Putchar is implemented as a macro (defined in the header file)
and is equivalent to "putc(ch,stdout)".
</para>
<para>
Putw adds the (two byte) machine word "n" to the file "fp" in
the manner of putc.
</para>
<para>
Output via putc is normally buffered except;
(a) when the buffering is disabled by "setbuf()", and
(b) the standard error output is always unbuffered.
</para>
</refsect1>

<refsect1><title>Diagnostics</title>
<para>
Putc and putchar return the character argument from a
successful call, and EOF on end-of-file or error.
</para>
</refsect1>

<refsect1><title>See Also</title>
<para>
<link linkend="fopen">fopen()</link>,
<link linkend="fclose">fclose(), fflush()</link>,
<link linkend="getc">getc()</link>,
<link linkend="puts">puts()</link>,
<link linkend="printf">printf()</link>,
<link linkend="fread">fread()</link>
</para>
</refsect1>

</refentry>