[project @ 1998-04-10 10:54:14 by simonm]
[ghc-hetmet.git] / ghc / lib / std / cbits / fileEOF.c
1 /* 
2  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
3  *
4  * $Id: fileEOF.c,v 1.1 1998/04/10 10:54:21 simonm Exp $
5  *
6  * hIsEOF Runtime Support
7  */
8
9 #include "Rts.h"
10 #include "stgio.h"
11
12 StgInt
13 fileEOF(StgAddr fp)
14 {
15     if (fileLookAhead(fp) != EOF)
16         return 0;
17     else if (ghc_errtype == ERR_EOF)
18         return 1;
19     else
20         return -1;
21 }