190792Sgshapiro/*
2261363Sgshapiro * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
390792Sgshapiro *      All rights reserved.
490792Sgshapiro * Copyright (c) 1990, 1993
590792Sgshapiro *	The Regents of the University of California.  All rights reserved.
690792Sgshapiro *
790792Sgshapiro * This code is derived from software contributed to Berkeley by
890792Sgshapiro * Chris Torek.
990792Sgshapiro *
1090792Sgshapiro * By using this file, you agree to the terms and conditions set
1190792Sgshapiro * forth in the LICENSE file which can be found at the top level of
1290792Sgshapiro * the sendmail distribution.
1390792Sgshapiro */
1490792Sgshapiro
1590792Sgshapiro#include <sm/gen.h>
16266692SgshapiroSM_RCSID("@(#)$Id: feof.c,v 1.14 2013-11-22 20:51:42 ca Exp $")
1790792Sgshapiro#include <sm/io.h>
1890792Sgshapiro#include <sm/assert.h>
1990792Sgshapiro#include "local.h"
2090792Sgshapiro
2190792Sgshapiro/*
2290792Sgshapiro**  SM_IO_EOF -- subroutine version of the macro sm_io_eof.
2390792Sgshapiro**
2490792Sgshapiro**  Tests if the file for 'fp' has reached the end.
2590792Sgshapiro**
2690792Sgshapiro**	Parameters:
2790792Sgshapiro**		fp -- file pointer.
2890792Sgshapiro**
2990792Sgshapiro**	Returns:
3090792Sgshapiro**		0 (zero) when the file is not at end
3190792Sgshapiro**		non-zero when EOF has been found
3290792Sgshapiro*/
3390792Sgshapiro#undef sm_io_eof
3490792Sgshapiro
3590792Sgshapiroint
3690792Sgshapirosm_io_eof(fp)
3790792Sgshapiro	SM_FILE_T *fp;
3890792Sgshapiro{
3990792Sgshapiro	SM_REQUIRE_ISA(fp, SmFileMagic);
4090792Sgshapiro
4190792Sgshapiro	return sm_eof(fp);
4290792Sgshapiro}
43