From a4336f357f9e30dffdfad4909b24bd2e82c096a2 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Thu, 20 Apr 2000 13:50:03 +0000 Subject: Flesh out stdlib function man pages. --- src/lib/libc/stdlib/getenv.3 | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'src/lib/libc/stdlib/getenv.3') diff --git a/src/lib/libc/stdlib/getenv.3 b/src/lib/libc/stdlib/getenv.3 index d6ffc8b1dd..b2aa0080d6 100644 --- a/src/lib/libc/stdlib/getenv.3 +++ b/src/lib/libc/stdlib/getenv.3 @@ -33,7 +33,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: getenv.3,v 1.6 1999/09/06 23:26:30 aaron Exp $ +.\" $OpenBSD: getenv.3,v 1.7 2000/04/20 13:50:02 aaron Exp $ .\" .Dd December 11, 1993 .Dt GETENV 3 @@ -55,17 +55,13 @@ .Ft void .Fn unsetenv "const char *name" .Sh DESCRIPTION -These functions set, unset and fetch environment variables from the -host +These functions set, unset, and fetch environment variables from the host .Em environment list . -For compatibility with differing environment conventions, -the given arguments +For compatibility with differing environment conventions, the given arguments .Fa name and .Fa value -may be appended and prepended, -respectively, -with an equal sign +may be appended and prepended, respectively, with an equal sign .Dq Li \&= . .Pp The @@ -74,8 +70,7 @@ function obtains the current value of the environment variable, .Fa name . If the variable .Fa name -is not in the current environment, -a null pointer is returned. +is not in the current environment, a null pointer is returned. .Pp The .Fn setenv @@ -84,30 +79,27 @@ function inserts or resets the environment variable in the current environment list. If the variable .Fa name -does not exist in the list, -it is inserted with the given +does not exist in the list, it is inserted with the given .Fa value . If the variable does exist, the argument .Fa overwrite is tested; if .Fa overwrite -is zero, -the variable is not reset, otherwise it is reset -to the given +is zero, the variable is not reset, otherwise it is reset to the given .Fa value . .Pp The .Fn putenv -function takes an argument of the form ``name=value'' and is -equivalent to: +function takes an argument of the form +.Ar name Ns No = Ns Ar value +and is equivalent to: .Bd -literal -offset indent setenv(name, value, 1); .Ed .Pp The .Fn unsetenv -function -deletes all instances of the variable name pointed to by +function deletes all instances of the variable name pointed to by .Fa name from the list. .Sh RETURN VALUES @@ -117,8 +109,7 @@ and .Fn putenv return zero if successful; otherwise the global variable .Va errno -is set to indicate the error and a -\-1 is returned. +is set to indicate the error and \-1 is returned. .Pp If .Fn getenv -- cgit v1.2.3-55-g6feb