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

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 8; used 3 times
system defined in line 32; used 8 times

Defined variables

cin defined in line 5; used 2 times
cout defined in line 5; used 4 times
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 760
Valid CSS Valid XHTML 1.0 Strict