1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. 3*7c478bd9Sstevel@tonic-gate * All rights reserved. 4*7c478bd9Sstevel@tonic-gate * Copyright (c) 1990, 1993 5*7c478bd9Sstevel@tonic-gate * The Regents of the University of California. All rights reserved. 6*7c478bd9Sstevel@tonic-gate * 7*7c478bd9Sstevel@tonic-gate * This code is derived from software contributed to Berkeley by 8*7c478bd9Sstevel@tonic-gate * Chris Torek. 9*7c478bd9Sstevel@tonic-gate * 10*7c478bd9Sstevel@tonic-gate * By using this file, you agree to the terms and conditions set 11*7c478bd9Sstevel@tonic-gate * forth in the LICENSE file which can be found at the top level of 12*7c478bd9Sstevel@tonic-gate * the sendmail distribution. 13*7c478bd9Sstevel@tonic-gate */ 14*7c478bd9Sstevel@tonic-gate 15*7c478bd9Sstevel@tonic-gate #include <sm/gen.h> 16*7c478bd9Sstevel@tonic-gate SM_RCSID("@(#)$Id: feof.c,v 1.11 2001/04/03 01:46:40 ca Exp $") 17*7c478bd9Sstevel@tonic-gate #include <sm/io.h> 18*7c478bd9Sstevel@tonic-gate #include <sm/assert.h> 19*7c478bd9Sstevel@tonic-gate #include "local.h" 20*7c478bd9Sstevel@tonic-gate 21*7c478bd9Sstevel@tonic-gate /* 22*7c478bd9Sstevel@tonic-gate ** SM_IO_EOF -- subroutine version of the macro sm_io_eof. 23*7c478bd9Sstevel@tonic-gate ** 24*7c478bd9Sstevel@tonic-gate ** Tests if the file for 'fp' has reached the end. 25*7c478bd9Sstevel@tonic-gate ** 26*7c478bd9Sstevel@tonic-gate ** Parameters: 27*7c478bd9Sstevel@tonic-gate ** fp -- file pointer. 28*7c478bd9Sstevel@tonic-gate ** 29*7c478bd9Sstevel@tonic-gate ** Returns: 30*7c478bd9Sstevel@tonic-gate ** 0 (zero) when the file is not at end 31*7c478bd9Sstevel@tonic-gate ** non-zero when EOF has been found 32*7c478bd9Sstevel@tonic-gate */ 33*7c478bd9Sstevel@tonic-gate #undef sm_io_eof 34*7c478bd9Sstevel@tonic-gate 35*7c478bd9Sstevel@tonic-gate int 36*7c478bd9Sstevel@tonic-gate sm_io_eof(fp) 37*7c478bd9Sstevel@tonic-gate SM_FILE_T *fp; 38*7c478bd9Sstevel@tonic-gate { 39*7c478bd9Sstevel@tonic-gate SM_REQUIRE_ISA(fp, SmFileMagic); 40*7c478bd9Sstevel@tonic-gate 41*7c478bd9Sstevel@tonic-gate return sm_eof(fp); 42*7c478bd9Sstevel@tonic-gate } 43