[project @ 1999-11-26 16:25:55 by simonmar]
authorsimonmar <unknown>
Fri, 26 Nov 1999 16:25:57 +0000 (16:25 +0000)
committersimonmar <unknown>
Fri, 26 Nov 1999 16:25:57 +0000 (16:25 +0000)
Rename error.h to stgerror.h

ghc/lib/std/cbits/fileGetc.c
ghc/lib/std/cbits/fileObject.c
ghc/lib/std/cbits/filePutc.c
ghc/lib/std/cbits/freeFile.c
ghc/lib/std/cbits/openFile.c
ghc/lib/std/cbits/stgerror.h [moved from ghc/lib/std/cbits/error.h with 90% similarity]
ghc/lib/std/cbits/stgio.h
ghc/lib/std/cbits/toClockSec.c
ghc/lib/std/cbits/toLocalTime.c
ghc/lib/std/cbits/toUTCTime.c
ghc/lib/std/cbits/writeFile.c

index 3431d49..0be92e7 100644 (file)
@@ -1,14 +1,13 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: fileGetc.c,v 1.3 1998/12/02 13:27:23 simonm Exp $
+ * $Id: fileGetc.c,v 1.4 1999/11/26 16:25:55 simonmar Exp $
  *
  * hGetChar Runtime Support
  */
 
 #include "Rts.h"
 #include "stgio.h"
-#include "error.h"
 
 #define EOT 4
 
index de789e9..30bfe17 100644 (file)
@@ -1,14 +1,13 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: fileObject.c,v 1.7 1999/11/23 14:38:40 simonmar Exp $
+ * $Id: fileObject.c,v 1.8 1999/11/26 16:25:56 simonmar Exp $
  *
  * hPutStr Runtime Support
  */
 
 #include "Rts.h"
 #include "stgio.h"
-#include "fileObject.h"
 
 #include <stdio.h>
 
index f2ce4a9..a95cbf1 100644 (file)
@@ -1,14 +1,13 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: filePutc.c,v 1.9 1999/11/25 16:54:14 simonmar Exp $
+ * $Id: filePutc.c,v 1.10 1999/11/26 16:25:56 simonmar Exp $
  *
  * hPutChar Runtime Support
  */
 
 #include "Rts.h"
 #include "stgio.h"
-#include "error.h"
 
 #if defined(HAVE_WINSOCK_H) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
 #define USE_WINSOCK
index aaf492f..ffe5723 100644 (file)
@@ -1,14 +1,13 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: freeFile.c,v 1.7 1999/11/25 16:54:14 simonmar Exp $
+ * $Id: freeFile.c,v 1.8 1999/11/26 16:25:56 simonmar Exp $
  *
  * Giving up files
  */
 
 #include "Rts.h"
 #include "stgio.h"
-#include "fileObject.h"
 
 #if defined(HAVE_WINSOCK_H) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
 #define USE_WINSOCK
index d1b0d6d..90ae2d8 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: openFile.c,v 1.11 1999/11/25 16:54:14 simonmar Exp $
+ * $Id: openFile.c,v 1.12 1999/11/26 16:25:56 simonmar Exp $
  *
  * openFile Runtime Support
  */
@@ -11,7 +11,6 @@
 
 #include "Rts.h"
 #include "stgio.h"
-#include "fileObject.h"
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
similarity index 90%
rename from ghc/lib/std/cbits/error.h
rename to ghc/lib/std/cbits/stgerror.h
index 9473fd3..225194b 100644 (file)
@@ -1,10 +1,14 @@
-/* 
- * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
+/* -----------------------------------------------------------------------------
+ * $Id: stgerror.h,v 1.1 1999/11/26 16:25:56 simonmar Exp $
  *
- * $Id: error.h,v 1.3 1998/12/02 13:27:21 simonm Exp $
+ * (c) The GRASP/AQUA Project, Glasgow University, 1994-1999
  *
  * Error codes used by the IO subsystem.
- */
+ *
+ * ---------------------------------------------------------------------------*/
+
+#ifndef STGERROR_H
+#define STGERROR_H
 
 #define ERR_ALREADYEXISTS 1
 #define ERR_HARDWAREFAULT 2
 #define GHC_EVERSION -111
 #define GHC_EWOULDBLOCK -112
 #define GHC_EXDEV -113
