From 718c40eeac4f48ed8821a849a4c622bcf048b766 Mon Sep 17 00:00:00 2001 From: Hironobu Yamashita Date: Fri, 19 Jan 2018 09:46:02 +0000 Subject: 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 --- Build/source/texk/web2c/omegaware/ChangeLog | 6 ++++++ Build/source/texk/web2c/omegaware/ovp2ovf.ch | 6 ++++++ Build/source/texk/web2c/omegaware/ovp2ovf.web | 18 ++++++++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) (limited to 'Build/source/texk/web2c/omegaware') 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 + + * 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 * 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 @@/ const @@/ type @@/ var @@/ @@ -103,6 +104,13 @@ procedure initialize; {this procedure gets things started properly} @@/ 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} + +@=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. @= 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;@/ @; vf_output; +final_end: end. @ @= -- cgit v1.2.3