1GETW(3)                    Linux Programmer's Manual                   GETW(3)
2
3
4

NAME

6       getw, putw - input and output of words (ints)
7

SYNOPSIS

9       #include <stdio.h>
10
11       int getw(FILE *stream);
12
13       int putw(int w, FILE *stream);
14

DESCRIPTION

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

RETURN VALUE

24       Normally, getw() returns the word  read,  and  putw()  returns  0.   On
25       error, they return EOF.
26

CONFORMING TO

28       SVr4, SUSv2.  Not present in POSIX.1-2001.
29

BUGS

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

SEE ALSO

35       ferror(3), fread(3), fwrite(3), getc(3), putc(3)
36

COLOPHON

38       This page is part of release 3.22 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)
Impressum