# 2.11BSD#431 - /usr/src/ucb/pascal/eyacc/ey5.c

##### Functions

    cclose            X
    cexit             X
    cflush            X
    copen             X
    system            X

       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

- in /usr/src/ucb/pascal/eyacc/ey1.c line 109, 122, 140, 248
- in /usr/src/ucb/pascal/eyacc/ey3.c line 22

cflush defined in line 28; used 4 times

- in /usr/src/ucb/pascal/eyacc/ey1.c line 149, 155, 227, 241

copen defined in line 10; used 3 times

- in /usr/src/ucb/pascal/eyacc/ey2.c line 25, 44-46(2)

system defined in line 33; used 8 times

- in /usr/src/ucb/pascal/eyacc/ey1.c line 115-120(4), 133-138(4)

Last modified: 1981-01-28 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1028 |