texlive[46452] Build/source/texk/web2c: ptexdir, uptexdir: introduce

commits+hironobu at tug.org commits+hironobu at tug.org
Sat Jan 27 03:23:15 CET 2018


Revision: 46452
          http://tug.org/svn/texlive?view=revision&revision=46452
Author:   hironobu
Date:     2018-01-27 03:23:14 +0100 (Sat, 27 Jan 2018)
Log Message:
-----------
ptexdir, uptexdir: introduce a new JFM spec

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/Makefile.in
    trunk/Build/source/texk/web2c/ptexdir/ChangeLog
    trunk/Build/source/texk/web2c/ptexdir/pdvitype.ch
    trunk/Build/source/texk/web2c/ptexdir/ppltotf.ch
    trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
    trunk/Build/source/texk/web2c/ptexdir/ptftopl.ch
    trunk/Build/source/texk/web2c/uptexdir/ChangeLog
    trunk/Build/source/texk/web2c/uptexdir/am/uptex.am
    trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch
    trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch
    trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch

Added Paths:
-----------
    trunk/Build/source/texk/web2c/uptexdir/newjfm.test
    trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.pl
    trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.tfm

Modified: trunk/Build/source/texk/web2c/Makefile.in
===================================================================
--- trunk/Build/source/texk/web2c/Makefile.in	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/Makefile.in	2018-01-27 02:23:14 UTC (rev 46452)
@@ -2402,6 +2402,7 @@
 	uptexdir/ChangeLog $(uptex_tests) $(upweb_tests) \
 	uptexdir/tests/umin10.pl uptexdir/tests/umin10.tfm \
 	uptexdir/tests/utmin10.pl uptexdir/tests/utmin10.tfm \
+	uptexdir/tests/testnewu.pl uptexdir/tests/testnewu.tfm \
 	uptexdir/uptrip/uptrip.diffs uptexdir/uptrip/texmf.cnf \
 	$(euptex_web_srcs) $(euptex_ch_srcs) euptexdir/euptex.defines \
 	euptexdir/COPYRIGHT euptexdir/COPYRIGHT.jis \
@@ -2692,13 +2693,13 @@
 	$(upweb_programs:=.web) uptests/xexampl.aux \
 	uptests/xexampl.bbl uptests/xexampl.blg uptests/xstory.dvityp \
 	uptests/xpagenum.typ uptests/xcmr10.tfm uptests/xcmr10.pl \
-	uptests/x*min10.* uptrip.diffs $(nodist_euptex_SOURCES) \
-	euptex.web euptex.ch euptex-web2c euptex.p euptex.pool \
-	euptex-tangle euptrip.diffs pdfprimitive-euptex.* \
-	$(nodist_pdftex_SOURCES) pdftex.ch pdftex-web2c pdftex.p \
-	pdftex.pool pdftex-tangle pwprob.log pwprob.tex pdfimage.fmt \
-	pdfimage.log pdfimage.pdf postV3.afm postV7.afm test-13.pdf \
-	test-13.xref test-15.pdf test-15.xref \
+	uptests/x*min10.* uptests/xtestnewu.* uptrip.diffs \
+	$(nodist_euptex_SOURCES) euptex.web euptex.ch euptex-web2c \
+	euptex.p euptex.pool euptex-tangle euptrip.diffs \
+	pdfprimitive-euptex.* $(nodist_pdftex_SOURCES) pdftex.ch \
+	pdftex-web2c pdftex.p pdftex.pool pdftex-tangle pwprob.log \
+	pwprob.tex pdfimage.fmt pdfimage.log pdfimage.pdf postV3.afm \
+	postV7.afm test-13.pdf test-13.xref test-15.pdf test-15.xref \
 	$(nodist_libluatex_sources) luaimage.* luajitimage.* \
 	$(nodist_xetex_SOURCES) xetex.web xetex.ch xetex-web2c xetex.p \
 	xetex.pool xetex-tangle bug73.fmt bug73.log bug73.out \
