.\" SUCH DAMAGE.
.\"
.\" @(#)ungetc.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/stdio/ungetc.3,v 1.12 2001/10/01 16:08:59 ru Exp $
+.\" $FreeBSD: src/lib/libc/stdio/ungetc.3,v 1.13 2002/10/10 04:12:40 tjr 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.
.Sh SEE ALSO
.Xr fseek 3 ,
.Xr getc 3 ,
-.Xr setvbuf 3
+.Xr setvbuf 3 ,
+.Xr ungetwc 3
.Sh STANDARDS
The
.Fn ungetc