5858% pTeX p3.7.1 .
5959% (2017 -09 -07 ) HK pTeX p3.7.2 More restrictions on direction change commands.
6060% (2018 -01 -21 ) HK Added \ptexversion primitive and co. pTeX p3.8 .
61+ % (2018 -04 -14 ) HK pTeX p3.8.1 Bug fix for discontinuous KINSOKU table.
6162%
6263
6364@ x
7374@ y
7475@ d pTeX_version=3
7576@ d pTeX_minor_version=8
76- @ d pTeX_revision== ".0 "
77- @ d pTeX_version_string== '-p3.8.0 ' {current \pTeX\ version}
77+ @ d pTeX_revision== ".1 "
78+ @ d pTeX_version_string== '-p3.8.1 ' {current \pTeX\ version}
7879@ #
7980@ d pTeX_banner== 'This is pTeX, Version 3.14159265 ',pTeX_version_string
8081@ d pTeX_banner_k== pTeX_banner
@@ -6397,6 +6398,8 @@ inserting a space between 2byte-char and 1byte-char.
63976398@d inhibit_both=0 {disable to insert space before 2byte-char and after it}
63986399@d inhibit_previous=1 {disable to insert space before 2byte-char}
63996400@d inhibit_after=2 {disable to insert space after 2byte-char}
6401+ @d inhibit_none=3 {enable to insert space before/after 2byte-char}
6402+ @d inhibit_unused=4 {unused entry}
64006403@d no_entry=1000
64016404@d new_pos=0
64026405@d cur_pos=1
@@ -6427,14 +6430,15 @@ var p,s:pointer;
64276430begin s:=calc_pos(c); p:=s;
64286431if n=new_pos then
64296432 begin repeat
6430- if (inhibit_xsp_code(p)=0)or(inhibit_xsp_code(p)=c) then goto done;
6433+ if (inhibit_xsp_type(p)=inhibit_unused)or(inhibit_xsp_code(p)=0)
6434+ or(inhibit_xsp_code(p)=c) then goto done;
64316435 incr(p); if p>255 then p:=0;
64326436 until s=p; p:=no_entry;
64336437 end
64346438else
64356439 begin repeat
6436- if inhibit_xsp_code(p)=0 then goto done1;
6437- if inhibit_xsp_code(p)=c then goto done;
6440+ if inhibit_xsp_code(p)=0 then goto done1
6441+ else if (inhibit_xsp_type(p)<>inhibit_unused)and( inhibit_xsp_code(p)=c) then goto done;
64386442 incr(p); if p>255 then p:=0;
64396443 until s=p;
64406444done1: p:=no_entry;
@@ -6447,9 +6451,10 @@ assign_inhibit_xsp_code:
64476451begin p:=cur_chr; scan_int; n:=cur_val; scan_optional_equals; scan_int;
64486452if is_char_kanji(n) then
64496453 begin j:=get_inhibit_pos(tokanji(n),new_pos);
6450- if (j<>no_entry)and(cur_val>inhibit_after)and(global or cur_level=level_one) then
6451- begin n:=0; cur_val:=0 end
6452- { remove the entry from inhibit table }
6454+ if (j<>no_entry)and(cur_val>inhibit_after) then
6455+ begin if global or(cur_level=level_one) then cur_val:=inhibit_unused
6456+ { remove the entry from inhibit table }
6457+ else cur_val:=inhibit_none; end
64536458 else if j=no_entry then
64546459 begin print_err(" Inhibit table is full!! ");
64556460 help1(" I'm skipping this control sequences.");@/
@@ -6466,7 +6471,7 @@ end;
64666471
64676472@ @<Fetch inhibit type from some table@>=
64686473begin scan_int; q:=get_inhibit_pos(tokanji(cur_val),cur_pos);
6469- cur_val_level:=int_val; cur_val:=3 ;
6474+ cur_val_level:=int_val; cur_val:=inhibit_none ;
64706475if q<>no_entry then cur_val:=inhibit_xsp_type(q);
64716476end
64726477
@@ -6476,6 +6481,7 @@ The \.{\\postbreakpenalty} is inserted after the 2byte-char.
64766481
64776482@d pre_break_penalty_code=1
64786483@d post_break_penalty_code=2
6484+ @d kinsoku_unused_code=3
64796485
64806486@<Put each...@>=
64816487primitive(" prebreakpenalty",assign_kinsoku,pre_break_penalty_code);
@@ -6502,15 +6508,16 @@ if p+kinsoku_base<0 then
65026508gubed
65036509if n=new_pos then
65046510 begin repeat
6505- if (kinsoku_type(p)=0)or(kinsoku_code(p)=c) then goto done;
6511+ if (kinsoku_type(p)=0)or(kinsoku_type(p)=kinsoku_unused_code)
6512+ or(kinsoku_code(p)=c) then goto done;
65066513 incr(p); if p>255 then p:=0;
65076514 until s=p;
65086515 p:=no_entry;
65096516 end
65106517else
65116518 begin repeat
6512- if kinsoku_type(p)=0 then goto done1;
6513- if kinsoku_code(p)=c then goto done;
6519+ if kinsoku_type(p)=0 then goto done1
6520+ else if (kinsoku_type(p)<>kinsoku_unused_code)and( kinsoku_code(p)=c) then goto done;
65146521 incr(p); if p>255 then p:=0;
65156522 until s=p;
65166523done1: p:=no_entry;
@@ -6523,8 +6530,8 @@ assign_kinsoku:
65236530begin p:=cur_chr; scan_int; n:=cur_val; scan_optional_equals; scan_int;
65246531if is_char_ascii(n) or is_char_kanji(n) then
65256532 begin j:=get_kinsoku_pos(tokanji(n),new_pos);
6526- if (j<>no_entry)and(cur_val=0)and(global or cur_level=level_one) then
6527- define(kinsoku_base+j,0 ,0) { remove the entry from KINSOKU table }
6533+ if (j<>no_entry)and(cur_val=0)and(global or( cur_level=level_one) ) then
6534+ define(kinsoku_base+j,kinsoku_unused_code ,0) { remove the entry from KINSOKU table }
65286535 else begin
65296536 if j=no_entry then begin
65306537 print_err(" KINSOKU table is full!! ");
0 commit comments