summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/omegaware/opl2ofm.up
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/omegaware/opl2ofm.up')
-rw-r--r--Build/source/texk/web2c/omegaware/opl2ofm.up81
1 files changed, 81 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/omegaware/opl2ofm.up b/Build/source/texk/web2c/omegaware/opl2ofm.up
new file mode 100644
index 00000000000..f697ab42ba7
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/opl2ofm.up
@@ -0,0 +1,81 @@
+% opl2ofm.up. Public domain.
+%
+% Allow character codes up to "10FFFF.
+
+@x [3] Increase constants.
+@d char_max=@"FFFF
+@y
+@d char_max=@"10FFFF
+@z
+
+@x [51]
+@p function get_byte:byte; {scans a one-byte property value}
+@y
+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_char_code:integer; {scans a character code value}
+@z
+@x [51]
+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 [53]
+ begin skip_error('This value shouldn''t exceed 65535');
+@y
+ begin skip_error('This value shouldn''t exceed 1114111');
+@z
+@x [54]
+ begin skip_error('This value shouldn''t exceed ''177777');
+@y
+ begin skip_error('This value shouldn''t exceed ''4177777');
+@z
+@x [55]
+ begin skip_error('This value shouldn''t exceed "FFFF');
+@y
+ begin skip_error('This value shouldn''t exceed "10FFFF');
+@z
+
+@x [98]
+else begin backup; c:=get_byte;
+@y
+else begin backup; c:=get_char_code;
+@z
+
+@x [106]
+@ @<Read an extended label step@>=
+begin c:=get_byte;
+@y
+@ @<Read an extended label step@>=
+begin c:=get_char_code;
+@z
+
+@x [116]
+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 [119]
+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 [159]
+ while (not diff) and (cprime<=ec) do begin
+@y
+ while (not diff) and (cprime<=ec) and (cprime-c<@"10000) do begin
+@z