#define EXTERN extern #include "mpd.h" void zdepdiv ( p , v ) halfword p ; scaled v ; {/* 10 */ halfword q ; smallnumber s, t ; if ( p == 0 ) q = curexp ; else if ( mem [ p ] .hhfield .b0 != 16 ) q = p ; else { mem [ p + 1 ] .cint = makescaled ( mem [ p + 1 ] .cint , v ) ; goto lab10 ; } t = mem [ q ] .hhfield .b0 ; q = mem [ q + 1 ] .hhfield .v.RH ; s = t ; if ( t == 17 ) if ( abvscd ( maxcoef ( q ) , 65536L , 626349396L , abs ( v ) ) >= 0 ) t = 18 ; q = poverv ( q , v , s , t ) ; depfinish ( q , p , t ) ; lab10: ; } void zsetuptrans ( c ) quarterword c ; {/* 30 10 */ halfword p, q, r ; if ( ( c != 107 ) || ( curtype != 12 ) ) { p = stashcurexp () ; curexp = idtransform () ; curtype = 12 ; q = mem [ curexp + 1 ] .cint ; switch ( c ) {case 103 : if ( mem [ p ] .hhfield .b0 == 16 ) { nsincos ( ( mem [ p + 1 ] .cint % 23592960L ) * 16 ) ; mem [ q + 5 ] .cint = roundfraction ( ncos ) ; mem [ q + 9 ] .cint = roundfraction ( nsin ) ; mem [ q + 7 ] .cint = - (integer) mem [ q + 9 ] .cint ; mem [ q + 11 ] .cint = mem [ q + 5 ] .cint ; goto lab30 ; } break ; case 104 : if ( mem [ p ] .hhfield .b0 > 14 ) { install ( q + 6 , p ) ; goto lab30 ; } break ; case 105 : if ( mem [ p ] .hhfield .b0 > 14 ) { install ( q + 4 , p ) ; install ( q + 10 , p ) ; goto lab30 ; } break ; case 106 : if ( mem [ p ] .hhfield .b0 == 14 ) { r = mem [ p + 1 ] .cint ; install ( q , r ) ; install ( q + 2 , r + 2 ) ; goto lab30 ; } break ; case 108 : if ( mem [ p ] .hhfield .b0 > 14 ) { install ( q + 4 , p ) ; goto lab30 ; } break ; case 109 : if ( mem [ p ] .hhfield .b0 > 14 ) { install ( q + 10 , p ) ; goto lab30 ; } break ; case 110 : if ( mem [ p ] .hhfield .b0 == 14 ) { r = mem [ p + 1 ] .cint ; install ( q + 4 , r ) ; install ( q + 10 , r ) ; install ( q + 8 , r + 2 ) ; if ( mem [ r + 2 ] .hhfield .b0 == 16 ) mem [ r + 3 ] .cint = - (integer) mem [ r + 3 ] .cint ; else negatedeplist ( mem [ r + 3 ] .hhfield .v.RH ) ; install ( q + 6 , r + 2 ) ; goto lab30 ; } break ; case 107 : ; break ; } disperr ( p , 910 ) ; { helpptr = 3 ; helpline [ 2 ] = 911 ; helpline [ 1 ] = 912 ; helpline [ 0 ] = 913 ; } putgeterror () ; lab30: recyclevalue ( p ) ; freenode ( p , 2 ) ; } q = mem [ curexp + 1 ] .cint ; r = q + 12 ; do { r = r - 2 ; if ( mem [ r ] .hhfield .b0 != 16 ) goto lab10 ; } while ( ! ( r == q ) ) ; txx = mem [ q + 5 ] .cint ; txy = mem [ q + 7 ] .cint ; tyx = mem [ q + 9 ] .cint ; tyy = mem [ q + 11 ] .cint ; tx = mem [ q + 1 ] .cint ; ty = mem [ q + 3 ] .cint ; flushcurexp ( 0 ) ; lab10: ; } void zsetupknowntrans ( c ) quarterword c ; {setuptrans ( c ) ; if ( curtype != 16 ) { disperr ( 0 , 914 ) ; { helpptr = 3 ; helpline [ 2 ] = 915 ; helpline [ 1 ] = 916 ; helpline [ 0 ] = 913 ; } putgetflusherror ( 0 ) ; txx = 65536L ; txy = 0 ; tyx = 0 ; tyy = 65536L ; tx = 0 ; ty = 0 ; } } void ztrans ( p , q ) halfword p ; halfword q ; {scaled v ; v = takescaled ( mem [ p ] .cint , txx ) + takescaled ( mem [ q ] .cint , txy ) + tx ; mem [ q ] .cint = takescaled ( mem [ p ] .cint , tyx ) + takescaled ( mem [ q ] .cint , tyy ) + ty ; mem [ p ] .cint = v ; } void zdopathtrans ( p ) halfword p ; {/* 10 */ halfword q ; q = p ; do { if ( mem [ q ] .hhfield .b0 != 0 ) trans ( q + 3 , q + 4 ) ; trans ( q + 1 , q + 2 ) ; if ( mem [ q ] .hhfield .b1 != 0 ) trans ( q + 5 , q + 6 ) ; q = mem [ q ] .hhfield .v.RH ; } while ( ! ( q == p ) ) ; lab10: ; } void zdopentrans ( p ) halfword p ; {/* 10 */ halfword q ; if ( ( p == mem [ p ] .hhfield .v.RH ) ) { trans ( p + 3 , p + 4 ) ; trans ( p + 5 , p + 6 ) ; } q = p ; do { trans ( q + 1 , q + 2 ) ; q = mem [ q ] .hhfield .v.RH ; } while ( ! ( q == p ) ) ; lab10: ; } void zedgestrans ( p , c ) halfword p ; quarterword c ; {/* 31 */ halfword h ; halfword q ; halfword r, s ; scaled sx, sy ; scaled v ; setupknowntrans ( c ) ; h = privateedges ( mem [ p + 1 ] .cint ) ; mem [ p + 1 ] .cint = h ; if ( mem [ h ] .hhfield .v.RH != 2 ) if ( ( txy != 0 ) || ( tyx != 0 ) || ( ty != 0 ) || ( abs ( txx ) != abs ( tyy ) ) ) flushdashlist ( h ) ; else { if ( txx < 0 ) { r = mem [ h ] .hhfield .v.RH ; mem [ h ] .hhfield .v.RH = 2 ; while ( r != 2 ) { s = r ; r = mem [ r ] .hhfield .v.RH ; v = mem [ s + 1 ] .cint ; mem [ s + 1 ] .cint = mem [ s + 2 ] .cint ; mem [ s + 2 ] .cint = v ; mem [ s ] .hhfield .v.RH = mem [ h ] .hhfield .v.RH ; mem [ h ] .hhfield .v.RH = s ; } } r = mem [ h ] .hhfield .v.RH ; while ( r != 2 ) { mem [ r + 1 ] .cint = takescaled ( mem [ r + 1 ] .cint , txx ) + tx ; mem [ r + 2 ] .cint = takescaled ( mem [ r + 2 ] .cint , txx ) + tx ; r = mem [ r ] .hhfield .v.RH ; } mem [ h + 1 ] .cint = takescaled ( mem [ h + 1 ] .cint , abs ( tyy ) ) ; } if ( ( txx == 0 ) && ( tyy == 0 ) ) { v = mem [ h + 2 ] .cint ; mem [ h + 2 ] .cint = mem [ h + 3 ] .cint ; mem [ h + 3 ] .cint = v ; v = mem [ h + 4 ] .cint ; mem [ h + 4 ] .cint = mem [ h + 5 ] .cint ; mem [ h + 5 ] .cint = v ; } else if ( ( txy != 0 ) || ( tyx != 0 ) ) { initbbox ( h ) ; goto lab31 ; } if ( mem [ h + 2 ] .cint <= mem [ h + 4 ] .cint ) { mem [ h + 2 ] .cint = takescaled ( mem [ h + 2 ] .cint , txx + txy ) + tx ; mem [ h + 4 ] .cint = takescaled ( mem [ h + 4 ] .cint , txx + txy ) + tx ; mem [ h + 3 ] .cint = takescaled ( mem [ h + 3 ] .cint , tyx + tyy ) + ty ; mem [ h + 5 ] .cint = takescaled ( mem [ h + 5 ] .cint , tyx + tyy ) + ty ; if ( txx + txy < 0 ) { v = mem [ h + 2 ] .cint ; mem [ h + 2 ] .cint = mem [ h + 4 ] .cint ; mem [ h + 4 ] .cint = v ; } if ( tyx + tyy < 0 ) { v = mem [ h + 3 ] .cint ; mem [ h + 3 ] .cint = mem [ h + 5 ] .cint ; mem [ h + 5 ] .cint = v ; } } lab31: ; q = mem [ h + 7 ] .hhfield .v.RH ; while ( q != 0 ) { switch ( mem [ q ] .hhfield .b0 ) {case 1 : case 2 : { dopathtrans ( mem [ q + 1 ] .hhfield .v.RH ) ; if ( mem [ q + 1 ] .hhfield .lhfield != 0 ) { sx = tx ; sy = ty ; tx = 0 ; ty = 0 ; dopentrans ( mem [ q + 1 ] .hhfield .lhfield ) ; tx = sx ; ty = sy ; } } break ; case 4 : case 5 : dopathtrans ( mem [ q + 1 ] .hhfield .v.RH ) ; break ; case 3 : { r = q + 8 ; trans ( r , r + 1 ) ; sx = tx ; sy = ty ; tx = 0 ; ty = 0 ; trans ( r + 2 , r + 4 ) ; trans ( r + 3 , r + 5 ) ; tx = sx ; ty = sy ; } break ; case 6 : case 7 : ; break ; } q = mem [ q ] .hhfield .v.RH ; } unstashcurexp ( p ) ; } void zbilin1 ( p , t , q , u , delta ) halfword p ; scaled t ; halfword q ; scaled u ; scaled delta ; {halfword r ; if ( t != 65536L ) depmult ( p , t , true ) ; if ( u != 0 ) if ( mem [ q ] .hhfield .b0 == 16 ) delta = delta + takescaled ( mem [ q + 1 ] .cint , u ) ; else { if ( mem [ p ] .hhfield .b0 != 18 ) { if ( mem [ p ] .hhfield .b0 == 16 ) newdep ( p , constdependency ( mem [ p + 1 ] .cint ) ) ; else mem [ p + 1 ] .hhfield .v.RH = ptimesv ( mem [ p + 1 ] .hhfield .v.RH , 65536L , 17 , 18 , true ) ; mem [ p ] .hhfield .b0 = 18 ; } mem [ p + 1 ] .hhfield .v.RH = pplusfq ( mem [ p + 1 ] .hhfield .v.RH , u , mem [ q + 1 ] .hhfield .v.RH , 18 , mem [ q ] .hhfield .b0 ) ; } if ( mem [ p ] .hhfield .b0 == 16 ) mem [ p + 1 ] .cint = mem [ p + 1 ] .cint + delta ; else { r = mem [ p + 1 ] .hhfield .v.RH ; while ( mem [ r ] .hhfield .lhfield != 0 ) r = mem [ r ] .hhfield .v.RH ; delta = mem [ r + 1 ] .cint + delta ; if ( r != mem [ p + 1 ] .hhfield .v.RH ) mem [ r + 1 ] .cint = delta ; else { recyclevalue ( p ) ; mem [ p ] .hhfield .b0 = 16 ; mem [ p + 1 ] .cint = delta ; } } if ( fixneeded ) fixdependencies () ; } void zaddmultdep ( p , v , r ) halfword p ; scaled v ; halfword r ; {if ( mem [ r ] .hhfield .b0 == 16 ) mem [ depfinal + 1 ] .cint = mem [ depfinal + 1 ] .cint + takescaled ( mem [ r + 1 ] .cint , v ) ; else { mem [ p + 1 ] .hhfield .v.RH = pplusfq ( mem [ p + 1 ] .hhfield .v.RH , v , mem [ r + 1 ] .hhfield .v.RH , 18 , mem [ r ] .hhfield .b0 ) ; if ( fixneeded ) fixdependencies () ; } } void zbilin2 ( p , t , v , u , q ) halfword p ; halfword t ; scaled v ; halfword u ; halfword q ; {scaled vv ; vv = mem [ p + 1 ] .cint ; mem [ p ] .hhfield .b0 = 18 ; newdep ( p , constdependency ( 0 ) ) ; if ( vv != 0 ) addmultdep ( p , vv , t ) ; if ( v != 0 ) addmultdep ( p , v , u ) ; if ( q != 0 ) addmultdep ( p , 65536L , q ) ; if ( mem [ p + 1 ] .hhfield .v.RH == depfinal ) { vv = mem [ depfinal + 1 ] .cint ; recyclevalue ( p ) ; mem [ p ] .hhfield .b0 = 16 ; mem [ p + 1 ] .cint = vv ; } } void zbilin3 ( p , t , v , u , delta ) halfword p ; scaled t ; scaled v ; scaled u ; scaled delta ; {if ( t != 65536L ) delta = delta + takescaled ( mem [ p + 1 ] .cint , t ) ; else delta = delta + mem [ p + 1 ] .cint ; if ( u != 0 ) mem [ p + 1 ] .cint = delta + takescaled ( v , u ) ; else mem [ p + 1 ] .cint = delta ; } void zbigtrans ( p , c ) halfword p ; quarterword c ; {/* 10 */ halfword q, r, pp, qq ; smallnumber s ; s = bignodesize [ mem [ p ] .hhfield .b0 ] ; q = mem [ p + 1 ] .cint ; r = q + s ; do { r = r - 2 ; if ( mem [ r ] .hhfield .b0 != 16 ) { setupknowntrans ( c ) ; makeexpcopy ( p ) ; r = mem [ curexp + 1 ] .cint ; if ( curtype == 12 ) { bilin1 ( r + 10 , tyy , q + 6 , tyx , 0 ) ; bilin1 ( r + 8 , tyy , q + 4 , tyx , 0 ) ; bilin1 ( r + 6 , txx , q + 10 , txy , 0 ) ; bilin1 ( r + 4 , txx , q + 8 , txy , 0 ) ; } bilin1 ( r + 2 , tyy , q , tyx , ty ) ; bilin1 ( r , txx , q + 2 , txy , tx ) ; goto lab10 ; } } while ( ! ( r == q ) ) ; setuptrans ( c ) ; if ( curtype == 16 ) { makeexpcopy ( p ) ; r = mem [ curexp + 1 ] .cint ; if ( curtype == 12 ) { bilin3 ( r + 10 , tyy , mem [ q + 7 ] .cint , tyx , 0 ) ; bilin3 ( r + 8 , tyy , mem [ q + 5 ] .cint , tyx , 0 ) ; bilin3 ( r + 6 , txx , mem [ q + 11 ] .cint , txy , 0 ) ; bilin3 ( r + 4 , txx , mem [ q + 9 ] .cint , txy , 0 ) ; } bilin3 ( r + 2 , tyy , mem [ q + 1 ] .cint , tyx , ty ) ; bilin3 ( r , txx , mem [ q + 3 ] .cint , txy , tx ) ; } else { pp = stashcurexp () ; qq = mem [ pp + 1 ] .cint ; makeexpcopy ( p ) ; r = mem [ curexp + 1 ] .cint ; if ( curtype == 12 ) { bilin2 ( r + 10 , qq + 10 , mem [ q + 7 ] .cint , qq + 8 , 0 ) ; bilin2 ( r + 8 , qq + 10 , mem [ q + 5 ] .cint , qq + 8 , 0 ) ; bilin2 ( r + 6 , qq + 4 , mem [ q + 11 ] .cint , qq + 6 , 0 ) ; bilin2 ( r + 4 , qq + 4 , mem [ q + 9 ] .cint , qq + 6 , 0 ) ; } bilin2 ( r + 2 , qq + 10 , mem [ q + 1 ] .cint , qq + 8 , qq + 2 ) ; bilin2 ( r , qq + 4 , mem [ q + 3 ] .cint , qq + 6 , qq ) ; recyclevalue ( pp ) ; freenode ( pp , 2 ) ; } lab10: ; } void zcat ( p ) halfword p ; {strnumber a, b ; poolpointer k ; a = mem [ p + 1 ] .cint ; b = curexp ; { if ( poolptr + ( strstart [ nextstr [ a ] ] - strstart [ a ] ) + ( strstart [ nextstr [ b ] ] - strstart [ b ] ) > maxpoolptr ) if ( poolptr + ( strstart [ nextstr [ a ] ] - strstart [ a ] ) + ( strstart [ nextstr [ b ] ] - strstart [ b ] ) > poolsize ) docompaction ( ( strstart [ nextstr [ a ] ] - strstart [ a ] ) + ( strstart [ nextstr [ b ] ] - strstart [ b ] ) ) ; else maxpoolptr = poolptr + ( strstart [ nextstr [ a ] ] - strstart [ a ] ) + ( strstart [ nextstr [ b ] ] - strstart [ b ] ) ; } {register integer for_end; k = strstart [ a ] ; for_end = strstart [ nextstr [ a ] ] - 1 ; if ( k <= for_end) do { strpool [ poolptr ] = strpool [ k ] ; incr ( poolptr ) ; } while ( k++ < for_end ) ; } {register integer for_end; k = strstart [ b ] ; for_end = strstart [ nextstr [ b ] ] - 1 ; if ( k <= for_end) do { strpool [ poolptr ] = strpool [ k ] ; incr ( poolptr ) ; } while ( k++ < for_end ) ; } curexp = makestring () ; { if ( strref [ b ] < 127 ) if ( strref [ b ] > 1 ) decr ( strref [ b ] ) ; else flushstring ( b ) ; } } void zchopstring ( p ) halfword p ; {integer a, b ; integer l ; integer k ; strnumber s ; boolean reversed ; a = roundunscaled ( mem [ p + 1 ] .cint ) ; b = roundunscaled ( mem [ p + 3 ] .cint ) ; if ( a <= b ) reversed = false ; else { reversed = true ; k = a ; a = b ; b = k ; } s = curexp ; l = ( strstart [ nextstr [ s ] ] - strstart [ s ] ) ; if ( a < 0 ) { a = 0 ; if ( b < 0 ) b = 0 ; } if ( b > l ) { b = l ; if ( a > l ) a = l ; } { if ( poolptr + b - a > maxpoolptr ) if ( poolptr + b - a > poolsize ) docompaction ( b - a ) ; else maxpoolptr = poolptr + b - a ; } if ( reversed ) {register integer for_end; k = strstart [ s ] + b - 1 ; for_end = strstart [ s ] + a ; if ( k >= for_end) do { strpool [ poolptr ] = strpool [ k ] ; incr ( poolptr ) ; } while ( k-- > for_end ) ; } else { register integer for_end; k = strstart [ s ] + a ; for_end = strstart [ s ] + b - 1 ; if ( k <= for_end) do { strpool [ poolptr ] = strpool [ k ] ; incr ( poolptr ) ; } while ( k++ < for_end ) ; } curexp = makestring () ; { if ( strref [ s ] < 127 ) if ( strref [ s ] > 1 ) decr ( strref [ s ] ) ; else flushstring ( s ) ; } } void zchoppath ( p ) halfword p ; {halfword q ; halfword pp, qq, rr, ss ; scaled a, b, k, l ; boolean reversed ; l = pathlength () ; a = mem [ p + 1 ] .cint ; b = mem [ p + 3 ] .cint ; if ( a <= b ) reversed = false ; else { reversed = true ; k = a ; a = b ; b = k ; } if ( a < 0 ) if ( mem [ curexp ] .hhfield .b0 == 0 ) { a = 0 ; if ( b < 0 ) b = 0 ; } else do { a = a + l ; b = b + l ; } while ( ! ( a >= 0 ) ) ; if ( b > l ) if ( mem [ curexp ] .hhfield .b0 == 0 ) { b = l ; if ( a > l ) a = l ; } else while ( a >= l ) { a = a - l ; b = b - l ; } q = curexp ; while ( a >= 65536L ) { q = mem [ q ] .hhfield .v.RH ; a = a - 65536L ; b = b - 65536L ; } if ( b == a ) { if ( a > 0 ) { splitcubic ( q , a * 4096 ) ; q = mem [ q ] .hhfield .v.RH ; } pp = copyknot ( q ) ; qq = pp ; } else { pp = copyknot ( q ) ; qq = pp ; do { q = mem [ q ] .hhfield .v.RH ; rr = qq ; qq = copyknot ( q ) ; mem [ rr ] .hhfield .v.RH = qq ; b = b - 65536L ; } while ( ! ( b <= 0 ) ) ; if ( a > 0 ) { ss = pp ; pp = mem [ pp ] .hhfield .v.RH ; splitcubic ( ss , a * 4096 ) ; pp = mem [ ss ] .hhfield .v.RH ; freenode ( ss , 7 ) ; if ( rr == ss ) { b = makescaled ( b , 65536L - a ) ; rr = pp ; } } if ( b < 0 ) { splitcubic ( rr , ( b + 65536L ) * 4096 ) ; freenode ( qq , 7 ) ; qq = mem [ rr ] .hhfield .v.RH ; } } mem [ pp ] .hhfield .b0 = 0 ; mem [ qq ] .hhfield .b1 = 0 ; mem [ qq ] .hhfield .v.RH = pp ; tossknotlist ( curexp ) ; if ( reversed ) { curexp = mem [ htapypoc ( pp ) ] .hhfield .v.RH ; tossknotlist ( pp ) ; } else curexp = pp ; } void zsetupoffset ( p ) halfword p ; {findoffset ( mem [ p + 1 ] .cint , mem [ p + 3 ] .cint , curexp ) ; pairvalue ( curx , cury ) ; } void zsetupdirectiontime ( p ) halfword p ; {flushcurexp ( finddirectiontime ( mem [ p + 1 ] .cint , mem [ p + 3 ] .cint , curexp ) ) ; } void zfindpoint ( v , c ) scaled v ; quarterword c ; {halfword p ; scaled n ; p = curexp ; if ( mem [ p ] .hhfield .b0 == 0 ) n = -65536L ; else n = 0 ; do { p = mem [ p ] .hhfield .v.RH ; n = n + 65536L ; } while ( ! ( p == curexp ) ) ; if ( n == 0 ) v = 0 ; else if ( v < 0 ) if ( mem [ p ] .hhfield .b0 == 0 ) v = 0 ; else v = n - 1 - ( ( - (integer) v - 1 ) % n ) ; else if ( v > n ) if ( mem [ p ] .hhfield .b0 == 0 ) v = n ; else v = v % n ; p = curexp ; while ( v >= 65536L ) { p = mem [ p ] .hhfield .v.RH ; v = v - 65536L ; } if ( v != 0 ) { splitcubic ( p , v * 4096 ) ; p = mem [ p ] .hhfield .v.RH ; } switch ( c ) {case 117 : pairvalue ( mem [ p + 1 ] .cint , mem [ p + 2 ] .cint ) ; break ; case 118 : if ( mem [ p ] .hhfield .b0 == 0 ) pairvalue ( mem [ p + 1 ] .cint , mem [ p + 2 ] .cint ) ; else pairvalue ( mem [ p + 3 ] .cint , mem [ p + 4 ] .cint ) ; break ; case 119 : if ( mem [ p ] .hhfield .b1 == 0 ) pairvalue ( mem [ p + 1 ] .cint , mem [ p + 2 ] .cint ) ; else pairvalue ( mem [ p + 5 ] .cint , mem [ p + 6 ] .cint ) ; break ; } } void zdoinfont ( p ) halfword p ; {halfword q ; q = getnode ( 8 ) ; initedges ( q ) ; mem [ mem [ q + 7 ] .hhfield .lhfield ] .hhfield .v.RH = newtextnode ( curexp , mem [ p + 1 ] .cint ) ; mem [ q + 7 ] .hhfield .lhfield = mem [ mem [ q + 7 ] .hhfield .lhfield ] .hhfield .v.RH ; freenode ( p , 2 ) ; flushcurexp ( q ) ; curtype = 10 ; } void zdobinary ( p , c ) halfword p ; quarterword c ; {/* 30 31 10 */ halfword q, r, rr ; halfword oldp, oldexp ; integer v ; { if ( aritherror ) cleararith () ; } if ( internal [ 6 ] > 131072L ) { begindiagnostic () ; printnl ( 902 ) ; printexp ( p , 0 ) ; printchar ( 41 ) ; printop ( c ) ; printchar ( 40 ) ; printexp ( 0 , 0 ) ; print ( 891 ) ; enddiagnostic ( false ) ; } switch ( mem [ p ] .hhfield .b0 ) {case 12 : case 13 : case 14 : oldp = tarnished ( p ) ; break ; case 19 : oldp = 1 ; break ; default: oldp = 0 ; break ; } if ( oldp != 0 ) { q = stashcurexp () ; oldp = p ; makeexpcopy ( oldp ) ; p = stashcurexp () ; unstashcurexp ( q ) ; } switch ( curtype ) {case 12 : case 13 : case 14 : oldexp = tarnished ( curexp ) ; break ; case 19 : oldexp = 1 ; break ; default: oldexp = 0 ; break ; } if ( oldexp != 0 ) { oldexp = curexp ; makeexpcopy ( oldexp ) ; } switch ( c ) {case 88 : case 89 : if ( ( curtype < 13 ) || ( mem [ p ] .hhfield .b0 < 13 ) ) badbinary ( p , c ) ; else if ( ( curtype > 14 ) && ( mem [ p ] .hhfield .b0 > 14 ) ) addorsubtract ( p , 0 , c ) ; else if ( curtype != mem [ p ] .hhfield .b0 ) badbinary ( p , c ) ; else { q = mem [ p + 1 ] .cint ; r = mem [ curexp + 1 ] .cint ; rr = r + bignodesize [ curtype ] ; while ( r < rr ) { addorsubtract ( q , r , c ) ; q = q + 2 ; r = r + 2 ; } } break ; case 96 : case 97 : case 98 : case 99 : case 100 : case 101 : { if ( ( curtype > 14 ) && ( mem [ p ] .hhfield .b0 > 14 ) ) addorsubtract ( p , 0 , 89 ) ; else if ( curtype != mem [ p ] .hhfield .b0 ) { badbinary ( p , c ) ; goto lab30 ; } else if ( curtype == 4 ) flushcurexp ( strvsstr ( mem [ p + 1 ] .cint , curexp ) ) ; else if ( ( curtype == 5 ) || ( curtype == 3 ) ) { q = mem [ curexp + 1 ] .cint ; while ( ( q != curexp ) && ( q != p ) ) q = mem [ q + 1 ] .cint ; if ( q == p ) flushcurexp ( 0 ) ; } else if ( ( curtype <= 14 ) && ( curtype >= 12 ) ) { q = mem [ p + 1 ] .cint ; r = mem [ curexp + 1 ] .cint ; rr = r + bignodesize [ curtype ] - 2 ; while ( true ) { addorsubtract ( q , r , 89 ) ; if ( mem [ r ] .hhfield .b0 != 16 ) goto lab31 ; if ( mem [ r + 1 ] .cint != 0 ) goto lab31 ; if ( r == rr ) goto lab31 ; q = q + 2 ; r = r + 2 ; } lab31: takepart ( mem [ r ] .hhfield .b1 + 48 ) ; } else if ( curtype == 2 ) flushcurexp ( curexp - mem [ p + 1 ] .cint ) ; else { badbinary ( p , c ) ; goto lab30 ; } if ( curtype != 16 ) { if ( curtype < 16 ) { disperr ( p , 285 ) ; { helpptr = 1 ; helpline [ 0 ] = 903 ; } } else { helpptr = 2 ; helpline [ 1 ] = 904 ; helpline [ 0 ] = 905 ; } disperr ( 0 , 906 ) ; putgetflusherror ( 31 ) ; } else switch ( c ) {case 96 : if ( curexp < 0 ) curexp = 30 ; else curexp = 31 ; break ; case 97 : if ( curexp <= 0 ) curexp = 30 ; else curexp = 31 ; break ; case 98 : if ( curexp > 0 ) curexp = 30 ; else curexp = 31 ; break ; case 99 : if ( curexp >= 0 ) curexp = 30 ; else curexp = 31 ; break ; case 100 : if ( curexp == 0 ) curexp = 30 ; else curexp = 31 ; break ; case 101 : if ( curexp != 0 ) curexp = 30 ; else curexp = 31 ; break ; } curtype = 2 ; lab30: ; } break ; case 95 : case 94 : if ( ( mem [ p ] .hhfield .b0 != 2 ) || ( curtype != 2 ) ) badbinary ( p , c ) ; else if ( mem [ p + 1 ] .cint == c - 64 ) curexp = mem [ p + 1 ] .cint ; break ; case 90 : if ( ( curtype < 13 ) || ( mem [ p ] .hhfield .b0 < 13 ) ) badbinary ( p , 90 ) ; else if ( ( curtype == 16 ) || ( mem [ p ] .hhfield .b0 == 16 ) ) { if ( mem [ p ] .hhfield .b0 == 16 ) { v = mem [ p + 1 ] .cint ; freenode ( p , 2 ) ; } else { v = curexp ; unstashcurexp ( p ) ; } if ( curtype == 16 ) curexp = takescaled ( curexp , v ) ; else if ( ( curtype == 14 ) || ( curtype == 13 ) ) { p = mem [ curexp + 1 ] .cint + bignodesize [ curtype ] ; do { p = p - 2 ; depmult ( p , v , true ) ; } while ( ! ( p == mem [ curexp + 1 ] .cint ) ) ; } else depmult ( 0 , v , true ) ; goto lab10 ; } else if ( ( nicecolororpair ( p , mem [ p ] .hhfield .b0 ) && ( curtype > 14 ) ) || ( nicecolororpair ( curexp , curtype ) && ( mem [ p ] .hhfield .b0 > 14 ) ) ) { hardtimes ( p ) ; goto lab10 ; } else badbinary ( p , 90 ) ; break ; case 91 : if ( ( curtype != 16 ) || ( mem [ p ] .hhfield .b0 < 13 ) ) badbinary ( p , 91 ) ; else { v = curexp ; unstashcurexp ( p ) ; if ( v == 0 ) { disperr ( 0 , 835 ) ; { helpptr = 2 ; helpline [ 1 ] = 908 ; helpline [ 0 ] = 909 ; } putgeterror () ; } else { if ( curtype == 16 ) curexp = makescaled ( curexp , v ) ; else if ( curtype <= 14 ) { p = mem [ curexp + 1 ] .cint + bignodesize [ curtype ] ; do { p = p - 2 ; depdiv ( p , v ) ; } while ( ! ( p == mem [ curexp + 1 ] .cint ) ) ; } else depdiv ( 0 , v ) ; } goto lab10 ; } break ; case 92 : case 93 : if ( ( curtype == 16 ) && ( mem [ p ] .hhfield .b0 == 16 ) ) if ( c == 92 ) curexp = pythadd ( mem [ p + 1 ] .cint , curexp ) ; else curexp = pythsub ( mem [ p + 1 ] .cint , curexp ) ; else badbinary ( p , c ) ; break ; case 103 : case 104 : case 105 : case 106 : case 107 : case 108 : case 109 : case 110 : if ( mem [ p ] .hhfield .b0 == 8 ) { { setupknowntrans ( c ) ; unstashcurexp ( p ) ; dopathtrans ( curexp ) ; } goto lab10 ; } else if ( mem [ p ] .hhfield .b0 == 6 ) { { setupknowntrans ( c ) ; unstashcurexp ( p ) ; dopentrans ( curexp ) ; } curexp = convexhull ( curexp ) ; goto lab10 ; } else if ( ( mem [ p ] .hhfield .b0 == 14 ) || ( mem [ p ] .hhfield .b0 == 12 ) ) bigtrans ( p , c ) ; else if ( mem [ p ] .hhfield .b0 == 10 ) { edgestrans ( p , c ) ; goto lab10 ; } else badbinary ( p , c ) ; break ; case 102 : if ( ( curtype == 4 ) && ( mem [ p ] .hhfield .b0 == 4 ) ) cat ( p ) ; else badbinary ( p , 102 ) ; break ; case 114 : if ( nicepair ( p , mem [ p ] .hhfield .b0 ) && ( curtype == 4 ) ) chopstring ( mem [ p + 1 ] .cint ) ; else badbinary ( p , 114 ) ; break ; case 115 : { if ( curtype == 14 ) pairtopath () ; if ( nicepair ( p , mem [ p ] .hhfield .b0 ) && ( curtype == 8 ) ) choppath ( mem [ p + 1 ] .cint ) ; else badbinary ( p , 115 ) ; } break ; case 117 : case 118 : case 119 : { if ( curtype == 14 ) pairtopath () ; if ( ( curtype == 8 ) && ( mem [ p ] .hhfield .b0 == 16 ) ) findpoint ( mem [ p + 1 ] .cint , c ) ; else badbinary ( p , c ) ; } break ; case 120 : if ( ( curtype == 6 ) && nicepair ( p , mem [ p ] .hhfield .b0 ) ) setupoffset ( mem [ p + 1 ] .cint ) ; else badbinary ( p , 120 ) ; break ; case 116 : { if ( curtype == 14 ) pairtopath () ; if ( ( curtype == 8 ) && nicepair ( p , mem [ p ] .hhfield .b0 ) ) setupdirectiontime ( mem [ p + 1 ] .cint ) ; else badbinary ( p , 116 ) ; } break ; case 121 : { if ( curtype == 14 ) pairtopath () ; if ( ( curtype == 8 ) && ( mem [ p ] .hhfield .b0 == 16 ) ) flushcurexp ( getarctime ( curexp , mem [ p + 1 ] .cint ) ) ; else badbinary ( p , c ) ; } break ; case 112 : { if ( mem [ p ] .hhfield .b0 == 14 ) { q = stashcurexp () ; unstashcurexp ( p ) ; pairtopath () ; p = stashcurexp () ; unstashcurexp ( q ) ; } if ( curtype == 14 ) pairtopath () ; if ( ( curtype == 8 ) && ( mem [ p ] .hhfield .b0 == 8 ) ) { pathintersection ( mem [ p + 1 ] .cint , curexp ) ; pairvalue ( curt , curtt ) ; } else badbinary ( p , 112 ) ; } break ; case 111 : if ( ( curtype != 4 ) || ( mem [ p ] .hhfield .b0 != 4 ) ) badbinary ( p , 111 ) ; else { doinfont ( p ) ; goto lab10 ; } break ; } recyclevalue ( p ) ; freenode ( p , 2 ) ; lab10: { if ( aritherror ) cleararith () ; } if ( oldp != 0 ) { recyclevalue ( oldp ) ; freenode ( oldp , 2 ) ; } if ( oldexp != 0 ) { recyclevalue ( oldexp ) ; freenode ( oldexp , 2 ) ; } } void zfracmult ( n , d ) scaled n ; scaled d ; {halfword p ; halfword oldexp ; fraction v ; if ( internal [ 6 ] > 131072L ) { begindiagnostic () ; printnl ( 902 ) ; printscaled ( n ) ; printchar ( 47 ) ; printscaled ( d ) ; print ( 907 ) ; printexp ( 0 , 0 ) ; print ( 891 ) ; enddiagnostic ( false ) ; } switch ( curtype ) {case 12 : case 13 : case 14 : oldexp = tarnished ( curexp ) ; break ; case 19 : oldexp = 1 ; break ; default: oldexp = 0 ; break ; } if ( oldexp != 0 ) { oldexp = curexp ; makeexpcopy ( oldexp ) ; } v = makefraction ( n , d ) ; if ( curtype == 16 ) curexp = takefraction ( curexp , v ) ; else if ( curtype <= 14 ) { p = mem [ curexp + 1 ] .cint + bignodesize [ curtype ] ; do { p = p - 2 ; depmult ( p , v , false ) ; } while ( ! ( p == mem [ curexp + 1 ] .cint ) ) ; } else depmult ( 0 , v , false ) ; if ( oldexp != 0 ) { recyclevalue ( oldexp ) ; freenode ( oldexp , 2 ) ; } } void ztryeq ( l , r ) halfword l ; halfword r ; {/* 30 31 */ halfword p ; char t ; halfword q ; halfword pp ; char tt ; boolean copied ; t = mem [ l ] .hhfield .b0 ; if ( t == 16 ) { t = 17 ; p = constdependency ( - (integer) mem [ l + 1 ] .cint ) ; q = p ; } else if ( t == 19 ) { t = 17 ; p = singledependency ( l ) ; mem [ p + 1 ] .cint = - (integer) mem [ p + 1 ] .cint ; q = depfinal ; } else { p = mem [ l + 1 ] .hhfield .v.RH ; q = p ; while ( true ) { mem [ q + 1 ] .cint = - (integer) mem [ q + 1 ] .cint ; if ( mem [ q ] .hhfield .lhfield == 0 ) goto lab30 ; q = mem [ q ] .hhfield .v.RH ; } lab30: mem [ mem [ l + 1 ] .hhfield .lhfield ] .hhfield .v.RH = mem [ q ] .hhfield .v.RH ; mem [ mem [ q ] .hhfield .v.RH + 1 ] .hhfield .lhfield = mem [ l + 1 ] .hhfield .lhfield ; mem [ l ] .hhfield .b0 = 16 ; } if ( r == 0 ) if ( curtype == 16 ) { mem [ q + 1 ] .cint = mem [ q + 1 ] .cint + curexp ; goto lab31 ; } else { tt = curtype ; if ( tt == 19 ) pp = singledependency ( curexp ) ; else pp = mem [ curexp + 1 ] .hhfield .v.RH ; } else if ( mem [ r ] .hhfield .b0 == 16 ) { mem [ q + 1 ] .cint = mem [ q + 1 ] .cint + mem [ r + 1 ] .cint ; goto lab31 ; } else { tt = mem [ r ] .hhfield .b0 ; if ( tt == 19 ) pp = singledependency ( r ) ; else pp = mem [ r + 1 ] .hhfield .v.RH ; } if ( tt != 19 ) copied = false ; else { copied = true ; tt = 17 ; } watchcoefs = false ; if ( t == tt ) p = pplusq ( p , pp , t ) ; else if ( t == 18 ) p = pplusfq ( p , 65536L , pp , 18 , 17 ) ; else { q = p ; while ( mem [ q ] .hhfield .lhfield != 0 ) { mem [ q + 1 ] .cint = roundfraction ( mem [ q + 1 ] .cint ) ; q = mem [ q ] .hhfield .v.RH ; } t = 18 ; p = pplusq ( p , pp , t ) ; } watchcoefs = true ; if ( copied ) flushnodelist ( pp ) ; lab31: ; if ( mem [ p ] .hhfield .lhfield == 0 ) { if ( abs ( mem [ p + 1 ] .cint ) > 64 ) { { if ( interaction == 3 ) ; printnl ( 263 ) ; print ( 945 ) ; } print ( 947 ) ; printscaled ( mem [ p + 1 ] .cint ) ; printchar ( 41 ) ; { helpptr = 2 ; helpline [ 1 ] = 946 ; helpline [ 0 ] = 944 ; } putgeterror () ; } else if ( r == 0 ) { { if ( interaction == 3 ) ; printnl ( 263 ) ; print ( 611 ) ; } { helpptr = 2 ; helpline [ 1 ] = 612 ; helpline [ 0 ] = 613 ; } putgeterror () ; } freenode ( p , 2 ) ; } else { lineareq ( p , t ) ; if ( r == 0 ) if ( curtype != 16 ) if ( mem [ curexp ] .hhfield .b0 == 16 ) { pp = curexp ; curexp = mem [ curexp + 1 ] .cint ; curtype = 16 ; freenode ( pp , 2 ) ; } } } void zmakeeq ( lhs ) halfword lhs ; {/* 20 30 45 */ smallnumber t ; integer v ; halfword p, q ; lab20: t = mem [ lhs ] .hhfield .b0 ; if ( t <= 14 ) v = mem [ lhs + 1 ] .cint ; switch ( t ) {case 2 : case 4 : case 6 : case 8 : case 10 : if ( curtype == t + 1 ) { nonlineareq ( v , curexp , false ) ; goto lab30 ; } else if ( curtype == t ) { if ( curtype <= 4 ) { if ( curtype == 4 ) { if ( strvsstr ( v , curexp ) != 0 ) goto lab45 ; } else if ( v != curexp ) goto lab45 ; { { if ( interaction == 3 ) ; printnl ( 263 ) ; print ( 611 ) ; } { helpptr = 2 ; helpline [ 1 ] = 612 ; helpline [ 0 ] = 613 ; } putgeterror () ; } goto lab30 ; } { if ( interaction == 3 ) ; printnl ( 263 ) ; print ( 942 ) ; } { helpptr = 2 ; helpline [ 1 ] = 943 ; helpline [ 0 ] = 944 ; } putgeterror () ; goto lab30 ; lab45: { if ( interaction == 3 ) ; printnl ( 263 ) ; print ( 945 ) ; } { helpptr = 2 ; helpline [ 1 ] = 946 ; helpline [ 0 ] = 944 ; } putgeterror () ; goto lab30 ; } break ; case 3 : case 5 : case 7 : case 11 : case 9 : if ( curtype == t - 1 ) { nonlineareq ( curexp , lhs , true ) ; goto lab30 ; } else if ( curtype == t ) { ringmerge ( lhs , curexp ) ; goto lab30 ; } else if ( curtype == 14 ) if ( t == 9 ) { pairtopath () ; goto lab20 ; } break ; case 12 : case 13 : case 14 : if ( curtype == t ) { p = v + bignodesize [ t ] ; q = mem [ curexp + 1 ] .cint + bignodesize [ t ] ; do { p = p - 2 ; q = q - 2 ; tryeq ( p , q ) ; } while ( ! ( p == v ) ) ; goto lab30 ; } break ; case 16 : case 17 : case 18 : case 19 : if ( curtype >= 16 ) { tryeq ( lhs , 0 ) ; goto lab30 ; } break ; case 1 : ; break ; } disperr ( lhs , 285 ) ; disperr ( 0 , 939 ) ; if ( mem [ lhs ] .hhfield .b0 <= 14 ) printtype ( mem [ lhs ] .hhfield .b0 ) ; else print ( 341 ) ; printchar ( 61 ) ; if ( curtype <= 14 ) printtype ( curtype ) ; else print ( 341 ) ; printchar ( 41 ) ; { helpptr = 2 ; helpline [ 1 ] = 940 ; helpline [ 0 ] = 941 ; } putgeterror () ; lab30: { if ( aritherror ) cleararith () ; } recyclevalue ( lhs ) ; freenode ( lhs , 2 ) ; } void doequation ( ) {halfword lhs ; halfword p ; lhs = stashcurexp () ; getxnext () ; varflag = 76 ; scanexpression () ; if ( curcmd == 53 ) doequation () ; else if ( curcmd == 76 ) doassignment () ; if ( internal [ 6 ] > 131072L ) { begindiagnostic () ; printnl ( 902 ) ; printexp ( lhs , 0 ) ; print ( 934 ) ; printexp ( 0 , 0 ) ; print ( 891 ) ; enddiagnostic ( false ) ; } if ( curtype == 9 ) if ( mem [ lhs ] .hhfield .b0 == 14 ) { p = stashcurexp () ; unstashcurexp ( lhs ) ; lhs = p ; } makeeq ( lhs ) ; } void doassignment ( ) {halfword lhs ; halfword p ; halfword q ; if ( curtype != 20 ) { disperr ( 0 , 931 ) ; { helpptr = 2 ; helpline [ 1 ] = 932 ; helpline [ 0 ] = 933 ; } error () ; doequation () ; } else { lhs = curexp ; curtype = 1 ; getxnext () ; varflag = 76 ; scanexpression () ; if ( curcmd == 53 ) doequation () ; else if ( curcmd == 76 ) doassignment () ; if ( internal [ 6 ] > 131072L ) { begindiagnostic () ; printnl ( 123 ) ; if ( mem [ lhs ] .hhfield .lhfield > 2371 ) print ( intname [ mem [ lhs ] .hhfield .lhfield - ( 2371 ) ] ) ; else showtokenlist ( lhs , 0 , 1000 , 0 ) ; print ( 476 ) ; printexp ( 0 , 0 ) ; printchar ( 125 ) ; enddiagnostic ( false ) ; } if ( mem [ lhs ] .hhfield .lhfield > 2371 ) if ( curtype == 16 ) internal [ mem [ lhs ] .hhfield .lhfield - ( 2371 ) ] = curexp ; else { disperr ( 0 , 935 ) ; print ( intname [ mem [ lhs ] .hhfield .lhfield - ( 2371 ) ] ) ; print ( 936 ) ; { helpptr = 2 ; helpline [ 1 ] = 937 ; helpline [ 0 ] = 938 ; } putgeterror () ; } else { p = findvariable ( lhs ) ; if ( p != 0 ) { q = stashcurexp () ; curtype = undtype ( p ) ; recyclevalue ( p ) ; mem [ p ] .hhfield .b0 = curtype ; mem [ p + 1 ] .cint = 0 ; makeexpcopy ( p ) ; p = stashcurexp () ; unstashcurexp ( q ) ; makeeq ( p ) ; } else { obliterated ( lhs ) ; putgeterror () ; } } flushnodelist ( lhs ) ; } } void dotypedeclaration ( ) {smallnumber t ; halfword p ; halfword q ; if ( curmod >= 12 ) t = curmod ; else t = curmod + 1 ; do { p = scandeclaredvariable () ; flushvariable ( eqtb [ mem [ p ] .hhfield .lhfield ] .v.RH , mem [ p ] .hhfield .v.RH , false ) ; q = findvariable ( p ) ; if ( q != 0 ) { mem [ q ] .hhfield .b0 = t ; mem [ q + 1 ] .cint = 0 ; } else { { if ( interaction == 3 ) ; printnl ( 263 ) ; print ( 948 ) ; } { helpptr = 2 ; helpline [ 1 ] = 949 ; helpline [ 0 ] = 950 ; } putgeterror () ; } flushlist ( p ) ; if ( curcmd < 81 ) { { if ( interaction == 3 ) ; printnl ( 263 ) ; print ( 951 ) ; } { helpptr = 5 ; helpline [ 4 ] = 952 ; helpline [ 3 ] = 953 ; helpline [ 2 ] = 954 ; helpline [ 1 ] = 955 ; helpline [ 0 ] = 956 ; } if ( curcmd == 44 ) helpline [ 2 ] = 957 ; putgeterror () ; scannerstatus = 2 ; do { { getnext () ; if ( curcmd <= 3 ) tnext () ; } if ( curcmd == 41 ) { if ( strref [ curmod ] < 127 ) if ( strref [ curmod ] > 1 ) decr ( strref [ curmod ] ) ; else flushstring ( curmod ) ; } } while ( ! ( curcmd >= 81 ) ) ; scannerstatus = 0 ; } } while ( ! ( curcmd > 81 ) ) ; } void dorandomseed ( ) {getxnext () ; if ( curcmd != 76 ) { missingerr ( 476 ) ; { helpptr = 1 ; helpline [ 0 ] = 962 ; } backerror () ; } getxnext () ; scanexpression () ; if ( curtype != 16 ) { disperr ( 0 , 963 ) ; { helpptr = 2 ; helpline [ 1 ] = 964 ; helpline [ 0 ] = 965 ; } putgetflusherror ( 0 ) ; } else { initrandoms ( curexp ) ; if ( selector >= 6 ) { oldsetting = selector ; selector = 6 ; printnl ( 966 ) ; printscaled ( curexp ) ; printchar ( 125 ) ; printnl ( 285 ) ; selector = oldsetting ; } } } void doprotection ( ) {char m ; halfword t ; m = curmod ; do { getsymbol () ; t = eqtb [ cursym ] .lhfield ; if ( m == 0 ) { if ( t >= 85 ) eqtb [ cursym ] .lhfield = t - 85 ; } else if ( t < 85 ) eqtb [ cursym ] .lhfield = t + 85 ; getxnext () ; } while ( ! ( curcmd != 81 ) ) ; } void defdelims ( ) {halfword ldelim, rdelim ; getclearsymbol () ; ldelim = cursym ; getclearsymbol () ; rdelim = cursym ; eqtb [ ldelim ] .lhfield = 33 ; eqtb [ ldelim ] .v.RH = rdelim ; eqtb [ rdelim ] .lhfield = 64 ; eqtb [ rdelim ] .v.RH = ldelim ; getxnext () ; } void dointerim ( ) {getxnext () ; if ( curcmd != 42 ) { { if ( interaction == 3 ) ; printnl ( 263 ) ; print ( 972 ) ; } if ( cursym == 0 ) print ( 977 ) ; else print ( hash [ cursym ] .v.RH ) ; print ( 978 ) ; { helpptr = 1 ; helpline [ 0 ] = 979 ; } backerror () ; } else { saveinternal ( curmod ) ; backinput () ; } dostatement () ; } void dolet ( ) {halfword l ; getsymbol () ; l = cursym ; getxnext () ; if ( curcmd != 53 ) if ( curcmd != 76 ) { missingerr ( 61 ) ; { helpptr = 3 ; helpline [ 2 ] = 980 ; helpline [ 1 ] = 714 ; helpline [ 0 ] = 981 ; } backerror () ; } getsymbol () ; switch ( curcmd ) {case 13 : case 55 : case 46 : case 51 : incr ( mem [ curmod ] .hhfield .lhfield ) ; break ; default: ; break ; } clearsymbol ( l , false ) ; eqtb [ l ] .lhfield = curcmd ; if ( curcmd == 43 ) eqtb [ l ] .v.RH = 0 ; else eqtb [ l ] .v.RH = curmod ; getxnext () ; } void donewinternal ( ) {do { if ( intptr == maxinternal ) overflow ( 982 , maxinternal ) ; getclearsymbol () ; incr ( intptr ) ; eqtb [ cursym ] .lhfield = 42 ; eqtb [ cursym ] .v.RH = intptr ; intname [ intptr ] = hash [ cursym ] .v.RH ; internal [ intptr ] = 0 ; getxnext () ; } while ( ! ( curcmd != 81 ) ) ; } void doshow ( ) {do { getxnext () ; scanexpression () ; printnl ( 805 ) ; printexp ( 0 , 2 ) ; flushcurexp ( 0 ) ; } while ( ! ( curcmd != 81 ) ) ; } void disptoken ( ) {printnl ( 988 ) ; if ( cursym == 0 ) { if ( curcmd == 44 ) printscaled ( curmod ) ; else if ( curcmd == 40 ) { gpointer = curmod ; printcapsule () ; } else { printchar ( 34 ) ; print ( curmod ) ; printchar ( 34 ) ; { if ( strref [ curmod ] < 127 ) if ( strref [ curmod ] > 1 ) decr ( strref [ curmod ] ) ; else flushstring ( curmod ) ; } } } else { print ( hash [ cursym ] .v.RH ) ; printchar ( 61 ) ; if ( eqtb [ cursym ] .lhfield >= 85 ) print ( 989 ) ; printcmdmod ( curcmd , curmod ) ; if ( curcmd == 13 ) { println () ; showmacro ( curmod , 0 , 100000L ) ; } } } void doshowtoken ( ) {do { { getnext () ; if ( curcmd <= 3 ) tnext () ; } disptoken () ; getxnext () ; } while ( ! ( curcmd != 81 ) ) ; } void doshowstats ( ) {printnl ( 998 ) ; ; #ifdef STAT printint ( varused ) ; printchar ( 38 ) ; printint ( dynused ) ; if ( false ) #endif /* STAT */ print ( 359 ) ; print ( 999 ) ; printint ( himemmin - lomemmax - 1 ) ; print ( 1000 ) ; println () ; printnl ( 1001 ) ; ; #ifdef STAT printint ( strsinuse - initstruse ) ; printchar ( 38 ) ; printint ( poolinuse - initpoolptr ) ; if ( false ) #endif /* STAT */ print ( 359 ) ; print ( 999 ) ; printint ( maxstrings - 1 - strsusedup ) ; printchar ( 38 ) ; printint ( poolsize - poolptr ) ; print ( 1002 ) ; println () ; getxnext () ; } void zdispvar ( p ) halfword p ; {halfword q ; integer n ; if ( mem [ p ] .hhfield .b0 == 21 ) { q = mem [ p + 1 ] .hhfield .lhfield ; do { dispvar ( q ) ; q = mem [ q ] .hhfield .v.RH ; } while ( ! ( q == 9 ) ) ; q = mem [ p + 1 ] .hhfield .v.RH ; while ( mem [ q ] .hhfield .b1 == 3 ) { dispvar ( q ) ; q = mem [ q ] .hhfield .v.RH ; } } else if ( mem [ p ] .hhfield .b0 >= 22 ) { printnl ( 285 ) ; printvariablename ( p ) ; if ( mem [ p ] .hhfield .b0 > 22 ) print ( 706 ) ; print ( 1003 ) ; if ( fileoffset >= maxprintline - 20 ) n = 5 ; else n = maxprintline - fileoffset - 15 ; showmacro ( mem [ p + 1 ] .cint , 0 , n ) ; } else if ( mem [ p ] .hhfield .b0 != 0 ) { printnl ( 285 ) ; printvariablename ( p ) ; printchar ( 61 ) ; printexp ( p , 0 ) ; } } void doshowvar ( ) {/* 30 */ do { { getnext () ; if ( curcmd <= 3 ) tnext () ; } if ( cursym > 0 ) if ( cursym <= 2371 ) if ( curcmd == 43 ) if ( curmod != 0 ) { dispvar ( curmod ) ; goto lab30 ; } disptoken () ; lab30: getxnext () ; } while ( ! ( curcmd != 81 ) ) ; } void doshowdependencies ( ) {halfword p ; p = mem [ 5 ] .hhfield .v.RH ; while ( p != 5 ) { if ( interesting ( p ) ) { printnl ( 285 ) ; printvariablename ( p ) ; if ( mem [ p ] .hhfield .b0 == 17 ) printchar ( 61 ) ; else print ( 817 ) ; printdependency ( mem [ p + 1 ] .hhfield .v.RH , mem [ p ] .hhfield .b0 ) ; } p = mem [ p + 1 ] .hhfield .v.RH ; while ( mem [ p ] .hhfield .lhfield != 0 ) p = mem [ p ] .hhfield .v.RH ; p = mem [ p ] .hhfield .v.RH ; } getxnext () ; } void doshowwhatever ( ) {if ( interaction == 3 ) ; switch ( curmod ) {case 0 : doshowtoken () ; break ; case 1 : doshowstats () ; break ; case 2 : doshow () ; break ; case 3 : doshowvar () ; break ; case 4 : doshowdependencies () ; break ; } if ( internal [ 25 ] > 0 ) { { if ( interaction == 3 ) ; printnl ( 263 ) ; print ( 1004 ) ; } if ( interaction < 3 ) { helpptr = 0 ; decr ( errorcount ) ; } else { helpptr = 1 ; helpline [ 0 ] = 1005 ; } if ( curcmd == 82 ) error () ; else putgeterror () ; } }