diff options
| author | wiz <wiz@NetBSD.org> | 2005-09-26 10:54:46 +0000 |
|---|---|---|
| committer | wiz <wiz@NetBSD.org> | 2005-09-26 10:54:46 +0000 |
| commit | 72a37764e092ec25f7090f02feb58c6d48bfbc4c (patch) | |
| tree | 9644731cc5a09fea8164355dcce29c53b4c4b291 /lib/libc | |
| parent | 7f4f9fe0442f5e73480d786862091eec93571c69 (diff) | |
Punctuation nits; grammar fix.
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/gen/ttyname.3 | 32 | ||||
| -rw-r--r-- | lib/libc/stdlib/getenv.3 | 17 |
2 files changed, 20 insertions, 29 deletions
diff --git a/lib/libc/gen/ttyname.3 b/lib/libc/gen/ttyname.3 index 1683472b437..ac12972bd02 100644 --- a/lib/libc/gen/ttyname.3 +++ b/lib/libc/gen/ttyname.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: ttyname.3,v 1.18 2005/09/25 20:43:54 christos Exp $ +.\" $NetBSD: ttyname.3,v 1.19 2005/09/26 10:54:46 wiz Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -61,8 +61,7 @@ typedef, but refer to the special device files found in .Pa /dev and named .Pa /dev/tty Ns Em xx -and for which an entry exists -in the initialization file +and for which an entry exists in the initialization file .Pa /etc/ttys (see .Xr ttys 5 ) , @@ -74,14 +73,12 @@ The function determines if the file descriptor .Fa fd -refers to a valid -terminal type device. +refers to a valid terminal type device. .Pp The .Fn ttyname -function -gets the related device name of -a file descriptor for which +function gets the related device name of a file descriptor for +which .Fn isatty is true. The @@ -89,10 +86,8 @@ The is the reentrant version of the above, and it places the results in .Fa buf . If there is not enough space to place the results (indicated by -.Fa len ), -then it returns -.Dv -1 -and +.Fa len ) , +then it returns \-1 and .Va errno is set to indicate the error. .Pp @@ -105,14 +100,15 @@ file entry. If the terminal is a pseudo-terminal, and there is no special entry in the .Xr ttys 5 -file for it, the slot number returned is 1 + (last slot number) + minor(tty). +file for it, the slot number returned is 1 + (last slot number) + +minor(tty). This will return a consistent and unique number for each pseudo-terminal device without requiring one to enumerate all of them in .Xr ttys 5 . .Sh RETURN VALUES The .Fn ttyname -function returns the NUL terminated name if the device is found and +function returns the NUL-terminated name if the device is found and .Fn isatty is true; otherwise a @@ -123,7 +119,7 @@ is set to indicate the error. .Pp The .Fn ttyname_r -functions returns 0 on success and -1 on failure with +functions returns 0 on success and \-1 on failure with .Va errno set to indicate the error. .Pp @@ -147,7 +143,7 @@ the value zero is returned. .El .Sh ERRORS The -.Fn ttyname , +.Fn ttyname , .Fn ttyname_r , and .Fn isatty @@ -183,13 +179,11 @@ and functions conform to .St -p1003.1-90 . .Sh HISTORY -A .Fn isatty , .Fn ttyname , and .Fn ttyslot -function -appeared in +functions appeared in .At v7 . .Sh BUGS The diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3 index cbd1cf0772a..80e68f8d437 100644 --- a/lib/libc/stdlib/getenv.3 +++ b/lib/libc/stdlib/getenv.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: getenv.3,v 1.18 2005/09/25 20:08:01 christos Exp $ +.\" $NetBSD: getenv.3,v 1.19 2005/09/26 10:56:54 wiz Exp $ .\" .\" Copyright (c) 1988, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -75,30 +75,27 @@ except for .Pp The .Fn getenv -function obtains the current value of the environment variable, +function obtains the current value of the environment variable .Ar name . If the variable .Ar name -is not in the current environment, -a +is not in the current environment, a .Dv NULL pointer is returned. .Pp The .Fn getenv_r -function obtains the current value of the environment variable, +function obtains the current value of the environment variable .Fa name -and copies it in +and copies it to .Fa buf . -If +If .Fa name is not in the current environment, or the string length of the value of .Fa name is longer than .Fa len -characters, then -.Dv -1 -is returned and +characters, then \-1 is returned and .Va errno is set to indicate the error. .Pp |
