[project @ 1998-04-10 11:33:12 by simonm]
[ghc-hetmet.git] / ghc / lib / std / cbits / openFile.lc
similarity index 94%
rename from ghc/lib/std/cbits/openFile.c
rename to ghc/lib/std/cbits/openFile.lc
index d203bbb..4b92aca 100644 (file)
@@ -1,12 +1,11 @@
-/* 
- * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
- *
- * $Id: openFile.c,v 1.1 1998/04/10 10:54:42 simonm Exp $
- *
- * openFile Runtime Support
- */
-
-#include "Rts.h"
+%
+% (c) The GRASP/AQUA Project, Glasgow University, 1994
+%
+\subsection[openFile.lc]{openFile Runtime Support}
+
+\begin{code}
+
+#include "rtsdefs.h"
 #include "stgio.h"
 
 #ifdef HAVE_SYS_TYPES_H
@@ -26,7 +25,9 @@
 #endif
 
 StgAddr
-openFile(StgByteArray file, StgByteArray how)
+openFile(file, how)
+StgByteArray file;
+StgByteArray how;
 {
     FILE *fp;
     int fd;
@@ -55,7 +56,7 @@ openFile(StgByteArray file, StgByteArray how)
        break;
     default:
        fprintf(stderr, "openFile: unknown mode `%s'\n", how);
-       exit(EXIT_FAILURE);
+       EXIT(EXIT_FAILURE);
     }
 
     /* First try to open without creating */
@@ -212,3 +213,5 @@ openFile(StgByteArray file, StgByteArray how)
 
     return (StgAddr) fp;
 }
+
+\end{code}