make it possible to compile new versions of db that load against
[unix-history] / usr / src / lib / libc / stdio / putw.c
CommitLineData
411867e7 1/*-
7860c229
KB
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
411867e7
KB
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * %sccs.include.redist.c%
9 */
10
2ce81398 11#if defined(LIBC_SCCS) && !defined(lint)
7860c229 12static char sccsid[] = "@(#)putw.c 8.1 (Berkeley) %G%";
411867e7 13#endif /* LIBC_SCCS and not lint */
b8f253e8 14
516bee5b 15#include <stdio.h>
411867e7 16#include "fvwrite.h"
516bee5b 17
411867e7
KB
18putw(w, fp)
19 int w;
20 FILE *fp;
516bee5b 21{
411867e7
KB
22 struct __suio uio;
23 struct __siov iov;
516bee5b 24
411867e7
KB
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));
516bee5b 30}