1987-03-31 10:45:53 +00:00
|
|
|
/* $Header$ */
|
1987-01-27 15:57:55 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int getw(iop)
|
|
|
|
register FILE *iop;
|
|
|
|
{
|
|
|
|
register int cnt = sizeof(int);
|
|
|
|
int w;
|
|
|
|
register char *p = (char *) &w;
|
|
|
|
|
|
|
|
while (cnt--) {
|
|
|
|
*p++ = getc(iop);
|
|
|
|
}
|
|
|
|
if (foef(iop) || ferror(iop)) return EOF;
|
|
|
|
return w;
|
|
|
|
}
|