diff options
author | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2018-01-27 02:23:14 +0000 |
---|---|---|
committer | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2018-01-27 02:23:14 +0000 |
commit | 5818288af5e420fda055a4d53fb22333a66cd7ad (patch) | |
tree | 7d3eef35c0853a1c06d4dda762ec17e63c24f81a /Build/source/texk/web2c/ptexdir/ppltotf.ch | |
parent | 377d5b6a96e2b1ad97c691da9c9e3f187e51364a (diff) |
ptexdir, uptexdir: introduce a new JFM spec
git-svn-id: svn://tug.org/texlive/trunk@46452 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/ptexdir/ppltotf.ch')
-rw-r--r-- | Build/source/texk/web2c/ptexdir/ppltotf.ch | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ppltotf.ch b/Build/source/texk/web2c/ptexdir/ppltotf.ch index a3bb0e3c48d..cb2d61ac258 100644 --- a/Build/source/texk/web2c/ptexdir/ppltotf.ch +++ b/Build/source/texk/web2c/ptexdir/ppltotf.ch @@ -1,5 +1,6 @@ % This is a change file for PLtoTF % +% (2018-01-27) HY pPLtoTF p2.0 - new JFM spec by texjporg % (07/18/2006) ST PLtoTF p1.8 (3.5, Web2c 7.2) % (11/13/2000) KN PLtoTF p1.4 (3.5, Web2c 7.2) % (03/27/1998) KN PLtoTF p1.3 (3.5, Web2c 7.2) @@ -15,7 +16,7 @@ @d banner=='This is PLtoTF, Version 3.6' {printed when the program starts} @y @d my_name=='ppltotf' -@d banner=='This is pPLtoTF, Version 3.6-p1.8' +@d banner=='This is pPLtoTF, Version 3.6-p2.0' {printed when the program starts} @z @@ -230,6 +231,13 @@ else memory[italic]+nl+lk_offset+nk+ne+np; @z +@x [131] pTeX: +@ @d out_size(#)==out((#) div 256); out((#) mod 256) +@y +@ @d out_size(#)==out((#) div 256); out((#) mod 256) +@d out_kanji_code(#)==out_size((#) mod 65536); out((#) div 65536) +@z + @x [131] l.2256 - pTeX: out_size(lf); out_size(lh); out_size(bc); out_size(ec); out_size(memory[width]); out_size(memory[height]); @@ -572,13 +580,23 @@ skip_to_paren; end @ Next codes used to write |kanji_type| to \.{JFM}. +In the original JFM spec by ASCII Corporation, |jis_code| and |char_type| +were packed into upper (2~bytes) and lower (2~bytes) halfword respectively. +However, |char_type| is allowed only 0..255, +so the upper byte of lower halfword was always 0. + +In the new JFM spec by texjporg, |jis_code| ``XXyyzz'' is packed into +first 3~bytes in the form ``yy zz XX'', and |char_type| is packed into +remaining 1~byte. The new spec is effectively upper compatible with +the original, and it allows |jis_code| larger than 0x10000 (not really +useful for me \.{pPLtoTF} but necessary for \.{upPLtoTF}). @<Output the kanji character type info@>= begin out_size(0); out_size(0); { the default } for kanji_type_index:=0 to max_kanji do begin if kanji_type[kanji_type_index]>0 then - begin out_size(index_to_jis(kanji_type_index)); - out_size(kanji_type[kanji_type_index]); + begin out_kanji_code(index_to_jis(kanji_type_index)); + out(kanji_type[kanji_type_index]); if verbose then begin print('char index = ', kanji_type_index); print(' (jis '); @@ -616,7 +634,7 @@ else begin skip_error('This expression is out of JIS-code encoding.'); end; @# procedure print_jis_hex(jis_code:integer); {prints jiscode as four digits} -var dig:array[0..4] of byte; {holds jis hex codes} +var dig:array[0..3] of byte; {holds jis hex codes} i:byte; {index of array} begin dig[0]:=Hi(jis_code) div 16; dig[1]:=Hi(jis_code) mod 16; dig[2]:=Lo(jis_code) div 16; dig[3]:=Lo(jis_code) mod 16; |