texlive[48676] Build/source/texk/web2c: upbibtex: Fix bug of
commits+takuji at tug.org
commits+takuji at tug.org
Sun Sep 16 07:36:36 CEST 2018
Revision: 48676
http://tug.org/svn/texlive?view=revision&revision=48676
Author: takuji
Date: 2018-09-16 07:36:36 +0200 (Sun, 16 Sep 2018)
Log Message:
-----------
upbibtex: Fix bug of substring$ (T. Sakai)
Modified Paths:
--------------
trunk/Build/source/texk/web2c/ptexdir/kanji.h
trunk/Build/source/texk/web2c/uptexdir/ChangeLog
trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch
Modified: trunk/Build/source/texk/web2c/ptexdir/kanji.h
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/kanji.h 2018-09-16 00:24:13 UTC (rev 48675)
+++ trunk/Build/source/texk/web2c/ptexdir/kanji.h 2018-09-16 05:36:36 UTC (rev 48676)
@@ -28,7 +28,7 @@
#define Hi(x) (((x) >> 8) & 0xff)
#define Lo(x) ((x) & 0xff)
-extern int check_kanji (integer c);
+extern boolean check_kanji (integer c);
#define checkkanji check_kanji
extern boolean is_char_ascii (integer c);
#define ischarascii is_char_ascii
Modified: trunk/Build/source/texk/web2c/uptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/ChangeLog 2018-09-16 00:24:13 UTC (rev 48675)
+++ trunk/Build/source/texk/web2c/uptexdir/ChangeLog 2018-09-16 05:36:36 UTC (rev 48676)
@@ -1,3 +1,10 @@
+2018-09-16 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
+ * upbibtex.ch: Fix bug of substring$
+ from Takashi Sakai:
+ https://github.com/texjporg/tex-jp-build/issues/64
+ https://github.com/texjporg/tex-jp-build/pull/66
+
2018-09-09 Karl Berry <karl at tug.org>
* uptriptest.test: LC_ALL=LANGUAGE=C.
Modified: trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch 2018-09-16 00:24:13 UTC (rev 48675)
+++ trunk/Build/source/texk/web2c/uptexdir/upbibtex.ch 2018-09-16 05:36:36 UTC (rev 48676)
@@ -258,35 +258,18 @@
@y
{ |2..4| bytes Kanji code break check }
tps:=str_start[pop_lit3];
-while (tps < sp_ptr) do begin
- tps := tps + multibytelen(str_pool[tps])
-end;
tpe:=tps;
-while (tpe < sp_end) do begin
- tpe := tpe + multibytelen(str_pool[tpe])
+while tpe < str_start[pop_lit3+1] do begin
+ if multibytelen(str_pool[tpe])<0
+ or (str_start[pop_lit3+1] < tpe+multibytelen(str_pool[tpe])) then
+ break;
+ tpe := tpe + multibytelen(str_pool[tpe]);
+ if tpe<=sp_ptr then
+ tps := tpe;
+ if sp_end<=tpe then break;
end;
-if tps<>sp_ptr then begin
- if (is_internalUPTEX) then begin
- if tps>str_start[pop_lit3]
- then while (multibytelen(str_pool[sp_ptr])<0) do decr(sp_ptr)
- else while (multibytelen(str_pool[sp_ptr])<0) do incr(sp_ptr)
- end else begin
- if tps>str_start[pop_lit3]
- then decr(sp_ptr)
- else incr(sp_ptr)
- end;
-end;
-if tpe<>sp_end then begin
- if (is_internalUPTEX) then begin
- if tpe<str_start[pop_lit3+1]
- then while (multibytelen(str_pool[sp_end])<0) do incr(sp_end)
- else while (multibytelen(str_pool[sp_end])<0) do decr(sp_end)
- end else begin
- if tpe<str_start[pop_lit3+1]
- then incr(sp_end)
- else decr(sp_end)
- end;
-end;
+sp_ptr := tps;
+sp_end := tpe;
@z
@x
@@ -299,16 +282,7 @@
end;
@y
append_char (str_pool[sp_ptr]);
- if multibytelen(str_pool[sp_ptr]) > 1 then
- append_char (str_pool[sp_ptr+1]);
- if multibytelen(str_pool[sp_ptr]) > 2 then
- append_char (str_pool[sp_ptr+2]);
- if multibytelen(str_pool[sp_ptr]) > 3 then
- append_char (str_pool[sp_ptr+3]);
- if multibytelen(str_pool[sp_ptr]) > 0 then
- sp_ptr := sp_ptr + multibytelen(str_pool[sp_ptr])
- else
- incr(sp_ptr);
+ incr(sp_ptr);
@z
@x
More information about the tex-live-commits
mailing list