1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
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.
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
17 .\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon <moz@compsoc.man.ac.uk>
18 .\"*******************************************************************
20 .\" This file was generated with po4a. Translate the source file.
22 .\"*******************************************************************
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>
29 .TH FGETWS 3 2011\-09\-28 GNU "Linux Programmer's Manual"
31 fgetws \- ワイド文字の文字列を FILE ストリームから読み込む
34 \fB#include <wchar.h>\fP
36 \fBwchar_t *fgetws(wchar_t *\fP\fIws\fP\fB, int \fP\fIn\fP\fB, FILE *\fP\fIstream\fP\fB);\fP
39 \fBfgetws\fP() 関数は \fBfgets\fP(3) に対応するワイド文字関数である。 この関数は、最大 \fIn\-1\fP 文字のワイド文字を
40 \fIws\fP が示すワイド文字の配列に読み込み、 終端の NULL ワイド文字 (L\(aq\e0\(aq) を追加する。
41 この関数は、ワイド文字の改行文字を見つけ、これを格納すると読み込むのを止める。 この関数はストリームの終わりに達した場合も読み込みを止める。
43 プログラマは、\fIws\fP には少なくとも \fIn\fP 文字のワイド文字を 格納できる領域を必ず確保していなければならない。
45 これらの処理を停止せずに行いたいときは、 \fBunlocked_stdio\fP(3) を参照のこと。
47 \fBfgetws\fP() は成功すると \fIws\fP を返す。 既にストリームの終わりに達しているか、エラーが起きた場合には NULL を返す。
51 \fBfgetws\fP() の動作は、現在のロケールの \fBLC_CTYPE\fP カテゴリに依存する。
53 \fBfopen\fP(3) システムコールに渡す追加の情報がない場合には、 \fBfgetws\fP()
54 が実際にはマルチバイトシーケンスをストリームから読み込み、 これをワイド文字に変換すると期待することは適切である。
56 この関数は信頼できない。なぜなら、入力に含まれるかもしれない ナルワイド文字を適切に処理することができないからである。
58 \fBfgetwc\fP(3), \fBunlocked_stdio\fP(3)
60 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
61 である。プロジェクトの説明とバグ報告に関する情報は
62 http://www.kernel.org/doc/man\-pages/ に書かれている。