1 /*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Chris Torek. 7 * 8 * %sccs.include.redist.c% 9 */ 10 11 #if defined(LIBC_SCCS) && !defined(lint) 12 static char sccsid[] = "@(#)putw.c 5.3 (Berkeley) 01/20/91"; 13 #endif /* LIBC_SCCS and not lint */ 14 15 #include <stdio.h> 16 #include "fvwrite.h" 17 18 putw(w, fp) 19 int w; 20 FILE *fp; 21 { 22 struct __suio uio; 23 struct __siov iov; 24 25 iov.iov_base = &w; 26 iov.iov_len = uio.uio_resid = sizeof(w); 27 uio.uio_iov = &iov; 28 uio.uio_iovcnt = 1; 29 return (__sfvwrite(fp, &uio)); 30 } 31