home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_100 / 163_01 / getw.c < prev    next >
Text File  |  1988-01-31  |  512b  |  14 lines

  1. /*
  2. ** get a word from the stream
  3. */
  4. #define FILE int
  5. #include "streamio.h"
  6. extern fgetc();
  7.  
  8. getw(stream) FILE *stream; {
  9.   char hi, lo;
  10.   if((hi=fgetc(stream)) == EOF) return EOF;
  11.   if((lo=fgetc(stream)) == EOF) return EOF;
  12.   return (hi << 8) & (lo & 255);
  13.   }
  14.