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: fpurge.c,v 1.18 2001/01/28 00:29:35 ca Exp $")
22 #include <sm/assert.h>
26 ** SM_IO_PURGE -- purge/empty the buffer without committing buffer content
29 ** fp -- file pointer to purge
32 ** Failure: returns SM_IO_EOF and sets errno
33 ** Success: returns 0 (zero)
38 register SM_FILE_T
*fp
;
40 SM_REQUIRE_ISA(fp
, SmFileMagic
);
49 fp
->f_p
= fp
->f_bf
.smb_base
;
53 fp
->f_w
= fp
->f_flags
& (SMLBF
|SMNBF
) ? 0 : fp
->f_bf
.smb_size
;