[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian packaging of texlive-bin) branch, master, updated. debian/2013.20130521.30601-1-9-g55ee776



The following commit has been merged in the master branch:
commit 55ee7763c0ad19168290d2242de7555baeed4822
Author: Norbert Preining <preining@debian.org>
Date:   Wed May 22 10:09:00 2013 +0900

    reinclude pmpost, prepare for release

diff --git a/debian/changelog b/debian/changelog
index 06cd501..6ee4a79 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,13 @@
-texlive-bin (2013.20130522.30620-1) UNRELEASED; urgency=low
+texlive-bin (2013.20130522.30620-1) unstable; urgency=low
 
   * remove libgd and t1lib copies by removing the need to configure
     these libraries at all (Closes: #709145, #709146)
     Thanks Ondřej Surý <ondrej@debian.org> for providing the patch.
   * build with system zzlib and ice, remove embedded copies
   * remove copies of cairo, pixman which are already unused
+  * re-include pmpost building, thanks to Hironori Kitagawa
 
- -- Norbert Preining <preining@debian.org>  Wed, 22 May 2013 09:50:33 +0900
+ -- Norbert Preining <preining@debian.org>  Wed, 22 May 2013 10:07:27 +0900
 
 texlive-bin (2013.20130521.30601-1) unstable; urgency=low
 
diff --git a/debian/patches/pmpost1801-2010509 b/debian/patches/pmpost-20130522
similarity index 77%
copy from debian/patches/pmpost1801-2010509
copy to debian/patches/pmpost-20130522
index cdb76b5..dd6cbe6 100644
--- a/debian/patches/pmpost1801-2010509
+++ b/debian/patches/pmpost-20130522
@@ -1,25 +1,291 @@
 ---
- texk/web2c/pmplibdir/jfm.ch          |  110 +++++++
- texk/web2c/pmplibdir/jmp.ch          |  340 ++++++++++++++++++++++++
- texk/web2c/pmplibdir/jmppsw.ch       |   74 +++++
- texk/web2c/pmplibdir/mp.ch           |   20 +
- texk/web2c/pmplibdir/mpmathdouble.ch |   76 +++++
- texk/web2c/pmplibdir/mpost.ch        |  310 +++++++++++++++++++++
- texk/web2c/pmplibdir/mpxout.ch       |    8 
- texk/web2c/pmplibdir/pdvitomp.ch     |  494 +++++++++++++++++++++++++++++++++++
- texk/web2c/pmplibdir/psout.ch        |   42 ++
- texk/web2c/pmplibdir/svgout.ch       |   60 ++++
- 10 files changed, 1534 insertions(+)
+ texk/kpathsea/texmf.cnf              |    1 
+ texk/web2c/Makefile.am               |    3 
+ texk/web2c/ac/web2c.ac               |    1 
+ texk/web2c/pmpostdir/Makefile        |  107 +++++++
+ texk/web2c/pmpostdir/am/pmpost.am    |  118 ++++++++
+ texk/web2c/pmpostdir/jfm.ch          |  104 +++++++
+ texk/web2c/pmpostdir/jmp.ch          |  340 ++++++++++++++++++++++++
+ texk/web2c/pmpostdir/jmppsw.ch       |   74 +++++
+ texk/web2c/pmpostdir/mp.ch           |   20 +
+ texk/web2c/pmpostdir/mpmathdouble.ch |   76 +++++
+ texk/web2c/pmpostdir/mpost.ch        |  298 +++++++++++++++++++++
+ texk/web2c/pmpostdir/mpxout.ch       |    8 
+ texk/web2c/pmpostdir/pdvitomp.ch     |  492 +++++++++++++++++++++++++++++++++++
+ texk/web2c/pmpostdir/psout.ch        |   42 ++
+ texk/web2c/pmpostdir/svgout.ch       |   59 ++++
+ 15 files changed, 1743 insertions(+)
 
+--- texlive-bin.git.orig/texk/kpathsea/texmf.cnf
++++ texlive-bin.git/texk/kpathsea/texmf.cnf
+@@ -624,6 +624,7 @@
+ % Used by makempx to run TeX.  We use "etex" because MetaPost is
+ % expecting DVI, and not "tex" because we want first line parsing.
+ TEX = etex
++TEX.pmpost = eptex
+ 
+ % These variables specify the external program called for the
+ % interactive `e' option.  %d is replaced by the line number and %s by
+--- texlive-bin.git.orig/texk/web2c/Makefile.am
++++ texlive-bin.git/texk/web2c/Makefile.am
+@@ -177,6 +177,9 @@
+ ## MetaPost
+ include $(srcdir)/mplibdir/am/mplib.am
+ 
++## pMetaPost
++include $(srcdir)/pmpostdir/am/pmpost.am
++
+ ## libmplib, used by MetaPost and luaTeX
+ include $(srcdir)/mplibdir/am/libmplib.am
+ 
+--- texlive-bin.git.orig/texk/web2c/ac/web2c.ac
++++ texlive-bin.git/texk/web2c/ac/web2c.ac
+@@ -41,6 +41,7 @@
+ [[pdftex], [yes], [yes], [pdfTeX],  [xpdf libpng]],
+ [[luatex], [yes], [],    [luaTeX],  [poppler cairo libpng zziplib]],
+ [[mp],     [yes], [],    [MetaPost],[cairo libpng]],
++[[pmp],    [yes], [],    [pMetaPost], [cairo libpng ptexenc]],
+ [[xetex],  [yes], [yes], [XeTeX],   [poppler libpng freetype2 icu teckit graphite2 harfbuzz]],
+ ])[]dnl
+ m4_foreach([Kpse_Prog], [kpse_tex_progs],
 --- /dev/null
-+++ texlive-bin/texk/web2c/pmplibdir/jfm.ch
-@@ -0,0 +1,110 @@
++++ texlive-bin.git/texk/web2c/pmpostdir/Makefile
+@@ -0,0 +1,107 @@
++#
++# Makefile for W32
++#
++PTEXENCDIR=../../ptexenc
++
++RM = rm -f
++CC = cl
++LD = cl
++CTANGLE = ../ctangle
++CTIE = ctie
++AR = lib
++
++CAIROVER=cairo-1.12.8
++#CAIROVER=cairo-1.12.12
++
++KPSEBUILDDIR = ../../kpathsea
++KPSESRCDIR = ../..
++KPSELIB=$(KPSEBUILDDIR)/libkpathsea.lib
++PTEXENCLIB= ../../ptexenc/libptexenc.lib
++CAIROLIB = ../../../libs/cairo/$(CAIROVER)/src/release/cairo-static.lib
++PNGLIB = ../../../libs/libpng/libpng.lib
++ZLIBLIB = ../../../libs/zlib/libz.lib
++SYSLIBS = user32.lib advapi32.lib gdi32.lib
++ADDLIBS = $(ZLIBLIB) $(PNGLIB) $(CAIROLIB) $(SYSLIBS)
++
++MPLIBBUILDDIR = .
++MPLIBSRCDIR = .
++MPLIB = libjmplib.lib
++
++# LDEBUG=-link /DEBUG
++LDEBUG=
++
++# CFLAGS = -nologo -w -MT -Od -Zi -DMPXOUT=1 -DWIN32=1 -DMSVC=1 -DR_OK=4
++
++CFLAGS = -nologo -w -MT -O2 -DMPXOUT=1 -DWIN32=1 -DMSVC=1 -DR_OK=4 \
++-Dstrcasecmp=stricmp -DHAVE_SNPRINTF=1 -D_CRT_SECURE_NO_DEPRECATE=1 \
++-DCAIRO_WIN32_STATIC_BUILD=1 \
++-DNO_KPSE_DLL=1 -I. -I../.. -I../../kpathsea \
++-I$(PTEXENCDIR) -I.. \
++-I../../../libs/cairo/$(CAIROVER)/src \
++-I../../../libs/libpng
++
++OBJECTS = mpost.obj mpxout.obj
++LIBOBJECTS = avl.obj mp.obj pngout.obj psout.obj svgout.obj tfmin.obj \
++mpmath.obj mpmathdouble.obj mpstrings.obj
++
++pmpost.exe: $(MPLIB) $(OBJECTS) $(KPSELIB)
++	$(LD) -Fe$@ $(OBJECTS) setargv.obj $(MPLIB) $(KPSELIB) $(PTEXENCLIB) $(ADDLIBS) $(LDEBUG)
++
++$(MPLIB): $(LIBOBJECTS)
++	$(AR) -out:$@ $(LIBOBJECTS)
++
++.w.c:
++	$(CTANGLE) $< $@
++
++mpost.c: mpost.w mpost.ch mpxout.c
++	$(CTANGLE) mpost.w mpost.ch
++
++mpxout.c: mpxout.w mpxout-tot.ch
++	$(CTANGLE) mpxout.w mpxout-tot.ch
++
++mpxout-tot.ch: mpxout.w mpxout.ch pdvitomp.ch
++	$(CTIE) -c $@ mpxout.w mpxout.ch pdvitomp.ch
++
++mpmathdouble.c: mpmathdouble.w mpmathdouble.ch
++	$(CTANGLE) mpmathdouble.w mpmathdouble.ch
++
++mp.c: mp.w mp-tot.ch pngout.c psout.c svgout.c tfmin.c mpmath.c \
++mpmathdouble.c mpstrings.c
++	$(CTANGLE) mp.w mp-tot.ch
++
++mp-tot.ch: mp.w mp.ch jmp.ch
++	$(CTIE) -c $@ mp.w mp.ch jmp.ch
++
++tfmin.c: tfmin.w jfm.ch
++	$(CTANGLE) tfmin.w jfm.ch
++ 
++mpstrings.c: mpstrings.w
++	$(CTANGLE) mpstrings.w
++
++psout.c: psout.w psout-tot.ch mpstrings.c
++	$(CTANGLE) psout.w psout-tot.ch 
++
++psout-tot.ch: psout.w psout.ch jmppsw.ch
++	$(CTIE) -c $@ psout.w psout.ch jmppsw.ch
++
++svgout.c: svgout.w svgout.ch
++	$(CTANGLE) svgout.w svgout.ch
++
++mpmath.c: mpmath.w
++	$(CTANGLE) mpmath.w
++
++$(OBJECTS): %.obj: %.c
++	$(CC) -c $(CFLAGS) $< -Fo$@
++
++$(LIBOBJECTS): %.obj: %.c
++	$(CC) -c $(CFLAGS) $< -Fo$@
++
++clean:
++	$(RM) *.obj mp.c mpxout.c psout.c psout.h mp*.h *.scn \
++        *.idx *.toc *.pdf *.log mpmath.c mpost.c tfmin.c svgout.c \
++        mpstrings.c *~ pngout.c mpmathdouble.c mp-tot.ch mpxout-tot.ch \
++        psout-tot.ch *.pdb *.eps *.exp *.exe *.lib
++
++install: pmpost.exe
++	cp -p pmpost.exe c:/usr/local/bin/
++	cp -p pmpost.exe c:/usr/work/edrive/wk/dist/PTEX/bin/
+--- /dev/null
++++ texlive-bin.git/texk/web2c/pmpostdir/am/pmpost.am
+@@ -0,0 +1,118 @@
++## texk/web2c/pmpostdir/am/pmpost.am: Makefile fragment for pMetaPost.
++
++CTIE = ./ctie
++ctie = $(ctie_silent)CWEBINPUTS=.:$(srcdir) $(buildenv) $(CTIE)
++ctie_silent = $(ctie_silent_$(V))
++ctie_silent_ = $(ctie_silent_$(AM_DEFAULT_VERBOSITY))
++ctie_silent_0 = @echo "  CTIE    " $@; $(SHELL) ./silent-sh $@ #
++ctie_silent_1 = 
++
++
++if PMP
++bin_PROGRAMS += pmpost
++bin_links += pmpost$(EXEEXT):pdvitomp
++endif PMP
++EXTRA_PROGRAMS +=pmpost
++
++pmpost_CPPFLAGS = $(CAIRO_INCLUDES) $(PIXMAN_INCLUDES) $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES) -I$(srcdir)/mplibdir  -I$(srcdir)/pmpostdir $(PTEXENC_INCLUDES)
++pmpost_LDADD = $(KPATHSEA_LIBS) $(CAIRO_LIBS) $(PIXMAN_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) -lm $(PTEXENC_LIBS)
++
++
++.PHONY: install-pmpost-links uninstall-pmpost-links
++
++# Creating one file: just one rule
++pmp_ctangle = $(ctangle_silent)CWEBINPUTS=.:$(srcdir)/pmpostdir $(ctangle)
++# Creating several files: need stamp file and two rules with identical recipes
++pmp_ctangle_sh = CWEBINPUTS=.:$(srcdir)/pmpostdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(CTANGLE)
++
++## pMetaPost C sources
++pmpost_SOURCES = mplibdir/avl.h mplibdir/avl.c
++nodist_pmpost_SOURCES = ptfmin.c $(pmp_c_h) $(pmpmath_c_h) $(pmpmathdouble_c_h) $(ppsout_c_h) $(psvgout_c_h) $(ppngout_c_h) $(pmpstrings_c_h) pmpost.c  $(pmpxout_c_h)
++pmp_c_h =  pmp.c pmplib.h pmpmp.h
++pmpmath_c_h = pmpmath.h pmpmath.c
++pmpmathdouble_c_h = pmpmathdouble.h pmpmathdouble.c
++pmpstrings_c_h = pmpstrings.h pmpstrings.c
++ppsout_c_h = pmppsout.h ppsout.c pmplibps.h
++psvgout_c_h = pmplibsvg.h pmpsvgout.h psvgout.c
++ppngout_c_h = pmplibpng.h pmppngout.h ppngout.c
++pmpxout_c_h = pmpxout.c pmpxout.h
++
++# sed script
++pmp_sed_main = "s/mpxout\\.h/pmpxout.h/;s/mpmp\\.h/pmpmp.h/;s/mplib\\.h/pmplib.h/;s/mpstrings\\.h/pmpstrings.h/"
++pmp_sed_math = "s/mpmath\\.h/pmpmath.h/;s/mpmathdouble\\.h/pmpmathdouble.h/"
++pmp_sed_ps   = "s/mplibps\\.h/pmplibps.h/;s/mppsout\\.h/pmppsout.h/"
++pmp_sed_svg  = "s/mplibsvg\\.h/pmplibsvg.h/;s/mpsvgout\\.h/pmpsvgout.h/"
++pmp_sed_png  = "s/mplibpng\\.h/pmplibpng.h/;s/mppngout\\.h/pmppngout.h/"
++pmp_sed = sed -e $(pmp_sed_main) -e $(pmp_sed_math) -e $(pmp_sed_ps) -e $(pmp_sed_svg) -e $(pmp_sed_png)
++
++# Creating one file: just one rule
++ptfmin.c: ctangle$(EXEEXT) mplibdir/tfmin.w
++	cat $(srcdir)/mplibdir/tfmin.w | $(pmp_sed) > ptfmin.w
++	$(pmp_ctangle) ptfmin.w jfm.ch
++pmpost.c: ctangle$(EXEEXT) mplibdir/mpost.w
++	cat $(srcdir)/mplibdir/mpost.w | $(pmp_sed) > pmpost.w
++	$(pmp_ctangle) pmpost.w mpost.ch
++
++
++# Creating several files: need stamp file and two rules with identical recipes
++$(pmp_c_h): pmp-tangle
++	@$(pmp_ctangle_sh) pmp.w pmp-tot.ch
++pmp-tangle: ctangle$(EXEEXT) mplibdir/mp.w pmp-tot.ch tangle-sh
++	@$(pmp_ctangle_sh) pmp.w pmp-tot.ch
++pmp-tot.ch: ctie$(EXEEXT) mplibdir/mp.w pmpostdir/mp.ch pmpostdir/jmp.ch
++	cat $(srcdir)/mplibdir/mp.w | $(pmp_sed) > pmp.w
++	$(ctie) -c pmp-tot.ch pmp.w pmpostdir/mp.ch pmpostdir/jmp.ch
++
++$(pmpmath_c_h): pmpmath-tangle
++	@$(pmp_ctangle_sh) pmpmath
++pmpmath-tangle: ctangle$(EXEEXT) mplibdir/mpmath.w tangle-sh
++	cat $(srcdir)/mplibdir/mpmath.w | $(pmp_sed) > pmpmath.w
++	@$(pmp_ctangle_sh) pmpmath
++
++$(pmpmathdouble_c_h): pmpmathdouble-tangle
++	@$(pmp_ctangle_sh) pmpmathdouble pmpostdir/mpmathdouble.ch
++pmpmathdouble-tangle: ctangle$(EXEEXT) mplibdir/mpmathdouble.w pmpostdir/mpmathdouble.ch tangle-sh
++	cat $(srcdir)/mplibdir/mpmathdouble.w | $(pmp_sed) > pmpmathdouble.w
++	@$(pmp_ctangle_sh) pmpmathdouble mpmathdouble.ch
++
++$(pmpstrings_c_h): pmpstrings-tangle
++	@$(pmp_ctangle_sh) pmpstrings
++pmpstrings-tangle: ctangle$(EXEEXT) mplibdir/mpstrings.w tangle-sh
++	cat $(srcdir)/mplibdir/mpstrings.w | $(pmp_sed) > pmpstrings.w
++	@$(pmp_ctangle_sh) pmpstrings
++
++$(ppsout_c_h): ppsout-tangle
++	@$(pmp_ctangle_sh) ppsout.w ppsout-tot.ch
++ppsout-tangle: ctangle$(EXEEXT) mplibdir/psout.w ppsout-tot.ch tangle-sh
++	@$(pmp_ctangle_sh) ppsout.w ppsout-tot.ch
++ppsout-tot.ch: ctie$(EXEEXT) mplibdir/psout.w pmpostdir/psout.ch pmpostdir/jmppsw.ch
++	cat $(srcdir)/mplibdir/psout.w | $(pmp_sed) > ppsout.w
++	$(ctie) -c ppsout-tot.ch ppsout.w pmpostdir/psout.ch pmpostdir/jmppsw.ch
++
++$(psvgout_c_h): psvgout-tangle
++	@$(pmp_ctangle_sh) psvgout svgout.ch
++psvgout-tangle: ctangle$(EXEEXT) mplibdir/svgout.w pmpostdir/svgout.ch tangle-sh
++	cat $(srcdir)/mplibdir/svgout.w | $(pmp_sed) > psvgout.w
++	@$(pmp_ctangle_sh) psvgout svgout.ch
++$(ppngout_c_h): ppngout-tangle
++	@$(pmp_ctangle_sh) ppngout
++ppngout-tangle: ctangle$(EXEEXT) mplibdir/pngout.w tangle-sh
++	cat $(srcdir)/mplibdir/pngout.w | $(pmp_sed) > ppngout.w
++	@$(pmp_ctangle_sh) ppngout
++
++$(pmpxout_c_h): pmpxout-tangle
++	@$(pmp_ctangle_sh) pmpxout pmpxout-tot.ch
++pmpxout-tangle: ctangle$(EXEEXT) mplibdir/mpxout.w pmpxout-tot.ch tangle-sh
++	@$(pmp_ctangle_sh) pmpxout pmpxout-tot.ch
++pmpxout-tot.ch: ctie$(EXEEXT) mplibdir/mpxout.w pmpostdir/mpxout.ch pmpostdir/pdvitomp.ch
++	cat $(srcdir)/mplibdir/mpxout.w | $(pmp_sed) > pmpxout.w
++	$(ctie) -c pmpxout-tot.ch pmpxout.w pmpostdir/mpxout.ch pmpostdir/pdvitomp.ch
++
++## pMetaPost CWeb sources
++pmpost_web = mplibdir/mpost.w mplibdir/mpxout.w
++pmpost_web += mplibdir/mp.w mplibdir/psout.w mplibdir/svgout.w mplibdir/pngout.w
++pmpost_web += mplibdir/mpmath.w mplibdir/mpmathdouble.w mplibdir/mpstrings.w mplibdir/tfmin.w
++
++$(pmpost_OBJECTS): $(nodist_pmpost_SOURCES)
++
++DISTCLEANFILES += $(nodist_pmpost_SOURCES)
+--- /dev/null
++++ texlive-bin.git/texk/web2c/pmpostdir/jfm.ch
+@@ -0,0 +1,104 @@
 +@x
 +#include <w2c/config.h>
 +@y
-+#ifdef WIN32
 +#include <kpathsea/kpathsea.h>
-+#endif
 +#include <w2c/config.h>
 +@z
 +
@@ -113,19 +379,15 @@
 +mp->tfm_infile = (mp->open_file)(mp, mp->name_of_file, "r",mp_filetype_metrics);
 +@y
 +mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext);
-+#ifdef WIN32
 +{
 +  char *fulln;
 +  fulln = kpse_find_file(fname, kpse_tfm_format, 1);
 +  mp->tfm_infile = (mp->open_file)(mp, fulln, "r",mp_filetype_metrics);
 +  if(fulln) mp_xfree(fulln);
 +}
-+#else
-+mp->tfm_infile = (mp->open_file)(mp, mp->name_of_file, "r",mp_filetype_metrics);
-+#endif
 +@z
 --- /dev/null
-+++ texlive-bin/texk/web2c/pmplibdir/jmp.ch
++++ texlive-bin.git/texk/web2c/pmpostdir/jmp.ch
 @@ -0,0 +1,340 @@
 +% jMetaPost change file for MetaPost
 +%
@@ -142,15 +404,15 @@
 +%
 +
 +@x
-+@d default_banner "This is MetaPost, Version 1.801" /* printed when \MP\ starts */
++@d default_banner "This is MetaPost, Version 1.802" /* printed when \MP\ starts */
 +@y
-+@d default_banner "This is pMetaPost, Version 1.801-0.04" /* printed when \MP\ starts */
++@d default_banner "This is pMetaPost, Version 1.802-0.04" /* printed when \MP\ starts */
 +@z
 +
 +@x
-+#define metapost_version "1.801"
++#define metapost_version "1.802"
 +@y
-+#define metapost_version "1.801-0.04"
++#define metapost_version "1.802-0.04"
 +@z
 +
 +@x
@@ -468,7 +730,7 @@
 +@* Debugging.
 +@z
 --- /dev/null
-+++ texlive-bin/texk/web2c/pmplibdir/jmppsw.ch
++++ texlive-bin.git/texk/web2c/pmpostdir/jmppsw.ch
 @@ -0,0 +1,74 @@
 +%
 +%
@@ -478,11 +740,11 @@
 +%
 +
 +@x
-+#include "mppsout.h" /* internal header */
-+#include "mpmath.h" /* internal header */
++#include "pmppsout.h" /* internal header */
++#include "pmpmath.h" /* internal header */
 +@y
-+#include "mppsout.h" /* internal header */
-+#include "mpmath.h" /* internal header */
++#include "pmppsout.h" /* internal header */
++#include "pmpmath.h" /* internal header */
 +#include <ptexenc/ptexenc.h>
 +@z
 +
@@ -499,13 +761,13 @@
 +static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues);
 +@y
 +static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues);
-+void mp_ps_kanji_string_out (MP mp,mp_string s);
++void mp_ps_kanji_string_out (MP mp, unsigned char *s);
 +
 +#define Hi(x) (((x) >> 8) & 0xff)
 +#define Lo(x) ((x) & 0xff)
 +
 +@ @c
-+void mp_ps_kanji_string_out (MP mp, char *s)
++void mp_ps_kanji_string_out (MP mp, unsigned char *s)
 +{
 +int i, len;
 +int c;
@@ -545,7 +807,7 @@
 +        mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false);
 +@z
 --- /dev/null
-+++ texlive-bin/texk/web2c/pmplibdir/mp.ch
++++ texlive-bin.git/texk/web2c/pmpostdir/mp.ch
 @@ -0,0 +1,20 @@
 +@x
 +  /* open the terminal for output */
@@ -568,7 +830,7 @@
 +#endif
 +@z
 --- /dev/null
-+++ texlive-bin/texk/web2c/pmplibdir/mpmathdouble.ch
++++ texlive-bin.git/texk/web2c/pmpostdir/mpmathdouble.ch
 @@ -0,0 +1,76 @@
 +@x
 +#define _ISOC99_SOURCE /* to get the round() prototype */
@@ -647,15 +909,14 @@
 +#endif
 +@z
 --- /dev/null
-+++ texlive-bin/texk/web2c/pmplibdir/mpost.ch
-@@ -0,0 +1,310 @@
++++ texlive-bin.git/texk/web2c/pmpostdir/mpost.ch
+@@ -0,0 +1,298 @@
 +@x
 +#include <kpathsea/kpathsea.h>
 +@y
 +#include <kpathsea/kpathsea.h>
-+#ifdef WIN32
++#include <ptexenc/ptexenc.h>
 +char kanjioption[16];
-+#endif
 +@z
 +
 +@x
@@ -667,16 +928,12 @@
 +#define MPXCOMMAND "makempx"
 +#endif
 +@y
-+@d TEX     "ptex"
++@d TEX     "eptex"
 +@d TROFF   "gsoelim | geqn -Tps -d$$ | gtroff -Tps"
 +
 +@c
 +#ifndef MPXCOMMAND
-+#ifdef WIN32
 +#define MPXCOMMAND "pmakempx"
-+#else
-+#define MPXCOMMAND "makempx"
-+#endif
 +#endif
 +@z
 +
@@ -712,7 +969,6 @@
 +          strcpy(maincmd,s);
 +@y
 +      if (mpost_tex_program != NULL && *mpost_tex_program != '\0') {
-+#ifdef WIN32
 +        if (kanjioption[0]) {
 +          maincmd = (char *)mpost_xmalloc (strlen(mpost_tex_program) +
 +                                   strlen(kanjioption) + 15);
@@ -721,30 +977,21 @@
 +          strcat(maincmd, kanjioption);
 +        } else
 +          maincmd = mpost_xstrdup(mpost_tex_program);
-+#else
-+        maincmd = mpost_xstrdup(mpost_tex_program);
-+#endif
 +      } else {
 +        if (mpxmode == mpx_tex_mode) {
 +          s = kpse_var_value("TEX");
 +          if (s==NULL) s = kpse_var_value("MPXMAINCMD");
 +          if (s==NULL) s = mpost_xstrdup (TEX);
-+#ifdef WIN32
 +          if (kanjioption[0])
 +            maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+
 +                                             strlen(kanjioption)+13);
 +          else
 +            maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+1);
-+#else
-+          maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+1);
-+#endif
 +          strcpy(maincmd,s);
-+#ifdef WIN32
 +          if (kanjioption[0]) {
 +            strcat(maincmd, " --kanji=");
 +            strcat(maincmd, kanjioption);
 +          }
-+#endif
 +@z
 +
 +@x
@@ -781,13 +1028,11 @@
 +        if (user_progname == NULL) 
 +	      user_progname = optarg;
 +      }
-+#ifdef WIN32
 +    } else if (ARGUMENT_IS ("kanji")) {
 +      strcpy(kanjioption, optarg);
 +      if(!set_enc_string(optarg, optarg)) {
 +        fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg);
 +      }
-+#endif
 +@z
 +
 +@x
@@ -803,13 +1048,11 @@
 +@y
 +    } else if (option_is ("progname")) {
 +      user_progname = optarg;
-+#ifdef WIN32
 +    } else if (option_is ("kanji")) {
 +      strcpy (kanjioption, optarg);
 +      if(!set_enc_string(optarg, optarg)) {
 +        fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg);
 +      }
-+#endif
 +@z
 +
 +@x
@@ -936,22 +1179,29 @@
 +  {
 +    char *p , *q;
 +    p = (char *)xbasename(argv[0]);
-+    if ((q = strrchr(p, '.')) && !stricmp(q, ".exe"))
++    if ((q = strrchr(p, '.')) && !strcasecmp(q, ".exe"))
 +       *q = '\0';
 +    argv[0] = p;
-+   }
++  }
 +  kanjioption[0] = '\0';
 +  enable_UPTEX (false);
 +  set_enc_string("sjis", "sjis");
++#else
++  {
++    char *p;
++    p = (char *)xbasename(argv[0]);
++    argv[0] = p;
++  }
++  kanjioption[0] = '\0';
++  enable_UPTEX (false);
++  set_enc_string("utf8", "euc");
 +#endif
 +
 +  if (strstr(argv[0], "dvitomp") != NULL) {
 +    dvitomp_only=1;
 +    @<Read and set dvitomp command line options@>;
 +  } else {
-+#ifdef WIN32
 +    options->mem_name = mpost_xstrdup(argv[0]);
-+#endif
 +@z
 +
 +@x
@@ -960,7 +1210,7 @@
 +  if(putenv(xstrdup("engine=pmpost")))
 +@z
 --- /dev/null
-+++ texlive-bin/texk/web2c/pmplibdir/mpxout.ch
++++ texlive-bin.git/texk/web2c/pmpostdir/mpxout.ch
 @@ -0,0 +1,8 @@
 +@x
 +#include <process.h>
@@ -971,504 +1221,502 @@
 +typedef int integer;
 +@z
 --- /dev/null
-+++ texlive-bin/texk/web2c/pmplibdir/pdvitomp.ch
-@@ -0,0 +1,494 @@
-+@x
-+#include "mpxout.h"
-+@h
-+@y
-+#include "mpxout.h"
-+#include <ptexenc/ptexenc.h>
-+@h
-+@z
-+
-+@x
-+@d max_widths (256*max_fonts) /* maximum number of different characters among all fonts */
-+@y
-+@d max_widths 512000 /* maximum number of different characters among all fonts */
-+@z
-+
-+@x
-+@d undefined_commands 250: case 251: case 252: case 253: case 254: case 255
-+@y
-+@d dir 255 /* p\TeX\ direction */
-+@d undefined_commands 250: case 251: case 252: case 253: case 254
-+@z
-+
-+@x
-+mpx_read_tfm_word(mpx); lh=mpx->b2*(int)(256)+mpx->b3;
-+@y
-+mpx_read_tfm_word(mpx);
-+@<Read the pTeX header data@>;@/
-+lh=mpx->b2*(int)(256)+mpx->b3;
-+@z
-+
-+@x
-+    if ( mpx->b0<128 ) 
-+      mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
-+    else 
-+      mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
-+  }
-+  if ( k==5 ) {
-+    if (mpx->mode == mpx_troff_mode) {
-+      mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16);
-+    }
-+  }
-+}
-+@y
-+    if ( mpx->b0<128 ) 
-+      mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
-+    else 
-+      mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
-+  }
-+  if ( k==5 ) {
-+    if (mpx->mode == mpx_troff_mode) {
-+      mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16);
-+    }
-+  }
-+}
-+@<Read JFM character type table@>;
-+@z
-+
-+@x
-+@<Width of character |c| in font |f|@>=
-+floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c))
-+
-+@ @<Width of character |p| in font |cur_font|@>=
-+floor(mpx->dvi_scale*mpx->font_scaled_size[cur_font]*char_width(cur_font,p))
-+@y
-+@ @c @<Declare JFM character type table lookup routine@>@; /* p\TeX */
-+integer mpx_scaled_char_width (MPX mpx,integer f,integer c)
-+{
-+  if (mpx->font_id[f]!=0) c=mpx_lookup_ctype(mpx, f,c);
-+  return floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c));
-+}
-+@z
-+
-+@x
-+@ @c @<Declare a procedure called |finish_last_char|@>@;
-+static void mpx_do_set_char (MPX mpx,web_integer f, web_integer c) {
-+  if ( (c<mpx->font_bc[f])||(c>mpx->font_ec[f]) )
-+    mpx_abort(mpx,"attempt to typeset invalid character %d",c);
-+@.attempt to typeset...@>
-+@y
-+@ PDVItoMP: |do_set_char| is called with non-virtual font.
-+In the case of non-virtual Kanji font, the width is looked up
-+with the character type, and the character is printed by the
-+function |set_kanji_char|.
-+
-+When the width written in the virtual font is same as
-+the width of the substituted font, the next character can be
-+written in the same string in output mpx file.
-+In other words, the width of the character is calculated
-+in |do_dvi_commands|. So even if the width is wrong here, the output PostScript file is not affected.
-+
-+@ @c @<Declare a procedure called |finish_last_char|@>@;
-+void mpx_do_set_char (MPX mpx,integer f,integer c)
-+{
-+integer kkk;
-+
-+if (mpx->font_id[f]!=0) {
-+  kkk=mpx_lookup_ctype(mpx, f,c);
-+  if ( (kkk<mpx->font_bc[f]) || (kkk>mpx->font_ec[f]) )
-+    mpx_abort(mpx,"attempt to typeset invalid character (JFM) %d",c);
-+} else if ( (c<mpx->font_bc[f])||(c>mpx->font_ec[f]) ) {
-+  mpx_abort(mpx,"attempt to typeset invalid character %d",c);
-+}
-+@.attempt to typeset...@>
-+@z
-+
-+@x
-+  if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v)||
-+      (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) {
-+@y
-+  if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v2)||
-+      (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) {
-+@z
-+
-+@x
-+    fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;@/
-+    mpx->str_scale=mpx->dvi_scale; mpx->str_f=f; 
-+    mpx->str_v=mpx->v; mpx->str_h1=mpx->h;
-+@y
-+  if ((mpx->d==0) || (mpx->font_id[f]==9)) {
-+    fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;}@/
-+  else {
-+    fprintf(mpx->mpxfile,"_sr("); mpx->print_col=4;}@/
-+  mpx->str_scale=mpx->dvi_scale; mpx->str_f=f;
-+  mpx->str_v1=mpx->v; mpx->str_h1=mpx->h;
-+@z
-+
-+@x
-+  mpx_print_char(mpx, (unsigned char)c);
-+  mpx->str_h2=(web_integer)(mpx->h+@<Width of character |c| in font |f|@>);
-+@y
-+  if (mpx->font_id[f]!=0)
-+    mpx_print_kanji_char(mpx, c);
-+  else
-+    mpx_print_char(mpx, c);
-+  if (mpx->d==0) {
-+    mpx->str_h2=mpx->h+mpx_scaled_char_width(mpx, f, c);
-+    mpx->str_v2=mpx->v;
-+  } else {
-+    mpx->str_h2=mpx->h;
-+    mpx->str_v2=mpx->v+mpx_scaled_char_width(mpx, f, c);
-+  }
-+@z
-+
-+@x
-+web_integer str_h1;
-+web_integer str_v; /* starting position for current output string */
-+web_integer str_h2; /* where the current output string ends */
-+@y
-+integer str_h1;
-+integer str_v1; /* starting position for current output string */
-+integer str_h2;
-+integer str_v2; /* where the current output string ends */
-+@z
-+
-+@x
-+  fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n");
-+  fprintf(mpx->mpxfile,
-+          "  addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n");
-+@y
-+  fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n");
-+  fprintf(mpx->mpxfile,
-+          "  addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n");
-+  fprintf(mpx->mpxfile,"vardef _sr(expr _t,_f,_m,_x,_y)=\n");  
-+  fprintf(mpx->mpxfile,"  addto _p also _t infont _f rotated -90");
-+  fprintf(mpx->mpxfile," scaled _m shifted (_x,_y); enddef;\n");
-+@z
-+
-+@x
-+      x=mpx->conv*mpx->str_h1; 
-+      y=mpx->conv*(-mpx->str_v);
-+@y
-+      x=mpx->conv*mpx->str_h1;
-+      y=mpx->conv*(-mpx->str_v1);
-+@z
-+
-+@x
-+@<Handle a special rule that determines the box size@>=
-+{ 
-+  mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v; 
-+}
-+@y
-+@<Handle a special rule that determines the box size@>=
-+{ if (mpx->d==0) {
-+    mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v;
-+  } else {
-+    mpx->pic_wd=mpx->v; mpx->pic_dp=-mpx->h; mpx->pic_ht=ht+mpx->h;
-+  }
-+}
-+@z
-+
-+@x
-+  mpx->str_v=0;
-+  mpx->str_h2=0;
-+  mpx->str_scale=1.0; /* values don't matter */
-+@y
-+  mpx->str_h2=0;
-+  mpx->str_v2=0;
-+  mpx->str_scale=1.0; /* values don't matter */
-+@z
-+
-+@x
-+dd=-mpx->pic_dp*mpx->conv;
-+w=mpx->conv*mpx->pic_wd; 
-+h=mpx->conv*mpx->pic_ht;
-+fprintf(mpx->mpxfile,
-+        "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n" 
-+        " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",dd,w,dd,w,h,h)
-+@y
-+if (mpx->d==0) {
-+  dd=-mpx->pic_dp*mpx->conv;
-+  w=mpx->conv*mpx->pic_wd;
-+  h=mpx->conv*mpx->pic_ht;
-+  fprintf(mpx->mpxfile,
-+        "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n",dd,w,dd);
-+  fprintf(mpx->mpxfile,
-+        " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",w,h,h);
-+} else {
-+  dd=-mpx->pic_dp*mpx->conv;
-+  w=-mpx->pic_wd*mpx->conv;
-+  h=mpx->conv*mpx->pic_ht;
-+  fprintf(mpx->mpxfile,
-+        "setbounds _p to (%1.4f,0)--(%1.4f,%1.4f)--\n",h,h,w);
-+  fprintf(mpx->mpxfile,
-+        " (%1.4f,%1.4f)--(%1.4f,0)--cycle;\n", dd,w,dd);
-+}
-+@z
-+
-+@x
-+web_integer w;web_integer x;web_integer y;web_integer z;
-+  /* current state values (|h| and |v| have already been declared) */
-+web_integer hstack[(stack_size+1)];
-+web_integer vstack[(stack_size+1)];
-+web_integer wstack[(stack_size+1)];
-+web_integer xstack[(stack_size+1)];
-+web_integer ystack[(stack_size+1)];
-+web_integer zstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */
-+@y
-+integer w;integer x;integer y;integer z;integer d;
-+  /* current state values (|h| and |v| have already been declared) */
-+integer hstack[(stack_size+1)];
-+integer vstack[(stack_size+1)];
-+integer wstack[(stack_size+1)];
-+integer xstack[(stack_size+1)];
-+integer ystack[(stack_size+1)];
-+integer zstack[(stack_size+1)];
-+integer dstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */
-+@z
-+
-+@x
-+mpx->h=0; mpx->v=0;
-+@y
-+mpx->h=0; mpx->v=0; mpx->d=0;
-+@z
-+
-+@x
-+  mpx->hstack[mpx->stk_siz]=mpx->h; 
-+  mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w;
-+  mpx->xstack[mpx->stk_siz]=mpx->x; 
-+  mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z;
-+@y 
-+  mpx->hstack[mpx->stk_siz]=mpx->h; 
-+  mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w;
-+  mpx->xstack[mpx->stk_siz]=mpx->x; 
-+  mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z;
-+  mpx->dstack[mpx->stk_siz]=mpx->d;
-+@z
-+
-+@x
-+    mpx->h=mpx->hstack[mpx->stk_siz]; 
-+    mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz];
-+    mpx->x=mpx->xstack[mpx->stk_siz]; 
-+    mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz];
-+@y
-+    mpx->h=mpx->hstack[mpx->stk_siz]; 
-+    mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz];
-+    mpx->x=mpx->xstack[mpx->stk_siz]; 
-+    mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz];
-+    mpx->d=mpx->dstack[mpx->stk_siz];
-+@z
-+
-+@x
-+  case z0: return mpx->z; break;
-+@y
-+  case z0: return mpx->z; break;
-+  case dir: return mpx_get_byte(mpx); break;
-+@z
-+
-+@x
-+    mpx->h += @<Width of character |p| in font |cur_font|@>;
-+@y
-+    if (mpx->d==0) {
-+      mpx->h+=mpx_scaled_char_width(mpx, cur_font, p);
-+    } else {
-+      mpx->v+=mpx_scaled_char_width(mpx, cur_font, p);
-+    }
-+@z
-+
-+@x
-+      mpx->h += q;
-+@y
-+      if (mpx->d==0) {
-+        mpx->h += q;
-+      } else {
-+        mpx->v += q;
-+      }
-+@z
-+
-+@x
-+case pop: 
-+  mpx_do_pop(mpx);
-+  break;
-+@y
-+case pop: 
-+  mpx_do_pop(mpx);
-+  break;
-+case dir:
-+  mpx->d=p;
-+  break;
-+@z
-+
-+@x
-+case four_cases(right1):
-+  mpx->h += trunc(p*mpx->dvi_scale);
-+  break;
-+case w0: case four_cases(w1): 
-+  mpx->w = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->w;
-+  break;
-+case x0: case four_cases(x1): 
-+  mpx->x = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->x;
-+  break;
-+case four_cases(down1):
-+  mpx->v += trunc(p*mpx->dvi_scale);
-+  break;
-+case y0: case four_cases(y1): 
-+  mpx->y = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->y;
-+  break;
-+case z0: case four_cases(z1): 
-+  mpx->z = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->z;
-+  break;
-+@y
-+case four_cases(right1):
-+  if (mpx->d==0) {
-+    mpx->h+=trunc(p*mpx->dvi_scale);
-+  } else {
-+    mpx->v+=trunc(p*mpx->dvi_scale);
-+  }
-+  break;
-+case w0: case four_cases(w1):
-+  if (mpx->d==0) {
-+    mpx->h+=mpx->w;
-+  } else {
-+    mpx->v+=mpx->w;
-+  }
-+  break;
-+case x0: case four_cases(x1):
-+  if (mpx->d==0) {
-+    mpx->h+=mpx->x;
-+  } else {
-+    mpx->v+=mpx->x;
-+  }
-+  break;
-+case four_cases(down1):
-+  if (mpx->d==0) {
-+    mpx->v+=trunc(p*mpx->dvi_scale);
-+  } else {
-+    mpx->h-=trunc(p*mpx->dvi_scale);
-+  }
-+  break;
-+case y0: case four_cases(y1):
-+  if (mpx->d==0) {
-+    mpx->v+=mpx->y;
-+  } else {
-+    mpx->h-=mpx->y;
-+  }
-+  break;
-+case z0: case four_cases(z1):
-+  if (mpx->d==0) {
-+    mpx->v+=mpx->z;
-+  } else {
-+    mpx->h-=mpx->z;
-+  }
-+  break;
-+@z
-+
-+@x
-+@<Check if mp file is newer than mpxfile, exit if not@>=
-+if (mpx_newer(mpxopt->mpname, mpxopt->mpxname))
-+   return 0
-+@y
-+@<Check if mp file is newer than mpxfile, exit if not@>=
-+if (mpx_newer(mpxopt->mpname, mpxopt->mpxname))
-+   return 0
-+
-+@ ASCII p\TeX JFM ID
-+@d yoko_jfm_id   11 /* for `yoko-kumi' fonts */
-+@d tate_jfm_id   9  /* for `tate-kumi' fonts */
-+@d font_jfm_p(A)   (mpx->font_id[(A)]!=0)
-+
-+@ @<Global...@>=
-+integer font_nt[max_fonts+1]; /* number of words in ctype table */
-+integer font_id[max_fonts+1];
-+integer jfm_char_code[max_widths+1];
-+integer jfm_char_type[max_widths+1];
-+integer jfm_char_index[max_fonts+1];
-+integer next_jfm_char_index;
-+
-+@ @<Set init...@>=
-+mpx->font_nt[0]=0;
-+mpx->font_id[0]=0;
-+mpx->jfm_char_type[0]=0;
-+mpx->next_jfm_char_index=0;
-+
-+@ JFM character type table is stored in the array |jfm_char_code| and
-+|jfm_char_type|. The character code and the character type of $i$-th
-+record is stored in |jfm_char_code[i]| and |jfm_char_type[i]|, respectively.
-+The table is in the order of character code.
-+
-+@<Read the pTeX header data@>=
-+mpx->font_id[f]=mpx->b0*(int)(256)+mpx->b1;
-+if ((mpx->font_id[f]==yoko_jfm_id) || (mpx->font_id[f]==tate_jfm_id)) {
-+  mpx->font_nt[f]=mpx->b2*(int)(256)+mpx->b3;
-+  mpx_read_tfm_word(mpx);
-+} else {
-+  mpx->font_id[f]=0;
-+  mpx->font_nt[f]=0;
-+}
-+
-+@ @<Read JFM character type table@>=
-+mpx->jfm_char_index[f]=mpx->next_jfm_char_index;
-+k=mpx->jfm_char_index[f];
-+mpx->next_jfm_char_index+=mpx->font_nt[f];
-+while (k<mpx->next_jfm_char_index) {
-+  mpx_read_tfm_word(mpx);
-+  mpx->jfm_char_code[k]=mpx->b0*(int)(256)+mpx->b1;
-+  mpx->jfm_char_type[k]=mpx->b2*(int)(256)+mpx->b3;
-+  k++;
-+}
-+
-+@ JFM character type table is looked up by binary search.
-+
-+@<Declare JFM character type table lookup routine@>=
-+integer mpx_lookup_ctype (MPX mpx,integer f, integer c)
-+{
-+  integer l, u, r, ch;
-+  l=0; u=mpx->font_nt[f]-1;
-+  while (l<u) {
-+    r=(l+u)/2;
-+    ch=mpx->jfm_char_code[mpx->jfm_char_index[f]+r];
-+    if (ch==c) {
-+      return mpx->jfm_char_type[mpx->jfm_char_index[f]+r];
-+    }
-+    if (ch<c)
-+      l=r+1;
-+    else
-+      u=r-1;
-+  }
-+  return 0;
-+}
-+
-+@ Every Kanji characters are supposed to be printable here,
-+so that the state always results in normal at the end of the procedure.
-+Kanji characters need to be converted into output Kanji encoding
-+from DVI(JIS).
-+
-+@d Hi(x) (((x)>> 8) & 0xff)
-+@d Lo(x) ( (x)      & 0xff)
-+
-+@<Declare subroutines for printing strings@>=
-+void mpx_print_kanji_char (MPX mpx,integer c)
-+{
-+  if (mpx->print_col+2>line_length-2 ) {
-+    if (mpx->state==normal) {
-+      fprintf(mpx->mpxfile, "\"");
-+      mpx->state=special;
-+    }
-+    fprintf(mpx->mpxfile, " \n");
-+    mpx->print_col=0;
-+  }
-+  if (mpx->state==special) {
-+    fprintf(mpx->mpxfile,"&");
-+    mpx->print_col++;
-+  }
-+  if (mpx->state!=normal) {
-+    fprintf(mpx->mpxfile, "\"");
-+    mpx->print_col++;
-+    mpx->state=normal;
-+  }
-+  c=toBUFF(fromDVI(c));
-+  putc2(Hi(c), mpx->mpxfile);
-+  mpx->print_col++;
-+  putc2(Lo(c), mpx->mpxfile);
-+  mpx->print_col++;
-+}
-+@z
++++ texlive-bin.git/texk/web2c/pmpostdir/pdvitomp.ch
+@@ -0,0 +1,492 @@
++@x
++#include "pmpxout.h"
++@y
++#include "pmpxout.h"
++#include <ptexenc/ptexenc.h>
++@z
++
++@x
++@d max_widths (256*max_fonts) /* maximum number of different characters among all fonts */
++@y
++@d max_widths 512000 /* maximum number of different characters among all fonts */
++@z
++
++@x
++@d undefined_commands 250: case 251: case 252: case 253: case 254: case 255
++@y
++@d dir 255 /* p\TeX\ direction */
++@d undefined_commands 250: case 251: case 252: case 253: case 254
++@z
++
++@x
++mpx_read_tfm_word(mpx); lh=mpx->b2*(int)(256)+mpx->b3;
++@y
++mpx_read_tfm_word(mpx);
++@<Read the pTeX header data@>;@/
++lh=mpx->b2*(int)(256)+mpx->b3;
++@z
++
++@x
++    if ( mpx->b0<128 ) 
++      mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
++    else 
++      mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
++  }
++  if ( k==5 ) {
++    if (mpx->mode == mpx_troff_mode) {
++      mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16);
++    }
++  }
++}
++@y
++    if ( mpx->b0<128 ) 
++      mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
++    else 
++      mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
++  }
++  if ( k==5 ) {
++    if (mpx->mode == mpx_troff_mode) {
++      mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16);
++    }
++  }
++}
++@<Read JFM character type table@>;
++@z
++
++@x
++@<Width of character |c| in font |f|@>=
++floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c))
++
++@ @<Width of character |p| in font |cur_font|@>=
++floor(mpx->dvi_scale*mpx->font_scaled_size[cur_font]*char_width(cur_font,p))
++@y
++@ @c @<Declare JFM character type table lookup routine@>@; /* p\TeX */
++integer mpx_scaled_char_width (MPX mpx,integer f,integer c)
++{
++  if (mpx->font_id[f]!=0) c=mpx_lookup_ctype(mpx, f,c);
++  return floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c));
++}
++@z
++
++@x
++@ @c @<Declare a procedure called |finish_last_char|@>@;
++static void mpx_do_set_char (MPX mpx,web_integer f, web_integer c) {
++  if ( (c<mpx->font_bc[f])||(c>mpx->font_ec[f]) )
++    mpx_abort(mpx,"attempt to typeset invalid character %d",c);
++@.attempt to typeset...@>
++@y
++@ PDVItoMP: |do_set_char| is called with non-virtual font.
++In the case of non-virtual Kanji font, the width is looked up
++with the character type, and the character is printed by the
++function |set_kanji_char|.
++
++When the width written in the virtual font is same as
++the width of the substituted font, the next character can be
++written in the same string in output mpx file.
++In other words, the width of the character is calculated
++in |do_dvi_commands|. So even if the width is wrong here, the output PostScript file is not affected.
++
++@ @c @<Declare a procedure called |finish_last_char|@>@;
++void mpx_do_set_char (MPX mpx,integer f,integer c)
++{
++integer kkk;
++
++if (mpx->font_id[f]!=0) {
++  kkk=mpx_lookup_ctype(mpx, f,c);
++  if ( (kkk<mpx->font_bc[f]) || (kkk>mpx->font_ec[f]) )
++    mpx_abort(mpx,"attempt to typeset invalid character (JFM) %d",c);
++} else if ( (c<mpx->font_bc[f])||(c>mpx->font_ec[f]) ) {
++  mpx_abort(mpx,"attempt to typeset invalid character %d",c);
++}
++@.attempt to typeset...@>
++@z
++
++@x
++  if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v)||
++      (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) {
++@y
++  if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v2)||
++      (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) {
++@z
++
++@x
++    fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;@/
++    mpx->str_scale=mpx->dvi_scale; mpx->str_f=f; 
++    mpx->str_v=mpx->v; mpx->str_h1=mpx->h;
++@y
++  if ((mpx->d==0) || (mpx->font_id[f]==9)) {
++    fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;}@/
++  else {
++    fprintf(mpx->mpxfile,"_sr("); mpx->print_col=4;}@/
++  mpx->str_scale=mpx->dvi_scale; mpx->str_f=f;
++  mpx->str_v1=mpx->v; mpx->str_h1=mpx->h;
++@z
++
++@x
++  mpx_print_char(mpx, (unsigned char)c);
++  mpx->str_h2=(web_integer)(mpx->h+@<Width of character |c| in font |f|@>);
++@y
++  if (mpx->font_id[f]!=0)
++    mpx_print_kanji_char(mpx, c);
++  else
++    mpx_print_char(mpx, c);
++  if (mpx->d==0) {
++    mpx->str_h2=mpx->h+mpx_scaled_char_width(mpx, f, c);
++    mpx->str_v2=mpx->v;
++  } else {
++    mpx->str_h2=mpx->h;
++    mpx->str_v2=mpx->v+mpx_scaled_char_width(mpx, f, c);
++  }
++@z
++
++@x
++web_integer str_h1;
++web_integer str_v; /* starting position for current output string */
++web_integer str_h2; /* where the current output string ends */
++@y
++integer str_h1;
++integer str_v1; /* starting position for current output string */
++integer str_h2;
++integer str_v2; /* where the current output string ends */
++@z
++
++@x
++  fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n");
++  fprintf(mpx->mpxfile,
++          "  addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n");
++@y
++  fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n");
++  fprintf(mpx->mpxfile,
++          "  addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n");
++  fprintf(mpx->mpxfile,"vardef _sr(expr _t,_f,_m,_x,_y)=\n");  
++  fprintf(mpx->mpxfile,"  addto _p also _t infont _f rotated -90");
++  fprintf(mpx->mpxfile," scaled _m shifted (_x,_y); enddef;\n");
++@z
++
++@x
++      x=mpx->conv*mpx->str_h1; 
++      y=mpx->conv*(-mpx->str_v);
++@y
++      x=mpx->conv*mpx->str_h1;
++      y=mpx->conv*(-mpx->str_v1);
++@z
++
++@x
++@<Handle a special rule that determines the box size@>=
++{ 
++  mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v; 
++}
++@y
++@<Handle a special rule that determines the box size@>=
++{ if (mpx->d==0) {
++    mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v;
++  } else {
++    mpx->pic_wd=mpx->v; mpx->pic_dp=-mpx->h; mpx->pic_ht=ht+mpx->h;
++  }
++}
++@z
++
++@x
++  mpx->str_v=0;
++  mpx->str_h2=0;
++  mpx->str_scale=1.0; /* values don't matter */
++@y
++  mpx->str_h2=0;
++  mpx->str_v2=0;
++  mpx->str_scale=1.0; /* values don't matter */
++@z
++
++@x
++dd=-mpx->pic_dp*mpx->conv;
++w=mpx->conv*mpx->pic_wd; 
++h=mpx->conv*mpx->pic_ht;
++fprintf(mpx->mpxfile,
++        "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n" 
++        " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",dd,w,dd,w,h,h)
++@y
++if (mpx->d==0) {
++  dd=-mpx->pic_dp*mpx->conv;
++  w=mpx->conv*mpx->pic_wd;
++  h=mpx->conv*mpx->pic_ht;
++  fprintf(mpx->mpxfile,
++        "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n",dd,w,dd);
++  fprintf(mpx->mpxfile,
++        " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",w,h,h);
++} else {
++  dd=-mpx->pic_dp*mpx->conv;
++  w=-mpx->pic_wd*mpx->conv;
++  h=mpx->conv*mpx->pic_ht;
++  fprintf(mpx->mpxfile,
++        "setbounds _p to (%1.4f,0)--(%1.4f,%1.4f)--\n",h,h,w);
++  fprintf(mpx->mpxfile,
++        " (%1.4f,%1.4f)--(%1.4f,0)--cycle;\n", dd,w,dd);
++}
++@z
++
++@x
++web_integer w;web_integer x;web_integer y;web_integer z;
++  /* current state values (|h| and |v| have already been declared) */
++web_integer hstack[(stack_size+1)];
++web_integer vstack[(stack_size+1)];
++web_integer wstack[(stack_size+1)];
++web_integer xstack[(stack_size+1)];
++web_integer ystack[(stack_size+1)];
++web_integer zstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */
++@y
++integer w;integer x;integer y;integer z;integer d;
++  /* current state values (|h| and |v| have already been declared) */
++integer hstack[(stack_size+1)];
++integer vstack[(stack_size+1)];
++integer wstack[(stack_size+1)];
++integer xstack[(stack_size+1)];
++integer ystack[(stack_size+1)];
++integer zstack[(stack_size+1)];
++integer dstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */
++@z
++
++@x
++mpx->h=0; mpx->v=0;
++@y
++mpx->h=0; mpx->v=0; mpx->d=0;
++@z
++
++@x
++  mpx->hstack[mpx->stk_siz]=mpx->h; 
++  mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w;
++  mpx->xstack[mpx->stk_siz]=mpx->x; 
++  mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z;
++@y 
++  mpx->hstack[mpx->stk_siz]=mpx->h; 
++  mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w;
++  mpx->xstack[mpx->stk_siz]=mpx->x; 
++  mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z;
++  mpx->dstack[mpx->stk_siz]=mpx->d;
++@z
++
++@x
++    mpx->h=mpx->hstack[mpx->stk_siz]; 
++    mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz];
++    mpx->x=mpx->xstack[mpx->stk_siz]; 
++    mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz];
++@y
++    mpx->h=mpx->hstack[mpx->stk_siz]; 
++    mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz];
++    mpx->x=mpx->xstack[mpx->stk_siz]; 
++    mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz];
++    mpx->d=mpx->dstack[mpx->stk_siz];
++@z
++
++@x
++  case z0: return mpx->z; break;
++@y
++  case z0: return mpx->z; break;
++  case dir: return mpx_get_byte(mpx); break;
++@z
++
++@x
++    mpx->h += @<Width of character |p| in font |cur_font|@>;
++@y
++    if (mpx->d==0) {
++      mpx->h+=mpx_scaled_char_width(mpx, cur_font, p);
++    } else {
++      mpx->v+=mpx_scaled_char_width(mpx, cur_font, p);
++    }
++@z
++
++@x
++      mpx->h += q;
++@y
++      if (mpx->d==0) {
++        mpx->h += q;
++      } else {
++        mpx->v += q;
++      }
++@z
++
++@x
++case pop: 
++  mpx_do_pop(mpx);
++  break;
++@y
++case pop: 
++  mpx_do_pop(mpx);
++  break;
++case dir:
++  mpx->d=p;
++  break;
++@z
++
++@x
++case four_cases(right1):
++  mpx->h += trunc(p*mpx->dvi_scale);
++  break;
++case w0: case four_cases(w1): 
++  mpx->w = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->w;
++  break;
++case x0: case four_cases(x1): 
++  mpx->x = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->x;
++  break;
++case four_cases(down1):
++  mpx->v += trunc(p*mpx->dvi_scale);
++  break;
++case y0: case four_cases(y1): 
++  mpx->y = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->y;
++  break;
++case z0: case four_cases(z1): 
++  mpx->z = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->z;
++  break;
++@y
++case four_cases(right1):
++  if (mpx->d==0) {
++    mpx->h+=trunc(p*mpx->dvi_scale);
++  } else {
++    mpx->v+=trunc(p*mpx->dvi_scale);
++  }
++  break;
++case w0: case four_cases(w1):
++  if (mpx->d==0) {
++    mpx->h+=mpx->w;
++  } else {
++    mpx->v+=mpx->w;
++  }
++  break;
++case x0: case four_cases(x1):
++  if (mpx->d==0) {
++    mpx->h+=mpx->x;
++  } else {
++    mpx->v+=mpx->x;
++  }
++  break;
++case four_cases(down1):
++  if (mpx->d==0) {
++    mpx->v+=trunc(p*mpx->dvi_scale);
++  } else {
++    mpx->h-=trunc(p*mpx->dvi_scale);
++  }
++  break;
++case y0: case four_cases(y1):
++  if (mpx->d==0) {
++    mpx->v+=mpx->y;
++  } else {
++    mpx->h-=mpx->y;
++  }
++  break;
++case z0: case four_cases(z1):
++  if (mpx->d==0) {
++    mpx->v+=mpx->z;
++  } else {
++    mpx->h-=mpx->z;
++  }
++  break;
++@z
++
++@x
++@<Check if mp file is newer than mpxfile, exit if not@>=
++if (mpx_newer(mpxopt->mpname, mpxopt->mpxname))
++   return 0
++@y
++@<Check if mp file is newer than mpxfile, exit if not@>=
++if (mpx_newer(mpxopt->mpname, mpxopt->mpxname))
++   return 0
++
++@ ASCII p\TeX JFM ID
++@d yoko_jfm_id   11 /* for `yoko-kumi' fonts */
++@d tate_jfm_id   9  /* for `tate-kumi' fonts */
++@d font_jfm_p(A)   (mpx->font_id[(A)]!=0)
++
++@ @<Global...@>=
++integer font_nt[max_fonts+1]; /* number of words in ctype table */
++integer font_id[max_fonts+1];
++integer jfm_char_code[max_widths+1];
++integer jfm_char_type[max_widths+1];
++integer jfm_char_index[max_fonts+1];
++integer next_jfm_char_index;
++
++@ @<Set init...@>=
++mpx->font_nt[0]=0;
++mpx->font_id[0]=0;
++mpx->jfm_char_type[0]=0;
++mpx->next_jfm_char_index=0;
++
++@ JFM character type table is stored in the array |jfm_char_code| and
++|jfm_char_type|. The character code and the character type of $i$-th
++record is stored in |jfm_char_code[i]| and |jfm_char_type[i]|, respectively.
++The table is in the order of character code.
++
++@<Read the pTeX header data@>=
++mpx->font_id[f]=mpx->b0*(int)(256)+mpx->b1;
++if ((mpx->font_id[f]==yoko_jfm_id) || (mpx->font_id[f]==tate_jfm_id)) {
++  mpx->font_nt[f]=mpx->b2*(int)(256)+mpx->b3;
++  mpx_read_tfm_word(mpx);
++} else {
++  mpx->font_id[f]=0;
++  mpx->font_nt[f]=0;
++}
++
++@ @<Read JFM character type table@>=
++mpx->jfm_char_index[f]=mpx->next_jfm_char_index;
++k=mpx->jfm_char_index[f];
++mpx->next_jfm_char_index+=mpx->font_nt[f];
++while (k<mpx->next_jfm_char_index) {
++  mpx_read_tfm_word(mpx);
++  mpx->jfm_char_code[k]=mpx->b0*(int)(256)+mpx->b1;
++  mpx->jfm_char_type[k]=mpx->b2*(int)(256)+mpx->b3;
++  k++;
++}
++
++@ JFM character type table is looked up by binary search.
++
++@<Declare JFM character type table lookup routine@>=
++integer mpx_lookup_ctype (MPX mpx,integer f, integer c)
++{
++  integer l, u, r, ch;
++  l=0; u=mpx->font_nt[f]-1;
++  while (l<u) {
++    r=(l+u)/2;
++    ch=mpx->jfm_char_code[mpx->jfm_char_index[f]+r];
++    if (ch==c) {
++      return mpx->jfm_char_type[mpx->jfm_char_index[f]+r];
++    }
++    if (ch<c)
++      l=r+1;
++    else
++      u=r-1;
++  }
++  return 0;
++}
++
++@ Every Kanji characters are supposed to be printable here,
++so that the state always results in normal at the end of the procedure.
++Kanji characters need to be converted into output Kanji encoding
++from DVI(JIS).
++
++@d Hi(x) (((x)>> 8) & 0xff)
++@d Lo(x) ( (x)      & 0xff)
++
++@<Declare subroutines for printing strings@>=
++void mpx_print_kanji_char (MPX mpx,integer c)
++{
++  if (mpx->print_col+2>line_length-2 ) {
++    if (mpx->state==normal) {
++      fprintf(mpx->mpxfile, "\"");
++      mpx->state=special;
++    }
++    fprintf(mpx->mpxfile, " \n");
++    mpx->print_col=0;
++  }
++  if (mpx->state==special) {
++    fprintf(mpx->mpxfile,"&");
++    mpx->print_col++;
++  }
++  if (mpx->state!=normal) {
++    fprintf(mpx->mpxfile, "\"");
++    mpx->print_col++;
++    mpx->state=normal;
++  }
++  c=toBUFF(fromDVI(c));
++  putc2(Hi(c), mpx->mpxfile);
++  mpx->print_col++;
++  putc2(Lo(c), mpx->mpxfile);
++  mpx->print_col++;
++}
++@z
 --- /dev/null
