1: /* (c) 1979 Regents of the University of California */
   2: /* fake portable I/O routines, for those
   3:     sites so backward as to not have the
   4:      port. library */
   5: /* munged for portable i/o library: peter and louise 5 may 80 */
   6: #include <stdio.h>
   7: 
   8: FILE *cin, *cout;
   9: 
  10: FILE *copen( s, c )
  11:     char *s;
  12:     char c;
  13:   {
  14:   FILE *f;
  15: 
  16:       if( c == 'r' ){
  17:         f = fopen( s, "r" );
  18:   } else  if( c == 'a' ){
  19:         f = fopen( s, "a" );
  20:         fseek( f, 0L, 2 );
  21:   } else {  /* c == w */
  22:         f = fopen( s, "w" );
  23:   }
  24: 
  25:   return( f );
  26:   }
  27: 
  28: cflush(x) FILE *x; { /* fake! sets file to x */
  29:   fflush( cout );
  30:   cout = x;
  31:   }
  32: 
  33: system(){
  34:   error( "The function \"system\" is called" );
  35:   }
  36: 
  37: cclose(i) FILE *i; {
  38:   fclose(i);
  39:   }
  40: 
  41: cexit(i){
  42:   fflush( cout );
  43:   if ( i != 0 ) {
  44:     abort();
  45:   }
  46:   exit(i);
  47:   }

Defined functions

cclose defined in line 37; never used
cexit defined in line 41; used 5 times
cflush defined in line 28; used 4 times
copen defined in line 10; used 3 times
system defined in line 33; used 8 times
Last modified: 1981-01-28
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1305
Valid CSS Valid XHTML 1.0 Strict