181404Speter/*
281404Speter * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
381404Speter *      All rights reserved.
481404Speter * Copyright (c) 1990, 1993
581404Speter *	The Regents of the University of California.  All rights reserved.
681404Speter *
781404Speter * This code is derived from software contributed to Berkeley by
881404Speter * Chris Torek.
981404Speter *
1081404Speter * By using this file, you agree to the terms and conditions set
1181404Speter * forth in the LICENSE file which can be found at the top level of
1281404Speter * the sendmail distribution.
1381404Speter */
1481404Speter
1581404Speter#include <sm/gen.h>
1681404SpeterSM_RCSID("@(#)$Id: ferror.c,v 1.14 2013-11-22 20:51:42 ca Exp $")
1781404Speter#include <sm/io.h>
1881404Speter#include <sm/assert.h>
1981404Speter#include "local.h"
2081404Speter
2181404Speter/*
2281404Speter**  SM_IO_ERROR -- subroutine version of the macro sm_io_error.
2381404Speter**
2481404Speter**	Parameters:
2581404Speter**		fp -- file pointer
2681404Speter**
2781404Speter**	Returns:
2881404Speter**		0 (zero) when 'fp' is not in an error state
2981404Speter**		non-zero when 'fp' is in an error state
3081404Speter*/
31107484Speter
3281404Speter#undef sm_io_error
3381404Speter
3481404Speterint
3581404Spetersm_io_error(fp)
3681404Speter	SM_FILE_T *fp;
3781404Speter{
3881404Speter	SM_REQUIRE_ISA(fp, SmFileMagic);
3981404Speter
4081404Speter	return sm_error(fp);
4181404Speter}
4281404Speter