OSDN Git Service

(split) LDP: Restore and add Copyrights for draft pages
[linuxjm/LDP_man-pages.git] / draft / man3 / fgetws.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\" %%%LICENSE_END
9 .\"
10 .\" References consulted:
11 .\"   GNU glibc-2 source code and manual
12 .\"   Dinkumware C library reference http://www.dinkumware.com/
13 .\"   OpenGroup's Single UNIX specification
14 .\"     http://www.UNIX-systems.org/online.html
15 .\"   ISO/IEC 9899:1999
16 .\"
17 .\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon <moz@compsoc.man.ac.uk>
18 .\"*******************************************************************
19 .\"
20 .\" This file was generated with po4a. Translate the source file.
21 .\"
22 .\"*******************************************************************
23 .\"
24 .\" Translated Sun Aug 29 15:03:42 JST 1999
25 .\"           by FUJIWARA Teruyoshi <fujiwara@linux.or.jp>
26 .\" Updated Sat Oct 27 09:01:41 JST 2001
27 .\"           by Yuichi SATO <ysato@h4.dion.ne.jp>
28 .\"
29 .TH FGETWS 3 2011\-09\-28 GNU "Linux Programmer's Manual"
30 .SH 名前
31 fgetws \- ワイド文字の文字列を FILE ストリームから読み込む
32 .SH 書式
33 .nf
34 \fB#include <wchar.h>\fP
35 .sp
36 \fBwchar_t *fgetws(wchar_t *\fP\fIws\fP\fB, int \fP\fIn\fP\fB, FILE *\fP\fIstream\fP\fB);\fP
37 .fi
38 .SH 説明
39 \fBfgetws\fP()  関数は \fBfgets\fP(3)  に対応するワイド文字関数である。 この関数は、最大 \fIn\-1\fP 文字のワイド文字を
40 \fIws\fP が示すワイド文字の配列に読み込み、 終端の NULL ワイド文字 (L\(aq\e0\(aq) を追加する。
41 この関数は、ワイド文字の改行文字を見つけ、これを格納すると読み込むのを止める。 この関数はストリームの終わりに達した場合も読み込みを止める。
42 .PP
43 プログラマは、\fIws\fP には少なくとも \fIn\fP 文字のワイド文字を 格納できる領域を必ず確保していなければならない。
44 .PP
45 これらの処理を停止せずに行いたいときは、 \fBunlocked_stdio\fP(3) を参照のこと。
46 .SH 返り値
47 \fBfgetws\fP()  は成功すると \fIws\fP を返す。 既にストリームの終わりに達しているか、エラーが起きた場合には NULL を返す。
48 .SH 準拠
49 C99, POSIX.1\-2001.
50 .SH 注意
51 \fBfgetws\fP()  の動作は、現在のロケールの \fBLC_CTYPE\fP カテゴリに依存する。
52 .PP
53 \fBfopen\fP(3)  システムコールに渡す追加の情報がない場合には、 \fBfgetws\fP()
54 が実際にはマルチバイトシーケンスをストリームから読み込み、 これをワイド文字に変換すると期待することは適切である。
55 .PP
56 この関数は信頼できない。なぜなら、入力に含まれるかもしれない ナルワイド文字を適切に処理することができないからである。
57 .SH 関連項目
58 \fBfgetwc\fP(3), \fBunlocked_stdio\fP(3)
59 .SH この文書について
60 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
61 である。プロジェクトの説明とバグ報告に関する情報は
62 http://www.kernel.org/doc/man\-pages/ に書かれている。