NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
#include <stdio.h> include <widec.h>wchar_t *getws(wchar_t *s);
#include <stdio.h> include <wchar.h>wchar_t *fgetws(wchar_t *s, int n, FILE*stream);
The getws() function reads a string of Extended Unix Code (EUC) characters from the standard input stream, stdin, converts it to process code, and writes it to the array pointed to by s, until a new-line character is read or an end-of-file condition is encountered. The newline character is discarded and the string is terminated with a wchar_t null character. The getws() function returns its argument.
The fgetws() function reads EUC characters from the stream, converts them to Process Code, and writes them to the array pointed to by s. It stops when either n-1 characters are read, a newline character is read and transferred to s, or an end-of-file condition is encountered. The string is then terminated with a wchar_t null character. The fgetws() function returns its first argument.
If end-of-file is encountered and no characters have been read, no characters are transferred to s and a null pointer is returned. If a read error occurs, such as trying to use these functions on a file that has not been opened for reading, a null pointer is returned. Otherwise, s is returned.
The fgetws() function will fail if data needs to be read and:
The file is a regular file and an attempt was made to read at or beyond the offset maximum associated with the corresponding stream.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
MT-Level | MT-Safe |
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO