Rev | Author | # | Line |
---|---|---|---|
1 | perry | 1 | GETW |
2 | !!!GETW | ||
3 | NAME | ||
4 | SYNOPSIS | ||
5 | DESCRIPTION | ||
6 | RETURN VALUE | ||
7 | BUGS | ||
8 | CONFORMING TO | ||
9 | SEE ALSO | ||
10 | ---- | ||
11 | !!NAME | ||
12 | |||
13 | |||
14 | getw, putw - input and output of words (ints) | ||
15 | !!SYNOPSIS | ||
16 | |||
17 | |||
18 | __#include | ||
19 | __''stream''__); | ||
20 | int putw(int__ ''w''__, FILE *__''stream''__); | ||
21 | __ | ||
22 | !!DESCRIPTION | ||
23 | |||
24 | |||
25 | __getw__ reads a word (that is, an __int__) from | ||
26 | ''stream''. It's provided for compatibility with SVID. We | ||
27 | recommend you use fread(3) instead. | ||
28 | |||
29 | |||
30 | __putw__ writes the word ''w'' (that is, an | ||
31 | __int__) to ''stream''. It is provided for | ||
32 | compatibility with SVID, but we recommend you use | ||
33 | fwrite(3) instead. | ||
34 | !!RETURN VALUE | ||
35 | |||
36 | |||
37 | Normally, __getw__ returns the word read, and __putw__ | ||
38 | returns 0. On error, they return __EOF__. | ||
39 | !!BUGS | ||
40 | |||
41 | |||
42 | The value returned on error is also a legitimate data value. | ||
43 | ferror(3) can be used to distinguish between the two | ||
44 | cases. | ||
45 | !!CONFORMING TO | ||
46 | |||
47 | |||
48 | SVID | ||
49 | !!SEE ALSO | ||
50 | |||
51 | |||
52 | fread(3), fwrite(3), ferror(3), | ||
53 | getc(3), putc(3) | ||
54 | ---- |