summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/stdio.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/stdio.3')
-rw-r--r--lib/libc/stdio/stdio.325
1 files changed, 14 insertions, 11 deletions
diff --git a/lib/libc/stdio/stdio.3 b/lib/libc/stdio/stdio.3
index cc169283adf..c1af481e563 100644
--- a/lib/libc/stdio/stdio.3
+++ b/lib/libc/stdio/stdio.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: stdio.3,v 1.14 2002/02/07 07:00:27 ross Exp $
+.\" $NetBSD: stdio.3,v 1.15 2002/10/01 17:24:08 wiz Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -55,22 +55,25 @@ interface.
Input and output is mapped into logical data streams
and the physical
.Tn I/O
-characteristics are concealed. The functions and macros are listed
-below; more information is available from the individual man pages.
+characteristics are concealed.
+The functions and macros are listed below;
+more information is available from the individual man pages.
.Pp
A stream is associated with an external file (which may be a physical
device) by
.Em opening
-a file, which may involve creating a new file. Creating an
-existing file causes its former contents to be discarded.
+a file, which may involve creating a new file.
+Creating an existing file causes its former contents to be discarded.
If a file can support positioning requests (such as a disk file, as opposed
to a terminal) then a
.Em file position indicator
associated with the stream is positioned at the start of the file (byte
-zero), unless the file is opened with append mode. If append mode
+zero), unless the file is opened with append mode.
+If append mode
is used, the position indicator will be placed the end-of-file.
The position indicator is maintained by subsequent reads, writes
-and positioning requests. All input occurs as if the characters
+and positioning requests.
+All input occurs as if the characters
were read by successive calls to the
.Xr fgetc 3
function; all output takes place as if all characters were
@@ -89,12 +92,12 @@ object is indeterminate after a file is closed (garbage).
.Pp
A file may be subsequently reopened, by the same or another program
execution, and its contents reclaimed or modified (if it can be repositioned
-at the start). If the main function returns to its original caller, or
-the
+at the start).
+If the main function returns to its original caller, or the
.Xr exit 3
function is called, all open files are closed (hence all output
-streams are flushed) before program termination. Other methods
-of program termination, such as
+streams are flushed) before program termination.
+Other methods of program termination, such as
.Xr abort 3
do not bother about closing files properly.
.Pp