Trailing-Edge
-
PDP-10 Archives
-
SRI_NIC_PERM_FS_1_19910112
-
kccdist/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
*
* Copyright (C) 1986 by Ian Macky, SRI International
*/
#include "stdio.h"
#include "c-env.h"
int putw(w, f)
int w;
FILE *f;
{
if (!_writeable(f)) return EOF;
#if SYS_T20+SYS_10X
putc((w & 0777000000000) >> (9 * 3), f);
putc((w & 0777000000) >> (9 * 2), f);
putc((w & 0777000) >> 9, f);
putc(w & 0777, f);
return w;
#else
return EOF;
#endif
}