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