|
|
HP-UX Reference > Ffgetws(3C)HP-UX 11i Version 2: December 2007 Update |
|
NAMEfgetws(), fgetws_unlocked() — get a wide character string from a stream file SYNOPSIS#include <stdio.h> #include <wchar.h> wchar_t *fgetws(wchar_t *ws, int n, FILE *stream); Remarksfgetws() is compliant with the XPG4 Worldwide Portability Interface wide-character I/O functions. It parallels the 8-bit character I/O function defined in gets(3S). DESCRIPTION
The definition for this functions and the type wchar_t are provided in the <wchar.h> header. APPLICATION USAGEAfter fgetws() is applied to a stream, the stream becomes wide-oriented (see orientation(5)). RETURN VALUEUpon successful completion, fgetws() and fgetws_unlocked() return ws. If the stream is at end-of-file, the end-of-file indicator for the stream is set and a null pointer is returned. If a read error occurs, the error indicator for the stream is set, errno is set to indicate the error, and a null pointer is returned. ferror() and feof() can be used to distinguish between an error condition and an end-of-file condition. ERRORSfgetws() or fgetws_unlocked() fails if data needs to be read into the stream's buffer and another error occurs, errno is set to one of the following:
Additional errno values can be set by the underlying read() function (see read(2)). WARNINGSfgetws_unlocked() is an obsolescent interface supported only for compatibility with existing DCE applications. New multithreaded applications should use fgetws(). SEE ALSOferror(3S), flockfile(3S), fopen(3S), fread(3S), getwc(3C), putws(3C), scanf(3S), orientation(5), thread_safety(5). |
|