From owner-svn-src-all@freebsd.org Thu Oct 22 16:46:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FE72A1C051; Thu, 22 Oct 2015 16:46:32 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C799B1972; Thu, 22 Oct 2015 16:46:31 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9MGkUoe056803; Thu, 22 Oct 2015 16:46:30 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MGkUEE056802; Thu, 22 Oct 2015 16:46:30 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510221646.t9MGkUEE056802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 16:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289761 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2015 16:46:32 -0000 Author: cem Date: Thu Oct 22 16:46:30 2015 New Revision: 289761 URL: https://svnweb.freebsd.org/changeset/base/289761 Log: getenv.9: Document behavior of freeenv(NULL) Fix a couple igor(1)-indicated spelling issues while here. Suggested by: jhb Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man9/getenv.9 Modified: head/share/man/man9/getenv.9 ============================================================================== --- head/share/man/man9/getenv.9 Thu Oct 22 16:46:21 2015 (r289760) +++ head/share/man/man9/getenv.9 Thu Oct 22 16:46:30 2015 (r289761) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 22, 2013 +.Dd October 22, 2015 .Dt GETENV 9 .Os .Sh NAME @@ -78,7 +78,6 @@ function obtains the current value of th .Fa name and returns a pointer to the string value. The caller should not modify the string pointed to by the return value. -.Pp The .Fn getenv function may allocate temporary storage, @@ -88,12 +87,24 @@ function must be called to release any a returned by .Fn getenv is no longer needed. +.Pp +The +.Fn freeenv +function is used to release the resources allocated by a previous call to +.Fn getenv . The .Fa env argument passed to .Fn freeenv is the pointer returned by the earlier call to .Fn getenv . +Like +.Xr free 3 , +the +.Fa env +argument can be +.Va NULL , +in which case no action occurs. .Pp The .Fn setenv @@ -156,7 +167,8 @@ Otherwise, the value is interpreted as decimal. The value may contain a single character suffix specifying a unit for the value. -The interpreted value is multipled by the unit's magnitude before being returned. +The interpreted value is multiplied by the unit's magnitude before being +returned. The following unit suffixes are supported: .Bl -column -offset indent ".Sy Unit" ".Sy Magnitude" .It Sy Unit Ta Sy Magnitude @@ -179,7 +191,7 @@ zero is returned. If the variable exists, up to .Fa size - 1 -characters of it's value are copied to the buffer pointed to by +characters of its value are copied to the buffer pointed to by .Fa data followed by a null character and a non-zero value is returned. .Sh RETURN VALUES