home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / stdio / putw.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-26  |  260 b   |  16 lines

  1. /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
  2. #include <stdio.h>
  3. #include <libc/file.h>
  4.  
  5. int
  6. putw(int w, FILE *f)
  7. {
  8.   char *p;
  9.   int i;
  10.  
  11.   p = (char *)&w;
  12.   for (i=sizeof(int); --i>=0;)
  13.     putc(*p++, f);
  14.   return ferror(f);
  15. }
  16.