summaryrefslogtreecommitdiff
path: root/ghc/includes/stgio.h
blob: 972b96eb931bb40df499478d30ca18e11b557ef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#ifndef STGIO_H
#define STGIO_H

/* Decls for routines in ghc/runtime/io/ only used there.
 * This file is used when compiling the Haskell library
 * that _ccalls_ those routines; and when compiling those
 * routines (to check consistency).
 */

/* closeFile.lc */
StgInt closeFile PROTO((StgAddr));

/* createDirectory.lc */
StgInt createDirectory PROTO((StgByteArray));

/* env.lc */
char *	strDup		PROTO((const char *));
int	setenviron	PROTO((char **));
int	copyenv		(STG_NO_ARGS);
int	setenv		PROTO((char *));
int	delenv		PROTO((char *));

/* errno.lc */
extern	int ghc_errno;
extern	int ghc_errtype;
void	cvtErrno(STG_NO_ARGS);
void	stdErrno(STG_NO_ARGS);

/* execvpe.lc */
int	execvpe PROTO((char *, char **, char **));

/* fileEOF.lc */
StgInt	fileEOF PROTO((StgAddr));

/* fileGetc.lc */
StgInt	fileGetc PROTO((StgAddr));

/* fileLookAhead.lc */
StgInt	fileLookAhead PROTO((StgAddr));

/* filePosn.lc */
StgInt	getFilePosn PROTO((StgAddr));
StgInt	setFilePosn PROTO((StgAddr, StgInt));

/* filePutc.lc */
StgInt	filePutc    PROTO((StgAddr, StgInt));

/* fileSize.lc */
StgInt	fileSize    PROTO((StgAddr, StgByteArray));

/* flushFile.lc */
StgInt	flushFile   PROTO((StgAddr));

/* getBufferMode.lc */
StgInt	getBufferMode PROTO((StgAddr));

/* getClockTime.lc */
StgInt	getClockTime PROTO((StgByteArray, StgByteArray));

/* getCPUTime.lc */
StgByteArray getCPUTime PROTO((StgByteArray));

/* getCurrentDirectory.lc */
StgAddr getCurrentDirectory(STG_NO_ARGS);

/* getDirectoryContents.lc */
StgAddr getDirectoryContents PROTO((StgByteArray));

/* getLock.lc */
int     lockFile    PROTO((int, int));
void    unlockFile  PROTO((int));
StgInt	getLock	    PROTO((StgAddr, StgInt));

/* inputReady.lc */
StgInt	inputReady  PROTO((StgAddr));

/* openFile.lc */
StgAddr openFile PROTO((StgByteArray, StgByteArray));

/* readFile.lc */
StgInt	readBlock PROTO((StgAddr, StgAddr, StgInt));
StgInt	readLine PROTO((StgAddr, StgAddr, StgInt));
StgInt	readChar PROTO((StgAddr));

/* removeDirectory.lc */
StgInt removeDirectory PROTO((StgByteArray));

/* removeFile.lc */
StgInt removeFile PROTO((StgByteArray));

/* renameDirectory.lc */
StgInt renameDirectory PROTO((StgByteArray, StgByteArray));

/* renameFile.lc */
StgInt renameFile PROTO((StgByteArray, StgByteArray));

/* seekFile.lc */
StgInt	seekFile  PROTO((StgAddr, StgInt, StgInt, StgByteArray));
StgInt	seekFileP PROTO((StgAddr));

/* setBuffering.lc */
StgInt	setBuffering PROTO((StgAddr, StgInt));

/* setCurrentDirectory.lc */
StgInt setCurrentDirectory PROTO((StgByteArray));

/* showTime.lc */
StgAddr showTime PROTO((StgInt, StgByteArray, StgByteArray));

/* system.lc */
StgInt	systemCmd PROTO((StgByteArray));

/* toLocalTime.lc */
StgAddr toLocalTime PROTO((StgInt, StgByteArray, StgByteArray));

/* toUTCTime.lc */
StgAddr toUTCTime PROTO((StgInt, StgByteArray, StgByteArray));

/* toClockSec.lc */
StgAddr toClockSec PROTO((StgInt, StgInt, StgInt, StgInt, StgInt, StgInt, StgInt, StgByteArray));

/* writeFile.lc */
StgInt	writeFile PROTO((StgAddr, StgAddr, StgInt));

#endif /* ! STGIO_H */