home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource3
/
163_01
/
getw.c
< prev
next >
Wrap
Text File
|
1988-02-01
|
512b
|
14 lines
/*
** get a word from the stream
*/
#define FILE int
#include "streamio.h"
extern fgetc();
getw(stream) FILE *stream; {
char hi, lo;
if((hi=fgetc(stream)) == EOF) return EOF;
if((lo=fgetc(stream)) == EOF) return EOF;
return (hi << 8) & (lo & 255);
}