Skip to content

Commit

Permalink
[euptex] improve IVS output (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tk committed Jun 28, 2024
1 parent 0fa0c33 commit b6372e3
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions source/texk/web2c/euptexdir/eptex.ech
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ end
@!m,@!n:integer; {to be tested against the second operand}
@!p,@!q:pointer; {for traversing token lists in \.{\\ifx} tests}
@y
@!m,@!n,@!v:integer; {to be tested against the second operand}
@!m,@!n,@!s,@!v,@!nn,@!jj:integer; {to be tested against the second operand}
@!p,@!q:pointer; {for traversing token lists in \.{\\ifx} tests}
@z

Expand Down Expand Up @@ -744,14 +744,35 @@ if j=1 then
@y
if check_kanji(info(p)) then {|wchar_token|}
begin
v:=toBUFF(ktokentochr(info(p)));
if BYTE1(v)<>0 then
begin buffer[m]:=BYTE1(v); buffer2[m]:=1; incr(m); end;
if BYTE2(v)<>0 then
begin buffer[m]:=BYTE2(v); buffer2[m]:=1; incr(m); end;
if BYTE3(v)<>0 then
begin buffer[m]:=BYTE3(v); buffer2[m]:=1; incr(m); end;
buffer[m]:=BYTE4(v); buffer2[m]:=1; incr(m);
if (isinternalUPTEX) then begin
s:=toUCS(ktokentochr(info(p)));
nn:=UVSgetcodepointlength(s);
jj:=1;
while jj<=nn do begin
v:=UVSgetcodepointinsequence(s,jj);
if (v>0) then begin
v:=UCStoUTF8(v);
if BYTE1(v)<>0 then
begin buffer[m]:=BYTE1(v); buffer2[m]:=1; incr(m); end;
if BYTE2(v)<>0 then
begin buffer[m]:=BYTE2(v); buffer2[m]:=1; incr(m); end;
if BYTE3(v)<>0 then
begin buffer[m]:=BYTE3(v); buffer2[m]:=1; incr(m); end;
buffer[m]:=BYTE4(v); buffer2[m]:=1; incr(m);
end;
incr(jj);
end
end
else begin
v:=toBUFF(info(p) mod max_cjk_val);
if BYTE1(v)<>0 then
begin buffer[m]:=BYTE1(v); buffer2[m]:=1; incr(m); end;
if BYTE2(v)<>0 then
begin buffer[m]:=BYTE2(v); buffer2[m]:=1; incr(m); end;
if BYTE3(v)<>0 then
begin buffer[m]:=BYTE3(v); buffer2[m]:=1; incr(m); end;
buffer[m]:=BYTE4(v); buffer2[m]:=1; incr(m);
end;
p:=link(p);
end
else
Expand Down

0 comments on commit b6372e3

Please sign in to comment.