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[] = "@(#)fputs.c 5.3 (Berkeley) 01/20/91"; 13 #endif /* LIBC_SCCS and not lint */ 14 15 #include <sys/stdc.h> 16 #include <stdio.h> 17 #include <string.h> 18 #include "fvwrite.h" 19 20 /* 21 * Write the given string to the given file. 22 */ 23 fputs(s, fp) 24 char *s; 25 FILE *fp; 26 { 27 struct __suio uio; 28 struct __siov iov; 29 30 iov.iov_base = s; 31 iov.iov_len = uio.uio_resid = strlen(s); 32 uio.uio_iov = &iov; 33 uio.uio_iovcnt = 1; 34 return (__sfvwrite(fp, &uio)); 35 } 36