4 /* Decls for routines in ghc/lib/cbits/ 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).
11 StgInt closeFile PROTO((StgForeignObj));
13 /* createDirectory.lc */
14 StgInt createDirectory PROTO((StgByteArray));
17 StgAddr openDir__ PROTO((StgByteArray));
18 StgAddr readDir__ PROTO((StgAddr));
21 StgInt setTerminalEcho PROTO((StgForeignObj, StgInt));
22 StgInt getTerminalEcho PROTO((StgForeignObj));
23 StgInt isTerminalDevice PROTO((StgForeignObj));
26 char * strDup PROTO((const char *));
27 int setenviron PROTO((char **));
28 int copyenv (STG_NO_ARGS);
29 int _setenv PROTO((char *));
30 int delenv PROTO((char *));
34 extern int ghc_errtype;
35 void cvtErrno(STG_NO_ARGS);
36 void stdErrno(STG_NO_ARGS);
39 int execvpe PROTO((char *, char **, char **));
42 StgInt fileEOF PROTO((StgForeignObj));
44 StgInt fileGetc PROTO((StgForeignObj));
46 /* fileLookAhead.lc */
47 StgInt fileLookAhead PROTO((StgForeignObj));
50 StgInt getFilePosn PROTO((StgForeignObj));
51 StgInt setFilePosn PROTO((StgForeignObj, StgInt));
54 StgInt filePutc PROTO((StgForeignObj, StgInt));
57 StgInt fileSize PROTO((StgForeignObj, StgByteArray));
60 StgInt flushFile PROTO((StgForeignObj));
63 void freeStdFile PROTO((StgForeignObj));
64 void freeFile PROTO((StgForeignObj));
66 /* getBufferMode.lc */
67 StgInt getBufferMode PROTO((StgForeignObj));
70 StgInt getClockTime PROTO((StgByteArray, StgByteArray));
71 StgAddr showTime PROTO((I_, StgByteArray, StgByteArray));
72 StgAddr toClockSec PROTO((I_, I_, I_, I_, I_, I_, I_, StgByteArray));
73 StgAddr toLocalTime PROTO((I_, StgByteArray, StgByteArray));
74 StgAddr toUTCTime PROTO((I_, StgByteArray, StgByteArray));
77 StgByteArray getCPUTime PROTO((StgByteArray));
80 /* getCurrentDirectory.lc */
81 StgAddr getCurrentDirectory(STG_NO_ARGS);
84 int lockFile PROTO((int, int));
85 int unlockFile PROTO((int));
86 StgInt getLock PROTO((StgForeignObj, StgInt));
89 StgInt inputReady PROTO((StgForeignObj,StgInt));
92 StgAddr openFile PROTO((StgByteArray, StgByteArray));
93 StgAddr openFd PROTO((StgInt, StgByteArray));
96 StgInt readBlock PROTO((StgAddr, StgForeignObj, StgInt));
97 StgInt readLine PROTO((StgAddr, StgForeignObj, StgInt));
98 StgInt readChar PROTO((StgForeignObj));
100 /* removeDirectory.lc */
101 StgInt removeDirectory PROTO((StgByteArray));
104 StgInt removeFile PROTO((StgByteArray));
106 /* renameDirectory.lc */
107 StgInt renameDirectory PROTO((StgByteArray, StgByteArray));
110 StgInt renameFile PROTO((StgByteArray, StgByteArray));
113 StgInt seekFile PROTO((StgForeignObj, StgInt, StgInt, StgByteArray));
114 StgInt seekFileP PROTO((StgForeignObj));
116 /* setBuffering.lc */
117 StgInt setBuffering PROTO((StgForeignObj, StgInt));
119 /* setCurrentDirectory.lc */
120 StgInt setCurrentDirectory PROTO((StgByteArray));
123 StgAddr showTime PROTO((StgInt, StgByteArray, StgByteArray));
126 StgInt systemCmd PROTO((StgByteArray));
129 StgAddr toLocalTime PROTO((StgInt, StgByteArray, StgByteArray));
132 StgAddr toUTCTime PROTO((StgInt, StgByteArray, StgByteArray));
135 StgAddr toClockSec PROTO((StgInt, StgInt, StgInt, StgInt, StgInt, StgInt, StgInt, StgByteArray));
138 StgInt writeFile PROTO((StgAddr, StgForeignObj, StgInt));
140 #endif /* ! STGIO_H */