1FGETWS(3P)                 POSIX Programmer's Manual                FGETWS(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       fgetws — get a wide-character string from a stream
14

SYNOPSIS

16       #include <stdio.h>
17       #include <wchar.h>
18
19       wchar_t *fgetws(wchar_t *restrict ws, int n,
20           FILE *restrict stream);
21

DESCRIPTION

23       The functionality described on this reference page is aligned with  the
24       ISO C  standard.  Any  conflict between the requirements described here
25       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2008
26       defers to the ISO C standard.
27
28       The  fgetws()  function  shall read characters from the stream, convert
29       these to the corresponding wide-character  codes,  place  them  in  the
30       wchar_t  array  pointed  to  by ws, until n−1 characters are read, or a
31       <newline> is read, converted, and transferred to ws, or an  end-of-file
32       condition  is encountered. The wide-character string, ws, shall then be
33       terminated with a null wide-character code.
34
35       If an error occurs, the resulting value of the file position  indicator
36       for the stream is unspecified.
37
38       The  fgetws()  function  may mark the last data access timestamp of the
39       file associated with stream for update. The last data access  timestamp
40       shall  be  marked  for  update  by  the  first  successful execution of
41       fgetwc(), fgetws(), fwscanf(), getwc(),  getwchar(),  vfwscanf(),  vws‐
42       canf(),  or  wscanf()  using stream that returns data not supplied by a
43       prior call to ungetwc().
44

RETURN VALUE

46       Upon successful completion, fgetws() shall return ws.  If  the  end-of-
47       file  indicator  for  the stream is set, or if the stream is at end-of-
48       file, the end-of-file  indicator  for  the  stream  shall  be  set  and
49       fgetws() shall return a null pointer. If a read error occurs, the error
50       indicator for the stream shall be set, fgetws()  shall  return  a  null
51       pointer, and shall set errno to indicate the error.
52

ERRORS

54       Refer to fgetwc().
55
56       The following sections are informative.
57

EXAMPLES

59       None.
60

APPLICATION USAGE

62       None.
63

RATIONALE

65       None.
66

FUTURE DIRECTIONS

68       None.
69

SEE ALSO

71       Section 2.5, Standard I/O Streams, fopen(), fread()
72
73       The Base Definitions volume of POSIX.1‐2008, <stdio.h>, <wchar.h>
74
76       Portions  of  this text are reprinted and reproduced in electronic form
77       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
78       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
79       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
80       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
81       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
82       event of any discrepancy between this version and the original IEEE and
83       The Open Group Standard, the original IEEE and The Open Group  Standard
84       is  the  referee document. The original Standard can be obtained online
85       at http://www.unix.org/online.html .
86
87       Any typographical or formatting errors that appear  in  this  page  are
88       most likely to have been introduced during the conversion of the source
89       files to man page format. To report such errors,  see  https://www.ker
90       nel.org/doc/man-pages/reporting_bugs.html .
91
92
93
94IEEE/The Open Group                  2013                           FGETWS(3P)
Impressum