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

cclose defined in line 36; used 1 times
cexit defined in line 40; used 5 times
cflush defined in line 27; used 5 times
copen defined in line 9; used 4 times
system defined in line 32; used 8 times
Last modified: 1995-02-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2772
Valid CSS Valid XHTML 1.0 Strict