home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / alde_c / misc / comm / yaccunx / yosmry.4c < prev    next >
Encoding:
Text File  |  1983-12-25  |  504 b   |  26 lines

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