home *** CD-ROM | disk | FTP | other *** search
- #define EXTERN extern
- #include "texd.h"
-
- void passtext ( )
- {/* 30 */ passtext_regmem
- integer l ;
- smallnumber savescannerstatus ;
- savescannerstatus = scannerstatus ;
- scannerstatus = 1 ;
- l = 0 ;
- skipline = line ;
- while ( true ) {
-
- getnext () ;
- if ( curcmd == 106 )
- {
- if ( l == 0 )
- goto lab30 ;
- if ( curchr == 2 )
- decr ( l ) ;
- }
- else if ( curcmd == 105 )
- incr ( l ) ;
- }
- lab30: scannerstatus = savescannerstatus ;
- }
- void zchangeiflimit ( l , p )
- smallnumber l ;
- halfword p ;
- {/* 10 */ changeiflimit_regmem
- halfword q ;
- if ( p == condptr )
- iflimit = l ;
- else {
-
- q = condptr ;
- while ( true ) {
-
- if ( q == 0 )
- confusion ( 752 ) ;
- if ( mem [ q ] .hh .v.RH == p )
- {
- mem [ q ] .hh.b0 = l ;
- return ;
- }
- q = mem [ q ] .hh .v.RH ;
- }
- }
- }
- void conditional ( )
- {/* 10 50 */ conditional_regmem
- boolean b ;
- schar r ;
- integer m, n ;
- halfword p, q ;
- smallnumber savescannerstatus ;
- halfword savecondptr ;
- smallnumber thisif ;
- {
- p = getnode ( 2 ) ;
- mem [ p ] .hh .v.RH = condptr ;
- mem [ p ] .hh.b0 = iflimit ;
- mem [ p ] .hh.b1 = curif ;
- mem [ p + 1 ] .cint = ifline ;
- condptr = p ;
- curif = curchr ;
- iflimit = 1 ;
- ifline = line ;
- }
- savecondptr = condptr ;
- thisif = curchr ;
- switch ( thisif )
- {case 0 :
- case 1 :
- {
- {
- getxtoken () ;
- if ( curcmd == 0 )
- if ( curchr == 257 )
- {
- curcmd = 13 ;
- curchr = curtok - 4096 ;
- }
- }
- if ( ( curcmd > 13 ) || ( curchr > 255 ) )
- {
- m = 0 ;
- n = 256 ;
- }
- else {
-
- m = curcmd ;
- n = curchr ;
- }
- {
- getxtoken () ;
- if ( curcmd == 0 )
- if ( curchr == 257 )
- {
- curcmd = 13 ;
- curchr = curtok - 4096 ;
- }
- }
- if ( ( curcmd > 13 ) || ( curchr > 255 ) )
- {
- curcmd = 0 ;
- curchr = 256 ;
- }
- if ( thisif == 0 )
- b = ( n == curchr ) ;
- else b = ( m == curcmd ) ;
- }
- break ;
- case 2 :
- case 3 :
- {
- if ( thisif == 2 )
- scanint () ;
- else scandimen ( false , false , false ) ;
- n = curval ;
- do {
- getxtoken () ;
- } while ( ! ( curcmd != 10 ) ) ;
- if ( ( curtok >= 3132 ) && ( curtok <= 3134 ) )
- r = curtok - 3072 ;
- else {
-
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 262 ) ;
- print ( 776 ) ;
- }
- printcmdchr ( 105 , thisif ) ;
- {
- helpptr = 1 ;
- helpline [ 0 ] = 777 ;
- }
- backerror () ;
- r = 61 ;
- }
- if ( thisif == 2 )
- scanint () ;
- else scandimen ( false , false , false ) ;
- switch ( r )
- {case 60 :
- b = ( n < curval ) ;
- break ;
- case 61 :
- b = ( n == curval ) ;
- break ;
- case 62 :
- b = ( n > curval ) ;
- break ;
- }
- }
- break ;
- case 4 :
- {
- scanint () ;
- b = odd ( curval ) ;
- }
- break ;
- case 5 :
- b = ( abs ( curlist .modefield ) == 1 ) ;
- break ;
- case 6 :
- b = ( abs ( curlist .modefield ) == 102 ) ;
- break ;
- case 7 :
- b = ( abs ( curlist .modefield ) == 203 ) ;
- break ;
- case 8 :
- b = ( curlist .modefield < 0 ) ;
- break ;
- case 9 :
- case 10 :
- case 11 :
- {
- scaneightbitint () ;
- p = eqtb [ 4578 + curval ] .hh .v.RH ;
- if ( thisif == 9 )
- b = ( p == 0 ) ;
- else if ( p == 0 )
- b = false ;
- else if ( thisif == 10 )
- b = ( mem [ p ] .hh.b0 == 0 ) ;
- else b = ( mem [ p ] .hh.b0 == 1 ) ;
- }
- break ;
- case 12 :
- {
- savescannerstatus = scannerstatus ;
- scannerstatus = 0 ;
- getnext () ;
- n = curcs ;
- p = curcmd ;
- q = curchr ;
- getnext () ;
- if ( curcmd != p )
- b = false ;
- else if ( curcmd < 111 )
- b = ( curchr == q ) ;
- else {
-
- p = mem [ curchr ] .hh .v.RH ;
- q = mem [ eqtb [ n ] .hh .v.RH ] .hh .v.RH ;
- if ( p == q )
- b = true ;
- else {
-
- while ( ( p != 0 ) && ( q != 0 ) ) if ( mem [ p ] .hh .v.LH != mem [
- q ] .hh .v.LH )
- p = 0 ;
- else {
-
- p = mem [ p ] .hh .v.RH ;
- q = mem [ q ] .hh .v.RH ;
- }
- b = ( ( p == 0 ) && ( q == 0 ) ) ;
- }
- }
- scannerstatus = savescannerstatus ;
- }
- break ;
- case 13 :
- {
- scanfourbitint () ;
- b = ( readopen [ curval ] == 2 ) ;
- }
- break ;
- case 14 :
- b = true ;
- break ;
- case 15 :
- b = false ;
- break ;
- case 16 :
- {
- scanint () ;
- n = curval ;
- if ( eqtb [ 6199 ] .cint > 1 )
- {
- begindiagnostic () ;
- print ( 778 ) ;
- printint ( n ) ;
- printchar ( 125 ) ;
- enddiagnostic ( false ) ;
- }
- while ( n != 0 ) {
-
- passtext () ;
- if ( condptr == savecondptr )
- if ( curchr == 4 )
- decr ( n ) ;
- else goto lab50 ;
- else if ( curchr == 2 )
- {
- p = condptr ;
- ifline = mem [ p + 1 ] .cint ;
- curif = mem [ p ] .hh.b1 ;
- iflimit = mem [ p ] .hh.b0 ;
- condptr = mem [ p ] .hh .v.RH ;
- freenode ( p , 2 ) ;
- }
- }
- changeiflimit ( 4 , savecondptr ) ;
- return ;
- }
- break ;
- }
- if ( eqtb [ 6199 ] .cint > 1 )
- {
- begindiagnostic () ;
- if ( b )
- print ( 774 ) ;
- else print ( 775 ) ;
- enddiagnostic ( false ) ;
- }
- if ( b )
- {
- changeiflimit ( 3 , savecondptr ) ;
- return ;
- }
- while ( true ) {
-
- passtext () ;
- if ( condptr == savecondptr )
- {
- if ( curchr != 4 )
- goto lab50 ;
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 262 ) ;
- print ( 772 ) ;
- }
- printesc ( 770 ) ;
- {
- helpptr = 1 ;
- helpline [ 0 ] = 773 ;
- }
- error () ;
- }
- else if ( curchr == 2 )
- {
- p = condptr ;
- ifline = mem [ p + 1 ] .cint ;
- curif = mem [ p ] .hh.b1 ;
- iflimit = mem [ p ] .hh.b0 ;
- condptr = mem [ p ] .hh .v.RH ;
- freenode ( p , 2 ) ;
- }
- }
- lab50: if ( curchr == 2 )
- {
- p = condptr ;
- ifline = mem [ p + 1 ] .cint ;
- curif = mem [ p ] .hh.b1 ;
- iflimit = mem [ p ] .hh.b0 ;
- condptr = mem [ p ] .hh .v.RH ;
- freenode ( p , 2 ) ;
- }
- else iflimit = 2 ;
- }
- void beginname ( )
- {beginname_regmem
- areadelimiter = 0 ;
- extdelimiter = 0 ;
- }
- boolean zmorename ( c )
- ASCIIcode c ;
- {register boolean Result; morename_regmem
- if ( c == 32 )
- Result = false ;
- else {
-
- {
- if ( poolptr + 1 > poolsize )
- overflow ( 257 , poolsize - initpoolptr ) ;
- }
- {
- strpool [ poolptr ] = c ;
- incr ( poolptr ) ;
- }
- if ( ( c == 47 ) )
- {
- areadelimiter = ( poolptr - strstart [ strptr ] ) ;
- extdelimiter = 0 ;
- }
- else if ( c == 46 )
- extdelimiter = ( poolptr - strstart [ strptr ] ) ;
- Result = true ;
- }
- return(Result) ;
- }
- void endname ( )
- {endname_regmem
- if ( strptr + 3 > maxstrings )
- overflow ( 258 , maxstrings - initstrptr ) ;
- if ( areadelimiter == 0 )
- curarea = 335 ;
- else {
-
- curarea = strptr ;
- strstart [ strptr + 1 ] = strstart [ strptr ] + areadelimiter ;
- incr ( strptr ) ;
- }
- if ( extdelimiter == 0 )
- {
- curext = 335 ;
- curname = makestring () ;
- }
- else {
-
- curname = strptr ;
- strstart [ strptr + 1 ] = strstart [ strptr ] + extdelimiter -
- areadelimiter - 1 ;
- incr ( strptr ) ;
- curext = makestring () ;
- }
- }
- void zpackfilename ( n , a , e )
- strnumber n ;
- strnumber a ;
- strnumber e ;
- {packfilename_regmem
- integer k ;
- ASCIIcode c ;
- poolpointer j ;
- k = 0 ;
- {register integer for_end; j = strstart [ a ] ; for_end = strstart [ a + 1
- ] - 1 ; if ( j <= for_end) do
- {
- c = strpool [ j ] ;
- incr ( k ) ;
- if ( k <= FILENAMESIZE )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- {register integer for_end; j = strstart [ n ] ; for_end = strstart [ n + 1
- ] - 1 ; if ( j <= for_end) do
- {
- c = strpool [ j ] ;
- incr ( k ) ;
- if ( k <= FILENAMESIZE )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- {register integer for_end; j = strstart [ e ] ; for_end = strstart [ e + 1
- ] - 1 ; if ( j <= for_end) do
- {
- c = strpool [ j ] ;
- incr ( k ) ;
- if ( k <= FILENAMESIZE )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- if ( k <= FILENAMESIZE )
- namelength = k ;
- else namelength = FILENAMESIZE ;
- {register integer for_end; k = namelength + 1 ; for_end = FILENAMESIZE
- ; if ( k <= for_end) do
- nameoffile [ k ] = ' ' ;
- while ( k++ < for_end ) ; }
- }
- void zpackbufferedname ( n , a , b )
- smallnumber n ;
- integer a ;
- integer b ;
- {packbufferedname_regmem
- integer k ;
- ASCIIcode c ;
- integer j ;
- if ( n + b - a + 5 > FILENAMESIZE )
- b = a + FILENAMESIZE - n - 5 ;
- k = 0 ;
- {register integer for_end; j = 1 ; for_end = n ; if ( j <= for_end) do
- {
- c = xord [ TEXformatdefault [ j ] ] ;
- incr ( k ) ;
- if ( k <= FILENAMESIZE )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- {register integer for_end; j = a ; for_end = b ; if ( j <= for_end) do
- {
- c = buffer [ j ] ;
- incr ( k ) ;
- if ( k <= FILENAMESIZE )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- {register integer for_end; j = formatdefaultlength - 3 ; for_end =
- formatdefaultlength ; if ( j <= for_end) do
- {
- c = xord [ TEXformatdefault [ j ] ] ;
- incr ( k ) ;
- if ( k <= FILENAMESIZE )
- nameoffile [ k ] = xchr [ c ] ;
- }
- while ( j++ < for_end ) ; }
- if ( k <= FILENAMESIZE )
- namelength = k ;
- else namelength = FILENAMESIZE ;
- {register integer for_end; k = namelength + 1 ; for_end = FILENAMESIZE
- ; if ( k <= for_end) do
- nameoffile [ k ] = ' ' ;
- while ( k++ < for_end ) ; }
- }
- strnumber makenamestring ( )
- {register strnumber Result; makenamestring_regmem
- integer k ;
- if ( ( poolptr + namelength > poolsize ) || ( strptr == maxstrings ) || ( (
- poolptr - strstart [ strptr ] ) > 0 ) )
- Result = 63 ;
- else {
-
- {register integer for_end; k = 1 ; for_end = namelength ; if ( k <=
- for_end) do
- {
- strpool [ poolptr ] = xord [ nameoffile [ k ] ] ;
- incr ( poolptr ) ;
- }
- while ( k++ < for_end ) ; }
- Result = makestring () ;
- }
- return(Result) ;
- }
- strnumber zamakenamestring ( f )
- alphafile * f ;
- {register strnumber Result; amakenamestring_regmem
- Result = makenamestring () ;
- return(Result) ;
- }
- strnumber zbmakenamestring ( f )
- bytefile * f ;
- {register strnumber Result; bmakenamestring_regmem
- Result = makenamestring () ;
- return(Result) ;
- }
- strnumber zwmakenamestring ( f )
- wordfile * f ;
- {register strnumber Result; wmakenamestring_regmem
- Result = makenamestring () ;
- return(Result) ;
- }
- void scanfilename ( )
- {/* 30 */ scanfilename_regmem
- nameinprogress = true ;
- beginname () ;
- do {
- getxtoken () ;
- } while ( ! ( curcmd != 10 ) ) ;
- while ( true ) {
-
- if ( ( curcmd > 12 ) || ( curchr > 255 ) )
- {
- backinput () ;
- goto lab30 ;
- }
- if ( ! morename ( curchr ) )
- goto lab30 ;
- getxtoken () ;
- }
- lab30: endname () ;
- nameinprogress = false ;
- }
- void zpackjobname ( s )
- strnumber s ;
- {packjobname_regmem
- curarea = 335 ;
- curext = s ;
- curname = jobname ;
- packfilename ( curname , curarea , curext ) ;
- }
- void zpromptfilename ( s , e )
- strnumber s ;
- strnumber e ;
- {/* 30 */ promptfilename_regmem
- integer k ;
- if ( interaction == 2 )
- wakeupterminal () ;
- if ( s == 780 )
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 262 ) ;
- print ( 781 ) ;
- }
- else {
-
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 262 ) ;
- print ( 782 ) ;
- }
- printfilename ( curname , curarea , curext ) ;
- print ( 783 ) ;
- if ( e == 784 )
- showcontext () ;
- printnl ( 785 ) ;
- print ( s ) ;
- if ( interaction < 2 )
- fatalerror ( 786 ) ;
- clearterminal () ;
- {
- wakeupterminal () ;
- print ( 564 ) ;
- terminput () ;
- }
- {
- beginname () ;
- k = first ;
- while ( ( buffer [ k ] == 32 ) && ( k < last ) ) incr ( k ) ;
- while ( true ) {
-
- if ( k == last )
- goto lab30 ;
- if ( ! morename ( buffer [ k ] ) )
- goto lab30 ;
- incr ( k ) ;
- }
- lab30: endname () ;
- }
- if ( curext == 335 )
- curext = e ;
- packfilename ( curname , curarea , curext ) ;
- }
- void openlogfile ( )
- {openlogfile_regmem
- schar oldsetting ;
- integer k ;
- integer l ;
- ccharpointer months ;
- oldsetting = selector ;
- if ( jobname == 0 )
- jobname = 789 ;
- packjobname ( 790 ) ;
- while ( ! aopenout ( logfile ) ) {
-
- selector = 17 ;
- promptfilename ( 792 , 790 ) ;
- }
- logname = amakenamestring ( logfile ) ;
- selector = 18 ;
- logopened = true ;
- {
- (void) Fputs( logfile , "This is TeX, C Version 3.1t2" ) ;
- print ( formatident ) ;
- print ( 793 ) ;
- printint ( eqtb [ 6184 ] .cint ) ;
- printchar ( 32 ) ;
- months = " JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC" ;
- {register integer for_end; k = 3 * eqtb [ 6185 ] .cint - 2 ; for_end = 3
- * eqtb [ 6185 ] .cint ; if ( k <= for_end) do
- (void) putc( months [ k ] , logfile );
- while ( k++ < for_end ) ; }
- printchar ( 32 ) ;
- printint ( eqtb [ 6186 ] .cint ) ;
- printchar ( 32 ) ;
- printtwo ( eqtb [ 6183 ] .cint / 60 ) ;
- printchar ( 58 ) ;
- printtwo ( eqtb [ 6183 ] .cint % 60 ) ;
- }
- (void) Fputs( logfile , "\nCompiled for the Atari ST with GNU-C " __VERSION__ " by fgth (" __DATE__ ")" ) ;
- inputstack [ inputptr ] = curinput ;
- printnl ( 791 ) ;
- l = inputstack [ 0 ] .limitfield ;
- if ( buffer [ l ] == eqtb [ 6211 ] .cint )
- decr ( l ) ;
- {register integer for_end; k = 1 ; for_end = l ; if ( k <= for_end) do
- print ( buffer [ k ] ) ;
- while ( k++ < for_end ) ; }
- println () ;
- selector = oldsetting + 2 ;
- }
- void startinput ( )
- {/* 30 */ startinput_regmem
- scanfilename () ;
- if ( curext == 335 )
- packfilename ( curname , curarea , 784 ) ;
- else packfilename ( curname , curarea , curext ) ;
- while ( true ) {
-
- beginfilereading () ;
- if ( aopenin ( inputfile [ curinput .indexfield ] , TEXINPUTPATH ) )
- goto lab30 ;
- if ( curext == 335 )
- {
- packfilename ( curname , curarea , curext ) ;
- if ( aopenin ( inputfile [ curinput .indexfield ] , TEXINPUTPATH ) )
- goto lab30 ;
- }
- endfilereading () ;
- promptfilename ( 780 , 784 ) ;
- }
- lab30: curinput .namefield = amakenamestring ( inputfile [ curinput
- .indexfield ] ) ;
- if ( jobname == 0 )
- {
- jobname = curname ;
- openlogfile () ;
- }
- if ( termoffset + ( strstart [ curinput .namefield + 1 ] - strstart [
- curinput .namefield ] ) > maxprintline - 3 )
- println () ;
- else if ( ( termoffset > 0 ) || ( fileoffset > 0 ) )
- printchar ( 32 ) ;
- printchar ( 40 ) ;
- incr ( openparens ) ;
- print ( curinput .namefield ) ;
- flush ( stdout ) ;
- curinput .statefield = 33 ;
- {
- line = 1 ;
- if ( inputln ( inputfile [ curinput .indexfield ] , false ) )
- ;
- firmuptheline () ;
- if ( ( eqtb [ 6211 ] .cint < 0 ) || ( eqtb [ 6211 ] .cint > 255 ) )
- decr ( curinput .limitfield ) ;
- else buffer [ curinput .limitfield ] = eqtb [ 6211 ] .cint ;
- first = curinput .limitfield + 1 ;
- curinput .locfield = curinput .startfield ;
- }
- }
- internalfontnumber zreadfontinfo ( u , nom , aire , s )
- halfword u ;
- strnumber nom ;
- strnumber aire ;
- scaled s ;
- {/* 30 11 45 */ register internalfontnumber Result; readfontinfo_regmem
- fontindex k ;
- boolean fileopened ;
- halfword lf, lh, bc, ec, nw, nh, nd, ni, nl, nk, ne, np ;
- internalfontnumber f ;
- internalfontnumber g ;
- eightbits a, b, c, d ;
- fourquarters qw ;
- scaled sw ;
- integer bchlabel ;
- short bchar ;
- scaled z ;
- integer alpha ;
- schar beta ;
- g = 0 ;
- fileopened = false ;
- packfilename ( nom , aire , 804 ) ;
- if ( ! bopenin ( tfmfile ) )
- goto lab11 ;
- fileopened = true ;
- {
- {
- lf = tfmtemp ;
- if ( lf > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- lf = lf * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- lh = tfmtemp ;
- if ( lh > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- lh = lh * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- bc = tfmtemp ;
- if ( bc > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- bc = bc * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- ec = tfmtemp ;
- if ( ec > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- ec = ec * 256 + tfmtemp ;
- }
- if ( ( bc > ec + 1 ) || ( ec > 255 ) )
- goto lab11 ;
- if ( bc > 255 )
- {
- bc = 1 ;
- ec = 0 ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- nw = tfmtemp ;
- if ( nw > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- nw = nw * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- nh = tfmtemp ;
- if ( nh > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- nh = nh * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- nd = tfmtemp ;
- if ( nd > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- nd = nd * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- ni = tfmtemp ;
- if ( ni > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- ni = ni * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- nl = tfmtemp ;
- if ( nl > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- nl = nl * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- nk = tfmtemp ;
- if ( nk > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- nk = nk * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- ne = tfmtemp ;
- if ( ne > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- ne = ne * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- np = tfmtemp ;
- if ( np > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- np = np * 256 + tfmtemp ;
- }
- if ( lf != 6 + lh + ( ec - bc + 1 ) + nw + nh + nd + ni + nl + nk + ne +
- np )
- goto lab11 ;
- }
- lf = lf - 6 - lh ;
- if ( np < 7 )
- lf = lf + 7 - np ;
- if ( ( fontptr == fontmax ) || ( fmemptr + lf > fontmemsize ) )
- {
- {
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 262 ) ;
- print ( 795 ) ;
- }
- sprintcs ( u ) ;
- printchar ( 61 ) ;
- printfilename ( nom , aire , 335 ) ;
- if ( s >= 0 )
- {
- print ( 737 ) ;
- printscaled ( s ) ;
- print ( 393 ) ;
- }
- else if ( s != -1000 )
- {
- print ( 796 ) ;
- printint ( - (integer) s ) ;
- }
- print ( 805 ) ;
- {
- helpptr = 4 ;
- helpline [ 3 ] = 806 ;
- helpline [ 2 ] = 807 ;
- helpline [ 1 ] = 808 ;
- helpline [ 0 ] = 809 ;
- }
- error () ;
- goto lab30 ;
- }
- f = fontptr + 1 ;
- charbase [ f ] = fmemptr - bc ;
- widthbase [ f ] = charbase [ f ] + ec + 1 ;
- heightbase [ f ] = widthbase [ f ] + nw ;
- depthbase [ f ] = heightbase [ f ] + nh ;
- italicbase [ f ] = depthbase [ f ] + nd ;
- ligkernbase [ f ] = italicbase [ f ] + ni ;
- kernbase [ f ] = ligkernbase [ f ] + nl - 256 * ( 128 ) ;
- extenbase [ f ] = kernbase [ f ] + 256 * ( 128 ) + nk ;
- parambase [ f ] = extenbase [ f ] + ne ;
- {
- if ( lh < 2 )
- goto lab11 ;
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- qw .b0 = a ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- qw .b1 = b ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- qw .b2 = c ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- qw .b3 = d ;
- fontcheck [ f ] = qw ;
- }
- tfmtemp = getc ( tfmfile ) ;
- {
- z = tfmtemp ;
- if ( z > 127 )
- goto lab11 ;
- tfmtemp = getc ( tfmfile ) ;
- z = z * 256 + tfmtemp ;
- }
- tfmtemp = getc ( tfmfile ) ;
- z = z * 256 + tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- z = ( z * 16 ) + ( tfmtemp / 16 ) ;
- if ( z < 65536L )
- goto lab11 ;
- while ( lh > 2 ) {
-
- tfmtemp = getc ( tfmfile ) ;
- tfmtemp = getc ( tfmfile ) ;
- tfmtemp = getc ( tfmfile ) ;
- tfmtemp = getc ( tfmfile ) ;
- decr ( lh ) ;
- }
- fontdsize [ f ] = z ;
- if ( s != -1000 )
- if ( s >= 0 )
- z = s ;
- else z = xnoverd ( z , - (integer) s , 1000 ) ;
- fontsize [ f ] = z ;
- }
- {register integer for_end; k = fmemptr ; for_end = widthbase [ f ] - 1
- ; if ( k <= for_end) do
- {
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- qw .b0 = a ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- qw .b1 = b ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- qw .b2 = c ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- qw .b3 = d ;
- fontinfo [ k ] .qqqq = qw ;
- }
- if ( ( a >= nw ) || ( b / 16 >= nh ) || ( b % 16 >= nd ) || ( c / 4 >=
- ni ) )
- goto lab11 ;
- switch ( c % 4 )
- {case 1 :
- if ( d >= nl )
- goto lab11 ;
- break ;
- case 3 :
- if ( d >= ne )
- goto lab11 ;
- break ;
- case 2 :
- {
- {
- if ( ( d < bc ) || ( d > ec ) )
- goto lab11 ;
- }
- while ( d < k + bc - fmemptr ) {
-
- qw = fontinfo [ charbase [ f ] + d ] .qqqq ;
- if ( ( ( qw .b2 ) % 4 ) != 2 )
- goto lab45 ;
- d = qw .b3 ;
- }
- if ( d == k + bc - fmemptr )
- goto lab11 ;
- lab45: ;
- }
- break ;
- default:
- ;
- break ;
- }
- }
- while ( k++ < for_end ) ; }
- {
- {
- alpha = 16 ;
- while ( z >= 8388608L ) {
-
- z = z / 2 ;
- alpha = alpha + alpha ;
- }
- beta = 256 / alpha ;
- alpha = alpha * z ;
- }
- {register integer for_end; k = widthbase [ f ] ; for_end = ligkernbase [
- f ] - 1 ; if ( k <= for_end) do
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- sw = ( ( ( ( ( d * z ) / 256 ) + ( c * z ) ) / 256 ) + ( b * z ) ) /
- beta ;
- if ( a == 0 )
- fontinfo [ k ] .cint = sw ;
- else if ( a == 255 )
- fontinfo [ k ] .cint = sw - alpha ;
- else goto lab11 ;
- }
- while ( k++ < for_end ) ; }
- if ( fontinfo [ widthbase [ f ] ] .cint != 0 )
- goto lab11 ;
- if ( fontinfo [ heightbase [ f ] ] .cint != 0 )
- goto lab11 ;
- if ( fontinfo [ depthbase [ f ] ] .cint != 0 )
- goto lab11 ;
- if ( fontinfo [ italicbase [ f ] ] .cint != 0 )
- goto lab11 ;
- }
- bchlabel = 32767 ;
- bchar = 256 ;
- if ( nl > 0 )
- {
- {register integer for_end; k = ligkernbase [ f ] ; for_end = kernbase [ f
- ] + 256 * ( 128 ) - 1 ; if ( k <= for_end) do
- {
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- qw .b0 = a ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- qw .b1 = b ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- qw .b2 = c ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- qw .b3 = d ;
- fontinfo [ k ] .qqqq = qw ;
- }
- if ( a > 128 )
- {
- if ( 256 * c + d >= nl )
- goto lab11 ;
- if ( a == 255 )
- if ( k == ligkernbase [ f ] )
- bchar = b ;
- }
- else {
-
- if ( b != bchar )
- {
- {
- if ( ( b < bc ) || ( b > ec ) )
- goto lab11 ;
- }
- qw = fontinfo [ charbase [ f ] + b ] .qqqq ;
- if ( ! ( qw .b0 > 0 ) )
- goto lab11 ;
- }
- if ( c < 128 )
- {
- {
- if ( ( d < bc ) || ( d > ec ) )
- goto lab11 ;
- }
- qw = fontinfo [ charbase [ f ] + d ] .qqqq ;
- if ( ! ( qw .b0 > 0 ) )
- goto lab11 ;
- }
- else if ( 256 * ( c - 128 ) + d >= nk )
- goto lab11 ;
- if ( a < 128 )
- if ( k - ligkernbase [ f ] + a + 1 >= nl )
- goto lab11 ;
- }
- }
- while ( k++ < for_end ) ; }
- if ( a == 255 )
- bchlabel = 256 * c + d ;
- }
- {register integer for_end; k = kernbase [ f ] + 256 * ( 128 ) ; for_end =
- extenbase [ f ] - 1 ; if ( k <= for_end) do
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- sw = ( ( ( ( ( d * z ) / 256 ) + ( c * z ) ) / 256 ) + ( b * z ) ) /
- beta ;
- if ( a == 0 )
- fontinfo [ k ] .cint = sw ;
- else if ( a == 255 )
- fontinfo [ k ] .cint = sw - alpha ;
- else goto lab11 ;
- }
- while ( k++ < for_end ) ; }
- {register integer for_end; k = extenbase [ f ] ; for_end = parambase [ f ]
- - 1 ; if ( k <= for_end) do
- {
- {
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- qw .b0 = a ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- qw .b1 = b ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- qw .b2 = c ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- qw .b3 = d ;
- fontinfo [ k ] .qqqq = qw ;
- }
- if ( a != 0 )
- {
- {
- if ( ( a < bc ) || ( a > ec ) )
- goto lab11 ;
- }
- qw = fontinfo [ charbase [ f ] + a ] .qqqq ;
- if ( ! ( qw .b0 > 0 ) )
- goto lab11 ;
- }
- if ( b != 0 )
- {
- {
- if ( ( b < bc ) || ( b > ec ) )
- goto lab11 ;
- }
- qw = fontinfo [ charbase [ f ] + b ] .qqqq ;
- if ( ! ( qw .b0 > 0 ) )
- goto lab11 ;
- }
- if ( c != 0 )
- {
- {
- if ( ( c < bc ) || ( c > ec ) )
- goto lab11 ;
- }
- qw = fontinfo [ charbase [ f ] + c ] .qqqq ;
- if ( ! ( qw .b0 > 0 ) )
- goto lab11 ;
- }
- {
- {
- if ( ( d < bc ) || ( d > ec ) )
- goto lab11 ;
- }
- qw = fontinfo [ charbase [ f ] + d ] .qqqq ;
- if ( ! ( qw .b0 > 0 ) )
- goto lab11 ;
- }
- }
- while ( k++ < for_end ) ; }
- {
- {register integer for_end; k = 1 ; for_end = np ; if ( k <= for_end) do
- if ( k == 1 )
- {
- tfmtemp = getc ( tfmfile ) ;
- sw = tfmtemp ;
- if ( sw > 127 )
- sw = sw - 256 ;
- tfmtemp = getc ( tfmfile ) ;
- sw = sw * 256 + tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- sw = sw * 256 + tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- fontinfo [ parambase [ f ] ] .cint = ( sw * 16 ) + ( tfmtemp / 16 ) ;
- }
- else {
-
- tfmtemp = getc ( tfmfile ) ;
- a = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- b = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- c = tfmtemp ;
- tfmtemp = getc ( tfmfile ) ;
- d = tfmtemp ;
- sw = ( ( ( ( ( d * z ) / 256 ) + ( c * z ) ) / 256 ) + ( b * z ) ) /
- beta ;
- if ( a == 0 )
- fontinfo [ parambase [ f ] + k - 1 ] .cint = sw ;
- else if ( a == 255 )
- fontinfo [ parambase [ f ] + k - 1 ] .cint = sw - alpha ;
- else goto lab11 ;
- }
- while ( k++ < for_end ) ; }
- if ( feof ( tfmfile ) )
- goto lab11 ;
- {register integer for_end; k = np + 1 ; for_end = 7 ; if ( k <= for_end)
- do
- fontinfo [ parambase [ f ] + k - 1 ] .cint = 0 ;
- while ( k++ < for_end ) ; }
- }
- if ( np >= 7 )
- fontparams [ f ] = np ;
- else fontparams [ f ] = 7 ;
- hyphenchar [ f ] = eqtb [ 6209 ] .cint ;
- skewchar [ f ] = eqtb [ 6210 ] .cint ;
- if ( bchlabel < nl )
- bcharlabel [ f ] = bchlabel + ligkernbase [ f ] ;
- else bcharlabel [ f ] = fontmemsize ;
- fontbchar [ f ] = bchar ;
- fontfalsebchar [ f ] = bchar ;
- if ( bchar <= ec )
- if ( bchar >= bc )
- {
- qw = fontinfo [ charbase [ f ] + bchar ] .qqqq ;
- if ( ( qw .b0 > 0 ) )
- fontfalsebchar [ f ] = 256 ;
- }
- fontname [ f ] = nom ;
- fontarea [ f ] = aire ;
- fontbc [ f ] = bc ;
- fontec [ f ] = ec ;
- fontglue [ f ] = 0 ;
- charbase [ f ] = charbase [ f ] ;
- widthbase [ f ] = widthbase [ f ] ;
- ligkernbase [ f ] = ligkernbase [ f ] ;
- kernbase [ f ] = kernbase [ f ] ;
- extenbase [ f ] = extenbase [ f ] ;
- decr ( parambase [ f ] ) ;
- fmemptr = fmemptr + lf ;
- fontptr = f ;
- g = f ;
- goto lab30 ;
- lab11: {
-
- if ( interaction == 3 )
- wakeupterminal () ;
- printnl ( 262 ) ;
- print ( 795 ) ;
- }
- sprintcs ( u ) ;
- printchar ( 61 ) ;
- printfilename ( nom , aire , 335 ) ;
- if ( s >= 0 )
- {
- print ( 737 ) ;
- printscaled ( s ) ;
- print ( 393 ) ;
- }
- else if ( s != -1000 )
- {
- print ( 796 ) ;
- printint ( - (integer) s ) ;
- }
- if ( fileopened )
- print ( 797 ) ;
- else print ( 798 ) ;
- {
- helpptr = 5 ;
- helpline [ 4 ] = 799 ;
- helpline [ 3 ] = 800 ;
- helpline [ 2 ] = 801 ;
- helpline [ 1 ] = 802 ;
- helpline [ 0 ] = 803 ;
- }
- error () ;
- lab30: if ( fileopened )
- bclose ( tfmfile ) ;
- Result = g ;
- return(Result) ;
- }
-