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 .TH FGETWS 3 2011-09-28 "GNU" "Linux Programmer's Manual"
20 fgetws \- read a wide-character string from a FILE stream
25 .BI "wchar_t *fgetws(wchar_t *" ws ", int " n ", FILE *" stream );
30 function is the wide-character equivalent
34 It reads a string of at most \fIn\-1\fP wide characters into the
35 wide-character array pointed to by \fIws\fP,
36 and adds a terminating null wide character (L\(aq\\0\(aq).
37 It stops reading wide characters after it has encountered and
38 stored a newline wide character.
39 It also stops when end of stream is reached.
41 The programmer must ensure that there is room for at least \fIn\fP wide
42 characters at \fIws\fP.
44 For a nonlocking counterpart, see
45 .BR unlocked_stdio (3).
49 function, if successful, returns \fIws\fP.
51 was already reached or if an error occurred, it returns NULL.
62 In the absence of additional information passed to the
65 reasonable to expect that
67 will actually read a multibyte string
68 from the stream and then convert it to a wide-character string.
70 This function is unreliable,
71 because it does not permit to deal properly with
72 null wide characters that may be present in the input.
75 .BR unlocked_stdio (3)