GETW - get word of input.

(Compatible with UNIX System V C)

Usage:

#include <stdio.h>
i = getw( f );

Where:

FILE *f;
points to the file to be read.
int i;
is the word read from the file.

Description:

"getw" reads the specified file and returns enough data to fill a machine word. It returns EOF if end-of-file has been reached, or if an error occurs. Since EOF is a valid integer value, you should use "feof" and "ferror" to make sure that the EOF you receive is not just a value from the file.

"getw" assumes no special alignment in the file; therefore it is not necessary to worry about "word boundaries" in the input.

See Also:

expl c lib feof

expl c lib ferror

expl c lib putw

Copyright © 1996, Thinkage Ltd.