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.
54 ¤ËÂбþ¤¹¤ë¥ï¥¤¥Éʸ»ú´Ø¿ô¤Ç¤¢¤ë¡£
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).
68 ¤³¤ì¤é¤Î½èÍý¤ò¥í¥Ã¥¯¤»¤º¤Ë¹Ô¤¤¤¿¤¤¤È¤¤Ï¡¢
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.
79 ¤ÏÀ®¸ù¤¹¤ë¤È \fIws\fP ¤òÊÖ¤¹¡£
80 ´û¤Ë¥¹¥È¥ê¡¼¥à¤Î½ª¤ï¤ê¤Ë㤷¤Æ¤¤¤ë¤«¡¢¥¨¥é¡¼¤¬µ¯¤¤¿¾ì¹ç¤Ë¤Ï NULL ¤òÊÖ¤¹¡£
81 .\"O .SH "CONFORMING TO"
93 ¤ÎÆ°ºî¤Ï¡¢¸½ºß¤Î¥í¥±¡¼¥ë¤Î
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)