1GETW(3) Linux Programmer's Manual GETW(3)
2
3
4
6 getw, putw - input and output of words (ints)
7
9 #include <stdio.h>
10
11 int getw(FILE *stream);
12 int putw(int w, FILE *stream);
13
15 getw() reads a word (that is, an int) from stream. It's provided for
16 compatibility with SVr4. We recommend you use fread(3) instead.
17
18 putw() writes the word w (that is, an int) to stream. It is provided
19 for compatibility with SVr4, but we recommend you use fwrite(3)
20 instead.
21
23 Normally, getw() returns the word read, and putw() returns 0. On
24 error, they return EOF.
25
27 The value returned on error is also a legitimate data value. ferror(3)
28 can be used to distinguish between the two cases.
29
31 SVr4
32
34 ferror(3), fread(3), fwrite(3), getc(3), putc(3)
35
36
37
38GNU 1995-09-16 GETW(3)