-+++ texlive-bin/texk/web2c/pmplibdir/psout.ch
++++ texlive-bin.git/texk/web2c/pmpostdir/psout.ch
 @@ -0,0 +1,42 @@
 +@x
 +integer ps_offset;
@@ -1513,8 +1761,8 @@
 +  }
 +@z
 --- /dev/null
-+++ texlive-bin/texk/web2c/pmplibdir/svgout.ch
-@@ -0,0 +1,60 @@
++++ texlive-bin.git/texk/web2c/pmpostdir/svgout.ch
+@@ -0,0 +1,59 @@
 +@x 
 +@<Character |k| is not allowed in SVG output@>=
 + (k=='&')||(k=='>')||(k=='<')
@@ -1559,7 +1807,6 @@
 +    l >>= 1;
 +    while (l-->0) {
 +         k =((int)*s++)*0x100; k += (int)*s++;
-+ 	 fprintf(stderr, "\n>>> %d\n", k); 
 +         append_string("&#");
 +         mp_svg_store_int(mp,toUCS(k));
 +         append_char(';');
diff --git a/debian/patches/series b/debian/patches/series
index e5483c2..5cdfcf6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,9 +3,5 @@ debian-builtin-searchpath
 debian-no-linked-scripts
 60_unneeded_linking
 61_path_max.diff
-#pmpost1801-2010509
-#pmpost-texlive-integration
-#pmpost-20121106-tl12
-#??? still necessary??? pmpost-svg-20120119-tl11.diff
-#xdvi-upupstream-fixes
 disable-t1lib-gd-dvipng
+pmpost-20130522

-- 
Debian packaging of texlive-bin)


Reply to: