diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-12-23 14:06:20 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-12-23 14:06:20 +0000 |
commit | 42b527eb790072db4ede5983f82d53c438799e08 (patch) | |
tree | 117026450630949666f28a13cf8c9be7fdda9ef5 /Build/source/texk/web2c/omegaware/ovf2ovp.web | |
parent | 29d1eb7e1bb07619e5919ea0b8c8b084d49113eb (diff) |
ovf2ovp, ovp2ovf (Web2C): versions for upTeX
git-svn-id: svn://tug.org/texlive/trunk@24922 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/omegaware/ovf2ovp.web')
-rw-r--r-- | Build/source/texk/web2c/omegaware/ovf2ovp.web | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/Build/source/texk/web2c/omegaware/ovf2ovp.web b/Build/source/texk/web2c/omegaware/ovf2ovp.web index 35885afcda3..bb29e730a03 100644 --- a/Build/source/texk/web2c/omegaware/ovf2ovp.web +++ b/Build/source/texk/web2c/omegaware/ovf2ovp.web @@ -104,6 +104,11 @@ procedure initialize; {this procedure gets things started properly} @ The following parameters can be changed at compile time to extend or reduce \.{VFtoVP}'s capacity. +@d char_max=@"FFFF +@d xchar_max=char_max+1 +@d xxchar_max=xchar_max+1 +@d xxxchar_max=xxchar_max+1 + @<Constants...@>= @!tfm_size=2000000; {maximum length of |tfm| data, in bytes} @!vf_size=600000; {maximum length of |vf| data, in bytes} @@ -113,9 +118,9 @@ reduce \.{VFtoVP}'s capacity. @!hash_size=130003; {preferably a prime number, a bit larger than the number of character pairs in lig/kern steps} @!hash_mult=16007; {another prime} -@!max_char=65535; {the largest character number in a font} -@!xmax_char=65536; {|max_char|+1} -@!xxmax_char=65537;{|max_char|+2} +@!max_char=char_max; {the largest character number in a font} +@!xmax_char=xchar_max; {|max_char|+1} +@!xxmax_char=xxchar_max;{|max_char|+2} @!xmax_label=80001;{must be greater than |max_lig_steps|} @!name_length=50; {a file name shouldn't be longer than this} @!max_stack=50; {maximum depth of \.{DVI} stack in character packets} @@ -609,10 +614,10 @@ bytes, |tfm[0..(4*lf-1)]|. @<Types...@>= @!index=0..tfm_size; {address of a byte in |tfm|} -@!char_type=0..65535; -@!xchar_type=0..65536; -@!xxchar_type=0..65537; -@!xxxchar_type=0..65538; +@!char_type=0..char_max; +@!xchar_type=0..xchar_max; +@!xxchar_type=0..xxchar_max; +@!xxxchar_type=0..xxxchar_max; @ @<Glob...@>= @@ -738,8 +743,8 @@ else begin eval_four_bytes(font_dir); nlw:=2*nl; neew:=2*ne; - top_char:=65535; - top_width:=65535; + top_char:=char_max; + top_width:=char_max; top_height:=255; top_depth:=255; top_italic:=255; @@ -1128,7 +1133,7 @@ if reg_count<>8 then end @ @<Read and store the font definitions and character packets@>= -for k:=0 to 65535 do packet_start[k]:=vf_size; +for k:=0 to char_max do packet_start[k]:=vf_size; font_ptr:=0; packet_found:=false; font_start[0]:=vf_ptr; vc_ptr:=0; font_chars[0]:=vc_ptr; repeat if eof(vf_file) then @@ -1220,7 +1225,7 @@ end; @ We use the |vc| array to store a list of all valid characters in the local font, beginning at location |font_chars[f]|. In \.{VFtoVP} the |vf| array is used for that purpose, but that is not possible for \.{OVF2OVP} with -characters in the range |0..65535|. +characters in the range |0..char_max|. @<Read the local font's \.{TFM} file...@>= @<Move font name into the |cur_name| string@>; @@ -1229,10 +1234,10 @@ reset(tfm_file,cur_name); if eof(tfm_file) then print_ln('---not loaded, font metric file can''t be opened!') @.font metric file can\'t be opened@> -else begin font_bc:=0; font_ec:=65536; {will cause error if not modified soon} +else begin font_bc:=0; font_ec:=xchar_max; {will cause error if not modified soon} @<Read past the header@>; if font_bc<=font_ec then - if font_ec>65535 then print_ln('---not loaded, bad font metric file!') + if font_ec>char_max then print_ln('---not loaded, bad font metric file!') @.bad font metric file@> else @<Read |char_info| entries@>; if eof(tfm_file) then @@ -1770,7 +1775,7 @@ and |bad_char| macros: @!c:xchar_type; {a random character} @!d:0..3; {byte number in a word} @!k:index; {a random index} -@!r:0..65535; {a random two-byte value} +@!r:0..char_max; {a random two-byte value} @!count:0..127; {for when we need to enumerate a small set} @ There are a lot of simple things to do, and they have to be done one @@ -3027,7 +3032,7 @@ sixty_four_cases(set_char_0),sixty_four_cases(set_char_0+64), if o>=put1 then c:=get_bytes(o-put1+1,false) else c:=get_bytes(o-set1+1,false) else c:=o; - if (c<0)or(c>65535) then + if (c<0)or(c>char_max) then bad_vf('Character ',c:1,' is out of range and will be ignored') else if f=font_ptr then bad_vf('Character ',c:1,' in undeclared font will be ignored') |