From: Akihiro MOTOKI Date: Sun, 21 Jul 2013 21:19:10 +0000 (+0900) Subject: (split) LDP: Update draft pages X-Git-Tag: LDP-3.52-final~8 X-Git-Url: http://git.osdn.net/view?p=linuxjm%2FLDP_man-pages.git;a=commitdiff_plain;h=4fe824747c7faf385ebddbeea1a89602416484c3 (split) LDP: Update draft pages --- diff --git a/draft/man2/_syscall.2 b/draft/man2/_syscall.2 index f4898c12..b2a55afd 100644 --- a/draft/man2/_syscall.2 +++ b/draft/man2/_syscall.2 @@ -83,13 +83,11 @@ _syscall\fIX\fP(\fItype\fP,\fIname\fP,\fItype1\fP,\fIarg1\fP,\fItype2\fP,\fIarg2 _syscall() マクロはプロトタイプを「生成しない」。 ユーザはプロトタイプを自分で書かなければならないかもしれない。 とりわけ C++ ユーザの場合はそうであろう。 -System calls are not required to return only positive or negative error -codes. You need to read the source to be sure how it will return errors. -Usually, it is the negative of a standard error code, for example, i -\-\fIEPERM\fP. The _syscall() macros will return the result \fIr\fP of the system -call when \fIr\fP is nonnegative, but will return \-1 and set the variable -\fIerrno\fP to \-\fIr\fP when \fIr\fP is negative. For the error codes, see -\fBerrno\fP(3). +システムコールは、正のエラーコードのみ、または負のエラーコードのみを返すように +定められている訳ではない。そのシステムコールがどのようなエラーコードを返すかを +確認するには、そのソースコードを読む必要がある。たいていの場合は、標準のエラー コードを負にしたものである (例えば \-\fBEPERM\fP)。 +_syscall() マクロは、そのシステムコールの返り値 \fIr\fP が負でない場合、その値 をそのまま返す。一方、\fIr\fP が負の場合には、変数 +\fIerrno\fP に \-\fIr\fP を設定し、\-1 を返す。 エラーコードについては \fBerrno\fP(3) を参照。 .\" The preferred way to invoke system calls that glibc does not know .\" about yet is via diff --git a/draft/man2/alarm.2 b/draft/man2/alarm.2 index 5ec5cae9..9275b91a 100644 --- a/draft/man2/alarm.2 +++ b/draft/man2/alarm.2 @@ -44,7 +44,7 @@ alarm \- シグナル配送のためのアラーム・クロックを設定す .SH 説明 \fBalarm\fP() は \fBSIGALRM\fP シグナルを \fIseconds\fP 秒後に呼び出したプロセスに配送するように手配する。 -If \fIseconds\fP is zero, any pending alarm is canceled. +\fIseconds\fP がゼロならば、処理待ち (pending) のアラームはすべてキャンセルされる。 今までに設定されていた \fBalarm\fP() は中断される。 .SH 返り値 diff --git a/draft/man2/execve.2 b/draft/man2/execve.2 index af251456..980d010a 100644 --- a/draft/man2/execve.2 +++ b/draft/man2/execve.2 @@ -317,11 +317,9 @@ Linux はスクリプトの set\-user\-ID と set\-group\-ID ビットを無視 .\" Bug filed 30 Apr 2007: http://bugzilla.kernel.org/show_bug.cgi?id=8408 .\" Bug rejected (because fix would constitute an ABI change). .\" -On Linux, either \fIargv\fP or \fIenvp\fP can be specified as NULL, which has the -same effect as specifying these arguments as a pointer to a list containing -a single NULL pointer. \fBDo not take advantage of this misfeature!\fP It is -nonstandard and nonportable: on most other UNIX systems doing this will -result in an error (\fBEFAULT\fP). +Linux では、 \fIargv\fP と \fIenvp\fP のいずれかには NULL を指定することができる。これは、これらの引き数に NULL ポインタ +1個だけを含むリストへのポインタを指定したのと同じ効果を持つ。 \fB「この間違った機能を利用しないこと」\fP。 これは非標準で、移植性もない。 +他のほとんどの UNIX システムでは、これを行うとエラー (\fBEFAULT\fP) になる。 .\" .\" .SH BUGS diff --git a/draft/man2/fallocate.2 b/draft/man2/fallocate.2 index 983ba4d8..e679e4f7 100644 --- a/draft/man2/fallocate.2 +++ b/draft/man2/fallocate.2 @@ -66,8 +66,7 @@ POSIX.1 で規定された方法である \fBposix_fallocate\fP(3) を使うこ すべてのファイルシステムで \fBFALLOC_FL_PUNCH_HOLE\fP がサポートされているわけではない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返る。 .SH 返り値 -On success, \fBfallocate\fP() returns zero. On error, \-1 is returned and -\fIerrno\fP is set to indicate the error. +成功の場合、 \fBfallocate\fP() は 0 を返す。 エラーの場合、\-1 を返し、 \fIerror\fP にエラーを示す値を設定する。 .SH エラー .TP \fBEBADF\fP diff --git a/draft/man2/getpeername.2 b/draft/man2/getpeername.2 index 7ecb8a37..d4931a20 100644 --- a/draft/man2/getpeername.2 +++ b/draft/man2/getpeername.2 @@ -84,9 +84,9 @@ getpeername \- 接続している相手ソケットの名前を取得する .SH 準拠 SVr4, 4.4BSD (\fBgetpeername\fP() 関数は 4.2BSD で登場した), POSIX.1\-2001. .SH 注意 -The third argument of \fBgetpeername\fP() is in reality an \fIint\ *\fP (and this -is what 4.x BSD and libc4 and libc5 have). Some POSIX confusion resulted in -the present \fIsocklen_t\fP, also used by glibc. See also \fBaccept\fP(2). +\fBgetpeername\fP() の三番目の引き数は実際には \fI`int\ *'\fP である (4.x BSD, libc4, libc5 では +このようになっている)。 POSIX では紆余曲折を経て現在の \fIsocklen_t\fP になっており、 glibc でも \fIsocklen_t\fP +を使っている。 \fBaccept\fP(2) も参照のこと。 ストリームソケットでは、 いったん \fBconnect\fP(2) が実行されると、 どのソケットも \fBgetpeername\fP() を使って相手ソケットのアドレスを取得できる。 一方、データグラムソケットはコネクションレスである (接続がない)。 データグラムソケットに対する diff --git a/draft/man2/getrlimit.2 b/draft/man2/getrlimit.2 index b26179d2..54f6aacc 100644 --- a/draft/man2/getrlimit.2 +++ b/draft/man2/getrlimit.2 @@ -173,10 +173,8 @@ ID にロックされる 共有メモリセグメント (\fBshmget\fP(2) を参 .fi ここで \fIattr\fP は \fImq_attr\fP 構造体であり、 \fBmq_open\fP(3) の第 4 引き数として指定される。 -The first addend in the formula, which includes \fIsizeof(struct msg_msg\ *)\fP -(4 bytes on Linux/i386), ensures that the user cannot create an unlimited -number of zero\-length messages (such messages nevertheless each consume some -system memory for bookkeeping overhead). +\fIsizeof(struct msg_msg\ *)\fP (Linux/i386 では 4 バイト) を含む最初の加数は、 ユーザーが長さ 0 +のメッセージを無制限に作れないこと保証している (このようなメッセージであっても、 記録のためのオーバーヘッドでシステムメモリを消費する)。 .TP \fBRLIMIT_NICE\fP (Linux 2.6.12 以降, 下記の「バグ」の節も参照) \fBsetpriority\fP(2) や \fBnice\fP(2) を使って引き上げられるプロセスの nice 値の上限を指定する。 nice diff --git a/draft/man2/getsockname.2 b/draft/man2/getsockname.2 index 163dc81b..aabe8fab 100644 --- a/draft/man2/getsockname.2 +++ b/draft/man2/getsockname.2 @@ -81,9 +81,9 @@ getsockname \- ソケットの名前を取得する .\" and ENOSR error codes. SVr4, 4.4BSD (\fBgetsockname\fP() 関数は 4.2BSD で追加された), POSIX.1\-2001. .SH 注意 -The third argument of \fBgetsockname\fP() is in reality an \fIint\ *\fP (and this -is what 4.x BSD and libc4 and libc5 have). Some POSIX confusion resulted in -the present \fIsocklen_t\fP, also used by glibc. See also \fBaccept\fP(2). +\fBgetsockname\fP() の三番目の引き数は (4.x BSD や libc4, libc5 と同様に) 実際には \fIint\ *\fP +である。 glibc でも使われている現在の \fIsocklen_t\fP に関して、 POSIX には少し混乱がある。 詳しくは \fBaccept\fP(2) +を参照のこと。 .SH 関連項目 \fBbind\fP(2), \fBsocket\fP(2), \fBgetifaddrs\fP(3), \fBip\fP(7), \fBsocket\fP(7), \fBunix\fP(7) diff --git a/draft/man2/ioctl_list.2 b/draft/man2/ioctl_list.2 index d4df508b..bbe3b6a6 100644 --- a/draft/man2/ioctl_list.2 +++ b/draft/man2/ioctl_list.2 @@ -40,10 +40,9 @@ ioctl_list \- Linux/i386 カーネルの ioctl のリスト コールの一覧です。このリストは \fI\fP にある 421 の ioctl を含んでいます。全ての ioctl に対して、数値、名称、 引き数の型を列挙してあります。 .PP -An argument type of \fIconst struct foo\ *\fP means the argument is input to -the kernel. \fIstruct foo\ *\fP means the kernel outputs the argument. If the -kernel uses the argument for both input and output, this is marked with -\fI//\ I\-O\fP. +引き数型 \fIconst struct foo\ *\fP は、その引き数がカーネルへの入力である事を意味します。また、 \fIstruct foo\ *\fP +は、その引き数がカーネルからの出力である事を意味します。 カーネルがその引き数を入力と出力の両方に使用する場合は、 \fI//\ I\-O\fP +マークを付けてあります。 .PP いくつかの ioctl は複数の構造体の引き数を必要としたり、値を返したり します。これらには \fI//\ MORE\fP マークを付けて、 さらに分離したセクションで説明してあります。 @@ -727,15 +726,13 @@ l l l. // More arguments. いくつかの ioctl は追加のポインタを含む構造体へのポインタを使用します。 ここでこれらをアルファベット順に説明します。 -\fBCDROMREADAUDIO\fP takes an input pointer \fIconst struct cdrom_read_audio\ *\fP. The \fIbuf\fP field points to an output buffer of length \fInframes\ * -CD_FRAMESIZE_RAW\fP. +\fBCDROMREADAUDIO\fP は入力ポインタ \fIconst struct cdrom_read_audio\ *\fP を使用します。 \fIbuf\fP +フィールドは大きさ \fInframes\ * CD_FRAMESIZE_RAW\fP の出力バッファへのポインタです。 -\fBCDROMREADCOOKED\fP, \fBCDROMREADMODE1\fP, \fBCDROMREADMODE2\fP, and -\fBCDROMREADRAW\fP take an input pointer \fIconst struct cdrom_msf\ *\fP. They -use the same pointer as an output pointer to \fIchar []\fP. The length varies -by request. For \fBCDROMREADMODE1\fP, most drivers use CD_FRAMESIZE, but the -Optics Storage driver uses OPT_BLOCKSIZE instead (both have the numerical -value 2048). +\fBCDROMREADCOOKED\fP, \fBCDROMREADMODE1\fP, \fBCDROMREADMODE2\fP, \fBCDROMREADRAW\fP +は入力ポインタ \fIconst struct cdrom_msf\ *\fP を使用します。これらは同じポインタを \fIchar []\fP +への出力ポインタとして使用します。 長さは要求によって変化します。 \fBCDROMREADMODE1\fP には、多くのデバイスが CD_FRAMESIZE +を使用しますが、光学記憶装置 (光ディスク) のドライバは OPT_BLOCKSIZE を使用します (どちらも同じ値で 2048 です)。 .nf CDROMREADCOOKED char [CD_FRAMESIZE] @@ -745,8 +742,8 @@ value 2048). .fi \fBEQL_ENSLAVE\fP, \fBEQL_EMANCIPATE\fP, \fBEQL_GETSLAVECFG\fP, \fBEQL_SETSLAVECFG\fP, -\fBEQL_GETMASTERCFG\fP, and \fBEQL_SETMASTERCFG\fP take a \fIstruct ifreq\ *\fP. The -\fIifr_data\fP field is a pointer to another structure as follows: +\fBEQL_GETMASTERCFG\fP, \fBEQL_SETMASTERCFG\fP は \fIstruct ifreq\ *\fP を使用します。 +\fIifr_data\fP フィールドは以下に示す別の構造体へのポインタです: .nf EQL_ENSLAVE const struct slaving_request * @@ -757,20 +754,17 @@ value 2048). EQL_SETMASTERCFG const struct master_config * .fi -\fBFDRAWCMD\fP takes a \fIstruct floppy raw_cmd\ *\fP. If \fIflags & FD_RAW_WRITE\fP -is nonzero, then \fIdata\fP points to an input buffer of length \fIlength\fP. If -\fIflags & FD_RAW_READ\fP is nonzero, then \fIdata\fP points to an output buffer -of length \fIlength\fP. +\fBFDRAWCMD\fP は \fIstruct floppy raw_cmd\ *\fP を使用します。 \fIflags & FD_RAW_WRITE\fP +がゼロ以外の場合、 \fIdata\fP は大きさ \fIlength\fP の入力バッファへのポインタになります。 \fIflags & FD_RAW_READ\fP +がゼロ以外の場合、 \fIdata\fP は大きさ \fIlength\fP の出力バッファへのポインタになります。 -\fBGIO_FONTX\fP and \fBPIO_FONTX\fP take a \fIstruct console_font_desc\ *\fP or a -\fIconst struct console_font_desc\ *\fP, respectively. \fIchardata\fP points to a -buffer of \fIchar [charcount]\fP. This is an output buffer for \fBGIO_FONTX\fP -and an input buffer for \fBPIO_FONTX\fP. +\fBGIO_FONTX\fP, \fBPIO_FONTX\fP はそれぞれ \fIstruct console_font_desc\ *\fP と \fIconst +struct console_font_desc\ *\fP を使用します。 \fIchardata\fP は \fIchar [charcount]\fP +バッファへのポインタです。 これは \fBGIO_FONTX\fP の出力バッファと \fBPIO_FONTX\fP の入力バッファです。 -\fBGIO_UNIMAP\fP and \fBPIO_UNIMAP\fP take a \fIstruct unimapdesc\ *\fP or a \fIconst -struct unimapdesc\ *\fP, respectively. \fIentries\fP points to a buffer of -\fIstruct unipair [entry_ct]\fP. This is an output buffer for \fBGIO_UNIMAP\fP -and an input buffer for \fBPIO_UNIMAP\fP. +\fBGIO_UNIMAP\fP, \fBPIO_UNIMAP\fP はそれぞれ \fIstruct unimapdesc\ *\fP と \fIconst struct +unimapdesc\ *\fP を使用します。 \fIentries\fP は \fIstruct unipair [entry_ct]\fP +バッファへのポインタです。 これは \fBGIO_UNIMAP\fP の出力バッファと \fBPIO_UNIMAP\fP の入力バッファです。 KDADDIO, KDDELIO, KDDISABIO, KDENABIO は I/O ポートへのアクセスを 可能/不可能にします。これらは本質的に、'ioperm' への別の インターフェースです。 @@ -778,9 +772,8 @@ KDADDIO, KDDELIO, KDDISABIO, KDENABIO は I/O ポートへのアクセスを \fBKDMAPDISP\fP, \fBKDUNMAPDISP\fP はメモリ・マッピングや I/O ポートへのアクセスを可能/不可能にします。 これらはカーネルに実装されていません。 -\fBSCSI_IOCTL_PROBE_HOST\fP takes an input pointer \fIconst int\ *\fP, which is a -length. It uses the same pointer as an output pointer to a \fIchar []\fP -buffer of this length. +\fBSCSI_IOCTL_PROBE_HOST\fP は入力ポインタ \fIconst int\ *\fP を大きさとして使用します。これは同じ大きさの +\fIchar []\fP バッファ への出力ポインタとしても使用します。 \fBSIOCADDRT\fP, \fBSIOCDELRT\fP は型が以下のプロトコルに依存する入力ポインタを使用します: .nf @@ -790,9 +783,8 @@ buffer of this length. NET/ROM const struct nr_route_struct * .fi -\fBSIOCGIFCONF\fP takes a \fIstruct ifconf\ *\fP. The \fIifc_buf\fP field points to -a buffer of length \fIifc_len\fP bytes, into which the kernel writes a list of -type \fIstruct ifreq []\fP. +\fBSIOCGIFCONF\fP は \fIstruct ifconf\ *\fP を使用します。この \fIifc_buf\fP フィールドは長さ +\fIifc_len\fP バイトのバッファへのポインタです。 これにカーネルが \fIstruct ifreq []\fP 型のリストへ書き込みます。 \fBSIOCSIFHWADDR\fP は型が以下のプロトコルに依存する入力ポインタを使用します: .nf @@ -801,10 +793,9 @@ type \fIstruct ifreq []\fP. AX.25 const char [AX25_ADDR_LEN] .fi -\fBTIOCLINUX\fP takes a \fIconst char\ *\fP. It uses this to distinguish several -independent subcases. In the table below, \fIN + foo\fP means \fIfoo\fP after an -N\-byte pad. \fIstruct selection\fP is implicitly defined in -\fIdrivers/char/selection.c\fP +\fBTIOCLINUX\fP は \fIconst char\ *\fP を使用します。このポインタをいくつかの +独立したサブクラスを識別する為に使用します。以下のテーブルの中で、 \fIN + foo\fP は N バイトの詰めものの後にある \fIfoo\fP +を意味します。 \fIstruct selection\fP は暗黙的に \fIdrivers/char/selection.c\fP の中で定義されています。 .nf TIOCLINUX\-2 1 + const struct selection * diff --git a/draft/man2/killpg.2 b/draft/man2/killpg.2 index ef91e23a..c34b35c7 100644 --- a/draft/man2/killpg.2 +++ b/draft/man2/killpg.2 @@ -77,7 +77,7 @@ set\-user\-ID と 等しくなければならない。 \fBSIGCONT\fP の場合 .SH エラー .TP \fBEINVAL\fP -\fIsig\fP is not a valid signal number. +\fIsig\fP で指定された値は無効なシグナル番号である。 .TP \fBEPERM\fP プロセスが、受信するプロセスのいずれに対しても シグナルを送る許可を持っていない。 diff --git a/draft/man2/mmap2.2 b/draft/man2/mmap2.2 index 2ebf0f62..8357c9ab 100644 --- a/draft/man2/mmap2.2 +++ b/draft/man2/mmap2.2 @@ -60,7 +60,7 @@ mmap2 \- ファイルやデバイスをメモリにマップする ユーザ空間からデータを取得するときに問題があった。 .TP \fBEINVAL\fP -(Various platforms where the page size is not 4096 bytes.) \fIoffset\ *\ 4096\fP is not a multiple of the system page size. +(ページサイズが 4096 バイトでないプラットフォームにおいて) \fIoffset\ *\ 4096\fP がシステムのページサイズの倍数ではない。 .PP \fBmmap2\fP() は \fBmmap\fP(2) に載っているエラーを返すこともある。 .SH バージョン diff --git a/draft/man2/mremap.2 b/draft/man2/mremap.2 index f46e04f8..82656156 100644 --- a/draft/man2/mremap.2 +++ b/draft/man2/mremap.2 @@ -70,12 +70,11 @@ Linux ではメモリはページに分割される。ユーザー・プロセ マッピングが再配置されると、古いマッピング位置への絶対ポインタは 無効になる (マッピングの開始アドレスからの相対オフセットは有効のままである)。 .TP \fBMREMAP_FIXED\fP (Linux 2.3.31 以降) -This flag serves a similar purpose to the \fBMAP_FIXED\fP flag of \fBmmap\fP(2). -If this flag is specified, then \fBmremap\fP() accepts a fifth argument, -\fIvoid\ *new_address\fP, which specifies a page\-aligned address to which the -mapping must be moved. Any previous mapping at the address range specified -by \fInew_address\fP and \fInew_size\fP is unmapped. If \fBMREMAP_FIXED\fP is -specified, then \fBMREMAP_MAYMOVE\fP must also be specified. +このフラグは \fBmmap\fP(2) の \fBMAP_FIXED\fP フラグと似たような目的で用いられる。 このフラグが指定されると、 +\fBmremap\fP() は 5 番目の引き数 \fIvoid\ *new_address\fP +を受け取り、この引数はマッピングが移動されるべきアドレスを指定する。 このアドレスはページ境界に合っていなければならない。 \fInew_address\fP +と \fInew_size\fP で指定されるアドレス範囲に過去のマッピングがあった場合、 そのマッピングはアンマップされる (unmapped)。 +\fBMREMAP_FIXED\fP を指定した場合は、 \fBMREMAP_MAYMOVE\fP も指定しなければならない。 .PP \fIold_address\fP と \fIold_size\fP で指定されるメモリセグメントが (\fBmlock\fP(2) や同様のもので) ロックされている場合、セグメントのサイズが変わったり 再配置されたりした時にロックも維持される。 diff --git a/draft/man2/readdir.2 b/draft/man2/readdir.2 index 030287c2..005b5716 100644 --- a/draft/man2/readdir.2 +++ b/draft/man2/readdir.2 @@ -65,10 +65,9 @@ struct old_linux_dirent { .fi .in .PP -\fId_ino\fP is an inode number. \fId_off\fP is the distance from the start of the -directory to this \fIold_linux_dirent\fP. \fId_reclen\fP is the size of -\fId_name\fP, not counting the terminating null byte (\(aq\e0\(aq). \fId_name\fP -is a null\-terminated filename. +\fId_ino\fP は inode 番号である。 \fId_off\fP はディレクトリの最初からこの \fIold_linux_dirent\fP まで距離である。 +\fId_reclen\fP は \fId_name\fP の大きさで、終端のヌルバイト (\(aq\e0\(aq) を含まない。 \fId_name\fP +はヌルバイトで終わるファイル名である。 .SH 返り値 成功した場合は、1 が返される。 ディレクトリの最後では 0 が返される。 エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。 .SH エラー diff --git a/draft/man2/recv.2 b/draft/man2/recv.2 index b85ff781..2d1f1312 100644 --- a/draft/man2/recv.2 +++ b/draft/man2/recv.2 @@ -243,9 +243,8 @@ struct cmsghdr { \fBMSG_ERRQUEUE\fP データは受信しなかったが ソケットのエラー・キューから拡張エラーを受信したことを示す。 .SH 返り値 -These calls return the number of bytes received, or \-1 if an error -occurred. In the event of an error, \fIerrno\fP is set to indicate the error. -The return value will be 0 when the peer has performed an orderly shutdown. +これらのコールは受信したバイト数を返す。 エラーの場合は \-1 を返し、 \fIerrno\fP にエラーを示す値を設定する。 +接続先が正しくシャットダウンを実行した場合は、返り値は 0 となる。 .SH エラー これらはソケット層で発生する一般的なエラーである。 他のエラーが下層のプロトコル・モジュールで生成され、 返されるかもしれない。 それらのマニュアルを参照すること。 diff --git a/draft/man2/sched_setaffinity.2 b/draft/man2/sched_setaffinity.2 index b248442b..aba6af6b 100644 --- a/draft/man2/sched_setaffinity.2 +++ b/draft/man2/sched_setaffinity.2 @@ -117,13 +117,11 @@ API を使用している場合、 \fBsched_setaffinity\fP() の代わりに \f \fBfork\fP(2) 経由で生成された子プロセスは親プロセスの CPU affinity マスクを継承する。 affinity マスクは \fBexecve\fP(2) の前後で保存される。 -This manual page describes the glibc interface for the CPU affinity calls. -The actual system call interface is slightly different, with the \fImask\fP -being typed as \fIunsigned long\ *\fP, reflecting the fact that the underlying -implementation of CPU sets is a simple bit mask. On success, the raw -\fBsched_getaffinity\fP() system call returns the size (in bytes) of the -\fIcpumask_t\fP data type that is used internally by the kernel to represent -the CPU set bit mask. +このマニュアルページでは CPU affinity コールの glibc インタフェースを +説明している。実際のシステムコール・インタフェースは少し違っており、 実際の実装では CPU 集合は簡単なビットマスクであるという実状を反映し、 +\fImask\fP の型が \fIunsigned long\ *\fP となっている。 成功時には、生の \fBsched_getaffinity\fP() +システムコール自身は \fIcpumask_t\fP データ型の (バイト単位の) 大きさを返す。 \fIcpumask_t\fP はカーネル内部で CPU +集合のビットマスクを表現するのに 使われているデータ型である。 .SH 関連項目 .ad l .nh diff --git a/draft/man2/semctl.2 b/draft/man2/semctl.2 index 5d3e3538..5769ef8a 100644 --- a/draft/man2/semctl.2 +++ b/draft/man2/semctl.2 @@ -78,10 +78,10 @@ union semun { .in +4n struct semid_ds { - struct ipc_perm sem_perm; /* Ownership and permissions */ - time_t sem_otime; /* Last semop time */ - time_t sem_ctime; /* Last change time */ - unsigned long sem_nsems; /* No. of semaphores in set */ + struct ipc_perm sem_perm; /* 所有権と許可 */ + time_t sem_otime; /* 最後の semop の時刻 */ + time_t sem_ctime; /* 最後に変更が行われた時刻 */ + unsigned long sem_nsems; /* 集合内のセマフォの数 */ }; .in .fi diff --git a/draft/man2/setup.2 b/draft/man2/setup.2 index a51b300d..616133e2 100644 --- a/draft/man2/setup.2 +++ b/draft/man2/setup.2 @@ -60,8 +60,8 @@ Linux 2.1.121 以降では、もはやこの関数は存在しない。 .SH 準拠 この関数は Linux に特有のものであり、移植を考慮したプログラムでは 用いるべきではない。それどころか、あらゆるプログラムで用いるべきではない。 .SH 注意 -The calling sequence varied: at some times \fIsetup ()\fP has had a single -argument \fIvoid\ *BIOS\fP and at other times a single argument \fIint magic\fP. +呼び出し手続きは変化してきた。 ある時は \fIsetup ()\fP は一つの引数 \fIvoid\ *BIOS\fP を取っており、またある時には \fIint +magic\fP を一つの引数として取っていた。 .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は diff --git a/draft/man2/shmop.2 b/draft/man2/shmop.2 index ff28a273..9ce37619 100644 --- a/draft/man2/shmop.2 +++ b/draft/man2/shmop.2 @@ -134,10 +134,9 @@ shmat, shmdt \- System V 共有メモリ (shared memory) の操作 .\" SVr4 documents an additional error condition EMFILE. SVr4, POSIX.1\-2001. -In SVID 3 (or perhaps earlier) the type of the \fIshmaddr\fP argument was -changed from \fIchar\ *\fP into \fIconst void\ *\fP, and the returned type of -\fBshmat\fP() from \fIchar\ *\fP into \fIvoid\ *\fP. (Linux libc4 and libc5 have -the \fIchar\ *\fP prototypes; glibc2 has \fIvoid\ *\fP.) +SVID 3 で (たぶんそれより前だと思うが) \fIshmaddr\fP 引き数の型は \fIchar\ *\fP から \fIconst void\ *\fP +に、\fIshmat\fP() の返り値の型は \fIchar\ *\fP から \fIvoid\ *\fP に変更された (Linux では libc4 と libc5 +のプロトタイプは \fIchar\ *\fP であり、glibc2 のプロトタイプは \fIvoid\ *\fP である)。 .SH 注意 共有メモリセグメントを付加する場合の移植性の高い方法としては、 \fIshmaddr\fP を NULL にして \fBshmat\fP() を使用するのがよい。 このような方法で付加される共有メモリセグメントは、 プロセスが異なれば別のアドレスに付加される、という点に注意すること。 diff --git a/draft/man2/sigaction.2 b/draft/man2/sigaction.2 index 4819167c..23e2a911 100644 --- a/draft/man2/sigaction.2 +++ b/draft/man2/sigaction.2 @@ -433,8 +433,7 @@ I/O エラー デバイスが接続されていない .RE .SH 返り値 -\fBsigaction\fP() returns 0 on success; on error, \-1 is returned, and \fIerrno\fP -is set to indicate the error. +\fBsigaction\fP() 関数は成功すると 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP にエラーを示す値をセットする。 .SH エラー .TP \fBEFAULT\fP diff --git a/draft/man2/signal.2 b/draft/man2/signal.2 index 71f52191..1907174c 100644 --- a/draft/man2/signal.2 +++ b/draft/man2/signal.2 @@ -69,8 +69,8 @@ signal \- ANSI C シグナル操作 .PP シグナル \fBSIGKILL\fP と \fBSIGSTOP\fP は捕捉できず、無視することもできない。 .SH 返り値 -\fBsignal\fP() returns the previous value of the signal handler, or \fBSIG_ERR\fP -on error. In the event of an error, \fIerrno\fP is set to indicate the cause. +\fBsignal\fP() は、今までのシグナル・ハンドラの値を返す。 エラーの場合は \fBSIG_ERR\fP を返し、 \fIerrno\fP +にエラーの原因を示す値を設定する。 .SH エラー .TP \fBEINVAL\fP diff --git a/draft/man2/sigpending.2 b/draft/man2/sigpending.2 index 07286aa3..b69eb9e1 100644 --- a/draft/man2/sigpending.2 +++ b/draft/man2/sigpending.2 @@ -52,8 +52,7 @@ _POSIX_SOURCE \fBsigpending\fP() は、呼び出し元のスレッドへの配送を待っている (pending) シグナル集合 (すなわち、禁止中に発生したシグナル) を返す。 処理待ちのシグナルのマスクが \fIset\fP に格納される。 .SH 返り値 -\fBsigpending\fP() returns 0 on success and \-1 on error. In the event of an -error, \fIerrno\fP is set to indicate the cause. +\fBsigpending\fP() は成功した場合 0 を返す。 エラーの場合、 \-1 を返し、\fIerrno\fP にエラーの原因を示す値を設定する。 .SH エラー .TP \fBEFAULT\fP diff --git a/draft/man2/sigprocmask.2 b/draft/man2/sigprocmask.2 index 36c5814a..af6ef3b3 100644 --- a/draft/man2/sigprocmask.2 +++ b/draft/man2/sigprocmask.2 @@ -71,8 +71,7 @@ _POSIX_SOURCE マルチスレッドのプロセスで \fBsigprocmask\fP() を使用した場合の動作は規定されていない。 \fBpthread_sigmask\fP(3) を参照のこと。 .SH 返り値 -\fBsigprocmask\fP() returns 0 on success and \-1 on error. In the event of an -error, \fIerrno\fP is set to indicate the cause. +\fBsigprocmask\fP() は成功した場合 0 を返す。 エラーの場合、 \-1 を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。 .SH エラー .TP \fBEFAULT\fP diff --git a/draft/man2/sigsuspend.2 b/draft/man2/sigsuspend.2 index bd9869b8..aa39c7b9 100644 --- a/draft/man2/sigsuspend.2 +++ b/draft/man2/sigsuspend.2 @@ -58,8 +58,7 @@ _POSIX_SOURCE \fBSIGKILL\fP と \fBSIGSTOP\fP を禁止 (block) することはできない; これらのシグナルを \fImask\fP に指定しても、プロセスのシグナルマスクは影響を受けない。 .SH 返り値 -\fBsigsuspend\fP() always returns \-1, with \fIerrno\fP set to inndicate the error -(normally, \fBEINTR\fP). +\fBsigsuspend\fP() は常に \-1 を返し、 \fIerrno\fP にエラーの原因を示す値 (通常は \fBEINTR\fP) を設定する。 .SH エラー .TP \fBEFAULT\fP diff --git a/draft/man3/a64l.3 b/draft/man3/a64l.3 index 0919ffa0..40a15fd8 100644 --- a/draft/man3/a64l.3 +++ b/draft/man3/a64l.3 @@ -51,8 +51,8 @@ a\-z は 38\-63 を表す。 .fi .RE よって 123 = 59*64^0 + 1*64^1 = "v/" である。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" \fBl64a\fP() 関数はスレッドセーフではない。 .LP \fBa64l\fP() 関数はスレッドセーフである。 diff --git a/draft/man3/abs.3 b/draft/man3/abs.3 index 30d5b046..fdc715c0 100644 --- a/draft/man3/abs.3 +++ b/draft/man3/abs.3 @@ -71,10 +71,9 @@ or \fIcc\ \-std=c99\fP 関数は、 それぞれの関数の型に応じた引数 \fIj\fP の絶対値を計算する。 .SH 返り値 それぞれの関数の型に応じた整数の引数の絶対値を返す。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBabs\fP(), \fBlabs\fP(), \fBllabs\fP(), and \fBimaxabs\fP() functions are -thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBabs\fP(), \fBlabs\fP(), \fBllabs\fP(), \fBimaxabs\fP() はスレッドセーフである。 .SH 準拠 .\" POSIX.1 (1996 edition) requires only the .\" .BR abs () diff --git a/draft/man3/aio_error.3 b/draft/man3/aio_error.3 index 435b6009..5a5c219c 100644 --- a/draft/man3/aio_error.3 +++ b/draft/man3/aio_error.3 @@ -60,8 +60,8 @@ aio_error \- 非同期 I/O 操作のエラー状態を取得する \fBaio_error\fP() は実装されていない。 .SH バージョン \fBaio_error\fP() 関数は glibc 2.1 以降で利用できる。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" \fBaio_error\fP() 関数はスレッドセーフである。 .SH 準拠 POSIX.1\-2001, POSIX.1\-2008. diff --git a/draft/man3/aio_return.3 b/draft/man3/aio_return.3 index a16c8def..ed054bac 100644 --- a/draft/man3/aio_return.3 +++ b/draft/man3/aio_return.3 @@ -57,8 +57,8 @@ aio_return \- 非同期 I/O 操作の返り値 (return status) を取得する \fBaio_return\fP() は実装されていない。 .SH バージョン The \fBaio_return\fP() 関数は glibc 2.1 以降で利用できる。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" The \fBaio_return\fP() 関数はスレッドセーフである。 .SH 準拠 POSIX.1\-2001, POSIX.1\-2008. diff --git a/draft/man3/argz_add.3 b/draft/man3/argz_add.3 new file mode 100644 index 00000000..179d376c --- /dev/null +++ b/draft/man3/argz_add.3 @@ -0,0 +1,119 @@ +.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) +.\" Distributed under GPL +.\" %%%LICENSE_END +.\" +.\" based on the description in glibc source and infopages +.\" +.\" Corrections and additions, aeb +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH ARGZ_ADD 3 2007\-05\-18 "" "Linux Programmer's Manual" +.SH 名前 +argz_add, argz_add_sep, argz_append, argz_count, argz_create, +argz_create_sep, argz_delete, argz_extract, argz_insert, argz_next, +argz_replace, argz_stringify \- argz リストを操作するための関数群 +.SH 書式 +.nf +\fB#include \fP +.sp +\fBerror_t argz_add(char **\fP\fIargz\fP\fB, size_t *\fP\fIargz_len\fP\fB, const char *\fP\fIstr\fP\fB);\fP +.sp +\fBerror_t argz_add_sep(char **\fP\fIargz\fP\fB, size_t *\fP\fIargz_len\fP\fB,\fP +\fB const char *\fP\fIstr\fP\fB, int \fP\fIdelim\fP\fB);\fP +.sp +\fBerror_t argz_append(char **\fP\fIargz\fP\fB, size_t *\fP\fIargz_len\fP\fB,\fP +\fB const char *\fP\fIbuf\fP\fB, size_t \fP\fIbuf_len\fP\fB);\fP +.sp +\fBsize_t argz_count(const char *\fP\fIargz\fP\fB, size_t \fP\fIargz_len\fP\fB);\fP +.sp +\fBerror_t argz_create(char * const \fP\fIargv\fP\fB[], char **\fP\fIargz\fP\fB,\fP +\fB size_t *\fP\fIargz_len\fP\fB);\fP +.sp +\fBerror_t argz_create_sep(const char *\fP\fIstr\fP\fB, int \fP\fIsep\fP\fB, char **\fP\fIargz\fP\fB,\fP +\fB size_t *\fP\fIargz_len\fP\fB);\fP +.sp +\fBerror_t argz_delete(char **\fP\fIargz\fP\fB, size_t *\fP\fIargz_len\fP\fB, char *\fP\fIentry\fP\fB);\fP +.sp +\fBvoid argz_extract(char *\fP\fIargz\fP\fB, size_t \fP\fIargz_len\fP\fB, char **\fP\fIargv\fP\fB);\fP +.sp +\fBerror_t argz_insert(char **\fP\fIargz\fP\fB, size_t *\fP\fIargz_len\fP\fB, char *\fP\fIbefore\fP\fB,\fP +\fB const char *\fP\fIentry\fP\fB);\fP +.sp +\fBchar *argz_next(char *\fP\fIargz\fP\fB, size_t \fP\fIargz_len\fP\fB, const char *\fP\fIentry\fP\fB);\fP +.sp +\fBerror_t argz_replace(char **\fP\fIargz\fP\fB, size_t *\fP\fIargz_len\fP\fB, const char *\fP\fIstr\fP\fB,\fP +\fB const char *\fP\fIwith\fP\fB, unsigned int *\fP\fIreplace_count\fP\fB);\fP +.sp +\fBvoid argz_stringify(char *\fP\fIargz\fP\fB, size_t \fP\fIlen\fP\fB, int \fP\fIsep\fP\fB);\fP +.fi +.SH 説明 +これらの関数は glibc 固有である。 +.LP +argz vector は長さ情報付きの文字バッファへのポインタである。 文字バッファでは、複数の文字列が NULL バイト (\(aq\e0\(aq) +で区切られており、 文字列の配列として解釈されるようになっている。 長さが 0 でない場合、バッファの最後のバイトは NULL +バイトでなければならない。 +.LP +これらの関数は argz vector を操作するためのものである。 ペア (NULL,0) は argz vector であり、逆に言えば 長さ 0 +の argz vectorは NULL ポインタを持たなければならない。 空でない argz vector の割り当ては \fBmalloc\fP(3) +を使って行われる。したがって、argz vector を解放するのに \fBfree\fP(3) を使うことができる。 +.LP +\fBargz_add\fP() は、文字列 \fIstr\fP を配列 \fI*argz\fP の末尾に追加し、 \fI*argz\fP と \fI*argz_len\fP +を更新する。 +.LP +\fBargz_add_sep\fP() も同様の動作をするが、区切り文字 \fIdelim\fP にしたがって文字列 \fIstr\fP +を複数の文字列に分割する点が異なる。 例えば、区切り文字 \(aq:\(aq を指定して、UNIX サーチ・パスに対して +この関数を使うことができるだろう。 +.LP +\fBargz_append\fP() appends the argz vector (\fIbuf\fP,\ buf_len\fI)\fP after +(\fI*argz\fP,\ *argz_len\fI)\fP and updates \fI*argz\fP and \fI*argz_len\fP. (Thus, +\fI*argz_len\fP will be increased by \fIbuf_len\fP.) +.LP +\fBargz_count\fP() counts the number of strings, that is, the number of null +bytes (\(aq\e0\(aq), in (\fIargz\fP,\ argz_len\fI).\fP +.LP +\fBargz_create\fP() converts a UNIX\-style argument vector \fIargv\fP, terminated +by \fI(char\ *)\ 0\fP, into an argz vector (\fI*argz\fP,\ *argz_len\fI).\fP +.LP +\fBargz_create_sep\fP() converts the null\-terminated string \fIstr\fP into an +argz vector (\fI*argz\fP,\ *argz_len\fI)\fP by breaking it up at every occurrence +of the separator \fIsep\fP. +.LP +\fBargz_delete\fP() removes the substring pointed to by \fIentry\fP from the argz +vector (\fI*argz\fP,\ *argz_len\fI)\fP and updates \fI*argz\fP and \fI*argz_len\fP. +.LP +\fBargz_extract\fP() is the opposite of \fBargz_create\fP(). It takes the argz +vector (\fIargz\fP,\ argz_len\fI)\fP and fills the array starting at \fIargv\fP with +pointers to the substrings, and a final NULL, making a UNIX\-style argv +vector. The array \fIargv\fP must have room for +\fIargz_count\fP(\fIargz\fP,\fIargz_len\fP) + 1 pointers. +.LP +\fBargz_insert\fP() is the opposite of \fBargz_delete\fP(). It inserts the +argument \fIentry\fP at position \fIbefore\fP into the argz vector (\fI*argz\fP,\ *argz_len\fI)\fP and updates \fI*argz\fP and \fI*argz_len\fP. If \fIbefore\fP is NULL, +then \fIentry\fP will inserted at the end. +.LP +\fBargz_next\fP() は argz vector を順番に調べるための関数である。 \fIentry\fP が NULL +の場合、最初のエントリを返す。 そうでない場合、次のエントリを返す。 次のエントリがない場合、NULL を返す。 +.LP +\fBargz_replace\fP() は、 \fIstr\fP をすべて \fIwith\fP で置き換える (必要に応じて argz の再割り当てを行う)。 +\fIreplace_count\fP が NULL でない場合、 \fI*replace_count\fP を置き換えを行った数だけ増やす。 +.LP +\fBargz_stringify\fP() は \fBargz_create_sep\fP() の反対の操作を行う。 末尾の NULL バイト以外の全ての +NULL バイト (\(aq\e0\(aq) を \fIsep\fP で置き換えて、 argz vector を通常の文字列に変換する。 +.SH 返り値 +メモリ割り当てを行う argz 関数群はすべて \fIerror_t\fP 型の返り値を持つ。 成功した場合は 0 を返し、割り当てエラーが発生した場合は +\fBENOMEM\fP を返す。 +.SH 準拠 +これらの関数は GNU による拡張である。注意して使用すること。 +.SH バグ +NULL バイトで終端されていない argz vector を使用した場合、 segmentation fault を起こすかもしれない。 +.SH 関連項目 +\fBenvz_add\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man3/asprintf.3 b/draft/man3/asprintf.3 index cad53061..a631f5dd 100644 --- a/draft/man3/asprintf.3 +++ b/draft/man3/asprintf.3 @@ -42,12 +42,10 @@ asprintf, vasprintf \- 文字列を割り当ててそれに出力する \fBint vasprintf(char **\fP\fIstrp\fP\fB, const char *\fP\fIfmt\fP\fB, va_list \fP\fIap\fP\fB);\fP .SH 説明 -The functions \fBasprintf\fP() and \fBvasprintf\fP() are analogs of -\fBsprintf\fP(3) and \fBvsprintf\fP(3), except that they allocate a string large -enough to hold the output including the terminating null byte (\(aq\e0\(aq), -and return a pointer to it via the first argument. This pointer should be -passed to \fBfree\fP(3) to release the allocated storage when it is no longer -needed. +\fBasprintf\fP() 関数と \fBvasprintf\fP() 関数とは、それぞれ \fBsprintf\fP(3) 関数と +\fBvsprintf\fP(3) 関数とに似ているが、 出力文字列を (終端の NULL バイト (\(aq\e0\(aq) も含めて) +保持するのに十分な大きさのメモリを確保し、 最初の引数にその文字列へのポインタを返す。 このポインタは、不要になったら \fBfree\fP(3) +に渡し、割り当てられた記憶領域を解放すべきである。 .SH 返り値 成功すると、これらの関数は出力されたバイト数を (\fBsprintf\fP(3) のように) 返す。 メモリの割り当てができなかったり、 その他エラーが生じると、 これらの関数は \-1 を返し、 \fIstrp\fP の内容は未定義となる。 diff --git a/draft/man3/bindresvport.3 b/draft/man3/bindresvport.3 index 4faac68f..d6fc957d 100644 --- a/draft/man3/bindresvport.3 +++ b/draft/man3/bindresvport.3 @@ -67,8 +67,8 @@ bindresvport \- ソケットを特権 IP ポートにバインドする .TP \fBEAFNOSUPPORT\fP (glibc 2.7 以前では \fBEPFNOSUPPORT\fP) \fIsin\fP が NULL 以外で、かつ \fIsin\->sin_family\fP が \fBAF_INET\fP でなかった。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" Before glibc 2.17, the \fBbindresvport\fP() function uses a static variable that is not protected, so it is not thread\-safe. diff --git a/draft/man3/catgets.3 b/draft/man3/catgets.3 index 265d6a58..95caa9b5 100644 --- a/draft/man3/catgets.3 +++ b/draft/man3/catgets.3 @@ -39,15 +39,11 @@ catgets \- メッセージカタログからメッセージを取り出す \fB const char *\fP\fImessage\fP\fB);\fP .fi .SH 説明 -\fBcatgets\fP() reads the message \fImessage_number\fP, in set \fIset_number\fP, -from the message catalog identified by \fIcatalog\fP, where \fIcatalog\fP is a -catalog descriptor returned from an earlier call to \fBcatopen\fP(3). The -fourth argument, \fImessage\fP, points to a default message string which will -be returned by \fBcatgets\fP() if the identified message catalog is not -currently available. The message\-text is contained in an internal buffer -area and should be copied by the application if it is to be saved or -modified. The return string is always terminated with a null byte -(\(aq\e0\(aq). +\fBcatgets\fP() は catalog で指定されたメッセージカタログから、 セット \fIset_number\fP のメッセージ +\fImessage_number\fP を読み取る。 \fIcatalog\fP は、 \fBcatopen\fP(3) の呼び出しによって得られたカタログ +ディスクリプタを指定する。 4番目の引数 \fImessage\fP は、指定のメッセージカタログが現在利用できない 場合に \fBcatgets\fP() +が返すデフォルトのメッセージを指す。 メッセージテキストは内部のバッファ領域に格納されており、 +保存や変更を行う場合にはアプリケーション側でコピーする必要がある。 返される文字列は常にヌルバイト (\(aq\e0\(aq) で終端される。 .SH 返り値 .LP 成功した場合、 \fBcatgets\fP() は内部のバッファ領域へのポインタを返す。 ここにはヌル文字で終端されたメッセージ文字列が格納されている。 diff --git a/draft/man3/ceil.3 b/draft/man3/ceil.3 index 841caafa..76b4e35a 100644 --- a/draft/man3/ceil.3 +++ b/draft/man3/ceil.3 @@ -68,9 +68,9 @@ or \fIcc\ \-std=c99\fP \fIx\fP が整数、+0、\-0、NaN、無限のいずれかの場合、 \fIx\fP そのものが返される。 .SH エラー エラーは発生しない。 POSIX.1\-2001 にはオーバーフローでの範囲エラー (range error) の 記載がある。「注意」の節を参照のこと。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBceil\fP(), \fBceilf\fP(), and \fBceill\fP() functions are thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBceil\fP(), \fBceilf\fP(), \fBceill\fP() はスレッドセーフである。 .SH 準拠 C99, POSIX.1\-2001. \fIdouble\fP 版の関数は SVr4, 4.3BSD, C89 にも準拠している。 .SH 注意 diff --git a/draft/man3/cimag.3 b/draft/man3/cimag.3 index 5f86bfc3..bdc86bf6 100644 --- a/draft/man3/cimag.3 +++ b/draft/man3/cimag.3 @@ -32,9 +32,9 @@ cimag, cimagf, cimagl \- 複素数の虚部を取得する .fi .SH バージョン これらの関数は glibc バージョン 2.1 で初めて登場した。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBcimag\fP(), \fBcimagf\fP(), and \fBcimagl\fP() functions are thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBcimag\fP(), \fBcimagf\fP(), and \fBcimagl\fP() はスレッドセーフである。 .SH 準拠 C99. .SH 注意 diff --git a/draft/man3/clock_getcpuclockid.3 b/draft/man3/clock_getcpuclockid.3 new file mode 100644 index 00000000..4ca287a4 --- /dev/null +++ b/draft/man3/clock_getcpuclockid.3 @@ -0,0 +1,139 @@ +.\" Copyright (c) 2008, Linux Foundation, written 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 +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH CLOCK_GETCPUCLOCKID 3 2013\-07\-04 Linux "Linux Programmer's Manual" +.SH 名前 +clock_getcpuclockid \- obtain ID of a process CPU\-time clock +.SH 書式 +\fB#include \fP +.nf +.sp +\fBint clock_getcpuclockid(pid_t \fP\fIpid\fP\fB, clockid_t *\fP\fIclock_id\fP\fB);\fP +.fi +.sp +\fI\-lrt\fP とリンクする (バージョン 2.17 より前の glibc のみ) +.sp +.ad l +.in -4n +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): +.in +.sp +\fBclock_getcpuclockid\fP(): +.RS 4 +_XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L +.RE +.ad +.SH 説明 +The \fBclock_getcpuclockid\fP() function obtains the ID of the CPU\-time clock +of the process whose ID is \fIpid\fP, and returns it in the location pointed to +by \fIclock_id\fP. If \fIpid\fP is zero, then the clock ID of the CPU\-time clock +of the calling process is returned. +.SH 返り値 +On success, \fBclock_getcpuclockid\fP() returns 0; on error, it returns one of +the positive error numbers listed in ERRORS. +.SH エラー +.TP +\fBENOSYS\fP +The kernel does not support obtaining the per\-process CPU\-time clock of +another process, and \fIpid\fP does not specify the calling process. +.TP +\fBEPERM\fP +The caller does not have permission to access the CPU\-time clock of the +process specified by \fIpid\fP. (Specified as an optional error in +POSIX.1\-2001; does not occur on Linux unless the kernel does not support +obtaining the per\-process CPU\-time clock of another process.) +.TP +\fBESRCH\fP +There is no process with the ID \fIpid\fP. +.SH バージョン +The \fBclock_getcpuclockid\fP() function is available in glibc since version +2.2. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBclock_getcpuclockid\fP() 関数はスレッドセーフである。 +.SH 準拠 +POSIX.1\-2001. +.SH 注意 +Calling \fBclock_gettime\fP(2) with the clock ID obtained by a call to +\fBclock_getcpuclockid\fP() with a \fIpid\fP of 0, is the same as using the clock +ID \fBCLOCK_PROCESS_CPUTIME_ID\fP. +.SH 例 +The example program below obtains the CPU\-time clock ID of the process whose +ID is given on the command line, and then uses \fBclock_gettime\fP(2) to +obtain the time on that clock. An example run is the following: +.in +4n +.nf + +$\fB ./a.out 1\fP # Show CPU clock of init process +CPU\-time clock for PID 1 is 2.213466748 seconds +.fi +.in +.SS プログラムのソース +\& +.nf +#define _XOPEN_SOURCE 600 +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + clockid_t clockid; + struct timespec ts; + + if (argc != 2) { + fprintf(stderr, "%s \en", argv[0]); + exit(EXIT_FAILURE); + } + + if (clock_getcpuclockid(atoi(argv[1]), &clockid) != 0) { + perror("clock_getcpuclockid"); + exit(EXIT_FAILURE); + } + + if (clock_gettime(clockid, &ts) == \-1) { + perror("clock_gettime"); + exit(EXIT_FAILURE); + } + + printf("CPU\-time clock for PID %s is %ld.%09ld seconds\en", + argv[1], (long) ts.tv_sec, (long) ts.tv_nsec); + exit(EXIT_SUCCESS); +} +.fi +.SH 関連項目 +\fBclock_getres\fP(2), \fBtimer_create\fP(2), \fBpthread_getcpuclockid\fP(3), +\fBtime\fP(7) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man3/conj.3 b/draft/man3/conj.3 index f1808e15..4da180c0 100644 --- a/draft/man3/conj.3 +++ b/draft/man3/conj.3 @@ -32,9 +32,9 @@ conj, conjf, conjl \- 複素共役を計算する .fi .SH バージョン これらの関数は glibc バージョン 2.1 で初めて登場した。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBconj\fP(), \fBconjf\fP(), and \fBconjl\fP() functions are thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBconj\fP(), \fBconjf\fP(), \fBconjl\fP() はスレッドセーフである。 .SH 準拠 C99. .SH 関連項目 diff --git a/draft/man3/crypt.3 b/draft/man3/crypt.3 index 8d92db7a..b03f6709 100644 --- a/draft/man3/crypt.3 +++ b/draft/man3/crypt.3 @@ -126,11 +126,11 @@ DES アルゴリズムにはいくつかの癖があり、それによってパ .\" Making encrypted data computed using crypt() publicly available has .\" to be considered insecure for the given reasons. \fBcrypt\fP() 関数が実装されていない。多分アメリカの輸出規制のために。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBcrypt\fP() function is not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBcrypt\fP() 関数はスレッドセーフではない。 .LP -The \fBcrypt_r\fP() function is thread\-safe. +\fBcrypt_r\fP() 関数はスレッドセーフである。 .SH 準拠 \fBcrypt\fP(): SVr4, 4.3BSD, POSIX.1\-2001. \fBcrypt_r\fP() は GNU 拡張である。 .SH 注意 diff --git a/draft/man3/ctermid.3 b/draft/man3/ctermid.3 index 2eb4ebf8..b1795e63 100644 --- a/draft/man3/ctermid.3 +++ b/draft/man3/ctermid.3 @@ -51,8 +51,8 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 \fIs\fP は端末パス名を保持するのに使用されるバッファへのポインタとなる。 シンボル定数 \fBL_ctermid\fP は返されるパス名の最大文字数である。 .SH 返り値 パス名へのポインタ。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" The \fBctermid\fP() function is thread\-safe with exceptions. It is not thread\-safe if called with a NULL parameter. .SH 準拠 diff --git a/draft/man3/dirfd.3 b/draft/man3/dirfd.3 index 413ec3d4..2da52c77 100644 --- a/draft/man3/dirfd.3 +++ b/draft/man3/dirfd.3 @@ -62,8 +62,7 @@ _BSD_SOURCE || _SVID_SOURCE \fBfstat\fP(2) や \fBfchdir\fP(2) などでしか役に立たない。 このディスクリプタは \fBclosedir\fP(3) が呼ばれたときに自動的にクローズされる。 .SH 返り値 -On success, a nonnegative file descriptor is returned. On error, \-1 is -returned, and \fIerrno\fP is set to indicate the cause of the error. +成功すると、負でない値のファイルディスクリプタが返される。 エラーの場合は \-1 が返され、 \fIerrno\fP にエラーの原因を示す値が設定される。 .SH エラー .\" glibc 2.8 POSIX.1\-2008 では 2 つのエラーが規定されている。 現在の実装ではどちらのエラーも返されない。 diff --git a/draft/man3/drand48.3 b/draft/man3/drand48.3 index 89a38bb6..3fe5f4b6 100644 --- a/draft/man3/drand48.3 +++ b/draft/man3/drand48.3 @@ -125,8 +125,8 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 配列の形をした引数の要素はそれぞれ、\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 ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" 関数 \fBdrand48\fP(), \fBerand48\fP(), \fBlrand48\fP(), \fBnrand48\fP(), \fBmrand48\fP(), \fBjrand48\fP(), \fBsrand48\fP(), \fBseed48\fP(), \fBlcong48\fP() は、 乱数生成に使用する状態情報をグローバルに保持する。 そのため、 これらの関数はスレッドセーフではない。 diff --git a/draft/man3/ecvt.3 b/draft/man3/ecvt.3 index 241ea394..91155001 100644 --- a/draft/man3/ecvt.3 +++ b/draft/man3/ecvt.3 @@ -81,8 +81,8 @@ _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTEN .SH 返り値 関数 \fBecvt\fP() と \fBfcvt\fP() は \fInumber\fP の ASCII 表現を含む 静的な領域内の文字列へのポインタを返す。 この文字列は \fBecvt\fP() や \fBfcvt\fP() の呼び出しのたびに上書きされる。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" 関数 \fBecvt\fP() と \fBfcvt\fP() はスレッドセーフではない。 .SH 準拠 SVr2。 POSIX.1\-2001 では「過去の名残 (LEGACY)」と位置付けられている。 POSIX.1\-2008 では \fBecvt\fP() diff --git a/draft/man3/encrypt.3 b/draft/man3/encrypt.3 index e9294a2b..7fccd761 100644 --- a/draft/man3/encrypt.3 +++ b/draft/man3/encrypt.3 @@ -95,11 +95,11 @@ struct crypt_data { .TP \fBENOSYS\fP (例えば以前のアメリカ合衆国輸出規制などにより) この関数が提供されていない。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The functions \fBencrypt\fP() and \fBsetkey\fP() are not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBencrypt\fP() と \fBsetkey\fP() はスレッドセーフではない。 .LP -The functions \fBencrypt_r\fP() and \fBsetkey_r\fP() are thread\-safe. +関数 \fBencrypt_r\fP() と \fBsetkey_r\fP() はスレッドセーフである。 .SH 準拠 関数 \fBencrypt\fP() と \fBsetkey\fP() は SVr4, SUSv2, and POSIX.1\-2001 に準拠する。 関数 \fBencrypt_r\fP() と \fBsetkey_r\fP() は GNU 拡張である。 diff --git a/draft/man3/ether_aton.3 b/draft/man3/ether_aton.3 index 19f874c9..ac5a4697 100644 --- a/draft/man3/ether_aton.3 +++ b/draft/man3/ether_aton.3 @@ -92,12 +92,12 @@ struct ether_addr { } .fi .in -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBether_aton\fP() and \fBether_ntoa\fP() functions are not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBether_aton\fP() と \fBether_ntoa\fP() はスレッドセーフではない。 .LP -The \fBether_ntohost\fP(), \fBether_hostton\fP(), \fBether_line\fP(), -\fBether_ntoa_r\fP() and \fBether_aton_r\fP() functions are thread\-safe. +関数 \fBether_ntohost\fP(), \fBether_hostton\fP(), \fBether_line\fP(), +\fBether_ntoa_r\fP(), \fBether_aton_r\fP() はスレッドセーフである。 .SH 準拠 4.3BSD, SunOS. .SH バグ diff --git a/draft/man3/exec.3 b/draft/man3/exec.3 index 76cd6260..33d4dbcb 100644 --- a/draft/man3/exec.3 +++ b/draft/man3/exec.3 @@ -79,14 +79,10 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .PP これらの関数の最初の引き数は、実行されるファイルの名前である。 .PP -The \fIconst char\ *arg\fP and subsequent ellipses in the \fBexecl\fP(), -\fBexeclp\fP(), and \fBexecle\fP() functions can be thought of as \fIarg0\fP, -\fIarg1\fP, \&..., \fIargn\fP. Together they describe a list of one or more -pointers to null\-terminated strings that represent the argument list -available to the executed program. The first argument, by convention, -should point to the filename associated with the file being executed. The -list of arguments \fImust\fP be terminated by a NULL pointer, and, since these -are variadic functions, this pointer must be cast \fI(char\ *) NULL\fP. +関数 \fBexecl\fP(), \fBexeclp\fP(), \fBexecle\fP() の \fIconst char\ *arg\fP とそれに続く省略部分は +\fIarg0\fP, \fIarg1\fP, \&..., \fIargn\fP とみなされる。 これらには、実行されるプログラムで利用可能な引き数のリストを指定する +(引き数のリストは NULL で終端された文字列へのポインタから構成される)。 慣習として、最初の引き数は、実行されるファイル名 +へのポインタにする。引き数のリストは必ず NULL で終わらなければならず、これらの関数は可変長引き数関数なので、 このポインタは \fI(char\ *) NULL\fP とキャストしなければならない。 .PP 関数 \fBexecv\fP(), \fBexecvp\fP(), \fBexecvpe\fP() は、利用可能な引き数リスト (NULL で終端された文字列への ポインタの配列) を新しいプログラムに渡す。 慣習として、最初の引き数は実行されるファイル名へ のポインタにする。ポインタの配列は必ず NULL diff --git a/draft/man3/fcloseall.3 b/draft/man3/fcloseall.3 index e531ddd6..6fd31678 100644 --- a/draft/man3/fcloseall.3 +++ b/draft/man3/fcloseall.3 @@ -44,10 +44,9 @@ fcloseall \- 開いているすべてのストリームを閉じる 標準入出力 \fIstdin\fP, \fIstdout\fP, \fIstderr\fP も閉じられる。 .SH 返り値 この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 \fBEOF\fP を返す。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBfcloseall\fP() function does not lock the streams, so it is not -thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBfcloseall\fP() 関数はストリームのロックを行わない。そのため、スレッドセーフではない。 .SH 準拠 この関数は GNU 拡張である。 .SH 関連項目 diff --git a/draft/man3/fenv.3 b/draft/man3/fenv.3 index bc53b3ab..5ff90cda 100644 --- a/draft/man3/fenv.3 +++ b/draft/man3/fenv.3 @@ -133,12 +133,10 @@ C99 と POSIX.1\-2008 では \fBFLT_ROUNDS\fP という識別子が規定され \fBFLT_ROUNDS\fP の値には、 \fBfesetround\fP() で設定された現在の丸めモードが反映されるべきである (但し、「バグ」の節を参照)。 .SS 浮動小数点関連の環境 -The entire floating\-point environment, including control modes and status -flags, can be handled as one opaque object, of type \fIfenv_t\fP. The default -environment is denoted by \fBFE_DFL_ENV\fP (of type \fIconst fenv_t\ *\fP). This -is the environment setup at program start and it is defined by ISO C to have -round to nearest, all exceptions cleared and a nonstop (continue on -exceptions) mode. +浮動小数点関連の環境の全体は、 制御モードや状態フラグも含め、 \fIfenv_t\fP 型の内部オブジェクト一つで取り扱うことができる。 +デフォルトの環境は、 (\fIconst fenv_t\ *\fP 型の) \fBFE_DFL_ENV\fP で示されるものである。 +これはプログラムの開始時に構築される環境であり、 ISO C では、丸めモードを最も近い値への丸め (\fBFE_TONEAREST\fP) +に設定し、すべての例外をクリアし、不停止 (nonstop) (例外が起きても継続する) モードとするように規定されている。 .LP \fBfegetenv\fP() 関数は、現在の浮動小数点環境を、オブジェクト \fI*envp\fP に保存する。 .LP diff --git a/draft/man3/ferror.3 b/draft/man3/ferror.3 index 803fc7b4..066a0426 100644 --- a/draft/man3/ferror.3 +++ b/draft/man3/ferror.3 @@ -80,10 +80,9 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .SH エラー これらの関数は失敗すべきではなく、また、外部変数 \fIerrno\fP に値をセットしない。 (しかし、 \fBfileno\fP() 関数の場合で、引数が有効なストリームでなかった場合、 関数は \-1 を返し、 \fIerrno\fP に \fBEBADF\fP を設定しなければならない。) -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBclearerr\fP(), \fBfeof\fP(), \fBferror\fP(), and \fBfileno\fP() functions are -thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBclearerr\fP(), \fBfeof\fP(), \fBferror\fP(), \fBfileno\fP() はスレッドセーフである。 .SH 準拠 関数 \fBclearerr\fP(), \fBfeof\fP(), \fBferror\fP() は C89 と C99 に準拠している。 .SH 関連項目 diff --git a/draft/man3/fgetwc.3 b/draft/man3/fgetwc.3 index 98cc9ef1..891ab31f 100644 --- a/draft/man3/fgetwc.3 +++ b/draft/man3/fgetwc.3 @@ -42,9 +42,8 @@ fgetwc, getwc \- ワイド文字を FILE ストリームから読み込む .PP これらの処理を停止せずに行いたいときは、 \fBunlocked_stdio\fP(3) を参照のこと。 .SH 返り値 -The \fBfgetwc\fP() function returns the next wide\-character from the stream, -or \fBWEOF\fP. In the event of an error, \fIerrno\fP is set to indicate the -cause. +\fBfgetwc\fP() 関数はストリームの次のワイド文字か、あるいは \fBWEOF\fP を返す。 エラーが起こった場合、 \fIerrno\fP +にエラーの原因を示す値が設定される。 .SH エラー 通常のエラーに加えて、以下のエラーがある: .TP diff --git a/draft/man3/fmtmsg.3 b/draft/man3/fmtmsg.3 index e718a31b..179df67c 100644 --- a/draft/man3/fmtmsg.3 +++ b/draft/man3/fmtmsg.3 @@ -42,12 +42,10 @@ fmtmsg \- 整形されたエラーメッセージを表示する \fItag\fP 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照である。 これは \fIlabel\fP 値とユニークな識別番号を含んでいるべきである。 .SS ダミー引き数 -Each of the arguments can have a dummy value. The dummy classification -value \fBMM_NULLMC\fP (0L) does not specify any output, so nothing is printed. -The dummy severity value \fBNO_SEV\fP (0) says that no severity is supplied. -The values \fBMM_NULLLBL\fP, \fBMM_NULLTXT\fP, \fBMM_NULLACT\fP, \fBMM_NULLTAG\fP are -synonyms for \fI((char\ *)\ 0)\fP, the empty string, and \fBMM_NULLSEV\fP is a -synonym for \fBNO_SEV\fP. +各引き数にはダミーの値を入れることができる。 ダミーの \fIclassification\fP 値 \fBMM_NULLMC\fP (0L) +は出力を何も指定しない。そのため何も表示されない。 ダミーの \fIseverity\fP 値 \fBNO_SEV\fP (0) は重大度 (severity) +が与えられていないことを表す。 値 \fBMM_NULLLBL\fP, \fBMM_NULLTXT\fP, \fBMM_NULLACT\fP, \fBMM_NULLTAG\fP +は \fI((char\ *)\ 0)\fP と空文字列の別名であり、 \fBMM_NULLSEV\fP は \fBNO_SEV\fP の別名である。 .SS "classification 引き数" \fIclassification\fP 引き数は 4 種類の情報を記述する値の和である。 .br @@ -154,8 +152,8 @@ severity\-keyword 部は \fBfmtmsg\fP() に使用されないが、存在しな この重大度のメッセージが \fBfmtmsg\fP() によって生成された場合に表示される文字列である。 .SH バージョン \fBfmtmsg\fP() は、バージョン 2.1 以降の glibc で提供されている。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" Before glibc 2.16, the \fBfmtmsg\fP() function uses a static variable that is not protected, so it is not thread\-safe. diff --git a/draft/man3/fputwc.3 b/draft/man3/fputwc.3 index b046ff54..eec413c1 100644 --- a/draft/man3/fputwc.3 +++ b/draft/man3/fputwc.3 @@ -41,9 +41,8 @@ fputwc, putwc \- ワイド文字を FILE ストリームに書き込む .PP これらの処理を停止せずに行いたいときは、 \fBunlocked_stdio\fP(3) を参照のこと。 .SH 返り値 -The \fBfputwc\fP() function returns \fIwc\fP if no error occurred, or \fBWEOF\fP to -indicate an error. In the event of an error, \fIerrno\fP is set to indicate -the cause. +\fBfputwc\fP() 関数は、エラーが起きなければ \fIwc\fP を返す。エラーの場合には \fBWEOF\fP が返り、 \fIerrno\fP +にエラーの原因を示す値が設定される。 .SH エラー 通常のエラーに加えて、以下のエラーがある: .TP diff --git a/draft/man3/getdate.3 b/draft/man3/getdate.3 index 28a5d3f4..2a62c74c 100644 --- a/draft/man3/getdate.3 +++ b/draft/man3/getdate.3 @@ -134,8 +134,8 @@ time) に変換する。 要素別の時刻は \fItm\fP 構造体に格納され .TP \fBTZ\fP, \fBLC_TIME\fP \fBstrptime\fP(3) が用いる変数。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" The \fBgetdate\fP() function is not thread\-safe. .LP The \fBgetdate_r\fP() function is thread\-safe. diff --git a/draft/man3/getgrent.3 b/draft/man3/getgrent.3 index f96c87bc..3cd05b69 100644 --- a/draft/man3/getgrent.3 +++ b/draft/man3/getgrent.3 @@ -121,8 +121,8 @@ I/O エラー。 .TP \fI/etc/group\fP ローカルのグループ・データベースファイル -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" \fBgetgrent()\fP 関数はスレッドセーフではない。 .LP 関数 \fBsetgrent()\fP と \fBendgrent()\fP はスレッドセーフである。 diff --git a/draft/man3/getgrnam.3 b/draft/man3/getgrnam.3 index 1099532b..340076f7 100644 --- a/draft/man3/getgrnam.3 +++ b/draft/man3/getgrnam.3 @@ -143,8 +143,8 @@ I/O エラー。 .TP \fI/etc/group\fP ローカルのグループ・データベースファイル -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" 関数 \fBgetgrnam\fP() と \fBgetgrgid\fP() はスレッドセーフではない。 .LP 関数 \fBgetgrnam_r\fP() と \fBgetgrgid_r\fP() はスレッドセーフである。 diff --git a/draft/man3/gethostbyname.3 b/draft/man3/gethostbyname.3 index 47111f5b..2dcb8e61 100644 --- a/draft/man3/gethostbyname.3 +++ b/draft/man3/gethostbyname.3 @@ -229,8 +229,7 @@ POSIX.1\-2001 では、 \fBgethostbyname\fP(), \fBgethostbyaddr\fP(), \fBsethost \fIsize_t\fP 型ではなく \fIint\fP 型でなければならない。 POSIX.1\-2001 ではこれを \fIsocklen_t\fP としているが、これは OK。) \fBaccept\fP(2) も参照。 .LP -The BSD prototype for \fBgethostbyaddr\fP() uses \fIconst char\ *\fP for the -first argument. +\fBgethostbyaddr\fP() の BSD のプロトタイプは、最初の引き数として \fIconst char\ *\fP を使う。 .SS "System V/POSIX 拡張" .\" e.g., Linux, FreeBSD, UnixWare, HP-UX .\" e.g., FreeBSD, AIX diff --git a/draft/man3/getline.3 b/draft/man3/getline.3 index 96c3a55f..bb39e0ef 100644 --- a/draft/man3/getline.3 +++ b/draft/man3/getline.3 @@ -74,14 +74,11 @@ _GNU_SOURCE に指定することができる。 \fBgetline\fP() と同様に、ファイル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッファに追加しない。 .SH 返り値 -On success, \fBgetline\fP() and \fBgetdelim\fP() return the number of characters -read, including the delimiter character, but not including the terminating -null byte (\(aq\e0\(aq). This value can be used to handle embedded null -bytes in the line read. +成功した場合、 \fBgetline\fP() と \fBgetdelim\fP() は読み込んだ文字数を返す。 文字数には区切り文字は含まれるが、終端に使う +NULL バイト (\(aq\e0\(aq) は含まれない。 この値によって、読み込んだ行に含まれる NULL バイトを操作することができる。 -Both functions return \-1 on failure to read a line (including end\-of\-file -condition). In the event of an error, \fIerrno\fP is set to indicate the -cause. +どちらの関数も、行の読み込みに失敗した場合には \-1 を返す (ファイルの終端に達した場合にも \-1 を返す)。 エラーが発生した場合には、 +\fIerrno\fP にエラーの原因を示す値が設定される。 .SH エラー .TP \fBEINVAL\fP diff --git a/draft/man3/getlogin.3 b/draft/man3/getlogin.3 index 1a5870d0..21e2fccc 100644 --- a/draft/man3/getlogin.3 +++ b/draft/man3/getlogin.3 @@ -72,9 +72,8 @@ NULL ポインタの場合には、静的領域に置かれた文字列への たいていの目的では、ユーザーの特定には環境変数 \fBLOGNAME\fP を調べ るほうが便利である。LOGNAME 変数はユーザーが自由に設定できるので より柔軟な対応が可能になる。 .SH 返り値 -\fBgetlogin\fP() returns a pointer to the username when successful, and NULL -on failure, with \fIerrno\fP set to indicate the cause of the error. -\fBgetlogin_r\fP() returns 0 when successful, and nonzero on failure. +\fBgetlogin\fP() は成功した場合はユーザ名へのポインタを返す。 失敗した場合は NULL を返し、 \fIerrno\fP +にエラーの原因を示す値を設定する。 \fBgetlogin_r\fP() は成功すると 0 を返し、失敗すると 0 以外を返す。 .SH エラー POSIX では以下のエラーが規定されている: .TP @@ -88,8 +87,7 @@ POSIX では以下のエラーが規定されている: 呼び出し元プロセスには制御端末がない。 .TP \fBERANGE\fP -(getlogin_r) The length of the username, including the terminating null -byte (\(aq\e0\(aq), is larger than \fIbufsize\fP. +(getlogin_r) (終端の NULL バイト (\(aq\e0\(aq) も含めた) ユーザ名の長さが \fIbufsize\fP よりも長い。 .LP Linux/glibc には以下のエラーもある。 .TP @@ -108,11 +106,11 @@ passwd 構造体を割り当てるのに十分なメモリがない。 .TP \fI/var/run/utmp\fP (伝統的には \fI/etc/utmp\fP が使われている; libc の中には \fI/var/adm/utmp\fP を使うものもある) -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBgetlogin\fP() function is not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBgetlogin\fP() 関数はスレッドセーフではない。 .LP -The \fBgetlogin_r\fP() function is thread\-safe. +\fBgetlogin_r\fP() 関数はスレッドセーフである。 .LP The \fBcuserid\fP() function is thread\-safe with exceptions. It is not thread\-safe if called with a NULL parameter. diff --git a/draft/man3/getmntent.3 b/draft/man3/getmntent.3 index d4364e60..59395480 100644 --- a/draft/man3/getmntent.3 +++ b/draft/man3/getmntent.3 @@ -66,8 +66,8 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .sp \fBgetmntent_r\fP(): _BSD_SOURCE || _SVID_SOURCE .SH 説明 -These routines are used to access the file system description file -\fI/etc/fstab\fP and the mounted file system description file \fIetc/mtab\fP. +これらのルーチンは、ファイルシステムを記述したファイル \fI/etc/fstab\fP と、マウントされているファイルシステムを記述したファイル +\fI/etc/mtab\fP にアクセスするために用いられる。 .PP \fBsetmntent\fP() 関数は、ファイルシステムの記述ファイル \fIfilename\fP をオープンして、 そのファイルポインタを返す。このファイルポインタは \fBgetmntent\fP() によって用いられる。引き数 \fItype\fP diff --git a/draft/man3/getpass.3 b/draft/man3/getpass.3 index 7913c828..574fd838 100644 --- a/draft/man3/getpass.3 +++ b/draft/man3/getpass.3 @@ -51,8 +51,8 @@ _BSD_SOURCE || !(_POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600) .fi .TP 4 -Before glibc 2.2.2: -none +glibc 2.2.2 より前: +なし .PD .RE .ad b @@ -78,9 +78,9 @@ echo をオフにし、一行 (「パスワード」) を読み込み、端末 .\" .BR getpass () .\" function appeared in Version 7 AT&T UNIX. \fI/dev/tty\fP -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBgetpass\fP() function is not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBgetpass\fP() 関数はスレッドセーフではない。 .SH 準拠 SUSv2 には存在するが、過去の名残 (LEGACY) と位置付けられている。 POSIX.1\-2001 で削除された。 .SH 注意 diff --git a/draft/man3/getpwent.3 b/draft/man3/getpwent.3 index 2b2b30dd..2db36b77 100644 --- a/draft/man3/getpwent.3 +++ b/draft/man3/getpwent.3 @@ -118,8 +118,8 @@ I/O エラー。 .TP \fI/etc/passwd\fP ローカルのパスワード・データベースファイル -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" \fBgetpwent()\fP 関数はスレッドセーフではない。 .LP 関数 \fBsetpwent()\fP と \fBendpwent()\fP はスレッドセーフである。 diff --git a/draft/man3/getpwnam.3 b/draft/man3/getpwnam.3 index f36d5fba..79ed67e0 100644 --- a/draft/man3/getpwnam.3 +++ b/draft/man3/getpwnam.3 @@ -150,8 +150,8 @@ I/O エラー。 .TP \fI/etc/passwd\fP ローカルのパスワード・データベースファイル -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" 関数 \fBgetpwnam\fP() と \fBgetpwuid\fP() はスレッドセーフではない。 .LP 関数 \fBgetpwnam_r\fP() と \fBgetpwuid_r\fP() はスレッドセーフである。 diff --git a/draft/man3/getttyent.3 b/draft/man3/getttyent.3 index 114fedb2..ab9096eb 100644 --- a/draft/man3/getttyent.3 +++ b/draft/man3/getttyent.3 @@ -55,16 +55,13 @@ struct ttyent { #define TTY_ON 0x01 /* ログインを有効にする (ty_getty プログラムを開始する) */ #define TTY_SECURE 0x02 /* ユーザ ID 0 でのログインを許可する */ .fi -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBgetttyent\fP() returns a pointer to a static variable, so it is not -thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBgetttyent\fP() は静的変数へのポインタを返す。そのため、スレッドセーフではない。 .LP -The \fBsetttyent\fP() and \fBendttyent\fP() use a static variable, so they are -not thread\-safe. +\fBsetttyent\fP() と \fBendttyent\fP() は静的変数を使用する。そのため、スレッドセーフではない。 .LP -The \fBgetttynam\fP() calls thread\-unsafe function \fBgetttyent\fP() so it is -not thread\-safe. +\fBgetttynam\fP() はスレッドセーフではない関数 \fBgetttyent\fP() を呼び出す。そのため、スレッドセーフではない。 .SH 準拠 POSIX.1\-2001 にはない。 BSD 系に存在し、おそらく他のシステムにもあるだろう。 .SH 注意 diff --git a/draft/man3/getusershell.3 b/draft/man3/getusershell.3 index dfc30463..597e4929 100644 --- a/draft/man3/getusershell.3 +++ b/draft/man3/getusershell.3 @@ -71,10 +71,9 @@ _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) .nf /etc/shells .fi -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBgetusershell\fP(), \fBsetusershell\fP() and \fBendusershell\fP() functions -are not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBgetusershell\fP(), \fBsetusershell\fP(), \fBendusershell\fP() はスレッドセーフではない。 .SH 準拠 4.3BSD. .SH 関連項目 diff --git a/draft/man3/getutent.3 b/draft/man3/getutent.3 index 20a8c3bb..ff3f0d41 100644 --- a/draft/man3/getutent.3 +++ b/draft/man3/getutent.3 @@ -92,8 +92,7 @@ getutent, getutid, getutline, pututline, setutent, endutent, utmpname \- utmp \fButmpname\fP() は、新しい名前の格納に成功すると 0 を返し、失敗すると \-1 を返す。 -In the event of an error, these functions \fIerrno\fP set to indicate the -cause. +エラーが発生した場合、これらの関数は \fIerrno\fP にエラーの原因を示す値を設定する。 .SH エラー .TP \fBENOMEM\fP diff --git a/draft/man3/hsearch.3 b/draft/man3/hsearch.3 index 2ea9640c..6eb8fcc2 100644 --- a/draft/man3/hsearch.3 +++ b/draft/man3/hsearch.3 @@ -110,15 +110,13 @@ typedef struct entry { \fBhsearch_r\fP() 関数が \fBhsearch\fP() と異なるのは、見つかった項目へのポインタを、 関数の結果としてではなく、 \fI*retval\fP に格納して返す点である。 .SH 返り値 -\fBhcreate\fP() and \fBhcreate_r\fP() return nonzero on success. They return 0 -on error, with \fIerrno\fP set to indicate the cause of the error. - -On success, \fBhsearch\fP() returns a pointer to an entry in the hash table. -\fBhsearch\fP() returns NULL on error, that is, if \fIaction\fP is \fBENTER\fP and -the hash table is full, or \fIaction\fP is \fBFIND\fP and \fIitem\fP cannot be found -in the hash table. \fBhsearch_r\fP() returns nonzero on success, and 0 on -error. In the event of an error, these two functions set \fIerrno\fP to -indicate the cause of the error. +\fBhcreate\fP() と \fBhcreate_r\fP() は、成功した場合 0 以外の値を返す。 エラーの場合 0 を返し、 \fIerrno\fP +にエラーの原因を示す値を設定する。 + +成功すると、 \fBhsearch\fP() は、ハッシュテーブル内のエントリへのポインタを返す。 エラーの場合、 \fBhsearch\fP() は NULL +を返す。 エラーとなるのは、 \fIaction\fP が \fBENTER\fP でハッシュテーブルがいっぱいの場合か、 \fIaction\fP が \fBFIND\fP +で \fIitem\fP がハッシュテーブル内に 見つからない場合である。 \fBhsearch_r\fP() は、成功すると 0 以外を返し、エラーの場合 0 +を返す。 エラーの場合、 これら二つの関数は \fIerrno\fP にエラーの原因を示す値を設定する。 .SH エラー .LP \fBhcreate_r\fP() と \fBhdestroy_r\fP() は以下の理由で失敗する可能性がある。 @@ -135,13 +133,12 @@ indicate the cause of the error. \fIaction\fP が \fBFIND\fP で、 \fIkey\fP がテーブル内に見つからなかった。 .PP POSIX.1\-2001 が規定しているのは、エラー \fBENOMEM\fP だけである。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The functions \fBhcreate\fP(), \fBhsearch\fP(), and \fBhdestroy\fP() use a global -space for storing the table, so they are not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBhcreate\fP(), \fBhsearch\fP(), \fBhdestroy\fP() +はテーブルを格納するのにグローバル空間を使用する。そのため、これらの関数はスレッドセーフではない。 .LP -The functions \fBhcreate_r\fP(), \fBhsearch_r\fP(), and \fBhdestroy_r\fP() are -thread\-safe. +関数 \fBhcreate_r\fP(), \fBhsearch_r\fP(), \fBhdestroy_r\fP() はスレッドセーフである。 .SH 準拠 関数 \fBhcreate\fP(), \fBhsearch\fP(), \fBhdestroy\fP() は SVr4 から導入されたもので、POSIX.1\-2001 に記述されている。 関数 \fBhcreate_r\fP, \fBhsearch_r\fP, \fBhdestroy_r\fP は GNU の拡張である。 diff --git a/draft/man3/iconv_open.3 b/draft/man3/iconv_open.3 index 569b6ed1..09cba813 100644 --- a/draft/man3/iconv_open.3 +++ b/draft/man3/iconv_open.3 @@ -33,11 +33,9 @@ iconv_open \- 文字セット変換のためのディスクリプタを割り当 \fBiconv_open\fP() 関数は、文字エンコーディング \fIfromcode\fP から 文字エンコーディング \fItocode\fP へのバイト文字列変換に適した 変換ディスクリプタを割り当てる。 .PP -The values permitted for \fIfromcode\fP and \fItocode\fP and the supported -combinations are system\-dependent. For the GNU C library, the permitted -values are listed by the \fIiconv \-\-list\fP command, and all combinations of -the listed values are supported. Furthermore the GNU C library and the GNU -libiconv library support the following two suffixes: +\fIfromcode\fP と \fItocode\fP に使うことのできる値と、 サポートされる組み合わせは、システムに依存する。 GNU C +ライブラリでは、使うことのできる値は \fIiconv \-\-list\fP コマンドでリストされ、 リストされたすべての値の組み合わせがサポートされる。 +さらに、 GNU C ライブラリと GNU libiconv ライブラリでは、 以下の接尾辞がサポートされている。 .TP //TRANSLIT \fItocode\fP の後ろに文字列 "//TRANSLIT" が付いている場合、 翻訳 (transliteration) が有効になる。この場合、 diff --git a/draft/man3/localeconv.3 b/draft/man3/localeconv.3 new file mode 100644 index 00000000..4eaf6c0f --- /dev/null +++ b/draft/man3/localeconv.3 @@ -0,0 +1,65 @@ +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" %%%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:01:20 1993 by Rik Faith (faith@cs.unc.edu) +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LOCALECONV 3 2013\-06\-21 GNU "Linux Programmer's Manual" +.SH 名前 +localeconv \- 数値に関する書式情報を得る +.SH 書式 +.nf +\fB#include \fP +.sp +\fBstruct lconv *localeconv(void);\fP +.fi +.SH 説明 +\fBlocaleconv\fP() 関数は、現在のロケール情報を表す \fIstruct lconv\fP へのポインタを返す。 この構造体は +\fBlocale\fP(7) で説明されており、ロケール・カテゴリ \fBLC_NUMERIC\fP と \fBLC_MONETARY\fP +に関連するすべての値を含んでいる。 この関数を用いるプログラムは、おそらく同時に \fBprintf\fP(3) や \fBstrfmon\fP(3) +のような関数も用いるだろう。 これらの関数は、現在使用されているロケールに従った動作をする。 +.SH 返り値 +The \fBlocaleconv\fP() function returns a pointer to a filled in \fIstruct +lconv\fP. This structure may be (in glibc, \fIis\fP) statically allocated, and +may be overwritten by subsequent calls. According to POSIX, the caller +should not modify the contents of this structure. The \fBlocaleconv\fP() +function always succeeds. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +The \fBlocaleconv\fP() function is not thread\-safe, since it returns a pointer +to a structure which might be overwritten by subsequent calls. +.SH 準拠 +C89, C99 +.SH バグ +\fBprintf\fP(3) グループの関数は現在のロケールを反映するかもしれないし、 しないかもしれない。 +.SH 関連項目 +\fBlocale\fP(1), \fBlocaledef\fP(1), \fBisalpha\fP(3), \fBnl_langinfo\fP(3), +\fBsetlocale\fP(3), \fBstrcoll\fP(3), \fBstrftime\fP(3), \fBlocale\fP(7) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man3/malloc_info.3 b/draft/man3/malloc_info.3 new file mode 100644 index 00000000..47522cb6 --- /dev/null +++ b/draft/man3/malloc_info.3 @@ -0,0 +1,238 @@ +.\" Copyright (c) 2012 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 +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH MALLOC_INFO 3 2013\-04\-19 GNU "Linux Programmer's Manual" +.SH 名前 +malloc_info \- export malloc state to a stream +.SH 書式 +.nf +\fB#include \fP +.sp +\fBint malloc_info(int \fP\fIoptions\fP\fB, FILE *\fP\fIfp\fP\fB);\fP +.fi +.SH 説明 +The \fBmalloc_info\fP() function exports an XML string that describes the +current state of the memory\-allocation implementation in the caller. The +string is printed on the file stream \fIfp\fP. The exported string includes +information about all arenas (see \fBmalloc\fP(3)). + +As currently implemented, \fIoptions\fP must be zero. +.SH 返り値 +\fBmalloc_info\fP() は、成功すると 0 を返す。 エラーの場合、\-1 を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。 +.SH エラー +.TP +\fBEINVAL\fP +\fIoptions\fP was nonzero. +.SH バージョン +\fBmalloc_info\fP() は glibc バージョン 2.10 で追加された。 +.SH 準拠 +この関数は GNU による拡張である。 +.SH 注意 +The memory\-allocation information is provided as an XML string (rather than +a C structure) because the information may change over time (according to +changes in the underlying implementation). The output XML string includes a +version field. + +The \fBopen_memstream\fP(3) function can be used to send the output of +\fBmalloc_info\fP() directly into a buffer in memory, rather than to a file. + +The \fBmalloc_info\fP() function is designed to address deficiencies in +\fBmalloc_stats\fP(3) and \fBmallinfo\fP(3). +.SH 例 +The program below takes up to four command\-line arguments, of which the +first three are mandatory. The first argument specifies the number of +threads that the program should create. All of the threads, including the +main thread, allocate the number of blocks of memory specified by the second +argument. The third argument controls the size of the blocks to be +allocated. The main thread creates blocks of this size, the second thread +created by the program allocates blocks of twice this size, the third thread +allocates blocks of three times this size, and so on. + +The program calls \fBmalloc_info\fP() twice to display the memory\-allocation +state. The first call takes place before any threads are created or memory +allocated. The second call is performed after all threads have allocated +memory. + +In the following example, the command\-line arguments specify the creation of +one additional thread, and both the main thread and the additional thread +allocate 10000 blocks of memory. After the blocks of memory have been +allocated, \fBmalloc_info\fP() shows the state of two allocation arenas. +.in +4 +.nf + +$ \fBgetconf GNU_LIBC_VERSION\fP +glibc 2.13 +$ \fB./a.out 1 10000 100\fP +============ Before allocating blocks ============ + + + + + + + + + + + + + + + + + + + +============ After allocating blocks ============ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +.fi +.in +.SS プログラムのソース +.nf + +#include +#include +#include +#include +#include + +static size_t blockSize; +static int numThreads, numBlocks; + +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e + } while (0) + +static void * +thread_func(void *arg) +{ + int j; + int tn = (int) arg; + + /* The multiplier \(aq(2 + tn)\(aq ensures that each thread (including + the main thread) allocates a different amount of memory */ + + for (j = 0; j < numBlocks; j++) + if (malloc(blockSize * (2 + tn)) == NULL) + errExit("malloc\-thread"); + + sleep(100); /* Sleep until main thread terminates */ + return NULL; +} + +int +main(int argc, char *argv[]) +{ + int j, tn, sleepTime; + pthread_t *thr; + + if (argc < 4) { + fprintf(stderr, + "%s num\-threads num\-blocks block\-size [sleep\-time]\en", + argv[0]); + exit(EXIT_FAILURE); + } + + numThreads = atoi(argv[1]); + numBlocks = atoi(argv[2]); + blockSize = atoi(argv[3]); + sleepTime = (argc > 4) ? atoi(argv[4]) : 0; + + thr = calloc(numThreads, sizeof(pthread_t)); + if (thr == NULL) + errExit("calloc"); + + printf("============ Before allocating blocks ============\en"); + malloc_info(0, stdout); + + /* Create threads that allocate different amounts of memory */ + + for (tn = 0; tn < numThreads; tn++) { + errno = pthread_create(&thr[tn], NULL, thread_func, + (void *) tn); + if (errno != 0) + errExit("pthread_create"); + + /* If we add a sleep interval after the start\-up of each + thread, the threads likely won\(aqt contend for malloc + mutexes, and therefore additional arenas won\(aqt be + allocated (see malloc(3)). */ + + if (sleepTime > 0) + sleep(sleepTime); + } + + /* The main thread also allocates some memory */ + + for (j = 0; j < numBlocks; j++) + if (malloc(blockSize) == NULL) + errExit("malloc"); + + sleep(2); /* Give all threads a chance to + complete allocations */ + + printf("\en============ After allocating blocks ============\en"); + malloc_info(0, stdout); + + exit(EXIT_SUCCESS); +} +.fi +.SH 関連項目 +\fBmallinfo\fP(3), \fBmalloc\fP(3), \fBmalloc_stats\fP(3), \fBmallopt\fP(3), +\fBopen_memstream\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man3/mblen.3 b/draft/man3/mblen.3 index e50c7919..7866f312 100644 --- a/draft/man3/mblen.3 +++ b/draft/man3/mblen.3 @@ -45,8 +45,8 @@ mblen \- 次のマルチバイト文字のバイト数を返す .SH 返り値 \fBmblen\fP() 関数は \fIs\fP から始まるマルチバイト列を検査して ナルワイド文字以外を確認した場合にはそのバイト数を返す。 ナルワイド文字を確認した場合にはゼロを返す。不正なマルチバイト列に 遭遇した場合や完全なマルチバイト文字を解析できなかった場合には \-1 を返す。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" \fBmblen\fP() 関数はスレッドセーフではない。 .SH 準拠 C99. diff --git a/draft/man3/mbrlen.3 b/draft/man3/mbrlen.3 index 140f47bb..210ba97e 100644 --- a/draft/man3/mbrlen.3 +++ b/draft/man3/mbrlen.3 @@ -44,10 +44,9 @@ mbrlen \- 次のマルチバイト文字の長さをバイト数で返す ナルワイド文字が確認された場合にはゼロを返す。 不正なマルチバイト列に遭遇した場合には \fI(size_t)\ \-1\fP を返し \fIerrno\fP に \fBEILSEQ\fP を設定する。 完全なマルチバイト文字を解析できなかった場合には \fI(size_t)\ \-2\fP を返す。 これは \fIn\fP を増さなければならないことを意味する。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBmbrlen\fP() function is thread\-safe with exceptions. It is not -thread\-safe if called with a NULL \fIps\fP parameter. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBmbrlen\fP() 関数は、例外付きのスレッドセーフである。 \fIps\fP パラメータが NULL で呼び出された場合はスレッドセーフではない。 .SH 準拠 C99. .SH 注意 diff --git a/draft/man3/mbrtowc.3 b/draft/man3/mbrtowc.3 index 4e95ef55..fecbbfcd 100644 --- a/draft/man3/mbrtowc.3 +++ b/draft/man3/mbrtowc.3 @@ -62,10 +62,9 @@ L\(aq\e0\(aq 以外のワイド文字を認識した場合には \fBmbrtowc\fP() から始まるマルチバイト列から解析したバイト数を返す。 L\(aq\e0\(aq ワイド文字を認識した場合には 0 を返す。 不正なマルチバイト列に遭遇した場合には \fI(size_t)\ \-1\fP を返し、 \fIerrno\fP に \fBEILSEQ\fP を設定する。完全なマルチバイト文字を 解析できなかった場合には \fI(size_t)\ \-2\fP を返し \fIn\fP を増加させる必要があることを示す。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBmbrtowc\fP() function is thread\-safe with exceptions. It is not -thread\-safe if called with a NULL \fIps\fP parameter. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBmbrtowc\fP() 関数は、例外付きのスレッドセーフである。 \fIps\fP パラメータが NULL で呼び出された場合はスレッドセーフではない。 .SH 準拠 C99. .SH 注意 diff --git a/draft/man3/memmem.3 b/draft/man3/memmem.3 index 3a622853..757e06fa 100644 --- a/draft/man3/memmem.3 +++ b/draft/man3/memmem.3 @@ -55,10 +55,9 @@ Linux のライブラリに関していうと、 libc 5.0.9 と それ以前の \fIneedle\fP と \fIhaystack\fP 引数が 入れ替わっており、 \fIneedle\fP が最初に出現する部分の最後を 示すポインタが返されていたのである。 -Both old and new libc's have the bug that if \fIneedle\fP is empty, -\fIhaystack\-1\fP (instead of \fIhaystack\fP) is returned. And glibc 2.0 makes it -worse, returning a pointer to the last byte of \fIhaystack\fP. This is fixed -in glibc 2.1. +新旧両方の libc ライブラリが、 \fIneedle\fP が空の場合 (\fIhaystack\fP のかわりに) \fIhaystack\-1\fP\ が +返されるというバグを持っている。 そして、glibc 2.0 ではさらに悪くなっており、 \fIhaystack\fP の最後のバイトへのポインタを返す。 +これは glibc 2.1 で修正された。 .SH 関連項目 \fBstrstr\fP(3) .SH この文書について diff --git a/draft/man3/modf.3 b/draft/man3/modf.3 index d36f6620..d8bc64dc 100644 --- a/draft/man3/modf.3 +++ b/draft/man3/modf.3 @@ -75,9 +75,9 @@ or \fIcc\ \-std=c99\fP \fIx\fP が正の無限大 (負の無限大) の場合、 +0 (\-0) が返され、 \fI*iptr\fP に正の無限大 (負の無限大) が設定される。 .SH エラー エラーは発生しない。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBmodf\fP(), \fBmodff\fP(), and \fBmodfl\fP() functions are thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBmodf\fP(), \fBmodff\fP(), \fBmodfl\fP() はスレッドセーフである。 .SH 準拠 C99, POSIX.1\-2001. \fIdouble\fP 版の関数は SVr4, 4.3BSD, C89 にも準拠している。 .SH 関連項目 diff --git a/draft/man3/popen.3 b/draft/man3/popen.3 index 052ce53d..8f1118d6 100644 --- a/draft/man3/popen.3 +++ b/draft/man3/popen.3 @@ -96,9 +96,8 @@ NULL を返す。 .\" is not associated with a "popen()ed" command, if .\".I stream .\" already "pclose()d", or if -The \fBpclose\fP() function returns \-1 if \fBwait4\fP(2) returns an error, or -some other error is detected. In the event of an error, these functions set -\fIerrnro\fP to indicate the cause of the error. +\fBpclose\fP() 関数は、 \fBwait4\fP(2) がエラーを返したり、何か他のエラーが見つかった場合、 \-1 を返す。 その場合、 +\fIerrno\fP にエラーの原因を示す値が設定される。 .SH エラー \fBpopen\fP() 関数は、メモリアロケーションに失敗しても \fIerrno\fP をセットしない。 \fBpopen\fP() が中で呼び出す \fBfork\fP(2) や \fBpipe\fP(2) が失敗した場合には、 \fIerrno\fP が適切にセットされる。 引き数 \fItype\fP diff --git a/draft/man3/posix_memalign.3 b/draft/man3/posix_memalign.3 index 551ad8c6..af0f27b6 100644 --- a/draft/man3/posix_memalign.3 +++ b/draft/man3/posix_memalign.3 @@ -82,12 +82,11 @@ _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTEND .PD .SH 説明 .\" glibc does this: -The function \fBposix_memalign\fP() allocates \fIsize\fP bytes and places the -address of the allocated memory in \fI*memptr\fP. The address of the allocated -memory will be a multiple of \fIalignment\fP, which must be a power of two and -a multiple of \fIsizeof(void\ *)\fP. If \fIsize\fP is 0, then \fBposix_memalign\fP() -returns either NULL, or a unique pointer value that can later be -successfully passed to \fBfree\fP(3). +関数 \fBposix_memalign\fP() は、 \fIsize\fP バイトのメモリを割り当て、割り当てられたメモリのアドレスを \fI*memptr\fP +に設定する。 割り当てられたメモリのアドレスは \fIalignment\fP の倍数になっているはずである。 \fIalignment\fP は 2 +のべき乗で、かつ \fIsizeof(void\ *)\fP の倍数でなければならない。 \fIsize\fP が 0 の場合、 +\fBposix_memalign\fP() は NULL か一意なポインタ値を返す。 このポインタ値は、後で \fBfree\fP(3) +に問題なく渡すことができる。 .\" The behavior of memalign() for size==0 is as for posix_memalign() .\" but no standards govern this. @@ -115,8 +114,7 @@ successfully passed to \fBfree\fP(3). .SH エラー .TP \fBEINVAL\fP -The \fIalignment\fP argument was not a power of two, or was not a multiple of -\fIsizeof(void\ *)\fP. +\fIalignment\fP 引き数が 2 のべき乗でなかったか、 \fIsizeof(void\ *)\fP の倍数でなかった。 .TP \fBENOMEM\fP 割り当て要求を満たすのに十分なメモリがなかった。 diff --git a/draft/man3/printf.3 b/draft/man3/printf.3 index 6cd53466..5c291528 100644 --- a/draft/man3/printf.3 +++ b/draft/man3/printf.3 @@ -303,27 +303,20 @@ NaN は文字列の先頭に `nan' をつけて表示するように規定され 関数を初期シフト状態で呼び出してマルチバイト文字列に変換し、 変換されたマルチバイト文字列を出力する。 .TP \fBs\fP -If no \fBl\fP modifier is present: The \fIconst char\ *\fP argument is expected to -be a pointer to an array of character type (pointer to a string). -Characters from the array are written up to (but not including) a -terminating null byte (\(aq\e0\(aq); if a precision is specified, no more -than the number specified are written. If a precision is given, no null -byte need be present; if the precision is not specified, or is greater than -the size of the array, the array must contain a terminating null byte. - -If an \fBl\fP modifier is present: The \fIconst wchar_t\ *\fP argument is expected -to be a pointer to an array of wide characters. Wide characters from the -array are converted to multibyte characters (each by a call to the -\fBwcrtomb\fP(3) function, with a conversion state starting in the initial -state before the first wide character), up to and including a terminating -null wide character. The resulting multibyte characters are written up to -(but not including) the terminating null byte. If a precision is specified, -no more bytes than the number specified are written, but no partial -multibyte characters are written. Note that the precision determines the -number of \fIbytes\fP written, not the number of \fIwide characters\fP or \fIscreen -positions\fP. The array must contain a terminating null wide character, -unless a precision is given and it is so small that the number of bytes -written exceeds it before the end of the array is reached. +\fBl\fP 修飾子がない場合、 引き数は \fIconst char\ *\fP 型で文字型の配列へのポインタ (文字列へのポインタ) であることが +期待されている。配列中の文字は、終端の NULL バイト (\(aq\e0\(aq) が出てくるまで出力される (終端文字は出力されない)。 +精度が指定されていると、指定された字数以上は出力されない。 精度が指定された場合には、終端バイトが存在する必要はない。 +精度が指定されていなかったり、精度の値が配列の大きさより大きい場合には、 配列は終端の NULL バイトを含んでいなければならない。 + +\fBl\fP 修飾子が指定されている場合、 引き数は \fIconst wchar_t\ *\fP 型でワイド文字の配列へのポインタであることが期待されている。 +配列中のワイド文字は (1文字毎に \fBwcrtomb\fP(3) を呼び出して) マルチバイト文字に変換される (最初のワイド文字の変換の前に +\fBwcrtomb\fP() のシフト状態を初期状態に戻してから変換は行われる)。 マルチバイト文字への変換は、文字列を終端する NULL ワイド文字が +出てくるまで行われ、終端 NULL ワイド文字も含めて変換される。 結果のマルチバイト文字列は、終端の NULL バイトが出てくるまで 出力される +(終端の NULL バイトは出力されない)。 精度が指定された場合、指定されたバイト数以上には出力されない。 +但し、マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定するものであり、「ワイド文字」数や +「画面での位置」を指定するものではないことに注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数が +精度の値を超える場合だけは、配列は NULL ワイド文字で終端されていなくてもよい。 それ以外の場合は、必ず配列は NULL +ワイド文字で終端されていなければならない。 .TP \fBC\fP (C99 にはないが SUSv2 にはある) \fBlc\fP と同じ。使ってはならない。 @@ -332,12 +325,10 @@ written exceeds it before the end of the array is reached. (C99 にはないが SUSv2 にはある) \fBls\fP と同じ。使ってはならない。 .TP \fBp\fP -The \fIvoid\ *\fP pointer argument is printed in hexadecimal (as if by \fB%#x\fP -or \fB%#lx\fP). +\fIvoid\ *\fP ポインタ引き数を (\fB%#x\fP や \fB%#lx\fP のような) 16 進数で出力する。 .TP \fBn\fP -The number of characters written so far is stored into the integer indicated -by the \fIint\ *\fP (or variant) pointer argument. No argument is converted. +これまでに出力された文字数を \fIint\ *\fP (または類似の型) のポインタ引き数が指す整数に保存する。 引き数の変換は行われない。 .TP \fBm\fP (glibc での拡張) \fIstrerror(errno)\fP の出力を表示する。引き数は必要ない。 diff --git a/draft/man3/ptsname.3 b/draft/man3/ptsname.3 index da6d7568..1cc77345 100644 --- a/draft/man3/ptsname.3 +++ b/draft/man3/ptsname.3 @@ -51,11 +51,11 @@ NULL で終端された文字列の形で \fIbuf\fP で指定されたバッフ (\fBptsname_r\fP() のみ) \fIbuf\fP が小さすぎる。 .SH バージョン \fBptsname\fP() は、バージョン 2.1 以降の glibc で提供されている。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBptsname\fP() function is not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBptsname\fP() 関数はスレッドセーフではない。 .LP -The \fBptsname_r\fP() function is thread\-safe. +\fBptsname_r\fP() 関数はスレッドセーフである。 .SH 準拠 \fBptsname\fP() は UNIX 98 疑似端末仕様の一部である (\fBpts\fP(4) を参照のこと)。この関数は POSIX.1\-2001 で規定されている。 diff --git a/draft/man3/qecvt.3 b/draft/man3/qecvt.3 index 650bd403..5459a95e 100644 --- a/draft/man3/qecvt.3 +++ b/draft/man3/qecvt.3 @@ -54,8 +54,8 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .SH 説明 関数 \fBqecvt\fP(), \fBqfcvt\fP(), \fBqgcvt\fP() は、それぞれ \fBecvt\fP(3), \fBfcvt\fP(3), \fBgcvt\fP(3) と同じである。 引き数 \fInumber\fP が \fIlong double\fP 型である点だけが異なる。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" The functions \fBqecvt\fP() and \fBqfcvt\fP() are not thread\-safe. .LP 関数 \fBqgcvt\fP() はスレッドセーフである。 diff --git a/draft/man3/re_comp.3 b/draft/man3/re_comp.3 index d1d1ce7e..59b30df5 100644 --- a/draft/man3/re_comp.3 +++ b/draft/man3/re_comp.3 @@ -54,9 +54,9 @@ re_comp, re_exec \- BSD の正規表現関数 それ以外の場合は適切なエラーメッセージへのポインタを返す。 \fBre_exec\fP() は、一致した場合 1 を、失敗した場合 0 を返す。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBre_comp\fP() and \fBre_exec\fP() functions are not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBre_comp\fP() と \fBre_exec\fP() はスレッドセーフではない。 .SH 準拠 4.3BSD. .SH 注意 diff --git a/draft/man3/readdir.3 b/draft/man3/readdir.3 index 54662483..60aa9c59 100644 --- a/draft/man3/readdir.3 +++ b/draft/man3/readdir.3 @@ -80,11 +80,10 @@ struct dirent { .fi .in .PP -The only fields in the \fIdirent\fP structure that are mandated by POSIX.1 are: -\fId_name\fP[], of unspecified size, with at most \fBNAME_MAX\fP characters -preceding the terminating null byte (\(aq\e0\(aq); and (as an XSI extension) -\fId_ino\fP. The other fields are unstandardized, and not present on all -systems; see NOTES below for some further details. +\fIdirent\fP 構造体のフィールドで POSIX.1 で要求されているのは、 \fId_name\fP[] と (XSI 拡張での) \fId_ino\fP +だけである。 \fId_name\fP[] はその大きさも規定されておらず、 このフィールドには最大で \fBNAME_MAX\fP 個の文字と、それに続く終端の +NULL バイト (\(aq\e0\(aq)が格納される。 他のフィールドは非標準であり、全てのシステムに存在するわけではない。 +詳細については、下記の「注意」を参照のこと。 .PP \fBreaddir\fP() によって返されるデータは、それ以降の同じストリームに対する \fBreaddir\fP() の呼び出しによって上書きされる可能性がある。 @@ -105,11 +104,11 @@ systems; see NOTES below for some further details. .TP \fBEBADF\fP ディレクトリストリームディスクリプタ \fIdirp\fP が無効である。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBreaddir\fP() function is not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBreaddir\fP() 関数はスレッドセーフではない。 .LP -The \fBreaddir_r\fP() function is thread\-safe. +\fBreaddir_r\fP() 関数はスレッドセーフである。 .SH 準拠 SVr4, 4.3BSD, POSIX.1\-2001. .SH 注意 diff --git a/draft/man3/rexec.3 b/draft/man3/rexec.3 index 9f88ed59..ae7d98fe 100644 --- a/draft/man3/rexec.3 +++ b/draft/man3/rexec.3 @@ -87,8 +87,8 @@ rexec, rexec_af \- リモートコマンドへのストリームを返す (\fBAF_UNSPEC\fP は実装側がプロトコルを選択することを意味する)。 .SH バージョン \fBrexec_af\fP() 関数は glibc バージョン 2.9 で追加された。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" The \fBrexec\fP() and \fBrexec_af\fP() functions are not thread\-safe. .SH 準拠 これらの関数は POSIX.1\-2001 にはない。\fBrexec\fP() 関数は 4.2BSD で始めて diff --git a/draft/man3/round.3 b/draft/man3/round.3 index 8ddd06b0..4268b037 100644 --- a/draft/man3/round.3 +++ b/draft/man3/round.3 @@ -70,9 +70,9 @@ or \fIcc\ \-std=c99\fP エラーは発生しない。 POSIX.1\-2001 にはオーバーフローでの範囲エラー (range error) の 記載がある。「注意」の節を参照のこと。 .SH バージョン これらの関数は glibc バージョン 2.1 で初めて登場した。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBround\fP(), \fBroundf\fP(), and \fBroundl\fP() functions are thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBround\fP(), \fBroundf\fP(), \fBroundl\fP() はスレッドセーフである。 .SH 準拠 C99, POSIX.1\-2001. .SH 注意 diff --git a/draft/man3/scalbln.3 b/draft/man3/scalbln.3 index 3fe00bd5..eba6eebb 100644 --- a/draft/man3/scalbln.3 +++ b/draft/man3/scalbln.3 @@ -115,10 +115,10 @@ or \fIcc\ \-std=c99\fP これらの関数は \fIerrno\fP を設定しない。 .SH バージョン これらの関数は glibc バージョン 2.1 で初めて登場した。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBscalbn\fP(), \fBscalbnf\fP(), \fBscalbnl\fP(), \fBscalbln\fP(), \fBscalblnf\fP(), -and \fBscalblnl\fP() functions are thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBscalbn\fP(), \fBscalbnf\fP(), \fBscalbnl\fP(), \fBscalbln\fP(), \fBscalblnf\fP(), +\fBscalblnl\fP() はスレッドセーフである。 .SH 準拠 C99, POSIX.1\-2001. .SH 注意 diff --git a/draft/man3/scandir.3 b/draft/man3/scandir.3 index dbec3240..a7cc0470 100644 --- a/draft/man3/scandir.3 +++ b/draft/man3/scandir.3 @@ -73,9 +73,8 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 \fBalphasort\fP() は \fBstrcoll\fP(3) を用いてディレクトリエントリをソートし、 \fBversionsort\fP() は文字列 \fI(*a)\->d_name\fP と \fI(*b)\->d_name\fP に対して \fBstrverscmp\fP(3) を用いる。 .SH 返り値 -The \fBscandir\fP() function returns the number of directory entries -selected. On error, \-1 is returned, with \fIerrno\fP set to indicate the cause -of the error. +\fBscandir\fP() 関数は、選択されたディレクトリのエントリ数を返す。 エラーの場合、 \-1 を返し、 \fIerrno\fP +にエラーの原因を示す値を設定する。 .PP 関数 \fBalphasort\fP() と \fBversionsort\fP() は 1 番目の引き数が 2 番目の引き数に対して、 [小さい/等しい/大きい] かに応じて、0 より [小さい/等しい/大きい] 値を返す。 diff --git a/draft/man3/scanf.3 b/draft/man3/scanf.3 index 47bc7e4a..44e17c40 100644 --- a/draft/man3/scanf.3 +++ b/draft/man3/scanf.3 @@ -128,14 +128,11 @@ failure)\fP と \fI「一致の失敗」 (matching failure)\fP のいずれか \fIpointer\fP 引き数は必要なく、 \fBscanf\fP() が返す代入が成功した数にこの指定は含まれない。 .TP \(bu -An optional \(aqm\(aq character. This is used with string conversions -(\fI%s\fP, \fI%c\fP, \fI%[\fP), and relieves the caller of the need to allocate a -corresponding buffer to hold the input: instead, \fBscanf\fP() allocates a -buffer of sufficient size, and assigns the address of this buffer to the -corresponding \fIpointer\fP argument, which should be a pointer to a \fIchar\ *\fP -variable (this variable does not need to be initialized before the call). -The caller should subsequently \fBfree\fP(3) this buffer when it is no longer -required. +文字 \(aqm\(aq (省略可能)。これは文字列変換 (\fI%s\fP, \fI%c\fP, \fI%[\fP) とともに使用され、これを使うと +呼び出し元が入力を保持する対応するバッファを確保する必要がなくなる。 代わりに \fBscanf\fP() +が必要な大きさのバッファを確保し、このバッファのアドレスを 対応する \fIpointer\fP 引き数に代入する。 \fIpointer\fP 引き数は +\fIchar\ *\fP 型の変数へのポインタでなければならない (変数自体は呼び出し前に初期化されている必要はない)。 +呼び出し元は、不要になった時点で、このバッファを \fBfree\fP(3) すべきである。 .TP \(bu \fI「最大フィールド幅」\fP を指定する 10進数 (省略可能)。 この最大値に達するか、一致しない文字が見つかるか、のどちらかに diff --git a/draft/man3/setlogmask.3 b/draft/man3/setlogmask.3 index d7293f83..1e8691f8 100644 --- a/draft/man3/setlogmask.3 +++ b/draft/man3/setlogmask.3 @@ -45,11 +45,10 @@ setlogmask \- ログの優先度マスクを設定する \fBsetlogmask\fP() 関数は、呼び出し元のプロセスに対するログマスクを設定し、 変更前のマスクを返す。 \fImask\fP 引き数が 0 ならば、現在のログマスクは変更されない。 .LP -The eight priorities are \fBLOG_EMERG\fP, \fBLOG_ALERT\fP, \fBLOG_CRIT\fP, -\fBLOG_ERR\fP, \fBLOG_WARNING\fP, \fBLOG_NOTICE\fP, \fBLOG_INFO\fP, and \fBLOG_DEBUG\fP. -The bit corresponding to a priority \fIp\fP is \fILOG_MASK(p)\fP. Some systems -also provide a macro \fILOG_UPTO(p)\fP for the mask of all priorities in the -above list up to and including \fIp\fP. +以下の8レベルの優先度が定義されている(優先度の高い順): \fBLOG_EMERG\fP, \fBLOG_ALERT\fP, \fBLOG_CRIT\fP, +\fBLOG_ERR\fP, \fBLOG_WARNING\fP, \fBLOG_NOTICE\fP, \fBLOG_INFO\fP, \fBLOG_DEBUG\fP。 優先度 +\fIp\fP に対応するビット列は \fILOG_MASK(p)\fP によって求められる。 優先度 \fIp\fP 以上のすべての優先度 (\fIp\fP を含む) +のマスクビットを 求めることができるマクロ \fILOG_UPTO(p)\fP を使用できるシステムもある。 .SH 返り値 変更前のログ優先度マスクの値を返す。 .SH エラー diff --git a/draft/man3/shm_open.3 b/draft/man3/shm_open.3 index 8833aafe..8352d4dd 100644 --- a/draft/man3/shm_open.3 +++ b/draft/man3/shm_open.3 @@ -65,8 +65,8 @@ POSIX 共有メモリ・オブジェクトは、実際には、関係のない を指定する。 .TP 1.1i \fBO_RDONLY\fP -Open the object for read access. A shared memory object opened in this way -can be \fBmmap\fP(2)ed only for read (\fBPROT_READ\fP) access. +読み出しアクセス用にオブジェクトをオープンする。 このフラグを指定してオープンされた共有メモリ・オブジェクトは、 読み出し (\fBPROT_READ\fP) +アクセスでのみ \fBmmap\fP(2) することができる。 .TP \fBO_RDWR\fP 読み書きアクセス用にオブジェクトをオープンする。 diff --git a/draft/man3/siginterrupt.3 b/draft/man3/siginterrupt.3 index 92fecb67..9d3da006 100644 --- a/draft/man3/siginterrupt.3 +++ b/draft/man3/siginterrupt.3 @@ -65,9 +65,8 @@ _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTEND .PP \fIflag\fP 引き数が真 (1) でデータの転送が開始されていれば、 システム・コールは中断され、それまでに実際に転送されたデータ の量が返される。 .SH 返り値 -The \fBsiginterrupt\fP() function returns 0 on success. It returns \-1 if the -signal number \fIsig\fP is invalid, with \fIerrno\fP set to indicate the cause of -the error. +\fBsiginterrupt\fP() 関数は成功した場合 0 を返す。 シグナル番号 \fIsig\fP が不正な場合、 \-1 を返し、 \fIerrno\fP +にエラーの原因を示す値を設定する。 .SH エラー .TP \fBEINVAL\fP diff --git a/draft/man3/signbit.3 b/draft/man3/signbit.3 index 276472ae..611cb792 100644 --- a/draft/man3/signbit.3 +++ b/draft/man3/signbit.3 @@ -47,9 +47,9 @@ NaN と無限大には符号ビットがある。 \fBsignbit\fP() マクロは \fIx\fP の符号が負の場合 0 以外を返し、そうでない場合 0 を返す。 .SH エラー エラーは発生しない。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBsignbit\fP() macro is thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBsignbit\fP() マクロはスレッドセーフである。 .SH 準拠 C99, POSIX.1\-2001. この関数は IEC 559 で定義されている (また IEEE 754/IEEE 854 では付録で推奨関数として定義されている)。 diff --git a/draft/man3/sigpause.3 b/draft/man3/sigpause.3 index 127b7b4f..19487cac 100644 --- a/draft/man3/sigpause.3 +++ b/draft/man3/sigpause.3 @@ -51,13 +51,10 @@ System V 版の \fBsigpause\fP() は POSIX.1\-2001 で標準化されている .SH 注意 .SS 歴史 .\" __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG -The classical BSD version of this function appeared in 4.2BSD. It sets the -process's signal mask to \fIsigmask\fP. UNIX 95 standardized the incompatible -System V version of this function, which removes only the specified signal -\fIsig\fP from the process's signal mask. The unfortunate situation with two -incompatible functions with the same name was solved by the -\fB\%sigsuspend\fP(2) function, that takes a \fIsigset_t\ *\fP argument (instead -of an \fIint\fP). +この関数の古典的な BSD 版は 4.2BSD で登場した。 この関数はプロセスのシグナルマスクを \fIsigmask\fP に設定する。 UNIX 95 +では BSD 版と互換性のない System V 版のこの関数が標準化された。 UNIX 95 版は、指定されたシグナル \fIsig\fP +をプロセスのシグナルマスクから削除するだけである。 同じ名前で互換性のない 2 つの関数があるという不幸な事態は、 \fB\%sigsuspend\fP(2) +関数によって解消された。 この関数は (\fIint\fP の代わりに) \fBsigset_t\ *\fP 引き数をとる。 .SS "Linux での注意" Linux では、このルーチンは Sparc (sparc64) アーキテクチャでのみ システムコールとなっている。 diff --git a/draft/man3/sigsetops.3 b/draft/man3/sigsetops.3 index 9d8f64c7..0ee53cc5 100644 --- a/draft/man3/sigsetops.3 +++ b/draft/man3/sigsetops.3 @@ -80,9 +80,8 @@ _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE \fBsigemptyset\fP(), \fBsigfillset\fP(), \fBsigaddset\fP(), \fBsigdelset\fP() は成功すれば 0 を、エラーの場合は \-1 を返す。 .PP -\fBsigismember\fP() returns 1 if \fIsignum\fP is a member of \fIset\fP, 0 if -\fIsignum\fP is not a member, and \-1 on error. On error, these functions set -\fIerrno\fP to indicate the cause. +\fBsigismember\fP() は \fIsignum\fP が \fIset\fP のメンバの場合 1 を返し、メンバでない場合 0 を返す。 エラーの場合は +\-1 を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。 .SH エラー .TP \fBEINVAL\fP diff --git a/draft/man3/stdio_ext.3 b/draft/man3/stdio_ext.3 index fc494889..f995da30 100644 --- a/draft/man3/stdio_ext.3 +++ b/draft/man3/stdio_ext.3 @@ -95,8 +95,8 @@ Solaris では、 \fIFILE\fP 構造体の内部へポータブルなかたちで (当然ながら、端末への出力が強制的に行われることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がいいだろう) .LP \fB__fpurge\fP() 関数は、ストリームのバッファの内容を廃棄する。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" The \fB__fbufsize\fP(), \fB__fpending\fP(), \fB__fpurge\fP() and \fB__fsetlocking\fP() functions do not lock the stream, so they are not thread\-safe. .LP diff --git a/draft/man3/strcmp.3 b/draft/man3/strcmp.3 index 44fdebb2..4bc504f5 100644 --- a/draft/man3/strcmp.3 +++ b/draft/man3/strcmp.3 @@ -49,8 +49,8 @@ strcmp, strncmp \- 二つの文字列を比べる \fBstrcmp\fP() 関数は二つの文字列 \fIs1\fP と \fIs2\fP を較べる。 この関数は、 \fIs1\fP が \fIs2\fP に較べて 1)小さい、2)等しい、3)大きい場合に、 ゼロよりも 1)小さい、2)等しい、3)大きい整数を返す。 .PP -The \fBstrncmp\fP() function is similar, except it compares the only first (at -most) \fIn\fP bytes of \fIs1\fP and \fIs2\fP. +\fBstrncmp\fP() 関数は、\fIs1\fP と \fIs2\fP の最初の \fIn\fP バイトだけを比較する +ことを除けば、strcmp()と同様である。 .SH 返り値 \fBstrcmp\fP() 関数と \fBstrncmp\fP() 関数は整数を返す。 この整数は、ゼロよりも、1)小さい、2)等しい、3)大きいのいずれかである。 それぞれは、\fIs1\fP(または、この文字列の最初の \fIn\fP バイト)が diff --git a/draft/man3/strcoll.3 b/draft/man3/strcoll.3 index 374a83dd..4d9ab5e4 100644 --- a/draft/man3/strcoll.3 +++ b/draft/man3/strcoll.3 @@ -51,8 +51,7 @@ strcoll \- 現在のロケールを使用して二つの文字列を比較する .SH 準拠 SVr4, 4.3BSD, C89, C99. .SH 注意 -In the \fIPOSIX\fP or \fI\&\& C"\fP locales \fBstrcoll\fP() is equivalent to -\fBstrcmp\fP(3). +\fIPOSIX\fP および \fI\&\& C"\fP ロケールにおいては、 \fBstrcoll\fP() は \fBstrcmp\fP(3) と等価である。 .SH 関連項目 \fBbcmp\fP(3), \fBmemcmp\fP(3), \fBsetlocale\fP(3), \fBstrcasecmp\fP(3), \fBstrcmp\fP(3), \fBstring\fP(3), \fBstrxfrm\fP(3) diff --git a/draft/man3/strdup.3 b/draft/man3/strdup.3 index c65cfecd..768935e0 100644 --- a/draft/man3/strdup.3 +++ b/draft/man3/strdup.3 @@ -88,9 +88,8 @@ _GNU_SOURCE これらが使用できるのは GNU GCC ツール群を使う場合だけであり、 \fBalloca\fP(3) で説明されているのと同じ制限がある。 .SH 返り値 -On success, the \fBstrdup\fP() function returns a pointer to the duplicated -string. It returns NULL if insufficient memory was available, with \fIerrno\fP -set to indicate the cause of the error. +成功すると、 \fBstrdup\fP() 関数は複製された文字列へのポインタを返す。 十分なメモリが確保できなかった場合には、 NULL を返し、 +\fIerrno\fP にエラーの原因を示す値を設定する。 .SH エラー .TP \fBENOMEM\fP diff --git a/draft/man3/strerror.3 b/draft/man3/strerror.3 index 61d6b93c..c80e924a 100644 --- a/draft/man3/strerror.3 +++ b/draft/man3/strerror.3 @@ -88,13 +88,10 @@ XSI 準拠のバージョンの \fBstrerror_r\fP() がデフォルトで提供 移植性が必要なアプリケーションでは、 XSI 準拠の \fBstrerror_r\fP() を使う方がよい。 この関数は、ユーザーから提供される長さ \fIbuflen\fP のバッファ \fIbuf\fP にエラー文字列を返す。 -The GNU\-specific \fBstrerror_r\fP() returns a pointer to a string containing -the error message. This may be either a pointer to a string that the -function stores in \fIbuf\fP, or a pointer to some (immutable) static string -(in which case \fIbuf\fP is unused). If the function stores a string in -\fIbuf\fP, then at most \fIbuflen\fP bytes are stored (the string may be truncated -if \fIbuflen\fP is too small and \fIerrnum\fP is unknown). The string always -includes a terminating null byte (\(aq\e0\(aq). +GNU 仕様の \fBstrerror_r\fP() は、 エラーメッセージを格納した文字列へのポインタを返す。 返り値は、 この関数が \fIbuf\fP +に格納した文字列へのポインタか、 何らかの (不変な) 静的な文字列へのポインタ、 のいずれかとなる (後者の場合は \fIbuf\fP は使用されない)。 +\fIbuf\fP に文字列が格納される場合は、 最大で \fIbuflen\fP バイトが格納される (\fIbuflen\fP +が小さ過ぎたときには文字列は切り詰められ、 \fIerrnum\fP は不定である)。 文字列には必ず終端ヌル文字 (\(aq\e0\(aq) が含まれる。 .SH 返り値 \fBstrerror\fP() と \fBstrerror_r\fP() はエラー内容を説明する 文字列を返す。エラー番号が未知の場合は "Unknown error nnn" という メッセージを返す。 @@ -115,11 +112,11 @@ XSI 準拠の \fBstrerror_r\fP() 関数は成功すると 0 を返す。エラ .TP \fBERANGE\fP エラーコードを説明する文字列のために、充分な領域が確保できなかった。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBstrerror\fP() function is not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBstrerror\fP() 関数はスレッドセーフではない。 .LP -The \fBstrerror_r\fP() function is thread\-safe. +\fBstrerror_r\fP() 関数はスレッドセーフである。 .SH 準拠 \fBstrerror\fP() は POSIX.1\-2001, C89, C99 で規定されている。 \fBstrerror_r\fP() は POSIX.1\-2001 で規定されている。 diff --git a/draft/man3/strftime.3 b/draft/man3/strftime.3 index 45ef6219..199663f0 100644 --- a/draft/man3/strftime.3 +++ b/draft/man3/strftime.3 @@ -146,8 +146,7 @@ ISO\ 8601 週単位表記の年 (week\-based year; 「注意」の節を参照) 午前・午後形式での時刻。 POSIX ロケールでは \fB%I:%M:%S %p\fP と等価である。(SU) .TP \fB%R\fP -The time in 24\-hour notation (\fB%H:%M\fP). (SU) For a version including the -seconds, see \fB%T\fP below. +24 時間表記での時刻、秒は表示しない (\fB%H:%M\fP)。 秒を含んだものは以下の \fB%T\fP を参照すること。(SU) .TP \fB%s\fP 紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。 (TZ) @@ -159,7 +158,7 @@ seconds, see \fB%T\fP below. タブ文字 (SU) .TP \fB%T\fP -The time in 24\-hour notation (\fB%H:%M:%S\fP). (SU) +24 時間表記の時間 (\fB%H:%M:%S\fP) (SU) .TP \fB%u\fP 週の何番目の日 (10 進数表記) か。月曜日を 1 とする (1\-7)。 \fB%w\fP も参照。(SU) @@ -194,7 +193,7 @@ ISO\ 8601 形式での年の始めからの週番号 (「注意」の節を参 \fI+hhmm\fP や \fI\-hhmm\fP の形式のタイムゾーン (UTC へのオフセット時間)。(SU) .TP \fB%Z\fP -The timezone name or abbreviation. +タイムゾーン名または省略名。 .TP \fB%+\fP .\" Nov 05 -- Not in Linux/glibc, but is in some BSDs (according to @@ -223,9 +222,8 @@ array are undefined. (This behavior applies since at least libc 4.4.4; very old versions of libc, such as libc 4.4.1, would return \fImax\fP if the array was too small.) .LP -Note that the return value 0 does not necessarily indicate an error. For -example, in many locales \fB%p\fP yields an empty string. An empty \fIformat\fP -string will likewise yield an empty string. +返り値 0 は必ずしもエラーを意味している訳ではないので注意すること。 例えば、多くのロケールでは \fB%p\fP は空文字列を返す。 同様に、空の +\fIformat\fP 文字列は空文字列を返す。 .SH 環境変数 環境変数 \fBTZ\fP と \fBLC_TIME\fP が使用される。 (訳注: \fBLC_ALL\fP が設定されている場合には \fBLC_TIME\fP よりもそちらが優先される。 \fBLC_TIME\fP も \fBLC_ALL\fP も設定されていない場合には \fBLANG\fP が使用される。) diff --git a/draft/man3/strnlen.3 b/draft/man3/strnlen.3 index 2a48d5d2..f48dd21c 100644 --- a/draft/man3/strnlen.3 +++ b/draft/man3/strnlen.3 @@ -43,10 +43,10 @@ _GNU_SOURCE .ad .PD .SH 説明 -The \fBstrnlen\fP() function returns the number of bytes in the string pointed -to by \fIs\fP, excluding the terminating null byte (\(aq\e0\(aq), but at most -\fImaxlen\fP. In doing this, \fBstrnlen\fP() looks only at the first \fImaxlen\fP -bytes at \fIs\fP and never beyond \fIs+maxlen\fP. +\fBstrnlen\fP() 関数は \fIs\fP が指す文字列の長さをバイト数で返す。 長さには +終端の NULL バイト (\(aq\e0\(aq) は含まない。 また長さは最大で +\fImaxlen\fP までであり、 \fBstrnlen\fP() は \fIs\fP の最初の \fImaxlen\fP バイト +のみを検査し \fIs+maxlen\fP より先を検査することはない。 .SH 返り値 \fBstrnlen\fP() 関数は \fImaxlen\fP 以下ならば \fIstrlen(s)\fP と同じ値を返す。 \fIs\fP の指す文字列が最大 \fImaxlen\fP バイトまでに NULL バイト diff --git a/draft/man3/strtok.3 b/draft/man3/strtok.3 index 2e615549..37d7f3e1 100644 --- a/draft/man3/strtok.3 +++ b/draft/man3/strtok.3 @@ -55,10 +55,9 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 _XOPEN_SOURCE || _POSIX_SOURCE .ad b .SH 説明 -The \fBstrtok\fP() function breaks a string into a sequence of zero or more -nonempty tokens. On the first call to \fBstrtok\fP() the string to be parsed -should be specified in \fIstr\fP. In each subsequent call that should parse -the same string, \fIstr\fP must be NULL. +\fBstrtok\fP() 関数は文字列を 0 個以上の空でないトークンの列に分割する。 \fBstrtok\fP() +を最初に呼び出す際には、解析対象の文字列を \fIstr\fP に 指定する。同じ文字列の解析を行うその後の呼び出しでは、 \fIstr\fP は NULL +にしなければならない。 \fIdelim\fP 引き数には、解析対象の文字列をトークンに区切るのに使用する バイト集合を指定する。同じ文字列を解析する一連の呼び出しにおいて、 @@ -94,10 +93,9 @@ nonempty strings. Thus, for example, given the string "\fIaaa;;bbb,\fP", successive calls to \fBstrtok\fP() that specify the delimiter string "\fI;,\fP" would return the strings "\fIaaa\fP" and "\fIbbb\fP", and then a NULL pointer. -The \fBstrtok_r\fP() function is a reentrant version \fBstrtok\fP(). The -\fIsaveptr\fP argument is a pointer to a \fIchar\ *\fP variable that is used -internally by \fBstrtok_r\fP() in order to maintain context between successive -calls that parse the same string. +\fBstrtok_r\fP() 関数は \fBstrtok\fP() のリエントラント版である。 \fIsaveptr\fP 引き数は \fIchar\ *\fP +変数へのポインタであり、 同じ文字列の解析を行う \fBstrtok_r\fP() の呼び出し間で処理状況を保存するために \fBstrtok_r\fP() +内部で使用される。 \fBstrtok_r\fP() を最初に呼び出す際には、 \fIstr\fP は解析対象の文字列を指していなければならず、 \fIsaveptr\fP の値は無視される。それ以降の呼び出しでは、 \fIstr\fP は NULL とし、 \fIsaveptr\fP @@ -106,11 +104,11 @@ calls that parse the same string. \fBstrtok_r\fP() の呼び出し時に異なる \fIsaveptr\fP 引き数を指定することで、 異なる文字列の解析を同時に行うことができる。 .SH 返り値 \fBstrtok\fP() と \fBstrtok_r\fP() は次のトークンへのポインタか、 トークンがなければ NULL を返す。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBstrtok\fP() function is not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +The \fBstrtok\fP() 関数はスレッドセーフではない。 .LP -The \fBstrtok_r\fP() function is thread\-safe. +\fBstrtok_r\fP() 関数はスレッドセーフである。 .SH 準拠 .TP \fBstrtok\fP() diff --git a/draft/man3/strxfrm.3 b/draft/man3/strxfrm.3 index f1e6852c..483ac31a 100644 --- a/draft/man3/strxfrm.3 +++ b/draft/man3/strxfrm.3 @@ -55,8 +55,8 @@ strxfrm \- 文字列の変換 .SH 準拠 SVr4, 4.3BSD, C89, C99. .SH 注意 -In the \fIPOSIX\fP or \fIC\fP locales \fBstrxfrm\fP() is equivalent to copying the -string with \fBstrncpy\fP(3). +\fIPOSIX\fP または \fIC\fP ロケールでは、関数 \fBstrxfrm\fP() は、 関数 \fBstrncpy\fP(3) +を使って文字列をコピーするのと同じである。 .SH 関連項目 \fBbcmp\fP(3), \fBmemcmp\fP(3), \fBsetlocale\fP(3), \fBstrcasecmp\fP(3), \fBstrcmp\fP(3), \fBstrcoll\fP(3), \fBstring\fP(3) diff --git a/draft/man3/sysconf.3 b/draft/man3/sysconf.3 index 6b60098f..ab068872 100644 --- a/draft/man3/sysconf.3 +++ b/draft/man3/sysconf.3 @@ -94,13 +94,11 @@ POSIX では、アプリケーションがコンパイル時や実行時に、 \fBexec\fP(3) 関数群の引き数の最大長。 \fB_POSIX_ARG_MAX\fP (4096) 未満であってはならない。 .TP \fBCHILD_MAX\fP \- \fB_SC_CHILD_MAX\fP -The maximum number of simultaneous processes per user ID. Must not be less -than \fB_POSIX_CHILD_MAX\fP (25). +ユーザID あたりの同時に存在できるプロセスの最大数。 \fB_POSIX_CHILD_MAX\fP (25) 未満であってはならない。 .TP \fBHOST_NAME_MAX\fP \- \fB_SC_HOST_NAME_MAX\fP -Maximum length of a hostname, not including the terminating null byte, as -returned by \fBgethostname\fP(2). Must not be less than -\fB_POSIX_HOST_NAME_MAX\fP (255). +\fBgethostname\fP(2) で返されるホスト名の最大長。末尾の NULL バイトは長さに含まれない。 +\fB_POSIX_HOST_NAME_MAX\fP (255) 未満であってはならない。 .TP \fBLOGIN_NAME_MAX\fP \- \fB_SC_LOGIN_NAME_MAX\fP ログイン名の長さの最大値。末尾の NULL バイトも長さに含まれる。 \fB_POSIX_LOGIN_NAME_MAX\fP (9) 未満であってはならない。 diff --git a/draft/man3/tempnam.3 b/draft/man3/tempnam.3 index d9544948..6e5687e2 100644 --- a/draft/man3/tempnam.3 +++ b/draft/man3/tempnam.3 @@ -64,9 +64,8 @@ d) .PP \fBtempnam\fP() が返す文字列は \fBmalloc\fP(3) を使って確保される。そのため、 \fBfree\fP(3) で解放すべきである。 .SH 返り値 -On succes, the \fBtempnam\fP() function returns a pointer to a unique -temporary filename. It returns NULL if a unique name cannot be generated, -with \fIerrno\fP set to indicate the cause of the error. +成功すると \fBtempnam\fP() 関数は、一意なテンポラリファイル名へのポインタを返す。 一意な名前が生成できなければ NULL を返し、 +\fIerrno\fP にエラーの原因を示す値を設定する。 .SH エラー .TP \fBENOMEM\fP diff --git a/draft/man3/tmpnam.3 b/draft/man3/tmpnam.3 index 9a4e95a7..9515d0ee 100644 --- a/draft/man3/tmpnam.3 +++ b/draft/man3/tmpnam.3 @@ -51,8 +51,8 @@ tmpnam, tmpnam_r \- 一時ファイルの名前を作成する \fBtmpnam\fP() 関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名が作成できなかった場合は NULL を返す。 .SH エラー エラーは定義されていない。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" The \fBtmpnam\fP() function is thread\-safe with exceptions. It is not thread\-safe if called with a NULL parameter. .LP diff --git a/draft/man3/trunc.3 b/draft/man3/trunc.3 index 5cc1504b..5fcffa5d 100644 --- a/draft/man3/trunc.3 +++ b/draft/man3/trunc.3 @@ -65,9 +65,9 @@ or \fIcc\ \-std=c99\fP エラーは発生しない。 .SH バージョン これらの関数は glibc バージョン 2.1 で初めて登場した。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBtrunc\fP(), \fBtruncf\fP(), and \fBtruncl\fP() functions are thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +関数 \fBtrunc\fP(), \fBtruncf\fP(), \fBtruncl\fP() はスレッドセーフである。 .SH 準拠 C99, POSIX.1\-2001. .SH 注意 diff --git a/draft/man3/ttyname.3 b/draft/man3/ttyname.3 index dc965453..4836f265 100644 --- a/draft/man3/ttyname.3 +++ b/draft/man3/ttyname.3 @@ -58,11 +58,11 @@ ttyname, ttyname_r \- 端末名を返す .TP \fBERANGE\fP (\fBttyname_r\fP()) \fIbuflen\fP がパス名を格納するには短すぎる。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBttyname\fP() function is not thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBttyname\fP() 関数はスレッドセーフではない。 .LP -The \fBttyname_r\fP() function is thread\-safe. +\fBttyname_r\fP() 関数はスレッドセーフである。 .SH 準拠 4.2BSD, POSIX.1\-2001. .SH 関連項目 diff --git a/draft/man3/ttyslot.3 b/draft/man3/ttyslot.3 index e620196c..19c05ae4 100644 --- a/draft/man3/ttyslot.3 +++ b/draft/man3/ttyslot.3 @@ -82,10 +82,9 @@ UNIX V7 ではフォーマットが変更された: 2 文字目が \fBgetty\fP(8 成功した場合、この関数はスロット番号を返す。 エラーの場合 (例えば、ファイルディスクリプタ 0, 1, 2 の何れも データベースにある端末に関連づけられていない場合)、 UNIX V6, V7, BSD 系のシステムは 0 を返すが、 System V 系のシステムは \-1 を返す。 -.SH ATTRIBUTES -.SS "Multithreading (see pthreads(7))" -The \fBttyslot\fP() calls thread\-unsafe function \fBgetttyent\fP(), so it is not -thread\-safe. +.SH 属性 +.SS "マルチスレッディング (pthreads(7) 参照)" +\fBttyslot\fP() はスレッドセーフではない関数 \fBgetttyent\fP() を呼び出す。そのため、スレッドセーフではない。 .SH 準拠 SUSv1。SUSv2 では「過去の名残 (LEGACY)」と位置付けられている。 POSIX.1\-2001 で削除された。 SUSv2 ではエラー時に \-1 を返すことが要求されている。 diff --git a/draft/man3/usleep.3 b/draft/man3/usleep.3 index 30817163..6e2cbb71 100644 --- a/draft/man3/usleep.3 +++ b/draft/man3/usleep.3 @@ -70,8 +70,7 @@ glibc 2.12 より前: _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ && \fBusleep\fP() 関数は (少なくとも) \fIusec\fPマイクロ秒の間、 呼び出し元スレッドの実行を延期する。 システムの動作状況や呼び出しによる時間の消費やシステムタイマの粒度によって、 停止時間は設定した値よりも少し延ばされるかもしれない。 .SH 返り値 -The \fBusleep\fP() function returns 0 on success. On error, \-1 is returned, -with \fIerrno\fP set to indicate the cause of the error. +\fBusleep\fP() 関数は成功すると 0 を返す。 エラーの場合、 \-1 が返され、 \fIerrno\fP にエラーの原因を示す値が設定される。 .SH エラー .TP \fBEINTR\fP diff --git a/draft/man3/wcpncpy.3 b/draft/man3/wcpncpy.3 index bda83831..91b552b2 100644 --- a/draft/man3/wcpncpy.3 +++ b/draft/man3/wcpncpy.3 @@ -55,8 +55,7 @@ _GNU_SOURCE .PP プログラマは、少なくとも \fIn\fP 個のワイド文字が入る領域を \fIdest\fP に確保しなければならない。 .SH 返り値 -\fBwcpncpy\fP() returns a pointer to the last wide character written, that is, -\fIdest\fP+\fIn\fP\-\fI1"\fP. +\fBwcpncpy\fP() は、最後に書き込まれたワイド文字へのポインタ、 すなわち \fIdest\fP+\fIn\fP\-1 を返す。 .SH 準拠 POSIX.1\-2008. .SH 関連項目 diff --git a/draft/man3/wcsdup.3 b/draft/man3/wcsdup.3 index 0d4306cc..08a6a134 100644 --- a/draft/man3/wcsdup.3 +++ b/draft/man3/wcsdup.3 @@ -51,9 +51,8 @@ _GNU_SOURCE 新しいワイド文字文字列のためのメモリは \fBmalloc\fP(3) を使って割り当てられる。 この領域は \fBfree\fP(3) を使って解放すべきである。 .SH 返り値 -On success, \fBwcsdup\fP() returns a pointer to the new wide\-character -string. On error, it returns \-1, with \fIerrno\fP set to indicate the cause of -the error. +成功すると、 \fBwcsdup\fP() 関数は、新しいワイド文字文字列へのポインタを返す。 エラーの場合、 \-1 が返り、 \fIerrno\fP +にエラーの原因を示す値が設定される。 .SH エラー .TP \fBENOMEM\fP diff --git a/draft/man3/wcsncmp.3 b/draft/man3/wcsncmp.3 index 10f3fc97..d69419e7 100644 --- a/draft/man3/wcsncmp.3 +++ b/draft/man3/wcsncmp.3 @@ -32,13 +32,10 @@ wcsncmp \- 2 つの固定長ワイド文字文字列を比較する が指すワイド文字文字列と \fIs2\fP が指すワイド文 字文字列を比較するが、最大でも先頭のワイド文字 \fIn\fP 個までしか比較 しない。またいずれかの文字列に NULL ワイド文字 (L\(aq\e0\(aq) が現れたら、 比較はその位置で終了する。 .SH 返り値 -The \fBwcsncmp\fP() function returns zero if the wide\-character strings at -\fIs1\fP and \fIs2\fP, truncated to at most length \fIn\fP, are equal. It returns an -integer greater than zero if at the first differing position \fIi\fP (\fIi\fP -< \fIn\fP), the corresponding wide\-character \fIs1[i]\fP is greater than -\fIs2[i]\fP. It returns an integer less than zero if at the first differing -position \fIi\fP (i < \fIn\fP), the corresponding wide\-character \fIs1[i]\fP is -less than \fIs2[i]\fP. +\fBwcsncmp\fP() 関数は、\fIs1\fP と \fIs2\fP がそれぞれ指す文字列を \fIn\fP 文字に収まるように切り詰めたものが等しければ 0 +を返す。 この関数は、異なる文字が最初に現われた位置 \fIi\fP (\fIi\fP < \fIn\fP) において、その位置にある文字 \fIs1[i]\fP が +\fIs2[i]\fP より大きければ 正の値を返す。異なる文字が最初に現われた位置 \fIi\fP (\fIi\fP < \fIn\fP) +において、その位置にある文字 \fIs1[i]\fP が \fIs2[i]\fP より小さければ 負の値を返す。 .SH 準拠 C99. .SH 関連項目 diff --git a/draft/man3/wcsnrtombs.3 b/draft/man3/wcsnrtombs.3 index ab817832..9de16ff4 100644 --- a/draft/man3/wcsnrtombs.3 +++ b/draft/man3/wcsnrtombs.3 @@ -55,21 +55,17 @@ _GNU_SOURCE \fIdest\fP を書き込んだバイト数だけ増やし、\fI*src\fP を 1 増やす。 そして、wcrtomb が成功を返す限りこれを繰り返す。 変換が止まる理由は 3 つ考えられる: .IP 1. 3 -A wide character has been encountered that can not be represented as a -multibyte sequence (according to the current locale). In this case \fI*src\fP -is left pointing to the invalid wide character, \fI(size_t)\ \-1\fP is returned, -and \fIerrno\fP is set to \fBEILSEQ\fP. +(現在のロケールに基づいて)マルチバイト列で表現できないワイド文字に 出会った場合。この場合は、\fI*src\fP は不正なワイド文字を指した状態になり、 +\fI(size_t)\ \-1\fP が返され、\fIerrno\fP に \fBEILSEQ\fP が設定される。 .IP 2. -\fInwc\fP wide characters have been converted without encountering a null wide -character (L\(aq\e0\(aq), or the length limit forces a stop. In this case -\fI*src\fP is left pointing to the next wide character to be converted, and the -number of bytes written to \fIdest\fP is returned. +NULL ワイド文字 (L\(aq\e0\(aq) に出会わないで \fInwc\fP 個のワイド文字を +変換した場合か、長さの制限によって変換が止められた場合。 この場合には、\fI*src\fP は次に変換されるべきワイド文字を指した状態になり、 +\fIdest\fP に書き込まれたバイト数が返される。 .IP 3. -The wide\-character string has been completely converted, including the -terminating null wide character (which has the side effect of bringing back -\fI*ps\fP to the initial state). In this case \fI*src\fP is set to NULL, and the -number of bytes written to \fIdest\fP, excluding the terminating null byte -(\(aq\e0\(aq), is returned. +ワイド文字列が終端の L\(aq\e0\(aq (これには \fI*ps\fP を初期状態に戻すという副作用がある) +も含めて全て変換された場合。この場合には \fI*src\fP に NULL が設定され、 +\fIdest\fP に書き込まれたバイト数が返される +(終端の NULL バイト (\(aq\e0\(aq) は数えない)。 .PP \fIdest\fP が NULL ならば \fIlen\fP は無視されて前述のように変換が行わ れるが、変換されたバイトデータはメモリに書き出されない点と、出力先の長 さの制限がない点が異なる。 diff --git a/draft/man3/wctrans.3 b/draft/man3/wctrans.3 index 23dc85e8..f57ef5ef 100644 --- a/draft/man3/wctrans.3 +++ b/draft/man3/wctrans.3 @@ -39,8 +39,7 @@ wctrans \- ワイド文字変換マッピング "toupper" \- \fBtoupper\fP(3) のマッピングを実現する .fi .SH 返り値 -The \fBwctrans\fP() function returns a mapping descriptor if the \fIname\fP is -valid. Otherwise it returns \fI(wctrans_t)\ 0\fP. +\fBwctrans\fP() 関数は、\fIname\fP が有効ならばマッピング記述子を返す。 有効でなければ \fI(wctrans_t)\ 0\fP を返す。 .SH 準拠 C99. .SH 注意 diff --git a/draft/man3/wordexp.3 b/draft/man3/wordexp.3 index 1e57e3b8..08626fd0 100644 --- a/draft/man3/wordexp.3 +++ b/draft/man3/wordexp.3 @@ -42,15 +42,12 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .sp \fBwordexp\fP(), \fBwordfree\fP(): _XOPEN_SOURCE .SH 説明 -The function \fBwordexp\fP() performs a shell\-like expansion of the string -\fIs\fP and returns the result in the structure pointed to by \fIp\fP. The data -type \fIwordexp_t\fP is a structure that at least has the fields \fIwe_wordc\fP, -\fIwe_wordv\fP, and \fIwe_offs\fP. The field \fIwe_wordc\fP is a \fIsize_t\fP that -gives the number of words in the expansion of \fIs\fP. The field \fIwe_wordv\fP -is a \fIchar\ **\fP that points to the array of words found. The field -\fIwe_offs\fP of type \fIsize_t\fP is sometimes (depending on \fIflags\fP, see below) -used to indicate the number of initial elements in the \fIwe_wordv\fP array -that should be filled with NULLs. +関数 \fBwordexp\fP() はシェルのように文字列 \fIs\fP を展開し、 \fIp\fP で指し示す構造体に結果を返す。 データ型 +\fIwordexp_t\fP は少なくともフィールド \fIwe_wordc\fP, \fIwe_wordv\fP, \fIwe_offs\fP を持つ構造体である。 +フィールド \fIwe_wordc\fP は \fIsize_t\fP であり、 \fIs\fP を展開した結果に単語がいくつあるかを表す。 フィールド +\fIwe_wordv\fP は \fIchar\ **\fP であり、見つかった単語の配列を指し示す。 \fIsize_t\fP 型のフィールド \fIwe_offs\fP +は、 \fIwe_wordv\fP 配列にある初期要素のうちいくつが NULL で埋められるべきかを表すのに使われたりする (\fIflags\fP +により決定される。下記を参照。)。 .LP 関数 \fBwordfree\fP() は割り当てたメモリを再度解放する。 より正確にいうと、この関数はその引き数を解放するのではなく、 配列 \fIwe_wordv\fP とそれが指し示す文字列を解放する。 diff --git a/draft/man3/wprintf.3 b/draft/man3/wprintf.3 index 666e1214..9844e8f5 100644 --- a/draft/man3/wprintf.3 +++ b/draft/man3/wprintf.3 @@ -95,26 +95,16 @@ or \fIcc\ \-std=c99\fP (ワイド文字)引き数が出力される。 .TP \fBs\fP -If no \fBl\fP modifier is present: The \fIconst\ char\ *\fP argument is expected -to be a pointer to an array of character type (pointer to a string) -containing a multibyte character sequence beginning in the initial shift -state. Characters from the array are converted to wide characters (each by -a call to the \fBmbrtowc\fP(3) function with a conversion state starting in -the initial state before the first byte). The resulting wide characters are -written up to (but not including) the terminating null wide character -(L\(aq\e0\(aq). If a precision is specified, no more wide characters than -the number specified are written. Note that the precision determines the -number of \fIwide characters\fP written, not the number of \fIbytes\fP or \fIscreen -positions\fP. The array must contain a terminating null byte (\(aq\e0\(aq), -unless a precision is given and it is so small that the number of converted -wide characters reaches it before the end of the array is reached. If an -\fBl\fP modifier is present: The \fIconst\ wchar_t\ *\fP argument is expected to -be a pointer to an array of wide characters. Wide characters from the array -are written up to (but not including) a terminating null wide character. If -a precision is specified, no more than the number specified are written. -The array must contain a terminating null wide character, unless a precision -is given and it is smaller than or equal to the number of wide characters in -the array. +もし \fBl\fP 修飾子が存在しない場合、 \fIconst\ char\ *\fP 引き数は初期状態より始まるマルチバイト文字列を含んだ char +型の配列へのポインタ(文字列へのポインタ)とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれの文字を +\fBmbrtowc\fP(3) 関数によって)ワイド文字へと変換される。結果のワイド文字は終端の ナルワイド文字 (L\(aq\e0\(aq) +の手前までが書き込まれる。精度(precision)が指定された 場合、指定された数字を超えるワイド文字は書き込まれない。精度は 書き込まれる +\fIバイト\fP 数や \fI画面上の位置\fP ではなく \fIワイド文字\fP の数を指定することに注意すること。 精度がない場合には配列の終端にナルバイト +(\(aq\e0\(aq) を含む必要がある。 精度を指定する場合には、配列の最後に到着する前に変換されたワイド文字の +数がそれに到達するよう、精度は十分に小さな数でなければならない。 もし \fBl\fP 修飾子が存在する場合、 \fIconst\ wchar_t\ *\fP +引き数はワイド文字の配列へのポインタとみなされる。 配列のワイド文字列は終端のナルワイド文字の手間まで出力される。 +もし精度が指定された場合には指定された精度以上の文字は出力されない。 精度を指定しない場合には終端のナルワイド文字を含む必要がある。 +精度を指定する場合にはそれはワイド文字の配列の大きさよりも小さくな ければならない。 .SH 返り値 これらの関数は書き込まれたワイド文字の文字数を返す。 \fBswprintf\fP() と \fBvswprintf\fP() 関数の場合は 終端のナルワイド文字は含まない。エラーが起こった場合は \-1 を返す。 diff --git a/draft/man4/console.4 b/draft/man4/console.4 index fdd922bb..d4a578c4 100644 --- a/draft/man4/console.4 +++ b/draft/man4/console.4 @@ -18,18 +18,15 @@ .SH 名前 console \- コンソール端末 (console terminal) と仮想コンソール (virtual console) .SH 説明 -A Linux system has up to 63 \fIvirtual consoles\fP (character devices with -major number 4 and minor number 1 to 63), usually called \fI/dev/ttyn\fP with 1 -\(<= \fIn\fP \(<= 63. The current console is also addressed by -\fI/dev/console\fP or \fI/dev/tty0\fP, the character device with major number 4 -and minor number 0. The device files \fI/dev/*\fP are usually created using -the script MAKEDEV, or using \fBmknod\fP(1), usually with mode 0622 and owner -\fIroot.tty\fP. +Linux システムは普通、\fI/dev/ttyn\fP (n は 1 \(<= \fIn\fP \(<= 63) と呼ばれる\fI仮想コンソール\fP +(メジャーナンバー (major number) 4 マイナーナンバー (minor number) 1 から 63 のキャラクターデバイス +(character device)) を持つ。 現在のコンソールは \fI/dev/console\fP または \fI/dev/tty0\fP (メジャー +ナンバー 4 マイナーナンバー 0 のキャラクターデバイス) によっても扱える。 デバイスファイル (device file) \fI/dev/*\fP +は普通 MAKEDEV スクリプトまたは \fBmknod\fP(1) を使ってモード 0622、所有者 \fIroot.tty\fP として作成される。 .LP -Before kernel version 1.1.54 the number of virtual consoles was compiled -into the kernel (in \fItty.h\fP: #define NR_CONSOLES 8) and could be changed -by editing and recompiling. Since version 1.1.54 virtual consoles are -created on the fly, as soon as they are needed. +カーネル (kernel) バージョン 1.1.54 以前は、仮想コンソールの数はコンパイル時に (\fItty.h\fP 中の : #define +NR_CONSOLES 8 によって) カーネルに埋め込まれていた。 そして、それを変更してコンパイルし直すことで仮想コンソールの数を変更できた。 +カーネルバージョン 1.1.54 以降では仮想コンソールが必要とされる時は すぐに動作中に作成される。 .LP コンソール上でプロセスを開始する一般的な方法は: (a) コンソール上で \fBmingetty\fP(8) (または \fBagetty\fP(8)) をスタートさせることを (\fBinittab\fP(5) の中で) \fBinit\fP(8) に伝える。 (b) diff --git a/draft/man4/console_ioctl.4 b/draft/man4/console_ioctl.4 index 42e81549..67480122 100644 --- a/draft/man4/console_ioctl.4 +++ b/draft/man4/console_ioctl.4 @@ -44,7 +44,7 @@ .\"******************************************************************* .TH CONSOLE_IOCTL 4 2009\-02\-28 Linux "Linux Programmer's Manual" .SH 名前 -console_ioctl \- ioctls for console terminal and virtual consoles +console_ioctl \- コンソール端末と仮想コンソールの ioctl .SH 説明 次のような Linux 固有の \fBioctl\fP(2) がサポートされている。 それぞれ3番目の引数が必要である、ここでは \fIargp\fP とする。 .TP @@ -62,11 +62,9 @@ LED_SCR 0x01 scroll lock led LEDを点灯させる。LEDは \fIargp\fP の下位 3 ビットに従い点灯される。 しかし、より高位のビットがセットされている時には、キャピタルロック、 ナンバーロック、スクロールロックのキーボード機能の状態を表示する LED は 通常状態に戻る。 .LP -Before 1.1.54, the LEDs just reflected the state of the corresponding -keyboard flags, and KDGETLED/KDSETLED would also change the keyboard flags. -Since 1.1.54 the LEDs can be made to display arbitrary information, but by -default they display the keyboard flags. The following two ioctls are used -to access the keyboard flags. +カーネル 1.1.54 以前は、LED はそれぞれのキーボードフラグの状態を反映するだけで、KDGETLED/KDSETLED +もキーボードフラグを変更するだけであった。 カーネル 1.1.54 からは LED に任意の表示をすることができるようになったが、 +デフォルトではキーボードフラグを表示する。 次に示す 2 つの ioctl はキーボードフラグにアクセスするのに用いられる。 .TP \fBKDGKBLED\fP キャピタルロック、ナンバーロック、スクロールロックの(LED の表示では なく)キーボードフラグを得る。 \fIargp\fP @@ -128,20 +126,17 @@ KD_GRAPHICS 0x01 文字のフォントであるか、コンソールが テキストモードでない時には失敗し \fBEINVAL\fP のエラーコードを返す。 .TP \fBGIO_FONTX\fP -Gets screen font and associated information. \fIargp\fP points to a \fIstruct -consolefontdesc\fP (see \fBPIO_FONTX\fP). On call, the \fIcharcount\fP field should -be set to the maximum number of characters that would fit in the buffer -pointed to by \fIchardata\fP. On return, the \fIcharcount\fP and \fIcharheight\fP -are filled with the respective data for the currently loaded font, and the -\fIhardata\fP array contains the font data if the initial value of \fIcharcount\fP -indicated enough space was available; otherwise the buffer is untouched and -\fIerrno\fP is set to \fBENOMEM\fP. (Since 1.3.1.) +スクリーンフォントとそれに関連した情報を取得する。 \fIargp\fP は構造体 consolefontdesc (\fBPIO_FONTX\fP +を参照のこと)を指す。 関数呼び出しのときには、\fIcharcount\fP には、\fIchardata\fP が指す +バッファにおさまる最大の文字数をセットしなければならない。 関数呼び出しから戻った時には \fIcharcount\fP と \fIcharheight\fP +には、 現在ロードされているフォントの該当するデータが収められている。 配列 \fIchardata\fP には、最初に \fIcharcount\fP +にいれた値によって フォントを収めるのに十分なスペースがあるとわかればフォントデータが収められる。 そうでない時には、バッファは変更されず、 +\fIerrno\fP に \fBENOMEM\fP が セットされる(カーネル 1.3.1 以降)。 .TP \fBPIO_FONT\fP -Sets 256\-character screen font. Load font into the EGA/VGA character -generator. \fIargp\fP points to a 8192 byte map, with 32 bytes per character. -Only the first \fIN\fP of them are used for an 8x\fIN\fP font (0 < \fIN\fP <= -32). This call also invalidates the Unicode mapping. +256 文字のフォントをセットする。EGA/VGA キャラクタージェネレーター (character generator) にフォントをロードする。 +\fIargp\fP は、8192 バイト(一文字 32 バイト)のマップを指す。 マップのうち、最初の \fIN\fP のみが 8x\fIN\fP のフォントのために +用いられる(0 < \fIN\fP <= 32)。 この呼び出しをすると Unicode のマッピングが無効になる。 .TP \fBPIO_FONTX\fP Sets screen font and associated rendering information. \fIargp\fP @@ -173,10 +168,9 @@ Linux との互換性を保つために NULL にセットすべきである。 文字よりも多い時には 無意味な情報を返す事が多い。 .TP \fBGIO_UNISCRNMAP\fP -Get full Unicode screen mapping from kernel. \fIargp\fP points to an area of -size \fIE_TABSZ*sizeof(unsigned\fPshort)\fI,\fP which is loaded with the Unicodes -each character represent. A special set of Unicodes, starting at U+F000, -are used to represent "direct to font" mappings. (Since 1.3.1.) +フル Unicode スクリーンマッピングをカーネルより取得する。 \fIargp\fP はサイズ \fIE_TABSZ*sizeof(unsigned +short)\fP の領域を指す。 その領域には各キャラクターを示す Unicode がロードされている。 U+F000 に始まる Unicode +の特別な集合は、「フォント直接な (direct to font)」 マッピングを示すのに用いられる (カーネル 1.3.1 以降)。 .TP \fBPIO_SCRNMAP\fP 「ユーザー定義可能な(user definable)」(4番目の)テーブルをカーネルに @@ -213,8 +207,8 @@ struct unipair { (カーネル 1.1.92 以降) .TP \fBPIO_UNIMAP\fP -Put unicode\-to\-font mapping in kernel. \fIargp\fP points to a \fIstruct -unimapdesc\fP. (Since 1.1.92) +Unicode からフォントへのマッピングをカーネルにセットする。 \fIargp\fP は構造体 \fIstruct unimapdesc\fP +へのポインターである。 (カーネル 1.1.92 以降) .TP \fBPIO_UNIMAPCLR\fP テーブルをクリアし、その事をハシュアルゴリズムに伝える。 \fIargp\fPは @@ -342,10 +336,9 @@ struct kbkeycode { 1.1.63 以降) .TP \fBKDSIGACCEPT\fP -The calling process indicates its willingness to accept the signal \fIargp\fP -when it is generated by pressing an appropriate key combination. (1 <= -\fIargp\fP <= NSIG). (See \fIspawn_console\fP() in -\fIlinux/drivers/char/keyboard.c\fP.) +この関数呼び出しは、特別な組合せでキーを押した時に発生するシグナル \fIargp\fP (1 <= \fIargp\fP <= NSIG) +を進んで受け付けるかどうかを示す。 (\fIlinux/drivers/char/keyboard.c\fP の \fIspawn_console\fP() +を見よ。) .TP \fBVT_OPENQRY\fP 最初の空いている(まだオープンされていない)コンソールを返す。 \fIargp\fP の指す \fIint\fP 型の整数には、vt の番号がセットされる (1 @@ -449,8 +442,8 @@ struct vt_consize { これらの呼出しは、スーパーユーザーか現在の端末のオーナにのみ許される。 .TP \fBTIOCLINUX, subcode=0\fP -Dump the screen. Disappeared in 1.1.92. (With kernel 1.1.92 or later, read -from \fI/dev/vcsN\fP or \fI/dev/vcsaN\fP instead.) +スクリーンをダンプ(dump)する カーネル 1.1.92 以降でなくなった(1.1.92 以降では、代わりに \fI/dev/vcsN\fP または +\fI/dev/vcsaN\fP より読み込む)。 .TP \fBTIOCLINUX, subcode=1\fP タスク情報を取得する。カーネル 1.1.92 でなくなった。 @@ -468,11 +461,9 @@ struct { .fi .in -\fIxs\fP and \fIys\fP are the starting column and row. \fIxe\fP and \fIye\fP are the -ending column and row. (Upper left corner is row=column=1.) \fIsel_mode\fP is -0 for character\-by\-character selection, 1 for word\-by\-word selection, or 2 -for line\-by\-line selection. The indicated screen characters are highlighted -and saved in the static array sel_buffer in \fIdevices/char/console.c\fP. +であり、ここで \fIxs\fP と \fIys\fP は始めの桁と行で、\fIxe\fP と \fIye\fP は終りの桁と 行である。 (左上の隅が 桁=行=1 ) +\fIsel_mode\fP は 0 が文字毎の選択で、1は語毎の選択、2は行毎の選択を 意味する。 示されたスクリーン上の文字はハイライト表示され +\fIdevices/char/console.c\fP の 静的配列 sel_buffer に保存される。 .TP \fBTIOCLINUX, subcode=3\fP 選択したものをペーストする。 選択バッファ中の文字 が \fIfd\fP に書き出される。 @@ -490,37 +481,29 @@ and saved in the static array sel_buffer in \fIdevices/char/console.c\fP. \fIargp\fP は文字変数を指すポインタで、その内容がカーネル変数 \fIreport_mouse\fP の値に設定される(カーネル 1.1.33 以降)。 .TP \fBTIOCLINUX, subcode=8\fP -Dump screen width and height, cursor position, and all the -character\-attribute pairs. (Kernels 1.1.67 through 1.1.91 only. With -kernel 1.1.92 or later, read from \fI/dev/vcsa*\fP instead.) +スクリーン幅、スクリーン高さ、カーソル位置、全ての文字属性の組をダンプする (カーネル 1.1.67 から 1.1.91までのみ。 カーネル +1.1.92 以降では \fI/dev/vcsa*\fP より読み込む)。 .TP \fBTIOCLINUX, subcode=9\fP -Restore screen width and height, cursor position, and all the -character\-attribute pairs. (Kernels 1.1.67 through 1.1.91 only. With -kernel 1.1.92 or later, write to \fI/dev/vcsa*\fP instead.) +スクリーン幅、スクリーン高さ、カーソル位置、全ての文字属性の組を復元する (カーネル 1.1.67 から 1.1.91 までのみ。 カーネル +1.1.92 以降では \fI/dev/vcsa*\fP に書き込む)。 .TP \fBTIOCLINUX, subcode=10\fP -Handles the Power Saving feature of the new generation of monitors. VESA -screen blanking mode is set to \fIargp[1]\fP, which governs what screen -blanking does: +新世代モニターのパワーセーブ機能を制御する。 VESA スクリーンブランキングモードが \fIargp[1]\fPに設定される。 +その値はスクリーンブランキングがどのように行われるかを示す。以下がその 値である。 .RS .IP 0: 3 -Screen blanking is disabled. +スクリーンブランキングなし。 .IP 1: -The current video adapter register settings are saved, then the controller -is programmed to turn off the vertical synchronization pulses. This puts -the monitor into "standby" mode. If your monitor has an Off_Mode timer, -then it will eventually power down by itself. +現在のビデオアダプターレジスタが保存されたあと、 コントローラは垂直同期パルスをオフにするようプログラムされる。 これにより +モニターは「スタンバイ」モードに入る。 モニターに Off_Mode タイマが備わっておれば、 最終的にはモニターが自分で電源を落とす。 .IP 2: -The current settings are saved, then both the vertical and horizontal -synchronization pulses are turned off. This puts the monitor into "off" -mode. If your monitor has no Off_Mode timer, or if you want your monitor to -power down immediately when the blank_timer times out, then you choose this -option. (\fICaution:\fP Powering down frequently will damage the monitor.) -(Since 1.1.76.) +現在の設定を保存した後、垂直、水平同期パルスがオフになる。 これによりモニターは「オフ」モードになる。 モニターに Off_Mode +タイマーがない時、または、blank_timer がタイムアウトしたらすぐにモニターの電源を落したいときにこの選択肢を選ぶ。 +(\fI注意\fP:頻繁にモニターの電源を切るとモニターを痛める。) (1.1.76 以降) .RE .SH 返り値 -On success, 0 is returned. On error, \-1 is returned, and \fIerrno\fP is set. +成功時には 0 が返される。エラーの場合 \-1 が返され、 \fIerrno\fP が設定される。 .SH エラー \fIerrno\fP は次のような値をとる: .TP @@ -536,21 +519,16 @@ On success, 0 is returned. On error, \-1 is returned, and \fIerrno\fP is set. \fBEPERM\fP 権限が不十分。 .SH 注意 -\fBWarning\fP: Do not regard this man page as documentation of the Linux -console ioctls. This is provided for the curious only, as an alternative to -reading the source. Ioctl's are undocumented Linux internals, liable to be -changed without warning. (And indeed, this page more or less describes the -situation as of kernel version 1.1.94; there are many minor and not\-so\-minor -differences with earlier versions.) - -Very often, ioctls are introduced for communication between the kernel and -one particular well\-known program (fdisk, hdparm, setserial, tunelp, -loadkeys, selection, setfont, etc.), and their behavior will be changed when -required by this particular program. - -Programs using these ioctls will not be portable to other versions of UNIX, -will not work on older versions of Linux, and will not work on future -versions of Linux. +\fB警告\fP: このマニュアルページを Linux のコンソール ioctl を文書化したものと思わない事。 +これは、興味がある人がソースを読むことの代わりになるように用意した物である。 ioctl は文書化されない Linux の内部機能であって、警告なしに +変更されることがある。 (そして、このページはカーネル 1.1.94 のときの状況を記述した物で、それは 以前のバージョンと比べれば、多くの違いがある) + +ioctl はカーネルと、ある特定のよく知られたプログラムとの情報交換のために 導入される事が非常に多い(fdisk, hdparm, +setserial,tunelp, loadkeys, selection, setfont など)。そのため ioctl +の動作は、その特定のプログラムが 必要とした時には変更になる。 + +これらの ioctl を使ったプログラムは他のバージョンの UNIX との互換性が ないし、古いバージョンの Linux +では、走らない。さらに将来のバージョンの Linux では走らなくなるかも知れない。 POSIX 機能を使いなさい。 .SH 関連項目 diff --git a/draft/man4/mouse.4 b/draft/man4/mouse.4 index d26723c6..ad424673 100644 --- a/draft/man4/mouse.4 +++ b/draft/man4/mouse.4 @@ -69,10 +69,10 @@ bit/s string データパケットの第 1 バイトは同期をとるのに利用できる。 .SS "マイクロソフト プロトコル(Microsoft Protocol)" -The \fBMicrosoft\fP protocol uses 1 start bit, 7 data bits, no parity and one -stop bit at the speed of 1200 bits/sec. Data is sent to RxD in 3\-byte -packets. The \fIdx\fP and \fIdy\fP movements are sent as two's\-complement, \fIlb\fP -(\fIrb\fP) are set when the left (right) button is pressed: +\fBマイクロソフト\fPプロトコルは、1200 bits/sec のスピードで、1 ス タートビット(1 start bit)、7 データビット(7 +data bits)、パリティな し、1 ストップビット(1 stop bit)である。 データは RxD に 3 +バイトのパケットとして送られる。\fIdx\fP と \fIdy\fP の動きは 2 の補数表示で送られ、左(右)のボタンが押された時には \fIlb\fP +(\fIrb\fP)がセットされる。 .TS center; r c c c c c c c. @@ -90,11 +90,9 @@ byte d6 d5 d4 d3 d2 d1 d0 パケットが送られる。真中のボタンが押されていると、4バイトのパケットが 送られる。第4バイトは 0x20 の値を持っている(あるいは、少なくとも 0x20 ビットがセットされている)。 但し、他のボタンが押されていない状態で、 真中のボタンが押されると、0,0,0,0x20 と伝えられる。 .SS "マウスシステムズ プロトコル(Mousesystems protocol)" -The \fBMousesystems\fP protocol uses 1 start bit, 8 data bits, no parity and -two stop bits at the speed of 1200 bits/sec. Data is sent to RxD in 5\-byte -packets. \fIdx\fP is sent as the sum of the two two's\-complement values, \fIdy\fP -is send as negated sum of the two two's\-complement values. \fIlb\fP (\fImb\fP, -\fIrb\fP) are cleared when the left (middle, right) button is pressed: +\fBマウスシステムズ\fPプロトコルは、1200 bits/secで、1 スタートビット、 8 データビット、パリティなし、2 ストップビットである。 +データは、RxD に 5 バイトのパケットとして送られる。\fIdx\fP は 2 つの 2 の補数の和として送られ、\fIdy\fP は 2 つの 2 +の補数の和の否定 として送られる。左(中、右)のボタンが押された時には\fIlb\fP (\fImb\fP, \fIrb\fP) がクリアされる。 .TS center; r c c c c c c c c. @@ -110,11 +108,9 @@ byte d7 d6 d5 d4 d3 d2 d1 d0 .SS "サン プロトコル(Sun protocol)" \fBサン\fP プロトコルは、上記の 5 バイト マウスシステムプロトコルの 3 バイト版です。後の 2 バイトは送られません。 .SS "MM プロトコル(MM protocol)" -The \fBMM\fP protocol uses 1 start bit, 8 data bits, odd parity and one stop -bit at the speed of 1200 bits/sec. Data is sent to RxD in 3\-byte packets. -\fIdx\fP and \fIdy\fP are sent as single signed values, the sign bit indicating a -negative value. \fIlb\fP (\fImb\fP, \fIrb\fP) are set when the left (middle, right) -button is pressed: +\fBMM\fP プロトコルは 1200 bits/sec で 1 スタートビット、8 データビッ ト、奇数パリティ、 1 ストップビットを使う。データは +RxD に 3 バイトのパ ケットとして送られる。\fIdx\fP と \fIdy\fP は一つの符号つきの値として +送られ、サインビットは負の値を表す。左(中、右)のボタンが押された時には \fIlb\fP (\fImb\fP, \fIrb\fP)がセットされる。 .TS center; r c c c c c c c c. diff --git a/draft/man4/sk98lin.4 b/draft/man4/sk98lin.4 index 0aca98a0..5e27954e 100644 --- a/draft/man4/sk98lin.4 +++ b/draft/man4/sk98lin.4 @@ -58,11 +58,9 @@ insmod を使ってドライバをロードする際、 ネットワークアダ \fI/proc/net/sk98lin\fP に作られる。 これらのファイルは \fIeth[x]\fP という名前であり、 \fIx\fP はインタフェースの番号である。 この番号はシステムによってポート毎に割り当てられたものである。 -If loading is finished, any desired IP address can be assigned to the -respective \fIeth[x]\fP interface using the \fBifconfig\fP(8) command. This -causes the adapter to connect to the Ethernet and to display a status -message on the console saying "ethx: network connection up using port y" -followed by the configured or detected connection parameters. +ロードが完了すると、 \fBifconfig\fP(8) コマンドを使って、各 \fIeth[x]\fP インタフェースに希望する IP +アドレスを割り当てることができる。 これによりアダプタがイーサネットに接続され、 コンソールに状態メッセージが表示される。 このメッセージでは、 +"ethx: network connection up using port y" の後に 設定されたり検出された接続パラメータが表示される。 \fBsk98lin\fP はラージフレーム (ジャンボフレームとも呼ばれる) もサポートする。 ジャンボフレームを使うと、大量のデータを転送する際に、 スループットを大幅に向上させることができる。 ラージフレームを有効にするには、 インタフェースの MTU (maximum transfer unit, diff --git a/draft/man4/st.4 b/draft/man4/st.4 index 85c8f01b..7bd35ed3 100644 --- a/draft/man4/st.4 +++ b/draft/man4/st.4 @@ -138,9 +138,8 @@ kerneld や kmod によるドライバのデマンドロードに関しても当 ドライバにわたされる。 以下の定義は \fI/usr/include/linux/mtio.h\fP による。 .SS "MTIOCTOP \(em テープ操作の実行" .PP -This request takes an argument of type \fI(struct mtop\ *)\fP. Not all drives -support all operations. The driver returns an \fBEIO\fP error if the drive -rejects an operation. +この要求は \fI(struct mtop\ *)\fP 型の引数をとる。全てのドライブが全ての操作をサポートしているわけではない。 +ドライブが操作を拒否すると、ドライバは \fBEIO\fP エラーを返す。 .PP .in +4n .nf @@ -390,7 +389,7 @@ sense data) が用いられる。第 9\-16 ビットは注目すべきビット でなければ、 このパターンがマスク後の状態データバイトにマッチしなければならない。 .SS "MTIOCGET \(em ステータスの取得" .PP -This request takes an argument of type \fI(struct mtget\ *)\fP. +このリクエストは \fI(struct mtget\ *)\fP という型の引数をとる。 .PP .in +4n .nf @@ -460,11 +459,10 @@ SCSI\-1 テープ) および \fBMT_ISSCSI2\fP (汎用 SCSI\-2 テープ) のみ \fBMTSEEK\fP の後など) には \-1 にセットされる。 .SS "MTIOCPOS \(em テープ位置の取得" .PP -This request takes an argument of type \fI(struct mtpos\ *)\fP and reports the -drive's notion of the current tape block number, which is not the same as -\fImt_blkno\fP returned by \fBMTIOCGET\fP. This drive must be a SCSI\-2 drive that -supports the \fBREAD POSITION\fP command (device\-specific address) or a -Tandberg\-compatible SCSI\-1 drive (Tandberg, Archive Viper, Wangtek, ... ). +このリクエストは \fI(struct mtpos\ *)\fP 型の引数をとり、ドライブが保持している現在のテープブロック番号を報告する。 これは、 +\fBMTIOCGET\fP により返される \fImt_blkno\fP と同じではない。 ドライブは \fBREAD POSITION\fP コマンド +(デバイス固有アドレス) をサポートする SCSI\-2ドライブか、 Tandberg 互換の SCSI\-1 ドライブ (Tandberg, +Archive, Viper, Wangtek, ... ) でなければならない。 .PP .in +4n .nf diff --git a/draft/man4/tty_ioctl.4 b/draft/man4/tty_ioctl.4 index 76c1c59a..ba19b935 100644 --- a/draft/man4/tty_ioctl.4 +++ b/draft/man4/tty_ioctl.4 @@ -45,9 +45,8 @@ tty_ioctl \- 端末とシリアルラインの ioctl (入出力制御) .br 排出 (drain) を行うための出力バッファの使用を許可し、 処理していない入力を破棄して、 現在のシリアルポートの設定を変更する。 .LP -The following four ioctls are just like \fBTCGETS\fP, \fBTCSETS\fP, \fBTCSETSW\fP, -\fBTCSETSF\fP, except that they take a \fIstruct termio\ *\fP instead of a -\fIstruct termios\ *\fP. +以下の 4 つの ioctl は \fBTCGETS\fP, \fBTCSETS\fP, \fBTCSETSW\fP, \fBTCSETSF\fP と似ている。 ただし、 +\fIstruct termios\ *\fP の代わりに \fIstruct termio\ *\fP を取る。 .IP \fBTCGETA struct termio *\fP\fIargp\fP .IP diff --git a/draft/man5/hosts.equiv.5 b/draft/man5/hosts.equiv.5 index 638e06aa..1b4f538f 100644 --- a/draft/man5/hosts.equiv.5 +++ b/draft/man5/hosts.equiv.5 @@ -12,9 +12,8 @@ .SH 名前 /etc/hosts.equiv \- 「信頼された」\fBr\fP コマンドによるシステムへの アクセスを許可するホストおよびユーザのリスト .SH 説明 -The \fBhosts.equiv\fP file allows or denies hosts and users to use the -\fBr\fP\-commands (e.g., \fBrlogin\fP, \fBrsh\fP or \fBrcp\fP) without supplying a -password. +\fBhosts.equiv\fP ファイルは \fBr\fP\-コマンド (\fBrlogin\fP, \fBrsh\fP, \fBrcp\fP など) +によるパスワードなしでの利用を 許可/拒否するホスト/ユーザを設定する。 .PP このファイルでは以下の書式を用いる。 .TP diff --git a/draft/man7/arp.7 b/draft/man7/arp.7 index d92e07fd..a59b8453 100644 --- a/draft/man7/arp.7 +++ b/draft/man7/arp.7 @@ -200,6 +200,6 @@ Linux 2.0 で、 \fIstruct arpreq\fP に \fIarp_dev\fP メンバーが含まれ RFC \ 826: ARP の説明。 RFC\ 2461: IPv6 neighbor discovery の説明と利用されている基礎アルゴリズム。 Linux 2.2 以降では IPv4 ARP は可能な場合は IPv6 アルゴリズムを使っている。 .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/capabilities.7 b/draft/man7/capabilities.7 index e9c62327..3f02431f 100644 --- a/draft/man7/capabilities.7 +++ b/draft/man7/capabilities.7 @@ -701,6 +701,6 @@ CONFIG_SECURITY_CAPABILITIES により有効/無効を切り替えることが .PP Linux カーネルソース内の \fIinclude/linux/capability.h\fP .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/credentials.7 b/draft/man7/credentials.7 index d6071822..96c3ab93 100644 --- a/draft/man7/credentials.7 +++ b/draft/man7/credentials.7 @@ -149,6 +149,6 @@ POSIX のスレッド仕様では、これらの識別子がプロセス内の \fBeuidaccess\fP(3), \fBinitgroups\fP(3), \fBtcgetpgrp\fP(3), \fBtcsetpgrp\fP(3), \fBcapabilities\fP(7), \fBpath_resolution\fP(7), \fBunix\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/ddp.7 b/draft/man7/ddp.7 index 92976ad3..1486ddc0 100644 --- a/draft/man7/ddp.7 +++ b/draft/man7/ddp.7 @@ -170,6 +170,6 @@ raw ソケットモードは Linux 独特のもので、もう一方の実装で .SH 関連項目 \fBrecvmsg\fP(2), \fBsendmsg\fP(2), \fBcapabilities\fP(7), \fBsocket\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/environ.7 b/draft/man7/environ.7 index a61251e7..8464afad 100644 --- a/draft/man7/environ.7 +++ b/draft/man7/environ.7 @@ -138,6 +138,6 @@ environ \- ユーザ環境 \fBclearenv\fP(3), \fBexec\fP(3), \fBgetenv\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3), \fBlocale\fP(5) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/fifo.7 b/draft/man7/fifo.7 index 8fdefec9..0370d46e 100644 --- a/draft/man7/fifo.7 +++ b/draft/man7/fifo.7 @@ -45,6 +45,6 @@ FIFO 特殊ファイルは \fBmkfifo\fP(3) で作成することができ、 \f \fBmkfifo\fP(1), \fBopen\fP(2), \fBpipe\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2), \fBsocketpair\fP(2), \fBmkfifo\fP(3), \fBpipe\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/glob.7 b/draft/man7/glob.7 index bee7f56b..f048c57a 100644 --- a/draft/man7/glob.7 +++ b/draft/man7/glob.7 @@ -150,6 +150,6 @@ locale) の \fBLC_COLLATE\fP カテゴリで定義されている照合順序が .SH 関連項目 \fBsh\fP(1), \fBfnmatch\fP(3), \fBglob\fP(3), \fBlocale\fP(7), \fBregex\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/hostname.7 b/draft/man7/hostname.7 index 660e4bb9..fcb7268d 100644 --- a/draft/man7/hostname.7 +++ b/draft/man7/hostname.7 @@ -90,6 +90,6 @@ EDU で、これは一つしか要素がないからである。 .\" 4.2BSD. \fBgethostbyname\fP(3), \fBresolver\fP(5), \fBmailaddr\fP(7), \fBnamed\fP(8) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/icmp.7 b/draft/man7/icmp.7 index feadb27d..1c59e10e 100644 --- a/draft/man7/icmp.7 +++ b/draft/man7/icmp.7 @@ -94,8 +94,9 @@ ICMP 不達パケット (Destination Unreachable packet) を送る最大レー ビット定義 (Linux カーネルソースファイル \fIinclude/linux/icmp.h\fP を参照): -.in +4n -.nf +.RS 12 +.TS +l l. 0 Echo Reply 3 Destination Unreachable * 4 Source Quench * @@ -109,10 +110,10 @@ F Info Request G Info Reply H Address Mask Request I Address Mask Reply -.fi -.in +.TE +.RE -アスタリスク印が付いたビットは、デフォルトでレート制限が有効に なっている (上記のマスクのデフォルトも参照)。 +アスタリスク印 (*) が付いたビットは、 デフォルトでレート制限が有効になっている (上記のマスクのデフォルトも参照)。 .TP \fIicmp_timeexceed_rate\fP (Linux 2.2 から 2.4.9 まで) \fBICMP_TIME_EXCEEDED\fP パケットの最大送信レート。 これらのパケットはパケットがあまりに多くの hop を通過した場合に、 @@ -141,6 +142,6 @@ inode として出力される。 .PP \fBRFC\ 792\fP: ICMP プロトコルの説明 .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/inotify.7 b/draft/man7/inotify.7 index 26ea586b..825d8188 100644 --- a/draft/man7/inotify.7 +++ b/draft/man7/inotify.7 @@ -88,11 +88,9 @@ struct inotify_event { アプリケーションで関連づけることができる。 他のイベント種別の場合には、 \fIcookie\fP は 0 に設定する。 -The \fIname\fP field is present only when an event is returned for a file -inside a watched directory; it identifies the file pathname relative to the -watched directory. This pathname is null\-terminated, and may include -further null bytes (\(aq\e0\(aq) to align subsequent reads to a suitable -address boundary. +\fIname\fP フィールドは監視しているディレクトリ内のファイルに対して イベントが返される場合のためにだけ存在する。 +監視するディレクトリからのファイルの相対パス名を表す。 このパス名は NULL で終端され、 その後の読み込みで適切なアドレス境界に調整するために、 +さらに NULL バイト (\(aq\e0\(aq) が含まれる場合もある。 \fIlen\fP フィールドは NULL バイトを含む \fIname\fP の全てのバイト数を表す。 よって、 \fIinotify_event\fP 構造体のサイズは diff --git a/draft/man7/ip.7 b/draft/man7/ip.7 index d41868aa..caffc89f 100644 --- a/draft/man7/ip.7 +++ b/draft/man7/ip.7 @@ -747,6 +747,6 @@ glibc のバージョンによっては \fIin_pktinfo\fP の定義を忘れて .\" FIXME autobind INADDR REUSEADDR RFC\ 791: 元々の IP 仕様。 RFC\ 1122: IPv4 ホストの要件。 RFC\ 1812: IPv4 ルータの要件。 .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/ipv6.7 b/draft/man7/ipv6.7 index 94f62f20..2fb020a0 100644 --- a/draft/man7/ipv6.7 +++ b/draft/man7/ipv6.7 @@ -274,6 +274,6 @@ EH および AH ヘッダ での IPSec のサポートは存在しない。 RFC\ 2553: IPv6 BASIC API; Linux はこの RFC に準拠するようにしている。 RFC\ 2460: IPv6 specification. .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/man-pages.7 b/draft/man7/man-pages.7 index c7cb9b67..6b29255e 100644 --- a/draft/man7/man-pages.7 +++ b/draft/man7/man-pages.7 @@ -248,13 +248,13 @@ EXAMPLE 多くのプログラムではデフォルトのインストール先は \fI/usr/local\fP である。したがってベースとなるマニュアルページでも \fI/usr/local\fP が使われていることが多いだろう。 .TP -\fBATTRIBUTES\fP +\fB属性 (ATTRIBUTES)\fP A summary of various attributes of the function(s) documented on this page, broken into subsections. The following subsections are defined: .sp .RS .TP -\fBMultithreading (see pthreads(7))\fP +\fBマルチスレッディング (pthreads(7) 参照)\fP This subsection notes attributes relating to multithreaded applications: .RS .IP * 3 diff --git a/draft/man7/math_error.7 b/draft/man7/math_error.7 index 80236b0f..bf45670e 100644 --- a/draft/man7/math_error.7 +++ b/draft/man7/math_error.7 @@ -141,6 +141,6 @@ POSIX.1\-2001 ではこれらの関数がエラーを返すことを 要求し \fIinfo libc\fP .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/netdevice.7 b/draft/man7/netdevice.7 index 7d87458b..a05996be 100644 --- a/draft/man7/netdevice.7 +++ b/draft/man7/netdevice.7 @@ -249,6 +249,6 @@ glibc 2.1 では \fI\fP に \fIifr_newname\fP マクロがない。 .SH 関連項目 \fBproc\fP(5), \fBcapabilities\fP(7), \fBip\fP(7), \fBrtnetlink\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/numa.7 b/draft/man7/numa.7 index 8d2fa0e0..c5ad6692 100644 --- a/draft/man7/numa.7 +++ b/draft/man7/numa.7 @@ -141,6 +141,6 @@ Linux の NUMA システムコールと \fI/proc\fP インターフェースは \fBget_mempolicy\fP(2), \fBmbind\fP(2), \fBmove_pages\fP(2), \fBset_mempolicy\fP(2), \fBnuma\fP(3), \fBcpuset\fP(7), \fBnumactl\fP(8) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/packet.7 b/draft/man7/packet.7 index 96e3c0a0..bca26010 100644 --- a/draft/man7/packet.7 +++ b/draft/man7/packet.7 @@ -251,6 +251,6 @@ IEEE 802.2/803.3 の LLC の扱い方は、バグと考えても良いだろう 物理層のプロトコルに関する記述は \fI\fP インクルードファイルにある。 .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/pipe.7 b/draft/man7/pipe.7 index 7b049cb4..ae5f0c23 100644 --- a/draft/man7/pipe.7 +++ b/draft/man7/pipe.7 @@ -110,6 +110,6 @@ POSIX.1\-2001 では、パイプは一方向の通信だけに対応していれ \fBdup\fP(2), \fBfcntl\fP(2), \fBopen\fP(2), \fBpipe\fP(2), \fBpoll\fP(2), \fBselect\fP(2), \fBsocketpair\fP(2), \fBstat\fP(2), \fBmkfifo\fP(3), \fBepoll\fP(7), \fBfifo\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/pty.7 b/draft/man7/pty.7 index 3951317e..3d14b98c 100644 --- a/draft/man7/pty.7 +++ b/draft/man7/pty.7 @@ -85,6 +85,6 @@ BSD \fBioctl\fP(2) の \fBTIOCSTOP\fP, \fBTIOCSTART\fP, \fBTIOCUCNTL\fP, \fBTIO \fBselect\fP(2), \fBsetsid\fP(2), \fBforkpty\fP(3), \fBopenpty\fP(3), \fBtermios\fP(3), \fBpts\fP(4), \fBtty\fP(4), \fBtty_ioctl\fP(4) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/raw.7 b/draft/man7/raw.7 index 4bba4a86..803a76b3 100644 --- a/draft/man7/raw.7 +++ b/draft/man7/raw.7 @@ -163,6 +163,6 @@ raw ソケットへの送信では、 IP プロトコルを \fIsin_port\fP か Path MTU discovery に関しては \fBRFC\ 1191\fP を参照。 IP プロトコルに関しては \fBRFC\ 791\fP とインクルードファイル \fI\fP を参照。 .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/regex.7 b/draft/man7/regex.7 index 40715174..7ce9703b 100644 --- a/draft/man7/regex.7 +++ b/draft/man7/regex.7 @@ -110,13 +110,13 @@ element: 後述) にすれば良い。 他の特殊文字 ( も含む) は、 はそのクラスに属するすべての文字のリストを表す。 標準で用意されている文字クラスの名前は以下の通り: .PP .RS -.nf -.ta 3c 6c 9c +.TS +l l l. alnum digit punct alpha graph space blank lower upper cntrl print xdigit -.fi +.TE .RE .PP .\" As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295666 @@ -198,6 +198,6 @@ case を意味する」 という上記の定義が正しい解釈であると .PP POSIX.2, section 2.8 (Regular Expression Notation). .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/sem_overview.7 b/draft/man7/sem_overview.7 index 43c55104..2a79141e 100644 --- a/draft/man7/sem_overview.7 +++ b/draft/man7/sem_overview.7 @@ -102,6 +102,6 @@ System V よりも 簡単で、うまく設計されたインタフェースを \fBsem_open\fP(3), \fBsem_post\fP(3), \fBsem_unlink\fP(3), \fBsem_wait\fP(3), \fBpthreads\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/shm_overview.7 b/draft/man7/shm_overview.7 index b7633b48..8c98a389 100644 --- a/draft/man7/shm_overview.7 +++ b/draft/man7/shm_overview.7 @@ -90,6 +90,6 @@ System V 共有メモリ (\fBshmget\fP(2), \fBshmop\fP(2) など) は古い共 \fBmprotect\fP(2), \fBmunmap\fP(2), \fBshmget\fP(2), \fBshmop\fP(2), \fBshm_open\fP(3), \fBshm_unlink\fP(3), \fBsem_overview\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/signal.7 b/draft/man7/signal.7 index 4b13568f..31b6078c 100644 --- a/draft/man7/signal.7 +++ b/draft/man7/signal.7 @@ -571,6 +571,6 @@ POSIX.1 (注記した内容以外)。 \fBsigvec\fP(3), \fBsigwait\fP(3), \fBstrsignal\fP(3), \fBsysv_signal\fP(3), \fBcore\fP(5), \fBproc\fP(5), \fBpthreads\fP(7), \fBsigevent\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/socket.7 b/draft/man7/socket.7 index 5037200c..7e5ca291 100644 --- a/draft/man7/socket.7 +++ b/draft/man7/socket.7 @@ -38,9 +38,6 @@ .\" commit 6e3e939f3b1bf8534b32ad09ff199d88800835a0 .\" Author: Johannes Berg .\" Also: SCM_WIFI_STATUS -.\" SO_PEEK_OFF (3.4) -.\" commit ef64a54f6e558155b4f149bb10666b9e914b6c54 -.\" Author: Pavel Emelyanov .\" SO_NOFCS (3.4) .\" commit 3bdc0eba0b8b47797f4a76e377dd8360f317450f .\" Author: Ben Greear @@ -50,7 +47,7 @@ .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* -.TH SOCKET 7 2013\-03\-15 Linux "Linux Programmer's Manual" +.TH SOCKET 7 2013\-06\-21 Linux "Linux Programmer's Manual" .SH 名前 socket \- Linux のソケットインターフェース .SH 書式 @@ -177,7 +174,8 @@ T} .\" SO_ACCEPTCONN is in POSIX.1-2001, and its origin is explained in .\" W R Stevens, UNPv1 これらのソケットオプションは、 \fBsetsockopt\fP(2) を用いれば設定でき、 \fBgetsockopt\fP(2) を用いれば取得できる。 -但し、どのソケットの場合も ソケットレベルには \fBSOL_SOCKET\fP を指定すること。 +但し、どのソケットの場合も ソケットレベルには \fBSOL_SOCKET\fP を指定すること。 注釈がない限り、 \fIoptval\fP は \fIint\fP +へのポインタである。 .TP \fBSO_ACCEPTCONN\fP このソケットが \fBlisten\fP(2) によって接続待ち受け状態に設定されているかどうかを示す値を返す。 値 0 は listen @@ -262,6 +260,54 @@ struct linger { .\" in the 2.6.18 ChangeLog \fBSCM_CREDENTIALS\fP 制御メッセージの受信を有効/無効にする。詳細は \fBunix\fP(7) を参照のこと。 .TP +\fBSO_PEEK_OFF\fP (Linux 3.4 以降) +.\" commit ef64a54f6e558155b4f149bb10666b9e914b6c54 +This option, which is currently supported only for \fBunix\fP(7) sockets, sets +the value of the "peek offset" for the \fBrecv(2)\fP system call when used with +\fBMSG_PEEK\fP flag. + +When this option is set to a negative value (it is set to \-1 for all new +sockets), traditional behavior is provided: \fBrecv(2)\fP with the \fBMSG_PEEK\fP +flag will peek data from the front of the queue. + +When the option is set to a value greater than or equal to zero, then the +next peek at data queued in the socket will occur at the byte offset +specified by the option value. At the same time, the "peek offset" will be +incremented by the number of bytes that were peeked from the queue, so that +a subsequent peek will return the next data in the queue.i + +If data is removed from the front of the queue via a call to \fBrecv\fP(2) (or +similar) without the \fBMSG_PEEK\fP flag, the "peek offset" will be decreased +by the number of bytes removed. In other words, receiving data without the +\fBMSG_PEEK\fP flag will cause the "peek offset" to be adjusted to maintain the +correct relative position in the queued data, so that a subsequent peek will +retrieve the data that would have been retrieved had the data not been +removed. + +For datagram sockets, if the "peek offset" points to the middle of a packet, +the data returned will be marked with the \fBMSG_TRUNC\fP flag. + +The following example serves to illustrate the use of \fBSO_PEEK_OFF\fP. +Suppose a stream socket has the following queued input data: + + aabbccddeeff + +.IP +The following sequence of \fBrecv\fP(2) calls would have the effect noted in +the comments: + +.in +4n +.nf +int ov = 4; // Set peek offset to 4 +setsockopt(fd, SOL_SOCKET, SO_PEEK_OFF, &ov, sizeof(ov)); + +recv(fd, buf, 2, MSG_PEEK); // Peeks "cc"; offset set to 6 +recv(fd, buf, 2, MSG_PEEK); // Peeks "dd"; offset set to 8 +recv(fd, buf, 2, 0); // Reads "aa"; offset set to 6 +recv(fd, buf, 2, MSG_PEEK); // Peeks "ee"; offset set to 8 +.fi +.in +.TP \fBSO_PEERCRED\fP このソケットに接続してきた外部プロセスの信任状 (credential) を返す。このソケットオプションが利用できるのは、接続された \fBAF_UNIX\fP ストリームソケット間、および \fBsocketpair\fP(2) を使って作成された \fBAF_UNIX\fP @@ -448,6 +494,6 @@ Linux では、 \fBSO_REUSEADDR\fP オプションでポートの再利用が許 \fBcapabilities\fP(7), \fBddp\fP(7), \fBip\fP(7), \fBpacket\fP(7), \fBtcp\fP(7), \fBudp\fP(7), \fBunix\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/svipc.7 b/draft/man7/svipc.7 index 3ccad95f..240357bf 100644 --- a/draft/man7/svipc.7 +++ b/draft/man7/svipc.7 @@ -259,6 +259,6 @@ struct shmid_ds { \fBmsgrcv\fP(2), \fBmsgsnd\fP(2), \fBsemctl\fP(2), \fBsemget\fP(2), \fBsemop\fP(2), \fBshmat\fP(2), \fBshmctl\fP(2), \fBshmdt\fP(2), \fBshmget\fP(2), \fBftok\fP(3) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/tcp.7 b/draft/man7/tcp.7 index 9cc763a2..83c5ffac 100644 --- a/draft/man7/tcp.7 +++ b/draft/man7/tcp.7 @@ -67,7 +67,7 @@ .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* -.TH TCP 7 2012\-04\-23 Linux "Linux Programmer's Manual" +.TH TCP 7 2013\-06\-21 Linux "Linux Programmer's Manual" .SH 名前 tcp \- TCP プロトコル .SH 書式 @@ -538,8 +538,8 @@ TCP ウィンドウを用いるには、 \fI/proc/sys/net/ipv4/tcp_window_scalin .SS ソケットオプション .\" or SOL_TCP on Linux TCP ソケットのオプションは、 オプションレベル引数に \fIIPPROTO_TCP\fP を指定した \fBsetsockopt\fP(2) で設定でき、 -\fBgetsockopt\fP(2) で取得できる。 さらに、ほとんどの \fBIPPROTO_IP\fP ソケットオプションも TCP -ソケットに対して有効である。詳細は \fBip\fP(7) を見よ。 +\fBgetsockopt\fP(2) で取得できる。 注釈がない限り、 \fIoptval\fP は \fIint\fP へのポインタである。 さらに、ほとんどの +\fBIPPROTO_IP\fP ソケットオプションも TCP ソケットに対して有効である。詳細は \fBip\fP(7) を見よ。 .TP \fBTCP_CORK\fP (Linux 2.2 以降) .\" precisely: since 2.1.127 @@ -721,6 +721,6 @@ RFC\ 2581: TCP 輻輳制御アルゴリズム。 .br RFC\ 2018 と RFC\ 2883: SACK とその拡張。 .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/termio.7 b/draft/man7/termio.7 index 459fd1c4..53ea0da0 100644 --- a/draft/man7/termio.7 +++ b/draft/man7/termio.7 @@ -47,6 +47,6 @@ termio \- System V 端末ドライバインタフェース \fBreset\fP(1), \fBsetterm\fP(1), \fBstty\fP(1), \fBtermios\fP(3), \fBtty\fP(4), \fBtty_ioctl\fP(4) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/time.7 b/draft/man7/time.7 index a90c61aa..6a07cb92 100644 --- a/draft/man7/time.7 +++ b/draft/man7/time.7 @@ -112,6 +112,6 @@ Linux 2.6.28 以降では、スレッドの "timer slack" 値を制御するこ \fBpthread_getcpuclockid\fP(3), \fBsleep\fP(3), \fBstrftime\fP(3), \fBstrptime\fP(3), \fBtimeradd\fP(3), \fBusleep\fP(3), \fBrtc\fP(4), \fBhwclock\fP(8) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/udp.7 b/draft/man7/udp.7 index 9af80c42..f1dd282c 100644 --- a/draft/man7/udp.7 +++ b/draft/man7/udp.7 @@ -14,7 +14,7 @@ .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* -.TH UDP 7 2010\-06\-13 Linux "Linux Programmer's Manual" +.TH UDP 7 2013\-06\-21 Linux "Linux Programmer's Manual" .SH 名前 udp \- IPv4 の ユーザーデータグラムプロトコル .SH 書式 @@ -98,7 +98,8 @@ UDP の全ソケットのキューで利用可能なページ数。 \fIudp_mem\fP pressure を超過している場合であっても、 各 UDP ソケットはデータの送信にこのサイズ分だけは使用することができる。 .SS ソケットオプション UDP ソケットオプションを設定または取得するには、 取得には \fBgetsockopt\fP(2) を、設定には \fBsetsockopt\fP(2) -をオプションレベル引数に \fBIPPROTO_UDP\fP を指定して呼び出す。 +をオプションレベル引数に \fBIPPROTO_UDP\fP を指定して呼び出す。 注釈がない限り、 \fIoptval\fP は \fIint\fP +へのポインタである。 .TP \fBUDP_CORK\fP (Linux 2.5.44 以降) .\" FIXME document UDP_ENCAP (new in kernel 2.5.67) @@ -151,6 +152,6 @@ RFC\ 1122 : ホストの必要条件 .br RFC\ 1191 : path MTU discovery の記述 .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/udplite.7 b/draft/man7/udplite.7 index cda8c139..0a4a9956 100644 --- a/draft/man7/udplite.7 +++ b/draft/man7/udplite.7 @@ -117,6 +117,6 @@ RFC\ 3828 for the Lightweight User Datagram Protocol (UDP\-Lite). Linux カーネルソース内の \fIDocumentation/networking/udplite.txt\fP .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/unix.7 b/draft/man7/unix.7 index e624b9ce..bc0b65fb 100644 --- a/draft/man7/unix.7 +++ b/draft/man7/unix.7 @@ -272,6 +272,6 @@ UNIX ドメインのストリーム・ソケットでは、 帯域外データ \fBrecvmsg\fP(2), \fBsendmsg\fP(2), \fBsocket\fP(2), \fBsocketpair\fP(2), \fBcmsg\fP(3), \fBcapabilities\fP(7), \fBcredentials\fP(7), \fBsocket\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/uri.7 b/draft/man7/uri.7 index e5392283..9716efa7 100644 --- a/draft/man7/uri.7 +++ b/draft/man7/uri.7 @@ -50,7 +50,7 @@ .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* -.TH URI 7 2012\-08\-05 Linux "Linux Programmer's Manual" +.TH URI 7 2013\-05\-18 Linux "Linux Programmer's Manual" .SH 名前 uri, url, urn \- uniform resource identifier (URI) (URL と URN も含めて) .SH 書式 @@ -202,7 +202,7 @@ file://\fIip_server\fP/\fIpath_segments\fP .br file:\fIpath_segments\fP .PP -これはローカルに直接アクセスできるファイルを示す。 特殊なケースとして、 \fIhost\fP には "localhost" +これはローカルに直接アクセスできるファイルを示す。 特殊なケースとして、 \fIip_server\fP には "localhost" という文字列を用いたり、空文字にしてもよい。 これは「URI が解釈されたマシン」とみなされる。 path がディレクトリの場合は、ビューアはディレクトリの内容を リンクを張ったかたちで表示するとよいだろう。 しかし現在は、まだ全てのビューアがこの動作をするわけではない。 KDE は生成ファイル (generated file) を URL @@ -487,6 +487,6 @@ URI に、そのプロトコルに対するデリミタがエスケープされ IETF RFC\ 2255 .UE .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/x25.7 b/draft/man7/x25.7 index 04475d2b..e9ef6b00 100644 --- a/draft/man7/x25.7 +++ b/draft/man7/x25.7 @@ -48,8 +48,8 @@ struct sockaddr_x25 { .in .PP \fIsx25_addr\fP には char 配列 \fIx25_addr[]\fP を含まれる。これは 0 で終端する文字列として解釈される。 -\fIsx25_addr.x25_addr[]\fP は 15 個までの ASCII 文字を含むことができ (終端の 0 は含まない)、 これが X.121 -アドレスをなす。 10 進の数文字、\(aq0\(aq から \(aq9\(aq までだけが許される。 +\fIsx25_addr.x25_addr[]\fP は 15 個までの ASCII 文字を含むことができ (終端のヌルバイトは含まない)、 これが +X.121 アドレスをなす。 10 進の数文字、\(aq0\(aq から \(aq9\(aq までだけが許される。 .SS ソケットオプション 以下の X.25 特有のソケットオプションは、 \fBsetsockopt\fP(2) で設定でき、 \fBgetsockopt\fP(2) で取得できる。このとき \fIlevel\fP 引き数には \fBSOL_X25\fP を指定する。 @@ -81,6 +81,6 @@ X.25.\(rq The URL is .UR ftp://ftp.pspt.fi\:/pub\:/ham\:/linux\:/ax25\:/x25doc.tgz .UE . .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。