www.delorie.com/djgpp/doc/libc/libc_423.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

getw

Syntax

 
#include <stdio.h>

int getw(FILE *file);

Description

Reads a single 32-bit binary word in native format from file. This function is provided for compatibility with other 32-bit environments, so it reads a 32-bit int, not a 16-bit short, like some 16-bit DOS compilers do.

See section putw.

Return Value

The value read, or EOF for end-of-file or error. Since EOF is a valid integer, you should use feof or ferror to detect this situation.

Portability

ANSI/ISO C No
POSIX No

Example

 
int i = getw(stdin);


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004