Sat Aug 29 15:25:57 2020 UTC ()
stdio(3): fix typos in the manual page

fputc cannot read characters, it can only write them.


(rillig)
diff -r1.27 -r1.28 src/lib/libc/stdio/stdio.3

cvs diff -r1.27 -r1.28 src/lib/libc/stdio/stdio.3 (expand / switch to unified diff)

--- src/lib/libc/stdio/stdio.3 2018/02/22 08:33:43 1.27
+++ src/lib/libc/stdio/stdio.3 2020/08/29 15:25:57 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: stdio.3,v 1.27 2018/02/22 08:33:43 pgoyette Exp $ 1.\" $NetBSD: stdio.3,v 1.28 2020/08/29 15:25:57 rillig Exp $
2.\" 2.\"
3.\" Copyright (c) 1990, 1991, 1993 3.\" Copyright (c) 1990, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -19,27 +19,27 @@ @@ -19,27 +19,27 @@
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.\" 29.\"
30.\" @(#)stdio.3 8.7 (Berkeley) 4/19/94 30.\" @(#)stdio.3 8.7 (Berkeley) 4/19/94
31.\" 31.\"
32.Dd February 22, 2018 32.Dd August 29, 2020
33.Dt STDIO 3 33.Dt STDIO 3
34.Os 34.Os
35.Sh NAME 35.Sh NAME
36.Nm stdio 36.Nm stdio
37.Nd standard input/output library functions 37.Nd standard input/output library functions
38.Sh LIBRARY 38.Sh LIBRARY
39.Lb libc 39.Lb libc
40.Sh SYNOPSIS 40.Sh SYNOPSIS
41.In stdio.h 41.In stdio.h
42.Vt FILE *stdin; 42.Vt FILE *stdin;
43.Vt FILE *stdout; 43.Vt FILE *stdout;
44.Vt FILE *stderr; 44.Vt FILE *stderr;
45.Sh DESCRIPTION 45.Sh DESCRIPTION
@@ -53,35 +53,33 @@ and the physical @@ -53,35 +53,33 @@ and the physical
53.Tn I/O 53.Tn I/O
54characteristics are concealed. 54characteristics are concealed.
55.Pp 55.Pp
56A stream is associated with an external file (which may be a physical 56A stream is associated with an external file (which may be a physical
57device) by 57device) by
58.Em opening 58.Em opening
59a file, which may involve creating a new file. 59a file, which may involve creating a new file.
60Creating an existing file causes its former contents to be discarded. 60Creating an existing file causes its former contents to be discarded.
61If a file can support positioning requests (such as a disk file, as opposed 61If a file can support positioning requests (such as a disk file, as opposed
62to a terminal) then a 62to a terminal) then a
63.Em file position indicator 63.Em file position indicator
64associated with the stream is positioned at the start of the file (byte 64associated with the stream is positioned at the start of the file (byte
65zero), unless the file is opened with append mode. 65zero), unless the file is opened with append mode.
66If append mode 66If append mode is used, the position indicator is placed at the end-of-file.
67is used, the position indicator will be placed the end-of-file. 
68The position indicator is maintained by subsequent reads, writes 67The position indicator is maintained by subsequent reads, writes
69and positioning requests. 68and positioning requests.
70All input occurs as if the characters 69All input occurs as if the characters were read by successive calls to the
71were read by successive calls to the 
72.Xr fgetc 3 70.Xr fgetc 3
73function; all output takes place as if all characters were 71function; all output takes place as if all characters were
74read by successive calls to the 72written by successive calls to the
75.Xr fputc 3 73.Xr fputc 3
76function. 74function.
77.Pp 75.Pp
78A file is disassociated from a stream by 76A file is disassociated from a stream by
79.Em closing 77.Em closing
80the file. 78the file.
81Output streams are flushed (any unwritten buffer contents are transferred 79Output streams are flushed (any unwritten buffer contents are transferred
82to the host environment) before the stream is disassociated from the file. 80to the host environment) before the stream is disassociated from the file.
83The value of a pointer to a 81The value of a pointer to a
84.Dv FILE 82.Dv FILE
85object is indeterminate after a file is closed (garbage). 83object is indeterminate after a file is closed (garbage).
86.Pp 84.Pp
87A file may be subsequently reopened, by the same or another program 85A file may be subsequently reopened, by the same or another program