xref: /titanic_50/usr/src/cmd/sendmail/libsm/ferror.c (revision e07d9cb85217949d497b02d7211de8a197d2f2eb)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
16 
17 #include <sm/gen.h>
18 SM_RCSID("@(#)$Id: ferror.c,v 1.11 2001/04/03 01:46:40 ca Exp $")
19 #include <sm/io.h>
20 #include <sm/assert.h>
21 #include "local.h"
22 
23 /*
24 **  SM_IO_ERROR -- subroutine version of the macro sm_io_error.
25 **
26 **	Parameters:
27 **		fp -- file pointer
28 **
29 **	Returns:
30 **		0 (zero) when 'fp' is not in an error state
31 **		non-zero when 'fp' is in an error state
32 */
33 
34 #undef sm_io_error
35 
36 int
37 sm_io_error(fp)
38 	SM_FILE_T *fp;
39 {
40 	SM_REQUIRE_ISA(fp, SmFileMagic);
41 
42 	return sm_error(fp);
43 }
44