.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\" SUCH DAMAGE.
.\"
.\" @(#)ungetc.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/stdio/ungetc.3,v 1.13 2002/10/10 04:12:40 tjr Exp $
+.\" $FreeBSD: src/lib/libc/stdio/ungetc.3,v 1.14 2007/01/09 00:28:07 imp Exp $
.\"
.Dd June 4, 1993
.Dt UNGETC 3
.Sh SYNOPSIS
.In stdio.h
.Ft int
-.Fn ungetc "int c" "FILE *stream"
+.Fo ungetc
+.Fa "int c"
+.Fa "FILE *stream"
+.Fc
.Sh DESCRIPTION
The
.Fn ungetc
(converted to an unsigned char)
back onto the input stream pointed to by
.Fa stream .
-The pushed-back characters will be returned by subsequent reads on the
-stream (in reverse order).
-A successful intervening call,
-using the same stream,
+The pushed-back characters will be returned (in reverse order)
+by subsequent reads on the stream.
+A successful intervening call
to one of the file positioning functions
.Xr ( fseek 3 ,
.Xr fsetpos 3 ,
or
-.Xr rewind 3 )
-will discard the pushed back characters.
+.Xr rewind 3 ) ,
+using the same stream,
+will discard the pushed-back characters.
.Pp
-One character of push-back is guaranteed,
+Only one character of push-back is guaranteed,
but as long as there is sufficient memory,
-an effectively infinite amount of pushback is allowed.
+an effectively infinite amount of push-back is allowed.
.Pp
If a character is successfully pushed-back,
the end-of-file indicator for the stream is cleared.