.\" Copyright 1993 Mitchum DSouza .\" .\" 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. .\" .\" Updated, aeb, 980809 .\" .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka .\" all rights reserved. .\" Translated Tue Dec 16 19:43:01 JST 1997 .\" by HIROFUMI Nishizuka .\" Updated & Modified Mon Mar 1 1999 .\" by NAKANO Takeo .\" .TH CATGETS 3 1998-08-09 "" "Linux Programmer's Manual" .\"O .SH NAME .\"O catgets \- get message from a message catalog .SH 名前 catgets \- メッセージカタログからメッセージを取り出す .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .BI "char *catgets(nl_catd " catalog ", int " set_number \ ", int " message_number , .BI " const char *" message ); .fi .\"O .SH DESCRIPTION .SH 説明 .\"O .BR catgets () .\"O reads the message .\"O .IR message_number , .\"O in set .\"O .IR set_number , .\"O from the message catalog identified by .\"O .IR catalog , .\"O where .\"O .I catalog .\"O is a catalog descriptor returned from an earlier call to .\"O .BR catopen (3). .BR catgets () は catalog で指定されたメッセージカタログから、 セット .I set_number のメッセージ .I message_number を読み取る。 .I catalog は、 .BR catopen (3) の呼び出しによって得られたカタログ ディスクリプタを指定する。 .\"O The fourth argument .\"O .I message .\"O points to a default message string which will be returned by .\"O .BR catgets () .\"O if the identified message catalog is not currently available. .\"O The .\"O message-text is contained in an internal buffer area and should be copied by .\"O the application if it is to be saved or modified. .\"O The return string is .\"O always terminated with a null byte. 4番目の引数 .I message は、指定のメッセージカタログが現在利用できない 場合に .BR catgets () が返すデフォルトのメッセージを指す。 メッセージテキストは内部のバッファ領域に格納されており、 保存や変更を行う場合にはアプリケーション側でコピーする必要がある。 返される文字列は常にヌル文字で終端される。 .\"O .SH "RETURN VALUE" .SH 返り値 .LP .\"O On success, .\"O .BR catgets () .\"O returns a pointer to an internal buffer area .\"O containing the null-terminated message string. 成功した場合、 .BR catgets () は内部のバッファ領域へのポインタを返す。 ここにはヌル文字で終端されたメッセージ文字列が格納されている。 .\"O On failure, .\"O .BR catgets () .\"O returns the value .\"O .IR message . 失敗した場合は .I message を返す。 .\"O .SH "CONFORMING TO" .SH 準拠 POSIX.1-2001. .\"O .SH NOTES .SH 注意 .\"O These functions are only available in libc.so.4.4.4c and above. .\"O The Jan 1987 X/Open Portability Guide specifies a more subtle .\"O error return: .\"O .I message .\"O is returned if the message catalog specified by .\"O .I catalog .\"O is not available, while an empty string is returned .\"O when the message catalog is available but does not contain .\"O the specified message. これらの関数は libc.so.4.4.4c 以降でしか使えない。 Jan 1987 X/Open Portability Guide では、エラーの時に 返される値により微妙な指定をしている。 .I catalog で指定されたメッセージカタログが利用できない場合は .I message を返し、一方メッセージカタログはあるが指定したメッセージがない場合は 空の文字列が返される。 .\"O These two possible error returns seem to be discarded in SUSv2 .\"O in favor of always returning .\"O .IR message . SUSv2 ではこの二種類のエラーリターンは廃止され、 常に .I message を返すことにしたようである。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR catopen (3), .BR setlocale (3)