summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/tftopl.ch
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-01-12 07:40:56 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-01-12 07:40:56 +0000
commit0de829485d275d17f89998dbbbde3f395bf857e6 (patch)
treea620ae3a87daa217c62577d6af846ded189ddcff /Build/source/texk/web2c/tftopl.ch
parentd491195130658a9a332bf79d49dcc40a5af6244f (diff)
texk/web2c: TFtoPL: Non-zero return code in case of problems and more tests
git-svn-id: svn://tug.org/texlive/trunk@36036 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/tftopl.ch')
-rw-r--r--Build/source/texk/web2c/tftopl.ch34
1 files changed, 34 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/tftopl.ch b/Build/source/texk/web2c/tftopl.ch
index 2a8f44a93b0..3287df32fc5 100644
--- a/Build/source/texk/web2c/tftopl.ch
+++ b/Build/source/texk/web2c/tftopl.ch
@@ -50,6 +50,11 @@
program TFtoPL(@!tfm_file,@!pl_file,@!output);
@z
+@x [2] No global label.
+label @<Labels in the outer block@>@/
+@y
+@z
+
@x [still 2] Don't print banner until later (and unless verbose).
procedure initialize; {this procedure gets things started properly}
begin print_ln(banner);@/
@@ -65,6 +70,11 @@ procedure initialize; {this procedure gets things started properly}
parse_arguments;
@z
+@x [3] No global label.
+@<Labels...@>=final_end;
+@y
+@z
+
@x [5] Increase sizes to match vptovf.
@!tfm_size=30000; {maximum length of |tfm| data, in bytes}
@!lig_size=5000; {maximum length of |lig_kern| program, in words}
@@ -243,6 +253,12 @@ f:=((tfm[k+1] mod 16)*intcast(@'400)+tfm[k+2])*@'400+tfm[k+3];
@d class == class_var
@z
+@x [90]
+ goto final_end;
+@y
+ uexit(1);;
+@z
+
% [90] Change name of the function `f'.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
@@ -251,6 +267,12 @@ f:=((tfm[k+1] mod 16)*intcast(@'400)+tfm[k+2])*@'400+tfm[k+3];
r:=f_fn(r,(hash[r]-1)div 256,(hash[r]-1)mod 256);
@z
+@x [90]
+ out('(INFINITE LIGATURE LOOP MUST BE BROKEN!)'); goto final_end;
+@y
+ out('(INFINITE LIGATURE LOOP MUST BE BROKEN!)'); uexit(1);
+@z
+
% [94] web2c can't handle these mutually recursive procedures.
% But let's do a fake definition of f here, so that it gets into web2c's
% symbol table. We also have to change the name, because there is also a
@@ -284,6 +306,12 @@ f:=lig_z[h];
f_fn:=lig_z[h];
@z
+@x [99]
+if not organize then goto final_end;
+@y
+if not organize then uexit(1);
+@z
+
% [99] No final newline unless verbose.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
@@ -292,6 +320,12 @@ do_characters; print_ln('.');@/
do_characters; if verbose then print_ln('.');@/
@z
+@x [99]
+final_end:end.
+@y
+end.
+@z
+
@x [100] System-dependent changes.
This section should be replaced, if necessary, by changes to the program
that are necessary to make \.{TFtoPL} work at a particular installation.