home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / tex / tex31 / texsrc.lzh / TEXSRC.LZH / tex3.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-11-28  |  31.1 KB  |  1,437 lines

  1. #define EXTERN extern
  2. #include "texd.h"
  3.  
  4. #ifdef STAT
  5. void zshoweqtb ( n ) 
  6. halfword n ; 
  7. {showeqtb_regmem 
  8.   if ( n < 1 ) 
  9.   printchar ( 63 ) ; 
  10.   else if ( n < 3782 ) 
  11.   {
  12.     sprintcs ( n ) ; 
  13.     printchar ( 61 ) ; 
  14.     printcmdchr ( eqtb [ n ] .hh.b0 , eqtb [ n ] .hh .v.RH ) ; 
  15.     if ( eqtb [ n ] .hh.b0 >= 111 ) 
  16.     {
  17.       printchar ( 58 ) ; 
  18.       showtokenlist ( mem [ eqtb [ n ] .hh .v.RH ] .hh .v.RH , 0 , 32 ) ; 
  19.     } 
  20.   } 
  21.   else if ( n < 4312 ) 
  22.   if ( n < 3800 ) 
  23.   {
  24.     printskipparam ( n - 3782 ) ; 
  25.     printchar ( 61 ) ; 
  26.     if ( n < 3797 ) 
  27.     printspec ( eqtb [ n ] .hh .v.RH , 393 ) ; 
  28.     else printspec ( eqtb [ n ] .hh .v.RH , 334 ) ; 
  29.   } 
  30.   else if ( n < 4056 ) 
  31.   {
  32.     printesc ( 391 ) ; 
  33.     printint ( n - 3800 ) ; 
  34.     printchar ( 61 ) ; 
  35.     printspec ( eqtb [ n ] .hh .v.RH , 393 ) ; 
  36.   } 
  37.   else {
  38.       
  39.     printesc ( 392 ) ; 
  40.     printint ( n - 4056 ) ; 
  41.     printchar ( 61 ) ; 
  42.     printspec ( eqtb [ n ] .hh .v.RH , 334 ) ; 
  43.   } 
  44.   else if ( n < 6163 ) 
  45.   if ( n == 4312 ) 
  46.   {
  47.     printesc ( 404 ) ; 
  48.     printchar ( 61 ) ; 
  49.     if ( eqtb [ 4312 ] .hh .v.RH == 0 ) 
  50.     printchar ( 48 ) ; 
  51.     else printint ( mem [ eqtb [ 4312 ] .hh .v.RH ] .hh .v.LH ) ; 
  52.   } 
  53.   else if ( n < 4322 ) 
  54.   {
  55.     printcmdchr ( 72 , n ) ; 
  56.     printchar ( 61 ) ; 
  57.     if ( eqtb [ n ] .hh .v.RH != 0 ) 
  58.     showtokenlist ( mem [ eqtb [ n ] .hh .v.RH ] .hh .v.RH , 0 , 32 ) ; 
  59.   } 
  60.   else if ( n < 4578 ) 
  61.   {
  62.     printesc ( 403 ) ; 
  63.     printint ( n - 4322 ) ; 
  64.     printchar ( 61 ) ; 
  65.     if ( eqtb [ n ] .hh .v.RH != 0 ) 
  66.     showtokenlist ( mem [ eqtb [ n ] .hh .v.RH ] .hh .v.RH , 0 , 32 ) ; 
  67.   } 
  68.   else if ( n < 4834 ) 
  69.   {
  70.     printesc ( 405 ) ; 
  71.     printint ( n - 4578 ) ; 
  72.     printchar ( 61 ) ; 
  73.     if ( eqtb [ n ] .hh .v.RH == 0 ) 
  74.     print ( 406 ) ; 
  75.     else {
  76.     
  77.       depththreshold = 0 ; 
  78.       breadthmax = 1 ; 
  79.       shownodelist ( eqtb [ n ] .hh .v.RH ) ; 
  80.     } 
  81.   } 
  82.   else if ( n < 4883 ) 
  83.   {
  84.     if ( n == 4834 ) 
  85.     print ( 407 ) ; 
  86.     else if ( n < 4851 ) 
  87.     {
  88.       printesc ( 408 ) ; 
  89.       printint ( n - 4835 ) ; 
  90.     } 
  91.     else if ( n < 4867 ) 
  92.     {
  93.       printesc ( 409 ) ; 
  94.       printint ( n - 4851 ) ; 
  95.     } 
  96.     else {
  97.     
  98.       printesc ( 410 ) ; 
  99.       printint ( n - 4867 ) ; 
  100.     } 
  101.     printchar ( 61 ) ; 
  102.     printesc ( hash [ 3524 + eqtb [ n ] .hh .v.RH ] .v.RH ) ; 
  103.   } 
  104.   else if ( n < 5907 ) 
  105.   {
  106.     if ( n < 5139 ) 
  107.     {
  108.       printesc ( 411 ) ; 
  109.       printint ( n - 4883 ) ; 
  110.     } 
  111.     else if ( n < 5395 ) 
  112.     {
  113.       printesc ( 412 ) ; 
  114.       printint ( n - 5139 ) ; 
  115.     } 
  116.     else if ( n < 5651 ) 
  117.     {
  118.       printesc ( 413 ) ; 
  119.       printint ( n - 5395 ) ; 
  120.     } 
  121.     else {
  122.     
  123.       printesc ( 414 ) ; 
  124.       printint ( n - 5651 ) ; 
  125.     } 
  126.     printchar ( 61 ) ; 
  127.     printint ( eqtb [ n ] .hh .v.RH ) ; 
  128.   } 
  129.   else {
  130.       
  131.     printesc ( 415 ) ; 
  132.     printint ( n - 5907 ) ; 
  133.     printchar ( 61 ) ; 
  134.     printint ( eqtb [ n ] .hh .v.RH ) ; 
  135.   } 
  136.   else if ( n < 6730 ) 
  137.   {
  138.     if ( n < 6218 ) 
  139.     printparam ( n - 6163 ) ; 
  140.     else if ( n < 6474 ) 
  141.     {
  142.       printesc ( 472 ) ; 
  143.       printint ( n - 6218 ) ; 
  144.     } 
  145.     else {
  146.     
  147.       printesc ( 473 ) ; 
  148.       printint ( n - 6474 ) ; 
  149.     } 
  150.     printchar ( 61 ) ; 
  151.     printint ( eqtb [ n ] .cint ) ; 
  152.   } 
  153.   else if ( n <= 7006 ) 
  154.   {
  155.     if ( n < 6751 ) 
  156.     printlengthparam ( n - 6730 ) ; 
  157.     else {
  158.     
  159.       printesc ( 496 ) ; 
  160.       printint ( n - 6751 ) ; 
  161.     } 
  162.     printchar ( 61 ) ; 
  163.     printscaled ( eqtb [ n ] .cint ) ; 
  164.     print ( 393 ) ; 
  165.   } 
  166.   else printchar ( 63 ) ; 
  167. #endif /* STAT */
  168. halfword zidlookup ( j , l ) 
  169. integer j ; 
  170. integer l ; 
  171. {/* 40 */ register halfword Result; idlookup_regmem 
  172.   integer h  ; 
  173.   integer d  ; 
  174.   halfword p  ; 
  175.   halfword k  ; 
  176.   h = buffer [ j ] ; 
  177.   {register integer for_end; k = j + 1 ; for_end = j + l - 1 ; if ( k <= 
  178.   for_end) do 
  179.     {
  180.       h = h + h + buffer [ k ] ; 
  181.       while ( h >= 2551 ) h = h - 2551 ; 
  182.     } 
  183.   while ( k++ < for_end ) ; } 
  184.   p = h + 514 ; 
  185.   while ( true ) {
  186.       
  187.     if ( hash [ p ] .v.RH > 0 ) 
  188.     if ( ( strstart [ hash [ p ] .v.RH + 1 ] - strstart [ hash [ p ] .v.RH ] ) 
  189.     == l ) 
  190.     if ( streqbuf ( hash [ p ] .v.RH , j ) ) 
  191.     goto lab40 ; 
  192.     if ( hash [ p ] .v.LH == 0 ) 
  193.     {
  194.       if ( nonewcontrolsequence ) 
  195.       p = 3781 ; 
  196.       else {
  197.       
  198.     if ( hash [ p ] .v.RH > 0 ) 
  199.     {
  200.       do {
  201.           if ( ( hashused == 514 ) ) 
  202.         overflow ( 499 , 3000 ) ; 
  203.         decr ( hashused ) ; 
  204.       } while ( ! ( hash [ hashused ] .v.RH == 0 ) ) ; 
  205.       hash [ p ] .v.LH = hashused ; 
  206.       p = hashused ; 
  207.     } 
  208.     {
  209.       if ( poolptr + l > poolsize ) 
  210.       overflow ( 257 , poolsize - initpoolptr ) ; 
  211.     } 
  212.     d = ( poolptr - strstart [ strptr ] ) ; 
  213.     while ( poolptr > strstart [ strptr ] ) {
  214.         
  215.       decr ( poolptr ) ; 
  216.       strpool [ poolptr + l ] = strpool [ poolptr ] ; 
  217.     } 
  218.     {register integer for_end; k = j ; for_end = j + l - 1 ; if ( k <= 
  219.     for_end) do 
  220.       {
  221.         strpool [ poolptr ] = buffer [ k ] ; 
  222.         incr ( poolptr ) ; 
  223.       } 
  224.     while ( k++ < for_end ) ; } 
  225.     hash [ p ] .v.RH = makestring () ; 
  226.     poolptr = poolptr + d ; 
  227.     ;
  228. #ifdef STAT
  229.     incr ( cscount ) ; 
  230. #endif /* STAT */
  231.       } 
  232.       goto lab40 ; 
  233.     } 
  234.     p = hash [ p ] .v.LH ; 
  235.   } 
  236.   lab40: Result = p ; 
  237.   return(Result) ; 
  238. void znewsavelevel ( c ) 
  239. groupcode c ; 
  240. {newsavelevel_regmem 
  241.   if ( saveptr > maxsavestack ) 
  242.   {
  243.     maxsavestack = saveptr ; 
  244.     if ( maxsavestack > savesize - 6 ) 
  245.     overflow ( 537 , savesize ) ; 
  246.   } 
  247.   savestack [ saveptr ] .hh.b0 = 3 ; 
  248.   savestack [ saveptr ] .hh.b1 = curgroup ; 
  249.   savestack [ saveptr ] .hh .v.RH = curboundary ; 
  250.   if ( curlevel == 255 ) 
  251.   overflow ( 538 , 255 ) ; 
  252.   curboundary = saveptr ; 
  253.   incr ( curlevel ) ; 
  254.   incr ( saveptr ) ; 
  255.   curgroup = c ; 
  256. void zeqdestroy ( w ) 
  257. memoryword w ; 
  258. {eqdestroy_regmem 
  259.   halfword q  ; 
  260.   switch ( w .hh.b0 ) 
  261.   {case 111 : 
  262.   case 112 : 
  263.   case 113 : 
  264.   case 114 : 
  265.     deletetokenref ( w .hh .v.RH ) ; 
  266.     break ; 
  267.   case 117 : 
  268.     deleteglueref ( w .hh .v.RH ) ; 
  269.     break ; 
  270.   case 118 : 
  271.     {
  272.       q = w .hh .v.RH ; 
  273.       if ( q != 0 ) 
  274.       freenode ( q , mem [ q ] .hh .v.LH + mem [ q ] .hh .v.LH + 1 ) ; 
  275.     } 
  276.     break ; 
  277.   case 119 : 
  278.     flushnodelist ( w .hh .v.RH ) ; 
  279.     break ; 
  280.     default: 
  281.     ; 
  282.     break ; 
  283.   } 
  284. void zeqsave ( p , l ) 
  285. halfword p ; 
  286. quarterword l ; 
  287. {eqsave_regmem 
  288.   if ( saveptr > maxsavestack ) 
  289.   {
  290.     maxsavestack = saveptr ; 
  291.     if ( maxsavestack > savesize - 6 ) 
  292.     overflow ( 537 , savesize ) ; 
  293.   } 
  294.   if ( l == 0 ) 
  295.   savestack [ saveptr ] .hh.b0 = 1 ; 
  296.   else {
  297.       
  298.     savestack [ saveptr ] = eqtb [ p ] ; 
  299.     incr ( saveptr ) ; 
  300.     savestack [ saveptr ] .hh.b0 = 0 ; 
  301.   } 
  302.   savestack [ saveptr ] .hh.b1 = l ; 
  303.   savestack [ saveptr ] .hh .v.RH = p ; 
  304.   incr ( saveptr ) ; 
  305. void zeqdefine ( p , t , e ) 
  306. halfword p ; 
  307. quarterword t ; 
  308. halfword e ; 
  309. {eqdefine_regmem 
  310.   if ( eqtb [ p ] .hh.b1 == curlevel ) 
  311.   eqdestroy ( eqtb [ p ] ) ; 
  312.   else if ( curlevel > 1 ) 
  313.   eqsave ( p , eqtb [ p ] .hh.b1 ) ; 
  314.   eqtb [ p ] .hh.b1 = curlevel ; 
  315.   eqtb [ p ] .hh.b0 = t ; 
  316.   eqtb [ p ] .hh .v.RH = e ; 
  317. void zeqworddefine ( p , w ) 
  318. halfword p ; 
  319. integer w ; 
  320. {eqworddefine_regmem 
  321.   if ( xeqlevel [ p ] != curlevel ) 
  322.   {
  323.     eqsave ( p , xeqlevel [ p ] ) ; 
  324.     xeqlevel [ p ] = curlevel ; 
  325.   } 
  326.   eqtb [ p ] .cint = w ; 
  327. void zgeqdefine ( p , t , e ) 
  328. halfword p ; 
  329. quarterword t ; 
  330. halfword e ; 
  331. {geqdefine_regmem 
  332.   eqdestroy ( eqtb [ p ] ) ; 
  333.   eqtb [ p ] .hh.b1 = 1 ; 
  334.   eqtb [ p ] .hh.b0 = t ; 
  335.   eqtb [ p ] .hh .v.RH = e ; 
  336. void zgeqworddefine ( p , w ) 
  337. halfword p ; 
  338. integer w ; 
  339. {geqworddefine_regmem 
  340.   eqtb [ p ] .cint = w ; 
  341.   xeqlevel [ p ] = 1 ; 
  342. void zsaveforafter ( t ) 
  343. halfword t ; 
  344. {saveforafter_regmem 
  345.   if ( curlevel > 1 ) 
  346.   {
  347.     if ( saveptr > maxsavestack ) 
  348.     {
  349.       maxsavestack = saveptr ; 
  350.       if ( maxsavestack > savesize - 6 ) 
  351.       overflow ( 537 , savesize ) ; 
  352.     } 
  353.     savestack [ saveptr ] .hh.b0 = 2 ; 
  354.     savestack [ saveptr ] .hh.b1 = 0 ; 
  355.     savestack [ saveptr ] .hh .v.RH = t ; 
  356.     incr ( saveptr ) ; 
  357.   } 
  358. #ifdef STAT
  359. void zrestoretrace ( p , s ) 
  360. halfword p ; 
  361. strnumber s ; 
  362. {restoretrace_regmem 
  363.   begindiagnostic () ; 
  364.   printchar ( 123 ) ; 
  365.   print ( s ) ; 
  366.   printchar ( 32 ) ; 
  367.   showeqtb ( p ) ; 
  368.   printchar ( 125 ) ; 
  369.   enddiagnostic ( false ) ; 
  370. #endif /* STAT */
  371. void unsave ( ) 
  372. {/* 30 */ unsave_regmem 
  373.   halfword p  ; 
  374.   quarterword l  ; 
  375.   halfword t  ; 
  376.   if ( curlevel > 1 ) 
  377.   {
  378.     decr ( curlevel ) ; 
  379.     while ( true ) {
  380.     
  381.       decr ( saveptr ) ; 
  382.       if ( savestack [ saveptr ] .hh.b0 == 3 ) 
  383.       goto lab30 ; 
  384.       p = savestack [ saveptr ] .hh .v.RH ; 
  385.       if ( savestack [ saveptr ] .hh.b0 == 2 ) 
  386.       {
  387.     t = curtok ; 
  388.     curtok = p ; 
  389.     backinput () ; 
  390.     curtok = t ; 
  391.       } 
  392.       else {
  393.       
  394.     if ( savestack [ saveptr ] .hh.b0 == 0 ) 
  395.     {
  396.       l = savestack [ saveptr ] .hh.b1 ; 
  397.       decr ( saveptr ) ; 
  398.     } 
  399.     else savestack [ saveptr ] = eqtb [ 3781 ] ; 
  400.     if ( p < 6163 ) 
  401.     if ( eqtb [ p ] .hh.b1 == 1 ) 
  402.     {
  403.       eqdestroy ( savestack [ saveptr ] ) ; 
  404.     ;
  405. #ifdef STAT
  406.       if ( eqtb [ 6200 ] .cint > 0 ) 
  407.       restoretrace ( p , 540 ) ; 
  408. #endif /* STAT */
  409.     } 
  410.     else {
  411.         
  412.       eqdestroy ( eqtb [ p ] ) ; 
  413.       eqtb [ p ] = savestack [ saveptr ] ; 
  414.     ;
  415. #ifdef STAT
  416.       if ( eqtb [ 6200 ] .cint > 0 ) 
  417.       restoretrace ( p , 541 ) ; 
  418. #endif /* STAT */
  419.     } 
  420.     else if ( xeqlevel [ p ] != 1 ) 
  421.     {
  422.       eqtb [ p ] = savestack [ saveptr ] ; 
  423.       xeqlevel [ p ] = l ; 
  424.     ;
  425. #ifdef STAT
  426.       if ( eqtb [ 6200 ] .cint > 0 ) 
  427.       restoretrace ( p , 541 ) ; 
  428. #endif /* STAT */
  429.     } 
  430.     else {
  431.         
  432.     ;
  433. #ifdef STAT
  434.       if ( eqtb [ 6200 ] .cint > 0 ) 
  435.       restoretrace ( p , 540 ) ; 
  436. #endif /* STAT */
  437.     } 
  438.       } 
  439.     } 
  440.     lab30: curgroup = savestack [ saveptr ] .hh.b1 ; 
  441.     curboundary = savestack [ saveptr ] .hh .v.RH ; 
  442.   } 
  443.   else confusion ( 539 ) ; 
  444. void preparemag ( ) 
  445. {preparemag_regmem 
  446.   if ( ( magset > 0 ) && ( eqtb [ 6180 ] .cint != magset ) ) 
  447.   {
  448.     {
  449.       if ( interaction == 3 ) 
  450.       wakeupterminal () ; 
  451.       printnl ( 262 ) ; 
  452.       print ( 543 ) ; 
  453.     } 
  454.     printint ( eqtb [ 6180 ] .cint ) ; 
  455.     print ( 544 ) ; 
  456.     printnl ( 545 ) ; 
  457.     {
  458.       helpptr = 2 ; 
  459.       helpline [ 1 ] = 546 ; 
  460.       helpline [ 0 ] = 547 ; 
  461.     } 
  462.     interror ( magset ) ; 
  463.     geqworddefine ( 6180 , magset ) ; 
  464.   } 
  465.   if ( ( eqtb [ 6180 ] .cint <= 0 ) || ( eqtb [ 6180 ] .cint > 32768L ) ) 
  466.   {
  467.     {
  468.       if ( interaction == 3 ) 
  469.       wakeupterminal () ; 
  470.       printnl ( 262 ) ; 
  471.       print ( 548 ) ; 
  472.     } 
  473.     {
  474.       helpptr = 1 ; 
  475.       helpline [ 0 ] = 549 ; 
  476.     } 
  477.     interror ( eqtb [ 6180 ] .cint ) ; 
  478.     geqworddefine ( 6180 , 1000 ) ; 
  479.   } 
  480.   magset = eqtb [ 6180 ] .cint ; 
  481. void ztokenshow ( p ) 
  482. halfword p ; 
  483. {tokenshow_regmem 
  484.   if ( p != 0 ) 
  485.   showtokenlist ( mem [ p ] .hh .v.RH , 0 , 10000000L ) ; 
  486. void printmeaning ( ) 
  487. {printmeaning_regmem 
  488.   printcmdchr ( curcmd , curchr ) ; 
  489.   if ( curcmd >= 111 ) 
  490.   {
  491.     printchar ( 58 ) ; 
  492.     println () ; 
  493.     tokenshow ( curchr ) ; 
  494.   } 
  495.   else if ( curcmd == 110 ) 
  496.   {
  497.     printchar ( 58 ) ; 
  498.     println () ; 
  499.     tokenshow ( curmark [ curchr ] ) ; 
  500.   } 
  501. void showcurcmdchr ( ) 
  502. {showcurcmdchr_regmem 
  503.   begindiagnostic () ; 
  504.   printnl ( 123 ) ; 
  505.   if ( curlist .modefield != shownmode ) 
  506.   {
  507.     printmode ( curlist .modefield ) ; 
  508.     print ( 564 ) ; 
  509.     shownmode = curlist .modefield ; 
  510.   } 
  511.   printcmdchr ( curcmd , curchr ) ; 
  512.   printchar ( 125 ) ; 
  513.   enddiagnostic ( false ) ; 
  514. void showcontext ( ) 
  515. {/* 30 */ showcontext_regmem 
  516.   schar oldsetting  ; 
  517.   integer nn  ; 
  518.   boolean bottomline  ; 
  519.   integer i  ; 
  520.   integer j  ; 
  521.   integer l  ; 
  522.   integer m  ; 
  523.   integer n  ; 
  524.   integer p  ; 
  525.   integer q  ; 
  526.   baseptr = inputptr ; 
  527.   inputstack [ baseptr ] = curinput ; 
  528.   nn = -1 ; 
  529.   bottomline = false ; 
  530.   while ( true ) {
  531.       
  532.     curinput = inputstack [ baseptr ] ; 
  533.     if ( ( curinput .statefield != 0 ) ) 
  534.     if ( ( curinput .namefield > 17 ) || ( baseptr == 0 ) ) 
  535.     bottomline = true ; 
  536.     if ( ( baseptr == inputptr ) || bottomline || ( nn < eqtb [ 6217 ] .cint ) 
  537.     ) 
  538.     {
  539.       if ( ( baseptr == inputptr ) || ( curinput .statefield != 0 ) || ( 
  540.       curinput .indexfield != 3 ) || ( curinput .locfield != 0 ) ) 
  541.       {
  542.     tally = 0 ; 
  543.     oldsetting = selector ; 
  544.     if ( curinput .statefield != 0 ) 
  545.     {
  546.       if ( curinput .namefield <= 17 ) 
  547.       if ( ( curinput .namefield == 0 ) ) 
  548.       if ( baseptr == 0 ) 
  549.       printnl ( 570 ) ; 
  550.       else printnl ( 571 ) ; 
  551.       else {
  552.           
  553.         printnl ( 572 ) ; 
  554.         if ( curinput .namefield == 17 ) 
  555.         printchar ( 42 ) ; 
  556.         else printint ( curinput .namefield - 1 ) ; 
  557.         printchar ( 62 ) ; 
  558.       } 
  559.       else {
  560.           
  561.         printnl ( 573 ) ; 
  562.         printint ( line ) ; 
  563.       } 
  564.       printchar ( 32 ) ; 
  565.       {
  566.         l = tally ; 
  567.         tally = 0 ; 
  568.         selector = 20 ; 
  569.         trickcount = 1000000L ; 
  570.       } 
  571.       if ( buffer [ curinput .limitfield ] == eqtb [ 6211 ] .cint ) 
  572.       j = curinput .limitfield ; 
  573.       else j = curinput .limitfield + 1 ; 
  574.       if ( j > 0 ) 
  575.       {register integer for_end; i = curinput .startfield ; for_end = j - 
  576.       1 ; if ( i <= for_end) do 
  577.         {
  578.           if ( i == curinput .locfield ) 
  579.           {
  580.         firstcount = tally ; 
  581.         trickcount = tally + 1 + errorline - halferrorline ; 
  582.         if ( trickcount < errorline ) 
  583.         trickcount = errorline ; 
  584.           } 
  585.           print ( buffer [ i ] ) ; 
  586.         } 
  587.       while ( i++ < for_end ) ; } 
  588.     } 
  589.     else {
  590.         
  591.       switch ( curinput .indexfield ) 
  592.       {case 0 : 
  593.         printnl ( 574 ) ; 
  594.         break ; 
  595.       case 1 : 
  596.       case 2 : 
  597.         printnl ( 575 ) ; 
  598.         break ; 
  599.       case 3 : 
  600.         if ( curinput .locfield == 0 ) 
  601.         printnl ( 576 ) ; 
  602.         else printnl ( 577 ) ; 
  603.         break ; 
  604.       case 4 : 
  605.         printnl ( 578 ) ; 
  606.         break ; 
  607.       case 5 : 
  608.         {
  609.           println () ; 
  610.           printcs ( curinput .namefield ) ; 
  611.         } 
  612.         break ; 
  613.       case 6 : 
  614.         printnl ( 579 ) ; 
  615.         break ; 
  616.       case 7 : 
  617.         printnl ( 580 ) ; 
  618.         break ; 
  619.       case 8 : 
  620.         printnl ( 581 ) ; 
  621.         break ; 
  622.       case 9 : 
  623.         printnl ( 582 ) ; 
  624.         break ; 
  625.       case 10 : 
  626.         printnl ( 583 ) ; 
  627.         break ; 
  628.       case 11 : 
  629.         printnl ( 584 ) ; 
  630.         break ; 
  631.       case 12 : 
  632.         printnl ( 585 ) ; 
  633.         break ; 
  634.       case 13 : 
  635.         printnl ( 586 ) ; 
  636.         break ; 
  637.       case 14 : 
  638.         printnl ( 587 ) ; 
  639.         break ; 
  640.       case 15 : 
  641.         printnl ( 588 ) ; 
  642.         break ; 
  643.         default: 
  644.         printnl ( 63 ) ; 
  645.         break ; 
  646.       } 
  647.       {
  648.         l = tally ; 
  649.         tally = 0 ; 
  650.         selector = 20 ; 
  651.         trickcount = 1000000L ; 
  652.       } 
  653.       if ( curinput .indexfield < 5 ) 
  654.       showtokenlist ( curinput .startfield , curinput .locfield , 100000L 
  655.       ) ; 
  656.       else showtokenlist ( mem [ curinput .startfield ] .hh .v.RH , 
  657.       curinput .locfield , 100000L ) ; 
  658.     } 
  659.     selector = oldsetting ; 
  660.     if ( trickcount == 1000000L ) 
  661.     {
  662.       firstcount = tally ; 
  663.       trickcount = tally + 1 + errorline - halferrorline ; 
  664.       if ( trickcount < errorline ) 
  665.       trickcount = errorline ; 
  666.     } 
  667.     if ( tally < trickcount ) 
  668.     m = tally - firstcount ; 
  669.     else m = trickcount - firstcount ; 
  670.     if ( l + firstcount <= halferrorline ) 
  671.     {
  672.       p = 0 ; 
  673.       n = l + firstcount ; 
  674.     } 
  675.     else {
  676.         
  677.       print ( 275 ) ; 
  678.       p = l + firstcount - halferrorline + 3 ; 
  679.       n = halferrorline ; 
  680.     } 
  681.     {register integer for_end; q = p ; for_end = firstcount - 1 ; if ( q 
  682.     <= for_end) do 
  683.       printchar ( trickbuf [ q % errorline ] ) ; 
  684.     while ( q++ < for_end ) ; } 
  685.     println () ; 
  686.     {register integer for_end; q = 1 ; for_end = n ; if ( q <= for_end) 
  687.     do 
  688.       printchar ( 32 ) ; 
  689.     while ( q++ < for_end ) ; } 
  690.     if ( m + n <= errorline ) 
  691.     p = firstcount + m ; 
  692.     else p = firstcount + ( errorline - n - 3 ) ; 
  693.     {register integer for_end; q = firstcount ; for_end = p - 1 ; if ( q 
  694.     <= for_end) do 
  695.       printchar ( trickbuf [ q % errorline ] ) ; 
  696.     while ( q++ < for_end ) ; } 
  697.     if ( m + n > errorline ) 
  698.     print ( 275 ) ; 
  699.     incr ( nn ) ; 
  700.       } 
  701.     } 
  702.     else if ( nn == eqtb [ 6217 ] .cint ) 
  703.     {
  704.       printnl ( 275 ) ; 
  705.       incr ( nn ) ; 
  706.     } 
  707.     if ( bottomline ) 
  708.     goto lab30 ; 
  709.     decr ( baseptr ) ; 
  710.   } 
  711.   lab30: curinput = inputstack [ inputptr ] ; 
  712. void zbegintokenlist ( p , t ) 
  713. halfword p ; 
  714. quarterword t ; 
  715. {begintokenlist_regmem 
  716.   {
  717.     if ( inputptr > maxinstack ) 
  718.     {
  719.       maxinstack = inputptr ; 
  720.       if ( inputptr == stacksize ) 
  721.       overflow ( 589 , stacksize ) ; 
  722.     } 
  723.     inputstack [ inputptr ] = curinput ; 
  724.     incr ( inputptr ) ; 
  725.   } 
  726.   curinput .statefield = 0 ; 
  727.   curinput .startfield = p ; 
  728.   curinput .indexfield = t ; 
  729.   if ( t >= 5 ) 
  730.   {
  731.     incr ( mem [ p ] .hh .v.LH ) ; 
  732.     if ( t == 5 ) 
  733.     curinput .limitfield = paramptr ; 
  734.     else {
  735.     
  736.       curinput .locfield = mem [ p ] .hh .v.RH ; 
  737.       if ( eqtb [ 6193 ] .cint > 1 ) 
  738.       {
  739.     begindiagnostic () ; 
  740.     printnl ( 335 ) ; 
  741.     switch ( t ) 
  742.     {case 14 : 
  743.       printesc ( 348 ) ; 
  744.       break ; 
  745.     case 15 : 
  746.       printesc ( 590 ) ; 
  747.       break ; 
  748.       default: 
  749.       printcmdchr ( 72 , t + 4307 ) ; 
  750.       break ; 
  751.     } 
  752.     print ( 552 ) ; 
  753.     tokenshow ( p ) ; 
  754.     enddiagnostic ( false ) ; 
  755.       } 
  756.     } 
  757.   } 
  758.   else curinput .locfield = p ; 
  759. void endtokenlist ( ) 
  760. {endtokenlist_regmem 
  761.   if ( curinput .indexfield >= 3 ) 
  762.   {
  763.     if ( curinput .indexfield <= 4 ) 
  764.     flushlist ( curinput .startfield ) ; 
  765.     else {
  766.     
  767.       deletetokenref ( curinput .startfield ) ; 
  768.       if ( curinput .indexfield == 5 ) 
  769.       while ( paramptr > curinput .limitfield ) {
  770.       
  771.     decr ( paramptr ) ; 
  772.     flushlist ( paramstack [ paramptr ] ) ; 
  773.       } 
  774.     } 
  775.   } 
  776.   else if ( curinput .indexfield == 1 ) 
  777.   if ( alignstate > 500000L ) 
  778.   alignstate = 0 ; 
  779.   else fatalerror ( 591 ) ; 
  780.   {
  781.     decr ( inputptr ) ; 
  782.     curinput = inputstack [ inputptr ] ; 
  783.   } 
  784.   {
  785.     if ( interrupt != 0 ) 
  786.     pauseforinstructions () ; 
  787.   } 
  788. void backinput ( ) 
  789. {backinput_regmem 
  790.   halfword p  ; 
  791.   while ( ( curinput .statefield == 0 ) && ( curinput .locfield == 0 ) ) 
  792.   endtokenlist () ; 
  793.   p = getavail () ; 
  794.   mem [ p ] .hh .v.LH = curtok ; 
  795.   if ( curtok < 768 ) 
  796.   if ( curtok < 512 ) 
  797.   decr ( alignstate ) ; 
  798.   else incr ( alignstate ) ; 
  799.   {
  800.     if ( inputptr > maxinstack ) 
  801.     {
  802.       maxinstack = inputptr ; 
  803.       if ( inputptr == stacksize ) 
  804.       overflow ( 589 , stacksize ) ; 
  805.     } 
  806.     inputstack [ inputptr ] = curinput ; 
  807.     incr ( inputptr ) ; 
  808.   } 
  809.   curinput .statefield = 0 ; 
  810.   curinput .startfield = p ; 
  811.   curinput .indexfield = 3 ; 
  812.   curinput .locfield = p ; 
  813. void backerror ( ) 
  814. {backerror_regmem 
  815.   OKtointerrupt = false ; 
  816.   backinput () ; 
  817.   OKtointerrupt = true ; 
  818.   error () ; 
  819. void inserror ( ) 
  820. {inserror_regmem 
  821.   OKtointerrupt = false ; 
  822.   backinput () ; 
  823.   curinput .indexfield = 4 ; 
  824.   OKtointerrupt = true ; 
  825.   error () ; 
  826. void beginfilereading ( ) 
  827. {beginfilereading_regmem 
  828.   if ( inopen == maxinopen ) 
  829.   overflow ( 592 , maxinopen ) ; 
  830.   if ( first == bufsize ) 
  831.   overflow ( 256 , bufsize ) ; 
  832.   incr ( inopen ) ; 
  833.   {
  834.     if ( inputptr > maxinstack ) 
  835.     {
  836.       maxinstack = inputptr ; 
  837.       if ( inputptr == stacksize ) 
  838.       overflow ( 589 , stacksize ) ; 
  839.     } 
  840.     inputstack [ inputptr ] = curinput ; 
  841.     incr ( inputptr ) ; 
  842.   } 
  843.   curinput .indexfield = inopen ; 
  844.   linestack [ curinput .indexfield ] = line ; 
  845.   curinput .startfield = first ; 
  846.   curinput .statefield = 1 ; 
  847.   curinput .namefield = 0 ; 
  848. void endfilereading ( ) 
  849. {endfilereading_regmem 
  850.   first = curinput .startfield ; 
  851.   line = linestack [ curinput .indexfield ] ; 
  852.   if ( curinput .namefield > 17 ) 
  853.   aclose ( inputfile [ curinput .indexfield ] ) ; 
  854.   {
  855.     decr ( inputptr ) ; 
  856.     curinput = inputstack [ inputptr ] ; 
  857.   } 
  858.   decr ( inopen ) ; 
  859. void clearforerrorprompt ( ) 
  860. {clearforerrorprompt_regmem 
  861.   while ( ( curinput .statefield != 0 ) && ( curinput .namefield == 0 ) && ( 
  862.   inputptr > 0 ) && ( curinput .locfield > curinput .limitfield ) ) 
  863.   endfilereading () ; 
  864.   println () ; 
  865.   clearterminal () ; 
  866. void checkoutervalidity ( ) 
  867. {checkoutervalidity_regmem 
  868.   halfword p  ; 
  869.   halfword q  ; 
  870.   if ( scannerstatus != 0 ) 
  871.   {
  872.     deletionsallowed = false ; 
  873.     if ( curcs != 0 ) 
  874.     {
  875.       if ( ( curinput .statefield == 0 ) || ( curinput .namefield < 1 ) || ( 
  876.       curinput .namefield > 17 ) ) 
  877.       {
  878.     p = getavail () ; 
  879.     mem [ p ] .hh .v.LH = 4095 + curcs ; 
  880.     begintokenlist ( p , 3 ) ; 
  881.       } 
  882.       curcmd = 10 ; 
  883.       curchr = 32 ; 
  884.     } 
  885.     if ( scannerstatus > 1 ) 
  886.     {
  887.       runaway () ; 
  888.       if ( curcs == 0 ) 
  889.       {
  890.     if ( interaction == 3 ) 
  891.     wakeupterminal () ; 
  892.     printnl ( 262 ) ; 
  893.     print ( 600 ) ; 
  894.       } 
  895.       else {
  896.       
  897.     curcs = 0 ; 
  898.     {
  899.       if ( interaction == 3 ) 
  900.       wakeupterminal () ; 
  901.       printnl ( 262 ) ; 
  902.       print ( 601 ) ; 
  903.     } 
  904.       } 
  905.       print ( 602 ) ; 
  906.       p = getavail () ; 
  907.       switch ( scannerstatus ) 
  908.       {case 2 : 
  909.     {
  910.       print ( 566 ) ; 
  911.       mem [ p ] .hh .v.LH = 637 ; 
  912.     } 
  913.     break ; 
  914.       case 3 : 
  915.     {
  916.       print ( 608 ) ; 
  917.       mem [ p ] .hh .v.LH = partoken ; 
  918.       longstate = 113 ; 
  919.     } 
  920.     break ; 
  921.       case 4 : 
  922.     {
  923.       print ( 568 ) ; 
  924.       mem [ p ] .hh .v.LH = 637 ; 
  925.       q = p ; 
  926.       p = getavail () ; 
  927.       mem [ p ] .hh .v.RH = q ; 
  928.       mem [ p ] .hh .v.LH = 7610 ; 
  929.       alignstate = -1000000L ; 
  930.     } 
  931.     break ; 
  932.       case 5 : 
  933.     {
  934.       print ( 569 ) ; 
  935.       mem [ p ] .hh .v.LH = 637 ; 
  936.     } 
  937.     break ; 
  938.       } 
  939.       begintokenlist ( p , 4 ) ; 
  940.       print ( 603 ) ; 
  941.       sprintcs ( warningindex ) ; 
  942.       {
  943.     helpptr = 4 ; 
  944.     helpline [ 3 ] = 604 ; 
  945.     helpline [ 2 ] = 605 ; 
  946.     helpline [ 1 ] = 606 ; 
  947.     helpline [ 0 ] = 607 ; 
  948.       } 
  949.       error () ; 
  950.     } 
  951.     else {
  952.     
  953.       {
  954.     if ( interaction == 3 ) 
  955.     wakeupterminal () ; 
  956.     printnl ( 262 ) ; 
  957.     print ( 594 ) ; 
  958.       } 
  959.       printcmdchr ( 105 , curif ) ; 
  960.       print ( 595 ) ; 
  961.       printint ( skipline ) ; 
  962.       {
  963.     helpptr = 3 ; 
  964.     helpline [ 2 ] = 596 ; 
  965.     helpline [ 1 ] = 597 ; 
  966.     helpline [ 0 ] = 598 ; 
  967.       } 
  968.       if ( curcs != 0 ) 
  969.       curcs = 0 ; 
  970.       else helpline [ 2 ] = 599 ; 
  971.       curtok = 7613 ; 
  972.       inserror () ; 
  973.     } 
  974.     deletionsallowed = true ; 
  975.   } 
  976. void getnext ( ) 
  977. {/* 20 25 21 26 40 10 */ getnext_regmem 
  978.   integer k  ; 
  979.   halfword t  ; 
  980.   schar cat  ; 
  981.   ASCIIcode c, cc  ; 
  982.   schar d  ; 
  983.   lab20: curcs = 0 ; 
  984.   if ( curinput .statefield != 0 ) 
  985.   {
  986.     lab25: if ( curinput .locfield <= curinput .limitfield ) 
  987.     {
  988.       curchr = buffer [ curinput .locfield ] ; 
  989.       incr ( curinput .locfield ) ; 
  990.       lab21: curcmd = eqtb [ 4883 + curchr ] .hh .v.RH ; 
  991.       switch ( curinput .statefield + curcmd ) 
  992.       {case 10 : 
  993.       case 26 : 
  994.       case 42 : 
  995.       case 27 : 
  996.       case 43 : 
  997.     goto lab25 ; 
  998.     break ; 
  999.       case 1 : 
  1000.       case 17 : 
  1001.       case 33 : 
  1002.     {
  1003.       if ( curinput .locfield > curinput .limitfield ) 
  1004.       curcs = 513 ; 
  1005.       else {
  1006.           
  1007.         lab26: k = curinput .locfield ; 
  1008.         curchr = buffer [ k ] ; 
  1009.         cat = eqtb [ 4883 + curchr ] .hh .v.RH ; 
  1010.         incr ( k ) ; 
  1011.         if ( cat == 11 ) 
  1012.         curinput .statefield = 17 ; 
  1013.         else if ( cat == 10 ) 
  1014.         curinput .statefield = 17 ; 
  1015.         else curinput .statefield = 1 ; 
  1016.         if ( ( cat == 11 ) && ( k <= curinput .limitfield ) ) 
  1017.         {
  1018.           do {
  1019.           curchr = buffer [ k ] ; 
  1020.         cat = eqtb [ 4883 + curchr ] .hh .v.RH ; 
  1021.         incr ( k ) ; 
  1022.           } while ( ! ( ( cat != 11 ) || ( k > curinput .limitfield ) ) ) 
  1023.           ; 
  1024.           {
  1025.         if ( buffer [ k ] == curchr ) 
  1026.         if ( cat == 7 ) 
  1027.         if ( k < curinput .limitfield ) 
  1028.         {
  1029.           c = buffer [ k + 1 ] ; 
  1030.           if ( c < 128 ) 
  1031.           {
  1032.             d = 2 ; 
  1033.             if ( ( ( ( c >= 48 ) && ( c <= 57 ) ) || ( ( c >= 97 ) && 
  1034.             ( c <= 102 ) ) ) ) 
  1035.             if ( k + 2 <= curinput .limitfield ) 
  1036.             {
  1037.               cc = buffer [ k + 2 ] ; 
  1038.               if ( ( ( ( cc >= 48 ) && ( cc <= 57 ) ) || ( ( cc >= 97 
  1039.               ) && ( cc <= 102 ) ) ) ) 
  1040.               incr ( d ) ; 
  1041.             } 
  1042.             if ( d > 2 ) 
  1043.             {
  1044.               if ( c <= 57 ) 
  1045.               curchr = c - 48 ; 
  1046.               else curchr = c - 87 ; 
  1047.               if ( cc <= 57 ) 
  1048.               curchr = 16 * curchr + cc - 48 ; 
  1049.               else curchr = 16 * curchr + cc - 87 ; 
  1050.               buffer [ k - 1 ] = curchr ; 
  1051.             } 
  1052.             else if ( c < 64 ) 
  1053.             buffer [ k - 1 ] = c + 64 ; 
  1054.             else buffer [ k - 1 ] = c - 64 ; 
  1055.             curinput .limitfield = curinput .limitfield - d ; 
  1056.             first = first - d ; 
  1057.             while ( k <= curinput .limitfield ) {
  1058.             
  1059.               buffer [ k ] = buffer [ k + d ] ; 
  1060.               incr ( k ) ; 
  1061.             } 
  1062.             goto lab26 ; 
  1063.           } 
  1064.         } 
  1065.           } 
  1066.           if ( cat != 11 ) 
  1067.           decr ( k ) ; 
  1068.           if ( k > curinput .locfield + 1 ) 
  1069.           {
  1070.         curcs = idlookup ( curinput .locfield , k - curinput .locfield 
  1071.         ) ; 
  1072.         curinput .locfield = k ; 
  1073.         goto lab40 ; 
  1074.           } 
  1075.         } 
  1076.         else {
  1077.         
  1078.           if ( buffer [ k ] == curchr ) 
  1079.           if ( cat == 7 ) 
  1080.           if ( k < curinput .limitfield ) 
  1081.           {
  1082.         c = buffer [ k + 1 ] ; 
  1083.         if ( c < 128 ) 
  1084.         {
  1085.           d = 2 ; 
  1086.           if ( ( ( ( c >= 48 ) && ( c <= 57 ) ) || ( ( c >= 97 ) && ( 
  1087.           c <= 102 ) ) ) ) 
  1088.           if ( k + 2 <= curinput .limitfield ) 
  1089.           {
  1090.             cc = buffer [ k + 2 ] ; 
  1091.             if ( ( ( ( cc >= 48 ) && ( cc <= 57 ) ) || ( ( cc >= 97 ) 
  1092.             && ( cc <= 102 ) ) ) ) 
  1093.             incr ( d ) ; 
  1094.           } 
  1095.           if ( d > 2 ) 
  1096.           {
  1097.             if ( c <= 57 ) 
  1098.             curchr = c - 48 ; 
  1099.             else curchr = c - 87 ; 
  1100.             if ( cc <= 57 ) 
  1101.             curchr = 16 * curchr + cc - 48 ; 
  1102.             else curchr = 16 * curchr + cc - 87 ; 
  1103.             buffer [ k - 1 ] = curchr ; 
  1104.           } 
  1105.           else if ( c < 64 ) 
  1106.           buffer [ k - 1 ] = c + 64 ; 
  1107.           else buffer [ k - 1 ] = c - 64 ; 
  1108.           curinput .limitfield = curinput .limitfield - d ; 
  1109.           first = first - d ; 
  1110.           while ( k <= curinput .limitfield ) {
  1111.               
  1112.             buffer [ k ] = buffer [ k + d ] ; 
  1113.             incr ( k ) ; 
  1114.           } 
  1115.           goto lab26 ; 
  1116.         } 
  1117.           } 
  1118.         } 
  1119.         curcs = 257 + buffer [ curinput .locfield ] ; 
  1120.         incr ( curinput .locfield ) ; 
  1121.       } 
  1122.       lab40: curcmd = eqtb [ curcs ] .hh.b0 ; 
  1123.       curchr = eqtb [ curcs ] .hh .v.RH ; 
  1124.       if ( curcmd >= 113 ) 
  1125.       checkoutervalidity () ; 
  1126.     } 
  1127.     break ; 
  1128.       case 14 : 
  1129.       case 30 : 
  1130.       case 46 : 
  1131.     {
  1132.       curcs = curchr + 1 ; 
  1133.       curcmd = eqtb [ curcs ] .hh.b0 ; 
  1134.       curchr = eqtb [ curcs ] .hh .v.RH ; 
  1135.       curinput .statefield = 1 ; 
  1136.       if ( curcmd >= 113 ) 
  1137.       checkoutervalidity () ; 
  1138.     } 
  1139.     break ; 
  1140.       case 8 : 
  1141.       case 24 : 
  1142.       case 40 : 
  1143.     {
  1144.       if ( curchr == buffer [ curinput .locfield ] ) 
  1145.       if ( curinput .locfield < curinput .limitfield ) 
  1146.       {
  1147.         c = buffer [ curinput .locfield + 1 ] ; 
  1148.         if ( c < 128 ) 
  1149.         {
  1150.           curinput .locfield = curinput .locfield + 2 ; 
  1151.           if ( ( ( ( c >= 48 ) && ( c <= 57 ) ) || ( ( c >= 97 ) && ( c <= 
  1152.           102 ) ) ) ) 
  1153.           if ( curinput .locfield <= curinput .limitfield ) 
  1154.           {
  1155.         cc = buffer [ curinput .locfield ] ; 
  1156.         if ( ( ( ( cc >= 48 ) && ( cc <= 57 ) ) || ( ( cc >= 97 ) && ( 
  1157.         cc <= 102 ) ) ) ) 
  1158.         {
  1159.           incr ( curinput .locfield ) ; 
  1160.           if ( c <= 57 ) 
  1161.           curchr = c - 48 ; 
  1162.           else curchr = c - 87 ; 
  1163.           if ( cc <= 57 ) 
  1164.           curchr = 16 * curchr + cc - 48 ; 
  1165.           else curchr = 16 * curchr + cc - 87 ; 
  1166.           goto lab21 ; 
  1167.         } 
  1168.           } 
  1169.           if ( c < 64 ) 
  1170.           curchr = c + 64 ; 
  1171.           else curchr = c - 64 ; 
  1172.           goto lab21 ; 
  1173.         } 
  1174.       } 
  1175.       curinput .statefield = 1 ; 
  1176.     } 
  1177.     break ; 
  1178.       case 16 : 
  1179.       case 32 : 
  1180.       case 48 : 
  1181.     {
  1182.       {
  1183.         if ( interaction == 3 ) 
  1184.         wakeupterminal () ; 
  1185.         printnl ( 262 ) ; 
  1186.         print ( 609 ) ; 
  1187.       } 
  1188.       {
  1189.         helpptr = 2 ; 
  1190.         helpline [ 1 ] = 610 ; 
  1191.         helpline [ 0 ] = 611 ; 
  1192.       } 
  1193.       deletionsallowed = false ; 
  1194.       error () ; 
  1195.       deletionsallowed = true ; 
  1196.       goto lab20 ; 
  1197.     } 
  1198.     break ; 
  1199.       case 11 : 
  1200.     {
  1201.       curinput .statefield = 17 ; 
  1202.       curchr = 32 ; 
  1203.     } 
  1204.     break ; 
  1205.       case 6 : 
  1206.     {
  1207.       curinput .locfield = curinput .limitfield + 1 ; 
  1208.       curcmd = 10 ; 
  1209.       curchr = 32 ; 
  1210.     } 
  1211.     break ; 
  1212.       case 22 : 
  1213.       case 15 : 
  1214.       case 31 : 
  1215.       case 47 : 
  1216.     {
  1217.       curinput .locfield = curinput .limitfield + 1 ; 
  1218.       goto lab25 ; 
  1219.     } 
  1220.     break ; 
  1221.       case 38 : 
  1222.     {
  1223.       curinput .locfield = curinput .limitfield + 1 ; 
  1224.       curcs = parloc ; 
  1225.       curcmd = eqtb [ curcs ] .hh.b0 ; 
  1226.       curchr = eqtb [ curcs ] .hh .v.RH ; 
  1227.       if ( curcmd >= 113 ) 
  1228.       checkoutervalidity () ; 
  1229.     } 
  1230.     break ; 
  1231.       case 2 : 
  1232.     incr ( alignstate ) ; 
  1233.     break ; 
  1234.       case 18 : 
  1235.       case 34 : 
  1236.     {
  1237.       curinput .statefield = 1 ; 
  1238.       incr ( alignstate ) ; 
  1239.     } 
  1240.     break ; 
  1241.       case 3 : 
  1242.     decr ( alignstate ) ; 
  1243.     break ; 
  1244.       case 19 : 
  1245.       case 35 : 
  1246.     {
  1247.       curinput .statefield = 1 ; 
  1248.       decr ( alignstate ) ; 
  1249.     } 
  1250.     break ; 
  1251.       case 20 : 
  1252.       case 21 : 
  1253.       case 23 : 
  1254.       case 25 : 
  1255.       case 28 : 
  1256.       case 29 : 
  1257.       case 36 : 
  1258.       case 37 : 
  1259.       case 39 : 
  1260.       case 41 : 
  1261.       case 44 : 
  1262.       case 45 : 
  1263.     curinput .statefield = 1 ; 
  1264.     break ; 
  1265.     default: 
  1266.     ; 
  1267.     break ; 
  1268.       } 
  1269.     } 
  1270.     else {
  1271.     
  1272.       curinput .statefield = 33 ; 
  1273.       if ( curinput .namefield > 17 ) 
  1274.       {
  1275.     incr ( line ) ; 
  1276.     first = curinput .startfield ; 
  1277.     if ( ! forceeof ) 
  1278.     {
  1279.       if ( inputln ( inputfile [ curinput .indexfield ] , true ) ) 
  1280.       firmuptheline () ; 
  1281.       else forceeof = true ; 
  1282.     } 
  1283.     if ( forceeof ) 
  1284.     {
  1285.       printchar ( 41 ) ; 
  1286.       decr ( openparens ) ; 
  1287.       flush ( stdout ) ; 
  1288.       forceeof = false ; 
  1289.       endfilereading () ; 
  1290.       checkoutervalidity () ; 
  1291.       goto lab20 ; 
  1292.     } 
  1293.     if ( ( eqtb [ 6211 ] .cint < 0 ) || ( eqtb [ 6211 ] .cint > 255 ) ) 
  1294.     decr ( curinput .limitfield ) ; 
  1295.     else buffer [ curinput .limitfield ] = eqtb [ 6211 ] .cint ; 
  1296.     first = curinput .limitfield + 1 ; 
  1297.     curinput .locfield = curinput .startfield ; 
  1298.       } 
  1299.       else {
  1300.       
  1301.     if ( ! ( curinput .namefield == 0 ) ) 
  1302.     {
  1303.       curcmd = 0 ; 
  1304.       curchr = 0 ; 
  1305.       return ; 
  1306.     } 
  1307.     if ( inputptr > 0 ) 
  1308.     {
  1309.       endfilereading () ; 
  1310.       goto lab20 ; 
  1311.     } 
  1312.     if ( selector < 18 ) 
  1313.     openlogfile () ; 
  1314.     if ( interaction > 1 ) 
  1315.     {
  1316.       if ( ( eqtb [ 6211 ] .cint < 0 ) || ( eqtb [ 6211 ] .cint > 255 ) ) 
  1317.       incr ( curinput .limitfield ) ; 
  1318.       if ( curinput .limitfield == curinput .startfield ) 
  1319.       printnl ( 612 ) ; 
  1320.       println () ; 
  1321.       first = curinput .startfield ; 
  1322.       {
  1323.         wakeupterminal () ; 
  1324.         print ( 42 ) ; 
  1325.         terminput () ; 
  1326.       } 
  1327.       curinput .limitfield = last ; 
  1328.       if ( ( eqtb [ 6211 ] .cint < 0 ) || ( eqtb [ 6211 ] .cint > 255 ) ) 
  1329.       decr ( curinput .limitfield ) ; 
  1330.       else buffer [ curinput .limitfield ] = eqtb [ 6211 ] .cint ; 
  1331.       first = curinput .limitfield + 1 ; 
  1332.       curinput .locfield = curinput .startfield ; 
  1333.     } 
  1334.     else fatalerror ( 613 ) ; 
  1335.       } 
  1336.       {
  1337.     if ( interrupt != 0 ) 
  1338.     pauseforinstructions () ; 
  1339.       } 
  1340.       goto lab25 ; 
  1341.     } 
  1342.   } 
  1343.   else if ( curinput .locfield != 0 ) 
  1344.   {
  1345.     t = mem [ curinput .locfield ] .hh .v.LH ; 
  1346.     curinput .locfield = mem [ curinput .locfield ] .hh .v.RH ; 
  1347.     if ( t >= 4095 ) 
  1348.     {
  1349.       curcs = t - 4095 ; 
  1350.       curcmd = eqtb [ curcs ] .hh.b0 ; 
  1351.       curchr = eqtb [ curcs ] .hh .v.RH ; 
  1352.       if ( curcmd >= 113 ) 
  1353.       if ( curcmd == 116 ) 
  1354.       {
  1355.     curcs = mem [ curinput .locfield ] .hh .v.LH - 4095 ; 
  1356.     curinput .locfield = 0 ; 
  1357.     curcmd = eqtb [ curcs ] .hh.b0 ; 
  1358.     curchr = eqtb [ curcs ] .hh .v.RH ; 
  1359.     if ( curcmd > 100 ) 
  1360.     {
  1361.       curcmd = 0 ; 
  1362.       curchr = 257 ; 
  1363.     } 
  1364.       } 
  1365.       else checkoutervalidity () ; 
  1366.     } 
  1367.     else {
  1368.     
  1369.       curcmd = t / 256 ; 
  1370.       curchr = t % 256 ; 
  1371.       switch ( curcmd ) 
  1372.       {case 1 : 
  1373.     incr ( alignstate ) ; 
  1374.     break ; 
  1375.       case 2 : 
  1376.     decr ( alignstate ) ; 
  1377.     break ; 
  1378.       case 5 : 
  1379.     {
  1380.       begintokenlist ( paramstack [ curinput .limitfield + curchr - 1 ] , 
  1381.       0 ) ; 
  1382.       goto lab20 ; 
  1383.     } 
  1384.     break ; 
  1385.     default: 
  1386.     ; 
  1387.     break ; 
  1388.       } 
  1389.     } 
  1390.   } 
  1391.   else {
  1392.       
  1393.     endtokenlist () ; 
  1394.     goto lab20 ; 
  1395.   } 
  1396.   if ( curcmd <= 5 ) 
  1397.   if ( curcmd >= 4 ) 
  1398.   if ( alignstate == 0 ) 
  1399.   {
  1400.     if ( scannerstatus == 4 ) 
  1401.     fatalerror ( 591 ) ; 
  1402.     curcmd = mem [ curalign + 5 ] .hh .v.LH ; 
  1403.     mem [ curalign + 5 ] .hh .v.LH = curchr ; 
  1404.     if ( curcmd == 63 ) 
  1405.     begintokenlist ( memtop - 10 , 2 ) ; 
  1406.     else begintokenlist ( mem [ curalign + 2 ] .cint , 2 ) ; 
  1407.     alignstate = 1000000L ; 
  1408.     goto lab20 ; 
  1409.   } 
  1410.