140266059SGregory Neil Shapiro /* 25dd76dd0SGregory Neil Shapiro * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers. 340266059SGregory Neil Shapiro * All rights reserved. 440266059SGregory Neil Shapiro * Copyright (c) 1990, 1993 540266059SGregory Neil Shapiro * The Regents of the University of California. All rights reserved. 640266059SGregory Neil Shapiro * 740266059SGregory Neil Shapiro * This code is derived from software contributed to Berkeley by 840266059SGregory Neil Shapiro * Chris Torek. 940266059SGregory Neil Shapiro * 1040266059SGregory Neil Shapiro * By using this file, you agree to the terms and conditions set 1140266059SGregory Neil Shapiro * forth in the LICENSE file which can be found at the top level of 1240266059SGregory Neil Shapiro * the sendmail distribution. 1340266059SGregory Neil Shapiro */ 1440266059SGregory Neil Shapiro 1540266059SGregory Neil Shapiro #include <sm/gen.h> 16*4313cc83SGregory Neil Shapiro SM_RCSID("@(#)$Id: feof.c,v 1.14 2013-11-22 20:51:42 ca Exp $") 1740266059SGregory Neil Shapiro #include <sm/io.h> 1840266059SGregory Neil Shapiro #include <sm/assert.h> 1940266059SGregory Neil Shapiro #include "local.h" 2040266059SGregory Neil Shapiro 2140266059SGregory Neil Shapiro /* 2240266059SGregory Neil Shapiro ** SM_IO_EOF -- subroutine version of the macro sm_io_eof. 2340266059SGregory Neil Shapiro ** 2440266059SGregory Neil Shapiro ** Tests if the file for 'fp' has reached the end. 2540266059SGregory Neil Shapiro ** 2640266059SGregory Neil Shapiro ** Parameters: 2740266059SGregory Neil Shapiro ** fp -- file pointer. 2840266059SGregory Neil Shapiro ** 2940266059SGregory Neil Shapiro ** Returns: 3040266059SGregory Neil Shapiro ** 0 (zero) when the file is not at end 3140266059SGregory Neil Shapiro ** non-zero when EOF has been found 3240266059SGregory Neil Shapiro */ 3340266059SGregory Neil Shapiro #undef sm_io_eof 3440266059SGregory Neil Shapiro 3540266059SGregory Neil Shapiro int 3640266059SGregory Neil Shapiro sm_io_eof(fp) 3740266059SGregory Neil Shapiro SM_FILE_T *fp; 3840266059SGregory Neil Shapiro { 3940266059SGregory Neil Shapiro SM_REQUIRE_ISA(fp, SmFileMagic); 4040266059SGregory Neil Shapiro 4140266059SGregory Neil Shapiro return sm_eof(fp); 4240266059SGregory Neil Shapiro } 43