[project @ 1998-02-02 17:27:26 by simonm]
[ghc-hetmet.git] / ghc / lib / cbits / freeFile.lc
diff --git a/ghc/lib/cbits/freeFile.lc b/ghc/lib/cbits/freeFile.lc
deleted file mode 100644 (file)
index 1ac3d52..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-%
-% (c) The GRASP/AQUA Project, Glasgow University, 1997
-%
-\subsection[freeFile.lc]{Giving up files}
-
-\begin{code}
-
-#include "rtsdefs.h"
-#include "stgio.h"
-
-/* sigh, the FILEs attached to the standard descriptors are 
-   handled differently. We don't want them freed via the
-   ForeignObj finaliser, as we probably want to use these
-   before we *really* shut down (dumping stats etc.)
-*/
-void freeStdFile(fp)
-StgForeignObj fp;
-{ return; }
-
-void freeFile(fp)
-StgForeignObj fp;
-{
-    int rc;
-
-    if ( fp == NULL || (rc = unlockFile(fileno((FILE *)fp))) ) {
-       /* If the file handle has been explicitly closed
-         * (via closeFile()) or freed, we will have given
-        * up our process lock, so we silently return here.
-         */
-       return;
-    }
-
-    /*
-     * The finaliser for the FILEs embedded in Handles. The RTS
-     * assumes that the finaliser runs without problems, so all
-     * we can do here is fclose(), and hope nothing went wrong.
-     *
-     * Assume fclose() flushes output stream.
-     */
-
-    rc = fclose((FILE *)fp);
-    /* Error or no error, we don't care.. */
-
-    /* 
-    if ( rc == EOF ) {
-       fprintf(stderr. "Warning: file close ran into trouble\n");
-    }
-    */
-
-    return;
-}
-\end{code}