summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/uptexdir/ptex-base.ch
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/uptexdir/ptex-base.ch')
-rw-r--r--Build/source/texk/web2c/uptexdir/ptex-base.ch17
1 files changed, 9 insertions, 8 deletions
diff --git a/Build/source/texk/web2c/uptexdir/ptex-base.ch b/Build/source/texk/web2c/uptexdir/ptex-base.ch
index 3ed7b821e7b..6b77387d58e 100644
--- a/Build/source/texk/web2c/uptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/uptexdir/ptex-base.ch
@@ -2582,14 +2582,15 @@ if cur_tok<cs_token_flag then
end
else if cur_tok<cs_token_flag+single_base then
cur_val:=cur_tok-cs_token_flag-active_base
-else
- { the token is a CS;
- * if |kanji|<=|cur_cmd|<=|max_char_code|, then CS is let-equal to |wchar_token|
- * if |max_char_code|<|cur_cmd|, then CS is a multibyte CS
- => both case should raise "Improper ..." error
- * otherwise it should be a single-character CS with |cur_val|<=255 }
- begin if not (cur_cmd<kanji) then cur_cmd:=invalid_char;
- cur_val:=cur_tok-cs_token_flag-single_base;
+else if cur_tok<cs_token_flag+null_cs then
+ cur_val:=cur_tok-cs_token_flag-single_base
+else { check the cs is a single Japanese character }
+ begin m:=text(cur_tok-cs_token_flag);
+ if str_start[m+1]-str_start[m]
+ = multistrlenshort(str_pool, str_start[m+1], str_start[m])
+ then
+ cur_val:=fromBUFFshort(str_pool, str_start[m+1], str_start[m])
+ else begin cur_cmd:=invalid_char; cur_val:=256; end;
end;
if (cur_val>255)and(cur_cmd<kanji) then
begin print_err("Improper alphabetic or KANJI constant");