summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2018-01-19 09:46:02 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2018-01-19 09:46:02 +0000
commit718c40eeac4f48ed8821a849a4c622bcf048b766 (patch)
tree9c28935695e31332a4c956247d444acb3d249972 /Build/source/texk/web2c
parentaa296b03e3883c2bc810908e6ffca23b08adfc0e (diff)
wovp2ovf: throw an error and exit if OFMLEVEL undefined and char>0xff
git-svn-id: svn://tug.org/texlive/trunk@46384 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/omegaware/ChangeLog6
-rw-r--r--Build/source/texk/web2c/omegaware/ovp2ovf.ch6
-rw-r--r--Build/source/texk/web2c/omegaware/ovp2ovf.web18
3 files changed, 28 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/omegaware/ChangeLog b/Build/source/texk/web2c/omegaware/ChangeLog
index 10944dfa03f..a29400cdd19 100644
--- a/Build/source/texk/web2c/omegaware/ChangeLog
+++ b/Build/source/texk/web2c/omegaware/ChangeLog
@@ -1,3 +1,9 @@
+2018-01-19 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * ovp2ovf.web, ovp2ovf.ch: Throw an error and exit if OFMLEVEL
+ undefined and char>0xff is used. This behavior is compatible
+ with ovp2ovf C version.
+
2015-08-10 Peter Breitenlohner <peb@mppmu.mpg.de>
* opl2ofm.ch, ovp2ovf.ch: Send also real numbers to stderr,
diff --git a/Build/source/texk/web2c/omegaware/ovp2ovf.ch b/Build/source/texk/web2c/omegaware/ovp2ovf.ch
index 7e76dfe2767..9a35217c5cf 100644
--- a/Build/source/texk/web2c/omegaware/ovp2ovf.ch
+++ b/Build/source/texk/web2c/omegaware/ovp2ovf.ch
@@ -200,6 +200,12 @@ endif('notdef')
@d out(#)==putbyte(#,tfm_file)
@z
+@x [???] Eliminate nonlocal goto, uexit with a bad exit code.
+ goto final_end;
+@y
+ uexit(1);
+@z
+
@x [165] Fix output of reals.
@p procedure out_scaled(x:fix_word); {outputs a scaled |fix_word|}
var @!n:byte; {the first byte after the sign}
diff --git a/Build/source/texk/web2c/omegaware/ovp2ovf.web b/Build/source/texk/web2c/omegaware/ovp2ovf.web
index 5627fd9b16a..3d765a52d49 100644
--- a/Build/source/texk/web2c/omegaware/ovp2ovf.web
+++ b/Build/source/texk/web2c/omegaware/ovp2ovf.web
@@ -94,6 +94,7 @@ the |output| file, so that all such output can be easily deflected.
@d print_ln(#)==write_ln(#)
@p program OVP2OVF(@!vpl_file,@!vf_file,@!tfm_file,@!output);
+label @<Labels in the outer block@>@/
const @<Constants in the outer block@>@/
type @<Types in the outer block@>@/
var @<Globals in the outer block@>@/
@@ -103,6 +104,13 @@ procedure initialize; {this procedure gets things started properly}
@<Set initial values@>@/
end;
+@ If the program has to stop prematurely, it goes to the
+`|final_end|' (addition in OVP2OVF).
+
+@d final_end=9999 {label for the end of it all}
+
+@<Labels...@>=final_end;
+
@ The following parameters can be changed at compile time to extend or
reduce \.{VPtoVF}'s capacity.
@@ -3455,14 +3463,19 @@ will be~1.
@<Compute the subfile sizes@>=
lh:=header_ptr div 4;@/
not_found:=true; bc:=0;
-if (ofm_level=-1) then ec:=255 @+ else ec:=max_char;
+if (ofm_level=-1) then ec:=255 @+ else ec:=max_char; {only temporary}
while not_found do
if (char_wd[bc]>0)or(bc=ec) then not_found:=false
else incr(bc);
-not_found:=true;
+not_found:=true; ec:=max_char;
while not_found do
if (char_wd[ec]>0)or(ec=0) then not_found:=false
else decr(ec);
+if (ofm_level=-1)and(ec>255) then begin
+ print('Char '); print_hex(ec);
+ print_ln(' too big for TFM (max "FF); use OFM file!');
+ goto final_end;
+ end;
if bc>ec then bc:=1;
incr(memory[width]); incr(memory[height]); incr(memory[depth]);
incr(memory[italic]);@/
@@ -4039,6 +4052,7 @@ read_input; print_ln('.');@/
corr_and_check;@/
@<Do the font metric output@>;
vf_output;
+final_end:
end.
@ @<Global...@>=