% Change file for the PLtoTF processor, for use with GNU Pascal. % (by Don Knuth, based on the work of Pavel Curtis in ../texware-sparc) % History: % 2000.04.30 Original version % The section numbers used in this file refer to the current nunmbers, % and, where different, also to those in the standard TeXware report (CS1097). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [0] WEAVE: print changes only %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x \pageno=\contentspagenumber \advance\pageno by 1 @y \pageno=\contentspagenumber \advance\pageno by 1 \let\maybe=\iffalse \def\title{PL\lowercase{to}TF changes for GNU Pascal} @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [1] Change banner string %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @d banner=='This is PLtoTF, Version 3.5' {printed when the program starts} @y @d banner=='This is PLtoTF, Version 3.5 for Linux' {printed when the program starts} @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [2] Fix filenames in program statement; add `final_end' label; add access %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @p program PLtoTF(@!pl_file,@!tfm_file,@!output); const @@/ type @@/ var @@/ @y @d final_end==9999 @p program PLtoTF(@!output); label final_end; const @@/ type UNIX_file_name=packed array[1..100] of char; @@/ var @@/ @\ @=#include "texwarext.h"@> @\@/ @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [6] Open PL file %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x reset(pl_file); @y if argc < 3 then begin print_ln('Usage: pltotf '); goto final_end; end; argv(1, pl_name); if testreadaccess(pl_name) then reset(pl_file, pl_name) else begin print_ln('I can''t read the PL file!'); goto final_end; end; @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [15] Change type of tfm_file and declare extra TFM-file variables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @!tfm_file:packed file of 0..255; @y @!tfm_file : packed file of ByteCard; @!tfm_name, @!pl_name : UNIX_file_name; @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [16] Open TFM file %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @ On some systems you may have to do something special to write a packed file of bytes. For example, the following code didn't work when it was first tried at Stanford, because packed files have to be opened with a special switch setting on the \PASCAL\ that was used. @^system dependencies@> @= rewrite(tfm_file); @y @ On some systems you may have to do something special to write a packed file of bytes. @^system dependencies@> @= argv(2, tfm_name); rewrite(tfm_file, tfm_name); @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [17] Make byte a byte %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x @!byte=0..255; {unsigned eight-bit quantity} @y @!byte=ByteCard; {unsigned eight-bit quantity} @z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % [147, was 135] Define label `final_end'; print newline at end of program %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @x end. @y final_end: print_ln(' '); end. @z