@@ -3248,7 +3249,8 @@
 	uptexdir/updvitype.test \
 	uptexdir/uppltotf.test \
 	uptexdir/uptftopl.test \
-	uptexdir/yokotate.test
+	uptexdir/yokotate.test \
+	uptexdir/newjfm.test
 
 euptex_CPPFLAGS = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) \
 	-I$(srcdir)/libmd5 $(am__append_139)
@@ -17551,6 +17553,7 @@
 uptexdir/uppltotf.log: uppltotf$(EXEEXT)
 uptexdir/uptftopl.log: uptftopl$(EXEEXT)
 uptexdir/yokotate.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
+uptexdir/newjfm.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
 uptrip.diffs: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
 	$(triptrap_diffs) $@
 .PHONY: uptrip-clean

Modified: trunk/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ChangeLog	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog	2018-01-27 02:23:14 UTC (rev 46452)
@@ -1,3 +1,10 @@
+2018-01-27  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
+
+	* ppltotf.ch, ptftopl.ch: Introduce a new JFM spec, to allow
+	3-byte characters in TYPE > 0 for upTeX. The new spec is
+	effectively upper compatible with the original one.
+	* ptex-base.ch, pdvitype.ch: Adapt to the new JFM spec.
+
 2018-01-21  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
 
 	* ptex-base.ch: New primitives: \ptexversion, \ptexminorversion

Modified: trunk/Build/source/texk/web2c/ptexdir/pdvitype.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/pdvitype.ch	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/ptexdir/pdvitype.ch	2018-01-27 02:23:14 UTC (rev 46452)
@@ -133,8 +133,8 @@
 for k:=1 to nt do
   begin
     read_tfm_word;
-    jfm_char_code[jfm_char_type_count]:=b0*256+b1;
-    jfm_char_type[jfm_char_type_count]:=b2*256+b3;
+    jfm_char_code[jfm_char_type_count]:=b0*256+b1+b2*65536;
+    jfm_char_type[jfm_char_type_count]:=b3;
     jfm_char_font[jfm_char_type_count]:=nf;
     jfm_h:= { hash value }
       (jfm_char_code[jfm_char_type_count]+nf) mod jfm_hash_size;

Modified: trunk/Build/source/texk/web2c/ptexdir/ppltotf.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ppltotf.ch	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/ptexdir/ppltotf.ch	2018-01-27 02:23:14 UTC (rev 46452)
@@ -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'
- at d banner=='This is pPLtoTF, Version 3.6-p1.8'
+ at d banner=='This is pPLtoTF, Version 3.6-p2.0'
   {printed when the program starts}
 @z
 
@@ -230,6 +231,13 @@
     memory[italic]+nl+lk_offset+nk+ne+np;
 @z
 
