<> <> <> <<002416: Change the banner line.>> @x @d banner=='This is TFtoPL, Version 2.4' {printed when the program starts} @y @d banner=='This is TFtoPL 2.4 for Cedar 6.0' {printed when the program starts} @z <<003093: Change write_ln to writeln.>> @x @d print_ln(#)==write_ln(#) @y @d print_ln(#)==writeln(#) @d write_ln(#) == writeln(#) @z <<003287: Allow for external procedure and function declarations for things implemented directly in Cedar, rather than in Pascal.>> @x var @@/ procedure initialize; {this procedure gets things started properly} @y var @@/ @@/ procedure initialize; {this procedure gets things started properly} @z <<004707: Packed file of 0..255 needs an id; call it a byte_file.>> @x @!tfm_file:packed file of 0..255; @y @!tfm_file: byte_file; @z <<005052: Hook up open call to Cedar.>> @x reset(tfm_file); @y byte_file_reset(tfm_file, 'tfm '); @z <<017224: Here's a rewrite.>> @x rewrite(pl_file); @y file_rewrite(pl_file, 'pl '); @z <<036394: Break up a big proc by deleting a big chunk . . . (see also below)>> @x @= if nonzero_fix(4*width_base) then bad('width[0] should be zero.'); @.should be zero@> if nonzero_fix(4*height_base) then bad('height[0] should be zero.'); if nonzero_fix(4*depth_base) then bad('depth[0] should be zero.'); if nonzero_fix(4*italic_base) then bad('italic[0] should be zero.'); for i:=0 to nw-1 do check_fix(4*(width_base+i))('Width'); @.Width n is too big@> for i:=0 to nh-1 do check_fix(4*(height_base+i))('Height'); @.Height n is too big@> for i:=0 to nd-1 do check_fix(4*(depth_base+i))('Depth'); @.Depth n is too big@> for i:=0 to ni-1 do check_fix(4*(italic_base+i))('Italic correction'); @.Italic correction n is too big@> if nk>0 then for i:=0 to nk-1 do check_fix(kern(i))('Kern'); @.Kern n is too big@> @y @= check_the_fix_word_entries; @z <<045513: And moving it somewhere else as a separate proc.>> @x @p procedure do_simple_things; @y @p procedure check_the_fix_word_entries; var i:0..@'77777; {an index to words of a subfile} begin if nonzero_fix(4*width_base) then bad('width[0] should be zero.'); @.should be zero@> if nonzero_fix(4*height_base) then bad('height[0] should be zero.'); if nonzero_fix(4*depth_base) then bad('depth[0] should be zero.'); if nonzero_fix(4*italic_base) then bad('italic[0] should be zero.'); for i:=0 to nw-1 do check_fix(4*(width_base+i))('Width'); @.Width n is too big@> for i:=0 to nh-1 do check_fix(4*(height_base+i))('Height'); @.Height n is too big@> for i:=0 to nd-1 do check_fix(4*(depth_base+i))('Depth'); @.Depth n is too big@> for i:=0 to ni-1 do check_fix(4*(italic_base+i))('Italic correction'); @.Italic correction n is too big@> if nk>0 then for i:=0 to nk-1 do check_fix(kern(i))('Kern'); @.Kern n is too big@> end; procedure do_simple_things; @z <<045917: Open tty for output.>> @x @p begin initialize;@/ @y @p begin tty_rewrite(output); initialize;@/ @z <<082755: Close files when done.>> @x final_end:end. @y final_end: file_close(pl_file); byte_file_close(tfm_file); end. @z <<082780: Define the externals.>> @x @* System-dependent changes. @y @* Externals for things in Cedar. Here they are: @= procedure tty_rewrite(var f: text); external; {set up for output to terminal} procedure byte_file_reset(var f: byte_file; ext: alfa); external; {set up for input from byte file} procedure file_rewrite(var f: text; ext: alfa); external; {set up for output to file} procedure file_close(var f: text); external; {close a text file} procedure byte_file_close(var f: byte_file); external; {close a byte file} @ @= byte_file = packed file of 0..255; @ @= output: text; @* System-dependent changes. @z