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
13 int putw(int w, FILE *stream);
14
16 getw() reads a word (that is, an int) from stream. It's provided for
17 compatibility with SVr4. We recommend you use fread(3) instead.
18
19 putw() writes the word w (that is, an int) to stream. It is provided
20 for compatibility with SVr4, but we recommend you use fwrite(3)
21 instead.
22
24 Normally, getw() returns the word read, and putw() returns 0. On
25 error, they return EOF.
26
28 SVr4, SUSv2. Not present in POSIX.1-2001.
29
31 The value returned on error is also a legitimate data value. ferror(3)
32 can be used to distinguish between the two cases.
33
35 ferror(3), fread(3), fwrite(3), getc(3), putc(3)
36
38 This page is part of release 3.25 of the Linux man-pages project. A
39 description of the project, and information about reporting bugs, can
40 be found at http://www.kernel.org/doc/man-pages/.
41
42
43
44GNU 2007-12-20 GETW(3)