[project @ 1996-07-25 20:43:49 by partain]
[ghc-hetmet.git] / ghc / lib / cbits / stgio.h
1 #ifndef STGIO_H
2 #define STGIO_H
3
4 /* Decls for routines in ghc/runtime/io/ only used there.
5  * This file is used when compiling the Haskell library
6  * that _ccalls_ those routines; and when compiling those
7  * routines (to check consistency).
8  */
9
10 /* closeFile.lc */
11 StgInt closeFile PROTO((StgAddr));
12
13 /* createDirectory.lc */
14 StgInt createDirectory PROTO((StgByteArray));
15
16 /* env.lc */
17 char *  strDup          PROTO((const char *));
18 int     setenviron      PROTO((char **));
19 int     copyenv         (STG_NO_ARGS);
20 int     _setenv         PROTO((char *));
21 int     delenv          PROTO((char *));
22
23 /* errno.lc */
24 extern  int ghc_errno;
25 extern  int ghc_errtype;
26 void    cvtErrno(STG_NO_ARGS);
27 void    stdErrno(STG_NO_ARGS);
28
29 /* execvpe.lc */
30 int     execvpe PROTO((char *, char **, char **));
31
32 /* fileEOF.lc */
33 StgInt  fileEOF PROTO((StgAddr));
34
35 /* fileGetc.lc */
36 StgInt  fileGetc PROTO((StgAddr));
37
38 /* fileLookAhead.lc */
39 StgInt  fileLookAhead PROTO((StgAddr));
40
41 /* filePosn.lc */
42 StgInt  getFilePosn PROTO((StgAddr));
43 StgInt  setFilePosn PROTO((StgAddr, StgInt));
44
45 /* filePutc.lc */
46 StgInt  filePutc    PROTO((StgAddr, StgInt));
47
48 /* fileSize.lc */
49 StgInt  fileSize    PROTO((StgAddr, StgByteArray));
50
51 /* flushFile.lc */
52 StgInt  flushFile   PROTO((StgAddr));
53
54 /* getBufferMode.lc */
55 StgInt  getBufferMode PROTO((StgAddr));
56
57 /* getClockTime.lc */
58 StgInt  getClockTime PROTO((StgByteArray, StgByteArray));
59
60 /* getCPUTime.lc */
61 StgByteArray getCPUTime PROTO((StgByteArray));
62
63 /* getCurrentDirectory.lc */
64 StgAddr getCurrentDirectory(STG_NO_ARGS);
65
66 /* getDirectoryContents.lc */
67 StgAddr getDirectoryContents PROTO((StgByteArray));
68
69 /* getLock.lc */
70 int     lockFile    PROTO((int, int));
71 void    unlockFile  PROTO((int));
72 StgInt  getLock     PROTO((StgAddr, StgInt));
73
74 /* inputReady.lc */
75 StgInt  inputReady  PROTO((StgAddr));
76
77 /* openFile.lc */
78 StgAddr openFile PROTO((StgByteArray, StgByteArray));
79
80 /* readFile.lc */
81 StgInt  readBlock PROTO((StgAddr, StgAddr, StgInt));
82 StgInt  readLine PROTO((StgAddr, StgAddr, StgInt));
83 StgInt  readChar PROTO((StgAddr));
84
85 /* removeDirectory.lc */
86 StgInt removeDirectory PROTO((StgByteArray));
87
88 /* removeFile.lc */
89 StgInt removeFile PROTO((StgByteArray));
90
91 /* renameDirectory.lc */
92 StgInt renameDirectory PROTO((StgByteArray, StgByteArray));
93
94 /* renameFile.lc */
95 StgInt renameFile PROTO((StgByteArray, StgByteArray));
96
97 /* seekFile.lc */
98 StgInt  seekFile  PROTO((StgAddr, StgInt, StgInt, StgByteArray));
99 StgInt  seekFileP PROTO((StgAddr));
100
101 /* setBuffering.lc */
102 StgInt  setBuffering PROTO((StgAddr, StgInt));
103
104 /* setCurrentDirectory.lc */
105 StgInt setCurrentDirectory PROTO((StgByteArray));
106
107 /* showTime.lc */
108 StgAddr showTime PROTO((StgInt, StgByteArray, StgByteArray));
109
110 /* system.lc */
111 StgInt  systemCmd PROTO((StgByteArray));
112
113 /* toLocalTime.lc */
114 StgAddr toLocalTime PROTO((StgInt, StgByteArray, StgByteArray));
115
116 /* toUTCTime.lc */
117 StgAddr toUTCTime PROTO((StgInt, StgByteArray, StgByteArray));
118
119 /* toClockSec.lc */
120 StgAddr toClockSec PROTO((StgInt, StgInt, StgInt, StgInt, StgInt, StgInt, StgInt, StgByteArray));
121
122 /* writeFile.lc */
123 StgInt  writeFile PROTO((StgAddr, StgAddr, StgInt));
124
125 #endif /* ! STGIO_H */