[project @ 1998-04-10 10:54:14 by simonm]
[ghc-hetmet.git] / ghc / lib / std / cbits / readFile.c
similarity index 79%
rename from ghc/lib/std/cbits/readFile.lc
rename to ghc/lib/std/cbits/readFile.c
index 0cc9c2c..2ae839c 100644 (file)
@@ -1,20 +1,18 @@
-%
-% (c) The GRASP/AQUA Project, Glasgow University, 1994
-%
-\subsection[readFile.lc]{hGetContents Runtime Support}
+/* 
+ * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
+ *
+ * $Id: readFile.c,v 1.1 1998/04/10 10:54:43 simonm Exp $
+ *
+ * hGetContents Runtime Support
+ */
 
-\begin{code}
-
-#include "rtsdefs.h"
+#include "Rts.h"
 #include "stgio.h"
 
 #define EOT 4
 
 StgInt
-readBlock(buf, fp, size)
-StgAddr buf;
-StgForeignObj fp;
-StgInt size;
+readBlock(StgAddr buf, StgAddr fp, StgInt size)
 {
     int count;
 
@@ -41,10 +39,7 @@ StgInt size;
 }
 
 StgInt
-readLine(buf, fp, size)
-StgAddr buf;
-StgForeignObj fp;
-StgInt size;
+readLine(StgAddr buf, StgAddr fp, StgInt size)
 {
     if (feof((FILE *) fp)) {
        ghc_errtype = ERR_EOF;
@@ -69,8 +64,7 @@ StgInt size;
 }
 
 StgInt
-readChar(fp)
-StgForeignObj fp;
+readChar(StgAddr fp)
 {
     int c;
 
@@ -98,5 +92,3 @@ StgForeignObj fp;
     else
         return c;
 }
-
-\end{code}