home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / YACCUNX.ZIP / YPTITM.1C < prev    next >
Encoding:
Text File  |  1983-12-23  |  644 b   |  36 lines

  1. #include "y1.h"
  2.  
  3. /*
  4.  * yptitm.1c
  5.  *
  6.  * Modified to make debug code conditionally compile.
  7.  * 28-Aug-81
  8.  * Bob Denny
  9.  */
  10.  
  11. putitem( ptr, lptr )  int *ptr;  
  12. struct looksets *lptr; 
  13.  
  14.  
  15.    {
  16.    register struct item *j;
  17.  
  18. #ifdef debug
  19.    if( foutput!=NULL ) 
  20.  
  21.       {
  22.       fprintf( foutput, "putitem(%s), state %d\n", writem(ptr), nstate );
  23.       }
  24. #endif
  25.    j = pstate[nstate+1];
  26.    j->pitem = ptr;
  27.    if( !nolook ) j->look = flset( lptr );
  28.    pstate[nstate+1] = ++j;
  29.    if( (int *)j > zzmemsz )
  30.  
  31.       {
  32.       zzmemsz = (int *)j;
  33.       if( zzmemsz >=  &mem0[MEMSIZE] ) error( "out of state space" );
  34.       }
  35.    }
  36.