2 * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
4 * Copyright (c) 1990, 1993
5 * The Regents of the University of California. All rights reserved.
7 * This code is derived from software contributed to Berkeley by
10 * By using this file, you agree to the terms and conditions set
11 * forth in the LICENSE file which can be found at the top level of
12 * the sendmail distribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
18 SM_RCSID("@(#)$Id: fput.c,v 1.18 2001/01/28 00:29:35 ca Exp $")
22 #include <sm/assert.h>
27 ** SM_IO_FPUTS -- add a string to the buffer for the file pointer
30 ** fp -- the file pointer for the buffer to be written to
31 ** timeout -- time to complete the put-string
32 ** s -- string to be placed in the buffer
35 ** Failure: returns SM_IO_EOF
36 ** Success: returns 0 (zero)
40 sm_io_fputs(fp
, timeout
, s
)
48 SM_REQUIRE_ISA(fp
, SmFileMagic
);
49 iov
.iov_base
= (void *) s
;
50 iov
.iov_len
= uio
.uio_resid
= strlen(s
);
53 return sm_fvwrite(fp
, timeout
, &uio
);