home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / yaccsrc2 / yosmry.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-19  |  706 b   |  41 lines

  1.  
  2. # include "y4.h" 
  3.  
  4. /*
  5.  * Write summary.
  6.  */
  7.  
  8. void osummary( )
  9.  
  10.  
  11. {
  12.   register int i,
  13.              * p;
  14.  
  15.   if ( foutput == NULL )
  16.     return;
  17.  
  18.   i = 0;
  19.   for ( p = maxa; p >= yyact; --p )
  20.  
  21.     {
  22.       if ( *p == 0 )
  23.         ++i;
  24.     }
  25.   fprintf( foutput,
  26.            "Optimizer space used: input %d/%d, output %d/%d\n",
  27.            pmem - mem0 + 1,
  28.            MEMSIZE,
  29.            maxa - yyact + 1,
  30.            ACTSIZE );
  31.   fprintf( foutput,
  32.            "%d table entries, %d zero\n",
  33.            ( maxa - yyact ) + 1,
  34.            i );
  35.   fprintf( foutput,
  36.            "maximum spread: %d, maximum offset: %d\n",
  37.            maxspr,
  38.            maxoff );
  39.   fclose( foutput );
  40. }
  41.