summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/euptexdir
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2022-01-22 17:03:22 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2022-01-22 17:03:22 +0000
commit76e833603f3eb350549d8b472d5b0c1ebae21713 (patch)
tree0adce490f86927e7a81a2f05330b9590bf80663d /Build/source/texk/web2c/euptexdir
parent87e77a4b4b35459b0bc1aa06f48f2cf0db19ae9e (diff)
[e][u]ptex: Distinguish 8-bit characters and Japanese characters (H. Kitagawa et al.)
For better support of LaTeX3 (expl3). More details in TUGboat 41(2):329--334, 2020. git-svn-id: svn://tug.org/texlive/trunk@61692 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/euptexdir')
-rw-r--r--Build/source/texk/web2c/euptexdir/ChangeLog8
-rw-r--r--Build/source/texk/web2c/euptexdir/euptex.ch118
-rw-r--r--Build/source/texk/web2c/euptexdir/euptex.defines3
-rw-r--r--Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch26
-rw-r--r--Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch12
5 files changed, 40 insertions, 27 deletions
diff --git a/Build/source/texk/web2c/euptexdir/ChangeLog b/Build/source/texk/web2c/euptexdir/ChangeLog
index 97c6e6f9500..72a0056a658 100644
--- a/Build/source/texk/web2c/euptexdir/ChangeLog
+++ b/Build/source/texk/web2c/euptexdir/ChangeLog
@@ -1,3 +1,11 @@
+2022-01-22 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * euptex.ch1, pdfstrcmp-eup-post.ch, pdfstrcmp-eup-pre.ch:
+ Change type of str_pool to unsigned short.
+ We use only 0--511, and use flag 0x100 for Japanese char.
+ More details in TUGboat 41(2):329--334, 2020.
+ * euptex.defines: Add multistrlen{short,filename}, fromBUFFshort.
+
2022-01-10 Karl Berry <karl@freefriends.org>
* am/euptex.am: do not silence tangle-sh.
diff --git a/Build/source/texk/web2c/euptexdir/euptex.ch1 b/Build/source/texk/web2c/euptexdir/euptex.ch1
index 35af4241760..84f8be6cf28 100644
--- a/Build/source/texk/web2c/euptexdir/euptex.ch1
+++ b/Build/source/texk/web2c/euptexdir/euptex.ch1
@@ -67,19 +67,23 @@ if j=1 then
@z
@x e-pTeX: ifcsname l.28620
- begin buffer[m]:=Hi(info(p)); incr(m);
- end;
+ begin buffer[m]:=Hi(info(p)); buffer2[m]:=1; incr(m); buffer2[m]:=1;
+ end
+ else buffer2[m]:=0;
buffer[m]:=Lo(info(p)); incr(m); p:=link(p);
@y
begin
- if BYTE1(toBUFF(info(p) mod max_cjk_val))<>0 then begin buffer[m]:=BYTE1(toBUFF(info(p) mod max_cjk_val)); incr(m); end;
- if BYTE2(toBUFF(info(p) mod max_cjk_val))<>0 then begin buffer[m]:=BYTE2(toBUFF(info(p) mod max_cjk_val)); incr(m); end;
- if BYTE3(toBUFF(info(p) mod max_cjk_val))<>0 then begin buffer[m]:=BYTE3(toBUFF(info(p) mod max_cjk_val)); incr(m); end;
- buffer[m]:=BYTE4(toBUFF(info(p) mod max_cjk_val)); incr(m);
+ if BYTE1(toBUFF(info(p) mod max_cjk_val))<>0 then
+ begin buffer[m]:=BYTE1(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end;
+ if BYTE2(toBUFF(info(p) mod max_cjk_val))<>0 then
+ begin buffer[m]:=BYTE2(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end;
+ if BYTE3(toBUFF(info(p) mod max_cjk_val))<>0 then
+ begin buffer[m]:=BYTE3(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end;
+ buffer[m]:=BYTE4(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m);
p:=link(p);
end
else
- begin buffer[m]:=info(p) mod max_char_val; incr(m); p:=link(p);
+ begin buffer[m]:=info(p) mod max_char_val; buffer2[m]:=0; incr(m); p:=link(p);
end;
@z
diff --git a/Build/source/texk/web2c/euptexdir/euptex.defines b/Build/source/texk/web2c/euptexdir/euptex.defines
index 613c70e7f14..0fb52bbdd86 100644
--- a/Build/source/texk/web2c/euptexdir/euptex.defines
+++ b/Build/source/texk/web2c/euptexdir/euptex.defines
@@ -16,7 +16,10 @@
@define function ismultichr ();
@define function multistrlen ();
+@define function multistrlenshort ();
+@define function multistrlenfilename ();
@define function fromBUFF ();
+@define function fromBUFFshort ();
@define function toBUFF ();
@define function fromDVI ();
diff --git a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch b/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch
index 10becd15815..8c2a909e95a 100644
--- a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch
+++ b/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch
@@ -17,11 +17,9 @@
@z
@x
- check_kcat_code(cc) then
- begin if (cc=not_cjk) then cc:=other_kchar;
+ if (cc=not_cjk) then cc:=other_kchar;
@y
- ((cat>=kanji)or check_kcat_code(cc)) then
- begin if cat>=kanji then cc:=cat else if (cc=not_cjk) then cc:=other_kchar;
+ if cat>=kanji then cc:=cat else if (cc=not_cjk) then cc:=other_kchar;
@z
@x
@@ -97,15 +95,15 @@ Ucharcat_convert_code:
@x
procedure print_kanji(@!s:integer); {prints a single character}
begin
-if s>255 then begin
+if s>@"FF then begin
if isprint_utf8 then begin
s:=UCStoUTF8(toUCS(s));
- if BYTE1(s)<>0 then print_char(BYTE1(s));
- if BYTE2(s)<>0 then print_char(BYTE2(s));
- if BYTE3(s)<>0 then print_char(BYTE3(s));
- print_char(BYTE4(s));
+ if BYTE1(s)<>0 then print_char(@"100+BYTE1(s));
+ if BYTE2(s)<>0 then print_char(@"100+BYTE2(s));
+ if BYTE3(s)<>0 then print_char(@"100+BYTE3(s));
+ print_char(@"100+BYTE4(s));
end
- else begin print_char(Hi(s)); print_char(Lo(s)); end;
+ else begin print_char(@"100+Hi(s)); print_char(@"100+Lo(s)); end;
end
else print_char(s);
end;
@@ -114,9 +112,9 @@ procedure print_kanji(@!s:KANJI_code); {prints a single character}
begin
if isprint_utf8 then s:=UCStoUTF8(toUCS(s mod max_cjk_val))
else s:=toBUFF(s mod max_cjk_val);
-if BYTE1(s)<>0 then print_char(BYTE1(s));
-if BYTE2(s)<>0 then print_char(BYTE2(s));
-if BYTE3(s)<>0 then print_char(BYTE3(s));
- print_char(BYTE4(s));
+if BYTE1(s)<>0 then print_char(@"100+BYTE1(s));
+if BYTE2(s)<>0 then print_char(@"100+BYTE2(s));
+if BYTE3(s)<>0 then print_char(@"100+BYTE3(s));
+ print_char(@"100+BYTE4(s));
end;
@z
diff --git a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch b/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch
index b583095744c..00b3864b571 100644
--- a/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch
+++ b/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-pre.ch
@@ -10,16 +10,16 @@
procedure print_kanji(@!s:KANJI_code); {prints a single character}
begin
s:=toBUFF(s mod max_cjk_val);
-if BYTE1(s)<>0 then print_char(BYTE1(s));
-if BYTE2(s)<>0 then print_char(BYTE2(s));
-if BYTE3(s)<>0 then print_char(BYTE3(s));
- print_char(BYTE4(s));
+if BYTE1(s)<>0 then print_char(@"100+BYTE1(s));
+if BYTE2(s)<>0 then print_char(@"100+BYTE2(s));
+if BYTE3(s)<>0 then print_char(@"100+BYTE3(s));
+ print_char(@"100+BYTE4(s));
end;
@y
procedure print_kanji(@!s:KANJI_code); {prints a single character}
begin
-if s>255 then
- begin print_char(Hi(s)); print_char(Lo(s));
+if s>@"FF then
+ begin print_char(@"100+Hi(s)); print_char(@"100+Lo(s));
end else print_char(s);
end;
@z