From 00c09968269128cda30243bab5a676e104687eb4 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Tue, 6 Apr 2021 06:51:14 +0900 Subject: [PATCH] LDP: Address fuzzy changes (stdlib) --- manual/LDP_man-pages/draft/man2/_exit.2 | 106 ++ manual/LDP_man-pages/draft/man3/MB_CUR_MAX.3 | 6 +- manual/LDP_man-pages/draft/man3/MB_LEN_MAX.3 | 5 +- manual/LDP_man-pages/draft/man3/a64l.3 | 2 +- manual/LDP_man-pages/draft/man3/atexit.3 | 24 +- manual/LDP_man-pages/draft/man3/atoi.3 | 124 ++ manual/LDP_man-pages/draft/man3/cfree.3 | 6 +- manual/LDP_man-pages/draft/man3/clearenv.3 | 111 ++ manual/LDP_man-pages/draft/man3/drand48.3 | 169 +++ manual/LDP_man-pages/draft/man3/drand48_r.3 | 123 ++ manual/LDP_man-pages/draft/man3/ecvt_r.3 | 4 +- manual/LDP_man-pages/draft/man3/exit.3 | 135 ++ manual/LDP_man-pages/draft/man3/gcvt.3 | 2 +- manual/LDP_man-pages/draft/man3/getauxval.3 | 227 +++ manual/LDP_man-pages/draft/man3/getenv.3 | 3 +- manual/LDP_man-pages/draft/man3/getloadavg.3 | 10 +- manual/LDP_man-pages/draft/man3/getsubopt.3 | 4 +- manual/LDP_man-pages/draft/man3/malloc.3 | 230 +++ manual/LDP_man-pages/draft/man3/mbstowcs.3 | 8 +- manual/LDP_man-pages/draft/man3/mkdtemp.3 | 6 +- manual/LDP_man-pages/draft/man3/mktemp.3 | 13 +- manual/LDP_man-pages/draft/man3/putenv.3 | 13 +- manual/LDP_man-pages/draft/man3/rand.3 | 14 +- manual/LDP_man-pages/draft/man3/random.3 | 147 ++ manual/LDP_man-pages/draft/man3/random_r.3 | 4 +- manual/LDP_man-pages/draft/man3/rpmatch.3 | 16 +- manual/LDP_man-pages/draft/man3/setenv.3 | 17 +- manual/LDP_man-pages/draft/man3/strtod.3 | 2 +- manual/LDP_man-pages/draft/man3/strtol.3 | 213 +++ manual/LDP_man-pages/draft/man3/strtoul.3 | 148 ++ manual/LDP_man-pages/draft/man3/system.3 | 162 +++ manual/LDP_man-pages/draft/man3/wcstombs.3 | 82 ++ manual/LDP_man-pages/draft/man7/vdso.7 | 34 +- manual/LDP_man-pages/po4a/stdlib/po/ja.po | 1997 ++++++-------------------- manual/LDP_man-pages/stats/stdlib | 82 +- manual/LDP_man-pages/untrans.html | 84 +- 36 files changed, 2546 insertions(+), 1787 deletions(-) create mode 100644 manual/LDP_man-pages/draft/man2/_exit.2 create mode 100644 manual/LDP_man-pages/draft/man3/atoi.3 create mode 100644 manual/LDP_man-pages/draft/man3/clearenv.3 create mode 100644 manual/LDP_man-pages/draft/man3/drand48.3 create mode 100644 manual/LDP_man-pages/draft/man3/drand48_r.3 create mode 100644 manual/LDP_man-pages/draft/man3/exit.3 create mode 100644 manual/LDP_man-pages/draft/man3/getauxval.3 create mode 100644 manual/LDP_man-pages/draft/man3/malloc.3 create mode 100644 manual/LDP_man-pages/draft/man3/random.3 create mode 100644 manual/LDP_man-pages/draft/man3/strtol.3 create mode 100644 manual/LDP_man-pages/draft/man3/strtoul.3 create mode 100644 manual/LDP_man-pages/draft/man3/system.3 create mode 100644 manual/LDP_man-pages/draft/man3/wcstombs.3 diff --git a/manual/LDP_man-pages/draft/man2/_exit.2 b/manual/LDP_man-pages/draft/man2/_exit.2 new file mode 100644 index 00000000..131e0e75 --- /dev/null +++ b/manual/LDP_man-pages/draft/man2/_exit.2 @@ -0,0 +1,106 @@ +.\" This manpage is Copyright (C) 1992 Drew Eckhardt; +.\" and Copyright (C) 1993 Michael Haardt, Ian Jackson. +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END +.\" +.\" Modified Wed Jul 21 23:02:38 1993 by Rik Faith +.\" Modified 2001-11-17, aeb +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 1997 KUNIMOTO Yasuhiro, all rights reserved. +.\" Translated Jun 27, 1997 by KUNIMOTO Yasuhiro (hiro@kthree.co.jp) +.\" Modified Jun 28, 1997 by Yoshiki Sugiura (yox@in.aix.or.jp) +.\" Modified Jul 6, 1997 by Yoshiki Sugiura (yox@in.aix.or.jp) +.\" Updated & Modified Sun Dec 9 20:02:10 JST 2001 +.\" by Yuichi SATO +.\" Updated Sat Sep 3 04:26:00 JST 2005 +.\" by Akihiro MOTOKI +.\" +.TH _EXIT 2 2020\-02\-09 Linux "Linux Programmer's Manual" +.SH 名前 +_exit, _Exit \- 呼び出し元のプロセスを終了させる +.SH 書式 +\fB#include \fP +.PP +\fBvoid _exit(int \fP\fIstatus\fP\fB);\fP + +\fB#include \fP +.PP +\fBvoid _Exit(int \fP\fIstatus\fP\fB);\fP +.PP +.RS -4 +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): +.RE +.PP +.ad l +\fB_Exit\fP(): +.RS 4 +_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L +.RE +.ad +.SH 説明 +\fB_exit\fP() terminates the calling process "immediately". Any open file +descriptors belonging to the process are closed. Any children of the +process are inherited by \fBinit\fP(1) (or by the nearest "subreaper" process +as defined through the use of the \fBprctl\fP(2) \fBPR_SET_CHILD_SUBREAPER\fP +operation). The process's parent is sent a \fBSIGCHLD\fP signal. +.PP +The value \fIstatus & 0xFF\fP is returned to the parent process as the +process's exit status, and can be collected by the parent using one of the +\fBwait\fP(2) family of calls. +.PP +関数 \fB_Exit\fP() は \fB_exit\fP() と等価である。 +.SH 返り値 +これらの関数は値を返さない。 +.SH 準拠 +POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD. 関数 \fB_Exit\fP() は C99 で導入された。 +.SH 注意 +exit の効果、終了状態の受渡し、ゾンビプロセス、シグナル送出などに +ついての議論は、 \fBexit\fP(3) を参照すること。 +.PP +The function \fB_exit\fP() is like \fBexit\fP(3), but does not call any functions +registered with \fBatexit\fP(3) or \fBon_exit\fP(3). Open \fBstdio\fP(3) streams +are not flushed. On the other hand, \fB_exit\fP() does close open file +descriptors, and this may cause an unknown delay, waiting for pending output +to finish. If the delay is undesired, it may be useful to call functions +like \fBtcflush\fP(3) before calling \fB_exit\fP(). Whether any pending I/O is +canceled, and which pending I/O may be canceled upon \fB_exit\fP(), is +implementation\-dependent. +.SS "C ライブラリとカーネルの違い" +In glibc up to version 2.3, the \fB_exit\fP() wrapper function invoked the +kernel system call of the same name. Since glibc 2.3, the wrapper function +invokes \fBexit_group\fP(2), in order to terminate all of the threads in a +process. (The raw \fB_exit\fP() system call terminates only the calling +thread.) +.SH 関連項目 +\fBexecve\fP(2), \fBexit_group\fP(2), \fBfork\fP(2), \fBkill\fP(2), \fBwait\fP(2), +\fBwait4\fP(2), \fBwaitpid\fP(2), \fBatexit\fP(3), \fBexit\fP(3), \fBon_exit\fP(3), +\fBtermios\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/MB_CUR_MAX.3 b/manual/LDP_man-pages/draft/man3/MB_CUR_MAX.3 index ac38c77e..acf13769 100644 --- a/manual/LDP_man-pages/draft/man3/MB_CUR_MAX.3 +++ b/manual/LDP_man-pages/draft/man3/MB_CUR_MAX.3 @@ -32,10 +32,8 @@ MB_CUR_MAX \- 現在のロケールでのマルチバイト文字の最大長 \fB#include \fP .fi .SH 説明 -The \fBMB_CUR_MAX\fP macro defines an integer expression giving the maximum -number of bytes needed to represent a single wide character in the current -locale. This value is locale dependent and therefore not a compile\-time -constant. +\fBMB_CUR_MAX\fP マクロは、現在のロケールで一つのワイド文字を表現するために必要な +最大バイト数を表す整数表現を定義する。この値はロケール依存であり、コンパイル時に決まる定数ではない。 .SH 返り値 [1, \fBMB_LEN_MAX\fP] の範囲の整数を返す。 1 という値は伝統的な (traditional) 8\-bit エンコードされた文字を意味する。 diff --git a/manual/LDP_man-pages/draft/man3/MB_LEN_MAX.3 b/manual/LDP_man-pages/draft/man3/MB_LEN_MAX.3 index 1428343e..2fb47697 100644 --- a/manual/LDP_man-pages/draft/man3/MB_LEN_MAX.3 +++ b/manual/LDP_man-pages/draft/man3/MB_LEN_MAX.3 @@ -44,9 +44,8 @@ POSIX.1\-2001, POSIX.1\-2008, C99. .\" From: Bruno Haible .\" Subject: Re: why is MB_LEN_MAX so large (16) on glibc .\" Date: Thu, 14 May 2015 02:30:14 +0200 -The entities \fBMB_LEN_MAX\fP and \fIsizeof(wchar_t)\fP are totally unrelated. In -glibc, \fBMB_LEN_MAX\fP is typically 16 (6 in glibc versions earlier than 2.2), -while \fIsizeof(wchar_t)\fP is 4. +\fBMB_LEN_MAX\fP と \fIsizeof(wchar_t)\fP の値にはなんの関係もない。 glibc では \fBMB_LEN_MAX\fP は通常は +16 (glibc バージョン 2.2 より前では 6) で、 \fIsizeof(wchar_t)\fP は 4 である。 .SH 関連項目 \fBMB_CUR_MAX\fP(3) .SH この文書について diff --git a/manual/LDP_man-pages/draft/man3/a64l.3 b/manual/LDP_man-pages/draft/man3/a64l.3 index 2c450a41..579dfc96 100644 --- a/manual/LDP_man-pages/draft/man3/a64l.3 +++ b/manual/LDP_man-pages/draft/man3/a64l.3 @@ -62,7 +62,7 @@ a\-z は 38\-63 を表す。 .fi .RE .PP -So 123 = 59*64\(ha0 + 1*64\(ha1 = "v/". +よって 123 = 59*64\(ha0 + 1*64\(ha1 = "v/" である。 .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS diff --git a/manual/LDP_man-pages/draft/man3/atexit.3 b/manual/LDP_man-pages/draft/man3/atexit.3 index 3d59df97..c715440e 100644 --- a/manual/LDP_man-pages/draft/man3/atexit.3 +++ b/manual/LDP_man-pages/draft/man3/atexit.3 @@ -59,9 +59,8 @@ atexit \- プロセスが正常終了した時に呼び出される関数を登 同じ関数を複数回登録してもよい。 登録された関数は登録 1 回につき 1 回呼び出される。 .PP .\" POSIX.1-2001, POSIX.1-2008 -POSIX.1 requires that an implementation allow at least \fBATEXIT_MAX\fP (32) -such functions to be registered. The actual limit supported by an -implementation can be obtained using \fBsysconf\fP(3). +POSIX.1 では、このような関数を少なくとも \fBATEXIT_MAX\fP 個 (32個) 登録できることを要求している。 +その実装でサポートされている実際の上限は \fBsysconf\fP(3) を使って取得できる。 .PP \fBfork\fP(2) で作成された場合、子プロセスは親プロセスの登録のコピーを継承する。 \fBexec\fP(3) ファミリーの関数の場合、呼び出しに成功すると、 全ての登録が削除される。 @@ -85,31 +84,28 @@ POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD. \fBatexit\fP() (と \fBon_exit\fP(3)) を使って登録された関数は、 シグナルの配送によりプロセスが異常終了した場合には呼び出されない。 .PP -If one of the registered functions calls \fB_exit\fP(2), then any remaining -functions are not invoked, and the other process termination steps performed -by \fBexit\fP(3) are not performed. +登録された関数の一つが \fB_exit\fP(2) を呼び出した場合、残りの関数はどれも起動されず、 \fBexit\fP(3) +により実行される他のプロセス終了ステップは実行されない。 .PP .\" POSIX.1-2001, POSIX.1-2008 .\" This can happen on OpenBSD 4.2 for example, and is documented .\" as occurring on FreeBSD as well. .\" Glibc does "the Right Thing" -- invocation of the remaining .\" exit handlers carries on as normal. -POSIX.1 says that the result of calling \fBexit\fP(3) more than once (i.e., -calling \fBexit\fP(3) within a function registered using \fBatexit\fP()) is -undefined. On some systems (but not Linux), this can result in an infinite -recursion; portable programs should not invoke \fBexit\fP(3) inside a function -registered using \fBatexit\fP(). +POSIX.1 では、 \fBatexit\fP() を使って登録された一つの関数内で、複数回 \fBexit\fP(3) を呼び出した際の結果は未定義である。 +(Linux ではないが) いくつかのシステムでは、この場合、 繰り返しが無限に起こることになる。 移植性が必要なプログラムでは、 +\fBatexit\fP() で登録された関数内で \fBexit\fP(3) を起動すべきではない。 .PP \fBatexit\fP() と \fBon_exit\fP(3) は、同じリストに対して関数を登録する。 プロセスが正常に終了した際には、 これらの二つの関数で登録された順序の逆順で、 登録された関数が起動される。 .PP .\" In glibc, things seem to be handled okay -According to POSIX.1, the result is undefined if \fBlongjmp\fP(3) is used to -terminate execution of one of the functions registered using \fBatexit\fP(). +POSIX.1 では、 \fBatexit\fP() で登録された関数の実行を終了するために \fBlongjmp\fP(3) +が使用された場合の結果は未定義である。 .SS "Linux での注意" glibc 2.2.3 以降では、共有ライブラリがアンロードされるときに呼ばれる 関数を登録するために、共有ライブラリの中で \fBatexit\fP() (と \fBon_exit\fP(3)) を使用することができる。 -.SH EXAMPLES +.SH 例 .EX #include #include diff --git a/manual/LDP_man-pages/draft/man3/atoi.3 b/manual/LDP_man-pages/draft/man3/atoi.3 new file mode 100644 index 00000000..69e5b10a --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/atoi.3 @@ -0,0 +1,124 @@ +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" 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 +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Mon Mar 29 22:39:41 1993, David Metcalfe +.\" Modified Sat Jul 24 21:38:42 1993, Rik Faith (faith@cs.unc.edu) +.\" Modified Sun Dec 17 18:35:06 2000, Joseph S. Myers +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 1996 Kentaro OGAWA +.\" all rights reserved. +.\" Translated Sat, 13 Jul 1996 22:47:32 +0900 +.\" by Kentaro OGAWA +.\" Updated Tue 30 Jan 2001 JST by Kentaro Shirakata +.\" +.TH ATOI 3 2020\-08\-13 GNU "Linux Programmer's Manual" +.SH 名前 +atoi, atol, atoll \- 文字列を整数型に変換する +.SH 書式 +.nf +\fB#include \fP +.PP +\fBint atoi(const char *\fP\fInptr\fP\fB);\fP +\fBlong atol(const char *\fP\fInptr\fP\fB);\fP +\fBlong long atoll(const char *\fP\fInptr\fP\fB);\fP +.fi +.PP +.RS -4 +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): +.RE +.PP +.ad l +\fBatoll\fP(): +.RS 4 +_ISOC99_SOURCE || + || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.RE +.ad +.SH 説明 +\fBatoi\fP() 関数は、\fInptr\fP によって指示される文字列のはじめの部分を \fIint\fP 型整数に変換する。 この振る舞いは、 +\fBatoi\fP() 関数がエラーを見つけない点以外は、 +.PP +.in +4n +.EX +strtol(nptr, NULL, 10); +.EE +.in +.PP +と同じである。 +.PP +\fBatol\fP() 関数と \fBatoll\fP() 関数は \fBatoi\fP() と同様の振る舞いをするが、 文字列のはじめの部分をそれぞれ +\fIlong\fP や \fIlong long\fP に変換する。 +.SH 返り値 +The converted value or 0 on error. +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.TS +allbox; +lbw23 lb lb +l l l. +インターフェース 属性 値 +T{ +\fBatoi\fP(), +\fBatol\fP(), +\fBatoll\fP() +T} Thread safety MT\-Safe locale +.TE +.SH 準拠 +.\" .SH NOTES +.\" Linux libc provided +.\" .BR atoq () +.\" as an obsolete name for +.\" .BR atoll (); +.\" .BR atoq () +.\" is not provided by glibc. +.\" The +.\" .BR atoll () +.\" function is present in glibc 2 since version 2.0.2, but +.\" not in libc4 or libc5. +POSIX.1\-2001, POSIX.1\-2008, C99, SVr4, 4.3BSD. C89 と POSIX.1\-1996 には +\fBatoi\fP() と \fBatol\fP() だけが含まれている。 +.SH 注意 +POSIX.1 leaves the return value of \fBatoi\fP() on error unspecified. On +glibc, musl libc, and uClibc, 0 is returned on error. +.SH バグ +\fIerrno\fP is not set on error so there is no way to distinguish between 0 as +an error and as the converted value. No checks for overflow or underflow +are done. Only base\-10 input can be converted. It is recommended to +instead use the \fBstrtol\fP() and \fBstrtoul\fP() family of functions in new +programs. +.SH 関連項目 +\fBatof\fP(3), \fBstrtod\fP(3), \fBstrtol\fP(3), \fBstrtoul\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/cfree.3 b/manual/LDP_man-pages/draft/man3/cfree.3 index 262c0b4a..5f39ee2e 100644 --- a/manual/LDP_man-pages/draft/man3/cfree.3 +++ b/manual/LDP_man-pages/draft/man3/cfree.3 @@ -63,8 +63,8 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 Glibc 2.19 and earlier: _BSD_SOURCE || _SVID_SOURCE .SH 説明 -This function should never be used. Use \fBfree\fP(3) instead. Starting with -version 2.26, it has been removed from glibc. +この関数は決して使用すべきではない。 代わりに \fBfree\fP(3) を使うこと。 glibc 2.26 以降では、この関数は glibc +から削除されている。 .SS "引き数が 1 つの cfree" glibc では、関数 \fBcfree\fP() は \fBfree\fP(3) の別名であり、「SunOS との互換性のために追加された」。 .PP @@ -95,7 +95,7 @@ SunOS 版の \fBcfree\fP() (\fBfree\fP(3) の別名) は、成功した場合 つで以前に割り当てられた ブロックへのポインターでない。 .SH バージョン .\" commit 025b33ae84bb8f15b2748a1d8605dca453fce112 -The \fBcfree\fP() function was removed from glibc in version 2.26. +\fBcfree\fP() 関数は、バージョン 2.26 で glibc から削除された。 .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS diff --git a/manual/LDP_man-pages/draft/man3/clearenv.3 b/manual/LDP_man-pages/draft/man3/clearenv.3 new file mode 100644 index 00000000..7d551884 --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/clearenv.3 @@ -0,0 +1,111 @@ +.\" Copyright 2001 John Levon +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END +.\" +.\" Additions, aeb, 2001-10-17. +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 2001-2002 Yuichi SATO +.\" all rights reserved. +.\" Translated Sun Nov 4 22:46:03 JST 2001 +.\" by Yuichi SATO +.\" Updated & Modifined Mon Jul 15 02:10:29 JST 2002 by Yuichi SATO +.\" +.TH CLEARENV 3 2017\-09\-15 Linux "Linux Programmer's Manual" +.SH 名前 +clearenv \- 環境 (environment) をクリアする +.SH 書式 +.nf +\fB#include \fP +.PP +\fBint clearenv(void);\fP +.fi +.PP +.RS -4 +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): +.RE +.PP +\fBclearenv\fP(): + /* Glibc since 2.19: */ _DEFAULT_SOURCE + || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.SH 説明 +The \fBclearenv\fP() function clears the environment of all name\-value pairs +and sets the value of the external variable \fIenviron\fP to NULL. After this +call, new variables can be added to the environment using \fBputenv\fP(3) and +\fBsetenv\fP(3). +.SH 返り値 +.\" Most versions of UNIX return -1 on error, or do not even have errors. +.\" Glibc info and the Watcom C library document "a nonzero value". +\fBclearenv\fP() 関数は、成功した場合は 0 を返し、 失敗した場合は 0 以外を返す。 +.SH バージョン +glibc 2.0 以降で利用可能。 +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.TS +allbox; +lb lb lb +l l l. +インターフェース 属性 値 +T{ +\fBclearenv\fP() +T} Thread safety MT\-Unsafe const:env +.TE +.sp 1 +.SH 準拠 +(DG/UX, HP\-UX, QNX, などの) 多くの UNIX 系 OS。 (FORTRAN77 へのバインディングである) POSIX.9。 +POSIX.1\-1996 では \fBclearenv\fP() と \fBputenv\fP(3) は採用されなかったが、 +方針が変更され、この標準規格の以降の号 (\[sc] B.4.6.1 を参照) では 採用されることになった。 しかし POSIX.1\-2001 では +\fBputenv\fP(3) だけが追加され、 \fBclearenv\fP() の追加は否決された。 +.SH 注意 +On systems where \fBclearenv\fP() is unavailable, the assignment +.PP +.in +4n +.EX +environ = NULL; +.EE +.in +.PP +というように変数 environ を設定すればよい。 +.PP +The \fBclearenv\fP() function may be useful in security\-conscious applications +that want to precisely control the environment that is passed to programs +executed using \fBexec\fP(3). The application would do this by first clearing +the environment and then adding select environment variables. +.PP +Note that the main effect of \fBclearenv\fP() is to adjust the value of the +pointer \fBenviron\fP(7); this function does not erase the contents of the +buffers containing the environment definitions. +.PP +.\" .LP +.\" HP-UX has a ENOMEM error return. +DG/UX と Tru64 man ページには次のように記されている: \fIenviron\fP が \fBputenv\fP(3), \fBgetenv\fP(3), +\fBclearenv\fP() 関数以外で変更された場合、 \fBclearenv\fP() はエラーを返し、プロセス環境は変更前のままにされる。 +.SH 関連項目 +\fBgetenv\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3), \fBenviron\fP(7) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/drand48.3 b/manual/LDP_man-pages/draft/man3/drand48.3 new file mode 100644 index 00000000..bb8b2a7f --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/drand48.3 @@ -0,0 +1,169 @@ +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" 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 +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 19:46:03 1993 by Rik Faith (faith@cs.unc.edu) +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi +.\" all rights reserved. +.\" Translated Mon Jan 20 20:04:05 JST 1997 +.\" by YOSHINO Takashi +.\" +.TH DRAND48 3 2020\-11\-01 "" "Linux Programmer's Manual" +.SH 名前 +drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48, seed48, +lcong48 \- 一様分布する疑似乱数を生成する関数 +.SH 書式 +.nf +\fB#include \fP +.PP +\fBdouble drand48(void);\fP +.PP +\fBdouble erand48(unsigned short \fP\fIxsubi\fP\fB[3]);\fP +.PP +\fBlong lrand48(void);\fP +.PP +\fBlong nrand48(unsigned short \fP\fIxsubi\fP\fB[3]);\fP +.PP +\fBlong mrand48(void);\fP +.PP +\fBlong jrand48(unsigned short \fP\fIxsubi\fP\fB[3]);\fP +.PP +\fBvoid srand48(long \fP\fIseedval\fP\fB);\fP +.PP +\fBunsigned short *seed48(unsigned short \fP\fIseed16v\fP\fB[3]);\fP +.PP +\fBvoid lcong48(unsigned short \fP\fIparam\fP\fB[7]);\fP +.fi +.PP +.RS -4 +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): +.RE +.PP +.ad l +.\" .BR drand48 (), +.\" .BR erand48 (), +.\" .BR lrand48 (), +.\" .BR nrand48 (), +.\" .BR mrand48 (), +.\" .BR jrand48 (), +.\" .BR srand48 (), +.\" .BR seed48 (), +.\" .BR lcong48 (): +All functions shown above: +_XOPEN_SOURCE + || /* Glibc since 2.19: */ _DEFAULT_SOURCE + || /* Glibc versions <= 2.19: */ _SVID_SOURCE +.ad b +.SH 説明 +これらの関数は線形合同アルゴリズムと 48ビット整数演算を用いて 疑似乱数を生成する。 +.PP +関数 \fBdrand48\fP() と \fBerand48\fP() は、区間 [0.0,\ 1.0) で 一様分布する非負の倍精度浮動小数点実数値を返す。 +.PP +関数 \fBlrand48\fP() と \fBnrand48\fP() は、区間 [0,\ 2^31) で一様分布する非負のロング整数を返す。 +.PP +関数 \fBmrand48\fP() と \fBjrand48\fP() は、区間 [\-2^31,\ 2^31) で一様分布する符号付きロング整数を返す。 +.PP +関数 \fBsrand48\fP(), \fBseed48\fP(), \fBlcong48\fP() は初期化関数 である。 関数 \fBdrand48\fP(), +\fBlrand48\fP(), \fBmrand48\fP() を 使用する前に、これらの初期化関数のいずれかを呼ぶべきである。 関数 +\fBerand48\fP(), \fBnrand48\fP(), \fBjrand48\fP() は初めに 初期化関数を呼ぶことを必要としない。 +.PP +ここで説明しているすべての関数は 48ビットの整数の シーケンス (\fIXi\fP) を生成することで 機能している。生成方法は以下の線形合同の式による。 +.PP +.in +4n +.EX +\fBXn+1 = (aXn + c) mod m,\fP +.EE +.in +.PP +ここで n >= 0 である。 パラメーターが \fIm\fP = 2^48 であるため、48ビット整数演算が行われている。 \fBlcong48\fP() +が呼ばれていない場合、\fIa\fP と \fIc\fP は以下の式で与えられる。 +.PP +.in +4n +.EX +\fBa = 0x5DEECE66D\fP +\fBc = 0xB\fP +.EE +.in +.PP +関数 \fBdrand48\fP(), \fBerand48\fP(), \fBlrand48\fP(), \fBnrand48\fP(), \fBmrand48\fP(), +\fBjrand48\fP() で返される値は次のようにして計算される。 はじめに、次の48ビットの \fIXi\fP が計算される。 +そして、返すべきデータの型に依存した適切な ビット数が \fIXi\fP の上位ビットからコピーされる。 最後に、この値を返り値に変換する。 +.PP +関数 \fBdrand48\fP(), \fBlrand48\fP(), \fBmrand48\fP() は 最後に生成された48ビットの \fIXi\fP +を内部バッファーに格納する。 配列の形の引数 \fIxsubi\fP に個々の \fIXi\fP の値を 格納できるような領域を確保することを、 関数 +\fBerand48\fP(), \fBnrand48\fP(), \fBjrand48\fP() は、 呼び出し側のプログラムに要求する。 +これらの関数は、はじめてそれらの関数を呼ぶ前に \fIXi\fP の初期値を配列に 代入することで初期化される。 +.PP +初期化関数 \fBsrand48\fP() は、\fIXi\fP の 上位32ビットを引数 \fIseedval\fP に設定する。 +下位の16ビットは、適当に決められた値である0x330Eに設定される。 +.PP +初期化関数 \fBseed48\fP() は、\fIXi\fP の値を、 配列の形をした引数である \fIseed16v\fP の中で指定された +48ビットの値に設定する。 \fIXi\fP の前の値は内部バッファーにコピーされ、このバッファーへのポインターが \fBseed48\fP() +によって返される。 +.PP +初期化関数 \fBlcong48\fP() は使用者が \fIXi\fP, \fIa\fP, \fIc\fP の 初期値を指定するための関数である。 +配列の形をした引数の要素はそれぞれ、\fIparam[0\-2]\fP は \fIXi\fP を、 \fIparam[3\-5]\fP は \fIa\fP +を、\fIparam[6]\fP は \fIc\fP を指定するもの である。 \fBlcong48\fP() が呼ばれた後で、 \fBsrand48\fP() か +\fBseed48\fP() を呼ぶと、前述の \fIa\fP と \fIc\fP の 標準値が再び設定される。 +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.ad l +.TS +allbox; +lb lb lb +lw21 l lw22. +インターフェース 属性 値 +T{ +\fBdrand48\fP(), +\fBerand48\fP(), +\fBlrand48\fP(), +\fBnrand48\fP(), +\fBmrand48\fP(), +\fBjrand48\fP(), +\fBsrand48\fP(), +\fBseed48\fP(), +\fBlcong48\fP() +T} Thread safety T{ +MT\-Unsafe race:drand48 +T} +.TE +.ad +.PP +上記の関数は、 乱数生成に使用する状態情報をグローバルに保持する。 そのため、 これらの関数はスレッドセーフではない。 +.SH 準拠 +POSIX.1\-2001, POSIX.1\-2008, SVr4. +.SH 関連項目 +\fBrand\fP(3), \fBrandom\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/drand48_r.3 b/manual/LDP_man-pages/draft/man3/drand48_r.3 new file mode 100644 index 00000000..76f41c15 --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/drand48_r.3 @@ -0,0 +1,123 @@ +.\" Copyright 2003 Walter Harms, 2004 Andries Brouwer . +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END +.\" +.\" Created 2004-10-31. Text taken from a page by Walter Harms, 2003-09-08 +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 2005 Yuichi SATO +.\" all rights reserved. +.\" Translated Sat Jan 29 04:28:24 JST 2005 +.\" by Yuichi SATO +.\" +.TH DRAND48_R 3 2020\-11\-01 GNU "Linux Programmer's Manual" +.SH 名前 +drand48_r, erand48_r, lrand48_r, nrand48_r, mrand48_r, jrand48_r, srand48_r, +seed48_r, lcong48_r \- 一様分布する疑似乱数をリエントラント (reentrant) に生成する +.SH 書式 +.nf +\fB#include \fP +.PP +\fBint drand48_r(struct drand48_data *\fP\fIbuffer\fP\fB, double *\fP\fIresult\fP\fB);\fP +.PP +\fBint erand48_r(unsigned short \fP\fIxsubi\fP\fB[3]\fP\fI,\fP +\fB struct drand48_data *\fP\fIbuffer\fP\fB, double *\fP\fIresult\fP\fB);\fP +.PP +\fBint lrand48_r(struct drand48_data *\fP\fIbuffer\fP\fB, long *\fP\fIresult\fP\fB);\fP +.PP +\fBint nrand48_r(unsigned short \fP\fIxsubi[3]\fP\fB,\fP +\fB struct drand48_data *\fP\fIbuffer\fP\fB, long *\fP\fIresult\fP\fB);\fP +.PP +\fBint mrand48_r(struct drand48_data *\fP\fIbuffer\fP\fB,long *\fP\fIresult\fP\fB);\fP +.PP +\fBint jrand48_r(unsigned short \fP\fIxsubi[3]\fP\fB,\fP +\fB struct drand48_data *\fP\fIbuffer\fP\fB, long *\fP\fIresult\fP\fB);\fP +.PP +\fBint srand48_r(long int \fP\fIseedval\fP\fB, struct drand48_data *\fP\fIbuffer\fP\fB);\fP +.PP +\fBint seed48_r(unsigned short \fP\fIseed16v[3]\fP\fB,\fP +\fB struct drand48_data *\fP\fIbuffer\fP\fB);\fP +.PP +\fBint lcong48_r(unsigned short \fP\fIparam[7]\fP\fB,\fP +\fB struct drand48_data *\fP\fIbuffer\fP\fB);\fP +.fi +.PP +.RS -4 +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): +.RE +.PP +.ad l +.\" .BR drand48_r (), +.\" .BR erand48_r (), +.\" .BR lrand48_r (), +.\" .BR nrand48_r (), +.\" .BR mrand48_r (), +.\" .BR jrand48_r (), +.\" .BR srand48_r (), +.\" .BR seed48_r (), +.\" .BR lcong48_r (): +All functions shown above: + /* Glibc since 2.19: */ _DEFAULT_SOURCE + || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.ad b +.SH 説明 +これらの関数は \fBdrand48\fP(3) で説明されている関数に類似するリエントラントな関数である。 大域的な乱数生成の状態を変更する代わりに、 +これらの関数は指定されたデータ \fIbuffer\fP を使う。 +.PP +最初に使う前に、この構造体は初期化されていなければならない。 初期化は、たとえば 0 で埋めたり、関数 \fBsrand48_r\fP(), +\fBseed48_r\fP(), \fBlcong48_r\fP() のいずれかを呼び出すことによって行われる。 +.SH 返り値 +返り値は 0 である。 +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.ad l +.TS +allbox; +lbw25 lb lb +l l l. +インターフェース 属性 値 +T{ +\fBdrand48_r\fP(), +\fBerand48_r\fP(), +\fBlrand48_r\fP(), +\fBnrand48_r\fP(), +\fBmrand48_r\fP(), +\fBjrand48_r\fP(), +\fBsrand48_r\fP(), +\fBseed48_r\fP(), +\fBlcong48_r\fP() +T} Thread safety MT\-Safe race:buffer +.TE +.ad +.SH 準拠 +これらの関数は GNU による拡張であり、移植性はない。 +.SH 関連項目 +\fBdrand48\fP(3), \fBrand\fP(3), \fBrandom\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/ecvt_r.3 b/manual/LDP_man-pages/draft/man3/ecvt_r.3 index e1e7efd5..7b022a3f 100644 --- a/manual/LDP_man-pages/draft/man3/ecvt_r.3 +++ b/manual/LDP_man-pages/draft/man3/ecvt_r.3 @@ -65,8 +65,8 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .ad l \fBecvt_r\fP(), \fBfcvt_r\fP(), \fBqecvt_r\fP(), \fBqfcvt_r\fP(): .RS 4 -/* Glibc since 2.19: */ _DEFAULT_SOURCE - || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +/* glibc 2.19 以降: */ _DEFAULT_SOURCE + || /* glibc 2.19 以前: */ _SVID_SOURCE || _BSD_SOURCE .RE .ad b .SH 説明 diff --git a/manual/LDP_man-pages/draft/man3/exit.3 b/manual/LDP_man-pages/draft/man3/exit.3 new file mode 100644 index 00000000..0274efef --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/exit.3 @@ -0,0 +1,135 @@ +.\" Copyright (C) 2001 Andries Brouwer . +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END +.\" +.\" FIXME . There are a lot of other process termination actions that +.\" could be listed on this page. See, for example, the list in the +.\" POSIX exit(3p) page. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 1997 HORIMOTO Masafumi +.\" all rights reserved. +.\" Translated 1997-09-10, HORIMOTO Masafumi +.\" Updated & Modified 2001-10-27, Yuichi SATO +.\" Updated & Modified 2001-12-09, Yuichi SATO +.\" Updated & Modified 2005-09-06, Akihiro MOTOKI +.\" Updated 2007-06-18, Akihiro MOTOKI, LDP v2.57 +.\" Updated 2013-05-01, Akihiro MOTOKI +.\" +.TH EXIT 3 2020\-02\-09 Linux "Linux Programmer's Manual" +.SH 名前 +exit \- プロセスの正常終了 +.SH 書式 +.nf +\fB#include \fP +.PP +\fBvoid exit(int \fP\fIstatus\fP\fB);\fP +.fi +.SH 説明 +\fBexit\fP() 関数は、プロセスを正常に終了させ、 \fIstatus\fP の最下位バイト (つまり \fIstatus & 0xFF\fP) +を親プロセスへ返す (\fBwait\fP(2) を参照)。 +.PP +\fBatexit\fP(3) や \fBon_exit\fP(3) によって 登録された全ての関数は、それらが登録された順番と逆順にコールされる。 +(登録された関数の中で \fBatexit\fP(3) or \fBon_exit\fP(3) を使って exit +処理中に実行される追加の関数を登録することができる; 新規に登録された関数は、この後で実行される関数リストの先頭に 追加される。) +これらの関数の一つが返らなかった場合 (例えば、その関数が \fB_exit\fP(2) を呼び出したり、シグナルで自分自身を kill した場合)、 +残りの関数はどれも呼び出されず、それ以降の exit 処理 (特に \fBstdio\fP(3) ストリームのフラッシュなど) は中止される。 ある関数が +\fBatexit\fP(3) や \fBon_exit\fP(3) を使って複数回登録されていた場合、 その関数は登録されたのと同じ回数だけ呼び出される。 +.PP +オープン中の \fBstdio\fP(3) ストリームは全てフラッシュされて、クローズされる。 \fBtmpfile\fP(3) +によって作成されたファイルは削除される。 +.PP +C 標準では \fBEXIT_SUCCESS\fP と \fBEXIT_FAILURE\fP という 2つの定数が +定義されている。それぞれ正常終了と異常終了を示すもので、 \fBexit\fP() として渡すことができる。 +.SH 返り値 +\fBexit\fP() 関数は返らない。 +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.TS +allbox; +lb lb lb +l l l. +インターフェース 属性 値 +T{ +\fBexit\fP() +T} Thread safety MT\-Unsafe race:exit +.TE +.PP +\fBexit\fP() 関数は保護されていないグローバル変数を使用しているため、スレッドセーフではない。 +.SH 準拠 +POSIX.1\-2001, POSIX.1\-2008, C89, C99, SVr4, 4.3BSD. +.SH 注意 +\fBatexit\fP(3) や \fBon_exit\fP(3) を使って登録された関数の中で \fBexit\fP() か \fBlongjmp\fP(3) +が呼び出された場合、 動作は未定義である。 \fBexecve\fP(2) を呼び出すと、 \fBatexit\fP(3) や \fBon_exit\fP(3) +を使って登録された関数が削除される点に注意すること。 +.PP +\fBEXIT_SUCCESS\fP と \fBEXIT_FAILURE\fP を使うと、0 や (1 や \-1 といった) 0 以外の値を使うのに比べて +(UNIX 以外の環境に) 移植するのがいくらか簡単になる。 特に VMS は別の方式を用いている。 +.PP +BSD は終了コードを標準化しようとしている (GNU C ライブラリなどのいくつかの C ライブラリもこれを採用している); +\fI\fP を参照すること。 +.PP +After \fBexit\fP(), the exit status must be transmitted to the parent process. +There are three cases: +.IP \(bu 3 +If the parent has set \fBSA_NOCLDWAIT\fP, or has set the \fBSIGCHLD\fP handler to +\fBSIG_IGN\fP, the status is discarded and the child dies immediately. +.IP \(bu +If the parent was waiting on the child, it is notified of the exit status +and the child dies immediately. +.IP \(bu +Otherwise, the child becomes a "zombie" process: most of the process +resources are recycled, but a slot containing minimal information about the +child process (termination status, resource usage statistics) is retained in +process table. This allows the parent to subsequently use \fBwaitpid\fP(2) +(or similar) to learn the termination status of the child; at that point the +zombie process slot is released. +.PP +.\" +\fBSIGCHLD\fP シグナルのサポートが実装されている場合、 このシグナルは親プロセスに送られる。 親プロセスが \fBSA_NOCLDWAIT\fP +を設定した場合、 \fBSIGCHLD\fP シグナルが送られるかどうかは定義されていない。 +.SS "Signals sent to other processes" +終了するプロセスがセッションのリーダーで、 そのプロセスの制御端末がそのセッションの制御端末である場合、 +この制御端末のフォアグラウンドプロセスグループにある 各プロセスに \fBSIGHUP\fP シグナルが送られ、端末がセッションから切り離される。 +これにより新しい制御プロセスを取得することができる。 +.PP +プロセスが終了することにより、プロセスグループが孤立して、 そのグループのメンバーのうちのどれかが停止した場合、 プロセスグループの各プロセスに対して +\fBSIGHUP\fP シグナルが送られ、続いて \fBSIGCONT\fP シグナルが送られる。 孤立した (orphaned) プロセスグループの説明は +\fBsetpgid\fP(2) を参照。 +.PP +Except in the above cases, where the signalled processes may be children of +the terminating process, termination of a process does \fInot\fP in general +cause a signal to be sent to children of that process. However, a process +can use the \fBprctl\fP(2) \fBPR_SET_PDEATHSIG\fP operation to arrange that it +receives a signal if its parent terminates. +.SH 関連項目 +\fB_exit\fP(2), \fBget_robust_list\fP(2), \fBsetpgid\fP(2), \fBwait\fP(2), \fBatexit\fP(3), +\fBon_exit\fP(3), \fBtmpfile\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/gcvt.3 b/manual/LDP_man-pages/draft/man3/gcvt.3 index d99c4148..b2a43bbb 100644 --- a/manual/LDP_man-pages/draft/man3/gcvt.3 +++ b/manual/LDP_man-pages/draft/man3/gcvt.3 @@ -77,7 +77,7 @@ _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 関数 \fBgcvt\fP() は、 \fInumber\fP を、最短の長さのヌル終端された ASCII 文字列へ変換し、変換後の文字列を \fIbuf\fP に格納する。 \fBprintf\fP(3) の F フォーマットや E フォーマットのように \fIndigit\fP 桁の 有効数字を生成する。 .SH 返り値 -The \fBgcvt\fP() function returns \fIbuf\fP. +\fBgcvt\fP() 関数は \fIbuf\fP を返す。 .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS diff --git a/manual/LDP_man-pages/draft/man3/getauxval.3 b/manual/LDP_man-pages/draft/man3/getauxval.3 new file mode 100644 index 00000000..378df0f3 --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/getauxval.3 @@ -0,0 +1,227 @@ +.\" Copyright 2012 Michael Kerrisk +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END +.\" +.\" See also https://lwn.net/Articles/519085/ +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH GETAUXVAL 3 2020\-06\-09 GNU "Linux Programmer's Manual" +.SH 名前 +getauxval \- 補助ベクトルから値を取得する +.SH 書式 +.nf +\fB#include \fP +.PP +\fBunsigned long getauxval(unsigned long \fP\fItype\fP\fB);\fP +.fi +.SH 説明 +\fBgetauxval\fP() 関数は補助ベクトル (auxiliary vector) から値を取得する。 補助ベクトルは、 +プログラムが実行される際に、 カーネルの ELF バイナリーローダーがユーザー空間にある種の情報を渡すのに使われる仕組みである。 +.PP +補助ベクトルの各エントリーは、 このエントリーを示すタイプとそのタイプの値のペアで構成される。 引き数 \fItype\fP が指定されると、 +\fBgetauxval\fP() は対応する値を返す。 +.PP +それぞれの \fItype\fP に対して返される値の詳細を以下に示す。 すべてのアーキテクチャーですべて \fItype\fP 値が存在するわけではない。 +.TP +\fBAT_BASE\fP +プログラムインタープリター (通常は動的ローダー) のベースアドレス。 +.TP +\fBAT_BASE_PLATFORM\fP +.\" commit e585b768da111f2c2d413de6214e83bbdfee8f22 +A pointer to a string (PowerPC and MIPS only). On PowerPC, this identifies +the real platform; may differ from \fBAT_PLATFORM\fP. On MIPS, this identifies +the ISA level (since Linux 5.7). +.TP +\fBAT_CLKTCK\fP +\fBtimes\fP(2) のカウントが行われる周波数。 この値は \fIsysconf(_SC_CLK_TCK)\fP でも取得できる。 +.TP +\fBAT_DCACHEBSIZE\fP +データキャッシュのブロックサイズ。 +.TP +\fBAT_EGID\fP +このスレッドの実効グループ ID。 +.TP +\fBAT_ENTRY\fP +実行ファイルのエントリーアドレス。 +.TP +\fBAT_EUID\fP +このスレッドの実効ユーザー ID。 +.TP +\fBAT_EXECFD\fP +プログラムのファイルディスクリプター。 +.TP +\fBAT_EXECFN\fP +A pointer to a string containing the pathname used to execute the program. +.TP +\fBAT_FLAGS\fP +フラグ (未使用)。 +.TP +\fBAT_FPUCW\fP +使用された FPU 制御ワード (SuperH アーキテクチャーのみ)。 カーネルが実行した FPU 初期化に関する情報を提供するためのものである。 +.TP +\fBAT_GID\fP +このスレッドの実グループ ID。 +.TP +\fBAT_HWCAP\fP +An architecture and ABI dependent bit\-mask whose settings indicate detailed +processor capabilities. The contents of the bit mask are hardware dependent +(for example, see the kernel source file +\fIarch/x86/include/asm/cpufeature.h\fP for details relating to the Intel x86 +architecture; the value returned is the first 32\-bit word of the array +described there). A human\-readable version of the same information is +available via \fI/proc/cpuinfo\fP. +.TP +\fBAT_HWCAP2\fP (glibc 2.18 以降) +Further machine\-dependent hints about processor capabilities. +.TP +\fBAT_ICACHEBSIZE\fP +.\" .TP +.\" .BR AT_IGNORE +.\" .TP +.\" .BR AT_IGNOREPPC +.\" .TP +.\" .BR AT_NOTELF +命令キャッシュのブロックサイズ。 +.TP +.\" Kernel commit 98a5f361b8625c6f4841d6ba013bbf0e80d08147 +\fBAT_L1D_CACHEGEOMETRY\fP +Geometry of the L1 data cache, encoded with the cache line size in bytes in +the bottom 16 bits and the cache associativity in the next 16 bits. The +associativity is such that if N is the 16\-bit value, the cache is N\-way set +associative. +.TP +\fBAT_L1D_CACHESIZE\fP +L1 データキャッシュのサイズ。 +.TP +\fBAT_L1I_CACHEGEOMETRY\fP +Geometry of the L1 instruction cache, encoded as for +\fBAT_L1D_CACHEGEOMETRY\fP. +.TP +\fBAT_L1I_CACHESIZE\fP +L1 命令キャッシュのサイズ。 +.TP +\fBAT_L2_CACHEGEOMETRY\fP +Geometry of the L2 cache, encoded as for \fBAT_L1D_CACHEGEOMETRY\fP. +.TP +\fBAT_L2_CACHESIZE\fP +L2 キャッシュのサイズ。 +.TP +\fBAT_L3_CACHEGEOMETRY\fP +Geometry of the L3 cache, encoded as for \fBAT_L1D_CACHEGEOMETRY\fP. +.TP +\fBAT_L3_CACHESIZE\fP +L3 キャッシュのサイズ。 +.TP +\fBAT_PAGESZ\fP +システムページサイズ (\fIsysconf(_SC_PAGESIZE)\fP が返す値と同じ)。 +.TP +\fBAT_PHDR\fP +実行プログラムのプログラムヘッダーのアドレス。 +.TP +\fBAT_PHENT\fP +プログラムヘッダーエントリーのサイズ。 +.TP +\fBAT_PHNUM\fP +プログラムヘッダー数。 +.TP +\fBAT_PLATFORM\fP +このプログラムが実行されているハードウェアプラットフォームを特定する文字列へのポインター。 動的リンカーは \fIrpath\fP +値の解釈を行う際にこの値を使用する。 +.TP +\fBAT_RANDOM\fP +ランダム値が入った 16 バイトがあるアドレス。 +.TP +\fBAT_SECURE\fP +Has a nonzero value if this executable should be treated securely. Most +commonly, a nonzero value indicates that the process is executing a +set\-user\-ID or set\-group\-ID binary (so that its real and effective UIDs or +GIDs differ from one another), or that it gained capabilities by executing a +binary file that has capabilities (see \fBcapabilities\fP(7)). Alternatively, +a nonzero value may be triggered by a Linux Security Module. When this +value is nonzero, the dynamic linker disables the use of certain environment +variables (see \fBld\-linux.so\fP(8)) and glibc changes other aspects of its +behavior. (See also \fBsecure_getenv\fP(3).) +.TP +\fBAT_SYSINFO\fP +vDSO のシステムコール関数へのエントリーポイント。すべてのアーキテクチャーで存在するわけではなく、 また必要というわけでもない (例えば +x86\-64 には存在しない)。 +.TP +\fBAT_SYSINFO_EHDR\fP +仮想動的共有オブジェクト (vDSO; virtual Dynamic Shared Object) が入ったページのアドレス。 vDSO は、 +特定のシステムコールの高速な実装を提供するためにカーネルが作成する共有オブジェクトである。 +.TP +\fBAT_UCACHEBSIZE\fP +ユニファイド (unified) キャッシュのブロックサイズ。 +.TP +\fBAT_UID\fP +このスレッドの実ユーザー ID。 +.SH 返り値 +成功すると、 \fBgetauxval\fP() は \fItype\fP に対応する値を返す。 \fItype\fP が見つからない場合には 0 を返す。 +.SH エラー +.TP +\fBENOENT\fP (glibc 2.19 以降) +.\" commit b9ab448f980e296eac21ac65f53783967cc6037b +\fItype\fP に対応するエントリーが補助ベクトルになかった。 +.SH バージョン +\fBgetauxval\fP() 関数は glibc バージョン 2.16 で追加された。 +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.TS +allbox; +lb lb lb +l l l. +インターフェース 属性 値 +T{ +\fBgetauxval\fP() +T} Thread safety MT\-Safe +.TE +.SH 準拠 +この関数は非標準で glibc による拡張である。 +.SH 注意 +補助ベクトルの情報を主に使用するのは、 動的ローダー \fBld\-linux.so\fP(8) である。 補助ベクトルは、 +カーネルが動的リンカーが通常もしくは常に必要とするある意味標準的な情報を伝えるための便利で効率的なショートカットである。 いくつかの場合では、 +同じ情報がシステムコール経由でも取得できるが、 補助ベクトルを使う方がコストがかからない。 +.PP +補助ベクトルには、 単に、 プロセスのアドレス空間の引き数リストと環境上に存在するだけである。 プログラム実行時に \fBLD_SHOW_AUXV\fP +環境変数を設定すると、 プログラムに渡された補助ベクトルを表示することができる。 +.PP +.in +4n +.EX +$ LD_SHOW_AUXV=1 sleep 1 +.EE +.in +.PP +任意のプロセスの補助ベクトルは (ファイルのアクセス許可があれば) \fI/proc/[pid]/auxv\fP 経由で取得できる。 詳細は +\fBproc\fP(5) を参照。 +.SH バグ +glibc 2.19 で \fBENOENT\fP エラーが追加される前は、 \fItype\fP が見つからなかった場合と \fItype\fP に対応する値が 0 +だった場合を明確に区別する方法がなかった。 +.SH 関連項目 +\fBsecure_getenv\fP(3), \fBvdso\fP(7), \fBld\-linux.so\fP(8) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/getenv.3 b/manual/LDP_man-pages/draft/man3/getenv.3 index 7ab1cadb..30a8a258 100644 --- a/manual/LDP_man-pages/draft/man3/getenv.3 +++ b/manual/LDP_man-pages/draft/man3/getenv.3 @@ -75,8 +75,7 @@ GNU 固有の \fBsecure_getenv\fP() 関数は \fBgetenv\fP() と同様だが、 .IP * プロセスの許可ケーパビリティセットが空でない場合。 .PP -Secure execution may also be required if triggered by some Linux security -modules. +Linux セキュリティモジュールにより要求された場合にも "secure execution" は必要となる場合がある。 .PP \fBsecure_getenv\fP() 関数は、 set\-user\-ID プログラムや set\-group\-ID プログラムが実行環境を偶然信用してしまった場合に起こり得る脆弱性を、 汎用ライブラリで回避するために使うことを意図して作られた。 diff --git a/manual/LDP_man-pages/draft/man3/getloadavg.3 b/manual/LDP_man-pages/draft/man3/getloadavg.3 index 6d465bfb..074fc506 100644 --- a/manual/LDP_man-pages/draft/man3/getloadavg.3 +++ b/manual/LDP_man-pages/draft/man3/getloadavg.3 @@ -62,11 +62,9 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 _BSD_SOURCE .fi .SH 説明 -The \fBgetloadavg\fP() function returns the number of processes in the system -run queue averaged over various periods of time. Up to \fInelem\fP samples are -retrieved and assigned to successive elements of \fIloadavg[]\fP. The system -imposes a maximum of 3 samples, representing averages over the last 1, 5, -and 15 minutes, respectively. +\fBgetloadavg\fP() 関数はシステムの実行キューに入っているプロセスの数を、 様々な期間について平均した値を返す。 \fInelem\fP +個までのサンプル値を取得し、 \fIloadavg[]\fP の連続する要素に代入する。 システムが提供するサンプル数は 3 個までで、 それぞれ最近 1, +5, 15 分の平均を表している。 .SH 返り値 .\" .SH HISTORY .\" The @@ -89,7 +87,7 @@ T} Thread safety MT\-Safe .TE .SH 準拠 .\" mdoc seems to have a bug - there must be no newline here -Not in POSIX.1. Present on the BSDs and Solaris. +POSIX.1 にはない。 BSD 系と Solaris に存在する。 .SH 関連項目 \fBuptime\fP(1), \fBproc\fP(5) .SH この文書について diff --git a/manual/LDP_man-pages/draft/man3/getsubopt.3 b/manual/LDP_man-pages/draft/man3/getsubopt.3 index e40cd026..1e596f55 100644 --- a/manual/LDP_man-pages/draft/man3/getsubopt.3 +++ b/manual/LDP_man-pages/draft/man3/getsubopt.3 @@ -51,7 +51,7 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .PD 0 .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED _XOPEN_SOURCE\ >= 500 - || /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L + || /* glibc 2.12 以降: */ _POSIX_C_SOURCE\ >=\ 200809L .PD .RE .ad @@ -104,7 +104,7 @@ POSIX.1\-2001, POSIX.1\-2008. .SH 注意 \fBgetsubopt\fP() は、文字列 *\fIoptionp\fP 中に見つけたカンマを上書きするので、文字列 \fI*optionp\fP は書き込み可能でなければならず、 文字列定数にすることはできない。 -.SH EXAMPLES +.SH 例 以下のプログラムは "\-o" オプションに続いてサブオプションがあることを 期待している。 .PP .EX diff --git a/manual/LDP_man-pages/draft/man3/malloc.3 b/manual/LDP_man-pages/draft/man3/malloc.3 new file mode 100644 index 00000000..90af309c --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/malloc.3 @@ -0,0 +1,230 @@ +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" and Copyright i2007, 2012, 2018, Michael Kerrisk +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END +.\" +.\" Modified Sat Jul 24 19:00:59 1993 by Rik Faith (faith@cs.unc.edu) +.\" Clarification concerning realloc, iwj10@cus.cam.ac.uk (Ian Jackson), 950701 +.\" Documented MALLOC_CHECK_, Wolfram Gloger (wmglo@dent.med.uni-muenchen.de) +.\" 2007-09-15 mtk: added notes on malloc()'s use of sbrk() and mmap(). +.\" +.\" FIXME . Review http://austingroupbugs.net/view.php?id=374 +.\" to see what changes are required on this page. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved. +.\" Translated 1998-08-12, NAKANO Takeo +.\" Modified 1998-12-18, NAKANO Takeo +.\" Modified 2000-08-23, NAKANO Takeo +.\" Modified 2001-05-19, Kentaro Shirakata +.\" Modified 2001-12-13, Kentaro Shirakata +.\" Modified 2005-03-15, Akihiro MOTOKI +.\" Modified 2007-10-12, Akihiro MOTOKI, LDP v2.66 +.\" +.TH MALLOC 3 2020\-06\-09 GNU "Linux Programmer's Manual" +.SH 名前 +malloc, free, calloc, realloc, reallocarray \- 動的なメモリーの割り当てと解放を行う +.SH 書式 +.nf +\fB#include \fP +.PP +\fBvoid *malloc(size_t \fP\fIsize\fP\fB);\fP +\fBvoid free(void \fP\fI*ptr\fP\fB);\fP +\fBvoid *calloc(size_t \fP\fInmemb\fP\fB, size_t \fP\fIsize\fP\fB);\fP +\fBvoid *realloc(void \fP\fI*ptr\fP\fB, size_t \fP\fIsize\fP\fB);\fP +\fBvoid *reallocarray(void \fP\fI*ptr\fP\fB, size_t \fP\fInmemb\fP\fB, size_t \fP\fIsize\fP\fB);\fP +.fi +.PP +.RS -4 +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): +.RE +.PP +\fBreallocarray\fP(): +.ad l + glibc 2.29 以降: + _DEFAULT_SOURCE + glibc 2.28 以前: + _GNU_SOURCE +.ad +.SH 説明 +.\" glibc does this: +\fBmalloc\fP() 関数は \fIsize\fP バイトを割り当て、 割り当てられたメモリーに対する +ポインターを返す。\fIメモリーの内容は初期化されない\fP。 \fIsize\fP が 0 の場合、 +\fBmalloc\fP() は NULL または \fBfree\fP() に後で渡しても問題の起こらない +一意なポインター値を返す。 +.PP +\fBfree\fP() 関数はポインター \fIptr\fP が指すメモリー空間を解放する。このポインターは、 +以前に呼び出された \fBmalloc\fP(), \fBcalloc\fP(), \fBrealloc\fP() のいずれかが返した値で +なければならない。これ以外のポインターを指定したり、すでに \fIfree(ptr)\fP が実行 +されていたりした場合の動作は定義されていない。 +\fIptr\fP が NULL の場合には、何の動作も行われない。 +.PP +.\" glibc does this: +The \fBcalloc\fP() function allocates memory for an array of \fInmemb\fP elements +of \fIsize\fP bytes each and returns a pointer to the allocated memory. The +memory is set to zero. If \fInmemb\fP or \fIsize\fP is 0, then \fBcalloc\fP() +returns either NULL, or a unique pointer value that can later be +successfully passed to \fBfree\fP(). If the multiplication of \fInmemb\fP and +\fIsize\fP would result in integer overflow, then \fBcalloc\fP() returns an +error. By contrast, an integer overflow would not be detected in the +following call to \fBmalloc\fP(), with the result that an incorrectly sized +block of memory would be allocated: +.PP +.in +4n +.EX +malloc(nmemb * size); +.EE +.in +.PP +\fBrealloc\fP() は、ポインター \fIptr\fP が示すメモリーブロックのサイズを \fIsize\fP バイト +に変更する。領域の先頭から、新旧のサイズの小さい方の位置までの範囲の内容は +変更されない。新しいサイズが前のサイズよりも大きい場合、追加されたメモリーは +初期化 \fIされない\fP。 +\fIptr\fP が NULL の場合には \fImalloc(size)\fP と等価である。 +\fIsize\fP が 0 で \fIptr\fP が NULL でない場合には、 \fIfree(ptr)\fP と等価である。 +\fIptr\fP が NULL 以外の場合、 \fIptr\fP は以前に呼び出された \fBmalloc\fP(), \fBcalloc\fP(), +\fBrealloc\fP() のいずれかが返した値でなければならない。 +\fIptr\fP が指す領域が移動されていた場合は \fIfree(ptr)\fP が実行される。 +.PP +The \fBreallocarray\fP() function changes the size of the memory block pointed +to by \fIptr\fP to be large enough for an array of \fInmemb\fP elements, each of +which is \fIsize\fP bytes. It is equivalent to the call +.PP +.in +4n + realloc(ptr, nmemb * size); +.in +.PP +However, unlike that \fBrealloc\fP() call, \fBreallocarray\fP() fails safely in +the case where the multiplication would overflow. If such an overflow +occurs, \fBreallocarray\fP() returns NULL, sets \fIerrno\fP to \fBENOMEM\fP, and +leaves the original block of memory unchanged. +.SH 返り値 +関数 \fBcalloc\fP() と \fBmalloc\fP() は、割り当てられたメモリーへのポインターを返す。 +割り当てられたメモリーは、あらゆる組み込み型に対応できるようにアラインメントされる。 エラーの場合、これらの関数は NULL を返す。 \fIsize\fP +が 0 で呼び出した \fBmalloc\fP() や、\fInmemb\fP か \fIsize\fP が 0 で呼び出した \fBcalloc\fP() が成功した場合にも +NULL が返される。 +.PP +\fBfree\fP() 関数は値を返さない。 +.PP +The \fBrealloc\fP() function returns a pointer to the newly allocated memory, +which is suitably aligned for any built\-in type, or NULL if the request +failed. The returned pointer may be the same as \fIptr\fP if the allocation +was not moved (e.g., there was room to expand the allocation in\-place), or +different from \fIptr\fP if the allocation was moved to a new address. If +\fIsize\fP was equal to 0, either NULL or a pointer suitable to be passed to +\fBfree\fP() is returned. If \fBrealloc\fP() fails, the original block is left +untouched; it is not freed or moved. +.PP +On success, the \fBreallocarray\fP() function returns a pointer to the newly +allocated memory. On failure, it returns NULL and the original block of +memory is left untouched. +.SH エラー +\fBcalloc\fP(), \fBmalloc\fP(), \fBrealloc\fP(), \fBreallocarray\fP() は以下のエラーで失敗することがある。 +.TP +\fBENOMEM\fP +Out of memory. Possibly, the application hit the \fBRLIMIT_AS\fP or +\fBRLIMIT_DATA\fP limit described in \fBgetrlimit\fP(2). +.SH バージョン +\fBreallocarray\fP() は glibc 2.26 で初めて登場した。 +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.TS +allbox; +lbw20 lb lb +l l l. +インターフェース 属性 値 +T{ +\fBmalloc\fP(), +\fBfree\fP(), +.br +\fBcalloc\fP(), +\fBrealloc\fP() +T} Thread safety MT\-Safe +.TE +.SH 準拠 +\fBmalloc\fP(), \fBfree\fP(), \fBcalloc\fP(), \fBrealloc\fP(): POSIX.1\-2001, +POSIX.1\-2008, C89, C99. +.PP +\fBreallocarray\fP() は非標準の拡張で、 OpenBSD 5.6 と FreeBSD 11.0 で初めて登場した。 +.SH 注意 +デフォルトでは、Linux は楽観的メモリー配置戦略を用いている。つまり、 \fBmalloc\fP() が NULL +でない値を返しても、そのメモリーが実際に利用可能であることが保証されない。システムがメモリー不足状態になったとき、メモリー不足解決器 (OOM +killer) によって一つまたは複数のプロセスが削除される。詳しい情報は、\fBproc\fP(5) の +\fI/proc/sys/vm/overcommit_memory\fP と \fIproc/sys/vm/oom_adj\fP、および Linux +カーネルのソースファイルの \fIDocumentation/vm/overcommit\-accounting.rst\fP を参照のこと。 +.PP +Normally, \fBmalloc\fP() allocates memory from the heap, and adjusts the size +of the heap as required, using \fBsbrk\fP(2). When allocating blocks of memory +larger than \fBMMAP_THRESHOLD\fP bytes, the glibc \fBmalloc\fP() implementation +allocates the memory as a private anonymous mapping using \fBmmap\fP(2). +\fBMMAP_THRESHOLD\fP is 128\ kB by default, but is adjustable using +\fBmallopt\fP(3). Prior to Linux 4.7 allocations performed using \fBmmap\fP(2) +were unaffected by the \fBRLIMIT_DATA\fP resource limit; since Linux 4.7, this +limit is also enforced for allocations performed using \fBmmap\fP(2). +.PP +マルチスレッドアプリケーションでのデータ破損を回避するため、内部では mutexを +使用して、これらの関数で利用されるメモリー管理用のデータ構造を保護している。 +複数のスレッドが同時にメモリーの確保や解放を行うようなマルチスレッドアプリケー +ションでは、これらの mutex の衝突が起こり得る。マルチスレッドアプリケーション +でのメモリー割り当て処理にスケーラビリティを持たせるために、glibc では mutex の +衝突が検出された際には追加の \fIメモリー割り当て領域\fP を作成する。 +追加領域の各々は、(\fBbrk\fP(2) や \fBmmap\fP(2) を使って) システムにより内部的に +割り当てられた大きな領域で、それぞれ独自の mutex により管理されている。 +.PP +SUSv2 では、 \fBmalloc\fP(), \fBcalloc\fP(), \fBrealloc\fP() は実行に失敗したときに \fIerrno\fP を +\fBENOMEM\fP に設定することになっている。 Glibc ではこれが守られていることを仮定している (またこれらのルーチンの glibc +バージョンはこのことを守っている)。 個人的に別の malloc の実装を使っていて、その malloc が\fIerrno\fP +を設定しない場合には、失敗した際に \fIerrno\fP にエラーの理由を設定しないライブラリルーチンがあるかもしれない。 +.PP +\fBmalloc\fP(), \fBcalloc\fP(), \fBrealloc\fP(), \fBfree\fP() における事故は、 ほとんどの場合はヒープの破壊 +(corruption) が原因である。 例えば、割り当てられた領域をオーバーフローする、 同じポインターに二度 free する、などがこれにあたる。 +.PP +\fBmalloc\fP 実装は、環境変数で動作を調整できる。 詳細は \fBmallopt\fP(3) を参照のこと。 +.SH 関連項目 +.\" http://g.oswego.edu/dl/html/malloc.html +.\" A Memory Allocator - by Doug Lea +.\" +.\" http://www.bozemanpass.com/info/linux/malloc/Linux_Heap_Contention.html +.\" Linux Heap, Contention in free() - David Boreham +.\" +.\" http://www.citi.umich.edu/projects/linux-scalability/reports/malloc.html +.\" malloc() Performance in a Multithreaded Linux Environment - +.\" Check Lever, David Boreham +.\" +.ad l +.nh +\fBvalgrind\fP(1), \fBbrk\fP(2), \fBmmap\fP(2), \fBalloca\fP(3), \fBmalloc_get_state\fP(3), +\fBmalloc_info\fP(3), \fBmalloc_trim\fP(3), \fBmalloc_usable_size\fP(3), +\fBmallopt\fP(3), \fBmcheck\fP(3), \fBmtrace\fP(3), \fBposix_memalign\fP(3) +.PP +For details of the GNU C library implementation, see +.UR https://sourceware.org/glibc/wiki/MallocInternals +.UE . +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/mbstowcs.3 b/manual/LDP_man-pages/draft/man3/mbstowcs.3 index 9612b71c..e4a22a7f 100644 --- a/manual/LDP_man-pages/draft/man3/mbstowcs.3 +++ b/manual/LDP_man-pages/draft/man3/mbstowcs.3 @@ -46,10 +46,8 @@ stop for three reasons: \fIn\fP 文字の L\(aq\e0\(aq 以外のワイド文字を \fIdest\fP に格納した場合。 この場合は \fI*src\fP が次に変換されるマルチバイト列を指すようにして、 \fIdest\fP に書き込まれたワイド文字の数を返す。しかしこの指している 場所のシフト状態は失われる。 .IP 3. -The multibyte string has been completely converted, including the -terminating null character (\(aq\e0\(aq). In this case, the number of wide -characters written to \fIdest\fP, excluding the terminating null wide -character, is returned. +マルチバイト文字列が終端のヌル文字 (\(aq\e0\(aq) まで含めて完全に変換された場合。この場合は終端のヌルワイド文字を除いて \fIdest\fP +に書き込まれた文字数を返す。 .PP プログラマーは \fIdest\fP に最低でも \fIn\fP ワイド文字を書き込むこ とができる空間があることを保証しなければならない。 .PP @@ -77,7 +75,7 @@ POSIX.1\-2001, POSIX.1\-2008, C99. \fBmbstowcs\fP() の動作は現在のロケールの \fBLC_CTYPE\fP カテゴリーに依存している。 .PP \fBmbsrtowcs\fP(3) 関数は同じ機能のより良いインターフェースを提供する。 -.SH EXAMPLES +.SH 例 下記のプログラムは \fBmbstowcs\fP() といくつかのワイド文字分類関数の使用方法を示したものである。実行例は以下のようになる。 .PP .in +4n diff --git a/manual/LDP_man-pages/draft/man3/mkdtemp.3 b/manual/LDP_man-pages/draft/man3/mkdtemp.3 index 1eb4cb14..f17efc6b 100644 --- a/manual/LDP_man-pages/draft/man3/mkdtemp.3 +++ b/manual/LDP_man-pages/draft/man3/mkdtemp.3 @@ -53,11 +53,11 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .ad l .RS 4 .PD 0 -/* Since glibc 2.19: */ _DEFAULT_SOURCE +/* glibc 2.19 以降: */ _DEFAULT_SOURCE .br -|| /* Glibc 2.19 and earlier: */ _BSD_SOURCE +|| /* glibc 2.19 以前: */ _BSD_SOURCE .br -|| /* Since glibc 2.10: */ _POSIX_C_SOURCE\ >=\ 200809L +|| /* glibc 2.10 以降: */ _POSIX_C_SOURCE\ >=\ 200809L .ad .PD .RE diff --git a/manual/LDP_man-pages/draft/man3/mktemp.3 b/manual/LDP_man-pages/draft/man3/mktemp.3 index a31516cb..cfbbae48 100644 --- a/manual/LDP_man-pages/draft/man3/mktemp.3 +++ b/manual/LDP_man-pages/draft/man3/mktemp.3 @@ -73,7 +73,7 @@ _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 .PD .ad b .SH 説明 -\fINever use this function\fP; see BUGS. +\fI決してこの関数は使用しないこと\fP。「バグ」を参照。 .PP 関数 \fBmktemp\fP() は引数 \fItemplate\fP から他と重ならない テンポラリファイル名を作成する。引数 \fItemplate\fP で指示する文字配列 の後6文字は XXXXXX である必要がある。この部分がファイル名を他と 重ならないにするような文字で置き換えられる。 @@ -106,12 +106,11 @@ T} Thread safety MT\-Safe .\" .IR . 4.3BSD, POSIX.1\-2001. POSIX.1\-2008 では \fBmktemp\fP() の仕様が削除されている。 .SH バグ -Never use \fBmktemp\fP(). Some implementations follow 4.3BSD and replace -XXXXXX by the current process ID and a single letter, so that at most 26 -different names can be returned. Since on the one hand the names are easy -to guess, and on the other hand there is a race between testing whether the -name exists and opening the file, every use of \fBmktemp\fP() is a security -risk. The race is avoided by \fBmkstemp\fP(3) and \fBmkdtemp\fP(3). +\fBmktemp\fP() を決して使わないこと。4.3BSD 系の実装や XXXXXX を プロセス ID +と1文字により置き換える方式ではせいぜい26の名前を返す ことができるにすぎない。 +この名前は簡単に推測できることや、その名前がすでに存在しているかどうか テストして、そのファイルをオープンする間に競合がある事から、 +\fBmktemp\fP() を使うのは毎回セキュリティリスクをおかすことになる。 この競合は \fBmkstemp\fP(3) や \fBmkdtemp\fP(3) +を使うことで避けられる。 .SH 関連項目 \fBmktemp\fP(1), \fBmkdtemp\fP(3), \fBmkstemp\fP(3), \fBtempnam\fP(3), \fBtmpfile\fP(3), \fBtmpnam\fP(3) diff --git a/manual/LDP_man-pages/draft/man3/putenv.3 b/manual/LDP_man-pages/draft/man3/putenv.3 index 9738cced..d9f7d0bf 100644 --- a/manual/LDP_man-pages/draft/man3/putenv.3 +++ b/manual/LDP_man-pages/draft/man3/putenv.3 @@ -106,14 +106,11 @@ POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD. \fBputenv\fP() はリエントラントであることを求められていない。 glibc 2.0 ではリエントラントではない。 glibc 2.1 ではリエントラントである。 .PP -Since version 2.1.2, the glibc implementation conforms to SUSv2: the pointer -\fIstring\fP given to \fBputenv\fP() is used. In particular, this string becomes -part of the environment; changing it later will change the environment. -(Thus, it is an error to call \fBputenv\fP() with an automatic variable as the -argument, then return from the calling function while \fIstring\fP is still -part of the environment.) However, glibc versions 2.0 to 2.1.1 differ: a -copy of the string is used. On the one hand this causes a memory leak, and -on the other hand it violates SUSv2. +バージョン 2.1.2 以降では、 glibc の実装は SUSv2 に準拠している。 \fBputenv\fP() で与えられたポインター +\fIstring\fP が使われる。 この文字列は環境の一部となり、後で変更すると環境も変わる。 (従って、 \fBputenv\fP() +を自動変数を引数として呼び出し、 \fIstring\fPが環境の一部のままで呼び出した関数から return するとエラーになる) しかし、glibc +バージョン 2.0 から 2.1.1 まででは違っており、文字列のコピーが使われる。 これはメモリーリークを引き起こすだけでなく、 SUSv2 +にも違反している。 .PP 4.4BSD バージョンでは、glibc 2.0 と同様にコピーを使う。 .PP diff --git a/manual/LDP_man-pages/draft/man3/rand.3 b/manual/LDP_man-pages/draft/man3/rand.3 index d0edf154..58f9d2ca 100644 --- a/manual/LDP_man-pages/draft/man3/rand.3 +++ b/manual/LDP_man-pages/draft/man3/rand.3 @@ -70,10 +70,10 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .PP \fBrand_r\fP(): .RS 4 -Since glibc 2.24: +glibc 2.24 以降: _POSIX_C_SOURCE >= 199506L .br -Glibc 2.23 and earlier +glibc 2.23 以前 _POSIX_C_SOURCE .RE .SH 説明 @@ -85,11 +85,9 @@ Glibc 2.23 and earlier .PP 種の値が与えられない場合には、 \fBrand\fP() 関数は 自動的に 1 を種とする。 .PP -The function \fBrand\fP() is not reentrant, since it uses hidden state that is -modified on each call. This might just be the seed value to be used by the -next call, or it might be something more elaborate. In order to get -reproducible behavior in a threaded application, this state must be made -explicit; this can be done using the reentrant function \fBrand_r\fP(). +\fBrand\fP() 関数は再入可能 (reentrant) +ではない。この関数には隠し状態があり、呼び出される度にこの隠し状態が変更されるからである。ちょうどこの隠し状態が次の呼び出し時の乱数の種として使われるようなものである。実際にはもう少し複雑かもしれないが。スレッドを使用するアプリケーションで再現可能な動作をさせたい場合には、この状態を明示的に指定できなければならない。これを行うには、再入可能な +\fBrand_r\fP() 関数を使用する。 .PP \fBrand\fP() と同様、 \fBrand_r\fP() は [0,\ \fBRAND_MAX\fP] の範囲の疑似乱数整数を返す。 \fIseedp\fP 引き数は、\fBrand_r\fP() の呼び出し間で状態を保持するために使用される @@ -126,7 +124,7 @@ T} Thread safety MT\-Safe \fBrand\fP() の実装や、他のシステムの現在の実装では、下位のビットが上位のビットほど ランダムになっていない。移植性を高める場合でも、精度の高い乱数が必要な アプリケーションではこの関数は使用してはいけない (代わりに \fBrandom\fP(3) を使うこと)。 -.SH EXAMPLES +.SH 例 POSIX 1003.1\-2003 では、 \fBrand\fP() と \fBsrand\fP() の実装例として以下を挙げている。これは、異なる2つのマシンで同じ乱数系列が 必要な場合には便利であろう。 .PP diff --git a/manual/LDP_man-pages/draft/man3/random.3 b/manual/LDP_man-pages/draft/man3/random.3 new file mode 100644 index 00000000..2432a089 --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/random.3 @@ -0,0 +1,147 @@ +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" 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 +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Mar 28 00:25:51 1993, David Metcalfe +.\" Modified Sat Jul 24 18:13:39 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Sun Aug 20 21:47:07 2000, aeb +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 1997 YOSHINO Takashi +.\" all rights reserved. +.\" Translated 1997-01-21, YOSHINO Takashi +.\" Updated 2008-08-08, Akihiro MOTOKI +.\" Updated 2013-07-24, Akihiro MOTOKI +.\" +.TH RANDOM 3 2020\-11\-01 GNU "Linux Programmer's Manual" +.SH 名前 +random, srandom, initstate, setstate \- 乱数を生成する関数 +.SH 書式 +.nf +\fB#include \fP +.PP +\fBlong random(void);\fP +.PP +\fBvoid srandom(unsigned \fP\fIseed\fP\fB);\fP +.PP +\fBchar *initstate(unsigned \fP\fIseed\fP\fB, char *\fP\fIstate\fP\fB, size_t \fP\fIn\fP\fB);\fP +.PP +\fBchar *setstate(char *\fP\fIstate\fP\fB);\fP +.fi +.PP +.RS -4 +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): +.RE +.PP +.ad l +\fBrandom\fP(), \fBsrandom\fP(), \fBinitstate\fP(), \fBsetstate\fP(): +.RS 4 +.\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED +_XOPEN_SOURCE\ >=\ 500 + || /* Glibc since 2.19: */ _DEFAULT_SOURCE + || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.RE +.ad +.SH 説明 +\fBrandom\fP() 関数は、非線形加法フィードバックを用いた乱数生成関数である。 この関数は、0 から 2^31\ \-\ 1 +までの疑似乱数を返す。 そのために 31 個のロング整数からなるデフォルトの表を使用する。 この乱数を生成する関数の周期はとても長く、およそ \fI16\ *\ ((2^31)\ \-\ 1)\fP である。 +.PP +\fBsrandom\fP() 関数は、 \fBrandom\fP() で返される疑似乱数整数系列の種を設定する。 そのためには新しい種を引数にして +\fBsrandom\fP() を呼べばよい。 \fBrandom\fP() で生成される系列は、 引数に同じ種の値を用いて \fBsrandom\fP() +を呼ぶことで再現可能である。 種の値が与えられない場合には \fBrandom\fP() 関数は、自動的に 1 を種に設定する。 +.PP +The \fBinitstate\fP() function allows a state array \fIstate\fP to be initialized +for use by \fBrandom\fP(). The size of the state array \fIn\fP is used by +\fBinitstate\fP() to decide how sophisticated a random number generator it +should use\(emthe larger the state array, the better the random numbers will +be. Current "optimal" values for the size of the state array \fIn\fP are 8, +32, 64, 128, and 256 bytes; other amounts will be rounded down to the +nearest known amount. Using less than 8 bytes results in an error. \fIseed\fP +is the seed for the initialization, which specifies a starting point for the +random number sequence, and provides for restarting at the same point. +.PP +\fBsetstate\fP() 関数は、 \fBrandom\fP() で使用される状態配列を変更する。 状態配列 \fIstate\fP は、 +\fBinitstate\fP() または \fBsetstate\fP() が 次に呼び出されるまで、乱数の生成に使用される。 \fIstate\fP は +\fBinitstate\fP() を用いて最初に初期化されているか、 以前に呼び出した \fBsetstate\fP() の結果でなければならない。 +.SH 返り値 +関数 \fBrandom\fP() と \fBrand_r\fP() は 0 以上 \fI(2^31)\ \-\ 1\fP 以下の数を返す。関数 \fBsrandom\fP() +は値を返さない。 +.PP +関数 \fBinitstate\fP() は、変更前の状態配列へのポインターを返す。エラーの場合、 \fIerrno\fP に原因を示す値が設定される。 +.PP +関数 \fBsetstate\fP() は、成功すると 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP にエラーの原因を示す値が設定される。 +.SH エラー +.TP +\fBEINVAL\fP +\fBsetstate\fP() の引き数 \fIstate\fP が NULL であった。 +.TP +\fBEINVAL\fP +\fBinitstate\fP() で8バイトよりも小さい状態配列を指定した。 +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.TS +allbox; +lbw23 lb lb +l l l. +インターフェース 属性 値 +T{ +\fBrandom\fP(), +\fBsrandom\fP(), +.br +\fBinitstate\fP(), +\fBsetstate\fP() +T} Thread safety MT\-Safe +.TE +.SH 準拠 +POSIX.1\-2001, POSIX.1\-2008, 4.3BSD. +.SH 注意 +The \fBrandom\fP() function should not be used in multithreaded programs where +reproducible behavior is required. Use \fBrandom_r\fP(3) for that purpose. +.PP +乱数の生成は複雑な話題である。 \fINumerical Recipes in C: The Art of Scientific Computing\fP +(William H.\& Press, Brian P.\& Flannery, Saul A.\& Teukolsky, William T.\& +Vetterling; New York: Cambridge University Press, 2007, 3rd ed.) +では実用的な乱数生成を論点とした優れた議論が第 7 章 (乱数) で展開されている。 +.PP +より理論的な議論については Donald E.\& Knuth の \fIThe Art of Computer Programming\fP, volume +2 (Seminumerical Algorithms), 2nd ed.; Reading, Massachusetts: +Addison\-Wesley Publishing Company, 1981 の第 3 章 (乱数) を見よ。ここでは、 +たくさんの実用的な話題についても深く網羅されている。 +.SH バグ +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=15380 +POSIX では、エラー時に \fBinitstate\fP() は NULL を返すべきとされている。 glibc の実装では、エラー時に \fIerrno\fP +は仕様通りに設定されるが、関数の返り値は NULL ではない。 +.SH 関連項目 +\fBgetrandom\fP(2), \fBdrand48\fP(3), \fBrand\fP(3), \fBrandom_r\fP(3), \fBsrand\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/random_r.3 b/manual/LDP_man-pages/draft/man3/random_r.3 index 244f91e6..fe0a428e 100644 --- a/manual/LDP_man-pages/draft/man3/random_r.3 +++ b/manual/LDP_man-pages/draft/man3/random_r.3 @@ -57,8 +57,8 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .ad l \fBrandom_r\fP(), \fBsrandom_r\fP(), \fBinitstate_r\fP(), \fBsetstate_r\fP(): .RS 4 -/* Glibc since 2.19: */ _DEFAULT_SOURCE - || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +/* glibc 2.19 以降: */ _DEFAULT_SOURCE + || /* glibc 2.19 以前: */ _SVID_SOURCE || _BSD_SOURCE .RE .ad b .SH 説明 diff --git a/manual/LDP_man-pages/draft/man3/rpmatch.3 b/manual/LDP_man-pages/draft/man3/rpmatch.3 index 36a92881..97075266 100644 --- a/manual/LDP_man-pages/draft/man3/rpmatch.3 +++ b/manual/LDP_man-pages/draft/man3/rpmatch.3 @@ -63,9 +63,7 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 プログラムが \fBsetlocale\fP(3) を呼び出して環境変数の変更を有効にした場合、 環境変数 \fBLANG\fP, \fBLC_MESSAGES\fP, \fBLC_ALL\fP が ユーザーの言語設定として考慮される。 .PP -Regardless of the locale, responses matching \fB\(ha[Yy]\fP are always accepted -as affirmative, and those matching \fB\(ha[Nn]\fP are always accepted as -negative. +ロケールに関わらず、\fB\(ha[Yy]\fP にマッチする応答は常に肯定だと解釈され、 \fB\(ha[Nn]\fP にマッチする応答は常に否定だと解釈される。 .SH 返り値 \fIresponse\fP を検査した後、 \fBrpmatch\fP() は否定的な応答 ("no") と認識した場合は 0 を返し、 肯定的な応答 ("yes") と認識した場合は 1 を返す。 \fIresponse\fP の値を解釈できなかった場合は \-1 を返す。 @@ -92,13 +90,11 @@ T} Thread safety MT\-Safe locale .\" It is available on at least AIX 5.1 and FreeBSD 6.0. \fBrpmatch\fP() はどの標準でも必須となっていないが、 Linux 以外にも利用できるシステムもいくつかは存在する。 .SH バグ -The \fBrpmatch\fP() implementation looks at only the first character of -\fIresponse\fP. As a consequence, "nyes" returns 0, and "ynever; not in a -million years" returns 1. It would be preferable to accept input strings -much more strictly, for example (using the extended regular expression -notation described in \fBregex\fP(7)): \fB\(ha([yY]|yes|YES)$\fP and -\fB\(ha([nN]|no|NO)$\fP. -.SH EXAMPLES +\fBrpmatch\fP() の実装は \fIresponse\fP の最初の 1 文字だけを見ているようである。その結果、 "nyes" は 0 を返し、 +"ynever; not in a million years" は 1 を返すことになる。 入力文字列をもっと厳密に解釈した方がよいだろう。 例えば、 +(\fBregex\fP(7) で説明されている拡張正規表現を使って) \fB\(ha([yY]|yes|YES)$\fP や +\fB\(ha([nN]|no|NO)$\fP で解釈するなど。 +.SH 例 以下のプログラムは、コマンドライン引き数で 指定された文字列を \fBrpmatch\fP() に渡した場合の結果を表示する。 .PP .EX diff --git a/manual/LDP_man-pages/draft/man3/setenv.3 b/manual/LDP_man-pages/draft/man3/setenv.3 index 3ec2c3a7..2b2b141a 100644 --- a/manual/LDP_man-pages/draft/man3/setenv.3 +++ b/manual/LDP_man-pages/draft/man3/setenv.3 @@ -80,8 +80,8 @@ _POSIX_C_SOURCE\ >=\ 200112L \fBunsetenv\fP() 関数は、変数 \fIname\fP を環境から削除する。 \fIname\fP が環境にない場合、この関数は成功し、環境は変更されない。 .SH 返り値 -\fBsetenv\fP() and \fBunsetenv\fP() functions return zero on success, or \-1 on -error, with \fIerrno\fP set to indicate the cause of the error. +関数 \fBsetenv\fP() と \fBunsetenv\fP() は、成功すると 0 を返す。 エラーの場合は \-1 を返し、 \fIerrno\fP +を設定してエラーの原因を示す。 .SH エラー .TP \fBEINVAL\fP @@ -106,15 +106,14 @@ T} Thread safety MT\-Unsafe const:env .SH 準拠 POSIX.1\-2001, POSIX.1\-2008, 4.3BSD. .SH 注意 -POSIX.1 does not require \fBsetenv\fP() or \fBunsetenv\fP() to be reentrant. +POSIX.1 は、 \fBsetenv\fP() や \fBunsetenv\fP() がリエントラント (再入可能) であることを要求していない。 .PP -Prior to glibc 2.2.2, \fBunsetenv\fP() was prototyped as returning \fIvoid\fP; -more recent glibc versions follow the POSIX.1\-compliant prototype shown in -the SYNOPSIS. +glibc 2.2.2 以前では、 \fBunsetenv\fP() は 返り値が \fIvoid\fP のプロトタイプであった。 もっと最近の glibc +版は、「書式」セクションで示しているように POSIX.1 互換のプロトタイプである。 .SH バグ -POSIX.1 specifies that if \fIname\fP contains an \(aq=\(aq character, then -\fBsetenv\fP() should fail with the error \fBEINVAL\fP; however, versions of -glibc before 2.3.4 allowed an \(aq=\(aq sign in \fIname\fP. +POSIX.1 では 「\fIname\fP に \(aq=\(aq 文字が含まれる場合、 \fBsetenv\fP() はエラー \fBEINVAL\fP +で失敗すべきである」と述べられている。 しかし 2.3.4 より前のバージョンの glibc では、 \fIname\fP に \(aq=\(aq +文字が含まれるのを許している。 .SH 関連項目 \fBclearenv\fP(3), \fBgetenv\fP(3), \fBputenv\fP(3), \fBenviron\fP(7) .SH この文書について diff --git a/manual/LDP_man-pages/draft/man3/strtod.3 b/manual/LDP_man-pages/draft/man3/strtod.3 index 8b699465..74c7fdb8 100644 --- a/manual/LDP_man-pages/draft/man3/strtod.3 +++ b/manual/LDP_man-pages/draft/man3/strtod.3 @@ -152,7 +152,7 @@ POSIX.1\-2001, POSIX.1\-2008, C99. .\" extra information to be represented in the NaN's significant." glibc の実装では、"NAN" の後ろに置くことができる \fIn\-char\-sequence\fP は、整数値として解釈される (基数の 8 や 16 を示す '0' や '0x' を接頭辞として付けることができる)。 この整数値は返り値の仮数部として使われる。 -.SH EXAMPLES +.SH 例 \fBstrtol\fP(3) のマニュアルページの例を参照。 このページで説明した関数の使用方法も同様である。 .SH 関連項目 \fBatof\fP(3), \fBatoi\fP(3), \fBatol\fP(3), \fBnan\fP(3), \fBnanf\fP(3), \fBnanl\fP(3), diff --git a/manual/LDP_man-pages/draft/man3/strtol.3 b/manual/LDP_man-pages/draft/man3/strtol.3 new file mode 100644 index 00000000..34dfa84c --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/strtol.3 @@ -0,0 +1,213 @@ +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2006 Michael Kerrisk +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" 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 +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Jul 25 10:53:39 1993 by Rik Faith (faith@cs.unc.edu) +.\" Added correction due to nsd@bbc.com (Nick Duffek) - aeb, 950610 +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 1999 AKAMATSU, Kazuo +.\" all rights reserved. +.\" Translated Thu Jan 9 21:00:00 JST 1999 +.\" by AKAMATSU, Kazuo +.\" Updated Sun Apr 8 JST 2001 by Kentaro Shirakata +.\" Updated Sat Mar 23 JST 2002 by Kentaro Shirakata +.\" Updated & Modified 2006-07-20, +.\" Akihiro MOTOKI , LDP v2.36 +.\" Updated 2012-05-04, Akihiro MOTOKI +.\" +.TH STRTOL 3 2020\-11\-01 GNU "Linux Programmer's Manual" +.SH 名前 +strtol, strtoll, strtoq \- 文字列を long int に変換する +.SH 書式 +.nf +\fB#include \fP +.PP +\fBlong strtol(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB, int \fP\fIbase\fP\fB);\fP +.PP +\fBlong long strtoll(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB, int \fP\fIbase\fP\fB);\fP +.fi +.PP +.RS -4 +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): +.RE +.PP +.ad l +\fBstrtoll\fP(): +.RS 4 +_ISOC99_SOURCE + || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.RE +.ad +.SH 説明 +\fBstrtol\fP() 関数は、 \fInptr\fP の文字列の最初の部分を、 \fIbase\fP を基数として long int に変換する。 この +\fIbase\fP は 2 から 36 までの値 あるいは特別な意味を持つ値 0 でなければならない。 +.PP +文字列の先頭には、任意の数の空白があってもよく (空白は \fBisspace\fP(3) で判定される)、また数字の直前には \(aq+\(aq か +\(aq\-\(aq の 符号があってもよい。 \fIbase\fP が 0 または 16 の場合には、文字列の先頭に "0x" か "0X" を置くことが +でき、その場合には文字列は 16進数として扱われる。 これ以外の文字列で \fIbase\fP が 0 の場合は、 文字列が \(aq0\(aq +で始まるときは 8進数として、 それ以外のときは 10進数として扱われる。 +.PP +数字を表す文字列は \fIlong\fP に変換されるが、基数に対して 有効でない数字が現れた時点で変換は終了する。(11進数以上では \(aqA\(aq は +大文字・小文字に関わらず 10 を表し、 \(aqB\(aq は 11 を表現し、 以下同様に、 \(aqZ\(aq は 35 を表す。) +.PP +\fIendptr\fP がヌル値 (NULL) でない場合は、最初に現れた不正な文字が \fBstrtol\fP() によって \fI*endptr\fP +に保存されている。 文字列に有効な数字がひとつもなければ、 \fBstrtol\fP() は \fInptr\fP の元の値を \fI*endptr\fP に代入する +(そして 0 を返す)。 特に、\fI*nptr\fP が \(aq\e0\(aq 以外で、返された \fI**endptr\fP が \(aq\e0\(aq +ならば、文字列全体が有効だったことになる。 +.PP +\fBstrtoll\fP() 関数は \fBstrtol\fP() と同様だが、 \fIlong long\fP 型の値を返す。 +.SH 返り値 +アンダーフローもオーバーフローも起きなかった場合、 \fBstrtol\fP() 関数は 変換された値を返す。オーバーフローした場合には +\fBLONG_MAX\fP が返り、 アンダーフローした場合には \fBLONG_MIN\fP が返る。オーバーフロー、 アンダーフローのいずれの場合にも +大域変数 \fIerrno\fP には \fBERANGE\fP が設定される。 \fBstrtoll\fP() も同様であるが、 \fBLONG_MIN\fP と +\fBLONG_MAX\fP の代わりに \fBLLONG_MIN\fP と \fBLLONG_MAX\fP が返される。 +.SH エラー +.TP +\fBEINVAL\fP +(C99 にはない) 指定された \fIbase\fP がサポートされていない値である。 +.TP +\fBERANGE\fP +結果の値が範囲外である。 +.PP +実装によっては、変換が行われなかった場合 (数字がなく、0 を返した場合)、 \fIerrno\fP に \fBEINVAL\fP が設定される場合がある。 +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.TS +allbox; +lbw29 lb lb +l l l. +インターフェース 属性 値 +T{ +\fBstrtol\fP(), +\fBstrtoll\fP(), +\fBstrtoq\fP() +T} Thread safety MT\-Safe locale +.TE +.SH 準拠 +\fBstrtol\fP(): POSIX.1\-2001, POSIX.1\-2008, C89, C99 SVr4, 4.3BSD. +.PP +\fBstrtoll\fP(): POSIX.1\-2001, POSIX.1\-2008, C99. +.SH 注意 +\fBstrtol ()\fP からは成功、失敗どちらの場合でも 0, \fBLONG_MAX\fP, \fBLONG_MIN\fP (\fBstrtoll\fP() では +\fBLLONG_MAX\fP, \fBLLONG_MIN\fP) が返る可能性があるので、 プログラムは関数を呼び出す前に \fIerrno\fP を 0 +に設定し、呼び出し後に \fIerrno\fP が 0 以外の値かどうかを確認しエラーが発生したかどうかを判断する 必要がある。 +.PP +POSIX.1 では、 "C" と "POSIX" 以外のロケールでは、これらの関数は、他の実装時に定義される数字を示す文字列を受け付けるとされている。 +.PP +BSD には、 +.PP +.in +4n +.EX +\fBquad_t strtoq(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB, int \fP\fIbase\fP\fB);\fP +.EE +.in +.PP +という完全に同様の定義を持つ関数がある。 使用中のアーキテクチャーのワード長次第であるが、この関数は \fBstrtoll\fP() か +\fBstrtol\fP() と等価となることもある。 +.SH 例 +以下のプログラムは \fBstrtol\fP() の使用例である。 最初のコマンドライン引き数には \fBstrtol\fP() +が数字として解釈する文字列を指定する。 (省略可能な) 二番目の引き数には 変換に使用される基数を指定する (この引き数は \fBatoi\fP(3) +を使って数値に変換される。 \fBatoi\fP(3) は \fBstrtol\fP() よりも簡単なインターフェースを持つ関数で、 +その中ではエラーチェックは行われない)。 このプログラムの実行例をいくつか以下に示す: +.PP +.in +4n +.EX +$\fB ./a.out 123\fP +strtol() returned 123 +$\fB ./a.out \(aq 123\(aq\fP +strtol() returned 123 +$\fB ./a.out 123abc\fP +strtol() returned 123 +Further characters after number: "abc" +$\fB ./a.out 123abc 55\fP +strtol: Invalid argument +$\fB ./a.out \(aq\(aq\fP +No digits were found +$\fB ./a.out 4000000000\fP +strtol: Numerical result out of range +.EE +.in +.SS プログラムのソース +\& +.EX +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + int base; + char *endptr, *str; + long val; + + if (argc < 2) { + fprintf(stderr, "Usage: %s str [base]\en", argv[0]); + exit(EXIT_FAILURE); + } + + str = argv[1]; + base = (argc > 2) ? atoi(argv[2]) : 0; + + errno = 0; /* To distinguish success/failure after call */ + val = strtol(str, &endptr, base); + + /* Check for various possible errors */ + + if (errno != 0) { + perror("strtol"); + exit(EXIT_FAILURE); + } + + if (endptr == str) { + fprintf(stderr, "No digits were found\en"); + exit(EXIT_FAILURE); + } + + /* If we got here, strtol() successfully parsed a number */ + + printf("strtol() returned %ld\en", val); + + if (*endptr != \(aq\e0\(aq) /* Not necessarily an error... */ + printf("Further characters after number: \e"%s\e"\en", endptr); + + exit(EXIT_SUCCESS); +} +.EE +.SH 関連項目 +\fBatof\fP(3), \fBatoi\fP(3), \fBatol\fP(3), \fBstrtod\fP(3), \fBstrtoimax\fP(3), +\fBstrtoul\fP(3), +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/strtoul.3 b/manual/LDP_man-pages/draft/man3/strtoul.3 new file mode 100644 index 00000000..80e775ae --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/strtoul.3 @@ -0,0 +1,148 @@ +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" 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 +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Jul 25 10:54:03 1993 by Rik Faith (faith@cs.unc.edu) +.\" Fixed typo, aeb, 950823 +.\" 2002-02-22, joey, mihtjel: Added strtoull() +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 1999 AKAMATSU, Kazuo +.\" and 2006 Akihiro MOTOKI +.\" all rights reserved. +.\" Translated Thu Jan 31 18:00:00 JST 1999 +.\" by AKAMATSU, Kazuo +.\" Updated & Modified 2006-07-20, +.\" Akihiro MOTOKI , LDP v2.36 +.\" +.TH STRTOUL 3 2020\-11\-01 GNU "Linux Programmer's Manual" +.SH 名前 +strtoul, strtoull, strtouq \- 文字列を unsigned long int に変換する +.SH 書式 +.nf +\fB#include \fP +.PP +\fBunsigned long strtoul(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB, int \fP\fIbase\fP\fB);\fP +.PP +\fBunsigned long long strtoull(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB,\fP +\fB int \fP\fIbase\fP\fB);\fP +.fi +.PP +.RS -4 +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): +.RE +.PP +.ad l +\fBstrtoull\fP(): +.RS 4 +_ISOC99_SOURCE || + || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.RE +.ad +.SH 説明 +\fBstrtoul\fP() 関数は、 \fInptr\fP の文字列の最初の部分を、 \fIbase\fP を基数として \fIunsigned long\fP +に変換する。 この \fIbase\fP は 2 から 36 までの値 あるいは特別な意味を持つ値 0 でなければならない。 +.PP +文字列の先頭には、任意の数の空白があってもよく (空白は \fBisspace\fP(3) で判定される)、また数字の直前には \(aq+\(aq か +\(aq\-\(aq の 符号があってもよい。 \fIbase\fP が 0 または 16 の場合には、文字列の先頭に "0x" を置くことが +でき、その場合には文字列は 16進数として扱われる。 これ以外の文字列で \fIbase\fP が 0 の場合は、 文字列が \(aq0\(aq +で始まるときは 8進数として、 それ以外のときは 10進数として扱われる。 +.PP +文字列の残りの部分は \fIunsigned long\fP に変換されるが、基数に対して 有効でない数字が現れた時点で変換は終了する。(11進数以上では +\(aqA\(aq は 大文字・小文字に関わらず 10 を表し、 \(aqB\(aq は 11 を表現し, 以下同様に、 \(aqZ\(aq は 35 +を表す。) +.PP +\fIendptr\fP がヌル値 (NULL) でない場合、 \fBstrtoul\fP() は最初に不正な文字が現れたアドレスを \fI*endptr\fP +に格納している。 文字列に有効な数字がひとつもなければ、 \fBstrtoul\fP() は \fInptr\fP の元の値を \fI*endptr\fP +に代入する(そして 0 を返す)。 特に、 \fI*nptr\fP が \(aq\e0\(aq 以外で、返された \fI**endptr\fP が +\(aq\e0\(aq ならば、文字列全体が有効だったことになる。 +.PP +\fBstrtoull\fP() 関数は \fBstrtoul\fP() 関数と同様だが、 \fIunsigned long long\fP 型の値を返す。 +.SH 返り値 +\fBstrtoul\fP() 関数は変換結果を返す。文字列がマイナス符号から始まっていた場 合は、(符号反転前の値がオーバーフローしていなければ) +変換結果を符号反転した 値を unsigned 型で返す。変換でオーバーフローが発生した場合は \fBULONG_MAX\fP を返し、 \fIerrno\fP に +\fBERANGE\fP を設定する。 (\fBULONG_MAX\fP を \fBULLONG_MAX\fP と読み替えれば) \fBstrtoull\fP() は +\fBstrtoul\fP() と全く同じである。 +.SH エラー +.TP +\fBEINVAL\fP +(C99 にはない) 指定された \fIbase\fP がサポートされていない値である。 +.TP +\fBERANGE\fP +結果の値が範囲外である。 +.PP +実装によっては、変換が行われなかった場合 (数字がなく、0 を返した場合)、 \fIerrno\fP に \fBEINVAL\fP が設定される場合がある。 +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.TS +allbox; +lbw32 lb lb +l l l. +インターフェース 属性 値 +T{ +\fBstrtoul\fP(), +\fBstrtoull\fP(), +\fBstrtouq\fP() +T} Thread safety MT\-Safe locale +.TE +.SH 準拠 +\fBstrtoul\fP(): POSIX.1\-2001, POSIX.1\-2008, C89, C99 SVr4. +.PP +\fBstrtoull\fP(): POSIX.1\-2001, POSIX.1\-2008, C99. +.SH 注意 +\fBstrtoul ()\fP からは成功、失敗どちらの場合でも 0 や \fBULONG_MAX\fP (\fBstrtoull\fP() では +\fBULLONG_MAX\fP) が返る可能性があるので、 プログラムは関数を呼び出す前に \fIerrno\fP を 0 に設定し、呼び出し後に +\fIerrno\fP が 0 以外の値かどうかを確認しエラーが発生したかどうかを判断する 必要がある。 +.PP +"C" 以外のロケールの場合、その他の文字列も受け付けられるかもしれない。 (例えば、現在のロケールの 1000 +毎の区切り文字に対応しているかもしれない。) +.PP +BSD には、 +.PP +.in +4n +.EX +\fBu_quad_t strtouq(const char *\fP\fInptr\fP\fB, char **\fP\fIendptr\fP\fB, int \fP\fIbase\fP\fB);\fP +.EE +.in +.PP +という完全に同様の定義を持つ関数がある。 使用中のアーキテクチャーのワード長次第であるが、この関数は \fBstrtoull\fP() や +\fBstroul\fP() と等価な場合もありえる。 +.PP +負の値も正当な入力とみなされ、エラーもなく、 対応する \fIunsigned long\fP 型の値に変換される。 +.SH 例 +\fBstrtol\fP(3) のマニュアルページの例を参照。 このページで説明した関数の使用方法も同様である。 +.SH 関連項目 +\fBa64l\fP(3), \fBatof\fP(3), \fBatoi\fP(3), \fBatol\fP(3), \fBstrtod\fP(3), \fBstrtol\fP(3), +\fBstrtoumax\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/system.3 b/manual/LDP_man-pages/draft/man3/system.3 new file mode 100644 index 00000000..6a595a42 --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/system.3 @@ -0,0 +1,162 @@ +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" and Copyright (c) 2014 by Michael Kerrisk +.\" +.\" %%%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. +.\" +.\" Permission is granted to copy and distribute modified versions of this +.\" manual under the conditions for verbatim copying, provided that the +.\" entire resulting derived work is distributed under the terms of a +.\" permission notice identical to this one. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END +.\" +.\" Modified Sat Jul 24 17:51:15 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 11 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk) +.\" Modified 14 May 2001, 23 Sep 2001 by aeb +.\" 2004-12-20, mtk +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 1996 Shoichi OZAWA +.\" all right reserved. +.\" Translated 1996-09-01, Shoichi OZAWA +.\" Updated 2001-03-19, Kentaro Shirakata +.\" Updated 2001-10-16, Kentaro Shirakata +.\" Updated 2005-02-27, Akihiro MOTOKI +.\" +.TH SYSTEM 3 2019\-03\-06 "" "Linux Programmer's Manual" +.SH 名前 +system \- シェルコマンドの実行 +.SH 書式 +.nf +\fB#include \fP +.PP +\fBint system(const char *\fP\fIcommand\fP\fB);\fP +.fi +.SH 説明 +\fBsystem\fP() ライブラリ関数は、\fBfork\fP(2) を使って子プロセスを作成し、その子プロセスは以下のように \fIcommand\fP +で指定されたシェルコマンドを \fBexecl\fP(3) を使って実行する。 +.PP +.in +4n +.EX +execl("/bin/sh", "sh", "\-c", command, (char *) NULL); +.EE +.in +.PP +\fBsystem\fP() が返るのはコマンドが完了した後である。 +.PP +コマンドの実行中は、 \fBsystem\fP() を呼び出したプロセスでは、 \fBSIGCHLD\fP はブロックされ、 \fBSIGINT\fP と +\fBSIGQUIT\fP は無視される (\fIcommand\fP を実行する子プロセスでは、これらのシグナルはデフォルトの処理方法にしたがって処理される)。 +.PP +\fIcommand\fP が NULL の場合、 \fBsystem\fP() はそのシステムでシェルが利用可能かを示すステータスを返す。 +.SH 返り値 +\fBsystem\fP() の返り値は以下のいずれかである。 +.IP * 3 +\fIcommand\fP が NULL の場合、 シェルが利用可能ならゼロ以外の値、利用不可なら 0。 +.IP * +If a child process could not be created, or its status could not be +retrieved, the return value is \-1 and \fIerrno\fP is set to indicate the error. +.IP * +子プロセスでシェルを実行できなかった場合、 返り値は子プロセスがステータス 127 で \fB_exit\fP(2) を呼び出して終了したのと同じになる。 +.IP * +システムコールがすべて成功した場合、 返り値は \fIcommand\fP を実行するのに使用された子プロセスのシェルの終了ステータスとなる +(シェルの終了ステータスはそのシェルが実行した最後のコマンドの終了ステータスである)。 +.PP +最後の 2 つの場合、返り値は "wait status" であり、 \fBwaitpid\fP(2) に書かれているマクロ (つまり +\fBWIFEXITED\fP() や \fBWEXITSTATUS\fP() などのマクロ) を使って検査することができる。 +.PP +\fBsystem\fP() は他の子プロセスのウエイトステータスには影響を与えない。 +.SH エラー +\fBsystem\fP() can fail with any of the same errors as \fBfork\fP(2). +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.TS +allbox; +lb lb lb +l l l. +インターフェース 属性 値 +T{ +\fBsystem\fP() +T} Thread safety MT\-Safe +.TE +.SH 準拠 +POSIX.1\-2001, POSIX.1\-2008, C89, C99. +.SH 注意 +\fBsystem\fP() により簡便性と利便性がもたらされる。この関数は \fBfork\fP(2), \fBexecl\fP(3), \fBwaitpid\fP(2) +の呼び出しにおける詳細をすべて行うとともに、 シグナルの適切な処理も行う。 また、シェルは \fIcommand\fP に対して通常の置換 +(substitutions) と I/O リダイレクトを行う。 \fBsystem\fP() を使用することによる主なコストは非効率性である。 +シェルを実行するプロセスを作成するためとそのシェルを実行するために、余計にシステムコールが必要となる。 +.PP +(「どの」ヘッダーファイルをインクルードするよりも前に) 機能検査マクロ \fB_XOPEN_SOURCE\fP が定義された場合には、 +\fBwaitpid\fP(2) で説明されているマクロ群 (\fBWEXITSTATUS\fP() 等) が \fI\fP +をインクルードすると利用可能になる。 +.PP +既に述べたように、 \fBsystem\fP() は \fBSIGINT\fP と \fBSIGQUIT\fP を無視する。 よってループから \fBsystem\fP() +を呼ぶプログラムは、 以下の例のように子プロセスの終了状態を自分でチェックしておかないと、 中断できなくなるかもしれない。 +.PP +.in +4n +.EX +while (something) { + int ret = system("foo"); + + if (WIFSIGNALED(ret) && + (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT)) + break; +} +.EE +.in +.PP +According to POSIX.1, it is unspecified whether handlers registered using +\fBpthread_atfork\fP(3) are called during the execution of \fBsystem\fP(). In +the glibc implementation, such handlers are not called. +.PP +glibc 2.1.3 より前のバージョンでは、 \fIcommand\fP が NULL の場合に \fI/bin/sh\fP +が利用可能かどうかのチェックは実際には行わず、 いつでも利用可能であるとみなしていた。 \fBsystem\fP() はこの場合に常に 1 を返していた。 +POSIX.1\-2001 ではシェルが提供されているという標準に準拠した実装を 要求しているが、glibc 2.1.3 +以降ではシェルのチェックを実行している。 なぜなら、呼び出し元のプログラムが \fBsystem\fP() を呼び出すより前に (POSIX.1\-2001 +では規定されていない) \fBchroot\fP(2) を呼び出していた時には、シェルが利用可能でない場合や実行可能ファイル でない場合があるからである。 +.PP +.\" +シェルコマンドがステータス 127 で終了することもある。 この場合、\fBsystem\fP() +の返り値は、子プロセスでシェルが実行できなかった場合と区別できない。 +.SS Caveats +Do not use \fBsystem\fP() from a privileged program (a set\-user\-ID or +set\-group\-ID program, or a program with capabilities) because strange +values for some environment variables might be used to subvert system +integrity. For example, \fBPATH\fP could be manipulated so that an arbitrary +program is executed with privilege. Use the \fBexec\fP(3) family of functions +instead, but not \fBexeclp\fP(3) or \fBexecvp\fP(3) (which also use the \fBPATH\fP +environment variable to search for an executable). +.PP +\fBsystem\fP() will not, in fact, work properly from programs with set\-user\-ID +or set\-group\-ID privileges on systems on which \fI/bin/sh\fP is bash version 2: +as a security measure, bash 2 drops privileges on startup. (Debian uses a +different shell, \fBdash\fP(1), which does not do this when invoked as \fBsh\fP.) +.PP +Any user input that is employed as part of \fIcommand\fP should be \fIcarefully\fP +sanitized, to ensure that unexpected shell commands or command options are +not executed. Such risks are especially grave when using \fBsystem\fP() from +a privileged program. +.SH 関連項目 +\fBsh\fP(1), \fBexecve\fP(2), \fBfork\fP(2), \fBsigaction\fP(2), \fBsigprocmask\fP(2), +\fBwait\fP(2), \fBexec\fP(3), \fBsignal\fP(7) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man3/wcstombs.3 b/manual/LDP_man-pages/draft/man3/wcstombs.3 new file mode 100644 index 00000000..3a099122 --- /dev/null +++ b/manual/LDP_man-pages/draft/man3/wcstombs.3 @@ -0,0 +1,82 @@ +.\" Copyright (c) Bruno Haible +.\" +.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA) +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" %%%LICENSE_END +.\" +.\" References consulted: +.\" GNU glibc-2 source code and manual +.\" Dinkumware C library reference http://www.dinkumware.com/ +.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html +.\" ISO/IEC 9899:1999 +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" +.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya +.\" all rights reserved. +.\" Translated Tue Jan 11 00:55:41 JST 2000 +.\" by HANATAKA Shinya +.\" +.TH WCSTOMBS 3 2020\-06\-09 GNU "Linux Programmer's Manual" +.SH 名前 +wcstombs \- ワイド文字列をマルチバイト文字列に変換する +.SH 書式 +.nf +\fB#include \fP +.PP +\fBsize_t wcstombs(char *\fP\fIdest\fP\fB, const wchar_t *\fP\fIsrc\fP\fB, size_t \fP\fIn\fP\fB);\fP +.fi +.SH 説明 +If \fIdest\fP is not NULL, the \fBwcstombs\fP() function converts the +wide\-character string \fIsrc\fP to a multibyte string starting at \fIdest\fP. At +most \fIn\fP bytes are written to \fIdest\fP. The sequence of characters placed +in \fIdest\fP begins in the initial shift state. The conversion can stop for +three reasons: +.IP 1. 3 +(現在のロケールにおける)マルチバイト列で表現できないワイド文字に 遭遇した場合。この場合には \fI(size_t)\ \-1\fP が返される。 +.IP 2. +長さ制限によって強制停止させられた場合。この場合には \fIdest\fP に 書き込まれたバイト数が返される。しかしこの時点でのシフト状態は失われる。 +.IP 3. +ワイド文字列が終端のヌルワイド文字 (L\(aq\e0\(aq) を含めて完全に変換された場合。 この場合には変換は初期シフト状態で終了し、 +\fIdest\fP に書き込まれたバイト数を返す (終端のヌルバイト (\(aq\e0\(aq) は含まれない)。 +.PP +プログラマーは \fIdest\fP に最低でも \fIn\fP バイトの空きがあることを 保証しなければならない。 +.PP +\fIdest\fP が NULL の場合、\fIn\fP は無視される。上記と同様に変換が行 なわれるが変換結果のバイト列はメモリーには書き込まれない。 +また長さの上限が存在しない。 +.PP +上記の 2. の場合を避けるために、プログラマーは \fIn\fP が \fIwcstombs(NULL,src,0)+1\fP +以上であることを保証しなければならない。 +.SH 返り値 +\fBwcstombs\fP() 関数は生成したマルチバイト列のバイト数を返す。終端の ヌル文字は含まない。もし変換できないワイド文字に遭遇した場合には +\fI(size_t)\ \-1\fP を返す。 +.SH 属性 +この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 +.TS +allbox; +lb lb lb +l l l. +インターフェース 属性 値 +T{ +\fBwcstombs\fP() +T} Thread safety MT\-Safe +.TE +.sp 1 +.SH 準拠 +POSIX.1\-2001, POSIX.1\-2008, C99. +.SH 注意 +\fBwcstombs\fP() の動作は現在のロケールの \fBLC_CTYPE\fP カテゴリーに依存している。 +.PP +\fBwcsrtombs\fP(3) 関数は同じ機能のより良いインターフェースを提供する。 +.SH 関連項目 +\fBmblen\fP(3), \fBmbstowcs\fP(3), \fBmbtowc\fP(3), \fBwcsrtombs\fP(3), \fBwctomb\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は +\%https://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/manual/LDP_man-pages/draft/man7/vdso.7 b/manual/LDP_man-pages/draft/man7/vdso.7 index 00021dc6..338956be 100644 --- a/manual/LDP_man-pages/draft/man7/vdso.7 +++ b/manual/LDP_man-pages/draft/man7/vdso.7 @@ -17,7 +17,7 @@ .\"******************************************************************* .TH VDSO 7 2019\-08\-02 Linux "Linux Programmer's Manual" .SH 名前 -vdso \- overview of the virtual ELF dynamic shared object +vdso \- 仮想 ELF 動的共有オブジェクトの概要 .SH 書式 \fB#include \fP .PP @@ -42,11 +42,9 @@ vdso \- overview of the virtual ELF dynamic shared object システムコール呼び出しを起動するための高速な (だが、後方互換性がある) 命令が用意されている。 C ライブラリが実行時にこの機能が利用できるかを確認するのではなく、 C ライブラリは vDSO でカーネルが提供する関数を使うことができる。 .PP -Note that the terminology can be confusing. On x86 systems, the vDSO -function used to determine the preferred method of making a system call is -named "__kernel_vsyscall", but on x86\-64, the term "vsyscall" also refers to -an obsolete way to ask the kernel what time it is or what CPU the caller is -on. +用語が紛らわしい点には注意が必要である。 x86 システムでは、 システムコールを呼び出す推奨される方法を判定するのに使用される vDSO 関数は +"__kernel_vsyscall" という名前だが、 x86=64 では、 "vsyscall" という用語は、 +カーネルに時刻はいつかや呼び出し元はどの CPU 上にいるかを問い合わせるための廃止予定の方法も参照している。 .PP 頻繁に使用されるシステムコールの一つが \fBgettimeofday\fP(2) である。 このシステムコールは、 ユーザー空間アプリケーションから直接呼び出されることも、 C ライブラリから間接的に呼び出されることもある。 タイムスタンプが必要な場面、 @@ -123,12 +121,10 @@ system calls will likewise not be visible to \fBseccomp\fP(2) filters. .SH アーキテクチャー固有の注意 以下のサブ章では vDSO のアーキテクチャー固有の注意について説明する。 .PP -Note that the vDSO that is used is based on the ABI of your user\-space code -and not the ABI of the kernel. Thus, for example, when you run an i386 -32\-bit ELF binary, you'll get the same vDSO regardless of whether you run it -under an i386 32\-bit kernel or under an x86\-64 64\-bit kernel. Therefore, -the name of the user\-space ABI should be used to determine which of the -sections below is relevant. +使用される vDSO は、 カーネルの ABI ではなく、 ユーザー空間コードの ABI に基づくことに注意すること。 したがって、 例えば、 i386 +32 ビットの ELF ライブラリ上で実行する場合、 i386 32 ビットカーネル上で実行されているか x86\-64 64 +ビットカーネル上で実行されているかに関わらず同じ vDSO が得られる。 したがって、 以下のどの節が関係するかを判断する際にはユーザー空間 ABI +の名前を使用する必要がある。 .SS "ARM 関数" .\" See linux/arch/arm/vdso/vdso.lds.S .\" Commit: 8512287a8165592466cb9cb347ba94892e9c56a5 @@ -140,8 +136,8 @@ sections below is relevant. l l. シンボル バージョン _ -__vdso_gettimeofday LINUX_2.6 (exported since Linux 4.1) -__vdso_clock_gettime LINUX_2.6 (exported since Linux 4.1) +__vdso_gettimeofday LINUX_2.6 (Linux 4.1 以降で公開) +__vdso_clock_gettime LINUX_2.6 (Linux 4.1 以降で公開) .TE .if t \{\ .in @@ -192,7 +188,7 @@ For information on this code page, it's best to refer to the public documentation: .br http://docs.blackfin.uclinux.org/doku.php?id=linux\-kernel:fixed\-code -.SS "mips functions" +.SS "mips 関数" .\" See linux/arch/mips/vdso/vdso.ld.S .PP 以下のテーブルは vDSO で公開されるシンボルの一覧である。 @@ -203,8 +199,8 @@ http://docs.blackfin.uclinux.org/doku.php?id=linux\-kernel:fixed\-code l l. シンボル バージョン _ -__kernel_gettimeofday LINUX_2.6 (exported since Linux 4.4) -__kernel_clock_gettime LINUX_2.6 (exported since Linux 4.4) +__kernel_gettimeofday LINUX_2.6 (Linux 4.4 以降で公開) +__kernel_clock_gettime LINUX_2.6 (Linux 4.4 以降で公開) .TE .if t \{\ .in @@ -344,7 +340,7 @@ __kernel_sync_dicache_p5 LINUX_2.6.15 The \fBCLOCK_REALTIME_COARSE\fP and \fBCLOCK_MONOTONIC_COARSE\fP clocks are \fInot\fP supported by the \fI__kernel_clock_getres\fP and \fI__kernel_clock_gettime\fP interfaces; the kernel falls back to the real system call. -.SS "riscv functions" +.SS "riscv 関数" .\" See linux/arch/riscv/kernel/vdso/vdso.lds.S 以下のテーブルは vDSO で公開されるシンボルの一覧である。 .if t \{\ @@ -442,7 +438,7 @@ __vdso_time LINUX_2.6 (Linux 3.15 以降で公開) .in .ft P \} -.SS "x86\-64 functions" +.SS "x86\-64 関数" .\" See linux/arch/x86/vdso/vdso.lds.S 以下のテーブルは vDSO で公開されるシンボルの一覧である。 これらのシンボルはすべて "__vdso_" のプレフィックスなしでも利用できるが、 これらは無視し、 以下の名前だけを使うこと。 diff --git a/manual/LDP_man-pages/po4a/stdlib/po/ja.po b/manual/LDP_man-pages/po4a/stdlib/po/ja.po index 5408fcf6..be864fab 100644 --- a/manual/LDP_man-pages/po4a/stdlib/po/ja.po +++ b/manual/LDP_man-pages/po4a/stdlib/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2021-03-12 14:00+0900\n" -"PO-Revision-Date: 2021-03-26 13:58+0900\n" +"PO-Revision-Date: 2021-04-04 22:20+0900\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -24,10 +24,9 @@ msgstr "MB_CUR_MAX" #. type: TH #: build/C/man3/MB_CUR_MAX.3:17 build/C/man3/mblen.3:16 #: build/C/man3/strtoimax.3:24 build/C/man3/wctomb.3:16 -#, fuzzy, no-wrap -#| msgid "2015-02-01" +#, no-wrap msgid "2015-08-08" -msgstr "2015-02-01" +msgstr "2015-08-08" #. type: TH #: build/C/man3/MB_CUR_MAX.3:17 build/C/man3/MB_LEN_MAX.3:17 @@ -164,21 +163,12 @@ msgstr "説明" #. type: Plain text #: build/C/man3/MB_CUR_MAX.3:31 -#, fuzzy -#| msgid "" -#| "The B macro defines an integer expression giving the maximum " -#| "number of bytes needed to represent a single wide character in the " -#| "current locale. It is locale dependent and therefore not a compile-time " -#| "constant." msgid "" "The B macro defines an integer expression giving the maximum " "number of bytes needed to represent a single wide character in the current " "locale. This value is locale dependent and therefore not a compile-time " "constant." -msgstr "" -"B マクロは、現在のロケールで一つのワイド文字を表現するために必要" -"な 最大バイト数を表す整数表現を定義する。 これはロケール依存であり、コンパイ" -"ル時に決まる定数ではない。" +msgstr "B マクロは、現在のロケールで一つのワイド文字を表現するために必要な 最大バイト数を表す整数表現を定義する。この値はロケール依存であり、コンパイル時に決まる定数ではない。" #. type: SH #: build/C/man3/MB_CUR_MAX.3:31 build/C/man3/MB_LEN_MAX.3:29 @@ -244,10 +234,8 @@ msgstr "準拠" #: build/C/man3/mbtowc.3:127 build/C/man3/strtod.3:181 #: build/C/man3/strtoimax.3:72 build/C/man3/wcstombs.3:105 #: build/C/man3/wctomb.3:98 -#, fuzzy -#| msgid "SVr4, POSIX.1-2001, 4.3BSD, C89, C99." msgid "POSIX.1-2001, POSIX.1-2008, C99." -msgstr "SVr4, POSIX.1-2001, 4.3BSD, C89, C99." +msgstr "POSIX.1-2001, POSIX.1-2008, C99." #. type: SH #: build/C/man3/MB_CUR_MAX.3:37 build/C/man3/MB_LEN_MAX.3:50 @@ -350,10 +338,9 @@ msgstr "MB_LEN_MAX" #. type: TH #: build/C/man3/MB_LEN_MAX.3:17 -#, fuzzy, no-wrap -#| msgid "2015-01-22" +#, no-wrap msgid "2015-07-23" -msgstr "2015-01-22" +msgstr "2015-07-23" #. type: Plain text #: build/C/man3/MB_LEN_MAX.3:20 @@ -410,17 +397,11 @@ msgstr "注意" #. Date: Thu, 14 May 2015 02:30:14 +0200 #. type: Plain text #: build/C/man3/MB_LEN_MAX.3:50 -#, fuzzy -#| msgid "" -#| "The entities B and I are totally unrelated. " -#| "In glibc, B is typically 6 while I is 4." msgid "" "The entities B and I are totally unrelated. In " "glibc, B is typically 16 (6 in glibc versions earlier than 2.2), " "while I is 4." -msgstr "" -"B と I の値にはなんの関係もない。 glibc では " -"B は通常は 6 で、 I は 4 である。" +msgstr "B と I の値にはなんの関係もない。 glibc では B は通常は 16 (glibc バージョン 2.2 より前では 6) で、 I は 4 である。" #. type: Plain text #: build/C/man3/MB_LEN_MAX.3:52 @@ -435,10 +416,9 @@ msgstr "_EXIT" #. type: TH #: build/C/man2/_exit.2:29 build/C/man3/exit.3:29 -#, fuzzy, no-wrap -#| msgid "2015-02-01" +#, no-wrap msgid "2020-02-09" -msgstr "2015-02-01" +msgstr "2020-02-09" #. type: Plain text #: build/C/man2/_exit.2:32 @@ -490,14 +470,8 @@ msgstr "B<_Exit>():" #. type: Plain text #: build/C/man2/_exit.2:50 build/C/man3/strtod.3:67 -#, fuzzy -#| msgid "" -#| "_XOPEN_SOURCE\\ E=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E=" -#| "\\ 200112L;" msgid "_ISOC99_SOURCE || _POSIX_C_SOURCE\\ E=\\ 200112L" -msgstr "" -"_XOPEN_SOURCE\\ E=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E=\\ " -"200112L;" +msgstr "_ISOC99_SOURCE || _POSIX_C_SOURCE\\ E=\\ 200112L" #. type: Plain text #: build/C/man2/_exit.2:65 @@ -548,14 +522,10 @@ msgstr "これらの関数は値を返さない。" #. type: Plain text #: build/C/man2/_exit.2:84 -#, fuzzy -#| msgid "" -#| "SVr4, POSIX.1-2001, 4.3BSD. The function B<_Exit>() was introduced by " -#| "C99." msgid "" "POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD. The function B<_Exit>() was " "introduced by C99." -msgstr "SVr4, POSIX.1-2001, 4.3BSD. 関数 B<_Exit>() は C99 で導入された。" +msgstr "POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD. 関数 B<_Exit>() は C99 で導入された。" #. type: Plain text #: build/C/man2/_exit.2:88 @@ -601,10 +571,9 @@ msgstr "" #. type: SS #: build/C/man2/_exit.2:114 -#, fuzzy, no-wrap -#| msgid "C library/kernel ABI differences" +#, no-wrap msgid "C library/kernel differences" -msgstr "C ライブラリとカーネル ABI の違い" +msgstr "C ライブラリとカーネルの違い" #. type: Plain text #: build/C/man2/_exit.2:124 @@ -656,10 +625,9 @@ msgstr "A64L" #. type: TH #: build/C/man3/a64l.3:10 build/C/man3/atoi.3:33 -#, fuzzy, no-wrap -#| msgid "2012-08-14" +#, no-wrap msgid "2020-08-13" -msgstr "2012-08-14" +msgstr "2020-08-13" #. type: Plain text #: build/C/man3/a64l.3:13 @@ -730,10 +698,8 @@ msgstr "" #. type: Plain text #: build/C/man3/a64l.3:65 -#, fuzzy -#| msgid "So 123 = 59*64^0 + 1*64^1 = \"v/\"." msgid "So 123 = 59*64\\(ha0 + 1*64\\(ha1 = \"v/\"." -msgstr "よって 123 = 59*64^0 + 1*64^1 = \"v/\" である。" +msgstr "よって 123 = 59*64\\(ha0 + 1*64\\(ha1 = \"v/\" である。" #. type: SH #: build/C/man3/a64l.3:65 build/C/man3/atexit.3:77 build/C/man3/atof.3:59 @@ -911,10 +877,8 @@ msgstr "MT-Safe" #. type: Plain text #: build/C/man3/a64l.3:82 build/C/man3/getsubopt.3:144 -#, fuzzy -#| msgid "SVr4, POSIX.1-2001." msgid "POSIX.1-2001, POSIX.1-2008." -msgstr "SVr4, POSIX.1-2001." +msgstr "POSIX.1-2001, POSIX.1-2008." #. type: Plain text #: build/C/man3/a64l.3:87 @@ -964,10 +928,9 @@ msgstr "ATEXIT" #: build/C/man3/atexit.3:33 build/C/man3/getauxval.3:27 #: build/C/man3/getsubopt.3:25 build/C/man3/malloc.3:34 #: build/C/man3/rpmatch.3:29 build/C/man3/wcstombs.3:16 -#, fuzzy, no-wrap -#| msgid "2013-06-21" +#, no-wrap msgid "2020-06-09" -msgstr "2013-06-21" +msgstr "2020-06-09" #. type: Plain text #: build/C/man3/atexit.3:36 @@ -1005,19 +968,11 @@ msgstr "" #. POSIX.1-2001, POSIX.1-2008 #. type: Plain text #: build/C/man3/atexit.3:64 -#, fuzzy -#| msgid "" -#| "POSIX.1-2001 requires that an implementation allow at least B " -#| "(32) such functions to be registered. The actual limit supported by an " -#| "implementation can be obtained using B(3)." msgid "" "POSIX.1 requires that an implementation allow at least B (32) " "such functions to be registered. The actual limit supported by an " "implementation can be obtained using B(3)." -msgstr "" -"POSIX.1-2001 では、このような関数を少なくとも B 個 (32個) 登録で" -"きることを要求している。 その実装でサポートされている実際の上限は " -"B(3) を使って取得できる。" +msgstr "POSIX.1 では、このような関数を少なくとも B 個 (32個) 登録できることを要求している。 その実装でサポートされている実際の上限は B(3) を使って取得できる。" #. type: Plain text #: build/C/man3/atexit.3:72 build/C/man3/on_exit.3:79 @@ -1042,10 +997,9 @@ msgstr "" #. type: tbl table #: build/C/man3/atexit.3:87 -#, fuzzy, no-wrap -#| msgid "B<_Exit>():" +#, no-wrap msgid "B()" -msgstr "B<_Exit>():" +msgstr "B()" #. type: Plain text #: build/C/man3/atexit.3:92 build/C/man3/atof.3:73 build/C/man3/exit.3:109 @@ -1063,11 +1017,6 @@ msgstr "" #. type: Plain text #: build/C/man3/atexit.3:106 -#, fuzzy -#| msgid "" -#| "If one of the functions registered functions calls B<_exit>(2), then any " -#| "remaining functions are not invoked, and the other process termination " -#| "steps performed by B(3) are not performed." msgid "" "If one of the registered functions calls B<_exit>(2), then any remaining " "functions are not invoked, and the other process termination steps performed " @@ -1083,25 +1032,13 @@ msgstr "" #. exit handlers carries on as normal. #. type: Plain text #: build/C/man3/atexit.3:124 -#, fuzzy -#| msgid "" -#| "POSIX.1-2001 says that the result of calling B(3) more than once " -#| "(i.e., calling B(3) within a function registered using " -#| "B()) is undefined. On some systems (but not Linux), this can " -#| "result in an infinite recursion; portable programs should not invoke " -#| "B(3) inside a function registered using B()." msgid "" "POSIX.1 says that the result of calling B(3) more than once (i.e., " "calling B(3) within a function registered using B()) is " "undefined. On some systems (but not Linux), this can result in an infinite " "recursion; portable programs should not invoke B(3) inside a function " "registered using B()." -msgstr "" -"POSIX.1-2001 では、 B() を使って登録された一つの関数内で、複数回 " -"B(3) を呼び出した際の結果は未定義である。 (Linux ではないが) いくつか" -"のシステムでは、この場合、 繰り返しが無限に起こることになる。 移植性が必要な" -"プログラムでは、 B() で登録された関数内で B(3) を起動すべきで" -"はない。" +msgstr "POSIX.1 では、 B() を使って登録された一つの関数内で、複数回 B(3) を呼び出した際の結果は未定義である。 (Linux ではないが) いくつかのシステムでは、この場合、 繰り返しが無限に起こることになる。 移植性が必要なプログラムでは、 B() で登録された関数内で B(3) を起動すべきではない。" #. type: Plain text #: build/C/man3/atexit.3:133 @@ -1117,16 +1054,10 @@ msgstr "" #. In glibc, things seem to be handled okay #. type: Plain text #: build/C/man3/atexit.3:139 -#, fuzzy -#| msgid "" -#| "POSIX.1-2001 says that the result is undefined if B(3) is used " -#| "to terminate execution of one of the functions registered B()." msgid "" "According to POSIX.1, the result is undefined if B(3) is used to " "terminate execution of one of the functions registered using B()." -msgstr "" -"POSIX.1-2001 では、 B() で登録された関数の実行を終了するために " -"B(3) が使用された場合の結果は未定義である。" +msgstr "POSIX.1 では、 B() で登録された関数の実行を終了するために B(3) が使用された場合の結果は未定義である。" #. type: SS #: build/C/man3/atexit.3:139 @@ -1151,8 +1082,7 @@ msgstr "" #: build/C/man3/rpmatch.3:135 build/C/man3/strfromd.3:209 #: build/C/man3/strtod.3:208 build/C/man3/strtol.3:219 #: build/C/man3/strtoul.3:220 -#, fuzzy, no-wrap -#| msgid "EXAMPLE" +#, no-wrap msgid "EXAMPLES" msgstr "例" @@ -1240,10 +1170,8 @@ msgstr "" #. type: Plain text #: build/C/man3/atexit.3:181 -#, fuzzy -#| msgid "B<_exit>(2), B(3), B(3)" msgid "B<_exit>(2), B(3), B(3), B(3)" -msgstr "B<_exit>(2), B(3), B(3)" +msgstr "B<_exit>(2), B(3), B(3), B(3)" #. type: TH #: build/C/man3/atof.3:31 @@ -1253,10 +1181,9 @@ msgstr "ATOF" #. type: TH #: build/C/man3/atof.3:31 -#, fuzzy, no-wrap -#| msgid "2008-12-05" +#, no-wrap msgid "2016-12-12" -msgstr "2008-12-05" +msgstr "2016-12-12" #. type: TH #: build/C/man3/atof.3:31 build/C/man3/atoi.3:33 @@ -1298,10 +1225,9 @@ msgstr "" #. type: Plain text #: build/C/man3/atof.3:51 -#, fuzzy, no-wrap -#| msgid "strtod(nptr, NULL);" +#, no-wrap msgid "strtod(nptr, NULL);\n" -msgstr "strtod(nptr, NULL);" +msgstr "strtod(nptr, NULL);\n" #. type: Plain text #: build/C/man3/atof.3:57 @@ -1348,13 +1274,15 @@ msgstr "atoi, atol, atoll - 文字列を整数型に変換する" #. type: Plain text #: build/C/man3/atoi.3:43 -#, fuzzy, no-wrap -#| msgid "BIB<, char **>IB<, int >IB<);>\n" +#, no-wrap msgid "" "BIB<);>\n" "BIB<);>\n" "BIB<);>\n" -msgstr "BIB<, char **>IB<, int >IB<);>\n" +msgstr "" +"BIB<);>\n" +"BIB<);>\n" +"BIB<);>\n" #. type: Plain text #: build/C/man3/atoi.3:52 @@ -1381,10 +1309,9 @@ msgstr "" #. type: Plain text #: build/C/man3/atoi.3:68 -#, fuzzy, no-wrap -#| msgid "strtol(nptr, NULL, 10);" +#, no-wrap msgid "strtol(nptr, NULL, 10);\n" -msgstr "strtol(nptr, NULL, 10);" +msgstr "strtol(nptr, NULL, 10);\n" #. type: Plain text #: build/C/man3/atoi.3:74 @@ -1410,13 +1337,15 @@ msgstr "変換された値。" #. type: tbl table #: build/C/man3/atoi.3:97 -#, fuzzy, no-wrap -#| msgid "B(3), B(3), B(3), B(3)" +#, no-wrap msgid "" "B(),\n" "B(),\n" "B()" -msgstr "B(3), B(3), B(3), B(3)" +msgstr "" +"B(),\n" +"B(),\n" +"B()" #. .SH NOTES #. Linux libc provided @@ -1431,16 +1360,10 @@ msgstr "B(3), B(3), B(3), B(3)" #. not in libc4 or libc5. #. type: Plain text #: build/C/man3/atoi.3:118 -#, fuzzy -#| msgid "" -#| "SVr4, POSIX.1-2001, 4.3BSD, C99. C89 and POSIX.1-1996 include the " -#| "functions B() and B() only." msgid "" "POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD. C89 and POSIX.1-1996 include " "the functions B() and B() only." -msgstr "" -"SVr4, POSIX.1-2001, 4.3BSD, C99. C89 と POSIX.1-1996 には B() と " -"B() だけが含まれている。" +msgstr "POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD. C89 と POSIX.1-1996 には B() と B() だけが含まれている。" #. type: Plain text #: build/C/man3/atoi.3:123 @@ -1485,10 +1408,9 @@ msgstr "CANONICALIZE_FILE_NAME" #: build/C/man3/mkstemp.3:35 build/C/man3/mktemp.3:34 #: build/C/man3/random_r.3:26 build/C/man3/setenv.3:37 #: build/C/man2/getrandom.2:27 build/C/man3/getentropy.3:25 -#, fuzzy, no-wrap -#| msgid "2014-09-21" +#, no-wrap msgid "2017-09-15" -msgstr "2014-09-21" +msgstr "2017-09-15" #. type: Plain text #: build/C/man3/canonicalize_file_name.3:29 @@ -1573,10 +1495,9 @@ msgstr "B(3) 参照。" #. type: tbl table #: build/C/man3/canonicalize_file_name.3:83 -#, fuzzy, no-wrap -#| msgid "BIB<);>" +#, no-wrap msgid "B()" -msgstr "BIB<);>" +msgstr "B()" #. type: Plain text #: build/C/man3/canonicalize_file_name.3:87 @@ -1652,12 +1573,10 @@ msgstr "" #. type: Plain text #: build/C/man3/cfree.3:61 -#, fuzzy -#| msgid "This function should never be used. Use B(3) instead." msgid "" "This function should never be used. Use B(3) instead. Starting with " "version 2.26, it has been removed from glibc." -msgstr "この関数は決して使用すべきではない。 代わりに B(3) を使うこと。" +msgstr "この関数は決して使用すべきではない。 代わりに B(3) を使うこと。 glibc 2.26 以降では、この関数は glibc から削除されている。" #. type: SS #: build/C/man3/cfree.3:61 @@ -1706,10 +1625,9 @@ msgstr "何かを移植する時にこの関数が必要な場合、" #. type: Plain text #: build/C/man3/cfree.3:84 -#, fuzzy, no-wrap -#| msgid "#define cfree(p, n, s) free((p))" +#, no-wrap msgid "#define cfree(p, n, s) free((p))\n" -msgstr "#define cfree(p, n, s) free((p))" +msgstr "#define cfree(p, n, s) free((p))\n" #. type: Plain text #: build/C/man3/cfree.3:88 @@ -1765,10 +1683,8 @@ msgstr "バージョン" #. commit 025b33ae84bb8f15b2748a1d8605dca453fce112 #. type: Plain text #: build/C/man3/cfree.3:124 -#, fuzzy -#| msgid "The B() function was added to glibc in version 2.16." msgid "The B() function was removed from glibc in version 2.26." -msgstr "B() 関数は glibc バージョン 2.16 で追加された。" +msgstr "B() 関数は、バージョン 2.26 で glibc から削除された。" #. type: tbl table #: build/C/man3/cfree.3:134 @@ -1869,25 +1785,13 @@ msgstr "MT-Unsafe const:env" #. type: Plain text #: build/C/man3/clearenv.3:91 -#, fuzzy -#| msgid "" -#| "Various UNIX variants (DG/UX, HP-UX, QNX, ...). POSIX.9 (bindings for " -#| "FORTRAN77). POSIX.1-1996 did not accept B() and B(3), " -#| "but changed its mind and scheduled these functions for some later issue " -#| "of this standard (cf. B.4.6.1). However, POSIX.1-2001 adds only " -#| "B(3), and rejected B()." msgid "" "Various UNIX variants (DG/UX, HP-UX, QNX, ...). POSIX.9 (bindings for " "FORTRAN77). POSIX.1-1996 did not accept B() and B(3), " "but changed its mind and scheduled these functions for some later issue of " "this standard (see \\[sc]B.4.6.1). However, POSIX.1-2001 adds only " "B(3), and rejected B()." -msgstr "" -"(DG/UX, HP-UX, QNX, などの) 多くの UNIX 系 OS。 (FORTRAN77 へのバインディング" -"である) POSIX.9。 POSIX.1-1996 では B() と B(3) は採用さ" -"れなかったが、 方針が変更され、この標準規格の以降の号 (B.4.6.1 を参照) では " -"採用されることになった。 しかし POSIX.1-2001 では B(3) だけが追加さ" -"れ、 B() の追加は否決された。" +msgstr "(DG/UX, HP-UX, QNX, などの) 多くの UNIX 系 OS。 (FORTRAN77 へのバインディングである) POSIX.9。 POSIX.1-1996 では B() と B(3) は採用されなかったが、 方針が変更され、この標準規格の以降の号 (\\[sc] B.4.6.1 を参照) では 採用されることになった。 しかし POSIX.1-2001 では B(3) だけが追加され、 B() の追加は否決された。" #. type: Plain text #: build/C/man3/clearenv.3:95 @@ -1896,10 +1800,9 @@ msgstr "" #. type: Plain text #: build/C/man3/clearenv.3:99 -#, fuzzy, no-wrap -#| msgid " environ = NULL;\n" +#, no-wrap msgid "environ = NULL;\n" -msgstr " environ = NULL;\n" +msgstr "environ = NULL;\n" #. type: Plain text #: build/C/man3/clearenv.3:103 @@ -1953,10 +1856,9 @@ msgstr "DRAND48" #: build/C/man3/drand48.3:30 build/C/man3/drand48_r.3:27 #: build/C/man3/mbstowcs.3:17 build/C/man3/rand.3:41 build/C/man3/random.3:33 #: build/C/man3/strtod.3:45 build/C/man3/strtol.3:32 build/C/man3/strtoul.3:33 -#, fuzzy, no-wrap -#| msgid "2013-10-11" +#, no-wrap msgid "2020-11-01" -msgstr "2013-10-11" +msgstr "2020-11-01" #. type: Plain text #: build/C/man3/drand48.3:34 @@ -1981,38 +1883,33 @@ msgstr "BIB<[3]);>\n" #. type: Plain text #: build/C/man3/drand48.3:43 -#, fuzzy, no-wrap -#| msgid "B\n" +#, no-wrap msgid "B\n" -msgstr "B\n" +msgstr "B\n" #. type: Plain text #: build/C/man3/drand48.3:45 -#, fuzzy, no-wrap -#| msgid "BIB<[3]);>\n" +#, no-wrap msgid "BIB<[3]);>\n" -msgstr "BIB<[3]);>\n" +msgstr "BIB<[3]);>\n" #. type: Plain text #: build/C/man3/drand48.3:47 -#, fuzzy, no-wrap -#| msgid "B\n" +#, no-wrap msgid "B\n" -msgstr "B\n" +msgstr "B\n" #. type: Plain text #: build/C/man3/drand48.3:49 -#, fuzzy, no-wrap -#| msgid "BIB<[3]);>\n" +#, no-wrap msgid "BIB<[3]);>\n" -msgstr "BIB<[3]);>\n" +msgstr "BIB<[3]);>\n" #. type: Plain text #: build/C/man3/drand48.3:51 -#, fuzzy, no-wrap -#| msgid "BIB<);>\n" +#, no-wrap msgid "BIB<);>\n" -msgstr "BIB<);>\n" +msgstr "BIB<);>\n" #. type: Plain text #: build/C/man3/drand48.3:53 @@ -2056,53 +1953,28 @@ msgstr "" #. type: Plain text #: build/C/man3/drand48.3:88 -#, fuzzy -#| msgid "" -#| "The B() and B() functions return nonnegative double-" -#| "precision floating-point values uniformly distributed between [0.0, 1.0)." msgid "" "The B() and B() functions return nonnegative double-" "precision floating-point values uniformly distributed over the interval [0.0," "\\ 1.0)." -msgstr "" -"関数 B() と B() は、区間 [0.0, 1.0) で 一様分布する非負の" -"倍精度浮動小数点実数値を返す。" +msgstr "関数 B() と B() は、区間 [0.0,\\ 1.0) で 一様分布する非負の倍精度浮動小数点実数値を返す。" #. type: Plain text #: build/C/man3/drand48.3:95 -#, fuzzy -#| msgid "" -#| "The B() and B() functions return nonnegative long " -#| "integers uniformly distributed between 0 and 2^31." msgid "" "The B() and B() functions return nonnegative long " "integers uniformly distributed over the interval [0,\\ 2^31)." -msgstr "" -"関数 B() と B() は 0 と 2^31 の間で一様分布する 非負のロ" -"ング整数を返す。" +msgstr "関数 B() と B() は、区間 [0,\\ 2^31) で一様分布する非負のロング整数を返す。" #. type: Plain text #: build/C/man3/drand48.3:102 -#, fuzzy -#| msgid "" -#| "The B() and B() functions return signed long integers " -#| "uniformly distributed between -2^31 and 2^31." msgid "" "The B() and B() functions return signed long integers " "uniformly distributed over the interval [-2^31,\\ 2^31)." -msgstr "" -"関数 B() と B() は -2^31 と 2^31 の間で一様分布する符号付" -"きロング整数を返す。" +msgstr "関数 B() と B() は、区間 [-2^31,\\ 2^31) で一様分布する符号付きロング整数を返す。" #. type: Plain text #: build/C/man3/drand48.3:121 -#, fuzzy -#| msgid "" -#| "The B(), B() and B() functions are " -#| "initialization functions, one of which should be called before using " -#| "B(), B() or B(). The functions B(), " -#| "B() and B() do not require an initialization function " -#| "to be called first." msgid "" "The B(), B(), and B() functions are " "initialization functions, one of which should be called before using " @@ -2167,14 +2039,6 @@ msgstr "" #. type: Plain text #: build/C/man3/drand48.3:193 -#, fuzzy -#| msgid "" -#| "The functions B(), B() and B() store the " -#| "last 48-bit I generated in an internal buffer. The functions " -#| "B(), B() and B() require the calling program " -#| "to provide storage for the successive I values in the array argument " -#| "I. The functions are initialized by placing the initial value of " -#| "I into the array before calling the function for the first time." msgid "" "The functions B(), B(), and B() store the last " "48-bit I generated in an internal buffer. The functions B(), " @@ -2214,14 +2078,6 @@ msgstr "" #. type: Plain text #: build/C/man3/drand48.3:247 -#, fuzzy -#| msgid "" -#| "The initialization function B() allows the user to specify " -#| "initial values for I, I and I. Array argument elements " -#| "I specify I, I specify I, and I " -#| "specifies I. After B() has been called, a subsequent call " -#| "to either B() or B() will restore the standard values " -#| "of I and I." msgid "" "The initialization function B() allows the user to specify initial " "values for I, I, and I. Array argument elements I " @@ -2268,27 +2124,15 @@ msgstr "MT-Unsafe race:drand48" #. type: Plain text #: build/C/man3/drand48.3:275 -#, fuzzy -#| msgid "" -#| "The B(), B(), B(), B(), B(), " -#| "B(), B(), B(), and B() functions " -#| "record global state information for the random number generator, so they " -#| "are not thread-safe." msgid "" "The above functions record global state information for the random number " "generator, so they are not thread-safe." -msgstr "" -"関数 B(), B(), B(), B(), B(), " -"B(), B(), B(), B() は、 乱数生成に使用する" -"状態情報をグローバルに保持する。 そのため、 これらの関数はスレッドセーフでは" -"ない。" +msgstr "上記の関数は、 乱数生成に使用する状態情報をグローバルに保持する。 そのため、 これらの関数はスレッドセーフではない。" #. type: Plain text #: build/C/man3/drand48.3:277 -#, fuzzy -#| msgid "SVr4, POSIX.1-2001, 4.3BSD." msgid "POSIX.1-2001, POSIX.1-2008, SVr4." -msgstr "SVr4, POSIX.1-2001, 4.3BSD." +msgstr "POSIX.1-2001, POSIX.1-2008, SVr4." #. type: Plain text #: build/C/man3/drand48.3:280 @@ -2320,44 +2164,45 @@ msgstr "BIB<, double *>IB<) #. type: Plain text #: build/C/man3/drand48_r.3:40 -#, fuzzy, no-wrap -#| msgid "B< struct drand48_data *>IB<, double *>IB<);>\n" +#, no-wrap msgid "" "BIB<[3]>I<,>\n" "B< struct drand48_data *>IB<, double *>IB<);>\n" -msgstr "B< struct drand48_data *>IB<, double *>IB<);>\n" +msgstr "" +"BIB<[3]>I<,>\n" +"B< struct drand48_data *>IB<, double *>IB<);>\n" #. type: Plain text #: build/C/man3/drand48_r.3:42 -#, fuzzy, no-wrap -#| msgid "BIB<, long int *>IB<);>\n" +#, no-wrap msgid "BIB<, long *>IB<);>\n" -msgstr "BIB<, long int *>IB<);>\n" +msgstr "BIB<, long *>IB<);>\n" #. type: Plain text #: build/C/man3/drand48_r.3:45 -#, fuzzy, no-wrap -#| msgid "B< struct drand48_data *>IB<, long int *>IB<);>\n" +#, no-wrap msgid "" "BIB<,>\n" "B< struct drand48_data *>IB<, long *>IB<);>\n" -msgstr "B< struct drand48_data *>IB<, long int *>IB<);>\n" +msgstr "" +"BIB<,>\n" +"B< struct drand48_data *>IB<, long *>IB<);>\n" #. type: Plain text #: build/C/man3/drand48_r.3:47 -#, fuzzy, no-wrap -#| msgid "BIB<,long int *>IB<);>\n" +#, no-wrap msgid "BIB<,long *>IB<);>\n" -msgstr "BIB<,long int *>IB<);>\n" +msgstr "BIB<,long *>IB<);>\n" #. type: Plain text #: build/C/man3/drand48_r.3:50 -#, fuzzy, no-wrap -#| msgid "B< struct drand48_data *>IB<, long int *>IB<);>\n" +#, no-wrap msgid "" "BIB<,>\n" "B< struct drand48_data *>IB<, long *>IB<);>\n" -msgstr "B< struct drand48_data *>IB<, long int *>IB<);>\n" +msgstr "" +"BIB<,>\n" +"B< struct drand48_data *>IB<, long *>IB<);>\n" #. type: Plain text #: build/C/man3/drand48_r.3:52 @@ -2367,21 +2212,23 @@ msgstr "BIB<, struct drand48_data *>IB #. type: Plain text #: build/C/man3/drand48_r.3:55 -#, fuzzy, no-wrap -#| msgid "BIB<, struct drand48_data *>IB<);>\n" +#, no-wrap msgid "" "BIB<,>\n" "B< struct drand48_data *>IB<);>\n" -msgstr "BIB<, struct drand48_data *>IB<);>\n" +msgstr "" +"BIB<,>\n" +"B< struct drand48_data *>IB<);>\n" #. type: Plain text #: build/C/man3/drand48_r.3:58 -#, fuzzy, no-wrap -#| msgid "BIB<, struct drand48_data *>IB<);>\n" +#, no-wrap msgid "" "BIB<,>\n" "B< struct drand48_data *>IB<);>\n" -msgstr "BIB<, struct drand48_data *>IB<);>\n" +msgstr "" +"BIB<,>\n" +"B< struct drand48_data *>IB<);>\n" #. .BR drand48_r (), #. .BR erand48_r (), @@ -2477,10 +2324,9 @@ msgstr "ECVT" #. type: TH #: build/C/man3/ecvt.3:32 build/C/man3/ecvt_r.3:30 build/C/man3/getloadavg.3:34 #: build/C/man3/qecvt.3:28 -#, fuzzy, no-wrap -#| msgid "2014-03-18" +#, no-wrap msgid "2016-03-15" -msgstr "2014-03-18" +msgstr "2016-03-15" #. type: Plain text #: build/C/man3/ecvt.3:35 @@ -2534,10 +2380,8 @@ msgstr "glibc 2.12 より前:" #. || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED #. type: Plain text #: build/C/man3/ecvt.3:65 build/C/man3/gcvt.3:60 -#, fuzzy -#| msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E=\\ 500" msgid "_SVID_SOURCE || _XOPEN_SOURCE\\ E=\\ 500" -msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E=\\ 500" +msgstr "_SVID_SOURCE || _XOPEN_SOURCE\\ E=\\ 500" #. type: Plain text #: build/C/man3/ecvt.3:91 @@ -2699,6 +2543,8 @@ msgid "" "/* Glibc since 2.19: */ _DEFAULT_SOURCE\n" " || /* Glibc versions E= 2.19: */ _SVID_SOURCE || _BSD_SOURCE\n" msgstr "" +"/* glibc 2.19 以降: */ _DEFAULT_SOURCE\n" +" || /* glibc 2.19 以前: */ _SVID_SOURCE || _BSD_SOURCE\n" #. type: Plain text #: build/C/man3/ecvt_r.3:87 @@ -2721,12 +2567,13 @@ msgstr "これらの関数は成功すると 0 を、それ以外は -1 を返 #. type: tbl table #: build/C/man3/ecvt_r.3:100 -#, fuzzy, no-wrap -#| msgid "B(), B():" +#, no-wrap msgid "" "B(),\n" "B(),\n" -msgstr "B(), B():" +msgstr "" +"B(),\n" +"B(),\n" #. type: tbl table #: build/C/man3/ecvt_r.3:100 build/C/man3/malloc.3:270 @@ -2734,16 +2581,17 @@ msgstr "B(), B():" #: build/C/man3/random_r.3:169 #, no-wrap msgid ".br\n" -msgstr "" +msgstr ".br\n" #. type: tbl table #: build/C/man3/ecvt_r.3:103 -#, fuzzy, no-wrap -#| msgid "B(), B():" +#, no-wrap msgid "" "B(),\n" "B()" -msgstr "B(), B():" +msgstr "" +"B(),\n" +"B()" #. type: Plain text #: build/C/man3/ecvt_r.3:107 @@ -2779,17 +2627,11 @@ msgstr "BIB<);>\n" #. type: Plain text #: build/C/man3/exit.3:45 -#, fuzzy -#| msgid "" -#| "The B() function causes normal process termination and the value " -#| "of I is returned to the parent (see B(2))." msgid "" "The B() function causes normal process termination and the least " "significant byte of I (i.e., I) is returned to the " "parent (see B(2))." -msgstr "" -"B() 関数は、プロセスを正常に終了させ、 I という値を親プ" -"ロセスへ返す (B(2) を参照)。" +msgstr "B() 関数は、プロセスを正常に終了させ、 I の最下位バイト (つまり I) を親プロセスへ返す (B(2) を参照)。" #. type: Plain text #: build/C/man3/exit.3:72 @@ -2864,22 +2706,12 @@ msgstr "" #. type: Plain text #: build/C/man3/exit.3:124 -#, fuzzy -#| msgid "" -#| "It is undefined what happens if one of the functions registered using " -#| "B(3) and B(3) calls either B() or " -#| "B(3). Note that a call to B(2) removes registrations " -#| "created using B(3) and B(3)." msgid "" "The behavior is undefined if one of the functions registered using " "B(3) and B(3) calls either B() or B(3). " "Note that a call to B(2) removes registrations created using " "B(3) and B(3)." -msgstr "" -"B(3) や B(3) を使って登録された関数の中で B() か " -"B(3) が呼び出された場合、 何が起こるかは未定義である。 " -"B(2) を呼び出すと、 B(3) や B(3) を使って登録された" -"関数が削除される点に注意すること。" +msgstr "B(3) や B(3) を使って登録された関数の中で B() か B(3) が呼び出された場合、 動作は未定義である。 B(2) を呼び出すと、 B(3) や B(3) を使って登録された関数が削除される点に注意すること。" #. type: Plain text #: build/C/man3/exit.3:133 @@ -2894,16 +2726,10 @@ msgstr "" #. type: Plain text #: build/C/man3/exit.3:138 -#, fuzzy -#| msgid "" -#| "BSD has attempted to standardize exit codes; see the file Isysexits." -#| "hE>." msgid "" "BSD has attempted to standardize exit codes (which some C libraries such as " "the GNU C library have also adopted); see the file Isysexits.hE>." -msgstr "" -"BSD は終了コードを標準化しようとしている; Isysexits.hE> を参照する" -"こと。" +msgstr "BSD は終了コードを標準化しようとしている (GNU C ライブラリなどのいくつかの C ライブラリもこれを採用している); Isysexits.hE> を参照すること。" #. type: Plain text #: build/C/man3/exit.3:144 @@ -2916,7 +2742,7 @@ msgstr "" #: build/C/man3/exit.3:144 build/C/man3/exit.3:152 build/C/man3/exit.3:155 #, no-wrap msgid "\\(bu" -msgstr "" +msgstr "\\(bu" #. type: Plain text #: build/C/man3/exit.3:152 @@ -2962,24 +2788,13 @@ msgstr "" #. type: Plain text #: build/C/man3/exit.3:185 -#, fuzzy -#| msgid "" -#| "If the process is a session leader and its controlling terminal is the " -#| "controlling terminal of the session, then each process in the foreground " -#| "process group of this controlling terminal is sent a B signal, " -#| "and the terminal is disassociated from this session, allowing it to be " -#| "acquired by a new controlling process." msgid "" "If the exiting process is a session leader and its controlling terminal is " "the controlling terminal of the session, then each process in the foreground " "process group of this controlling terminal is sent a B signal, and " "the terminal is disassociated from this session, allowing it to be acquired " "by a new controlling process." -msgstr "" -"そのプロセスがセッションのリーダーで、 そのプロセスの制御端末がそのセッション" -"の制御端末である場合、 この制御端末のフォアグラウンドプロセスグループにある " -"各プロセスに B シグナルが送られ、端末がセッションから切り離される。 " -"これにより新しい制御プロセスを取得することができる。" +msgstr "終了するプロセスがセッションのリーダーで、 そのプロセスの制御端末がそのセッションの制御端末である場合、 この制御端末のフォアグラウンドプロセスグループにある 各プロセスに B シグナルが送られ、端末がセッションから切り離される。 これにより新しい制御プロセスを取得することができる。" #. type: Plain text #: build/C/man3/exit.3:197 @@ -3007,16 +2822,10 @@ msgstr "" #. type: Plain text #: build/C/man3/exit.3:215 -#, fuzzy -#| msgid "" -#| "B<_exit>(2), B(2), B(2), B(3), B(3), " -#| "B(3)" msgid "" "B<_exit>(2), B(2), B(2), B(2), B(3), " "B(3), B(3)" -msgstr "" -"B<_exit>(2), B(2), B(2), B(3), B(3), " -"B(3)" +msgstr "B<_exit>(2), B(2), B(2), B(2), B(3), B(3), B(3)" #. type: TH #: build/C/man3/gcvt.3:30 @@ -3053,17 +2862,14 @@ msgstr "" #. type: Plain text #: build/C/man3/gcvt.3:76 -#, fuzzy -#| msgid "The B() function returns no value." msgid "The B() function returns I." -msgstr "B() 関数は値を返さない。" +msgstr "B() 関数は I を返す。" #. type: tbl table #: build/C/man3/gcvt.3:86 -#, fuzzy, no-wrap -#| msgid "B():" +#, no-wrap msgid "B()" -msgstr "B():" +msgstr "B()" #. type: Plain text #: build/C/man3/gcvt.3:98 @@ -3313,10 +3119,9 @@ msgstr "" #. type: TP #: build/C/man3/getauxval.3:116 -#, fuzzy, no-wrap -#| msgid "B (since glibc 2.19)" +#, no-wrap msgid "B (since glibc 2.18)" -msgstr "B (glibc 2.19 以降)" +msgstr "B (glibc 2.18 以降)" #. type: Plain text #: build/C/man3/getauxval.3:119 @@ -3343,10 +3148,9 @@ msgstr "命令キャッシュのブロックサイズ。" #. Kernel commit 98a5f361b8625c6f4841d6ba013bbf0e80d08147 #. type: TP #: build/C/man3/getauxval.3:128 -#, fuzzy, no-wrap -#| msgid "B" +#, no-wrap msgid "B" -msgstr "B" +msgstr "B" #. type: Plain text #: build/C/man3/getauxval.3:135 @@ -3359,24 +3163,20 @@ msgstr "" #. type: TP #: build/C/man3/getauxval.3:135 -#, fuzzy, no-wrap -#| msgid "B" +#, no-wrap msgid "B" -msgstr "B" +msgstr "B" #. type: Plain text #: build/C/man3/getauxval.3:138 -#, fuzzy -#| msgid "The data cache block size." msgid "The L1 data cache size." -msgstr "データキャッシュのブロックサイズ。" +msgstr "L1 データキャッシュのサイズ。" #. type: TP #: build/C/man3/getauxval.3:138 -#, fuzzy, no-wrap -#| msgid "B" +#, no-wrap msgid "B" -msgstr "B" +msgstr "B" #. type: Plain text #: build/C/man3/getauxval.3:142 @@ -3386,24 +3186,20 @@ msgstr "" #. type: TP #: build/C/man3/getauxval.3:142 -#, fuzzy, no-wrap -#| msgid "B" +#, no-wrap msgid "B" -msgstr "B" +msgstr "B" #. type: Plain text #: build/C/man3/getauxval.3:145 -#, fuzzy -#| msgid "The instruction cache block size." msgid "The L1 instruction cache size." -msgstr "命令キャッシュのブロックサイズ。" +msgstr "L1 命令キャッシュのサイズ。" #. type: TP #: build/C/man3/getauxval.3:145 -#, fuzzy, no-wrap -#| msgid "B" +#, no-wrap msgid "B" -msgstr "B" +msgstr "B" #. type: Plain text #: build/C/man3/getauxval.3:149 @@ -3412,24 +3208,20 @@ msgstr "" #. type: TP #: build/C/man3/getauxval.3:149 -#, fuzzy, no-wrap -#| msgid "B" +#, no-wrap msgid "B" -msgstr "B" +msgstr "B" #. type: Plain text #: build/C/man3/getauxval.3:152 -#, fuzzy -#| msgid "The data cache block size." msgid "The L2 cache size." -msgstr "データキャッシュのブロックサイズ。" +msgstr "L2 キャッシュのサイズ。" #. type: TP #: build/C/man3/getauxval.3:152 -#, fuzzy, no-wrap -#| msgid "B" +#, no-wrap msgid "B" -msgstr "B" +msgstr "B" #. type: Plain text #: build/C/man3/getauxval.3:156 @@ -3438,17 +3230,14 @@ msgstr "" #. type: TP #: build/C/man3/getauxval.3:156 -#, fuzzy, no-wrap -#| msgid "B" +#, no-wrap msgid "B" -msgstr "B" +msgstr "B" #. type: Plain text #: build/C/man3/getauxval.3:159 -#, fuzzy -#| msgid "The data cache block size." msgid "The L3 cache size." -msgstr "データキャッシュのブロックサイズ。" +msgstr "L3 キャッシュのサイズ。" #. type: TP #: build/C/man3/getauxval.3:159 @@ -3642,10 +3431,9 @@ msgstr "B() 関数は glibc バージョン 2.16 で追加された #. type: tbl table #: build/C/man3/getauxval.3:243 -#, fuzzy, no-wrap -#| msgid "B():" +#, no-wrap msgid "B()" -msgstr "B():" +msgstr "B()" #. type: Plain text #: build/C/man3/getauxval.3:247 @@ -3654,14 +3442,6 @@ msgstr "この関数は非標準で glibc による拡張である。" #. type: Plain text #: build/C/man3/getauxval.3:256 -#, fuzzy -#| msgid "" -#| "The primary consumer of the information in the auxiliary vector is the " -#| "dynamic linker B(8). The auxiliary vector is a convenient " -#| "and efficient shortcut that allows the kernel to communicate a certain " -#| "set of standard information that the dynamic linker usually or always " -#| "needs. In some cases, the same information could be obtained by system " -#| "calls, but using the auxiliary vector is cheaper." msgid "" "The primary consumer of the information in the auxiliary vector is the " "dynamic linker, B(8). The auxiliary vector is a convenient and " @@ -3690,23 +3470,16 @@ msgstr "" #. type: Plain text #: build/C/man3/getauxval.3:266 -#, fuzzy, no-wrap -#| msgid " $ LD_SHOW_AUXV=1 sleep 1\n" +#, no-wrap msgid "$ LD_SHOW_AUXV=1 sleep 1\n" -msgstr " $ LD_SHOW_AUXV=1 sleep 1\n" +msgstr "$ LD_SHOW_AUXV=1 sleep 1\n" #. type: Plain text #: build/C/man3/getauxval.3:275 -#, fuzzy -#| msgid "" -#| "The auxiliary vector of any process can (subject to file permissions) be " -#| "obtained via I; see B(5) for more information." msgid "" "The auxiliary vector of any process can (subject to file permissions) be " "obtained via I; see B(5) for more information." -msgstr "" -"任意のプロセスの補助ベクトルは (ファイルのアクセス許可があれば) I 経由で取得できる。 詳細は B(5) を参照。" +msgstr "任意のプロセスの補助ベクトルは (ファイルのアクセス許可があれば) I 経由で取得できる。 詳細は B(5) を参照。" #. type: Plain text #: build/C/man3/getauxval.3:284 @@ -3808,16 +3581,10 @@ msgstr "プロセスの許可ケーパビリティセットが空でない場合 #. type: Plain text #: build/C/man3/getenv.3:81 -#, fuzzy -#| msgid "" -#| "Secure execution may also required if triggered by some Linux security " -#| "modules." msgid "" "Secure execution may also be required if triggered by some Linux security " "modules." -msgstr "" -"Linux セキュリティモジュールにより要求された場合にも \"secure execution\" は" -"必要となる。" +msgstr "Linux セキュリティモジュールにより要求された場合にも \"secure execution\" は必要となる場合がある。" #. type: Plain text #: build/C/man3/getenv.3:88 @@ -3938,10 +3705,8 @@ msgstr "BIB<, int >IB<);>\n" #. type: Plain text #: build/C/man3/getloadavg.3:50 -#, fuzzy -#| msgid "B():" msgid "B():" -msgstr "B():" +msgstr "B():" #. type: Plain text #: build/C/man3/getloadavg.3:55 @@ -3955,24 +3720,13 @@ msgstr "" #. type: Plain text #: build/C/man3/getloadavg.3:67 -#, fuzzy -#| msgid "" -#| "The B() function returns the number of processes in the " -#| "system run queue averaged over various periods of time. Up to I " -#| "samples are retrieved and assigned to successive elements of " -#| "I[]. The system imposes a maximum of 3 samples, representing " -#| "averages over the last 1, 5, and 15 minutes, respectively." msgid "" "The B() function returns the number of processes in the system " "run queue averaged over various periods of time. Up to I samples are " "retrieved and assigned to successive elements of I. The system " "imposes a maximum of 3 samples, representing averages over the last 1, 5, " "and 15 minutes, respectively." -msgstr "" -"B() 関数はシステムの実行キューに入っているプロセスの数を、 様々" -"な期間について平均した値を返す。 I 個までのサンプル値を取得し、 " -"I[] の連続する要素に代入する。 システムが提供するサンプル数は 3 個ま" -"でで、 それぞれ最近 1, 5, 15 分の平均を表している。" +msgstr "B() 関数はシステムの実行キューに入っているプロセスの数を、 様々な期間について平均した値を返す。 I 個までのサンプル値を取得し、 I の連続する要素に代入する。 システムが提供するサンプル数は 3 個までで、 それぞれ最近 1, 5, 15 分の平均を表している。" #. .SH HISTORY #. The @@ -3995,18 +3749,15 @@ msgstr "この関数は glibc のバージョン 2.2 以降で利用可能であ #. type: tbl table #: build/C/man3/getloadavg.3:87 -#, fuzzy, no-wrap -#| msgid "B(3)" +#, no-wrap msgid "B()" -msgstr "B(3)" +msgstr "B()" #. mdoc seems to have a bug - there must be no newline here #. type: Plain text #: build/C/man3/getloadavg.3:93 -#, fuzzy -#| msgid "Not in POSIX.1-2001. Present on the BSDs and Solaris." msgid "Not in POSIX.1. Present on the BSDs and Solaris." -msgstr "POSIX.1-2001 にはない。 BSD 系と Solaris に存在する。" +msgstr "POSIX.1 にはない。 BSD 系と Solaris に存在する。" #. type: Plain text #: build/C/man3/getloadavg.3:96 @@ -4041,12 +3792,13 @@ msgstr "B():" #. || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED #. type: Plain text #: build/C/man3/getsubopt.3:46 -#, fuzzy, no-wrap -#| msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E=\\ 200809L" +#, no-wrap msgid "" "_XOPEN_SOURCE\\ E= 500\n" " || /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E=\\ 200809L\n" -msgstr "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E=\\ 200809L" +msgstr "" +"_XOPEN_SOURCE\\ E= 500\n" +" || /* glibc 2.12 以降: */ _POSIX_C_SOURCE\\ E=\\ 200809L\n" #. type: Plain text #: build/C/man3/getsubopt.3:63 @@ -4067,10 +3819,9 @@ msgstr "" #. type: Plain text #: build/C/man3/getsubopt.3:67 -#, fuzzy, no-wrap -#| msgid "B" +#, no-wrap msgid "B\n" -msgstr "B" +msgstr "B\n" #. type: Plain text #: build/C/man3/getsubopt.3:78 @@ -4152,10 +3903,9 @@ msgstr "" #. type: tbl table #: build/C/man3/getsubopt.3:140 -#, fuzzy, no-wrap -#| msgid "B():" +#, no-wrap msgid "B()" -msgstr "B():" +msgstr "B()" #. type: Plain text #: build/C/man3/getsubopt.3:150 @@ -4397,21 +4147,14 @@ msgstr "MALLOC" #. type: Plain text #: build/C/man3/malloc.3:37 -#, fuzzy -#| msgid "malloc, free, calloc, realloc - allocate and free dynamic memory" msgid "" "malloc, free, calloc, realloc, reallocarray - allocate and free dynamic " "memory" -msgstr "malloc, free, calloc, realloc - 動的なメモリーの割り当てと解放を行う" +msgstr "malloc, free, calloc, realloc, reallocarray - 動的なメモリーの割り当てと解放を行う" #. type: Plain text #: build/C/man3/malloc.3:46 -#, fuzzy, no-wrap -#| msgid "" -#| "BIB<);>\n" -#| "BI<*ptr>B<);>\n" -#| "BIB<, size_t >IB<);>\n" -#| "BI<*ptr>B<, size_t >IB<);>\n" +#, no-wrap msgid "" "BIB<);>\n" "BI<*ptr>B<);>\n" @@ -4423,13 +4166,12 @@ msgstr "" "BI<*ptr>B<);>\n" "BIB<, size_t >IB<);>\n" "BI<*ptr>B<, size_t >IB<);>\n" +"BI<*ptr>B<, size_t >IB<, size_t >IB<);>\n" #. type: Plain text #: build/C/man3/malloc.3:54 -#, fuzzy -#| msgid "B(3)" msgid "B():" -msgstr "B(3)" +msgstr "B():" #. type: Plain text #: build/C/man3/malloc.3:59 @@ -4440,7 +4182,11 @@ msgid "" " Glibc 2.28 and earlier:\n" " _GNU_SOURCE\n" msgstr "" - +" glibc 2.29 以降:\n" +" _DEFAULT_SOURCE\n" +" glibc 2.28 以前:\n" +" _GNU_SOURCE\n" + #. glibc does this: #. type: Plain text #: build/C/man3/malloc.3:75 @@ -4505,22 +4251,10 @@ msgstr "" #: build/C/man3/malloc.3:125 #, no-wrap msgid "malloc(nmemb * size);\n" -msgstr "" +msgstr "malloc(nmemb * size);\n" #. type: Plain text #: build/C/man3/malloc.3:163 -#, fuzzy -#| msgid "" -#| "The B() function changes the size of the memory block pointed " -#| "to by I to I bytes. The contents will be unchanged in the " -#| "range from the start of the region up to the minimum of the old and new " -#| "sizes. If the new size is larger than the old size, the added memory " -#| "will I be initialized. If I is NULL, then the call is " -#| "equivalent to I, for all values of I; if I is " -#| "equal to zero, and I is not NULL, then the call is equivalent to " -#| "I. Unless I is NULL, it must have been returned by an " -#| "earlier call to B(), B() or B(). If the area " -#| "pointed to was moved, a I is done." msgid "" "The B() function changes the size of the memory block pointed to " "by I to I bytes. The contents will be unchanged in the range " @@ -4558,7 +4292,7 @@ msgstr "" #: build/C/man3/malloc.3:177 #, no-wrap msgid " realloc(ptr, nmemb * size);\n" -msgstr "" +msgstr " realloc(ptr, nmemb * size);\n" #. type: Plain text #: build/C/man3/malloc.3:191 @@ -4629,7 +4363,7 @@ msgstr "" msgid "" "B(), B(), B(), and B() can fail with " "the following error:" -msgstr "" +msgstr "B(), B(), B(), B() は以下のエラーで失敗することがある。" #. type: TP #: build/C/man3/malloc.3:247 build/C/man3/putenv.3:78 build/C/man3/setenv.3:120 @@ -4646,54 +4380,45 @@ msgstr "" #. type: Plain text #: build/C/man3/malloc.3:259 -#, fuzzy -#| msgid "B() first appeared in glibc 2.17." msgid "B() first appeared in glibc in version 2.26." -msgstr "B() は glibc 2.17 で初めて登場した。" +msgstr "B() は glibc 2.26 で初めて登場した。" #. type: tbl table #: build/C/man3/malloc.3:270 -#, fuzzy, no-wrap -#| msgid "B(3)" +#, no-wrap msgid "" "B(),\n" "B(),\n" -msgstr "B(3)" +msgstr "" +"B(),\n" +"B(),\n" #. type: tbl table #: build/C/man3/malloc.3:273 -#, fuzzy, no-wrap -#| msgid "B(2), B(3)" +#, no-wrap msgid "" "B(),\n" "B()" -msgstr "B(2), B(3)" +msgstr "" +"B(),\n" +"B()" #. type: Plain text #: build/C/man3/malloc.3:281 msgid "" "B(), B(), B(), B(): POSIX.1-2001, " "POSIX.1-2008, C89, C99." -msgstr "" +msgstr "B(), B(), B(), B(): POSIX.1-2001, POSIX.1-2008, C89, C99." #. type: Plain text #: build/C/man3/malloc.3:284 msgid "" "B() is a nonstandard extension that first appeared in OpenBSD " "5.6 and FreeBSD 11.0." -msgstr "" +msgstr "B() は非標準の拡張で、 OpenBSD 5.6 と FreeBSD 11.0 で初めて登場した。" #. type: Plain text #: build/C/man3/malloc.3:300 -#, fuzzy -#| msgid "" -#| "By default, Linux follows an optimistic memory allocation strategy. This " -#| "means that when B() returns non-NULL there is no guarantee that " -#| "the memory really is available. In case it turns out that the system is " -#| "out of memory, one or more processes will be killed by the OOM killer. " -#| "For more information, see the description of I and I in B(5), and the " -#| "Linux kernel source file I." msgid "" "By default, Linux follows an optimistic memory allocation strategy. This " "means that when B() returns non-NULL there is no guarantee that the " @@ -4702,16 +4427,7 @@ msgid "" "information, see the description of I and I in B(5), and the Linux kernel source file " "I." -msgstr "" -"デフォルトでは、Linux は楽観的メモリー配置戦略を用いている。つまり、\n" -"B() が NULL でない値を返しても、そのメモリーが実際に利用可能であるこ" -"と\n" -"が保証されない。システムがメモリー不足状態になったとき、メモリー不足解決器 " -"(OOM\n" -"killer) によって一つまたは複数のプロセスが削除される。\n" -"詳しい情報は、B(5) の I と\n" -"I、および Linux カーネルのソースファイルの\n" -"I を参照のこと。" +msgstr "デフォルトでは、Linux は楽観的メモリー配置戦略を用いている。つまり、 B() が NULL でない値を返しても、そのメモリーが実際に利用可能であることが保証されない。システムがメモリー不足状態になったとき、メモリー不足解決器 (OOM killer) によって一つまたは複数のプロセスが削除される。詳しい情報は、B(5) の I と I、および Linux カーネルのソースファイルの I を参照のこと。" #. type: Plain text #: build/C/man3/malloc.3:323 @@ -4771,26 +4487,13 @@ msgstr "" #. type: Plain text #: build/C/man3/malloc.3:359 -#, fuzzy -#| msgid "" -#| "The UNIX 98 standard requires B(), B(), and B() " -#| "to set I to B upon failure. Glibc assumes that this is " -#| "done (and the glibc versions of these routines do this); if you use a " -#| "private malloc implementation that does not set I, then certain " -#| "library routines may fail without having a reason in I." msgid "" "SUSv2 requires B(), B(), and B() to set I " "to B upon failure. Glibc assumes that this is done (and the glibc " "versions of these routines do this); if you use a private malloc " "implementation that does not set I, then certain library routines may " "fail without having a reason in I." -msgstr "" -"UNIX 98 標準では、 B(), B(), B() は実行に失敗したと" -"きに I を B に設定することになっている。 Glibc ではこれが守ら" -"れていることを仮定している (またこれらのルーチンの glibc バージョンはこのこと" -"を守っている)。 個人的に別の malloc の実装を使っていて、その malloc が" -"I を設定しない場合には、失敗した際に I にエラーの理由を設定しな" -"いライブラリルーチンがあるかもしれない。" +msgstr "SUSv2 では、 B(), B(), B() は実行に失敗したときに I を B に設定することになっている。 Glibc ではこれが守られていることを仮定している (またこれらのルーチンの glibc バージョンはこのことを守っている)。 個人的に別の malloc の実装を使っていて、その malloc がI を設定しない場合には、失敗した際に I にエラーの理由を設定しないライブラリルーチンがあるかもしれない。" #. type: Plain text #: build/C/man3/malloc.3:368 @@ -4814,19 +4517,11 @@ msgstr "" #. type: Plain text #: build/C/man3/malloc.3:399 -#, fuzzy -#| msgid "" -#| "B(2), B(2), B(3), B(3), " -#| "B(3), B(3), B(3), " -#| "B(3), B(3), B(3), B(3)" msgid "" "B(1), B(2), B(2), B(3), B(3), " "B(3), B(3), B(3), " "B(3), B(3), B(3), B(3)" -msgstr "" -"B(2), B(2), B(3), B(3), " -"B(3), B(3), B(3), " -"B(3), B(3), B(3), B(3)" +msgstr "B(1), B(2), B(2), B(3), B(3), B(3), B(3), B(3), B(3), B(3), B(3), B(3)" #. type: Plain text #: build/C/man3/malloc.3:403 @@ -5024,21 +4719,12 @@ msgstr "3." #. type: Plain text #: build/C/man3/mbstowcs.3:64 -#, fuzzy -#| msgid "" -#| "The multibyte string has been completely converted, including the " -#| "terminating null wide character (\\(aq\\e0\\(aq). In this case, the " -#| "number of wide characters written to I, excluding the terminating " -#| "null wide character, is returned." msgid "" "The multibyte string has been completely converted, including the " "terminating null character (\\(aq\\e0\\(aq). In this case, the number of " "wide characters written to I, excluding the terminating null wide " "character, is returned." -msgstr "" -"マルチバイト文字列が終端のヌルワイド文字 (\\(aq\\e0\\(aq) まで含めて完全に 変" -"換された場合。この場合は終端のヌルワイド文字を除いて I に書き込まれた文" -"字数を返す。" +msgstr "マルチバイト文字列が終端のヌル文字 (\\(aq\\e0\\(aq) まで含めて完全に変換された場合。この場合は終端のヌルワイド文字を除いて I に書き込まれた文字数を返す。" #. type: Plain text #: build/C/man3/mbstowcs.3:70 @@ -5154,13 +4840,7 @@ msgstr "プログラムのソース" #. type: Plain text #: build/C/man3/mbstowcs.3:151 -#, fuzzy, no-wrap -#| msgid "" -#| "#include Elocale.hE\n" -#| "#include Ewchar.hE\n" -#| "#include Estdio.hE\n" -#| "#include Estring.hE\n" -#| "#include Estdlib.hE\n" +#, no-wrap msgid "" "#include Ewctype.hE\n" "#include Elocale.hE\n" @@ -5169,6 +4849,7 @@ msgid "" "#include Estring.hE\n" "#include Estdlib.hE\n" msgstr "" +"#include Ewctype.hE\n" "#include Elocale.hE\n" "#include Ewchar.hE\n" "#include Estdio.hE\n" @@ -5177,14 +4858,7 @@ msgstr "" #. type: Plain text #: build/C/man3/mbstowcs.3:157 -#, fuzzy, no-wrap -#| msgid "" -#| "int\n" -#| "main(int argc, char *argv[])\n" -#| "{\n" -#| " size_t mbslen; /* Number of multibyte characters in source */\n" -#| " wchar_t *wcs; /* Pointer to converted wide character string */\n" -#| " wchar_t *wp;\n" +#, no-wrap msgid "" "int\n" "main(int argc, char *argv[])\n" @@ -5197,7 +4871,6 @@ msgstr "" "{\n" " size_t mbslen; /* Number of multibyte characters in source */\n" " wchar_t *wcs; /* Pointer to converted wide character string */\n" -" wchar_t *wp;\n" #. type: Plain text #: build/C/man3/mbstowcs.3:162 @@ -5289,13 +4962,7 @@ msgstr "" #. type: Plain text #: build/C/man3/mbstowcs.3:193 -#, fuzzy, no-wrap -#| msgid "" -#| " wcs = calloc(mbslen + 1, sizeof(wchar_t));\n" -#| " if (wcs == NULL) {\n" -#| " perror(\"calloc\");\n" -#| " exit(EXIT_FAILURE);\n" -#| " }\n" +#, no-wrap msgid "" " wcs = calloc(mbslen + 1, sizeof(*wcs));\n" " if (wcs == NULL) {\n" @@ -5303,7 +4970,7 @@ msgid "" " exit(EXIT_FAILURE);\n" " }\n" msgstr "" -" wcs = calloc(mbslen + 1, sizeof(wchar_t));\n" +" wcs = calloc(mbslen + 1, sizeof(*wcs));\n" " if (wcs == NULL) {\n" " perror(\"calloc\");\n" " exit(EXIT_FAILURE);\n" @@ -5355,15 +5022,12 @@ msgstr "" #. type: Plain text #: build/C/man3/mbstowcs.3:210 -#, fuzzy, no-wrap -#| msgid "" -#| " for (wp = wcs; *wp != 0; wp++) {\n" -#| " printf(\" %lc \", (wint_t) *wp);\n" +#, no-wrap msgid "" " for (wchar_t *wp = wcs; *wp != 0; wp++) {\n" " printf(\" %lc \", (wint_t) *wp);\n" msgstr "" -" for (wp = wcs; *wp != 0; wp++) {\n" +" for (wchar_t *wp = wcs; *wp != 0; wp++) {\n" " printf(\" %lc \", (wint_t) *wp);\n" #. type: Plain text @@ -5414,13 +5078,9 @@ msgstr "" #. type: Plain text #: build/C/man3/mbstowcs.3:235 -#, fuzzy -#| msgid "" -#| "B(3), B(3), B(3), B(3), B(3)" msgid "" "B(3), B(3), B(3), B(3), B(3)" -msgstr "" -"B(3), B(3), B(3), B(3), B(3)" +msgstr "B(3), B(3), B(3), B(3), B(3)" #. type: TH #: build/C/man3/mbtowc.3:16 @@ -5431,10 +5091,9 @@ msgstr "MBTOWC" #. type: TH #: build/C/man3/mbtowc.3:16 build/C/man3/putenv.3:36 build/C/man3/strfromd.3:32 #: build/C/man3/system.3:31 -#, fuzzy, no-wrap -#| msgid "2014-03-25" +#, no-wrap msgid "2019-03-06" -msgstr "2014-03-25" +msgstr "2019-03-06" #. type: Plain text #: build/C/man3/mbtowc.3:19 @@ -5525,10 +5184,9 @@ msgstr "" #. type: tbl table #: build/C/man3/mbtowc.3:123 -#, fuzzy, no-wrap -#| msgid "B(3)" +#, no-wrap msgid "B()" -msgstr "B(3)" +msgstr "B()" #. type: Plain text #: build/C/man3/mbtowc.3:134 @@ -5549,16 +5207,10 @@ msgstr "" #. type: Plain text #: build/C/man3/mbtowc.3:147 -#, fuzzy -#| msgid "" -#| "B(3), B(3), B(3), B(3), " -#| "B(3), B(3)" msgid "" "B(3), B(3), B(3), B(3), " "B(3), B(3)" -msgstr "" -"B(3), B(3), B(3), B(3), B(3), " -"B(3)" +msgstr "B(3), B(3), B(3), B(3), B(3), B(3)" #. type: TH #: build/C/man3/mkdtemp.3:26 @@ -5568,10 +5220,9 @@ msgstr "MKDTEMP" #. type: TH #: build/C/man3/mkdtemp.3:26 -#, fuzzy, no-wrap -#| msgid "2007-07-26" +#, no-wrap msgid "2016-07-17" -msgstr "2007-07-26" +msgstr "2016-07-17" #. type: Plain text #: build/C/man3/mkdtemp.3:29 @@ -5591,22 +5242,18 @@ msgstr "B():" #. type: Plain text #: build/C/man3/mkdtemp.3:47 -#, fuzzy -#| msgid "|| /* Since glibc 2.10: */" msgid "/* Since glibc 2.19: */ _DEFAULT_SOURCE" -msgstr "|| /* Since glibc 2.10: */" +msgstr "/* glibc 2.19 以降: */ _DEFAULT_SOURCE" #. type: Plain text #: build/C/man3/mkdtemp.3:49 msgid "|| /* Glibc 2.19 and earlier: */ _BSD_SOURCE" -msgstr "" +msgstr "|| /* glibc 2.19 以前: */ _BSD_SOURCE" #. type: Plain text #: build/C/man3/mkdtemp.3:52 -#, fuzzy -#| msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E=\\ 200809L" msgid "|| /* Since glibc 2.10: */ _POSIX_C_SOURCE\\ E=\\ 200809L" -msgstr "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E=\\ 200809L" +msgstr "|| /* glibc 2.10 以降: */ _POSIX_C_SOURCE\\ E=\\ 200809L" #. type: Plain text #: build/C/man3/mkdtemp.3:68 @@ -5665,10 +5312,9 @@ msgstr "glibc 2.1.91 以降で利用可能。" #. type: tbl table #: build/C/man3/mkdtemp.3:96 -#, fuzzy, no-wrap -#| msgid "B():" +#, no-wrap msgid "B()" -msgstr "B():" +msgstr "B()" #. As at 2006, this function is being considered for a revision of POSIX.1 #. Also in NetBSD 1.4. @@ -5679,16 +5325,10 @@ msgstr "POSIX.1-2008. この関数は BSD に存在する。" #. type: Plain text #: build/C/man3/mkdtemp.3:111 -#, fuzzy -#| msgid "" -#| "B(2), B(3), B(3), B(3), B(3), " -#| "B(3)" msgid "" "B(1), B(2), B(3), B(3), B(3), " "B(3), B(3)" -msgstr "" -"B(2), B(3), B(3), B(3), B(3), " -"B(3)" +msgstr "B(1), B(2), B(3), B(3), B(3), B(3), B(3)" #. type: TH #: build/C/man3/mkstemp.3:35 @@ -5903,21 +5543,23 @@ msgstr "" #. type: tbl table #: build/C/man3/mkstemp.3:207 -#, fuzzy, no-wrap -#| msgid "B(), B():" +#, no-wrap msgid "" "B(),\n" "B(),\n" -msgstr "B(), B():" +msgstr "" +"B(),\n" +"B(),\n" #. type: tbl table #: build/C/man3/mkstemp.3:210 -#, fuzzy, no-wrap -#| msgid "B() and B(): are glibc extensions." +#, no-wrap msgid "" "B(),\n" "B()" -msgstr "B() と B(): glibc による拡張。" +msgstr "" +"B(),\n" +"B()" #. type: Plain text #: build/C/man3/mkstemp.3:215 @@ -6011,17 +5653,13 @@ msgstr "" #. || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED #. type: Plain text #: build/C/man3/mktemp.3:62 -#, fuzzy -#| msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E=\\ 500" msgid "_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\\ E=\\ 500" -msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\\ E=\\ 500" +msgstr "_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\\ E=\\ 500" #. type: Plain text #: build/C/man3/mktemp.3:68 -#, fuzzy -#| msgid "I; see NOTES." msgid "I; see BUGS." -msgstr "I<決してこの関数は使用しないこと>。「注意」を参照。" +msgstr "I<決してこの関数は使用しないこと>。「バグ」を参照。" #. type: Plain text #: build/C/man3/mktemp.3:79 @@ -6060,10 +5698,9 @@ msgstr "引数 I