diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-12-16 08:47:28 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-12-16 08:47:28 +0000 |
commit | b60ee0010b8e89430860ec587af1a5abe303b014 (patch) | |
tree | 60a7e51807a390e31d8074be5991e4198aeb80ec /Build/source/texk/ps2pk | |
parent | c44bc902114ef48c9c6af7814ca67b3a5644e749 (diff) |
texk/ps2pk (1.7): Additional tests
git-svn-id: svn://tug.org/texlive/trunk@35838 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ps2pk')
-rw-r--r-- | Build/source/texk/ps2pk/ChangeLog | 10 | ||||
-rw-r--r-- | Build/source/texk/ps2pk/Makefile.am | 8 | ||||
-rw-r--r-- | Build/source/texk/ps2pk/Makefile.in | 67 | ||||
-rw-r--r-- | Build/source/texk/ps2pk/pktest.c | 8 | ||||
-rwxr-xr-x | Build/source/texk/ps2pk/tests/ps2pk.test | 6 |
5 files changed, 75 insertions, 24 deletions
diff --git a/Build/source/texk/ps2pk/ChangeLog b/Build/source/texk/ps2pk/ChangeLog index 1586afe1198..ff8185a6d67 100644 --- a/Build/source/texk/ps2pk/ChangeLog +++ b/Build/source/texk/ps2pk/ChangeLog @@ -1,3 +1,13 @@ +2014-12-16 Peter Breitenlohner <peb@mppmu.mpg.de> + + * Makefile.am (noinst_PROGRAMS): Build pktest. + * pktest.c: ANSI/ISO C. + * tests/ps2pk.test: Test PK (pk2bm) BM (pktest) PK (pk2bm) BM. + + * basics.[ch], configure.ac, encoding.c, filenames.[ch], + pkout.[ch], pktest.c, ps2pk.c, psearch.c, types.h: + Version 1.7 (December 2014). + 2014-12-15 Peter Breitenlohner <peb@mppmu.mpg.de> Applied some changes from Version 1.6beta1 (ctan.org/pkg/ps2pk). diff --git a/Build/source/texk/ps2pk/Makefile.am b/Build/source/texk/ps2pk/Makefile.am index 12c7d3f64e6..407c62bf3c8 100644 --- a/Build/source/texk/ps2pk/Makefile.am +++ b/Build/source/texk/ps2pk/Makefile.am @@ -4,6 +4,7 @@ ## You may freely use, modify and/or distribute this file. ## bin_PROGRAMS = mag pfb2pfa pk2bm ps2pk +noinst_PROGRAMS = pktest AM_CPPFLAGS = $(KPATHSEA_INCLUDES) -DUNIX -DKPATHSEA AM_CFLAGS = $(WARNING_CFLAGS) @@ -88,6 +89,13 @@ ps2pk_SOURCES = \ util.c \ util.h +pktest_SOURCES = \ + basics.c \ + basics.h \ + pkout.c \ + pkout.h \ + pktest.c + $(mag_OBJECTS) $(pfb2pfa_OBJECTS) $(ps2pk_OBJECTS): $(KPATHSEA_DEPEND) ## Rebuild libkpathsea diff --git a/Build/source/texk/ps2pk/Makefile.in b/Build/source/texk/ps2pk/Makefile.in index 5ac246e7c31..e4a171ef4c0 100644 --- a/Build/source/texk/ps2pk/Makefile.in +++ b/Build/source/texk/ps2pk/Makefile.in @@ -80,6 +80,7 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mag$(EXEEXT) pfb2pfa$(EXEEXT) pk2bm$(EXEEXT) \ ps2pk$(EXEEXT) +noinst_PROGRAMS = pktest$(EXEEXT) subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ @@ -115,7 +116,7 @@ CONFIG_HEADER = c-auto.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -PROGRAMS = $(bin_PROGRAMS) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_mag_OBJECTS = basics.$(OBJEXT) mag.$(OBJEXT) mag_OBJECTS = $(am_mag_OBJECTS) mag_LDADD = $(LDADD) @@ -134,6 +135,10 @@ am_pk2bm_OBJECTS = basics.$(OBJEXT) pk2bm.$(OBJEXT) pkin.$(OBJEXT) pk2bm_OBJECTS = $(am_pk2bm_OBJECTS) pk2bm_LDADD = $(LDADD) pk2bm_DEPENDENCIES = $(am__DEPENDENCIES_1) +am_pktest_OBJECTS = basics.$(OBJEXT) pkout.$(OBJEXT) pktest.$(OBJEXT) +pktest_OBJECTS = $(am_pktest_OBJECTS) +pktest_LDADD = $(LDADD) +pktest_DEPENDENCIES = $(am__DEPENDENCIES_1) am_ps2pk_OBJECTS = arith.$(OBJEXT) basics.$(OBJEXT) bstring.$(OBJEXT) \ curves.$(OBJEXT) encoding.$(OBJEXT) filenames.$(OBJEXT) \ fontfcn.$(OBJEXT) hints.$(OBJEXT) lines.$(OBJEXT) \ @@ -180,9 +185,9 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mag_SOURCES) $(pfb2pfa_SOURCES) $(pk2bm_SOURCES) \ - $(ps2pk_SOURCES) + $(pktest_SOURCES) $(ps2pk_SOURCES) DIST_SOURCES = $(mag_SOURCES) $(pfb2pfa_SOURCES) $(pk2bm_SOURCES) \ - $(ps2pk_SOURCES) + $(pktest_SOURCES) $(ps2pk_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -634,6 +639,13 @@ ps2pk_SOURCES = \ util.c \ util.h +pktest_SOURCES = \ + basics.c \ + basics.h \ + pkout.c \ + pkout.h \ + pktest.c + dist_man1_MANS = mag.1 pfb2pfa.1 pk2bm.1 ps2pk.1 TESTS_ENVIRONMENT = KPSEWHICH='$(KPSEWHICH)' TESTS = tests/lmmath.test tests/ps2pk.test @@ -749,6 +761,15 @@ clean-binPROGRAMS: echo " rm -f" $$list; \ rm -f $$list +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + mag$(EXEEXT): $(mag_OBJECTS) $(mag_DEPENDENCIES) $(EXTRA_mag_DEPENDENCIES) @rm -f mag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mag_OBJECTS) $(mag_LDADD) $(LIBS) @@ -761,6 +782,10 @@ pk2bm$(EXEEXT): $(pk2bm_OBJECTS) $(pk2bm_DEPENDENCIES) $(EXTRA_pk2bm_DEPENDENCIE @rm -f pk2bm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pk2bm_OBJECTS) $(pk2bm_LDADD) $(LIBS) +pktest$(EXEEXT): $(pktest_OBJECTS) $(pktest_DEPENDENCIES) $(EXTRA_pktest_DEPENDENCIES) + @rm -f pktest$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pktest_OBJECTS) $(pktest_LDADD) $(LIBS) + ps2pk$(EXEEXT): $(ps2pk_OBJECTS) $(ps2pk_DEPENDENCIES) $(EXTRA_ps2pk_DEPENDENCIES) @rm -f ps2pk$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ps2pk_OBJECTS) $(ps2pk_LDADD) $(LIBS) @@ -787,6 +812,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pk2bm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkout.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pktest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ps2pk.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanfont.Po@am__quote@ @@ -1295,7 +1321,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -1372,22 +1399,22 @@ uninstall-man: uninstall-man1 .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ check-am clean clean-binPROGRAMS clean-cscope clean-generic \ - clean-libtool cscope cscopelist-am ctags ctags-am dist \ - dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \ - uninstall uninstall-am uninstall-binPROGRAMS uninstall-man \ - uninstall-man1 + clean-libtool clean-noinstPROGRAMS cscope cscopelist-am ctags \ + ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \ + dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man1 install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-man uninstall-man1 $(mag_OBJECTS) $(pfb2pfa_OBJECTS) $(ps2pk_OBJECTS): $(KPATHSEA_DEPEND) diff --git a/Build/source/texk/ps2pk/pktest.c b/Build/source/texk/ps2pk/pktest.c index c6fc7ea8b71..61ae6d59acd 100644 --- a/Build/source/texk/ps2pk/pktest.c +++ b/Build/source/texk/ps2pk/pktest.c @@ -17,12 +17,13 @@ int testing = 1; #include "basics.h" /* fatal() */ #include "pkout.h" -main(int argc, char *argv[]) +static int next_pixel(void); + +int main(int argc, char *argv[]) { int done, C = 0, W = 0, H = 0, c; const char *myname; char *pkname, comment[256]; - int next_pixel(); myname = argv[0]; while (--argc > 0 && (*++argv)[0] == '-') { @@ -64,12 +65,13 @@ main(int argc, char *argv[]) pk_char(C, 640796, 25, W, H, -2, 28, next_pixel); pk_postamble(); pk_close(); + return 0; } /* This function delivers the pixels from the character's bounding box * from left to right and from top to bottom. */ -int next_pixel() +static int next_pixel(void) { int c; do { c = getchar(); if (c==EOF) fatal("reading past end of file!\n"); diff --git a/Build/source/texk/ps2pk/tests/ps2pk.test b/Build/source/texk/ps2pk/tests/ps2pk.test index eae7c950266..53e7bc94875 100755 --- a/Build/source/texk/ps2pk/tests/ps2pk.test +++ b/Build/source/texk/ps2pk/tests/ps2pk.test @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2012 Peter Breitenlohner <tex-live@tug.org> +# Copyright (C) 2012-2014 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. TEXMFCNF=$srcdir/../kpathsea @@ -26,6 +26,10 @@ diff $srcdir/tests/Symbol.alpha.hex Symbol.alpha.hex || exit 1 ./pk2bm -b -o141 Symbol10.300pk >Symbol.alpha.pix || exit 1 diff $srcdir/tests/Symbol.alpha.pix Symbol.alpha.pix || exit 1 +./pktest -ca -W24 -H22 Symbol.alpha.pk <Symbol.alpha.pix || exit 1 +./pk2bm -b -ca Symbol.alpha.pk | \ + sed 's/yoff : 28/yoff : 21/' >Symbol.alpha.out || exit 1 +diff Symbol.alpha.pix Symbol.alpha.out || exit 1 val1='167 240 263 288' val2=`./mag -r -R240 $val1` || exit 1 |