1: /* fake portable I/O routines, for those
2: sites so backward as to not have the
3: port. library */
4:
5: int cin, cout;
6: extern int fin, fout;
7:
8: copen( s, c ) char *s; {
9: int f;
10:
11: if( c == 'r' ){
12: fin = f = open( s, 0 );
13: }
14:
15: else if( c == 'a' ){
16: f = open( s, 1 );
17: seek( f, 0, 2 );
18: }
19:
20: else { /* c == w */
21: f = creat( s, 0666 );
22: }
23:
24: return( f );
25: }
26:
27: cflush(x){ /* fake! sets file to x */
28: flush();
29: fout = x;
30: }
31:
32: system(){
33: error( "The function \"system\" is called" );
34: }
35:
36: cclose(i){
37: close(i);
38: }
39:
40: cexit(i){
41: flush();
42: exit();
43: }
Defined functions
cexit
defined in line
40; used 5 times
copen
defined in line
8; used 3 times
Defined variables
cin
defined in line
5; used 2 times
cout
defined in line
5; used 4 times