source: trunk/third/sendmail/libsm/rewind.c @ 19204

Revision 19204, 1.1 KB checked in by zacheiss, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r19203, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2 * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
3 *      All rights reserved.
4 * Copyright (c) 1990, 1993
5 *      The Regents of the University of California.  All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Chris Torek.
9 *
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.
13 */
14
15#include <sm/gen.h>
16SM_RCSID("@(#)$Id: rewind.c,v 1.1.1.1 2003-04-08 15:06:05 zacheiss Exp $")
17#include <errno.h>
18#include <sm/io.h>
19#include <sm/assert.h>
20#include "local.h"
21
22/*
23**  SM_IO_REWIND -- rewind the file
24**
25**      Seeks the file to the begining and clears any outstanding errors.
26**
27**      Parameters:
28**              fp -- the flie pointer for rewind
29**              timeout -- time to complete the rewind
30**
31**      Returns:
32**              none.
33*/
34
35void
36sm_io_rewind(fp, timeout)
37        register SM_FILE_T *fp;
38        int timeout;
39{
40        SM_REQUIRE_ISA(fp, SmFileMagic);
41        (void) sm_io_seek(fp, timeout, 0L, SM_IO_SEEK_SET);
42        (void) sm_io_clearerr(fp);
43        errno = 0;      /* not required, but seems reasonable */
44}
Note: See TracBrowser for help on using the repository browser.