From 46f2ce3859e36658833aedad0a5f7e7256ddcf7c Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Wed, 17 Sep 2014 09:30:27 +0000 Subject: (u)pMetaPost: Bug fix for upTeX fonts and monor cleanup git-svn-id: svn://tug.org/texlive/trunk@35188 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/Makefile.in | 31 ++++++------ Build/source/texk/web2c/pmpostdir/ChangeLog | 6 +++ Build/source/texk/web2c/pmpostdir/am/pmpost.am | 3 -- Build/source/texk/web2c/pmpostdir/pmp.ch | 10 ++-- Build/source/texk/web2c/pmpostdir/pmpost.ch | 66 ++++++++++---------------- Build/source/texk/web2c/pmpostdir/ppsout.ch | 13 +---- Build/source/texk/web2c/pmpostdir/ptfmin.ch | 11 ++++- Build/source/texk/web2c/pmpostdir/upmp.ch | 12 ----- 8 files changed, 61 insertions(+), 91 deletions(-) delete mode 100644 Build/source/texk/web2c/pmpostdir/upmp.ch (limited to 'Build/source') diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index 563d6810fe0..d4c0a00a1f4 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -2113,22 +2113,21 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \ triptrap/trip2.in triptrap/tripin.log triptrap/tripman.tex \ triptrap/tripos.tex triptrap/writeo triptrap/writeo.2 \ mplibdir/ChangeLog $(mpost_web) $(mp_tests) \ - pmpostdir/ChangeLog $(pmpost_web) $(pmp_tests) \ - pmpostdir/upmp.ch $(libmplib_web) $(etex_web_srcs) \ - $(etex_ch_srcs) etexdir/ChangeLog etexdir/etex_gen.tex \ - $(etex_tests) tests/wprob.tex etexdir/etrip/etrip.diffs \ - etexdir/etrip/etrip.fot etexdir/etrip/etrip.log \ - etexdir/etrip/etrip.out etexdir/etrip/etrip.pl \ - etexdir/etrip/etrip.tex etexdir/etrip/etrip.typ \ - etexdir/etrip/etrip1.in etexdir/etrip/etrip2.in \ - etexdir/etrip/etrip3.in etexdir/etrip/etripin.log \ - etexdir/etrip/etripman.tex etexdir/etrip/texmf.cnf \ - etexdir/etrip/trip2.in $(ptex_tests) $(pweb_tests) \ - $(ptex_web_srcs) $(ptex_ch_srcs) ptexdir/ptex.defines \ - ptexdir/pbibtex.ch web2c/cvtbib.sed ptexdir/pdvitype.ch \ - ptexdir/ppltotf.ch ptexdir/ptftopl.ch ptexdir/COPYRIGHT \ - ptexdir/COPYRIGHT.jis ptexdir/ChangeLog ptexdir/Changes.txt \ - ptexdir/INSTALL.txt ptexdir/README.txt \ + pmpostdir/ChangeLog $(pmpost_web) $(pmp_tests) $(libmplib_web) \ + $(etex_web_srcs) $(etex_ch_srcs) etexdir/ChangeLog \ + etexdir/etex_gen.tex $(etex_tests) tests/wprob.tex \ + etexdir/etrip/etrip.diffs etexdir/etrip/etrip.fot \ + etexdir/etrip/etrip.log etexdir/etrip/etrip.out \ + etexdir/etrip/etrip.pl etexdir/etrip/etrip.tex \ + etexdir/etrip/etrip.typ etexdir/etrip/etrip1.in \ + etexdir/etrip/etrip2.in etexdir/etrip/etrip3.in \ + etexdir/etrip/etripin.log etexdir/etrip/etripman.tex \ + etexdir/etrip/texmf.cnf etexdir/etrip/trip2.in $(ptex_tests) \ + $(pweb_tests) $(ptex_web_srcs) $(ptex_ch_srcs) \ + ptexdir/ptex.defines ptexdir/pbibtex.ch web2c/cvtbib.sed \ + ptexdir/pdvitype.ch ptexdir/ppltotf.ch ptexdir/ptftopl.ch \ + ptexdir/COPYRIGHT ptexdir/COPYRIGHT.jis ptexdir/ChangeLog \ + ptexdir/Changes.txt ptexdir/INSTALL.txt ptexdir/README.txt \ ptexdir/tests/nissya_bib.aux ptexdir/tests/nissya.bst \ ptexdir/tests/sample.bib tests/memdata1.bst tests/memdata2.bst \ tests/memdata3.bst ptexdir/tests/goth10.tfm \ diff --git a/Build/source/texk/web2c/pmpostdir/ChangeLog b/Build/source/texk/web2c/pmpostdir/ChangeLog index 98677828d27..0e3eeadb4d5 100644 --- a/Build/source/texk/web2c/pmpostdir/ChangeLog +++ b/Build/source/texk/web2c/pmpostdir/ChangeLog @@ -1,3 +1,9 @@ +2014-09-17 Peter Breitenlohner + + * ptfmin.ch: Allow character codes up to 0xffff. + * pmp.ch, pmpost.ch, ppsout.ch: Use P_UP prefix to handle + strings pMetaPost vs upMetaPost and similar. + 2014-09-05 Peter Breitenlohner * Import pMetaPost and upMetaPost from ???. diff --git a/Build/source/texk/web2c/pmpostdir/am/pmpost.am b/Build/source/texk/web2c/pmpostdir/am/pmpost.am index 71c0de0bc16..b0d5a86b06b 100644 --- a/Build/source/texk/web2c/pmpostdir/am/pmpost.am +++ b/Build/source/texk/web2c/pmpostdir/am/pmpost.am @@ -178,6 +178,3 @@ if UPMP TESTS += pmpostdir/upmpost.test endif UPMP -## Unresolved pMetaPost/upMetaPost diff -EXTRA_DIST += pmpostdir/upmp.ch - diff --git a/Build/source/texk/web2c/pmpostdir/pmp.ch b/Build/source/texk/web2c/pmpostdir/pmp.ch index aef89a90598..2e6023e223e 100644 --- a/Build/source/texk/web2c/pmpostdir/pmp.ch +++ b/Build/source/texk/web2c/pmpostdir/pmp.ch @@ -21,13 +21,13 @@ #define metapost_version "1.999" @y #ifdef UPMP -#define metapost_name "upMetaPost" +#define P_UP "up" #define metapost_version "1.999-0.04-u1.11" #else -#define metapost_name "pMetaPost" +#define P_UP "p" #define metapost_version "1.999-0.04" #endif -#define default_banner "This is " metapost_name ", Version " metapost_version /* printed when \MP\ starts */ +#define default_banner "This is " P_UP "MetaPost, Version " metapost_version /* printed when \MP\ starts */ @z @x @@ -307,9 +307,6 @@ void mp_set_text_box (MP mp, mp_text_node p) { @y @; void mp_set_text_box (MP mp, mp_text_node p) { -#ifdef UPMP - integer cx; /* code for Japanese two byte character */ -#endif @z @x @@ -323,6 +320,7 @@ void mp_set_text_box (MP mp, mp_text_node p) { } else { if (mp->font_id[f]!=0) { #ifdef UPMP + integer cx; /* code for Japanese two byte character */ if (multistrlen(mp_text_p (p)->str, kk, k)>1) { cx=fromBUFF(mp_text_p (p)->str, kk, k); k=k+multistrlen(mp_text_p (p)->str, kk, k)-1; diff --git a/Build/source/texk/web2c/pmpostdir/pmpost.ch b/Build/source/texk/web2c/pmpostdir/pmpost.ch index 250ad137585..01b57fc5ccf 100644 --- a/Build/source/texk/web2c/pmpostdir/pmpost.ch +++ b/Build/source/texk/web2c/pmpostdir/pmpost.ch @@ -9,28 +9,13 @@ char kanjioption[16]; @x @d TEX "tex" @y +@d TEX "e" P_UP "tex" @z @x -#ifndef MPXCOMMAND #define MPXCOMMAND "makempx" -#endif @y -#ifdef UPMP -#define TEX "eptex" -#ifndef MPXCOMMAND -#define MPXCOMMAND "upmakempx" -#endif -#define mpost_name "upmpost" -#define dvitomp_name "updvitomp" -#else -#define TEX "euptex" -#ifndef MPXCOMMAND -#define MPXCOMMAND "pmakempx" -#endif -#define mpost_name "pmpost" -#define dvitomp_name "pdvitomp" -#endif +#define MPXCOMMAND P_UP "makempx" @z @x @@ -93,13 +78,13 @@ char kanjioption[16]; @x const char *banner = "% Written by metapost version "; @y - const char *banner = "% Written by " mpost_name " version "; + const char *banner = "% Written by " P_UP "mpost version "; @z @x const char *banner = "% Written by dvitomp version "; @y - const char *banner = "% Written by " dvitomp_name " version "; + const char *banner = "% Written by " P_UP "dvitomp version "; @z @x @@ -110,18 +95,15 @@ char kanjioption[16]; @z @x - if (user_progname == NULL) - user_progname = optarg; - } + } else if (ARGUMENT_IS ("interaction")) { @y - if (user_progname == NULL) - user_progname = optarg; - } } else if (ARGUMENT_IS ("kanji")) { strcpy(kanjioption, optarg); if(!set_enc_string(optarg, optarg)) { fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg); } + + } else if (ARGUMENT_IS ("interaction")) { @z @x @@ -149,9 +131,9 @@ char kanjioption[16]; else fprintf(stdout, "This is MetaPost %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); @y - fprintf(stdout, "This is " dvitomp_name " %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); + fprintf(stdout, "This is " P_UP "dvitomp %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); else - fprintf(stdout, "This is " metapost_name " %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); + fprintf(stdout, "This is " P_UP "MetaPost %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); @z @x @@ -167,17 +149,17 @@ else fprintf(stdout, " -ini be inimpost, for dumping mem files\n" @y -"Usage: " mpost_name " [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n" -" " mpost_name " --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"Usage: " P_UP "mpost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n" +" " P_UP "mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" "\n" -" Run " metapost_name " on MPNAME, usually creating MPNAME.NNN (and perhaps\n" +" Run " P_UP "MetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n" " MPNAME.tfm), where NNN are the character numbers generated.\n" -" Any remaining COMMANDS are processed as " metapost_name " input,\n" +" Any remaining COMMANDS are processed as " P_UP "MetaPost input,\n" " after MPNAME is read.\n\n" -" With a --dvitomp argument, " metapost_name " acts as DVI-to-MPX converter only.\n" -" Call " metapost_name " with --dvitomp --help for option explanations.\n\n"); +" With a --dvitomp argument, " P_UP "MetaPost acts as DVI-to-MPX converter only.\n" +" Call " P_UP "MetaPost with --dvitomp --help for option explanations.\n\n"); fprintf(stdout, -" -ini be ini" mpost_name ", for dumping mem files\n" +" -ini be ini" P_UP "mpost, for dumping mem files\n" @z @x @@ -200,17 +182,17 @@ fprintf(stdout, else fprintf(stdout, "This is MetaPost %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); @y - fprintf(stdout, "This is " dvitomp_name " %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); + fprintf(stdout, "This is " P_UP "dvitomp %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); else - fprintf(stdout, "This is " metapost_name " %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); + fprintf(stdout, "This is " P_UP "MetaPost %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); @z @x "Usage: dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" " mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" @y -"Usage: " dvitomp_name " DVINAME[.dvi] [MPXNAME[.mpx]]\n" -" " mpost_name " --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +"Usage: " P_UP "dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" +" " P_UP "mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n" @z @x @@ -229,9 +211,9 @@ else else fprintf(stdout, "MetaPost %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); @y - fprintf(stdout, dvitomp_name " (" metapost_name ") %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); + fprintf(stdout, P_UP "dvitomp (" P_UP "MetaPost) %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); else - fprintf(stdout, metapost_name " %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); + fprintf(stdout, P_UP "MetaPost %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string); @z @x @@ -248,7 +230,7 @@ else @x const char * banner = "This is MetaPost, version "; @y - const char * banner = "This is " metapost_name ", version "; + const char * banner = "This is " P_UP "MetaPost, version "; @z @x @@ -284,5 +266,5 @@ else @x if(putenv(xstrdup("engine=metapost"))) @y - if(putenv(xstrdup("engine=" mpost_name))) + if(putenv(xstrdup("engine=" P_UP "mpost"))) @z diff --git a/Build/source/texk/web2c/pmpostdir/ppsout.ch b/Build/source/texk/web2c/pmpostdir/ppsout.ch index f1ca7cfe6c4..ec6ee5fdefd 100644 --- a/Build/source/texk/web2c/pmpostdir/ppsout.ch +++ b/Build/source/texk/web2c/pmpostdir/ppsout.ch @@ -36,9 +36,6 @@ static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues); static void mp_ps_kanji_string_out (MP mp, char *s) { int i, c; -#ifdef UPMP - int cx; -#endif size_t len; len = strlen(s); @@ -51,7 +48,7 @@ static void mp_ps_kanji_string_out (MP mp, char *s) c=toDVI(fromBUFF((unsigned char*)s, len, i)); i=i+multistrlen((unsigned char*)s, len, i); if (isinternalUPTEX() && c>65535) { - cx=UTF32toUTF16HS(c); /* High surrogate */ + int cx=UTF32toUTF16HS(c); /* High surrogate */ mp_hex_digit_out(mp, Hi(cx) / 16); mp_hex_digit_out(mp, Hi(cx) % 16); mp_hex_digit_out(mp, Lo(cx) / 16); @@ -74,22 +71,16 @@ static void mp_ps_kanji_string_out (MP mp, char *s) @x mp_ps_print_nl(mp, "%%Creator: MetaPost "); @y -#ifdef UPMP - mp_ps_print_nl(mp, "%%Creator: MetaPost (upTeX version) "); -#else - mp_ps_print_nl(mp, "%%Creator: MetaPost (Japanese version) "); -#endif + mp_ps_print_nl(mp, "%%Creator: " P_UP "MetaPost "); @z % % Call Kanji string output routine if the font is JFM. @x mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p)); - mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false); @y if (mp->font_id[gr_font_n(p)]!=0) mp_ps_kanji_string_out(mp, gr_text_p(p)); else mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p)); - mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false); @z diff --git a/Build/source/texk/web2c/pmpostdir/ptfmin.ch b/Build/source/texk/web2c/pmpostdir/ptfmin.ch index 0cfc5b12f72..2990dc11044 100644 --- a/Build/source/texk/web2c/pmpostdir/ptfmin.ch +++ b/Build/source/texk/web2c/pmpostdir/ptfmin.ch @@ -30,6 +30,15 @@ |goto done|@> @z +@x +@d read_two(A) { (A)=tfbyte; +@y +@d read_pair(A) { (A)=tfbyte; + tfget; (A)=(A)*0400+tfbyte; +} +@d read_two(A) { (A)=tfbyte; +@z + % % routine to process JFM file format @x @@ -82,7 +91,7 @@ tf_ignore(4*(tfm_lh-2)) ii=mp->ctype_base[n]+nt; i=mp->ctype_base[n]; while ( ifont_info[i].hh.LH=ct; tfget; read_two(ct); mp->font_info[i].hh.RH=ct; diff --git a/Build/source/texk/web2c/pmpostdir/upmp.ch b/Build/source/texk/web2c/pmpostdir/upmp.ch deleted file mode 100644 index a7e99a0cc4b..00000000000 --- a/Build/source/texk/web2c/pmpostdir/upmp.ch +++ /dev/null @@ -1,12 +0,0 @@ -% -% routine to process JFM file format -@x -@d read_two(A) { (A)=tfbyte; - if ( (A)>127 ) goto BAD_TFM; - tfget; (A)=(A)*0400+tfbyte; -} -@y -@d read_two(A) { (A)=tfbyte; - tfget; (A)=(A)*0400+tfbyte; -} -@z -- cgit v1.2.3