home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libc / libc-4.6 / libc-4 / libc-linux / libio-4.6.26 / stdio / getw.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-12  |  226 b   |  14 lines

  1. #include "libioP.h"
  2. #include "stdio.h"
  3.  
  4. int
  5. getw(fp)
  6.      FILE *fp;
  7. {
  8.   int w;
  9.   _IO_size_t bytes_read;
  10.   CHECK_FILE(fp, EOF);
  11.   bytes_read = _IO_sgetn (fp, (char*)&w, sizeof(w));
  12.   return sizeof(w) == bytes_read ? w : EOF;
  13. }
  14.