Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - kcc-6/lib/stdio/putw.c
There are 7 other files named putw.c in the archive. Click here to see a list.
/*
**	PUTW	- write an int to a stream
**
**	(c) Copyright Ken Harrenstien 1989
**
*/

#include <stdio.h>

int putw(val, f)
int val;
FILE *f;
{
    register int i = sizeof(int);
    register char *cp = ((char *)&val)-1;

    do {
	putc(*++cp, f);
    } while (--i > 0);

    return feof(f) ? EOF : val;
}