summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-04-18 03:01:36 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-04-18 03:01:36 +0000
commitc2d5d31832de35b48a0e487f90b9a58abeb3a8ea (patch)
tree3dcc33b96ac33fca8fde9f5dff0db0a5afbb6ae4 /lib/libc/stdio
parentb6a043747e2041e97decf4b4c5a3b51c3b40b722 (diff)
Repairs, mostly removing hard sentence breaks.
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/fgets.35
-rw-r--r--lib/libc/stdio/mktemp.36
-rw-r--r--lib/libc/stdio/printf.331
-rw-r--r--lib/libc/stdio/putc.35
-rw-r--r--lib/libc/stdio/scanf.310
-rw-r--r--lib/libc/stdio/stdio.329
6 files changed, 49 insertions, 37 deletions
diff --git a/lib/libc/stdio/fgets.3 b/lib/libc/stdio/fgets.3
index f27c4f09c3a..a37f92f02c7 100644
--- a/lib/libc/stdio/fgets.3
+++ b/lib/libc/stdio/fgets.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fgets.3,v 1.9 2000/02/19 22:23:48 ericj Exp $
+.\" $OpenBSD: fgets.3,v 1.10 2000/04/18 03:01:34 aaron Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -146,7 +146,8 @@ be false in two other cases:
.It
If the last line in a file does not contain a newline, the string returned by
.Fn fgets
-will not contain a newline either. Thus
+will not contain a newline either.
+Thus
.Fn strchr
will return
.Dv NULL
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3
index 91b0852dce2..2a26ee04fec 100644
--- a/lib/libc/stdio/mktemp.3
+++ b/lib/libc/stdio/mktemp.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mktemp.3,v 1.20 2000/01/27 04:42:48 deraadt Exp $
+.\" $OpenBSD: mktemp.3,v 1.21 2000/04/18 03:01:34 aaron Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -98,8 +98,8 @@ The
.Fn mkstemps
function acts the same as
.Fn mkstemp ,
-except it permits a suffix to exist in the template. The template
-should be of the form
+except it permits a suffix to exist in the template.
+The template should be of the form
.Pa /tmp/tmpXXXXXXsuffix .
.Fn mkstemps
is told the length of the suffix string, i.e., strlen("suffix");
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index d76e8327b37..66c0aa25ea6 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: printf.3,v 1.24 2000/04/15 02:15:24 aaron Exp $
+.\" $OpenBSD: printf.3,v 1.25 2000/04/18 03:01:35 aaron Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -301,8 +301,9 @@ the field width.
An optional precision, in the form of a period
.Sq Cm \&.
followed by an
-optional digit string. If the digit string is omitted, the precision
-is taken as zero. This gives the minimum number of digits to appear for
+optional digit string.
+If the digit string is omitted, the precision is taken as zero.
+This gives the minimum number of digits to appear for
.Cm d ,
.Cm i ,
.Cm o ,
@@ -438,7 +439,8 @@ or unsigned hexadecimal
.Pf ( Cm x
and
.Cm X )
-notation. The letters
+notation.
+The letters
.Cm abcdef
are used for
.Cm x
@@ -554,8 +556,9 @@ No argument is converted.
.It Cm %
A
.Ql %
-is written. No argument is converted. The complete conversion specification
-is
+is written.
+No argument is converted.
+The complete conversion specification is
.Ql %% .
.El
.Pp
@@ -632,7 +635,8 @@ The functions
.Fn asprintf
and
.Fn vasprintf
-first appeared in the GNU C library. This implementation first appeared in
+first appeared in the GNU C library.
+This implementation first appeared in
.Ox 2.3 .
.Sh CAVEATS
The conversion formats
@@ -681,13 +685,14 @@ interface is not portable.
Never print a user-supplied string directly as a format without using
.Cm %s ,
as an attacker can put format specifiers in that string to mangle
-your stack. Be sure to use the proper secure idiom:
+your stack.
+Be sure to use the proper secure idiom:
.Bd -literal -offset indent
snprintf(buffer, sizeof(buffer), "%s", string)
.Ed
.Pp
-There is no way for printf to know the size of each argument passed. If
-you use positional arguments you must ensure that all parameters, up to the
-last positionally specified parameter, are used in the format string. This
-allows for the format string to be parsed for this information. Failure
-to do this will mean your code is non-portable and liable to fail.
+There is no way for printf to know the size of each argument passed.
+If you use positional arguments you must ensure that all parameters, up to the
+last positionally specified parameter, are used in the format string.
+This allows for the format string to be parsed for this information.
+Failure to do this will mean your code is non-portable and liable to fail.
diff --git a/lib/libc/stdio/putc.3 b/lib/libc/stdio/putc.3
index 0c28835d0f7..d6850646fc3 100644
--- a/lib/libc/stdio/putc.3
+++ b/lib/libc/stdio/putc.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: putc.3,v 1.3 1999/02/27 21:55:47 deraadt Exp $
+.\" $OpenBSD: putc.3,v 1.4 2000/04/18 03:01:35 aaron Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -67,7 +67,8 @@ to the output stream pointed to by
.Fn putc
acts essentially identically to
.Fn fputc ,
-but is a macro that expands in-line. It may evaluate
+but is a macro that expands in-line.
+It may evaluate
.Fa stream
more than once, so arguments given to
.Fn putc
diff --git a/lib/libc/stdio/scanf.3 b/lib/libc/stdio/scanf.3
index e4603b2e4cf..d91cdeed345 100644
--- a/lib/libc/stdio/scanf.3
+++ b/lib/libc/stdio/scanf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: scanf.3,v 1.5 2000/03/04 22:19:31 aaron Exp $
+.\" $OpenBSD: scanf.3,v 1.6 2000/04/18 03:01:35 aaron Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -145,7 +145,7 @@ Indicates that the conversion will be one of
or
.Cm n
and the next pointer is a pointer to a
-.Em short int
+.Em short int
(rather than
.Em int ) .
.It Cm l
@@ -154,7 +154,7 @@ Indicates either that the conversion will be one of
or
.Cm n
and the next pointer is a pointer to a
-.Em long int
+.Em long int
(rather than
.Em int ) ,
or that the conversion will be one of
@@ -368,8 +368,8 @@ conversion.
The value
.Dv EOF
is returned if an input failure occurs before any conversion such as an
-end-of-file occurs. If an error or end-of-file occurs after conversion
-has begun,
+end-of-file occurs.
+If an error or end-of-file occurs after conversion has begun,
the number of conversions which were successfully completed is returned.
.Sh SEE ALSO
.Xr getc 3 ,
diff --git a/lib/libc/stdio/stdio.3 b/lib/libc/stdio/stdio.3
index b49d87d61e5..401a7f7c04a 100644
--- a/lib/libc/stdio/stdio.3
+++ b/lib/libc/stdio/stdio.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: stdio.3,v 1.11 2000/04/15 02:15:24 aaron Exp $
+.\" $OpenBSD: stdio.3,v 1.12 2000/04/18 03:01:35 aaron Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -51,22 +51,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
+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 at 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
@@ -85,15 +88,17 @@ object is indeterminate (garbage) after a file is closed.
.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 may not close files properly and hence
-buffered output may be lost. In particular,
+streams are flushed) before program termination.
+Other methods of program termination may not close files properly and hence
+buffered output may be lost.
+In particular,
.Xr _exit 2
-does not flush stdio files. Neither does an exit due to a signal.
+does not flush stdio files.
+Neither does an exit due to a signal.
Buffers are flushed by
.Xr abort 3
as required by POSIX, although previous implementations did not.