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.
16 SM_RCSID("@(#)$Id: rewind.c,v 1.18 2001/09/11 04:04:49 gshapiro Exp $")
19 #include <sm/assert.h>
23 ** SM_IO_REWIND -- rewind the file
25 ** Seeks the file to the begining and clears any outstanding errors.
28 ** fp -- the flie pointer for rewind
29 ** timeout -- time to complete the rewind
36 sm_io_rewind(fp
, timeout
)
37 register SM_FILE_T
*fp
;
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 */