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