[project @ 1998-04-10 11:33:12 by simonm]
[ghc-hetmet.git] / ghc / lib / std / cbits / filePosn.lc
similarity index 65%
rename from ghc/lib/std/cbits/filePosn.c
rename to ghc/lib/std/cbits/filePosn.lc
index e8131da..7a0d790 100644 (file)
@@ -1,16 +1,16 @@
-/* 
- * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
- *
- * $Id: filePosn.c,v 1.1 1998/04/10 10:54:25 simonm Exp $
- *
- * hGetPosn and hSetPosn Runtime Support
- */
-
-#include "Rts.h"
+%
+% (c) The GRASP/AQUA Project, Glasgow University, 1994
+%
+\subsection[filePosn.lc]{hGetPosn and hSetPosn Runtime Support}
+
+\begin{code}
+
+#include "rtsdefs.h"
 #include "stgio.h"
 
 StgInt
-getFilePosn(StgAddr fp)
+getFilePosn(fp)
+StgForeignObj fp;
 {
     StgInt posn;
 
@@ -28,7 +28,9 @@ getFilePosn(StgAddr fp)
 /* The following is only called with a position that we've already visited */
 
 StgInt
-setFilePosn(StgAddr fp, I_ posn)
+setFilePosn(fp, posn)
+StgForeignObj fp;
+StgInt posn;
 {
     while (fseek((FILE *) fp, posn, SEEK_SET) != 0) {
        if (errno != EINTR) {
@@ -40,4 +42,7 @@ setFilePosn(StgAddr fp, I_ posn)
     return 0;
 }
 
+\end{code}
+
+