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 | |
parent | 89891a551cfa28139f6165de0c822d75e1035761 (diff) |
Various repairs, mostly to get rid of short lines.
Diffstat (limited to 'lib')
68 files changed, 410 insertions, 602 deletions
diff --git a/lib/libc/gen/alarm.3 b/lib/libc/gen/alarm.3 index c2f4bacbe43..959036b5483 100644 --- a/lib/libc/gen/alarm.3 +++ b/lib/libc/gen/alarm.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: alarm.3,v 1.7 1999/07/09 13:35:20 aaron Exp $ +.\" $OpenBSD: alarm.3,v 1.8 2000/12/24 00:30:46 aaron Exp $ .\" .\" Copyright (c) 1980, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -49,8 +49,7 @@ This interface is made obsolete by .Pp The .Fn alarm -function -waits a count of +function waits a count of .Ar seconds before asserting the terminating signal .Dv SIGALRM . diff --git a/lib/libc/gen/auth_subr.3 b/lib/libc/gen/auth_subr.3 index 7df98cef99d..8f9209f2c0e 100644 --- a/lib/libc/gen/auth_subr.3 +++ b/lib/libc/gen/auth_subr.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: auth_subr.3,v 1.1 2000/11/21 00:51:16 millert Exp $ +.\" $OpenBSD: auth_subr.3,v 1.2 2000/12/24 00:30:46 aaron Exp $ .\" .\" Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. .\" @@ -101,8 +101,8 @@ .Fn auth_setstate "auth_session_t *as" "int state" .Sh DESCRIPTION These functions provide the lower level interface to the BSD -Authentication system. They all operate on a BSD Authentication -session pointer, +Authentication system. +They all operate on a BSD Authentication session pointer, .Fa as , which is returned by .Fn auth_open . @@ -111,7 +111,7 @@ must be passed to all other BSD Authentication functions called. The .Fn auth_open function returns -.Nm NULL +.Dv NULL if it was unable to allocate memory for the session. The session is terminated by the .Fn auth_close @@ -119,9 +119,10 @@ function, which also sets any environment variables requested by the login script (assuming the user was not rejected) or removes files created by the login script if the authentication was not successful. -It returns the final state of the authentication request. A return -value of 0 implies the user was not authenticated. A non-zero return -value is made up the 1 or more of the following values ORed together: +It returns the final state of the authentication request. +A return value of 0 implies the user was not authenticated. +A non-zero return value is made up the 1 or more of the following values +ORed together: .Bl -tag -width AUTH_ROOTOKAYXX .It Li AUTH_OKAY The user was authenticated. @@ -139,8 +140,9 @@ In addition to the values above, it also may contain the bits: .Bl -tag -width AUTH_ROOTOKAYXX .It Li AUTH_SILENT Do not report an error, the user was not authenticated for access and -was not expected to be. This is returned by login scripts that allow -changing of the users password, for instance. +was not expected to be. +This is returned by login scripts that allow changing of the users password, +for instance. This value is stripped off for normal returns. .It Li AUTH_CHALLENGE The user was not authenticated for access and a challenge was issued. @@ -172,7 +174,8 @@ In addition to the pointer to the BSD Authentication session, it takes the following parameters: .Bl -tag -width indent .It Ar path -The full path name of the login script to run. The call will fail if +The full path name of the login script to run. +The call will fail if .Ar path does not pass the requirements of the .Xr secure_path 3 @@ -181,22 +184,21 @@ function. The remaining arguments, which should be of type .Ft char * and terminated with a -.Ev NULL +.Dv NULL are passed to the login script at the end of the command line. .El .Pp The .Fn auth_call -function, -after verifying the +function, after verifying the .Ar path , creates a bi-directional pipe (socketpair) which is located on -file descriptor 3 for the child (the login script). This is -known as the +file descriptor 3 for the child (the login script). +This is known as the .Dq back channel . The actual command line passed to the child is made up of 3 parts. -The parameters passed to +The parameters passed to .Fn auth_call following .Ar path @@ -220,16 +222,16 @@ The name and value are separated by an .sp Once the login script has been spawned, any data specified by the .Fn auth_setdata -is written to the back channel. Multiple blocks of data may have -been specified and they will be sent in the same order they were -specified. As the data is sent, the storage for the data is -zeroed out and then freed (the data is zeroed out since it may -contain sensitive information, such as a password). +is written to the back channel. +Multiple blocks of data may have been specified and they will be sent +in the same order they were specified. +As the data is sent, the storage for the data is zeroed out and then freed +(the data is zeroed out since it may contain sensitive information, +such as a password). Once any data is written out, .Fn auth_call -reads up to 8192 bytes of data from the back channel. The -state of the session is determined from this data -(see +reads up to 8192 bytes of data from the back channel. +The state of the session is determined from this data (see .Xr login.conf 5 for details). If the login script exits with a 0 and does not specify any return state @@ -278,7 +280,7 @@ It internally uses the .Fn auth_call function. The generated challenge is returned. -.Nm NULL +.Dv NULL is returned on error or if no challenge was generated. The challenge can also be extracted by the .Fn auth_getchallenge @@ -293,8 +295,8 @@ functions check the password expiration (change) and account expiration times. They return 0 if no change or expiration time is set for the account. They return a negative value of how many seconds have passed since -the password or account expired. In this case the state of the -session is marked with either +the password or account expired. +In this case the state of the session is marked with either .Li AUTH_PWEXPIRED or .Li AUTH_EXPIRED @@ -336,10 +338,10 @@ file. This value is not directly used by BSD Authentication, rather, it is passed to the login scripts for their possible use. .It Li AUTH_INTERACTIVE -If set to any value then the session is tagged as interactive. If -not set the session is not interactive. When the value is requested -it is always either -.Nm NULL +If set to any value then the session is tagged as interactive. +If not set the session is not interactive. +When the value is requested it is always either +.Dv NULL or .Dq True . The auth subroutines may choose to provide additional information to @@ -393,8 +395,7 @@ on .sp The .Fn auth_setdata -function -makes a copy of +function makes a copy of .Fa len bytes of data pointed to by .Fa ptr @@ -423,7 +424,7 @@ is and .Fa value is -.Li NULL +.Dv NULL then all items are cleared. .sp The @@ -435,8 +436,8 @@ be set with the value of when a script is executed by .Fn auth_call . The actual arguments to the script will be placed at the beginning -of the argument vector. For each option two arguments will be -issued: +of the argument vector. +For each option two arguments will be issued: .Li -v name=value . .sp The function @@ -446,7 +447,9 @@ If the name has already been set by .Fn auth_setitem then the .Fa pwd -argument may be NULL, else it must be the password entry to use. +argument may be +.Dv NULL , +else it must be the password entry to use. .sp The function .Fn auth_setstate diff --git a/lib/libc/gen/authenticate.3 b/lib/libc/gen/authenticate.3 index f4d872c067b..4f443166269 100644 --- a/lib/libc/gen/authenticate.3 +++ b/lib/libc/gen/authenticate.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: authenticate.3,v 1.2 2000/12/23 16:03:06 markus Exp $ +.\" $OpenBSD: authenticate.3,v 1.3 2000/12/24 00:30:46 aaron Exp $ .\" .\" Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. .\" @@ -68,11 +68,11 @@ .Fn auth_verify "auth_session_t *as" "char *style" "char *name" "..." .Sh DESCRIPTION These functions provide a simplified interface to the BSD Authentication -system +system .Pq see Xr bsd_auth 3 Ns . The .Fn auth_userokay -function provides a single function call interface. +function provides a single function call interface. Provided a user's name in .Ar name and an optional @@ -88,9 +88,11 @@ If .Ar style is not .Dv NULL -it specifies the desired style of authentication to be used. If it is +it specifies the desired style of authentication to be used. +If it is .Dv NULL -then the default style for the user is used. In this case +then the default style for the user is used. +In this case .Ar name may include the desired style by appending it to the user's name with a single colon @@ -109,7 +111,8 @@ is then .Fn auth_userokay operates in an interactive mode with the user on standard input, output, -and error. If +and error. +If .Ar password is specified, .Fn auth_userokay @@ -121,8 +124,8 @@ The .Fn auth_usercheck function operates the same as the .Fn auth_userokay -function except that it does not close the BSD Authentication session -created. Rather than returning the status of the session it returns +function except that it does not close the BSD Authentication session created. +Rather than returning the status of the session it returns a pointer to the newly created BSD Authentication session. .Pp The @@ -170,11 +173,11 @@ The string .Dq approve- will be prepended to .Ar type -if missing. +if missing. The resulting type is used to lookup an entry in the .Pa /etc/login.conf -for the user's class. If the entry is missing the generic -entry for +for the user's class. +If the entry is missing the generic entry for .Dq approve will be used. The @@ -182,7 +185,8 @@ The argument will be passed to the approval program as the name of the user. The .Ar lc -argument points to a login class structure. If it is +argument points to a login class structure. +If it is .Dv NULL then a login class structure will be looked up for the class of user @@ -193,12 +197,12 @@ function returns a value of 0 on failure to approve the user. .Pp Prior to actually calling the approval script, the account's expiration time, the associated nologin file, and existence -of the account's home directory +of the account's home directory .Po if .Li requirehome is set for this class -.Pc +.Pc are checked. Failure on any of these points causes the .Fn auth_approval @@ -234,27 +238,27 @@ The .Fn auth_verify function is a front end to the .Fn auth_call -function +function .Pq see Xr auth_subr 3 Ns . It will open a BSD Authentication session, if needed, and will set the style and user name based on the .Ar style and .Ar name -arguments, if not +arguments, if not .Dv NULL . The variable arguments are passed to .Fn auth_call via the .Fn auth_set_va_list -function +function .Pq see Xr auth_subr 3 Ns . The, possibly created, BSD Authentication session is returned. The .Fn auth_getstate or .Fn auth_close -function +function .Pq see Xr auth_subr 3 should be used to determine the outcome of the authentication request. .Pp @@ -263,12 +267,12 @@ The function takes a null terminated string pointed to by .Ar value and returns a null terminated string suitable for passing -back to a calling program on the back channel. This function -is for use by the login scripts themselves. +back to a calling program on the back channel. +This function is for use by the login scripts themselves. The string returned should be freed by .Xr free 3 when it is no longer needed. -A value of +A value of .Dv NULL is returned if no memory was available for the new copy of the string. .Sh SEE ALSO diff --git a/lib/libc/gen/basename.3 b/lib/libc/gen/basename.3 index e5c74951f33..b31ff96ec6c 100644 --- a/lib/libc/gen/basename.3 +++ b/lib/libc/gen/basename.3 @@ -24,7 +24,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: basename.3,v 1.12 2000/04/18 03:01:25 aaron Exp $ +.\" $OpenBSD: basename.3,v 1.13 2000/12/24 00:30:46 aaron Exp $ .\" .Dd August 17, 1997 .Dt BASENAME 3 @@ -39,8 +39,7 @@ .Sh DESCRIPTION The .Fn basename -function -returns the last component from the pathname pointed to by +function returns the last component from the pathname pointed to by .Ar path , deleting any trailing .Sq \&/ diff --git a/lib/libc/gen/clock.3 b/lib/libc/gen/clock.3 index 7bb73df5902..eb7b2a68d93 100644 --- a/lib/libc/gen/clock.3 +++ b/lib/libc/gen/clock.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: clock.3,v 1.4 1999/06/03 10:03:18 aaron Exp $ +.\" $OpenBSD: clock.3,v 1.5 2000/12/24 00:30:47 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -48,9 +48,8 @@ .Sh DESCRIPTION The .Fn clock -function -determines the amount of processor time used since the invocation of the -calling process, measured in +function determines the amount of processor time used since the invocation +of the calling process, measured in .Dv CLOCKS_PER_SEC Ns s. .Sh RETURN VALUES The diff --git a/lib/libc/gen/ctermid.3 b/lib/libc/gen/ctermid.3 index bed5d7a92de..87502daade2 100644 --- a/lib/libc/gen/ctermid.3 +++ b/lib/libc/gen/ctermid.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ctermid.3,v 1.4 1999/06/04 01:30:10 aaron Exp $ +.\" $OpenBSD: ctermid.3,v 1.5 2000/12/24 00:30:47 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -80,8 +80,7 @@ function conforms to .Sh BUGS By default the .Fn ctermid -function -writes all information to an internal static object. +function writes all information to an internal static object. Subsequent calls to .Fn ctermid will modify the same object. diff --git a/lib/libc/gen/dirname.3 b/lib/libc/gen/dirname.3 index 1857849f5ab..c8991d71ee1 100644 --- a/lib/libc/gen/dirname.3 +++ b/lib/libc/gen/dirname.3 @@ -24,7 +24,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: dirname.3,v 1.9 2000/04/18 03:01:25 aaron Exp $ +.\" $OpenBSD: dirname.3,v 1.10 2000/12/24 00:30:47 aaron Exp $ .\" .Dd August 17, 1997 .Dt DIRNAME 3 @@ -39,8 +39,7 @@ .Sh DESCRIPTION The .Fn dirname -function -is the converse of +function is the converse of .Xr basename 3 ; it returns a pointer to the parent directory of the pathname pointed to by .Ar path . diff --git a/lib/libc/gen/fnmatch.3 b/lib/libc/gen/fnmatch.3 index 739996aa1a3..7c02cafcb3b 100644 --- a/lib/libc/gen/fnmatch.3 +++ b/lib/libc/gen/fnmatch.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fnmatch.3,v 1.8 2000/03/24 17:16:30 millert Exp $ +.\" $OpenBSD: fnmatch.3,v 1.9 2000/12/24 00:30:47 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn fnmatch -function -matches patterns according to the globbing rules used by the shell. +function matches patterns according to the globbing rules used by the shell. It checks the string specified by the .Fa string argument to see if it matches the pattern specified by the diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3 index 7e0957e3bc1..a050fb3d8b4 100644 --- a/lib/libc/gen/fts.3 +++ b/lib/libc/gen/fts.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fts.3,v 1.16 2000/04/18 03:01:26 aaron Exp $ +.\" $OpenBSD: fts.3,v 1.17 2000/12/24 00:30:47 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -620,15 +620,13 @@ fields. .Ss FTS_SET The function .Fn fts_set -allows the user application to determine further processing for the -file +allows the user application to determine further processing for the file .Fa f of the stream .Fa ftsp . The .Fn fts_set -function -returns 0 on success or \-1 if an error occurred. +function returns 0 on success or \-1 if an error occurred. .Fa option must be set to one of the following values: .Bl -tag -width FTS_PHYSICAL @@ -698,8 +696,7 @@ was called to open .Fa ftsp . The .Fn fts_close -function -returns 0 on success or \-1 if an error occurred. +function returns 0 on success or \-1 if an error occurred. .Sh ERRORS The function .Fn fts_open diff --git a/lib/libc/gen/getcap.3 b/lib/libc/gen/getcap.3 index 2a40775d866..75a1af6269d 100644 --- a/lib/libc/gen/getcap.3 +++ b/lib/libc/gen/getcap.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getcap.3,v 1.19 2000/04/18 03:01:26 aaron Exp $ +.\" $OpenBSD: getcap.3,v 1.20 2000/12/24 00:30:47 aaron Exp $ .\" .\" Copyright (c) 1992, 1993 .\" The Regents of the University of California. All rights reserved. @@ -74,8 +74,7 @@ .Sh DESCRIPTION The .Fn cgetent -function -extracts the capability record +function extracts the capability record .Fa name from the database specified by the null-terminated file array @@ -220,8 +219,7 @@ character of the capability string literally. and .Fn cgetnext comprise a function group that provides for sequential -access of the null-terminated -array of file names, +access of the null-terminated array of file names, .Fa db_array . .Fn cgetfirst returns the first record in the database and resets the access @@ -265,15 +263,12 @@ and may be edited with standard text editors. Blank lines and lines beginning with a .Sq \&# -are comments -and ignored. +are comments and are ignored. Lines ending with a .Sq \|\e -indicate that the next line -is a continuation of the current line; the +indicate that the next line is a continuation of the current line; the .Sq \|\e -and following newline -are ignored. +and following newline are ignored. Long lines are usually continued onto several physical lines by ending each line except the last with a .Sq \|\e . diff --git a/lib/libc/gen/getcwd.3 b/lib/libc/gen/getcwd.3 index 13f9b4641b7..fdfd1753031 100644 --- a/lib/libc/gen/getcwd.3 +++ b/lib/libc/gen/getcwd.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getcwd.3,v 1.7 1999/07/09 13:35:16 aaron Exp $ +.\" $OpenBSD: getcwd.3,v 1.8 2000/12/24 00:30:47 aaron Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -104,8 +104,7 @@ into the memory referenced by .Sh ERRORS The .Fn getwd -function -will fail if: +function will fail if: .Bl -tag -width Er .It Bq Er EACCES Read or search permission was denied for a component of the pathname. @@ -131,8 +130,7 @@ plus 1. .Sh STANDARDS The .Fn getcwd -function -conforms to +function conforms to .St -ansiC . The ability to specify a null pointer and have .Fn getcwd @@ -145,7 +143,6 @@ function appeared in .Sh BUGS The .Fn getwd -function -does not do sufficient error checking and is not able to return very +function does not do sufficient error checking and is not able to return very long, but valid, paths. It is provided for compatibility. diff --git a/lib/libc/gen/getdiskbyname.3 b/lib/libc/gen/getdiskbyname.3 index 48769d8a2fc..de53187f3e3 100644 --- a/lib/libc/gen/getdiskbyname.3 +++ b/lib/libc/gen/getdiskbyname.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getdiskbyname.3,v 1.6 2000/04/18 03:01:26 aaron Exp $ +.\" $OpenBSD: getdiskbyname.3,v 1.7 2000/12/24 00:30:48 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,8 +44,7 @@ .Sh DESCRIPTION The .Fn getdiskbyname -function -takes a disk name (e.g., +function takes a disk name (e.g., .Qq rm03 ) and returns a prototype disk label describing its geometry information and the standard disk partition tables. diff --git a/lib/libc/gen/getdomainname.3 b/lib/libc/gen/getdomainname.3 index fc19c150225..922efcaa461 100644 --- a/lib/libc/gen/getdomainname.3 +++ b/lib/libc/gen/getdomainname.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getdomainname.3,v 1.17 2000/04/18 03:01:26 aaron Exp $ +.\" $OpenBSD: getdomainname.3,v 1.18 2000/12/24 00:30:48 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -47,8 +47,7 @@ .Sh DESCRIPTION The .Fn getdomainname -function -returns the YP domain name for the current processor, as +function returns the YP domain name for the current processor, as previously set by .Fn setdomainname . The parameter diff --git a/lib/libc/gen/getfsent.3 b/lib/libc/gen/getfsent.3 index cde6016b2a6..038607887a3 100644 --- a/lib/libc/gen/getfsent.3 +++ b/lib/libc/gen/getfsent.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getfsent.3,v 1.6 1999/07/09 13:35:16 aaron Exp $ +.\" $OpenBSD: getfsent.3,v 1.7 2000/12/24 00:30:48 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -59,8 +59,7 @@ The .Fn getfsspec , and .Fn getfsfile -functions -each return a pointer to an object with the following structure +functions each return a pointer to an object with the following structure containing the broken-out fields of a line in the file system description file, .Aq Pa fstab.h . @@ -90,9 +89,8 @@ The .Fn getfsspec and .Fn getfsfile -functions -search the entire file (opening it if necessary) for a matching special -file name or file system file name. +functions search the entire file (opening it if necessary) for a matching +special file name or file system file name. .Pp For programs wishing to read the entire database, .Fn getfsent @@ -112,12 +110,10 @@ functions return a null pointer on or error. The .Fn setfsent -function -returns 0 on failure or 1 on success. +function returns 0 on failure or 1 on success. The .Fn endfsent -function -returns nothing. +function returns nothing. .Sh FILES .Bl -tag -width /etc/fstab -compact .It Pa /etc/fstab @@ -139,6 +135,5 @@ and functions appeared in .Bx 4.3 . .Sh BUGS -These functions use static data storage; -if the data is needed for future use, it should be -copied before any subsequent calls overwrite it. +These functions use static data storage; if the data is needed for future use, +it should be copied before any subsequent calls overwrite it. diff --git a/lib/libc/gen/getgrent.3 b/lib/libc/gen/getgrent.3 index f7a237c106e..d2cf1a4ef43 100644 --- a/lib/libc/gen/getgrent.3 +++ b/lib/libc/gen/getgrent.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getgrent.3,v 1.9 2000/04/18 03:01:26 aaron Exp $ +.\" $OpenBSD: getgrent.3,v 1.10 2000/12/24 00:30:48 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -123,8 +123,7 @@ with an argument of zero. .Pp The .Fn endgrent -function -closes any open files. +function closes any open files. .Pp The .Fn getgrgid_r @@ -207,7 +206,7 @@ The functions .Fn getgrent , .Fn getgrnam , .Fn getgrgid , -.Fn setgroupent +.Fn setgroupent , and .Fn setgrent leave their results in an internal static object and return diff --git a/lib/libc/gen/getgrouplist.3 b/lib/libc/gen/getgrouplist.3 index eadb6ca2476..b780fdfffac 100644 --- a/lib/libc/gen/getgrouplist.3 +++ b/lib/libc/gen/getgrouplist.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getgrouplist.3,v 1.7 1999/07/09 13:35:17 aaron Exp $ +.\" $OpenBSD: getgrouplist.3,v 1.8 2000/12/24 00:30:48 aaron Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -64,8 +64,7 @@ the actual number of groups found is returned in .Sh RETURN VALUES The .Fn getgrouplist -function -returns \-1 if the size of the group list is too small to +function returns \-1 if the size of the group list is too small to hold all the user's groups. Here, the group array will be filled with as many groups as will fit. .Sh FILES @@ -84,10 +83,8 @@ function first appeared in .Sh BUGS The .Fn getgrouplist -function -uses the routines based on +function uses the routines based on .Xr getgrent 3 . If the invoking program uses any of these routines, -the group structure will -be overwritten in the call to +the group structure will be overwritten in the call to .Fn getgrouplist . diff --git a/lib/libc/gen/getmntinfo.3 b/lib/libc/gen/getmntinfo.3 index 10123bfebc3..812a011c059 100644 --- a/lib/libc/gen/getmntinfo.3 +++ b/lib/libc/gen/getmntinfo.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getmntinfo.3,v 1.8 2000/04/18 03:01:26 aaron Exp $ +.\" $OpenBSD: getmntinfo.3,v 1.9 2000/12/24 00:30:48 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -45,16 +45,14 @@ .Sh DESCRIPTION The .Fn getmntinfo -function -returns an array of +function returns an array of .Xr statfs structures describing each currently mounted file system (see .Xr statfs 2 ) . .Pp The .Fn getmntinfo -function -passes its +function passes its .Fa flags parameter transparently to .Xr getfsstat 2 . @@ -76,8 +74,7 @@ will be lost. .Sh ERRORS The .Fn getmntinfo -function -may fail and set +function may fail and set .Va errno for any of the errors specified for the library routines .Xr getfsstat 2 diff --git a/lib/libc/gen/getpwent.3 b/lib/libc/gen/getpwent.3 index 60d3f4e471a..083fc2597ea 100644 --- a/lib/libc/gen/getpwent.3 +++ b/lib/libc/gen/getpwent.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getpwent.3,v 1.14 2000/11/21 00:49:58 millert Exp $ +.\" $OpenBSD: getpwent.3,v 1.15 2000/12/24 00:30:49 aaron Exp $ .\" .\" Copyright (c) 1988, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -58,9 +58,7 @@ .Ft void .Fn endpwent void .Sh DESCRIPTION -These functions -operate on the password database file -which is described in +These functions operate on the password database file which is described in .Xr passwd 5 . Each entry in the database is defined by the structure .Li struct passwd @@ -118,8 +116,7 @@ with an argument of zero. .Pp The .Fn endpwent -function -closes any open files. +function closes any open files. .Pp These routines have been written to .Dq shadow @@ -144,8 +141,7 @@ The .Fn endpwent and .Fn setpwent -functions -have no return value. +functions have no return value. .Sh FILES .Bl -tag -width /etc/master.passwd -compact .It Pa /etc/pwd.db diff --git a/lib/libc/gen/getttyent.3 b/lib/libc/gen/getttyent.3 index 4d82c5026d0..da9355eab6c 100644 --- a/lib/libc/gen/getttyent.3 +++ b/lib/libc/gen/getttyent.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getttyent.3,v 1.7 1999/06/04 01:30:11 aaron Exp $ +.\" $OpenBSD: getttyent.3,v 1.8 2000/12/24 00:30:49 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -55,10 +55,8 @@ The .Fn getttyent and .Fn getttynam -functions -each return a pointer to an object, with the following structure, -containing the broken-out fields of a line from the tty description -file. +functions each return a pointer to an object, with the following structure, +containing the broken-out fields of a line from the tty description file. .Bd -literal struct ttyent { char *ty_name; /* terminal device name */ @@ -100,16 +98,14 @@ on this entry). .It Dv TTY_SECURE Allow users with a UID of 0 to login on this terminal. .It Dv TTY_LOCAL -If the terminal port's driver supports it, cause the line -to be treated as +If the terminal port's driver supports it, cause the line to be treated as .Dq local . .It Dv TTY_MDMBUF If the terminal port's driver supports it, use DTR/DCD hardware flow control on the line by default. .It Dv TTY_RTSCTS If the terminal port's driver supports it, use -full-duplex RTS/CTS hardware flow control on the line -by default. +full-duplex RTS/CTS hardware flow control on the line by default. .It Dv TTY_SOFTCAR If the terminal port's driver supports it, ignore hardware carrier on the line. @@ -135,8 +131,7 @@ fields. .Pp The .Fn getttyent -function -reads the next line from the ttys file, opening the file if necessary. +function reads the next line from the ttys file, opening the file if necessary. .Fn setttyent rewinds the file if open, or opens the file if it is unopened. .Fn endttyent @@ -145,8 +140,7 @@ closes any open files. .Fn getttynam searches from the beginning of the file until a matching .Fa name -is found -(or until +is found (or until .Dv EOF is encountered). .Sh RETURN VALUES @@ -159,8 +153,7 @@ return a null pointer on or error. The .Fn setttyent -function -and +function and .Fn endttyent return 0 on failure or 1 on success. .Sh FILES @@ -186,6 +179,5 @@ and functions appeared in .Bx 4.3 . .Sh BUGS -These functions use static data storage; -if the data is needed for future use, it should be -copied before any subsequent calls overwrite it. +These functions use static data storage; if the data is needed for future use, +it should be copied before any subsequent calls overwrite it. diff --git a/lib/libc/gen/getusershell.3 b/lib/libc/gen/getusershell.3 index 1d41eb1cc64..eddef978395 100644 --- a/lib/libc/gen/getusershell.3 +++ b/lib/libc/gen/getusershell.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getusershell.3,v 1.8 2000/04/18 03:01:27 aaron Exp $ +.\" $OpenBSD: getusershell.3,v 1.9 2000/12/24 00:30:49 aaron Exp $ .\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -50,8 +50,7 @@ .Sh DESCRIPTION The .Fn getusershell -function -returns a pointer to a legal user shell as defined by the +function returns a pointer to a legal user shell as defined by the system manager in the file .Pa /etc/shells . If @@ -66,8 +65,7 @@ were listed in the file. .Pp The .Fn getusershell -function -reads the next +function reads the next line (opening the file if necessary); .Fn setusershell rewinds the file; diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3 index 138e310f518..a15cd927e54 100644 --- a/lib/libc/gen/glob.3 +++ b/lib/libc/gen/glob.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: glob.3,v 1.15 2000/12/15 14:31:19 aaron Exp $ +.\" $OpenBSD: glob.3,v 1.16 2000/12/24 00:30:49 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -49,9 +49,8 @@ .Sh DESCRIPTION The .Fn glob -function -is a pathname generator that implements the rules for file name pattern -matching used by the shell. +function is a pathname generator that implements the rules for file name +pattern matching used by the shell. .Pp The include file .Aq Pa glob.h @@ -99,8 +98,7 @@ It is the caller's responsibility to create the structure pointed to by .Fa pglob . The .Fn glob -function allocates other space as needed, including the memory pointed -to by +function allocates other space as needed, including the memory pointed to by .Fa gl_pathv . .Pp The argument @@ -204,9 +202,8 @@ The following additional fields in the structure have been initialized with alternate functions for .Fn glob -to use to open, read, -and close directories and to get stat information on names found -in those directories. +to use to open, read, and close directories and to get stat information +on names found in those directories. .Bd -literal void *(*gl_opendir)(const char * name); struct dirent *(*gl_readdir)(void *); @@ -227,9 +224,7 @@ The pattern .Ql {} is left unexpanded for historical reasons. .Xr (csh 1 -does the same thing to -ease typing -of +does the same thing to ease typing of .Xr find 1 patterns.) .It Dv GLOB_MAGCHAR @@ -276,8 +271,7 @@ will try to .Dq foo/Makefile even if .Dq foo -is not a directory, resulting in a -call to +is not a directory, resulting in a call to .Fa errfunc . The error routine can suppress this action by testing for .Er ENOENT @@ -285,8 +279,7 @@ and .Er ENOTDIR ; however, the .Dv GLOB_ERR -flag will still cause an immediate -return when this happens. +flag will still cause an immediate return when this happens. .Pp If .Fa errfunc @@ -354,8 +347,7 @@ or .Ql [ , cleared if not. .It Fa gl_pathv -Contains a pointer to a null-terminated -list of matched pathnames. +Contains a pointer to a null-terminated list of matched pathnames. However, if .Fa gl_pathc is zero, the contents of @@ -396,8 +388,7 @@ are still set as specified above. .Sh EXAMPLES A rough equivalent of .Ql "ls -l *.c *.h" -can be obtained with the -following code: +can be obtained with the following code: .Bd -literal -offset indent glob_t g; @@ -431,8 +422,7 @@ and the fields .Fa gl_matchc and .Fa gl_flags -should not be used by applications striving for strict -standards conformance. +should not be used by applications striving for strict standards conformance. .Sh HISTORY The .Fn glob diff --git a/lib/libc/gen/initgroups.3 b/lib/libc/gen/initgroups.3 index 90df74914e9..611707eeaf3 100644 --- a/lib/libc/gen/initgroups.3 +++ b/lib/libc/gen/initgroups.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: initgroups.3,v 1.9 2000/04/15 11:46:02 aaron Exp $ +.\" $OpenBSD: initgroups.3,v 1.10 2000/12/24 00:30:49 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,19 +44,16 @@ .Sh DESCRIPTION The .Fn initgroups -function -uses the +function uses the .Xr getgrouplist 3 -function to calculate the supplementary group IDs for the user -specified in +function to calculate the supplementary group IDs for the user specified in .Fa name . This group list then set up for the current process using .Xr setgroups 2 . The .Fa basegid is automatically included in the group list. -Typically this value is given as -the group number from the password file. +Typically this value is given as the group number from the password file. .Pp If the groups database lists more than .Ev NGROUPS @@ -68,8 +65,7 @@ the later groups are ignored. .Sh RETURN VALUES The .Fn initgroups -function -returns \-1 if it was not invoked by the superuser. +function returns \-1 if it was not invoked by the superuser. .Sh SEE ALSO .Xr setgroups 2 , .Xr getgrouplist 3 @@ -85,7 +81,6 @@ function called by .Fn initgroups uses the routines based on .Xr getgrent 3 . -If the invoking program uses any of these routines, -the group structure will -be overwritten in the call to +If the invoking program uses any of these routines, the group structure +will be overwritten in the call to .Fn initgroups . diff --git a/lib/libc/gen/isinf.3 b/lib/libc/gen/isinf.3 index 549d08ce8aa..e3195ebc351 100644 --- a/lib/libc/gen/isinf.3 +++ b/lib/libc/gen/isinf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: isinf.3,v 1.7 1999/08/16 23:24:00 deraadt Exp $ +.\" $OpenBSD: isinf.3,v 1.8 2000/12/24 00:30:49 aaron Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -55,8 +55,7 @@ The .Fn isinf and .Fn isinff -functions -returns 1 if the number +functions return 1 if the number .Fa n is \*(If, otherwise 0. .Pp @@ -64,8 +63,7 @@ The .Fn isnan and .Fn isnanf -functions -returns 1 if the number +functions return 1 if the number .Fa n is .Dq not-a-number , diff --git a/lib/libc/gen/login_cap.3 b/lib/libc/gen/login_cap.3 index 8c6889d1365..105d853edf7 100644 --- a/lib/libc/gen/login_cap.3 +++ b/lib/libc/gen/login_cap.3 @@ -29,11 +29,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: login_cap.3,v 1.3 2000/10/18 05:12:07 aaron Exp $ +.\" $OpenBSD: login_cap.3,v 1.4 2000/12/24 00:30:50 aaron Exp $ .\" BSDI $From: login_cap.3,v 1.4 1997/11/07 16:22:27 jch Exp $ .\" .Dd July 16, 1996 -.Dt LOGIN_CAP 3 +.Dt LOGIN_CAP 3 .Os .Sh NAME .Nm login_getclass , @@ -81,15 +81,17 @@ function extracts the entry specified by .Li default if .Ar class -is NULL or the empty string) -from +is +.Dv NULL +or the empty string) from .Pa /etc/login.conf (see .Xr login.conf 5 ) . If the entry is found, a .Li login_cap_t pointer is returned. -NULL is returned if the user class is not found. +.Dv NULL +is returned if the user class is not found. When the .Li login_cap_t structure is no longer needed, is should be freed by the @@ -105,13 +107,16 @@ any of the other functions may be called. The .Fn login_getstyle -function -is used to obtain the style of authentication that should be used for +function is used to obtain the style of authentication that should be used for this user class. The .Ar style -argument may either be NULL or the desired style of authentication. -If NULL, the first available authentication style will be used. +argument may either be +.Dv NULL +or the desired style of authentication. +If +.Dv NULL , +the first available authentication style will be used. The .Ar type argument refers to the type of authentication being performed. @@ -123,13 +128,17 @@ Future releases may remove the requirement for the "auth-" prefix and add it if it is missing. If .Ar type -is NULL then only "auth" will be looked at. +is +.Dv NULL +then only "auth" will be looked at. (See .Xr login.conf 5 ) . The -.Fn login_getstyle -function will return NULL if the desired style of authentication -is not available, or if no style is available. +.Fn login_getstyle +function will return +.Dv NULL +if the desired style of authentication is not available, +or if no style is available. .Pp The .Fn login_getcapnum , @@ -158,60 +167,60 @@ if no capabilities were found for this class (typically meaning that the default class was used and the .Li /etc/login.conf file is missing). -It returns a non-zero value if +It returns a non-zero value if .Ar cap , with no value, was found, zero otherwise. .Pp The .Fn secure_path -function takes a path name and returns 0 if the path name is secure, -1 +function takes a path name and returns 0 if the path name is secure, \-1 if not. -To be secure a path must -exist, -be a regular file (and not a directory), -owned by root, -and only writable by the owner (root). +To be secure a path must exist, be a regular file (and not a direectory), +owned by root, and only writable by the owner (root). .Pp The .Fn setclasscontext function takes .Ar class , -the name of a user class, -and sets the resources defined by that class according to +the name of a user class, and sets the resources defined by that +class according to .Ar flags. Only the -.Nm LOGIN_SETPATH , -.Nm LOGIN_SETPRIORITY , -.Nm LOGIN_SETRESOURCES , +.Dv LOGIN_SETPATH , +.Dv LOGIN_SETPRIORITY , +.Dv LOGIN_SETRESOURCES , and -.Nm LOGIN_SETUMASK +.Dv LOGIN_SETUMASK bits are used. -(See +(See .Fn setusercontext below). -It returns 0 on success and -1 on failure. +It returns 0 on success and \-1 on failure. .Pp The .Fn setusercontext -function -sets the resources according to +function sets the resources according to .Ar flags . The .Ar lc -argument, if not NULL, contains the class information that should -be used. +argument, if not +.Dv NULL , +contains the class information that should be used. The .Ar pwd -argument, if not NULL, provides information about the user. +argument, if not +.Dv NULL , +provides information about the user. Both .Ar lc and .Ar pwd -cannot be NULL. +cannot be +.Dv NULL . The .Ar uid -argument is used in place of the user id contained in the +argument is used in place of the user ID contained in the .Ar pwd structure when calling .Xr setuid 2 . @@ -219,37 +228,37 @@ The various bits available to be or-ed together to make up .Ar flags are: .Bl -tag -width LOGIN_SETRESOURCESXX -.It LOGIN_SETGROUP +.It Dv LOGIN_SETGROUP Set the group id and call .Xr initgroups 3 . Requires the .Xr pwd field be specified. -.It LOGIN_SETLOGIN +.It Dv LOGIN_SETLOGIN Sets the login name by .Xr setlogin 2 . Requires the .Ar pwd field be specified. -.It LOGIN_SETPATH +.It Dv LOGIN_SETPATH Sets the .Ev PATH environment variable. -.It LOGIN_SETPRIORITY +.It Dv LOGIN_SETPRIORITY Sets the priority by .Xr setpriority 2 . -.It LOGIN_SETRESOURCES +.It Dv LOGIN_SETRESOURCES Sets the various system resources by .Xr setrlimit 2 . -.It LOGIN_SETUMASK +.It Dv LOGIN_SETUMASK Sets the umask by .Xr umask 2 . -.It LOGIN_SETUSER -Sets the user id to +.It Dv LOGIN_SETUSER +Sets the user ID to .Ar uid by .Xr setuid 2 . -.It LOGIN_SETALL +.It Dv LOGIN_SETALL Sets all of the above. .El .Sh SEE ALSO diff --git a/lib/libc/gen/pause.3 b/lib/libc/gen/pause.3 index 6f52ebb1e80..931463d0273 100644 --- a/lib/libc/gen/pause.3 +++ b/lib/libc/gen/pause.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pause.3,v 1.7 1999/07/09 13:35:18 aaron Exp $ +.\" $OpenBSD: pause.3,v 1.8 2000/12/24 00:30:50 aaron Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -49,12 +49,9 @@ Pause is made obsolete by .Pp The .Fn pause -function -forces a process to pause until -a signal is received from either the +function forces a process to pause until a signal is received from either the .Xr kill 2 -function -or an interval timer +function or an interval timer (see .Xr setitimer 2 ) . .Pp @@ -83,6 +80,5 @@ The call was interrupted. .Sh HISTORY A .Fn pause -syscall -appeared in +syscall appeared in .At v6 . diff --git a/lib/libc/gen/popen.3 b/lib/libc/gen/popen.3 index a3d0ccdec10..7f30016ee18 100644 --- a/lib/libc/gen/popen.3 +++ b/lib/libc/gen/popen.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: popen.3,v 1.8 1999/08/31 16:52:34 aaron Exp $ +.\" $OpenBSD: popen.3,v 1.9 2000/12/24 00:30:50 aaron Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -50,9 +50,7 @@ The .Fn popen function .Dq opens -a process by creating a pipe, -forking, -and invoking the shell. +a process by creating a pipe, forking, and invoking the shell. Since a pipe is by definition unidirectional, the .Fa type argument may specify only reading or writing, not both; @@ -103,9 +101,8 @@ streams are fully buffered by default. .Pp The .Fn pclose -function waits for the associated process to terminate -and returns the exit status of the command -as returned by +function waits for the associated process to terminate and returns the +exit status of the command as returned by .Xr wait4 2 . .Sh RETURN VALUES The @@ -121,8 +118,7 @@ or if it cannot allocate memory. .Pp The .Fn pclose -function -returns \-1 if +function returns \-1 if .Fa stream is not associated with a .Dq popened @@ -161,9 +157,8 @@ The latter can be avoided by calling before .Fn popen . .Pp -Failure to execute the shell -is indistinguishable from the shell's failure to execute command, -or an immediate exit of the command. +Failure to execute the shell is indistinguishable from the shell's +failure to execute command, or an immediate exit of the command. The only hint is an exit status of 127. .Pp The diff --git a/lib/libc/gen/pw_dup.3 b/lib/libc/gen/pw_dup.3 index 90905f28d94..2334ce4244b 100644 --- a/lib/libc/gen/pw_dup.3 +++ b/lib/libc/gen/pw_dup.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pw_dup.3,v 1.1 2000/11/21 00:49:58 millert Exp $ +.\" $OpenBSD: pw_dup.3,v 1.2 2000/12/24 00:30:50 aaron Exp $ .\" .\" Copyright (c) 2000 Todd C. Miller <Todd.Miller@courtesan.com> .\" All rights reserved. @@ -40,8 +40,8 @@ The .Fn pw_dup function allocates sufficient memory for a copy of the struct passwd .Fa pw , -does the copy, and returns a pointer to it. This is useful as -subsequent calls to +does the copy, and returns a pointer to it. +This is useful as subsequent calls to .Fn getpwent , .Fn getpwnam , and diff --git a/lib/libc/gen/raise.3 b/lib/libc/gen/raise.3 index ada56aa4dc0..26dc7fdcf1e 100644 --- a/lib/libc/gen/raise.3 +++ b/lib/libc/gen/raise.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: raise.3,v 1.4 1999/06/03 10:03:22 aaron Exp $ +.\" $OpenBSD: raise.3,v 1.5 2000/12/24 00:30:50 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -59,8 +59,7 @@ is set to indicate the error. .Sh ERRORS The .Fn raise -function -may fail and set +function may fail and set .Va errno for any of the errors specified for the library functions @@ -72,6 +71,5 @@ and .Sh STANDARDS The .Fn raise -function -conforms to +function conforms to .St -ansiC . diff --git a/lib/libc/gen/readpassphrase.3 b/lib/libc/gen/readpassphrase.3 index 4d7018759a0..8880dd8bf88 100644 --- a/lib/libc/gen/readpassphrase.3 +++ b/lib/libc/gen/readpassphrase.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: readpassphrase.3,v 1.1 2000/11/21 00:48:37 millert Exp $ +.\" $OpenBSD: readpassphrase.3,v 1.2 2000/12/24 00:30:50 aaron Exp $ .\" .\" Copyright (c) 2000 Todd C. Miller <Todd.Miller@courtesan.com> .\" All rights reserved. @@ -46,7 +46,8 @@ and the flag is not set, .Fn readpassphrase displays the prompt on the standard error output and reads from the standard -input. In this case it is generally not possible to turn off echo. +input. +In this case it is generally not possible to turn off echo. .Pp Up to .Fa bufsiz @@ -74,14 +75,14 @@ space. .Sh RETURN VALUES On success, .Fn readpassphrase -returns a pointer to the NUL-terminated passphrase. If the +returns a pointer to the null-terminated passphrase. +If the .Dv RPP_REQUIRE_TTY flag is set and .Pa /dev/tty is inaccessible, .Fn readpassphrase -returns the -.Dv NULL pointer. +returns a null pointer. .Sh EXAMPLES The following code fragment will read a passphrase from .Pa /dev/tty diff --git a/lib/libc/gen/scandir.3 b/lib/libc/gen/scandir.3 index e53d4d48b9d..d252aa30991 100644 --- a/lib/libc/gen/scandir.3 +++ b/lib/libc/gen/scandir.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: scandir.3,v 1.6 1999/07/09 13:35:18 aaron Exp $ +.\" $OpenBSD: scandir.3,v 1.7 2000/12/24 00:30:51 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn scandir -function -reads the directory +function reads the directory .Fa dirname and builds an array of pointers to directory entries using @@ -84,8 +83,7 @@ the array is not sorted. .Pp The .Fn alphasort -function -is a routine which can be used for the +function is a routine which can be used for the .Fa compar parameter to sort the array alphabetically. .Pp diff --git a/lib/libc/gen/setjmp.3 b/lib/libc/gen/setjmp.3 index 87e828a0a92..33ceb09bcaf 100644 --- a/lib/libc/gen/setjmp.3 +++ b/lib/libc/gen/setjmp.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: setjmp.3,v 1.10 2000/04/18 03:01:27 aaron Exp $ +.\" $OpenBSD: setjmp.3,v 1.11 2000/12/24 00:30:51 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -128,8 +128,7 @@ function pairs save and restore only the register set and the stack (see .Pp The .Fn sigsetjmp Ns / Ns Fn siglongjmp -function -pairs save and restore the signal mask if the argument +function pairs save and restore the signal mask if the argument .Fa savemask is non-zero. Otherwise, only the register set and the stack are saved. diff --git a/lib/libc/gen/setmode.3 b/lib/libc/gen/setmode.3 index 40919580d65..d3d991422ab 100644 --- a/lib/libc/gen/setmode.3 +++ b/lib/libc/gen/setmode.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: setmode.3,v 1.7 2000/01/22 02:30:41 aaron Exp $ +.\" $OpenBSD: setmode.3,v 1.8 2000/12/24 00:30:51 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -47,8 +47,7 @@ .Sh DESCRIPTION The .Fn getmode -function -returns a copy of the file permission bits +function returns a copy of the file permission bits .Fa mode as altered by the values pointed to by .Fa set . @@ -57,8 +56,7 @@ may be examined. .Pp The .Fn setmode -function -takes an absolute (octal) or symbolic value, as described in +function takes an absolute (octal) or symbolic value, as described in .Xr chmod 1 , as an argument and returns a pointer to mode values to be supplied to @@ -91,11 +89,9 @@ returns. .Sh ERRORS The .Fn setmode -function -may fail and set +function may fail and set .Va errno -for any of the errors specified for the library -routine +for any of the errors specified for the library routine .Xr malloc 3 . .Sh SEE ALSO .Xr chmod 1 , diff --git a/lib/libc/gen/setproctitle.3 b/lib/libc/gen/setproctitle.3 index 6cee2e43e93..34958aee0c6 100644 --- a/lib/libc/gen/setproctitle.3 +++ b/lib/libc/gen/setproctitle.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: setproctitle.3,v 1.11 2000/08/25 17:43:14 aaron Exp $ +.\" $OpenBSD: setproctitle.3,v 1.12 2000/12/24 00:30:51 aaron Exp $ .\" .\" Copyright (c) 1994, 1995 Christopher G. Demetriou .\" All rights reserved. @@ -74,10 +74,10 @@ The function first appeared in .Nx 0.9a . .Sh CAVEATS -It is important to never pass a string with user-supplied data as a +It is important to never pass a string with user-supplied data as a format without using .Ql %s . -An attacker can put format specifiers in the string to mangle your stack, +An attacker can put format specifiers in the string to mangle your stack, leading to a possible security hole. This holds true even if you have built the string .Dq by hand diff --git a/lib/libc/gen/siginterrupt.3 b/lib/libc/gen/siginterrupt.3 index f4b204b971e..08e4d7afe33 100644 --- a/lib/libc/gen/siginterrupt.3 +++ b/lib/libc/gen/siginterrupt.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: siginterrupt.3,v 1.9 1999/09/27 02:00:13 aaron Exp $ +.\" $OpenBSD: siginterrupt.3,v 1.10 2000/12/24 00:30:51 aaron Exp $ .\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,8 +44,7 @@ .Sh DESCRIPTION The .Fn siginterrupt -function -is used to change the system call restart +function is used to change the system call restart behavior when a system call is interrupted by the specified signal. If .Fa flag diff --git a/lib/libc/gen/strtofflags.3 b/lib/libc/gen/strtofflags.3 index ec6cf62f85d..6b02ebb4bfc 100644 --- a/lib/libc/gen/strtofflags.3 +++ b/lib/libc/gen/strtofflags.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: strtofflags.3,v 1.2 2000/07/19 20:37:40 aaron Exp $ +.\" $OpenBSD: strtofflags.3,v 1.3 2000/12/24 00:30:51 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -85,8 +85,7 @@ is left pointing to the offending token. .Sh ERRORS The .Fn fflagstostr -function -may fail and set +function may fail and set .Va errno for any of the errors specified for the library routine .Xr malloc 3 . diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3 index 5f5ec0549a5..bc37632c15b 100644 --- a/lib/libc/gen/sysctl.3 +++ b/lib/libc/gen/sysctl.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sysctl.3,v 1.58 2000/12/21 01:14:13 itojun Exp $ +.\" $OpenBSD: sysctl.3,v 1.59 2000/12/24 00:30:52 aaron Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -723,8 +723,9 @@ The default value is 60 seconds. Returns 1 if Path MTU Discovery is enabled. .It Li ip.mtudisctimeout Returns the number of seconds in which a route added by the Path MTU -Discovery engine will time out. When the route times out, the Path -MTU Discovery engine will attempt to probe a larger path MTU. +Discovery engine will time out. +When the route times out, the Path MTU Discovery engine will attempt +to probe a larger path MTU. .It Li ipip.allow If set to 0, incoming IP-in-IP packets will not be processed. If set to any other value, processing will occur. diff --git a/lib/libc/gen/syslog.3 b/lib/libc/gen/syslog.3 index a99b14a357b..4737782e99c 100644 --- a/lib/libc/gen/syslog.3 +++ b/lib/libc/gen/syslog.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: syslog.3,v 1.9 2000/08/25 17:43:14 aaron Exp $ +.\" $OpenBSD: syslog.3,v 1.10 2000/12/24 00:30:52 aaron Exp $ .\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -57,8 +57,7 @@ .Sh DESCRIPTION The .Fn syslog -function -writes +function writes .Fa message to the system message logger. The message is then written to the system console, log files, @@ -78,8 +77,7 @@ A trailing newline is added if none is present. .Pp The .Fn vsyslog -function -is an alternate form in which the arguments have already been captured +function is an alternate form in which the arguments have already been captured using the variable-length argument facilities of .Xr varargs 3 . .Pp @@ -119,9 +117,7 @@ normally of use only when debugging a program. .Pp The .Fn openlog -function -provides for more specialized processing of the messages sent -by +function provides for more specialized processing of the messages sent by .Fn syslog and .Fn vsyslog . @@ -215,13 +211,11 @@ through .Pp The .Fn closelog -function -can be used to close the log file. +function can be used to close the log file. .Pp The .Fn setlogmask -function -sets the log priority mask to +function sets the log priority mask to .Fa maskpri and returns the previous mask. Calls to diff --git a/lib/libc/gen/time.3 b/lib/libc/gen/time.3 index b5cd88080e6..eb02139ee9b 100644 --- a/lib/libc/gen/time.3 +++ b/lib/libc/gen/time.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: time.3,v 1.7 1999/07/31 03:55:49 deraadt Exp $ +.\" $OpenBSD: time.3,v 1.8 2000/12/24 00:30:52 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn time -function -returns the value of time in seconds since 0 hours, 0 minutes, +function returns the value of time in seconds since 0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal Time (UTC). .Pp A copy of the time value may be saved to the area indicated by the diff --git a/lib/libc/gen/times.3 b/lib/libc/gen/times.3 index eea2c3c513a..934ffc351bd 100644 --- a/lib/libc/gen/times.3 +++ b/lib/libc/gen/times.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: times.3,v 1.7 1999/07/09 13:35:19 aaron Exp $ +.\" $OpenBSD: times.3,v 1.8 2000/12/24 00:30:52 aaron Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -119,8 +119,7 @@ to indicate the error. .Sh ERRORS The .Fn times -function -may fail and set the global variable +function may fail and set the global variable .Va errno for any of the errors specified for the library routines @@ -135,6 +134,5 @@ and .Sh STANDARDS The .Fn times -function -conforms to +function conforms to .St -p1003.1-88 . diff --git a/lib/libc/gen/ttyname.3 b/lib/libc/gen/ttyname.3 index 0dca816732b..a8fa5afda3f 100644 --- a/lib/libc/gen/ttyname.3 +++ b/lib/libc/gen/ttyname.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ttyname.3,v 1.11 2000/04/18 03:01:28 aaron Exp $ +.\" $OpenBSD: ttyname.3,v 1.12 2000/12/24 00:30:52 aaron Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -68,8 +68,7 @@ in the initialization file .Pp The .Fn isatty -function -determines if the file descriptor +function determines if the file descriptor .Fa fd refers to a valid terminal type device. @@ -78,9 +77,7 @@ The .Fn ttyname and .Fn ttyname_r -functions -get the related device name of -a file descriptor for which +functions get the related device name of a file descriptor for which .Fn isatty is true. The @@ -100,8 +97,7 @@ The maximum length of the terminal name is .Pp The .Fn ttyslot -function -fetches the current process's control terminal number from the +function fetches the current process's control terminal number from the .Xr ttys 5 file entry. .Sh RETURN VALUES @@ -109,8 +105,7 @@ The .Fn ttyname and .Fn ttyname_r -functions return the null-terminated -name if the device is found and +functions return the null-terminated name if the device is found and .Fn isatty is true; otherwise a null pointer is returned and @@ -127,8 +122,7 @@ is set to indicate the error. .Pp The .Fn ttyslot -function -returns the unit number of the device file if found; otherwise +function returns the unit number of the device file if found; otherwise the value zero is returned. .Sh ERRORS The @@ -166,8 +160,7 @@ The .Fn ttyname , and .Fn ttyslot -functions -appeared in +functions appeared in .At v7 . The .Fn ttyname_r diff --git a/lib/libc/gen/ualarm.3 b/lib/libc/gen/ualarm.3 index f802b55d260..24402474b9b 100644 --- a/lib/libc/gen/ualarm.3 +++ b/lib/libc/gen/ualarm.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ualarm.3,v 1.12 2000/03/14 21:31:45 aaron Exp $ +.\" $OpenBSD: ualarm.3,v 1.13 2000/12/24 00:30:53 aaron Exp $ .\" .\" Copyright (c) 1986, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -49,8 +49,7 @@ This is a simplified interface to .Pp The .Fn ualarm -function -waits a count of +function waits a count of .Fa microseconds before asserting the terminating signal .Dv SIGALRM . diff --git a/lib/libc/gen/unvis.3 b/lib/libc/gen/unvis.3 index 663b6f8331f..f64431e48f5 100644 --- a/lib/libc/gen/unvis.3 +++ b/lib/libc/gen/unvis.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: unvis.3,v 1.11 2000/04/18 03:01:28 aaron Exp $ +.\" $OpenBSD: unvis.3,v 1.12 2000/12/24 00:30:53 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -49,12 +49,10 @@ The .Fn unvis and .Fn strunvis -functions -are used to decode a visual representation of characters, as produced -by the +functions are used to decode a visual representation of characters, +as produced by the .Xr vis 3 -function, back into -the original form. +function, back into the original form. .Fn unvis is called with successive characters in .Fa c @@ -71,8 +69,7 @@ into the buffer pointed to by .Pp The .Fn strunvis -function -simply copies +function simply copies .Fa src to .Fa dst , @@ -90,8 +87,7 @@ equal to the size of .Pp The .Fn unvis -function -implements a state machine that can be used to decode an arbitrary +function implements a state machine that can be used to decode an arbitrary stream of bytes. All state associated with the bytes being decoded is stored outside the .Fn unvis @@ -105,8 +101,7 @@ with each successive byte, along with a pointer to this integer, and a pointer to a destination character. The .Fn unvis -function -has several return codes that must be handled properly. +function has several return codes that must be handled properly. They are: .Bl -tag -width UNVIS_VALIDPUSH .It Li \&0 (zero) diff --git a/lib/libc/gen/usleep.3 b/lib/libc/gen/usleep.3 index a5a8b8e5f0d..8df5975f40d 100644 --- a/lib/libc/gen/usleep.3 +++ b/lib/libc/gen/usleep.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: usleep.3,v 1.11 1999/08/31 16:52:34 aaron Exp $ +.\" $OpenBSD: usleep.3,v 1.12 2000/12/24 00:30:53 aaron Exp $ .\" .\" Copyright (c) 1986, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,9 +44,7 @@ .Sh DESCRIPTION The .Fn usleep -function -suspends execution of the calling process -for +function suspends execution of the calling process for .Fa microseconds microseconds of time. System activity or time spent in processing the diff --git a/lib/libc/gen/utime.3 b/lib/libc/gen/utime.3 index 64144d2232e..c24fa6c944f 100644 --- a/lib/libc/gen/utime.3 +++ b/lib/libc/gen/utime.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: utime.3,v 1.13 2000/04/18 03:01:28 aaron Exp $ +.\" $OpenBSD: utime.3,v 1.14 2000/12/24 00:30:53 aaron Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -147,6 +147,5 @@ function appeared in .Sh STANDARDS The .Fn utime -function -conforms to +function conforms to .St -p1003.1-88 . diff --git a/lib/libc/gen/valloc.3 b/lib/libc/gen/valloc.3 index 3b22ff48113..f18ac2fd93e 100644 --- a/lib/libc/gen/valloc.3 +++ b/lib/libc/gen/valloc.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: valloc.3,v 1.8 1999/07/09 13:35:20 aaron Exp $ +.\" $OpenBSD: valloc.3,v 1.9 2000/12/24 00:30:53 aaron Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -73,5 +73,4 @@ function appeared in .Sh BUGS A .Fn vfree -function -has not been implemented. +function has not been implemented. diff --git a/lib/libc/gen/vis.3 b/lib/libc/gen/vis.3 index 96b6996c290..0f105183dd6 100644 --- a/lib/libc/gen/vis.3 +++ b/lib/libc/gen/vis.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: vis.3,v 1.13 2000/11/21 00:47:28 millert Exp $ +.\" $OpenBSD: vis.3,v 1.14 2000/12/24 00:30:53 aaron Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -53,8 +53,7 @@ .Sh DESCRIPTION The .Fn vis -function -copies into +function copies into .Fa dst a string which represents the character .Fa c . diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3 index 747f62b33b9..01bfb3cef88 100644 --- a/lib/libc/net/getaddrinfo.3 +++ b/lib/libc/net/getaddrinfo.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getaddrinfo.3,v 1.12 2000/08/13 07:23:48 deraadt Exp $ +.\" $OpenBSD: getaddrinfo.3,v 1.13 2000/12/24 00:30:54 aaron Exp $ .\" $KAME: getaddrinfo.3,v 1.22 2000/08/09 21:16:17 itojun Exp $ .\" .\" Copyright (c) 1983, 1987, 1991, 1993 @@ -258,7 +258,7 @@ Here are pitfall cases you may encounter: .Bl -bullet .It .Fn getaddrinfo -will raise error if members in +will raise error if members in .Fa hints structure is not consistent. For example, for internet address families, diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3 index f1353288c51..94a848eecc8 100644 --- a/lib/libc/net/gethostbyname.3 +++ b/lib/libc/net/gethostbyname.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: gethostbyname.3,v 1.15 2000/04/18 03:01:31 aaron Exp $ +.\" $OpenBSD: gethostbyname.3,v 1.16 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1987, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -68,10 +68,8 @@ The .Fn gethostbyname and .Fn gethostbyaddr -functions -each return a pointer to an object with the -following structure describing an internet host -referenced by name or by address, respectively. +functions each return a pointer to an object with the following structure +describing an internet host referenced by name or by address, respectively. This structure contains either information obtained from the name server (i.e., .Xr resolver 3 and @@ -140,8 +138,7 @@ The only address family currently supported is .Pp The .Fn sethostent -function -may be used to request the use of a connected +function may be used to request the use of a connected .Tn TCP socket for queries. If the @@ -159,8 +156,7 @@ datagrams. .Pp The .Fn endhostent -function -closes the +function closes the .Tn TCP connection. .Pp @@ -239,13 +235,11 @@ re-opening the file if necessary. .Pp The .Fn sethostent -function -opens and/or rewinds the file +function opens and/or rewinds the file .Pa /etc/hosts . If the .Fa stayopen -argument is non-zero, -the file will not be closed after each call to +argument is non-zero, the file will not be closed after each call to .Fn gethostbyname , .Fn gethostbyname2 , or @@ -253,8 +247,7 @@ or .Pp The .Fn endhostent -function -closes the file. +function closes the file. .Sh HISTORY The .Fn herror diff --git a/lib/libc/net/getnetent.3 b/lib/libc/net/getnetent.3 index 3227f39b064..0c401c74ffe 100644 --- a/lib/libc/net/getnetent.3 +++ b/lib/libc/net/getnetent.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getnetent.3,v 1.10 2000/12/17 21:30:38 millert Exp $ +.\" $OpenBSD: getnetent.3,v 1.11 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -59,11 +59,8 @@ The .Fn getnetbyname , and .Fn getnetbyaddr -functions -each return a pointer to an object with the -following structure -containing the broken-out -fields of a line in the network database, +functions each return a pointer to an object with the following structure +containing the broken-out fields of a line in the network database, .Pa /etc/networks . .Bd -literal -offset indent struct netent { @@ -90,13 +87,11 @@ Network numbers are returned in machine byte order. .Pp The .Fn getnetent -function -reads the next line of the file, opening the file if necessary. +function reads the next line of the file, opening the file if necessary. .Pp The .Fn setnetent -function -opens and rewinds the file. +function opens and rewinds the file. If the .Fa stayopen flag is non-zero, @@ -107,15 +102,13 @@ or .Pp The .Fn endnetent -function -closes the file. +function closes the file. .Pp The .Fn getnetbyname -function and .Fn getnetbyaddr -search the domain name server if the system is configured to use one. +functions search the domain name server if the system is configured to use one. If the search fails, or no name server is configured, they sequentially search from the beginning of the file until a matching net name or net address and type is found, or until @@ -127,8 +120,7 @@ Network numbers are supplied in host order. .It Pa /etc/networks .El .Sh DIAGNOSTICS -Null pointer -(0) returned on +Null pointer (0) returned on .Dv EOF or error. .Sh SEE ALSO diff --git a/lib/libc/net/getprotoent.3 b/lib/libc/net/getprotoent.3 index 4d1e96e6150..1f955295320 100644 --- a/lib/libc/net/getprotoent.3 +++ b/lib/libc/net/getprotoent.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getprotoent.3,v 1.7 2000/12/17 21:30:38 millert Exp $ +.\" $OpenBSD: getprotoent.3,v 1.8 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -59,11 +59,8 @@ The .Fn getprotobyname , and .Fn getprotobynumber -functions -each return a pointer to an object with the -following structure -containing the broken-out -fields of a line in the network protocol database, +functions each return a pointer to an object with the following structure +containing the broken-out fields of a line in the network protocol database, .Pa /etc/protocols . .Bd -literal -offset indent .Pp @@ -86,13 +83,11 @@ The protocol number. .Pp The .Fn getprotoent -function -reads the next line of the file, opening the file if necessary. +function reads the next line of the file, opening the file if necessary. .Pp The .Fn setprotoent -function -opens and rewinds the file. +function opens and rewinds the file. If the .Fa stayopen flag is non-zero, @@ -103,24 +98,18 @@ or .Pp The .Fn endprotoent -function -closes the file. +function closes the file. .Pp The .Fn getprotobyname -function and .Fn getprotobynumber -sequentially search from the beginning -of the file until a matching -protocol name or -protocol number is found, -or until +functions sequentially search from the beginning of the file until a +matching protocol name or protocol number is found, or until .Dv EOF is encountered. .Sh RETURN VALUES -Null pointer -(0) returned on +Null pointer (0) returned on .Dv EOF or error. .Sh FILES @@ -140,7 +129,6 @@ and functions appeared in .Bx 4.2 . .Sh BUGS -These functions use a static data space; -if the data is needed for future use, it should be -copied before any subsequent calls overwrite it. +These functions use a static data space; if the data is needed for future use, +it should be copied before any subsequent calls overwrite it. Only the Internet protocols are currently understood. diff --git a/lib/libc/net/getservent.3 b/lib/libc/net/getservent.3 index 81ebc40cad3..85e0d65352d 100644 --- a/lib/libc/net/getservent.3 +++ b/lib/libc/net/getservent.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getservent.3,v 1.10 2000/12/17 21:30:38 millert Exp $ +.\" $OpenBSD: getservent.3,v 1.11 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -59,11 +59,8 @@ The .Fn getservbyname , and .Fn getservbyport -functions -each return a pointer to an object with the -following structure -containing the broken-out -fields of a line in the network services database, +functions each return a pointer to an object with the following structure +containing the broken-out fields of a line in the network services database, .Pa /etc/services . .Bd -literal -offset indent struct servent { @@ -84,19 +81,16 @@ A zero-terminated list of alternate names for the service. The port number at which the service resides. Port numbers are returned in network byte order. .It Fa s_proto -The name of the protocol to use when contacting the -service. +The name of the protocol to use when contacting the service. .El .Pp The .Fn getservent -function -reads the next line of the file, opening the file if necessary. +function reads the next line of the file, opening the file if necessary. .Pp The .Fn setservent -function -opens and rewinds the file. +function opens and rewinds the file. If the .Fa stayopen flag is non-zero, @@ -107,19 +101,15 @@ or .Pp The .Fn endservent -function -closes the file. +function closes the file. .Pp The .Fn getservbyname and .Fn getservbyport -functions -sequentially search from the beginning -of the file until a matching -protocol name or -port number (specified in network byte order) is found, -or until +functions sequentially search from the beginning of the file until a +matching protocol name or port number (specified in network byte order) +is found, or until .Dv EOF is encountered. If a protocol name is also supplied (non-null), @@ -129,8 +119,7 @@ searches must also match the protocol. .It Pa /etc/services .El .Sh DIAGNOSTICS -Null pointer -(0) returned on +Null pointer (0) returned on .Dv EOF or error. .Sh SEE ALSO @@ -147,7 +136,6 @@ and functions appeared in .Bx 4.2 . .Sh BUGS -These functions use static data storage; -if the data is needed for future use, it should be -copied before any subsequent calls overwrite it. +These functions use static data storage; if the data is needed for future use, +it should be copied before any subsequent calls overwrite it. Expecting port numbers to fit in a 32-bit quantity is probably naive. diff --git a/lib/libc/net/rcmd.3 b/lib/libc/net/rcmd.3 index 89457ab8592..683f27a4af6 100644 --- a/lib/libc/net/rcmd.3 +++ b/lib/libc/net/rcmd.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rcmd.3,v 1.22 2000/12/21 22:59:53 deraadt Exp $ +.\" $OpenBSD: rcmd.3,v 1.23 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -62,8 +62,7 @@ .Sh DESCRIPTION The .Fn rcmd -function -is used by the superuser to execute a command on a remote +function is used by the superuser to execute a command on a remote machine using an authentication scheme based on reserved port numbers. If the calling process is not setuid, the @@ -92,8 +91,7 @@ The .Fn rresvport and .Fn rresvport_af -functions -return a descriptor to a socket +functions return a descriptor to a socket with an address in the privileged port space. The .Fn iruserok @@ -112,8 +110,7 @@ is an address family independent variant of .Pp The .Fn rcmd -function -looks up the host +function looks up the host .Fa *ahost using .Xr gethostbyname 3 , @@ -245,16 +242,14 @@ and .Sh DIAGNOSTICS The .Fn rcmd -function -returns a valid socket descriptor on success. +function returns a valid socket descriptor on success. It returns \-1 on error and prints a diagnostic message on the standard error. .Pp The .Fn rresvport and .Fn rresvport_af -functions -return a valid, bound socket descriptor on success. +functions return a valid, bound socket descriptor on success. It returns \-1 on error with the global value .Va errno set according to the reason for failure. diff --git a/lib/libc/net/rcmdsh.3 b/lib/libc/net/rcmdsh.3 index 29a1e4cf63d..e0c59efb852 100644 --- a/lib/libc/net/rcmdsh.3 +++ b/lib/libc/net/rcmdsh.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rcmdsh.3,v 1.7 2000/02/23 17:28:25 aaron Exp $ +.\" $OpenBSD: rcmdsh.3,v 1.8 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,10 +44,8 @@ .Sh DESCRIPTION The .Fn rcmdsh -function -is used by normal users to execute a command on -a remote machine using an authentication scheme based -on reserved port numbers using +function is used by normal users to execute a command on a remote machine +using an authentication scheme based on reserved port numbers using .Xr rshd 8 or the value of .Fa rshprog @@ -55,17 +53,15 @@ or the value of .Pp The .Fn rcmdsh -function -looks up the host +function looks up the host .Fa *ahost using .Xr gethostbyname 3 , returning \-1 if the host does not exist. Otherwise .Fa *ahost -is set to the standard name of the host -and a connection is established to a server -residing at the well-known Internet port +is set to the standard name of the host and a connection is established to +a server residing at the well-known Internet port .Li shell/tcp (or whatever port is used by .Fa rshprog ) . @@ -74,8 +70,7 @@ The parameter is ignored; it is only included to provide an interface similar to .Xr rcmd 3 . .Pp -If the connection succeeds, -a socket in the +If the connection succeeds, a socket in the .Tn UNIX domain of type .Dv SOCK_STREAM @@ -84,8 +79,7 @@ command as stdin and stdout, and stderr. .Sh DIAGNOSTICS The .Fn rcmdsh -function -returns a valid socket descriptor on success. +function returns a valid socket descriptor on success. It returns \-1 on error and prints a diagnostic message on the standard error. .Sh SEE ALSO .Xr rsh 1 , diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3 index 9b2471d823f..a5f956f90da 100644 --- a/lib/libc/net/resolver.3 +++ b/lib/libc/net/resolver.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: resolver.3,v 1.13 2000/01/03 11:51:08 itojun Exp $ +.\" $OpenBSD: resolver.3,v 1.14 2000/12/24 00:30:57 aaron Exp $ .\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -108,8 +108,7 @@ Global configuration and state information that is used by the resolver routines is kept in the structure .Li _res . Most of the values have reasonable defaults and can be ignored. -Options -stored in +Options stored in .Li _res.options are defined in .Aq Pa resolv.h @@ -142,8 +141,7 @@ Used with .Dv RES_USEVC to keep the .Tn TCP -connection open between -queries. +connection open between queries. This is useful only in programs that regularly do many queries. .Tn UDP should be the normal mode used. @@ -180,12 +178,10 @@ The option is not meaningful on .Pp The .Fn res_init -routine -reads the configuration file (if any; see +routine reads the configuration file (if any; see .Xr resolv.conf 5 ) -to get the default domain name, -search list and -the Internet address of the local name server(s). +to get the default domain name, search list, and the Internet address +of the local name server(s). If no server is configured, the host running the resolver is tried. The current domain name is defined by the hostname @@ -235,8 +231,7 @@ The .Fn res_search routine makes a query and awaits a response like .Fn res_query , -but in addition, it implements the default and search rules -controlled by the +but in addition, it implements the default and search rules controlled by the .Dv RES_DEFNAMES and .Dv RES_DNSRCH @@ -247,11 +242,9 @@ The remaining routines are lower-level routines used by .Fn res_query . The .Fn res_mkquery -function -constructs a standard query message and places it in +function constructs a standard query message and places it in .Fa buf . -It returns the size of the query, or \-1 if the query is -larger than +It returns the size of the query, or \-1 if the query is larger than .Fa buflen . The query type .Fa op @@ -266,21 +259,18 @@ is currently unused but is intended for making update messages. .Pp The .Fn res_send -routine -sends a pre-formatted query and returns an answer. +routine sends a pre-formatted query and returns an answer. It will call .Fn res_init if .Dv RES_INIT is not set, send the query to the local name server, and handle timeouts and retries. -The length of the reply message is returned, or -\-1 if there were errors. +The length of the reply message is returned, or \-1 if there were errors. .Pp The .Fn dn_comp -function -compresses the domain name +function compresses the domain name .Fa exp_dn and stores it in .Fa comp_dn . @@ -289,8 +279,7 @@ The size of the array pointed to by .Fa comp_dn is given by .Fa length . -The compression uses -an array of pointers +The compression uses an array of pointers .Fa dnptrs to previously compressed names in the current message. The first pointer points @@ -300,8 +289,7 @@ The limit to the array is specified by .Fa lastdnptr . A side effect of .Fn dn_comp -is to update the list of pointers for -labels inserted into the message +is to update the list of pointers for labels inserted into the message as the name is compressed. If .Em dnptr @@ -316,8 +304,7 @@ the list of labels is not updated. .Pp The .Fn dn_expand -entry -expands the compressed domain name +entry expands the compressed domain name .Fa comp_dn to a full domain name The compressed name is contained in a query or reply message; 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 diff --git a/lib/libc/stdlib/qdiv.3 b/lib/libc/stdlib/qdiv.3 index 127c5812504..4db47d9b4a0 100644 --- a/lib/libc/stdlib/qdiv.3 +++ b/lib/libc/stdlib/qdiv.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: qdiv.3,v 1.3 1999/06/29 18:36:21 aaron Exp $ +.\" $OpenBSD: qdiv.3,v 1.4 2000/12/24 00:31:00 aaron Exp $ .\" .Dd June 29, 1991 .Dt QDIV 3 @@ -48,8 +48,7 @@ .Sh DESCRIPTION The .Fn qdiv -function -computes the value +function computes the value .Fa num Ns No / Ns Fa denom and returns the quotient and remainder in a structure named .Li qdiv_t |