repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Uninitialized vector entry?
[minix3.git]
/
lib
/
other
/
putw.c
blob
807f67f4e91aea5a7dca5a0a37e3d26931c6543b
1
/*
2
* putw - write an word on a stream
3
*/
4
/* $Header$ */
5
6
#include <stdio.h>
7
8
_PROTOTYPE
(
int
putw
, (
int
w
,
FILE
*
stream
));
9
10
int
11
putw
(
w
,
stream
)
12
int
w
;
13
register
FILE
*
stream
;
14
{
15
register
int
cnt
=
sizeof
(
int
);
16
register
char
*
p
= (
char
*) &
w
;
17
18
while
(
cnt
--) {
19
putc
(*
p
++,
stream
);
20
}
21
if
(
ferror
(
stream
))
return
EOF
;
22
return
w
;
23
}