Loading...
stdio/getc.3 Libc-763.12 Libc-262
--- Libc/Libc-763.12/stdio/getc.3
+++ Libc/Libc-262/stdio/getc.3
@@ -13,6 +13,10 @@
 .\" 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.
@@ -30,17 +34,15 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)getc.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/stdio/getc.3,v 1.21 2007/01/09 00:28:06 imp Exp $
+.\" $FreeBSD: src/lib/libc/stdio/getc.3,v 1.11 2001/10/01 16:08:59 ru Exp $
 .\"
-.Dd January 10, 2003
+.Dd June 4, 1993
 .Dt GETC 3
 .Os
 .Sh NAME
 .Nm fgetc ,
 .Nm getc ,
-.Nm getc_unlocked ,
 .Nm getchar ,
-.Nm getchar_unlocked ,
 .Nm getw
 .Nd get next character or word from input stream
 .Sh LIBRARY
@@ -52,11 +54,7 @@
 .Ft int
 .Fn getc "FILE *stream"
 .Ft int
-.Fn getc_unlocked "FILE *stream"
-.Ft int
-.Fn getchar "void"
-.Ft int
-.Fn getchar_unlocked "void"
+.Fn getchar
 .Ft int
 .Fn getw "FILE *stream"
 .Sh DESCRIPTION
@@ -85,35 +83,14 @@
 .Fn getw
 function
 obtains the next
-.Vt int
+.Em int
 (if present)
 from the stream pointed at by
 .Fa stream .
-.Pp
-The
-.Fn getc_unlocked
-and
-.Fn getchar_unlocked
-functions are equivalent to
-.Fn getc
-and
-.Fn getchar
-respectively,
-except that the caller is responsible for locking the stream
-with
-.Xr flockfile 3
-before calling them.
-These functions may be used to avoid the overhead of locking the stream
-for each character, and to avoid input being dispersed among multiple
-threads reading from the same stream.
 .Sh RETURN VALUES
 If successful, these routines return the next requested object
 from the
 .Fa stream .
-Character values are returned as an
-.Vt "unsigned char"
-converted to an
-.Vt int .
 If the stream is at end-of-file or a read error occurs,
 the routines return
 .Dv EOF .
@@ -132,27 +109,19 @@
 .Xr clearerr 3 .
 .Sh SEE ALSO
 .Xr ferror 3 ,
-.Xr flockfile 3 ,
 .Xr fopen 3 ,
 .Xr fread 3 ,
-.Xr getwc 3 ,
 .Xr putc 3 ,
 .Xr ungetc 3
 .Sh STANDARDS
 The
 .Fn fgetc ,
-.Fn getc ,
+.Fn getc
 and
 .Fn getchar
 functions
 conform to
 .St -isoC .
-The
-.Fn getc_unlocked
-and
-.Fn getchar_unlocked
-functions conform to
-.St -p1003.1-2001 .
 .Sh BUGS
 Since
 .Dv EOF
@@ -163,7 +132,7 @@
 must be used to check for failure after calling
 .Fn getw .
 The size and byte order of an
-.Vt int
+.Em int
 varies from one machine to another, and
 .Fn getw
 is not recommended for portable applications.