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
15   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
16
17       getw(), putw():
18           Since glibc 2.3.3:
19               _SVID_SOURCE || _BSD_SOURCE ||
20               (_XOPEN_SOURCE &&
21                   !(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))
22           Before glibc 2.3.3:
23               _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE
24

DESCRIPTION

26       getw()  reads  a word (that is, an int) from stream.  It's provided for
27       compatibility with SVr4.  We recommend you use fread(3) instead.
28
29       putw() writes the word w (that is, an int) to stream.  It  is  provided
30       for  compatibility  with  SVr4,  but  we  recommend  you  use fwrite(3)
31       instead.
32

RETURN VALUE

34       Normally, getw() returns the word  read,  and  putw()  returns  0.   On
35       error, they return EOF.
36

CONFORMING TO

38       SVr4, SUSv2.  Not present in POSIX.1-2001.
39

BUGS

41       The value returned on error is also a legitimate data value.  ferror(3)
42       can be used to distinguish between the two cases.
43

SEE ALSO

45       ferror(3), fread(3), fwrite(3), getc(3), putc(3)
46

COLOPHON

48       This page is part of release 3.53 of the Linux  man-pages  project.   A
49       description  of  the project, and information about reporting bugs, can
50       be found at http://www.kernel.org/doc/man-pages/.
51
52
53
54GNU                               2010-09-26                           GETW(3)
Impressum