blob: 1d1031e84c371d5f3ec02339265608cc60fb6387 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
TFtoPL change file for VM/CMS and MVS.
Copyright (C) 1984 by David Fuchs. All rights are reserved.
@x
@d banner=='This is TFtoPL, Version 2.5' {printed when the program starts}
@y
@d banner=='This is TFtoPL, VM/CMS Version 2.5'
@z
@x
@!tfm_file:packed file of 0..255;
@y
@!tfm_file:packed file of block;
@!tfm_count:0..CMS_block_length; {where the next byte comes from}
@z
@x
@<Read the whole input file@>=
read(tfm_file,tfm[0]);
@y
@d read_tfm_file(#)==begin
if tfm_count=CMS_block_length then begin
get(tfm_file);
tfm_count:=0;
end;
#:=tfm_file@@(.tfm_count.);
incr(tfm_count);
end
@<Read the whole input file@>=
read_tfm_file(tfm(.0.));
@z
@x
if eof(tfm_file) then abort('The input file is only one byte long!');
@.The input...one byte long@>
read(tfm_file,tfm[1]); lf:=tfm[0]*@'400+tfm[1];
@y
read_tfm_file(tfm(.1.)); lf:=tfm(.0.)*@'400+tfm(.1.);
@z
@x
read(tfm_file,tfm[tfm_ptr]);
@y
read_tfm_file(tfm(.tfm_ptr.));
@z
@x
if not eof(tfm_file) then
@y
get(tfm_file);
if not eof(tfm_file) then
@z
@x
This section should be replaced, if necessary, by changes to the program
that are necessary to make \.{TFtoPL} work at a particular installation.
It is usually best to design your change file so that all changes to
previous sections preserve the section numbering; then everybody's version
will be consistent with the printed program. More extensive changes,
which introduce new sections, can be inserted here; then only the index
itself will get a new section number.
@y
Here are the remaining changes to the program
that are necessary to make \.{TFtoPL} work on VM/CMS.
@ Here's the extra stuff we need for buffering the |tfm_file|.
The |CMS_block_length| constant should be 1024 for consistency
with the idea that CMS \TeX\ and \MF\ read and write non-text
data files blocked \.{RECFM F LRECL 1024}, but I have set it at
2048 to accomodate re-formatting \.{TFM} files for the \.{am}
fonts of the old CMS \TeX\ versions which were \.{RECFM V} with
some record lengths greater than 1024 but less than 2048. These
files can be re-formatted for use with \TeX\ 2.0 by running
\.{TFtoPL} on them and \.{PLtoTF} on the resulting \.{PL} files.
@<Const...@>==
@!CMS_block_length=2048;
@ @<Types...@>==
@!block=packed array (.0..CMS_block_length-1.) of packed 0..255;
@ @<Set init...@>=
tfm_count:=0;
@z
|