[project @ 1998-02-02 17:27:26 by simonm]
[ghc-hetmet.git] / ghc / lib / cbits / writeFile.lc
diff --git a/ghc/lib/cbits/writeFile.lc b/ghc/lib/cbits/writeFile.lc
deleted file mode 100644 (file)
index 71c7b0d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-%
-% (c) The GRASP/AQUA Project, Glasgow University, 1994
-%
-\subsection[writeFile.lc]{hPutStr Runtime Support}
-
-\begin{code}
-
-#include "rtsdefs.h"
-#include "stgio.h"
-
-StgInt
-writeFile(buf, fp, bytes)
-StgAddr buf;
-StgForeignObj fp;
-StgInt bytes;
-{
-    int count;
-    char *p = (char *) buf;
-
-    if (bytes == 0)
-       return 0;
-
-    /* Disallow short writes */
-    while ((count = fwrite(p, 1, bytes, (FILE *) fp)) < bytes) {
-       if (errno != EINTR) {
-           cvtErrno();
-           stdErrno();
-           return -1;
-       }
-       bytes -= count;
-       p += count;
-       clearerr((FILE *) fp);
-    }
-
-    return 0;
-}
-
-\end{code}