ack/lang/cem/libcc/stdio/getw.c

17 lines
239 B
C
Raw Permalink Normal View History

1994-06-24 14:02:31 +00:00
/* $Id$ */
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);
}
1989-06-19 09:56:16 +00:00
if (feof(iop) || ferror(iop)) return EOF;
1987-01-27 15:57:55 +00:00
return w;
}