feof.c revision 256281
197403Sobrien/*
297403Sobrien * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
3169691Skan *      All rights reserved.
4169691Skan * Copyright (c) 1990, 1993
597403Sobrien *	The Regents of the University of California.  All rights reserved.
697403Sobrien *
797403Sobrien * This code is derived from software contributed to Berkeley by
897403Sobrien * Chris Torek.
997403Sobrien *
1097403Sobrien * By using this file, you agree to the terms and conditions set
1197403Sobrien * forth in the LICENSE file which can be found at the top level of
1297403Sobrien * the sendmail distribution.
1397403Sobrien */
1497403Sobrien
1597403Sobrien#include <sm/gen.h>
1697403SobrienSM_RCSID("@(#)$Id: feof.c,v 1.13 2001/09/11 04:04:48 gshapiro Exp $")
1797403Sobrien#include <sm/io.h>
1897403Sobrien#include <sm/assert.h>
19169691Skan#include "local.h"
2097403Sobrien
2197403Sobrien/*
2297403Sobrien**  SM_IO_EOF -- subroutine version of the macro sm_io_eof.
2397403Sobrien**
2497403Sobrien**  Tests if the file for 'fp' has reached the end.
2597403Sobrien**
2697403Sobrien**	Parameters:
2797403Sobrien**		fp -- file pointer.
2897403Sobrien**
2997403Sobrien**	Returns:
3097403Sobrien**		0 (zero) when the file is not at end
31169691Skan**		non-zero when EOF has been found
3297403Sobrien*/
3397403Sobrien#undef sm_io_eof
3497403Sobrien
3597403Sobrienint
3697403Sobriensm_io_eof(fp)
37169691Skan	SM_FILE_T *fp;
38169691Skan{
3997403Sobrien	SM_REQUIRE_ISA(fp, SmFileMagic);
4097403Sobrien
41169691Skan	return sm_eof(fp);
42169691Skan}
43169691Skan