summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/omegaware/ovp2ovf.up
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/omegaware/ovp2ovf.up')
-rw-r--r--Build/source/texk/web2c/omegaware/ovp2ovf.up83
1 files changed, 68 insertions, 15 deletions
diff --git a/Build/source/texk/web2c/omegaware/ovp2ovf.up b/Build/source/texk/web2c/omegaware/ovp2ovf.up
index 5726dbb737b..58388680154 100644
--- a/Build/source/texk/web2c/omegaware/ovp2ovf.up
+++ b/Build/source/texk/web2c/omegaware/ovp2ovf.up
@@ -1,42 +1,89 @@
+% ovp2ovf.up. Public domain.
+%
+% Allow character codes up to "10FFFF.
+
@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=@"10FFFF
+We have to distinguish between character codes that may exceed |@"FFFF|
+and those that are store in one |byte| and thus must not exceed |@"FFFF|.
-@p function get_byte:integer; {scans a one-byte property value}
+@p function get_char_code:integer; {scans a character code value}
+@z
+@x [60]
+cur_char:=" "; get_byte:=acc;
+@y
+cur_char:=" "; get_char_code:=acc;
+end;
+@#
+function get_byte:integer; {scans a one-byte property value}
+var acc:integer; {an accumulator}
+begin acc:=get_char_code;
+if acc>@"FFFF then begin
+ skip_error('This value shouldn''t exceed "FFFF');
+@.This value shouldn't...@>
+ acc:=0; cur_char:=" ";
+ end;
+get_byte:=acc;
@z
@x [62]
- skip_error('This value shouldn''t exceed 65535');
+ begin skip_error('This value shouldn''t exceed 65535');
@y
- skip_error('This value shouldn''t exceed 1114111');
+ begin skip_error('This value shouldn''t exceed 1114111');
@z
@x [63]
- skip_error('This value shouldn''t exceed ''177777');
+ begin skip_error('This value shouldn''t exceed ''177777');
@y
- skip_error('This value shouldn''t exceed ''4177777');
+ begin skip_error('This value shouldn''t exceed ''4177777');
@z
@x [64]
- skip_error('This value shouldn''t exceed "FFFF');
+ begin skip_error('This value shouldn''t exceed "FFFF');
+@y
+ begin skip_error('This value shouldn''t exceed "10FFFF');
+@z
+
+@x [??]
+for k:=256 to max_char do packet_length[k]:=3;
+@y
+for k:=256 to @"FFFF do packet_length[k]:=3;
+for k:=@"10000 to max_char do packet_length[k]:=4;
+@z
+
+@x [??]
+else begin backup; c:=get_byte;
+@y
+else begin backup; c:=get_char_code;
+@z
+
+@x [??]
+@ @<Read an extended label step@>=
+begin c:=get_byte;
+@y
+@ @<Read an extended label step@>=
+begin c:=get_char_code;
+@z
+
+@x [??]
+c:=get_byte; {read the character code that is being specified}
@y
- skip_error('This value shouldn''t exceed "10FFFF');
+c:=get_char_code; {read the character code that is being specified}
+@z
+
+@x [??]
+c:=get_byte; {read the character code that is being specified}
+@y
+c:=get_char_code; {read the character code that is being specified}
@z
@x [152]
@@ -45,6 +92,12 @@ procedure read_packet(@!c:byte);
procedure read_packet(@!c:integer);
@z
+@x [156]
+else begin cc:=get_byte;
+@y
+else begin cc:=get_char_code;
+@z
+
@x [188]
while (not diff) and (cprime<=ec) do begin
@y