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

##### Functions

    cclose            X
    cexit             X
    cflush            X
    copen             X
    system            X

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

#### Defined functions

cclose defined in line 46; never used
cexit defined in line 50; used 5 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 117, 130, 148, 257
- in /usr/src/ucb/PORT/pascal/eyacc/ey3.c line 31

cflush defined in line 37; used 4 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 157, 163, 236, 250

copen defined in line 19; used 4 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey2.c line 23, 36, 55-57(2)

system defined in line 42; used 8 times

- in /usr/src/ucb/PORT/pascal/eyacc/ey1.c line 123-128(4), 141-146(4)

#### Defined variables

sccsid defined in line 8; never used

Last modified: 1985-04-30 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1091 |