summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/omegaware
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-12-23 14:06:20 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-12-23 14:06:20 +0000
commit42b527eb790072db4ede5983f82d53c438799e08 (patch)
tree117026450630949666f28a13cf8c9be7fdda9ef5 /Build/source/texk/web2c/omegaware
parent29d1eb7e1bb07619e5919ea0b8c8b084d49113eb (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')
-rw-r--r--Build/source/texk/web2c/omegaware/ChangeLog8
-rw-r--r--Build/source/texk/web2c/omegaware/am/omegaware.am23
-rw-r--r--Build/source/texk/web2c/omegaware/ovf2ovp.up5
-rw-r--r--Build/source/texk/web2c/omegaware/ovf2ovp.web35
-rw-r--r--Build/source/texk/web2c/omegaware/ovp2ovf.up46
-rw-r--r--Build/source/texk/web2c/omegaware/ovp2ovf.web25
6 files changed, 110 insertions, 32 deletions
diff --git a/Build/source/texk/web2c/omegaware/ChangeLog b/Build/source/texk/web2c/omegaware/ChangeLog
index bc3d2692e5d..43d6ef0e2c4 100644
--- a/Build/source/texk/web2c/omegaware/ChangeLog
+++ b/Build/source/texk/web2c/omegaware/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ovf2ovp.web, ovp2ovf.web: Replace 65535 etc by numeric Web
+ macros (can be up to 2^{30} for otangle).
+
+ * ovf2ovp.up, ovp2ovf.up (new): Changes for upTeX versions.
+ * am/omegaware.am: Adapted.
+
2011-12-21 Peter Breitenlohner <peb@mppmu.mpg.de>
* opl2ofm.web: Correctly compute mem_size=max_char*4+8;
diff --git a/Build/source/texk/web2c/omegaware/am/omegaware.am b/Build/source/texk/web2c/omegaware/am/omegaware.am
index b01ee06f7d3..a264f5bf776 100644
--- a/Build/source/texk/web2c/omegaware/am/omegaware.am
+++ b/Build/source/texk/web2c/omegaware/am/omegaware.am
@@ -20,6 +20,7 @@ DISTCLEANFILES += $(omegaware_programs:=.c) $(omegaware_programs:=.h) \
$(omegaware_programs:=.p) $(omegaware_programs:=-web2c)
ow_tangle = WEBINPUTS=$(srcdir)/omegaware $(buildenv) $(TANGLE)
+ow_otangle = WEBINPUTS=.:$(srcdir)/omegaware $(buildenv) $(OTANGLE)
nodist_odvicopy_SOURCES = odvicopy.c odvicopy.h
odvicopy.c odvicopy.h: odvicopy-web2c
@@ -76,20 +77,24 @@ ovf2ovp.c ovf2ovp.h: ovf2ovp-web2c
@$(web2c) ovf2ovp
ovf2ovp-web2c: ovf2ovp.p $(web2c_depend)
@$(web2c) ovf2ovp
-EXTRA_DIST += $(ovf2ovp_sources)
-ovf2ovp_sources = omegaware/ovf2ovp.web omegaware/ovf2ovp.ch
-ovf2ovp.p: tangle$(EXEEXT) $(ovf2ovp_sources)
- $(ow_tangle) ovf2ovp ovf2ovp
-
+ovf2ovp.p: otangle$(EXEEXT) ovf2ovp.web omegaware/ovf2ovp.ch
+ $(ow_otangle) ovf2ovp ovf2ovp
+ovf2ovp.web: tie$(EXEEXT) omegaware/ovf2ovp.web omegaware/ovf2ovp.up
+ $(tie) -m ovf2ovp.web omegaware/ovf2ovp.web omegaware/ovf2ovp.up
+EXTRA_DIST += omegaware/ovf2ovp.web omegaware/ovf2ovp.up omegaware/ovf2ovp.ch
+DISTCLEANFILES += ovf2ovp.web
+
nodist_ovp2ovf_SOURCES = ovp2ovf.c ovp2ovf.h
ovp2ovf.c ovp2ovf.h: ovp2ovf-web2c
@$(web2c) ovp2ovf
ovp2ovf-web2c: ovp2ovf.p $(web2c_depend)
@$(web2c) ovp2ovf
-EXTRA_DIST += $(ovp2ovf_sources)
-ovp2ovf_sources = omegaware/ovp2ovf.web omegaware/ovp2ovf.ch
-ovp2ovf.p: tangle$(EXEEXT) $(ovp2ovf_sources)
- $(ow_tangle) ovp2ovf ovp2ovf
+ovp2ovf.p: otangle$(EXEEXT) ovp2ovf.web omegaware/ovp2ovf.ch
+ $(ow_otangle) ovp2ovf ovp2ovf
+ovp2ovf.web: tie$(EXEEXT) omegaware/ovp2ovf.web omegaware/ovp2ovf.up
+ $(tie) -m ovp2ovf.web omegaware/ovp2ovf.web omegaware/ovp2ovf.up
+EXTRA_DIST += omegaware/ovp2ovf.web omegaware/ovp2ovf.up omegaware/ovp2ovf.ch
+DISTCLEANFILES += ovp2ovf.web
## Tests
##
diff --git a/Build/source/texk/web2c/omegaware/ovf2ovp.up b/Build/source/texk/web2c/omegaware/ovf2ovp.up
new file mode 100644
index 00000000000..58fb2b1b89b
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/ovf2ovp.up
@@ -0,0 +1,5 @@
+@x
+@d char_max=@"FFFF
+@y
+@d char_max=@"10FFFF
+@z
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')
diff --git a/Build/source/texk/web2c/omegaware/ovp2ovf.up b/Build/source/texk/web2c/omegaware/ovp2ovf.up
new file mode 100644
index 00000000000..9c57961ed34
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/ovp2ovf.up
@@ -0,0 +1,46 @@
+@x [3] Increase constants.
+@d char_max=@"FFFF
+@y
+@d char_max=@"10FFFF
+@z
+@x [3] Increase constants.
+@d width_max=@"FFFF
+@y
+@d width_max=@"10FFFF
+@z
+@x [3] Increase constants.
+@!vf_size=200000; {maximum length of |vf| data, in bytes}
+@y
+@!vf_size=800000; {maximum length of |vf| data, in bytes}
+@z
+
+@x [60]
+@d max_byte=@"FFFF
+
+@p function get_byte:byte; {scans a one-byte property value}
+@y
+@d max_byte=@"FFFFFF
+
+@p function get_byte:integer; {scans a one-byte property value}
+@z
+@x [62]
+ skip_error('This value shouldn''t exceed 65535');
+@y
+ skip_error('This value shouldn''t exceed 16777215');
+@z
+@x [63]
+ skip_error('This value shouldn''t exceed ''177777');
+@y
+ skip_error('This value shouldn''t exceed ''77777777');
+@z
+@x [64]
+ skip_error('This value shouldn''t exceed "FFFF');
+@y
+ skip_error('This value shouldn''t exceed "FFFFFF');
+@z
+
+@x [152]
+procedure read_packet(@!c:byte);
+@y
+procedure read_packet(@!c:integer);
+@z
diff --git a/Build/source/texk/web2c/omegaware/ovp2ovf.web b/Build/source/texk/web2c/omegaware/ovp2ovf.web
index 5591ce52d88..ad9def4bf73 100644
--- a/Build/source/texk/web2c/omegaware/ovp2ovf.web
+++ b/Build/source/texk/web2c/omegaware/ovp2ovf.web
@@ -103,16 +103,23 @@ procedure initialize; {this procedure gets things started properly}
@ The following parameters can be changed at compile time to extend or
reduce \.{VPtoVF}'s capacity.
+@d char_max=@"FFFF
+@d xchar_max=char_max+1
+@d xxchar_max=xchar_max+1
+@d mem_max=xxchar_max+xxchar_max+xxchar_max+xxchar_max
+@#
+@d width_max=@"FFFF
+
@<Constants...@>=
@!ofm_type=0; {16-bit OFM; sufficient for most purposes}
-@!max_char=65535; {the largest character number in a font}
-@!xmax_char=65536; {|max_char|+1}
-@!xxmax_char=65537;{|max_char|+2}
-@!mem_size=262148; {|max_char|*4+8}
+@!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}
+@!mem_size=mem_max; {|max_char|*4+8}
@!max_font=1000; {the largest font number}
@!xmax_font=1001; {|max_font|+1}
@!xxmax_font=1002; {|max_font|+2}
-@!max_width=65535; {the largest character width number}
+@!max_width=width_max; {the largest character width number}
@!max_height=255; {the largest character height number}
@!max_depth=255; {the largest character depth number}
@!max_italic=255; {the largest character italic correction number}
@@ -1500,6 +1507,8 @@ and $2^{31}-1$, inclusive, so that a computer with two's complement
@ The first number scanner, which returns a one-byte value, surely has
no problems of arithmetic overflow.
+@d max_byte=@"FFFF
+
@p function get_byte:byte; {scans a one-byte property value}
var acc:integer; {an accumulator}
@!t:ASCII_code; {the type of value to be scanned}
@@ -1531,7 +1540,7 @@ else skip_error('"C" value must be standard ASCII and not a paren')
@ @<Scan a small dec...@>=
begin while (cur_char>="0")and(cur_char<="9") do begin
acc:=acc*10+cur_char-"0";
- if acc>65535 then begin
+ if acc>max_byte then begin
skip_error('This value shouldn''t exceed 65535');
@.This value shouldn't...@>
acc:=0; cur_char:=" ";
@@ -1544,7 +1553,7 @@ end
@ @<Scan a small oct...@>=
begin while (cur_char>="0")and(cur_char<="7") do begin
acc:=acc*8+cur_char-"0";
- if acc>65535 then begin
+ if acc>max_byte then begin
skip_error('This value shouldn''t exceed ''177777');
@.This value shouldn't...@>
acc:=0; cur_char:=" ";
@@ -1559,7 +1568,7 @@ begin while ((cur_char>="0")and(cur_char<="9"))or
((cur_char>="A")and(cur_char<="F")) do begin
if cur_char>="A" then cur_char:=cur_char+"0"+10-"A";
acc:=acc*16+cur_char-"0";
- if acc>65535 then begin
+ if acc>max_byte then begin
skip_error('This value shouldn''t exceed "FFFF');
@.This value shouldn't...@>
acc:=0; cur_char:=" ";