Skip to content

Commit

Permalink
[euptex] \Uchar, \Ucharcat with check_echar_range() (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tk committed Jun 28, 2024
1 parent b6372e3 commit 26505eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/texk/web2c/euptexdir/pdfutils.ch
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ pdf_file_dump_code:
uniform_deviate_code: scan_int;
normal_deviate_code: do_nothing;
Uchar_convert_code: begin scan_char_num;
if not is_char_ascii(cur_val) then
if not check_echar_range(cur_val) then
if kcat_code(kcatcodekey(cur_val))=not_cjk then cat:=other_kchar;
end;
Ucharcat_convert_code:
Expand All @@ -1171,20 +1171,20 @@ Ucharcat_convert_code:
help1("I'm going to use 12 instead of that illegal code value.");@/
error; cat:=12;
end else cat:=cur_val;
end else if i<=@"FF then
end else if check_echar_range(i) then
begin if (illegal_Ucharcat_ascii_catcode(cur_val))
and (illegal_Ucharcat_wchar_catcode(cur_val)) then
begin print_err("Invalid code ("); print_int(cur_val);
@.Invalid code@>
print("), should be in the ranges 1..4, 6..8, 10..13, 16..19");
print("), should be in the ranges 1..4, 6..8, 10..13, 16..20");
help1("I'm going to use 12 instead of that illegal code value.");@/
error; cat:=12;
end else cat:=cur_val;
end else { |wchar_token| only }
begin if illegal_Ucharcat_wchar_catcode(cur_val) then
begin print_err("Invalid code ("); print_int(cur_val);
@.Invalid code@>
print("), should be in the ranges 16..19");
print("), should be in the ranges 16..20");
help1("I'm going to use 18 instead of that illegal code value.");@/
error; cat:=other_kchar;
end else cat:=cur_val;
Expand Down

0 comments on commit 26505eb

Please sign in to comment.