fgetws(S)
fgetws --
get a wchar_t string from a stream
Synopsis
#include <stdio.h>
#include <wchar.h>
wchar_t *fgetws(wchar_t *ws, int n, FILE *stream);
Description
The fgetws function reads characters from the stream,
converts these to the corresponding wide-character codes, places
them in the wchar_t array pointed to by ws, until
n-1 characters are read, or a newline character is read,
converted and transferred to ws, or an end-of-file condition
is encountered.
The wide character string, ws, is then terminated with
a NULL wide-character code.
If an error occurs, the resulting value of the file position
indicator for the stream is indeterminate.
The fgetws function may mark the st_atime
field
of the file associated with stream for update.
The st_atime
field will be marked for update by the first
successful execution of fgetc, fgets, fgetwc,
fgetws, fread, fscanf, getc,
getchar, gets, or scanf using
stream that returns data not supplied by a prior
call to ungetc or ungetwc.
Return value
Upon successful completion, fgetws returns ws.
If stream is at end-of-file, the end-of-file indicator for
stream is set and fgetws returns a NULL pointer.
If a read error occurs, the error indicator for stream is set,
fgetws returns a NULL pointer, and errno
is set to indicate the error.
Errors
See
fgetwc(S).
References
ferror(S),
fopen(S),
fread(S),
fscanf(S),
getwc(S),
getws(S),
Intro(S),
widec(S)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005