xref: /original-bsd/lib/libc/stdio/putw.c (revision 2301fdfb)
1 #if defined(LIBC_SCCS) && !defined(lint)
2 static char sccsid[] = "@(#)putw.c	5.2 (Berkeley) 03/09/86";
3 #endif LIBC_SCCS and not lint
4 
5 #include <stdio.h>
6 
7 putw(w, iop)
8 register FILE *iop;
9 {
10 	register char *p;
11 	register i;
12 
13 	p = (char *)&w;
14 	for (i=sizeof(int); --i>=0;)
15 		putc(*p++, iop);
16 	return(ferror(iop));
17 }
18