1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
8 .\" References consulted:
9 .\" GNU glibc-2 source code and manual
10 .\" Dinkumware C library reference http://www.dinkumware.com/
11 .\" OpenGroup's Single UNIX specification
12 .\" http://www.UNIX-systems.org/online.html
15 .\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon <moz@compsoc.man.ac.uk>
17 .\" About this Japanese page, please contact to JM Project <JM@linux.or.jp>
18 .\" Translated Sun Aug 29 15:03:42 JST 1999
19 .\" by FUJIWARA Teruyoshi <fujiwara@linux.or.jp>
20 .\" Updated Sat Oct 27 09:01:41 JST 2001
21 .\" by Yuichi SATO <ysato@h4.dion.ne.jp>
23 .\" WORD: null wide characters ナルワイド文字
25 .TH FGETWS 3 2011-09-28 "GNU" "Linux Programmer's Manual"
28 .\"O fgetws \- read a wide-character string from a FILE stream
29 fgetws \- ワイド文字の文字列を FILE ストリームから読み込む
35 .BI "wchar_t *fgetws(wchar_t *" ws ", int " n ", FILE *" stream );
41 .\"O function is the wide-character equivalent
45 .\"O It reads a string of at most \fIn\-1\fP wide characters into the
46 .\"O wide-character array pointed to by \fIws\fP,
47 .\"O and adds a terminating null wide character (L\(aq\\0\(aq).
48 .\"O It stops reading wide characters after it has encountered and
49 .\"O stored a newline wide character.
50 .\"O It also stops when end of stream is reached.
55 この関数は、最大 \fIn\-1\fP 文字のワイド文字を
56 \fIws\fP が示すワイド文字の配列に読み込み、
57 終端の NULL ワイド文字 (L\(aq\\0\(aq) を追加する。
58 この関数は、ワイド文字の改行文字を見つけ、これを格納すると読み込むのを止める。
59 この関数はストリームの終わりに達した場合も読み込みを止める。
61 .\"O The programmer must ensure that there is room for at least \fIn\fP wide
62 .\"O characters at \fIws\fP.
63 プログラマは、\fIws\fP には少なくとも \fIn\fP 文字のワイド文字を
64 格納できる領域を必ず確保していなければならない。
66 .\"O For a nonlocking counterpart, see
67 .\"O .BR unlocked_stdio (3).
69 .BR unlocked_stdio (3)
71 .\"O .SH "RETURN VALUE"
75 .\"O function, if successful, returns \fIws\fP.
77 .\"O was already reached or if an error occurred, it returns NULL.
80 既にストリームの終わりに達しているか、エラーが起きた場合には NULL を返す。
81 .\"O .SH "CONFORMING TO"
97 .\"O In the absence of additional information passed to the
100 .\"O reasonable to expect that
102 .\"O will actually read a multibyte string
103 .\"O from the stream and then convert it to a wide-character string.
105 システムコールに渡す追加の情報がない場合には、
107 が実際にはマルチバイトシーケンスをストリームから読み込み、
108 これをワイド文字に変換すると期待することは適切である。
110 .\"O This function is unreliable,
111 .\"O because it does not permit to deal properly with
112 .\"O null wide characters that may be present in the input.
113 この関数は信頼できない。なぜなら、入力に含まれるかもしれない
114 ナルワイド文字を適切に処理することができないからである。
118 .BR unlocked_stdio (3)