.\" Copyright 1993 Mitchum DSouza .\" .\" %%%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 .\" .\" Updated, aeb, 980809 .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" 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 2013\-06\-21 "" "Linux Programmer's Manual" .SH 名前 catgets \- メッセージカタログからメッセージを取り出す .SH 書式 .nf \fB#include \fP \fBchar *catgets(nl_catd \fP\fIcatalog\fP\fB, int \fP\fIset_number\fP\fB, int \fP\fImessage_number\fP\fB,\fP \fB const char *\fP\fImessage\fP\fB);\fP .fi .SH 説明 \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() は内部のバッファ領域へのポインタを返す。 ここにはヌル文字で終端されたメッセージ文字列が格納されている。 失敗した場合は \fImessage\fP を返す。 .SH 準拠 POSIX.1\-2001. .SH 注意 これらの関数は libc.so.4.4.4c 以降でしか使えない。 Jan 1987 X/Open Portability Guide では、エラーの時に 返される値により微妙な指定をしている。 \fIcatalog\fP で指定されたメッセージカタログが利用できない場合は \fImessage\fP を返し、一方メッセージカタログはあるが指定したメッセージがない場合は 空の文字列が返される。 SUSv2 ではこの二種類のエラーリターンは廃止され、 常に \fImessage\fP を返すことにしたようである。 .SH 関連項目 \fBcatopen\fP(3), \fBsetlocale\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。