| 1 |
% opl2ofm.up. Public domain. |
| 2 |
% |
| 3 |
% Allow character codes up to "10FFFF. |
| 4 |
|
| 5 |
@x [3] Increase constants. |
| 6 |
@d char_max=@"FFFF |
| 7 |
@y |
| 8 |
@d char_max=@"10FFFF |
| 9 |
@z |
| 10 |
|
| 11 |
@x [51] |
| 12 |
@p function get_byte:byte; {scans a one-byte property value} |
| 13 |
@y |
| 14 |
We have to distinguish between character codes that may exceed |@"FFFF| |
| 15 |
and those that are store in one |byte| and thus must not exceed |@"FFFF|. |
| 16 |
|
| 17 |
@p function get_char_code:integer; {scans a character code value} |
| 18 |
@z |
| 19 |
@x [51] |
| 20 |
cur_char:=" "; get_byte:=acc; |
| 21 |
@y |
| 22 |
cur_char:=" "; get_char_code:=acc; |
| 23 |
end; |
| 24 |
@# |
| 25 |
function get_byte:integer; {scans a one-byte property value} |
| 26 |
var acc:integer; {an accumulator} |
| 27 |
begin acc:=get_char_code; |
| 28 |
if acc>@"FFFF then begin |
| 29 |
skip_error('This value shouldn''t exceed "FFFF'); |
| 30 |
@.This value shouldn't...@> |
| 31 |
acc:=0; cur_char:=" "; |
| 32 |
end; |
| 33 |
get_byte:=acc; |
| 34 |
@z |
| 35 |
@x [53] |
| 36 |
begin skip_error('This value shouldn''t exceed 65535'); |
| 37 |
@y |
| 38 |
begin skip_error('This value shouldn''t exceed 1114111'); |
| 39 |
@z |
| 40 |
@x [54] |
| 41 |
begin skip_error('This value shouldn''t exceed ''177777'); |
| 42 |
@y |
| 43 |
begin skip_error('This value shouldn''t exceed ''4177777'); |
| 44 |
@z |
| 45 |
@x [55] |
| 46 |
begin skip_error('This value shouldn''t exceed "FFFF'); |
| 47 |
@y |
| 48 |
begin skip_error('This value shouldn''t exceed "10FFFF'); |
| 49 |
@z |
| 50 |
|
| 51 |
@x [98] |
| 52 |
else begin backup; c:=get_byte; |
| 53 |
@y |
| 54 |
else begin backup; c:=get_char_code; |
| 55 |
@z |
| 56 |
|
| 57 |
@x [106] |
| 58 |
@ @<Read an extended label step@>= |
| 59 |
begin c:=get_byte; |
| 60 |
@y |
| 61 |
@ @<Read an extended label step@>= |
| 62 |
begin c:=get_char_code; |
| 63 |
@z |
| 64 |
|
| 65 |
@x [116] |
| 66 |
c:=get_byte; {read the character code that is being specified} |
| 67 |
@y |
| 68 |
c:=get_char_code; {read the character code that is being specified} |
| 69 |
@z |
| 70 |
|
| 71 |
@x [119] |
| 72 |
c:=get_byte; {read the character code that is being specified} |
| 73 |
@y |
| 74 |
c:=get_char_code; {read the character code that is being specified} |
| 75 |
@z |
| 76 |
|
| 77 |
@x [159] |
| 78 |
while (not diff) and (cprime<=ec) do begin |
| 79 |
@y |
| 80 |
while (not diff) and (cprime<=ec) and (cprime-c<@"10000) do begin |
| 81 |
@z |