gcc/libio/stdio/getw.c
Jason Merrill 6599da043e Initial revision
From-SVN: r14877
1997-08-21 18:57:35 -04:00

14 lines
226 B
C

#include "libioP.h"
#include "stdio.h"
int
getw(fp)
FILE *fp;
{
int w;
_IO_size_t bytes_read;
CHECK_FILE(fp, EOF);
bytes_read = _IO_sgetn (fp, (char*)&w, sizeof(w));
return sizeof(w) == bytes_read ? w : EOF;
}