diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-12-24 00:31:01 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-12-24 00:31:01 +0000 |
commit | b1044a070b87b20a73f593b1087fae3a062d5920 (patch) | |
tree | daa375c4c5a8cf9fabd0f0657b2141fbb899ef71 /lib/libc/stdio | |
parent | 89891a551cfa28139f6165de0c822d75e1035761 (diff) |
Various repairs, mostly to get rid of short lines.
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/fclose.3 | 8 | ||||
-rw-r--r-- | lib/libc/stdio/fgetln.3 | 11 | ||||
-rw-r--r-- | lib/libc/stdio/fgets.3 | 14 | ||||
-rw-r--r-- | lib/libc/stdio/fopen.3 | 30 | ||||
-rw-r--r-- | lib/libc/stdio/fputs.3 | 5 | ||||
-rw-r--r-- | lib/libc/stdio/fseek.3 | 8 | ||||
-rw-r--r-- | lib/libc/stdio/getc.3 | 9 | ||||
-rw-r--r-- | lib/libc/stdio/mktemp.3 | 10 | ||||
-rw-r--r-- | lib/libc/stdio/printf.3 | 5 | ||||
-rw-r--r-- | lib/libc/stdio/putc.3 | 7 | ||||
-rw-r--r-- | lib/libc/stdio/remove.3 | 5 | ||||
-rw-r--r-- | lib/libc/stdio/scanf.3 | 21 | ||||
-rw-r--r-- | lib/libc/stdio/ungetc.3 | 6 |
13 files changed, 51 insertions, 88 deletions
diff --git a/lib/libc/stdio/fclose.3 b/lib/libc/stdio/fclose.3 index 396f3b077df..ce8209bf28e 100644 --- a/lib/libc/stdio/fclose.3 +++ b/lib/libc/stdio/fclose.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fclose.3,v 1.3 2000/04/20 01:39:31 aaron Exp $ +.\" $OpenBSD: fclose.3,v 1.4 2000/12/24 00:30:57 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn fclose -function -dissociates the named +function dissociates the named .Fa stream from its underlying file or set of functions. If the stream was being used for output, any buffered data is written @@ -73,8 +72,7 @@ is not an open stream. .Pp The .Fn fclose -function -may also fail and set +function may also fail and set .Va errno for any of the errors specified for the routines .Xr close 2 diff --git a/lib/libc/stdio/fgetln.3 b/lib/libc/stdio/fgetln.3 index cdf44663e35..bd213be5a74 100644 --- a/lib/libc/stdio/fgetln.3 +++ b/lib/libc/stdio/fgetln.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fgetln.3,v 1.7 2000/04/20 01:39:31 aaron Exp $ +.\" $OpenBSD: fgetln.3,v 1.8 2000/12/24 00:30:57 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,8 +44,7 @@ .Sh DESCRIPTION The .Fn fgetln -function -returns a pointer to the next line from the stream referenced by +function returns a pointer to the next line from the stream referenced by .Fa stream . This line is .Em not @@ -72,8 +71,7 @@ is returned. .Pp The .Fn fgetln -function -does not distinguish between end-of-file and error; the routines +function does not distinguish between end-of-file and error; the routines .Xr feof 3 and .Xr ferror 3 @@ -102,8 +100,7 @@ is not a stream open for reading. .Pp The .Fn fgetln -function -may also fail and set +function may also fail and set .Va errno for any of the errors specified for the routines .Xr fflush 3 , diff --git a/lib/libc/stdio/fgets.3 b/lib/libc/stdio/fgets.3 index a37f92f02c7..14c5885c684 100644 --- a/lib/libc/stdio/fgets.3 +++ b/lib/libc/stdio/fgets.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fgets.3,v 1.10 2000/04/18 03:01:34 aaron Exp $ +.\" $OpenBSD: fgets.3,v 1.11 2000/12/24 00:30:58 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -51,8 +51,7 @@ .Sh DESCRIPTION The .Fn fgets -function -reads at most one less than the number of characters specified by +function reads at most one less than the number of characters specified by .Xr size from the given .Fa stream @@ -67,8 +66,7 @@ character is appended to end the string. .Pp The .Fn gets -function -is equivalent to +function is equivalent to .Fn fgets with an infinite .Xr size @@ -91,8 +89,7 @@ they return .Dv NULL . The .Fn fgets -and -functions +and functions .Fn gets do not distinguish between end-of-file and error, and callers must use .Xr feof 3 @@ -190,6 +187,5 @@ use .Fn gets . The .Fn gets -function -exists purely to conform to +function exists purely to conform to .St -ansiC . diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3 index 232419f4363..7cde50b410d 100644 --- a/lib/libc/stdio/fopen.3 +++ b/lib/libc/stdio/fopen.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fopen.3,v 1.10 2000/10/18 14:33:36 aaron Exp $ +.\" $OpenBSD: fopen.3,v 1.11 2000/12/24 00:30:58 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -54,8 +54,7 @@ .Sh DESCRIPTION The .Fn fopen -function -opens the file whose name is the string pointed to by +function opens the file whose name is the string pointed to by .Fa path and associates a stream with it. .Pp @@ -134,8 +133,7 @@ is not affected in any way. .Pp The .Fn freopen -function -opens the file whose name is the string pointed to by +function opens the file whose name is the string pointed to by .Fa path and associates the stream pointed to by .Fa stream @@ -150,9 +148,7 @@ argument is used just as in the function. The primary use of the .Fn freopen -function -is to change the file associated with a -standard text stream +function is to change the file associated with a standard text stream .Pf ( Em stderr , .Em stdin , or @@ -189,32 +185,28 @@ The .Fn fdopen and .Fn freopen -functions -may also fail and set +functions may also fail and set .Va errno for any of the errors specified for the routine .Xr malloc 3 . .Pp The .Fn fopen -function -may also fail and set +function may also fail and set .Va errno for any of the errors specified for the routine .Xr open 2 . .Pp The .Fn fdopen -function -may also fail and set +function may also fail and set .Va errno for any of the errors specified for the routine .Xr fcntl 2 . .Pp The .Fn freopen -function -may also fail and set +function may also fail and set .Va errno for any of the errors specified for the routines .Xr open 2 , @@ -231,13 +223,11 @@ The .Fn fopen and .Fn freopen -functions -conform to +functions conform to .St -ansiC . The .Fn fdopen -function -conforms to +function conforms to .St -p1003.1-88 . .Sh CAVEATS Proper code using diff --git a/lib/libc/stdio/fputs.3 b/lib/libc/stdio/fputs.3 index 424ec95f8bd..dfec3f87a64 100644 --- a/lib/libc/stdio/fputs.3 +++ b/lib/libc/stdio/fputs.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fputs.3,v 1.4 2000/04/20 01:39:32 aaron Exp $ +.\" $OpenBSD: fputs.3,v 1.5 2000/12/24 00:30:58 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -69,8 +69,7 @@ to the stream .Sh RETURN VALUES The .Fn fputs -function -returns 0 on success and +function returns 0 on success and .Dv EOF on error; .Fn puts diff --git a/lib/libc/stdio/fseek.3 b/lib/libc/stdio/fseek.3 index f3827db1419..8fe9bbf7159 100644 --- a/lib/libc/stdio/fseek.3 +++ b/lib/libc/stdio/fseek.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fseek.3,v 1.7 2000/04/20 01:39:32 aaron Exp $ +.\" $OpenBSD: fseek.3,v 1.8 2000/12/24 00:30:58 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -209,8 +209,7 @@ The .Fn ftell , and .Fn rewind -functions -conform to +functions conform to .St -ansiC and .St -xpg4 . @@ -219,6 +218,5 @@ The .Fn fseeko and .Fn ftello -functions -conform to +functions conform to .St -xpg4 . diff --git a/lib/libc/stdio/getc.3 b/lib/libc/stdio/getc.3 index debba67a6e4..4d81c68a195 100644 --- a/lib/libc/stdio/getc.3 +++ b/lib/libc/stdio/getc.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getc.3,v 1.6 2000/04/20 01:39:32 aaron Exp $ +.\" $OpenBSD: getc.3,v 1.7 2000/12/24 00:30:58 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -57,8 +57,8 @@ .Sh DESCRIPTION The .Fn fgetc -function -obtains the next input character (if present) from the stream pointed at by +function obtains the next input character (if present) from the stream +pointed at by .Fa stream , or the next character pushed back on the stream via .Xr ungetc . @@ -112,8 +112,7 @@ The .Fn getc , and .Fn getchar -functions -conform to +functions conform to .St -ansiC . .Sh BUGS Since diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3 index 11b64fe3526..10a79fb84d1 100644 --- a/lib/libc/stdio/mktemp.3 +++ b/lib/libc/stdio/mktemp.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mktemp.3,v 1.24 2000/11/22 18:13:23 deraadt Exp $ +.\" $OpenBSD: mktemp.3,v 1.25 2000/12/24 00:30:58 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -86,9 +86,8 @@ should be used, though 10 is much better. .Pp The .Fn mkstemp -function -makes the same replacement to the template and creates the template file, -mode 0600, returning a file descriptor opened for reading and writing. +function makes the same replacement to the template and creates the template +file, mode 0600, returning a file descriptor opened for reading and writing. This avoids the race between testing for a file's existence and opening it for use. .Pp @@ -125,8 +124,7 @@ The .Fn mkstemp and .Fn mkdtemp -functions -may set +functions may set .Va errno to one of the following values: .Bl -tag -width Er diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index c30c43fd7ec..c9779a5f02d 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: printf.3,v 1.31 2000/08/25 17:43:15 aaron Exp $ +.\" $OpenBSD: printf.3,v 1.32 2000/12/24 00:30:59 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -624,8 +624,7 @@ The .Fn vfprintf , and .Fn vsprintf -functions -conform to +functions conform to .St -ansiC . .Sh HISTORY The functions diff --git a/lib/libc/stdio/putc.3 b/lib/libc/stdio/putc.3 index f2f30c6134e..b1d90bbdb63 100644 --- a/lib/libc/stdio/putc.3 +++ b/lib/libc/stdio/putc.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: putc.3,v 1.5 2000/04/20 01:39:32 aaron Exp $ +.\" $OpenBSD: putc.3,v 1.6 2000/12/24 00:30:59 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -88,7 +88,7 @@ function writes the specified to the named output .Fa stream . .Sh RETURN VALUES -The functions, +The functions .Fn fputc , .Fn putc , and @@ -99,8 +99,7 @@ If an error occurs, the value is returned. The .Fn putw -function -returns 0 on success; +function returns 0 on success; .Dv EOF is returned if a write error occurs, or if an attempt is made to write a read-only stream. diff --git a/lib/libc/stdio/remove.3 b/lib/libc/stdio/remove.3 index be69032d081..39b8eb29302 100644 --- a/lib/libc/stdio/remove.3 +++ b/lib/libc/stdio/remove.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: remove.3,v 1.8 1999/09/27 01:27:31 aaron Exp $ +.\" $OpenBSD: remove.3,v 1.9 2000/12/24 00:30:59 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -71,8 +71,7 @@ is set to indicate the error. .Sh ERRORS The .Fn remove -function -may fail and set +function may fail and set .Va errno for any of the errors specified for the routines .Xr rmdir 2 diff --git a/lib/libc/stdio/scanf.3 b/lib/libc/stdio/scanf.3 index 9226e6f8b0a..97c33a59fc1 100644 --- a/lib/libc/stdio/scanf.3 +++ b/lib/libc/stdio/scanf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: scanf.3,v 1.9 2000/07/31 22:20:56 pjanzen Exp $ +.\" $OpenBSD: scanf.3,v 1.10 2000/12/24 00:30:59 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -113,8 +113,7 @@ All conversions are introduced by the (percent sign) character. The .Fa format -string -may also contain other characters. +string may also contain other characters. Whitespace (such as blanks, tabs, or newlines) in the .Fa format string match any amount of whitespace, including none, in the input. @@ -333,8 +332,7 @@ a conversion, although it can be suppressed with the flag. .El .Pp -For backwards compatibility, -other conversion characters (except +For backwards compatibility, other conversion characters (except .Ql \e0 ) are taken as if they were .Ql %d @@ -345,15 +343,10 @@ and a `conversion' of causes an immediate return of .Dv EOF . .Sh RETURN VALUES -These -functions -return -the number of input items assigned, which can be fewer than provided -for, or even zero, in the event of a matching failure. -Zero -indicates that, while there was input available, -no conversions were assigned; -typically this is due to an invalid input character, +These functions return the number of input items assigned, which can be fewer +than provided for, or even zero, in the event of a matching failure. +Zero indicates that, while there was input available, no conversions were +assigned; typically this is due to an invalid input character, such as an alphabetic character for a .Ql %d conversion. diff --git a/lib/libc/stdio/ungetc.3 b/lib/libc/stdio/ungetc.3 index 852b8bede31..30f8ae7b6d8 100644 --- a/lib/libc/stdio/ungetc.3 +++ b/lib/libc/stdio/ungetc.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ungetc.3,v 1.4 2000/04/20 01:39:33 aaron Exp $ +.\" $OpenBSD: ungetc.3,v 1.5 2000/12/24 00:30:59 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -75,9 +75,7 @@ the end-of-file indicator for the stream is cleared. .Sh RETURN VALUES The .Fn ungetc -function -returns -the character pushed-back after the conversion, or +function returns the character pushed-back after the conversion, or .Dv EOF if the operation fails. If the value of the argument |