summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/uptexdir
diff options
context:
space:
mode:
authorTakuji Tanaka <KXD02663@nifty.ne.jp>2017-04-09 08:15:00 +0000
committerTakuji Tanaka <KXD02663@nifty.ne.jp>2017-04-09 08:15:00 +0000
commit60a40e531d791469d825d3f2a8d6aa8ba4ac46f2 (patch)
tree838df9e6d97b638251bec327dff3e3eb46eacff6 /Build/source/texk/web2c/uptexdir
parent079fcd037d5b13684545e6bdeae82f8792f8b9dd (diff)
(u)pTeX: bug fix on \endlinechar by Kitagawa-san
git-svn-id: svn://tug.org/texlive/trunk@43720 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/uptexdir')
-rw-r--r--Build/source/texk/web2c/uptexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/uptexdir/uptex-m.ch27
2 files changed, 22 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog
index ae7fa2fad74..de70f3615da 100644
--- a/Build/source/texk/web2c/uptexdir/ChangeLog
+++ b/Build/source/texk/web2c/uptexdir/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-09 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * uptex-m.ch: Fix a bug on a UTF-8 sequence at end of a line
+ when \endlinechar=-1.
+
2017-01-15 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* uptex-m.ch, kanji.c:
diff --git a/Build/source/texk/web2c/uptexdir/uptex-m.ch b/Build/source/texk/web2c/uptexdir/uptex-m.ch
index 2bb562ad993..2619759ea1d 100644
--- a/Build/source/texk/web2c/uptexdir/uptex-m.ch
+++ b/Build/source/texk/web2c/uptexdir/uptex-m.ch
@@ -1,4 +1,4 @@
-% This is a change file for upTeX u1.21
+% This is a change file for upTeX u1.22
% By Takuji Tanaka.
%
% (02/26/2007) TTK upTeX u0.01
@@ -35,6 +35,7 @@
% (12/29/2014) TTK upTeX u1.20
% (02/20/2016) TTK upTeX u1.21
% (01/15/2017) TTK upTeX u1.22
+% (04/09/2017) TTK Hironori Kitagawa fixed a bug in \endlinechar.
@x upTeX: banner
{printed when p\TeX\ starts}
@@ -390,11 +391,11 @@ if ((kcp mod @'10)>0)and(nrestmultichr(kcp)>0) then p:=p-(kcp mod @'10);
else reswitch: cur_cmd:=cat_code(cur_chr);
@y
begin
- cur_chr:=fromBUFF(ustringcast(buffer), limit, loc);
+ cur_chr:=fromBUFF(ustringcast(buffer), limit+1, loc);
cur_cmd:=kcat_code(kcatcodekey(cur_chr));
- if (multistrlen(ustringcast(buffer), limit, loc)>1) and check_kcat_code(cur_cmd) then begin
+ if (multistrlen(ustringcast(buffer), limit+1, loc)>1) and check_kcat_code(cur_cmd) then begin
if (cur_cmd=not_cjk) then cur_cmd:=other_kchar;
- loc:=loc+multistrlen(ustringcast(buffer), limit, loc) end
+ loc:=loc+multistrlen(ustringcast(buffer), limit+1, loc) end
else begin
cur_chr:=buffer[loc]; incr(loc);
reswitch: cur_cmd:=cat_code(cur_chr);
@@ -432,11 +433,11 @@ start_cs:
if (cat=letter)or(cat=kanji)or(cat=kana) then state:=skip_blanks
@y
else begin k:=loc;
- cur_chr:=fromBUFF(ustringcast(buffer), limit, k);
+ cur_chr:=fromBUFF(ustringcast(buffer), limit+1, k);
cat:=kcat_code(kcatcodekey(cur_chr));
- if (multistrlen(ustringcast(buffer), limit, k)>1) and check_kcat_code(cat) then begin
+ if (multistrlen(ustringcast(buffer), limit+1, k)>1) and check_kcat_code(cat) then begin
if (cat=not_cjk) then cat:=other_kchar;
- k:=k+multistrlen(ustringcast(buffer), limit, k) end
+ k:=k+multistrlen(ustringcast(buffer), limit+1, k) end
else begin {not multi-byte char}
cur_chr:=buffer[k];
cat:=cat_code(cur_chr);
@@ -453,6 +454,12 @@ start_cs:
@z
@x
+ if (cat=kanji)or(cat=kana) then
+@y
+ if (cat=kanji)or(cat=kana)or(cat=hangul) then
+@z
+
+@x
begin repeat cur_chr:=buffer[k]; incr(k);
if multistrlen(ustringcast(buffer), limit+1, k-1)=2 then
begin cat:=kcat_code(kcatcodekey(fromBUFF(ustringcast(buffer), limit+1, k-1))); incr(k);
@@ -460,11 +467,11 @@ begin repeat cur_chr:=buffer[k]; incr(k);
else cat:=cat_code(cur_chr);
@y
begin repeat
- cur_chr:=fromBUFF(ustringcast(buffer), limit, k);
+ cur_chr:=fromBUFF(ustringcast(buffer), limit+1, k);
cat:=kcat_code(kcatcodekey(cur_chr));
- if (multistrlen(ustringcast(buffer), limit, k)>1) and check_kcat_code(cat) then begin
+ if (multistrlen(ustringcast(buffer), limit+1, k)>1) and check_kcat_code(cat) then begin
if (cat=not_cjk) then cat:=other_kchar;
- k:=k+multistrlen(ustringcast(buffer), limit, k) end
+ k:=k+multistrlen(ustringcast(buffer), limit+1, k) end
else begin {not multi-byte char}
cur_chr:=buffer[k];
cat:=cat_code(cur_chr);