*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> getw (3)              



NAME    [Toc]    [Back]

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

SYNOPSIS    [Toc]    [Back]

       #include <stdio.h>

       int getw(FILE *stream);
       int putw(int w, FILE *stream);

DESCRIPTION    [Toc]    [Back]

       getw reads a word (that is, an int) from stream. It's provided for compatibility
 with SVID.  We recommend you use fread(3) instead.

       putw writes the word w (that is, an int) to stream.  It is provided for
       compatibility with SVID, but we recommend you use fwrite(3) instead.

RETURN VALUE    [Toc]    [Back]

       Normally,  getw	returns  the word read, and putw returns 0.  On error,
       they return EOF.

BUGS    [Toc]    [Back]

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

CONFORMING TO    [Toc]    [Back]


SEE ALSO    [Toc]    [Back]

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

GNU				  1995-09-16			       GETW(3)
[ Back ]
 Similar pages
Name OS Title
poll IRIX input/output multiplexing
ios IRIX input/output formatting
fread IRIX binary input/output
fread NetBSD binary stream input/output
fwrite NetBSD binary stream input/output
fwrite_unlocked Tru64 Perform input/output operations
ioperm Linux set port input/output permissions
fwrite Tru64 Perform input/output operations
fread Linux binary stream input/output
fread_unlocked Tru64 Perform input/output operations
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service