Upon successful completion,
fgetws() returns
ws. If end-of-file occurs before any characters are read,
fgetws() returns
NULL and the buffer contents remain unchanged. If an error occurs,
fgetws() returns
NULL and the buffer contents are indeterminate. The
fgetws() function does not distinguish between end-of-file and error, and callers must use
feof(3) and
ferror(3) to determine which occurred.