From 87146237f446ac00c28bc0e09ef702e13a12b31a Mon Sep 17 00:00:00 2001 From: Hironobu Yamashita Date: Sun, 30 Jan 2022 01:51:22 +0000 Subject: ptex: Fix for \chardef 256 and \mathcode 128--255 git-svn-id: svn://tug.org/texlive/trunk@61804 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ptexdir/ChangeLog | 7 +++++++ Build/source/texk/web2c/ptexdir/ptex-base.ch | 8 +++----- Build/source/texk/web2c/uptexdir/ChangeLog | 4 ++++ Build/source/texk/web2c/uptexdir/uptex-m.ch | 16 ++++++---------- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog index 4caf6979306..a74cc8e1597 100644 --- a/Build/source/texk/web2c/ptexdir/ChangeLog +++ b/Build/source/texk/web2c/ptexdir/ChangeLog @@ -1,3 +1,9 @@ +2022-01-29 Hironobu Yamashita + + * ptex-base.ch: Fix \chardef code 256 in math. + Fix \mathcode for 128--255 not working. + https://github.com/texjporg/tex-jp-build/issues/129 + 2022-01-27 Hironori Kitagawa * ptex-base.ch: Fix a mistake and avoid compiler warnings. @@ -12,6 +18,7 @@ * ptex.defines: Add multistrlen{short,filename}, fromBUFFshort. * ptex_version.h: Version p4.0.0. * tests/filename_test.sh, tests/printkanji.tex: Added. + https://github.com/texjporg/tex-jp-build/issues/81 2022-01-10 Karl Berry diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch index a771451154e..d6e205cecb3 100644 --- a/Build/source/texk/web2c/ptexdir/ptex-base.ch +++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch @@ -6060,7 +6060,7 @@ begin KANJI(cx):=0; restart: @; reswitch:case cur_cmd of letter,other_char,char_given: - if (is_char_ascii(cur_chr) or (cur_chr=256)) then begin + if is_char_ascii(cur_chr) then begin c:=ho(math_code(cur_chr)); if c=@'100000 then begin @; @@ -6111,16 +6111,14 @@ mmode+char_num: begin scan_char_num; cur_chr:=cur_val; @y mmode+letter,mmode+other_char,mmode+char_given: if is_char_ascii(cur_chr) then - if cur_chr<128 then set_math_char(ho(math_code(cur_chr))) - else set_math_char(cur_chr) + set_math_char(ho(math_code(cur_chr))) else set_math_kchar(cur_chr); mmode+kanji,mmode+kana,mmode+other_kchar: begin cx:=cur_chr; set_math_kchar(KANJI(cx)); end; mmode+char_num: begin scan_char_num; cur_chr:=cur_val; if is_char_ascii(cur_chr) then - if cur_chr<128 then set_math_char(ho(math_code(cur_chr))) - else set_math_char(cur_chr) + set_math_char(ho(math_code(cur_chr))) else set_math_kchar(cur_chr); end; @z diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog index ec4c711d7e7..e7de0652135 100644 --- a/Build/source/texk/web2c/uptexdir/ChangeLog +++ b/Build/source/texk/web2c/uptexdir/ChangeLog @@ -1,3 +1,7 @@ +2022-01-29 Hironobu Yamashita + + * uptex-m.ch: Adapt to ptex-base.ch fixes. + 2022-01-23 TANAKA Takuji * uptex-m.ch, upbibtex.ch, updvitype.ch, uppltotf.ch, uptftopl.ch, diff --git a/Build/source/texk/web2c/uptexdir/uptex-m.ch b/Build/source/texk/web2c/uptexdir/uptex-m.ch index 1d1a3376a55..c12721adfb7 100644 --- a/Build/source/texk/web2c/uptexdir/uptex-m.ch +++ b/Build/source/texk/web2c/uptexdir/uptex-m.ch @@ -955,10 +955,10 @@ else if cur_cmd=kchar_num then @x letter,other_char,char_given: - if (is_char_ascii(cur_chr) or (cur_chr=256)) then begin + if is_char_ascii(cur_chr) then begin @y letter,other_char,char_given: - if (cur_chr>=0)and(cur_chr<=256) then begin + if check_echar_range(cur_chr) then begin @z @x @@ -982,31 +982,27 @@ kanji,kana,other_kchar,hangul: cx:=cur_chr; @x mmode+letter,mmode+other_char,mmode+char_given: if is_char_ascii(cur_chr) then - if cur_chr<128 then set_math_char(ho(math_code(cur_chr))) - else set_math_char(cur_chr) + set_math_char(ho(math_code(cur_chr))) else set_math_kchar(cur_chr); mmode+kanji,mmode+kana,mmode+other_kchar: begin cx:=cur_chr; set_math_kchar(KANJI(cx)); end; mmode+char_num: begin scan_char_num; cur_chr:=cur_val; if is_char_ascii(cur_chr) then - if cur_chr<128 then set_math_char(ho(math_code(cur_chr))) - else set_math_char(cur_chr) + set_math_char(ho(math_code(cur_chr))) else set_math_kchar(cur_chr); end; @y mmode+letter,mmode+other_char,mmode+char_given: if check_echar_range(cur_chr) then - if cur_chr<128 then set_math_char(ho(math_code(cur_chr))) - else set_math_char(cur_chr) + set_math_char(ho(math_code(cur_chr))) else set_math_kchar(cur_chr); mmode+kanji,mmode+kana,mmode+other_kchar,mmode+hangul: begin cx:=cur_chr; set_math_kchar(KANJI(cx)); end; mmode+char_num: begin scan_char_num; cur_chr:=cur_val; if check_echar_range(cur_chr) then - if cur_chr<128 then set_math_char(ho(math_code(cur_chr))) - else set_math_char(cur_chr) + set_math_char(ho(math_code(cur_chr))) else set_math_kchar(cur_chr); end; mmode+kchar_given: -- cgit v1.2.3