public
/
Ack-5.5.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Pristine Ack-5.5
[Ack-5.5.git]
/
lang
/
cem
/
libcc.ansi
/
misc
/
putw.c
1
/*
2
* putw - write an word on a stream
3
*/
4
/* $Id: putw.c,v 1.2 1994/06/24 11:45:41 ceriel Exp $ */
5
6
#include <stdio.h>
7
8
int
9
putw(int w, register FILE *stream)
10
{
11
register int cnt = sizeof(int);
12
register char *p = (char *) &w;
13
14
while (cnt--) {
15
putc(*p++, stream);
16
}
17
if (ferror(stream)) return EOF;
18
return w;
19
}