| <html lang="en"> |
| <head> |
| <title>fgetws - Untitled</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="Untitled"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="Stdio.html#Stdio" title="Stdio"> |
| <link rel="prev" href="fgetwc.html#fgetwc" title="fgetwc"> |
| <link rel="next" href="fileno.html#fileno" title="fileno"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="fgetws"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="fileno.html#fileno">fileno</a>, |
| Previous: <a rel="previous" accesskey="p" href="fgetwc.html#fgetwc">fgetwc</a>, |
| Up: <a rel="up" accesskey="u" href="Stdio.html#Stdio">Stdio</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">4.14 <code>fgetws</code>—get wide character string from a file or stream</h3> |
| |
| <p><a name="index-fgetws-174"></a><a name="index-g_t_005ffgetws_005fr-175"></a><strong>Synopsis</strong> |
| <pre class="example"> #include <wchar.h> |
| wchar_t *fgetws(wchar_t *<var>ws</var>, int <var>n</var>, FILE *<var>fp</var>); |
| |
| #include <wchar.h> |
| wchar_t *_fgetws_r(struct _reent *<var>ptr</var>, wchar_t *<var>ws</var>, int <var>n</var>, FILE *<var>fp</var>); |
| |
| </pre> |
| <p><strong>Description</strong><br> |
| Reads at most <var>n-1</var> wide characters from <var>fp</var> until a newline |
| is found. The wide characters including to the newline are stored |
| in <var>ws</var>. The buffer is terminated with a 0. |
| |
| <p>The <code>_fgetws_r</code> function is simply the reentrant version of |
| <code>fgetws</code> and is passed an additional reentrancy structure |
| pointer: <var>ptr</var>. |
| |
| <p><br> |
| <strong>Returns</strong><br> |
| <code>fgetws</code> returns the buffer passed to it, with the data |
| filled in. If end of file occurs with some data already |
| accumulated, the data is returned with no other indication. If |
| no data are read, NULL is returned instead. |
| |
| <p><br> |
| <strong>Portability</strong><br> |
| C99, POSIX.1-2001 |
| |
| <p><br> |
| |
| </body></html> |
| |