diff options
-rw-r--r-- | Build/source/texk/web2c/ChangeLog | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/Makefile.in | 113 | ||||
-rw-r--r-- | Build/source/texk/web2c/am/web.am | 10 | ||||
-rw-r--r-- | Build/source/texk/web2c/pltotf.ch | 36 | ||||
-rwxr-xr-x | Build/source/texk/web2c/pltotf.test | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/tests/badpl.pl | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/tests/badvpl.vpl | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/vptovf.ch | 36 | ||||
-rwxr-xr-x | Build/source/texk/web2c/vptovf.test | 17 |
9 files changed, 164 insertions, 66 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 560dbdea7fc..53ca372a59b 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,11 @@ +2015-01-09 Peter Breitenlohner <peb@mppmu.mpg.de> + + * pltotf.ch, vptovf.ch: Send diagnostic messages to stderr. + Non-zero return code in case of problems. + * pltotf.test, vptovf.test: Add more tests. + * tests/badpl.pl, tests/badvpl.vpl: New test input files. + * am/web.am: Adjust for additional test input and output files. + 2014-12-11 Karl Berry <karl@tug.org> * triptest, diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index eec3bdf72a2..5e80ee04eb0 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -2083,44 +2083,44 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \ $(web_programs:=.web) $(web_programs:=.ch) $(web_tests) \ tests/memdata1.bst tests/memdata2.bst tests/memdata3.bst \ tests/allbib.aux tests/allbib.tex tests/apalike.bst \ - tests/batch.tex tests/check.log tests/cmr10.600gf \ - tests/cmr10.pk tests/cmr10.pl tests/cmr10.tfm tests/cmr7.tfm \ - tests/cmr8.tfm tests/cmti10.tfm tests/cmtt10.tfm \ - tests/cmtt8.tfm tests/dict tests/eight.tex tests/end.tex \ - tests/exampl.aux tests/exampl.tex tests/gray.tfm \ - tests/hello.tex tests/io.mf tests/just.texi tests/label.mp \ - tests/label.mpx tests/logo8.tfm tests/longline.aux \ - tests/longline.bib tests/longline.tex tests/longtfm.tex \ - tests/magic.tex tests/memtest.tex tests/mltextst.tex \ - tests/mptest.mp tests/mptest.mpx tests/one.two.mf \ - tests/one.two.mp tests/one.two.tex tests/online.mf \ - tests/openout.mp tests/openout.tex tests/pagenum.dvi \ - tests/pagenum.tex tests/patgen.in tests/patterns \ - tests/plain.mft tests/pplr.dvi tests/pplr.tfm tests/ptmr.dvi \ - tests/ptmr.tfm tests/ptmr.vf tests/ptmr.vpl tests/rpsyr.tfm \ - tests/rptmr.tfm tests/story.dvi tests/testex.err \ - tests/testex.mp tests/testex.tex tests/translate tests/uno.dos \ - tests/xampl.bib ctiedir tiedir lib/mfmpi386.asm lib/mfmpw32.c \ - lib/texmfmp.c texmfmem.h texmfmp-help.h texmfmp.h \ - $(tex_ch_srcs) $(tex_tests) tests/write18-quote.tex \ - $(mf_ch_src) mftalk.h $(mf_tests) triptrap/README \ - triptrap/mftrap.diffs triptrap/mftrap.fot triptrap/mftrap.log \ - triptrap/mftrap.pl triptrap/mftrap1.in triptrap/mftrap2.in \ - triptrap/mftrapin.log triptrap/mptrap.diffs \ - triptrap/mptrap.fot triptrap/mptrap.log triptrap/mptrap.pl \ - triptrap/mptrap.readme triptrap/mptrap1.in triptrap/mptrap2.in \ - triptrap/mptrapin.log triptrap/mtrap.0 triptrap/mtrap.1 \ - triptrap/mtrap.log triptrap/mtrap.mp triptrap/texmf.cnf \ - triptrap/trap.148 triptrap/trap.149 triptrap/trap.150 \ - triptrap/trap.151 triptrap/trap.197 triptrap/trap.200 \ - triptrap/trap.5 triptrap/trap.6 triptrap/trap.mf \ - triptrap/trap.mp triptrap/trap.mpx triptrap/trap.typ \ - triptrap/trapf.pl triptrap/trapman.tex triptrap/trip.diffs \ - triptrap/trip.fot triptrap/trip.log triptrap/trip.pl \ - triptrap/trip.tex triptrap/trip.typ triptrap/trip1.in \ - triptrap/trip2.in triptrap/tripin.log triptrap/tripman.tex \ - triptrap/tripos.tex triptrap/writeo triptrap/writeo.2 \ - mplibdir/ChangeLog $(mpost_web) $(mp_tests) \ + tests/badpl.pl tests/badvpl.vpl tests/batch.tex \ + tests/check.log tests/cmr10.600gf tests/cmr10.pk \ + tests/cmr10.pl tests/cmr10.tfm tests/cmr7.tfm tests/cmr8.tfm \ + tests/cmti10.tfm tests/cmtt10.tfm tests/cmtt8.tfm tests/dict \ + tests/eight.tex tests/end.tex tests/exampl.aux \ + tests/exampl.tex tests/gray.tfm tests/hello.tex tests/io.mf \ + tests/just.texi tests/label.mp tests/label.mpx tests/logo8.tfm \ + tests/longline.aux tests/longline.bib tests/longline.tex \ + tests/longtfm.tex tests/magic.tex tests/memtest.tex \ + tests/mltextst.tex tests/mptest.mp tests/mptest.mpx \ + tests/one.two.mf tests/one.two.mp tests/one.two.tex \ + tests/online.mf tests/openout.mp tests/openout.tex \ + tests/pagenum.dvi tests/pagenum.tex tests/patgen.in \ + tests/patterns tests/plain.mft tests/pplr.dvi tests/pplr.tfm \ + tests/ptmr.dvi tests/ptmr.tfm tests/ptmr.vf tests/ptmr.vpl \ + tests/rpsyr.tfm tests/rptmr.tfm tests/story.dvi \ + tests/testex.err tests/testex.mp tests/testex.tex \ + tests/translate tests/uno.dos tests/xampl.bib ctiedir tiedir \ + lib/mfmpi386.asm lib/mfmpw32.c lib/texmfmp.c texmfmem.h \ + texmfmp-help.h texmfmp.h $(tex_ch_srcs) $(tex_tests) \ + tests/write18-quote.tex $(mf_ch_src) mftalk.h $(mf_tests) \ + triptrap/README triptrap/mftrap.diffs triptrap/mftrap.fot \ + triptrap/mftrap.log triptrap/mftrap.pl triptrap/mftrap1.in \ + triptrap/mftrap2.in triptrap/mftrapin.log \ + triptrap/mptrap.diffs triptrap/mptrap.fot triptrap/mptrap.log \ + triptrap/mptrap.pl triptrap/mptrap.readme triptrap/mptrap1.in \ + triptrap/mptrap2.in triptrap/mptrapin.log triptrap/mtrap.0 \ + triptrap/mtrap.1 triptrap/mtrap.log triptrap/mtrap.mp \ + triptrap/texmf.cnf triptrap/trap.148 triptrap/trap.149 \ + triptrap/trap.150 triptrap/trap.151 triptrap/trap.197 \ + triptrap/trap.200 triptrap/trap.5 triptrap/trap.6 \ + triptrap/trap.mf triptrap/trap.mp triptrap/trap.mpx \ + triptrap/trap.typ triptrap/trapf.pl triptrap/trapman.tex \ + triptrap/trip.diffs triptrap/trip.fot triptrap/trip.log \ + triptrap/trip.pl triptrap/trip.tex triptrap/trip.typ \ + triptrap/trip1.in 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) $(pmpost_tests) \ $(upmpost_tests) pmpostdir/tests/psample.mp $(libmplib_web) \ $(etex_web_srcs) $(etex_ch_srcs) etexdir/ChangeLog \ @@ -2343,24 +2343,25 @@ DISTCLEANFILES = $(EXTRA_LIBRARIES) CXXLD.sh tangle.c tangle.h \ tests/xpagenum.typ cmr10.dvi tests/xcmr10.dvi cmr10.pk \ tests/xcmr10.pk tests/xcmr10.gft1 tests/xcmr10.gft2 io.tex \ tests/io.tex tests/xpatout pattmp.4 cmr10.gf \ - tests/xcmr10.600gf tests/xcmr10.pktyp tests/xcmr10.tfm \ - tests/xtexpool.typ tests/xcmr10.pl tests/xptmr.vpl \ - tests/yptmr*.* pooltype.tex ctie.c cweave.c tie.c ctie.outc \ - ctie.outm common.tex common.scn common.idx tie.outc tie.outm \ - $(nodist_tex_SOURCES) tex-final.ch tex-web2c tex.p tex.pool \ - tex-tangle trip.diffs write18-quote.log mftrap.diffs \ - $(nodist_libmf_a_SOURCES) mf-final.ch mf-web2c mf.p mf.pool \ - mf-tangle $(nodist_mpost_SOURCES) mpxout-tangle mptrap.diffs \ - ptmr.mpx tests/xptmr.mpx tests/xstory.mpx \ - $(nodist_pmpost_SOURCES) pmp.w pmpost.w pmpxout.w ppsout.w \ - psvgout.w ptfmin.w pmp-tangle pmpxout-tangle ppsout-tangle \ - psvgout-tangle pmpsamp.* upmpsamp.* \ - $(nodist_libmplib_a_SOURCES) mp-tangle mpmath-tangle \ - mpmathbinary-tangle mpmathdecimal-tangle mpmathdouble-tangle \ - mpstrings-tangle psout-tangle svgout-tangle pngout-tangle \ - $(nodist_etex_SOURCES) etex.web etex.ch etex-web2c etex.p \ - etex.pool etex-tangle etrip.diffs ewprob.log ewprob.tex \ - $(pweb_programs:=.c) $(pweb_programs:=.h) $(pweb_programs:=.p) \ + tests/xcmr10.600gf tests/xcmr10.pktyp tests/badpl.* \ + tests/xcmr10.tfm tests/xtexpool.typ tests/xcmr10.pl \ + tests/xptmr.vpl tests/badvpl.* tests/yptmr*.* pooltype.tex \ + ctie.c cweave.c tie.c ctie.outc ctie.outm common.tex \ + common.scn common.idx tie.outc tie.outm $(nodist_tex_SOURCES) \ + tex-final.ch tex-web2c tex.p tex.pool tex-tangle trip.diffs \ + write18-quote.log mftrap.diffs $(nodist_libmf_a_SOURCES) \ + mf-final.ch mf-web2c mf.p mf.pool mf-tangle \ + $(nodist_mpost_SOURCES) mpxout-tangle mptrap.diffs ptmr.mpx \ + tests/xptmr.mpx tests/xstory.mpx $(nodist_pmpost_SOURCES) \ + pmp.w pmpost.w pmpxout.w ppsout.w psvgout.w ptfmin.w \ + pmp-tangle pmpxout-tangle ppsout-tangle psvgout-tangle \ + pmpsamp.* upmpsamp.* $(nodist_libmplib_a_SOURCES) mp-tangle \ + mpmath-tangle mpmathbinary-tangle mpmathdecimal-tangle \ + mpmathdouble-tangle mpstrings-tangle psout-tangle \ + svgout-tangle pngout-tangle $(nodist_etex_SOURCES) etex.web \ + etex.ch etex-web2c etex.p etex.pool etex-tangle etrip.diffs \ + ewprob.log ewprob.tex $(pweb_programs:=.c) \ + $(pweb_programs:=.h) $(pweb_programs:=.p) \ $(pweb_programs:=-web2c) $(pweb_programs:=.web) \ $(nodist_ptex_SOURCES) ptex.web ptex.ch ptex-web2c ptex.p \ ptex.pool ptex-tangle ptests/nissya_bib.* ptests/xexampl.aux \ diff --git a/Build/source/texk/web2c/am/web.am b/Build/source/texk/web2c/am/web.am index 1efa64b198f..c7fa2b522b7 100644 --- a/Build/source/texk/web2c/am/web.am +++ b/Build/source/texk/web2c/am/web.am @@ -1,6 +1,6 @@ ## texk/web2c/am/web.am: Makefile fragment for normal web programs (except tangle). ## -## Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org> +## Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. web_programs = bibtex dvicopy dvitype gftodvi gftopk gftype mft \ @@ -182,8 +182,8 @@ DISTCLEANFILES += tests/xpatout pattmp.4 DISTCLEANFILES += cmr10.gf tests/xcmr10.600gf ## pktype.test DISTCLEANFILES += tests/xcmr10.pktyp -## pltotf.tes -DISTCLEANFILES += tests/xcmr10.tfm +## pltotf.test +DISTCLEANFILES += tests/badpl.* tests/xcmr10.tfm ## pooltype.test DISTCLEANFILES += tests/xtexpool.typ ## tftopl.test @@ -191,7 +191,7 @@ DISTCLEANFILES += tests/xcmr10.pl ## vftovp.test DISTCLEANFILES += tests/xptmr.vpl ## vptovf.test -DISTCLEANFILES += tests/yptmr*.* +DISTCLEANFILES += tests/badvpl.* tests/yptmr*.* ## weave.test DISTCLEANFILES += pooltype.tex @@ -201,6 +201,8 @@ EXTRA_DIST += \ tests/allbib.aux \ tests/allbib.tex \ tests/apalike.bst \ + tests/badpl.pl \ + tests/badvpl.vpl \ tests/batch.tex \ tests/check.log \ tests/cmr10.600gf \ diff --git a/Build/source/texk/web2c/pltotf.ch b/Build/source/texk/web2c/pltotf.ch index 012ea24d738..5dd4d3eb9b1 100644 --- a/Build/source/texk/web2c/pltotf.ch +++ b/Build/source/texk/web2c/pltotf.ch @@ -26,6 +26,14 @@ @d banner=='This is PLtoTF, Version 3.6' {printed when the program starts} @z +@x [2] Print all terminal output on stderr. +@d print(#)==write(#) +@d print_ln(#)==write_ln(#) +@y +@d print(#)==write(stderr,#) +@d print_ln(#)==write_ln(stderr,#) +@z + @x [still 2] No banner unless verbose. procedure initialize; {this procedure gets things started properly} var @<Local variables for initialization@>@/ @@ -95,6 +103,27 @@ rewritebin (tfm_file, tfm_name); @d first_ord=0 {ordinal number of the smallest element of |char|} @z +@x [25] Non-zero return code in case of problems. +@!chars_on_line:0..8; {the number of characters printed on the current line} +@y +@!chars_on_line:0..8; {the number of characters printed on the current line} +@!perfect:boolean; {was the file free of errors?} +@z + +@x [26] Non-zero return code in case of problems. +chars_on_line:=0; +@y +chars_on_line:=0; +perfect:=true; {innocent until proved guilty} +@z + +@x [27] Non-zero return code in case of problems. +chars_on_line:=0; +@y +chars_on_line:=0; +perfect:=false; +@z + @x [79] `index' might be a library routine. |k|th element of its list. @y @@ -201,6 +230,13 @@ read_input; if verbose then print_ln('.'); @z +@x [147] Non-zero return code in case of problems, +end. +@y +if not perfect then uexit(1); +end. +@z + @x [148] System-dependent changes. This section should be replaced, if necessary, by changes to the program that are necessary to make \.{PLtoTF} work at a particular installation. diff --git a/Build/source/texk/web2c/pltotf.test b/Build/source/texk/web2c/pltotf.test index 2ce47359be4..1f071e5d700 100755 --- a/Build/source/texk/web2c/pltotf.test +++ b/Build/source/texk/web2c/pltotf.test @@ -1,10 +1,16 @@ #! /bin/sh -# Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org> +# Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. test -d tests || mkdir -p tests +./pltotf -help || exit 1 + +./pltotf -version || exit 1 + +./pltotf -verbose $srcdir/tests/badpl && exit 1 + ./pltotf -verbose $srcdir/tests/cmr10 tests/xcmr10 || exit 1 cmp $srcdir/tests/cmr10.tfm tests/xcmr10.tfm || exit 1 diff --git a/Build/source/texk/web2c/tests/badpl.pl b/Build/source/texk/web2c/tests/badpl.pl new file mode 100644 index 00000000000..60134e6dfa2 --- /dev/null +++ b/Build/source/texk/web2c/tests/badpl.pl @@ -0,0 +1 @@ +Not a PL file. diff --git a/Build/source/texk/web2c/tests/badvpl.vpl b/Build/source/texk/web2c/tests/badvpl.vpl new file mode 100644 index 00000000000..5159b521861 --- /dev/null +++ b/Build/source/texk/web2c/tests/badvpl.vpl @@ -0,0 +1 @@ +Not a VPL file. diff --git a/Build/source/texk/web2c/vptovf.ch b/Build/source/texk/web2c/vptovf.ch index bbfa6e4d2a4..3d76f095f3d 100644 --- a/Build/source/texk/web2c/vptovf.ch +++ b/Build/source/texk/web2c/vptovf.ch @@ -15,6 +15,14 @@ @d banner=='This is VPtoVF, Version 1.6' {printed when the program starts} @z +@x [2] Print all terminal output on stderr. +@d print(#)==write(#) +@d print_ln(#)==write_ln(#) +@y +@d print(#)==write(stderr,#) +@d print_ln(#)==write_ln(stderr,#) +@z + @x [2] Print the banner later. procedure initialize; {this procedure gets things started properly} var @<Local variables for initialization@>@/ @@ -89,6 +97,27 @@ rewritebin (tfm_file, tfm_name); @d first_ord=0 {ordinal number of the smallest element of |char|} @z +@x [31] Non-zero return code in case of problems. +@!chars_on_line:0..8; {the number of characters printed on the current line} +@y +@!chars_on_line:0..8; {the number of characters printed on the current line} +@!perfect:boolean; {was the file free of errors?} +@z + +@x [32] Non-zero return code in case of problems. +chars_on_line:=0; +@y +chars_on_line:=0; +perfect:=true; {innocent until proved guilty} +@z + +@x [33] Non-zero return code in case of problems. +chars_on_line:=0; +@y +chars_on_line:=0; +perfect:=false; +@z + % [89] `index' is not a good choice for an identifier on Unix systems. % Neither is `class', on AIX. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -191,6 +220,13 @@ read_input; if verbose then print_ln('.'); @z +@x [181] Non-zero return code in case of problems, +end. +@y +if not perfect then uexit(1); +end. +@z + @x [182] System-dependent changes. This section should be replaced, if necessary, by changes to the program that are necessary to make \.{VPtoVF} work at a particular installation. diff --git a/Build/source/texk/web2c/vptovf.test b/Build/source/texk/web2c/vptovf.test index 922a62b8cd8..3f54fb0b45f 100755 --- a/Build/source/texk/web2c/vptovf.test +++ b/Build/source/texk/web2c/vptovf.test @@ -1,19 +1,26 @@ #! /bin/sh -# Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org> +# Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. test -d tests || mkdir -p tests -TEXMFCNF=$srcdir/../kpathsea \ - ./vptovf $srcdir/tests/ptmr tests/yptmr tests/yptmr || exit 1 +./vptovf -help || exit 1 + +./vptovf -version || exit 1 + +TEXMFCNF=$srcdir/../kpathsea +export TEXMFCNF + +./vptovf -verbose $srcdir/tests/badvpl && exit 1 + +./vptovf -verbose $srcdir/tests/ptmr tests/yptmr tests/yptmr || exit 1 cmp $srcdir/tests/ptmr.vf tests/yptmr.vf || exit 1 cmp $srcdir/tests/ptmr.tfm tests/yptmr.tfm || exit 1 -TEXMFCNF=$srcdir/../kpathsea \ - ./vptovf $srcdir/tests/ptmr tests/yptmr2.vf || exit 1 +./vptovf -verbose $srcdir/tests/ptmr tests/yptmr2.vf || exit 1 cmp $srcdir/tests/ptmr.vf tests/yptmr2.vf || exit 1 |