+
+#endif /* STGERROR_H */
index 1c5f2a1..a80db36 100644 (file)
@@ -1,24 +1,21 @@
-/* 
- * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
+/* -----------------------------------------------------------------------------
+ * $Id: stgio.h,v 1.15 1999/11/26 16:25:56 simonmar Exp $
  *
- * $Id: stgio.h,v 1.14 1999/09/30 15:50:03 sof Exp $
+ * (c) The GRASP/AQUA Project, Glasgow University, 1994-1999
  *
  * Helper code for GHC's IO subsystem.
- */
+ *
+ * ---------------------------------------------------------------------------*/
 
 #ifndef STGIO_H
 #define STGIO_H
 
+#include "stgerror.h"
 #include "fileObject.h"
 
-/* Decls for routines in ghc/lib/cbits/ only used there.
- * This file is used when compiling the Haskell library
- * that _ccalls_ those routines; and when compiling those
- * routines (to check consistency).
+/* Function prototypes for the I/O subsytem...
  */
 
-#include "error.h"
-
 /* closeFile.c */
 StgAddr allocMemory__ (StgInt);
 
index 742e814..b461fba 100644 (file)
@@ -1,14 +1,14 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: toClockSec.c,v 1.4 1999/09/19 19:21:22 sof Exp $
+ * $Id: toClockSec.c,v 1.5 1999/11/26 16:25:56 simonmar Exp $
  *
  * toClockSec Runtime Support
  */
 
 #include "Rts.h"
-#include "timezone.h"
 #include "stgio.h"
+#include "timezone.h"
 
 StgInt
 toClockSec(I_ year, I_ mon, I_ mday, I_ hour, I_ min, I_ sec, I_ isdst, StgByteArray res)
index 1304805..c2b7bb7 100644 (file)
@@ -1,14 +1,14 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: toLocalTime.c,v 1.3 1998/12/02 13:28:02 simonm Exp $
+ * $Id: toLocalTime.c,v 1.4 1999/11/26 16:25:56 simonmar Exp $
  *
  * toCalendarTime Runtime Support
  */
 
 #include "Rts.h"
-#include "timezone.h"
 #include "stgio.h"
+#include "timezone.h"
 
 StgAddr
 toLocalTime(I_ size, StgByteArray d, StgByteArray res)
index a9f9280..44b598a 100644 (file)
@@ -1,14 +1,14 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: toUTCTime.c,v 1.3 1998/12/02 13:28:04 simonm Exp $
+ * $Id: toUTCTime.c,v 1.4 1999/11/26 16:25:57 simonmar Exp $
  *
  * toUTCTime Runtime Support
  */
 
 #include "Rts.h"
-#include "timezone.h"
 #include "stgio.h"
+#include "timezone.h"
 
 StgAddr 
 toUTCTime(I_ size, StgByteArray d, StgByteArray res)
index f5ae542..108ce99 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
  *
- * $Id: writeFile.c,v 1.10 1999/11/25 16:54:15 simonmar Exp $
+ * $Id: writeFile.c,v 1.11 1999/11/26 16:25:57 simonmar Exp $
  *
  * hPutStr Runtime Support
  */
@@ -116,6 +116,7 @@ writeBuf(StgForeignPtr ptr, StgAddr buf, StgInt len)
        ) {
        /* Flush buffer */
        rc = writeFileObject(ptr, fo->bufWPtr);
+       /* ToDo: undo buffer fill if we're blocking.. */
        if (rc != 0) { 
            return rc;
        }