ferror.c revision 266692
11558Srgrimes/*
250476Speter * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
31558Srgrimes *      All rights reserved.
412481Speter * Copyright (c) 1990, 1993
51558Srgrimes *	The Regents of the University of California.  All rights reserved.
641061Sbde *
774448Ssos * This code is derived from software contributed to Berkeley by
8124587Sru * Chris Torek.
939271Sphk *
10114759Sphk * By using this file, you agree to the terms and conditions set
1139255Sgibbs * forth in the LICENSE file which can be found at the top level of
1238653Sgpalmer * the sendmail distribution.
1338653Sgpalmer */
1455980Speter
1585380Sjlemon#include <sm/gen.h>
16124587SruSM_RCSID("@(#)$Id: ferror.c,v 1.14 2013-11-22 20:51:42 ca Exp $")
17100206Sdd#include <sm/io.h>
1843859Sobrien#include <sm/assert.h>
1938653Sgpalmer#include "local.h"
2038653Sgpalmer
2138653Sgpalmer/*
2238653Sgpalmer**  SM_IO_ERROR -- subroutine version of the macro sm_io_error.
23124587Sru**
24124587Sru**	Parameters:
25118919Srwatson**		fp -- file pointer
2638653Sgpalmer**
2779458Sobrien**	Returns:
2879457Sobrien**		0 (zero) when 'fp' is not in an error state
2938653Sgpalmer**		non-zero when 'fp' is in an error state
3038653Sgpalmer*/
31105513Sphk
32129477Spjd#undef sm_io_error
33128892Spjd
34136933Smarcelint
3569800Stomsoftsm_io_error(fp)
36133270Sle	SM_FILE_T *fp;
3738653Sgpalmer{
3838653Sgpalmer	SM_REQUIRE_ISA(fp, SmFileMagic);
39124587Sru
40124587Sru	return sm_error(fp);
4138653Sgpalmer}
4278978Sroam