+ at x [131] pTeX:
+@ @d out_size(#)==out((#) div 256); out((#) mod 256)
+ at y
+@ @d out_size(#)==out((#) div 256); out((#) mod 256)
+ at d out_kanji_code(#)==out_size((#) mod 65536); out((#) div 65536)
+ at 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 @@
 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 @@
 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;

Modified: trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch	2018-01-27 02:23:14 UTC (rev 46452)
@@ -2720,6 +2720,22 @@
 @!cx:KANJI_code; {kanji code}
 @z
 
+ at x
+ at d read_sixteen(#)==begin #:=fbyte;
+  if #>127 then abort;
+  fget; #:=#*@'400+fbyte;
+  end
+ at y
+ at d read_sixteen(#)==begin #:=fbyte;
+  if #>127 then abort;
+  fget; #:=#*@'400+fbyte;
+  end
+ at d read_twentyfourx(#)==begin #:=fbyte;
+  fget; #:=#*@"100+fbyte;
+  fget; #:=#+fbyte*@"10000;
+  end
+ at z
+
 @x [30.565] l.11548 - pTeX: read tfm size
 @ @<Read the {\.{TFM}} size fields@>=
 begin read_sixteen(lf);
@@ -2830,8 +2846,8 @@
 if jfm_flag<>dir_default then
   for k:=ctype_base[f] to ctype_base[f]+nt-1 do
     begin
-    fget; read_sixteen(cx); font_info[k].hh.rh:=tokanji(cx); {|kchar_code|}
-    fget; read_sixteen(cx); font_info[k].hh.lhfield:=tonum(cx); {|kchar_type|}
+    fget; read_twentyfourx(cx); font_info[k].hh.rh:=tokanji(cx); {|kchar_code|}
+    fget; cx:=fbyte; font_info[k].hh.lhfield:=tonum(cx); {|kchar_type|}
     end;
 for k:=char_base[f]+bc to width_base[f]-1 do
   begin store_four_quarters(font_info[k].qqqq);

Modified: trunk/Build/source/texk/web2c/ptexdir/ptftopl.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptftopl.ch	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/ptexdir/ptftopl.ch	2018-01-27 02:23:14 UTC (rev 46452)
@@ -1,5 +1,6 @@
 % This is a change file for TFtoPL
 %
+% (2018-01-27) HY pTFtoPL p2.0 - new JFM spec by texjporg
 % (07/18/2006) ST TFtoPL p1.7 (3.1, Web2c 7.2)
 % (03/27/1998) KN TFtoPL p1.4 (3.1, Web2c 7.2)
 %
@@ -14,7 +15,7 @@
 @d banner=='This is TFtoPL, Version 3.3' {printed when the program starts}
 @y
 @d my_name=='ptftopl'
- at d banner=='This is pTFtoPL, Version 3.3-p1.7'
+ at d banner=='This is pTFtoPL, Version 3.3-p2.0'
   {printed when the program starts}
 @z
 
@@ -437,11 +438,12 @@
   end;
 end
 
-@ list the |char_type| table in a similar way to the type table
+@ list the |char_type| table in a similar way to the type table.
+The code is based on the new JFM spec by texjporg.
 
 @d char_type(#)==4*(type_base+#) {here \#\ is an index, not a character}
- at d JIS_code(#)==tfm[char_type(#)+0]*@'400+tfm[char_type(#)+1] {JIS code from |char_type| table}
- at d JIS_type(#)==tfm[char_type(#)+2]*@'400+tfm[char_type(#)+3] {JIS type from |char_type| table}
+ at d JIS_code(#)==tfm[char_type(#)+0]*@'400+tfm[char_type(#)+1]+tfm[char_type(#)+2]*@'400*@'400 {JIS code from |char_type| table}
+ at d JIS_type(#)==tfm[char_type(#)+3] {JIS type from |char_type| table}
 
 @<list |char_type| table@>=
 this_code:=JIS_code(0);
@@ -475,7 +477,7 @@
       incr(type_count);
       out_kanji(index_to_jis(kanji_index));
       end;
-  if type_count=0 then bad('type ', type_num:1, 'has no characters in it!');
+  if type_count=0 then bad('type ', type_num:1, ' has no characters in it!');
   out_ln; right;
   end;
 
@@ -491,7 +493,7 @@
 @ @<declare kanji conversion functions@>=
 procedure out_kanji(jis_code:integer); { prints a kanji character }
 var @!cx:integer; {KANJI code}
-i:0..4; {index of array}
+i:0..3; {index of array}
 begin@/
 if charcode_format=charcode_octal then
   begin cx:=jis_code; out('J '); {specify jiscode format}

Modified: trunk/Build/source/texk/web2c/uptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/ChangeLog	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/uptexdir/ChangeLog	2018-01-27 02:23:14 UTC (rev 46452)
@@ -1,3 +1,7 @@
+2018-01-27  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
+
+	* uppltotf.ch, uptftopl.ch, uptex-m.ch: Adapt to the new JFM spec.
+
 2018-01-21  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
 
 	* yokotate.test, tests/{,u}[,t]min10.[pl,tfm], am/uptex.am:

Modified: trunk/Build/source/texk/web2c/uptexdir/am/uptex.am
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/am/uptex.am	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/uptexdir/am/uptex.am	2018-01-27 02:23:14 UTC (rev 46452)
@@ -163,12 +163,14 @@
 	uptexdir/updvitype.test \
 	uptexdir/uppltotf.test \
 	uptexdir/uptftopl.test \
-	uptexdir/yokotate.test
+	uptexdir/yokotate.test \
+	uptexdir/newjfm.test
 uptexdir/upbibtex.log: upbibtex$(EXEEXT)
 uptexdir/updvitype.log: updvitype$(EXEEXT)
 uptexdir/uppltotf.log: uppltotf$(EXEEXT)
 uptexdir/uptftopl.log: uptftopl$(EXEEXT)
 uptexdir/yokotate.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
+uptexdir/newjfm.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
 
 EXTRA_DIST += $(uptex_tests) $(upweb_tests)
 DISTCLEANFILES += $(upweb_programs:=.c) $(upweb_programs:=.h) \
@@ -196,7 +198,8 @@
 ## uptexdir/yokotate.test
 EXTRA_DIST += uptexdir/tests/umin10.pl uptexdir/tests/umin10.tfm
 EXTRA_DIST += uptexdir/tests/utmin10.pl uptexdir/tests/utmin10.tfm
-DISTCLEANFILES += uptests/x*min10.*
+EXTRA_DIST += uptexdir/tests/testnewu.pl uptexdir/tests/testnewu.tfm
+DISTCLEANFILES += uptests/x*min10.* uptests/xtestnewu.*
 ## uptexdir/uptriptest
 EXTRA_DIST += uptexdir/uptrip/uptrip.diffs uptexdir/uptrip/texmf.cnf
 uptrip.diffs: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)

Added: trunk/Build/source/texk/web2c/uptexdir/newjfm.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/newjfm.test	                        (rev 0)
+++ trunk/Build/source/texk/web2c/uptexdir/newjfm.test	2018-01-27 02:23:14 UTC (rev 46452)
@@ -0,0 +1,22 @@
+#! /bin/sh -vx
+# $Id: newjfm.test 46400 2018-01-21 05:26:27Z hironobu $
+# Copyright 2018 Karl Berry <tex-live at tug.org>
+# You may freely use, modify and/or distribute this file.
+
+test -d uptests || mkdir -p uptests
+
+# Test inputs
+testdir=$srcdir/uptexdir/tests
+
+# Testing upPLtoTF/upTFtoPL for new JFM spec by texjporg.
+for font in testnewu; do
+
+  ./uppltotf -verbose $testdir/$font.pl uptests/x$font.tfm && \
+    cmp $testdir/$font.tfm uptests/x$font.tfm && echo || exit 1
+
+  TEXMFCNF=$srcdir/../kpathsea \
+    ./uptftopl -charcode-format octal -verbose $testdir/$font.tfm uptests/x$font.pl && \
+    diff $testdir/$font.pl uptests/x$font.pl && echo || exit 1
+
+done
+


Property changes on: trunk/Build/source/texk/web2c/uptexdir/newjfm.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.pl
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.pl	                        (rev 0)
+++ trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.pl	2018-01-27 02:23:14 UTC (rev 46452)
@@ -0,0 +1,130 @@
+(COMMENT THIS IS A KANJI FORMAT FILE)
+(FAMILY UPJIS KANJI)
+(FACE F MRR)
+(CODINGSCHEME TEX KANJI TEXT)
+(DESIGNSIZE R 10.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM O 0)
+(FONTDIMEN
+   (SLANT R 0.0)
+   (SPACE R 0.0)
+   (STRETCH R 0.1)
+   (SHRINK R 0.0)
+   (XHEIGHT R 1.0)
+   (QUAD R 1.0)
+   (EXTRASPACE R 0.25)
+   (EXTRASTRETCH R 0.2)
+   (EXTRASHRINK R 0.125)
+   )
+(GLUEKERN
+   (LABEL O 0)
+   (GLUE O 1 R 0.5 R 0.0 R 0.5)
+   (GLUE O 3 R 0.25 R 0.0 R 0.25)
+   (STOP)
+   (LABEL O 1)
+   (GLUE O 3 R 0.25 R 0.0 R 0.25)
+   (STOP)
+   (LABEL O 2)
+   (GLUE O 0 R 0.5 R 0.0 R 0.5)
+   (GLUE O 1 R 0.5 R 0.0 R 0.5)
+   (GLUE O 3 R 0.25 R 0.0 R 0.25)
+   (GLUE O 5 R 0.5 R 0.0 R 0.5)
+   (STOP)
+   (LABEL O 3)
+   (GLUE O 0 R 0.25 R 0.0 R 0.25)
+   (GLUE O 1 R 0.25 R 0.0 R 0.25)
+   (GLUE O 2 R 0.25 R 0.0 R 0.25)
+   (GLUE O 3 R 0.5 R 0.0 R 0.25)
+   (GLUE O 4 R 0.25 R 0.0 R 0.25)
+   (GLUE O 5 R 0.25 R 0.0 R 0.25)
+   (STOP)
+   (LABEL O 4)
+   (GLUE O 0 R 0.5 R 0.0 R 0.0)
+   (GLUE O 1 R 0.5 R 0.0 R 0.0)
+   (GLUE O 3 R 0.75 R 0.0 R 0.25)
+   (GLUE O 5 R 0.5 R 0.0 R 0.0)
+   (STOP)
+   (LABEL O 5)
+   (GLUE O 1 R 0.5 R 0.0 R 0.5)
+   (GLUE O 3 R 0.25 R 0.0 R 0.25)
+   (KRN O 5 R 0.0)
+   (STOP)
+   )
+(CHARSINTYPE O 1
+   U 81FC U FF08 U 26951
+   )
+(CHARSINTYPE O 2
+   U 5409 U FF09 U 20BB7
+   )
+(CHARSINTYPE O 3
+   U 2462 U FF1A
+   )
+(CHARSINTYPE O 4
+   U 2463 U 3002
+   )
+(CHARSINTYPE O 5
+   U 2026 U 2464
+   )
+(TYPE O 0
+   (CHARWD R 1.0)
+   (CHARHT R 0.88)
+   (CHARDP R 0.12)
+   (COMMENT
+      (GLUE O 1 R 0.5 R 0.0 R 0.5)
+      (GLUE O 3 R 0.25 R 0.0 R 0.25)
+      )
+   )
+(TYPE O 1
+   (CHARWD R 0.5)
+   (CHARHT R 0.88)
+   (CHARDP R 0.12)
+   (COMMENT
+      (GLUE O 3 R 0.25 R 0.0 R 0.25)
+      )
+   )
+(TYPE O 2
+   (CHARWD R 0.5)
+   (CHARHT R 0.88)
+   (CHARDP R 0.12)
+   (COMMENT
+      (GLUE O 0 R 0.5 R 0.0 R 0.5)
+      (GLUE O 1 R 0.5 R 0.0 R 0.5)
+      (GLUE O 3 R 0.25 R 0.0 R 0.25)
+      (GLUE O 5 R 0.5 R 0.0 R 0.5)
+      )
+   )
+(TYPE O 3
+   (CHARWD R 0.5)
+   (CHARHT R 0.88)
+   (CHARDP R 0.12)
+   (COMMENT
+      (GLUE O 0 R 0.25 R 0.0 R 0.25)
+      (GLUE O 1 R 0.25 R 0.0 R 0.25)
+      (GLUE O 2 R 0.25 R 0.0 R 0.25)
+      (GLUE O 3 R 0.5 R 0.0 R 0.25)
+      (GLUE O 4 R 0.25 R 0.0 R 0.25)
+      (GLUE O 5 R 0.25 R 0.0 R 0.25)
+      )
+   )
+(TYPE O 4
+   (CHARWD R 0.5)
+   (CHARHT R 0.88)
+   (CHARDP R 0.12)
+   (COMMENT
+      (GLUE O 0 R 0.5 R 0.0 R 0.0)
+      (GLUE O 1 R 0.5 R 0.0 R 0.0)
+      (GLUE O 3 R 0.75 R 0.0 R 0.25)
+      (GLUE O 5 R 0.5 R 0.0 R 0.0)
+      )
+   )
+(TYPE O 5
+   (CHARWD R 1.0)
+   (CHARHT R 0.88)
+   (CHARDP R 0.12)
+   (COMMENT
+      (GLUE O 1 R 0.5 R 0.0 R 0.5)
+      (GLUE O 3 R 0.25 R 0.0 R 0.25)
+      (KRN O 5 R 0.0)
+      )
+   )


Property changes on: trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.pl
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.tfm
===================================================================
(Binary files differ)

Index: trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.tfm
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.tfm	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.tfm	2018-01-27 02:23:14 UTC (rev 46452)

Property changes on: trunk/Build/source/texk/web2c/uptexdir/tests/testnewu.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch	2018-01-27 02:23:14 UTC (rev 46452)
@@ -1,9 +1,9 @@
 @x
 @d my_name=='ppltotf'
- at d banner=='This is pPLtoTF, Version 3.6-p1.8'
+ at d banner=='This is pPLtoTF, Version 3.6-p2.0'
 @y
 @d my_name=='uppltotf'
- at d banner=='This is upPLtoTF, Version 3.6-p1.8-u1.22'
+ at d banner=='This is upPLtoTF, Version 3.6-p2.0-u1.22'
 @z
 
 @x
@@ -15,7 +15,7 @@
 @x
 max_kanji=7237; { maximam number of 2byte characters }
 @y
-max_kanji=65535; { maximam number of 2byte characters }
+max_kanji=1114111; { maximam number of 2byte characters }
 @z
 
 @x function get_next_raw
@@ -24,6 +24,29 @@
 if multistrlen(ustringcast(buffer),loc+3,loc)>1 then cur_char:=" "
 @z
 
+ at x procedure print_jis_hex
+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;
+for i:=0 to 3 do
+ at y
+var dig:array[0..5] of byte; {holds jis hex codes}
+i:byte; {index of array}
+begin dig[0]:=(jis_code div 65536) div 16; dig[1]:=(jis_code div 65536) mod 16;
+dig[2]:=(jis_code div 4096) mod 16; dig[3]:=(jis_code div 256) mod 16;
+dig[4]:=(jis_code div 16) mod 16; dig[5]:=jis_code mod 16;
+for i:=0 to 1 do
+  if (dig[i]<>0)or(dig[0]<>0) then begin { if dig[0]<>0, dig[1] should be always printed }
+    if dig[i]<10 then print(dig[i]) else
+    case dig[i] of
+       10: print('A'); 11: print('B'); 12: print('C');
+       13: print('D'); 14: print('E'); 15: print('F');
+    end;
+  end;
+for i:=2 to 5 do
+ at z
+
 @x function valid_jis_code
 var @!first_byte,@!second_byte:integer; { jis code bytes }
 begin valid_jis_code:=true;
@@ -34,7 +57,7 @@
 if (second_byte<@"21)or(second_byte>@"7E) then valid_jis_code:=false;
 @y
 begin valid_jis_code:=true;
-if (cx>@"FFFF)or(not is_char_kanji(fromDVI(cx)))
+if (cx>@"10FFFF)or(not is_char_kanji(fromDVI(cx)))
   or(toDVI(fromDVI(cx))<>cx) then valid_jis_code:=false;
 @z
 
@@ -73,6 +96,20 @@
   incr(loc); ch:=xord[buffer[loc]]; cx:=cx+todig(ch)*@"100;
   incr(loc); ch:=xord[buffer[loc]]; cx:=cx+todig(ch)*@"10;
   incr(loc); ch:=xord[buffer[loc]]; cx:=cx+todig(ch);
+  { Uxxxx done, following code supports Uxxxxx and Uxxxxxx }
+  incr(loc); ch:=xord[buffer[loc]];
+  if (ch<>' ') then begin {5th digit found, proceed}
+    cx:=cx*@"10+todig(ch);
+    incr(loc); ch:=xord[buffer[loc]];
+    if (ch<>' ') then {6th digit found, proceed}
+      cx:=cx*@"10+todig(ch)
+    else begin {6th digit not found, recover}
+      decr(loc); ch:=xord[buffer[loc]];
+      end
+    end
+  else begin {5th digit not found, recover}
+    decr(loc); ch:=xord[buffer[loc]];
+    end;
   jis_code:=toDVI(fromUCS(cx));
   cur_char:=ch;
   if not valid_jis_code(jis_code) then

Modified: trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch	2018-01-27 02:23:14 UTC (rev 46452)
@@ -148,16 +148,6 @@
 @z
 
 @x
- at d xspace_ptr(#) == info(#+space_offset)
- at y
- at d xspace_ptr(#) == info(#+space_offset)
- at d read_sixteenx(#)==begin #:=fbyte;
-  if #>255 then abort;
-  fget; #:=#*@'400+fbyte;
-  end
- at z
-
- at x
 @d kanji=16 {kanji}
 @d kana=17 {hiragana, katakana, alphabet}
 @d other_kchar=18 {kanji codes}
@@ -731,12 +721,6 @@
 @z
 
 @x
-    fget; read_sixteen(cx); font_info[k].hh.rh:=tokanji(cx); {|kchar_code|}
- at y
-    fget; read_sixteenx(cx); font_info[k].hh.rh:=tokanji(cx); {|kchar_code|}
- at z
-
- at x
 @d set2=129 {typeset a character and move right}
 @y
 @d set2=129 {typeset a character and move right}

Modified: trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch	2018-01-27 01:23:13 UTC (rev 46451)
+++ trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch	2018-01-27 02:23:14 UTC (rev 46452)
@@ -1,9 +1,9 @@
 @x
 @d my_name=='ptftopl'
- at d banner=='This is pTFtoPL, Version 3.3-p1.7'
+ at d banner=='This is pTFtoPL, Version 3.3-p2.0'
 @y
 @d my_name=='uptftopl'
- at d banner=='This is upTFtoPL, Version 3.3-p1.7-u1.22'
+ at d banner=='This is upTFtoPL, Version 3.3-p2.0-u1.22'
 @z
 
 @x
@@ -15,15 +15,35 @@
 @x
 @d max_kanji=7237 {number of the kanji characters - 1}
 @y
- at d max_kanji=65535 {number of the kanji characters - 1}
+ at d max_kanji=1114111 {number of the kanji characters - 1}
 @z
 
 @x procedure out_kanji
+i:0..3; {index of array}
+ at y
+i:0..5; {index of array}
+ at z
+ at x
   begin cx:=jis_code; out('J '); {specify jiscode format}
+  dig[0]:=Hi(cx) div 16; dig[1]:=Hi(cx) mod 16;
+  dig[2]:=Lo(cx) div 16; dig[3]:=Lo(cx) mod 16;
+  for i:=0 to 3 do
 @y
   begin cx:=jis_code;
   if (isinternalUPTEX) then out('U ')
   else out('J '); {specify jiscode format}
+  dig[0]:=(cx div 65536) div 16; dig[1]:=(cx div 65536) mod 16;
+  dig[2]:=(cx div 4096) mod 16; dig[3]:=(cx div 256) mod 16;
+  dig[4]:=(cx div 16) mod 16; dig[5]:=cx mod 16;
+  for i:=0 to 1 do
+    if (dig[i]<>0)or(dig[0]<>0) then begin { if dig[0]<>0, dig[1] should be always printed }
+      if dig[i]<10 then out(dig[i]) else
+      case dig[i] of
+         10: out('A'); 11: out('B'); 12: out('C');
+         13: out('D'); 14: out('E'); 15: out('F');
+      end;
+    end;
+  for i:=2 to 5 do
 @z
 
 @x
@@ -45,7 +65,7 @@
 if (second_byte<@"21)or(second_byte>@"7E) then valid_jis_code:=false;
 @y
 begin valid_jis_code:=true;
-if (cx>@"FFFF)or(not is_char_kanji(fromDVI(cx)))
+if (cx>@"10FFFF)or(not is_char_kanji(fromDVI(cx)))
   or(toDVI(fromDVI(cx))<>cx) then valid_jis_code:=false;
 @z
 



More information about the tex-live-commits mailing list