6a00dc5ed2
Submitted by: Yuko Sasaki <yuko@veltec.co.jp>
160 lines
4.3 KiB
Groff
160 lines
4.3 KiB
Groff
.\" Copyright (c) 1988, 1991, 1993
|
||
.\" The Regents of the University of California. All rights reserved.
|
||
.\"
|
||
.\" This code is derived from software contributed to Berkeley by
|
||
.\" the American National Standards Committee X3, on Information
|
||
.\" Processing Systems.
|
||
.\"
|
||
.\" Redistribution and use in source and binary forms, with or without
|
||
.\" modification, are permitted provided that the following conditions
|
||
.\" are met:
|
||
.\" 1. Redistributions of source code must retain the above copyright
|
||
.\" notice, this list of conditions and the following disclaimer.
|
||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||
.\" notice, this list of conditions and the following disclaimer in the
|
||
.\" documentation and/or other materials provided with the distribution.
|
||
.\" 3. All advertising materials mentioning features or use of this software
|
||
.\" must display the following acknowledgement:
|
||
.\" This product includes software developed by the University of
|
||
.\" California, Berkeley and its contributors.
|
||
.\" 4. Neither the name of the University nor the names of its contributors
|
||
.\" may be used to endorse or promote products derived from this software
|
||
.\" without specific prior written permission.
|
||
.\"
|
||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||
.\" SUCH DAMAGE.
|
||
.\"
|
||
.\" @(#)getenv.3 8.2 (Berkeley) 12/11/93
|
||
.\" %FreeBSD: src/lib/libc/stdlib/getenv.3,v 1.4.2.7 2001/12/14 18:33:58 ru Exp %
|
||
.\" $FreeBSD$
|
||
.\"
|
||
.Dd December 11, 1993
|
||
.Dt GETENV 3
|
||
.Os
|
||
.Sh ̾<EFBFBD><EFBFBD>
|
||
.Nm getenv ,
|
||
.Nm putenv ,
|
||
.Nm setenv ,
|
||
.Nm unsetenv
|
||
.Nd <EFBFBD>Ķ<EFBFBD><EFBFBD>ѿ<EFBFBD><EFBFBD>ؿ<EFBFBD>
|
||
.Sh <EFBFBD>饤<EFBFBD>֥<EFBFBD><EFBFBD><EFBFBD>
|
||
.Lb libc
|
||
.Sh <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
.In stdlib.h
|
||
.Ft char *
|
||
.Fn getenv "const char *name"
|
||
.Ft int
|
||
.Fn setenv "const char *name" "const char *value" "int overwrite"
|
||
.Ft int
|
||
.Fn putenv "const char *string"
|
||
.Ft void
|
||
.Fn unsetenv "const char *name"
|
||
.Sh <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δؿ<EFBFBD><EFBFBD>ϡ<EFBFBD><EFBFBD>Ķ<EFBFBD><EFBFBD>ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⤷<EFBFBD><EFBFBD><EFBFBD>Ϻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD>ۥ<EFBFBD><EFBFBD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FBFBD><EFBFBD>
|
||
.Ar overwrite
|
||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>졢
|
||
.Ar overwrite
|
||
<EFBFBD><EFBFBD> 0 <20>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD>ѿ<EFBFBD>
|
||
.Ar name
|
||
<EFBFBD>Ϻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ꤵ<EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>¾<EFBFBD>ξ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD>Ϳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>줿<EFBFBD>ͤ˺<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ꤵ<EFBFBD><EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>
|
||
.Pp
|
||
.Fn putenv
|
||
<EFBFBD>ؿ<EFBFBD><EFBFBD>ϡ<EFBFBD>``name=value'' <20>η<EFBFBD><CEB7>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD><C8A4>ޤ<EFBFBD><DEA4><EFBFBD>
|
||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD><EFBFBD>
|
||
.Bd -literal -offset indent
|
||
setenv(name, value, 1);
|
||
.Ed
|
||
.Pp
|
||
.Fn unsetenv
|
||
<EFBFBD>ؿ<EFBFBD><EFBFBD>ϡ<EFBFBD>
|
||
.Fa name
|
||
<EFBFBD>Ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFB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