texlive[46384] Build/source/texk/web2c/omegaware: wovp2ovf: throw an

commits+hironobu at tug.org commits+hironobu at tug.org
Fri Jan 19 10:46:03 CET 2018


Revision: 46384
          http://tug.org/svn/texlive?view=revision&revision=46384
Author:   hironobu
Date:     2018-01-19 10:46:02 +0100 (Fri, 19 Jan 2018)
Log Message:
-----------
wovp2ovf: throw an error and exit if OFMLEVEL undefined and char>0xff

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/omegaware/ChangeLog
    trunk/Build/source/texk/web2c/omegaware/ovp2ovf.ch
    trunk/Build/source/texk/web2c/omegaware/ovp2ovf.web

Modified: trunk/Build/source/texk/web2c/omegaware/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/omegaware/ChangeLog	2018-01-19 01:24:00 UTC (rev 46383)
+++ trunk/Build/source/texk/web2c/omegaware/ChangeLog	2018-01-19 09:46:02 UTC (rev 46384)
@@ -1,3 +1,9 @@
+2018-01-19  Hironobu Yamashita  <h.y.acetaminophen at 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 at mppmu.mpg.de>
 
 	* opl2ofm.ch, ovp2ovf.ch: Send also real numbers to stderr,

Modified: trunk/Build/source/texk/web2c/omegaware/ovp2ovf.ch
===================================================================
--- trunk/Build/source/texk/web2c/omegaware/ovp2ovf.ch	2018-01-19 01:24:00 UTC (rev 46383)
+++ trunk/Build/source/texk/web2c/omegaware/ovp2ovf.ch	2018-01-19 09:46:02 UTC (rev 46384)
@@ -200,6 +200,12 @@
 @d out(#)==putbyte(#,tfm_file)
 @z
 
+ at x [???] Eliminate nonlocal goto, uexit with a bad exit code.
+  goto final_end;
+ at y
+  uexit(1);
+ at 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}

Modified: trunk/Build/source/texk/web2c/omegaware/ovp2ovf.web
===================================================================
--- trunk/Build/source/texk/web2c/omegaware/ovp2ovf.web	2018-01-19 01:24:00 UTC (rev 46383)
+++ trunk/Build/source/texk/web2c/omegaware/ovp2ovf.web	2018-01-19 09:46:02 UTC (rev 46384)
@@ -94,6 +94,7 @@
 @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 @@
   @<Set initial values@>@/
   end;
 
+@ If the program has to stop prematurely, it goes to the
+`|final_end|' (addition in OVP2OVF).
+
+ at 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 @@
 @<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 @@
 corr_and_check;@/
 @<Do the font metric output@>;
 vf_output;
+final_end:
 end.
 
 @ @<Global...@>=



More information about the tex-live-commits mailing list