OSDN Git Service

(split) LDP: Update draft and release (from the previous commit)
[linuxjm/LDP_man-pages.git] / release / man3 / setenv.3
index e2fdd87..0878c19 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
 .\" and Copyright (C) 2004, 2007 Michael kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -20,6 +21,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" References consulted:
 .\"     Linux libc source code
 .\"     Noted nonstandard behavior of setenv() if name contains '='
 .\" 2005-08-12, mtk, glibc 2.3.4 fixed the "name contains '='" bug
 .\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
 .\"    all rights reserved.
 .\" Translated 1997-12-19, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
 .\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
 .\" Updated 2010-04-10, Akihiro MOTOKI, LDP v3.24
 .\"
-.TH SETENV 3  2009-09-20 "GNU" "Linux Programmer's Manual"
+.TH SETENV 3 2013\-10\-11 GNU "Linux Programmer's Manual"
 .SH 名前
 setenv \- 環境変数を変更または追加する
 .SH 書式
 .nf
-.B #include <stdlib.h>
+\fB#include <stdlib.h>\fP
 .sp
-.BI "int setenv(const char *" name ", const char *" value ", int " overwrite );
+\fBint setenv(const char *\fP\fIname\fP\fB, const char *\fP\fIvalue\fP\fB, int \fP\fIoverwrite\fP\fB);\fP
 .sp
-.BI "int unsetenv(const char *" name );
+\fBint unsetenv(const char *\fP\fIname\fP\fB);\fP
 .fi
 .sp
 .in -4n
-glibc 向けの機能検査マクロの要件
-.RB ( feature_test_macros (7)
-参照):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
 .ad l
-.BR setenv (),
-.BR unsetenv ():
+\fBsetenv\fP(), \fBunsetenv\fP():
 .RS 4
 _BSD_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600
 .RE
 .ad b
 .SH 説明
-.BR setenv ()
-関数は、\fIname\fP が存在しない場合
-環境変数 \fIname\fP に値 \fIvalue\fP を設定し、環境に追加する。
-\fIname\fP が環境に存在する場合、\fIoverwrite\fP が 0 以外ならば
-その値を \fIvalue\fP に変更し、\fIoverwrite\fP が 0 ならば
-\fIname\fP の値を変更しない。
-この関数は、
-.RB ( putenv (3)
-と違い)
-.I name
-と
-.I value
-により参照される文字列のコピーを行う。
+\fBsetenv\fP()  関数は、\fIname\fP が存在しない場合 環境変数 \fIname\fP に値 \fIvalue\fP を設定し、環境に追加する。
+\fIname\fP が環境に存在する場合、\fIoverwrite\fP が 0 以外ならば その値を \fIvalue\fP に変更し、\fIoverwrite\fP が
+0 ならば \fIname\fP の値を変更しない (\fBsetenv\fP() は成功のステータスを返す)。 この関数は、 (\fBputenv\fP(3)
+と違い)  \fIname\fP と \fIvalue\fP により参照される文字列のコピーを行う。
 .PP
-.BR unsetenv ()
-関数は、変数 \fIname\fP を環境から削除する。
-.I name
+\fBunsetenv\fP()  関数は、変数 \fIname\fP を環境から削除する。 \fIname\fP
 が環境にない場合、この関数は成功し、環境は変更されない。
 .SH 返り値
-.BR setenv ()
-関数は、成功すると 0 を返す。
-エラーの場合、\-1 を返し、
-.I errno
-にエラーの原因を示す値がセットされる。
+\fBsetenv\fP()  関数は、成功すると 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP にエラーの原因を示す値がセットされる。
 
-.BR unsetenv ()
-関数は、成功すると 0 を返す。
-エラーの場合は \-1 を返し、
-.I errno
-を設定してエラーの原因を示す。
+\fBunsetenv\fP()  関数は、成功すると 0 を返す。 エラーの場合は \-1 を返し、 \fIerrno\fP を設定してエラーの原因を示す。
 .SH エラー
-.TP
-.B EINVAL
-.I name
-が NULL であるか、長さが 0 の文字列を指しているか、
-\(aq=\(aq 文字が含まれている。
-.TP
-.B ENOMEM
+.TP 
+\fBEINVAL\fP
+\fIname\fP が NULL であるか、長さが 0 の文字列を指しているか、 \(aq=\(aq 文字が含まれている。
+.TP 
+\fBENOMEM\fP
 環境に新しい変数を追加するのに十分なメモリがない。
 .SH 準拠
-4.3BSD, POSIX.1-2001.
+4.3BSD, POSIX.1\-2001.
 .SH 注意
-POSIX.1-2001 は、
-.BR setenv ()
-や
-.BR unsetenv ()
-がリエントラント (再入可能) であることを要求していない。
+POSIX.1\-2001 は、 \fBsetenv\fP()  や \fBunsetenv\fP()  がリエントラント (再入可能) であることを要求していない。
 
-glibc 2.2.2 以前では、
-.BR unsetenv ()
-は
-返り値が \fIvoid\fP のプロトタイプであった。
-もっと最近の glibc 版は、「書式」セクションで示しているように
-POSIX.1-2001 互換のプロトタイプである。
+glibc 2.2.2 以前では、 \fBunsetenv\fP()  は 返り値が \fIvoid\fP のプロトタイプであった。 もっと最近の glibc
+版は、「書式」セクションで示しているように POSIX.1\-2001 互換のプロトタイプである。
 .SH バグ
-POSIX.1-2001 では
-.RI 「 name
-に \(aq=\(aq 文字が含まれる場合、
-.BR setenv ()
-はエラー
-.B EINVAL
-で失敗すべきである」と述べられている。
-しかし 2.3.4 より前のバージョンの glibc では、
-.I name
-に \(aq=\(aq 文字が含まれるのを許している。
+POSIX.1\-2001 では 「\fIname\fP に \(aq=\(aq 文字が含まれる場合、 \fBsetenv\fP()  はエラー \fBEINVAL\fP
+で失敗すべきである」と述べられている。 しかし 2.3.4 より前のバージョンの glibc では、 \fIname\fP に \(aq=\(aq
+文字が含まれるのを許している。
 .SH 関連項目
-.BR clearenv (3),
-.BR getenv (3),
-.BR putenv (3),
-.BR environ (7)
+\fBclearenv\fP(3), \fBgetenv\fP(3), \fBputenv\fP(3), \fBenviron\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.63 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。