diff options
author | Didier Raboud <odyx@debian.org> | 2014-04-16 08:13:23 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2014-04-16 08:13:23 +0200 |
commit | d7d42f6c969dc54157d85b7b6b611581bbfa7595 (patch) | |
tree | dfa630457b374b77f1f128cbc9104ea2d6963575 /test | |
parent | ccd50c2bd4db57503722816aa23a5092cbe69f40 (diff) |
Imported Upstream version 5.2.10~pre1
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 7 | ||||
-rw-r--r-- | test/Makefile.in | 725 | ||||
-rw-r--r-- | test/bjc-unprint.c | 125 | ||||
-rw-r--r-- | test/curve.c | 6 | ||||
-rw-r--r-- | test/pixma_parse.c | 164 | ||||
-rw-r--r-- | test/pixma_parse.h | 49 | ||||
-rwxr-xr-x | test/run-weavetest | 2 |
7 files changed, 849 insertions, 229 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 4b0b8c5..f98127d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.48 2007/01/26 01:04:52 rlk Exp $ +## $Id: Makefile.am,v 1.49 2014/01/08 01:50:29 rlk Exp $ ## Copyright (C) 2000 Roger Leigh ## ## This program is free software; you can redistribute it and/or modify @@ -26,7 +26,10 @@ include $(top_srcdir)/scripts/global.mk LOCAL_CPPFLAGS = -I$(top_srcdir)/src/main $(GUTENPRINT_CFLAGS) -TESTS = curve run-testdither run-weavetest +## run-weavetest is extremely time consuming and provides little value for +## release testing since the last material change was made in 2008. +## It is essentially a giant unit test for the weave code. +TESTS = curve run-testdither ## Programs diff --git a/test/Makefile.in b/test/Makefile.in index b14d78d..c25ed17 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -21,6 +20,51 @@ #export STP_DATA_PATH = $(top_srcdir)/src/xml VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -39,9 +83,11 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/scripts/global.mk -TESTS = curve$(EXEEXT) run-testdither run-weavetest +DIST_COMMON = $(top_srcdir)/scripts/global.mk $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/scripts/mkinstalldirs \ + $(top_srcdir)/scripts/depcomp \ + $(top_srcdir)/scripts/test-driver +TESTS = curve$(EXEEXT) run-testdither @BUILD_TEST_TRUE@noinst_PROGRAMS = testdither$(EXEEXT) \ @BUILD_TEST_TRUE@ escp2-weavetest$(EXEEXT) unprint$(EXEEXT) \ @BUILD_TEST_TRUE@ pcl-unprint$(EXEEXT) bjc-unprint$(EXEEXT) \ @@ -70,6 +116,10 @@ PROGRAMS = $(noinst_PROGRAMS) am_bjc_unprint_OBJECTS = bjc-unprint.$(OBJEXT) bjc_unprint_OBJECTS = $(am_bjc_unprint_OBJECTS) bjc_unprint_DEPENDENCIES = $(GUTENPRINT_LIBS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = am_curve_OBJECTS = curve.$(OBJEXT) curve_OBJECTS = $(am_curve_OBJECTS) curve_DEPENDENCIES = $(GUTENPRINT_LIBS) @@ -91,19 +141,40 @@ unprint_DEPENDENCIES = $(GUTENPRINT_LIBS) am_xml_curve_OBJECTS = xml-curve.$(OBJEXT) xml_curve_OBJECTS = $(am_xml_curve_OBJECTS) xml_curve_DEPENDENCIES = $(GUTENPRINT_LIBS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(bjc_unprint_SOURCES) $(curve_SOURCES) \ $(escp2_weavetest_SOURCES) $(pcl_unprint_SOURCES) \ $(pixma_parse_SOURCES) $(testdither_SOURCES) \ @@ -112,14 +183,239 @@ DIST_SOURCES = $(bjc_unprint_SOURCES) $(curve_SOURCES) \ $(escp2_weavetest_SOURCES) $(pcl_unprint_SOURCES) \ $(pixma_parse_SOURCES) $(testdither_SOURCES) \ $(unprint_SOURCES) $(xml_curve_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/scripts/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/scripts/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -177,6 +473,7 @@ GUTENPRINTUI2_INTERFACE_AGE = @GUTENPRINTUI2_INTERFACE_AGE@ GUTENPRINTUI2_LIBDEPS = @GUTENPRINTUI2_LIBDEPS@ GUTENPRINTUI2_LIBS = $(top_builddir)/src/gutenprintui2/libgutenprintui2.la GUTENPRINTUI2_VERSION = @GUTENPRINTUI2_VERSION@ +GUTENPRINT_BASE_VERSION = @GUTENPRINT_BASE_VERSION@ GUTENPRINT_BINARY_AGE = @GUTENPRINT_BINARY_AGE@ GUTENPRINT_CFLAGS = @GUTENPRINT_CFLAGS@ GUTENPRINT_CURRENT_INTERFACE = @GUTENPRINT_CURRENT_INTERFACE@ @@ -188,6 +485,7 @@ GUTENPRINT_LIBS = $(top_builddir)/src/main/libgutenprint.la GUTENPRINT_MAJOR_VERSION = @GUTENPRINT_MAJOR_VERSION@ GUTENPRINT_MICRO_VERSION = @GUTENPRINT_MICRO_VERSION@ GUTENPRINT_MINOR_VERSION = @GUTENPRINT_MINOR_VERSION@ +GUTENPRINT_RELEASE_VERSION = @GUTENPRINT_RELEASE_VERSION@ GUTENPRINT_VERSION = @GUTENPRINT_VERSION@ IJS_CFLAGS = @IJS_CFLAGS@ IJS_CONFIG = @IJS_CONFIG@ @@ -212,6 +510,8 @@ LIBREADLINE_DEPS = @LIBREADLINE_DEPS@ LIBS = $(INTLLIBS) @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTALLOCA = @LTALLOCA@ @@ -355,7 +655,7 @@ EXTRA_DIST = cyan-sweep.tif parse-escp2 run-weavetest run-testdither all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/scripts/global.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -377,6 +677,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/scripts/global.mk: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -395,30 +696,38 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -bjc-unprint$(EXEEXT): $(bjc_unprint_OBJECTS) $(bjc_unprint_DEPENDENCIES) + +bjc-unprint$(EXEEXT): $(bjc_unprint_OBJECTS) $(bjc_unprint_DEPENDENCIES) $(EXTRA_bjc_unprint_DEPENDENCIES) @rm -f bjc-unprint$(EXEEXT) - $(LINK) $(bjc_unprint_OBJECTS) $(bjc_unprint_LDADD) $(LIBS) -curve$(EXEEXT): $(curve_OBJECTS) $(curve_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(bjc_unprint_OBJECTS) $(bjc_unprint_LDADD) $(LIBS) + +curve$(EXEEXT): $(curve_OBJECTS) $(curve_DEPENDENCIES) $(EXTRA_curve_DEPENDENCIES) @rm -f curve$(EXEEXT) - $(LINK) $(curve_OBJECTS) $(curve_LDADD) $(LIBS) -escp2-weavetest$(EXEEXT): $(escp2_weavetest_OBJECTS) $(escp2_weavetest_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(curve_OBJECTS) $(curve_LDADD) $(LIBS) + +escp2-weavetest$(EXEEXT): $(escp2_weavetest_OBJECTS) $(escp2_weavetest_DEPENDENCIES) $(EXTRA_escp2_weavetest_DEPENDENCIES) @rm -f escp2-weavetest$(EXEEXT) - $(LINK) $(escp2_weavetest_OBJECTS) $(escp2_weavetest_LDADD) $(LIBS) -pcl-unprint$(EXEEXT): $(pcl_unprint_OBJECTS) $(pcl_unprint_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(escp2_weavetest_OBJECTS) $(escp2_weavetest_LDADD) $(LIBS) + +pcl-unprint$(EXEEXT): $(pcl_unprint_OBJECTS) $(pcl_unprint_DEPENDENCIES) $(EXTRA_pcl_unprint_DEPENDENCIES) @rm -f pcl-unprint$(EXEEXT) - $(LINK) $(pcl_unprint_OBJECTS) $(pcl_unprint_LDADD) $(LIBS) -pixma_parse$(EXEEXT): $(pixma_parse_OBJECTS) $(pixma_parse_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(pcl_unprint_OBJECTS) $(pcl_unprint_LDADD) $(LIBS) + +pixma_parse$(EXEEXT): $(pixma_parse_OBJECTS) $(pixma_parse_DEPENDENCIES) $(EXTRA_pixma_parse_DEPENDENCIES) @rm -f pixma_parse$(EXEEXT) - $(LINK) $(pixma_parse_OBJECTS) $(pixma_parse_LDADD) $(LIBS) -testdither$(EXEEXT): $(testdither_OBJECTS) $(testdither_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(pixma_parse_OBJECTS) $(pixma_parse_LDADD) $(LIBS) + +testdither$(EXEEXT): $(testdither_OBJECTS) $(testdither_DEPENDENCIES) $(EXTRA_testdither_DEPENDENCIES) @rm -f testdither$(EXEEXT) - $(LINK) $(testdither_OBJECTS) $(testdither_LDADD) $(LIBS) -unprint$(EXEEXT): $(unprint_OBJECTS) $(unprint_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(testdither_OBJECTS) $(testdither_LDADD) $(LIBS) + +unprint$(EXEEXT): $(unprint_OBJECTS) $(unprint_DEPENDENCIES) $(EXTRA_unprint_DEPENDENCIES) @rm -f unprint$(EXEEXT) - $(LINK) $(unprint_OBJECTS) $(unprint_LDADD) $(LIBS) -xml-curve$(EXEEXT): $(xml_curve_OBJECTS) $(xml_curve_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(unprint_OBJECTS) $(unprint_LDADD) $(LIBS) + +xml-curve$(EXEEXT): $(xml_curve_OBJECTS) $(xml_curve_DEPENDENCIES) $(EXTRA_xml_curve_DEPENDENCIES) @rm -f xml-curve$(EXEEXT) - $(LINK) $(xml_curve_OBJECTS) $(xml_curve_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(xml_curve_OBJECTS) $(xml_curve_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -436,25 +745,25 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml-curve.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -462,26 +771,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -493,15 +791,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -510,101 +804,194 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ else \ - skipped="($$skip tests were not run)"; \ + color_start= color_end=; \ fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +curve.log: curve$(EXEEXT) + @p='curve$(EXEEXT)'; \ + b='curve'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-testdither.log: run-testdither + @p='run-testdither'; \ + b='run-testdither'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -651,11 +1038,19 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) @@ -741,9 +1136,9 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-generic clean-libtool clean-noinstPROGRAMS ctags \ - distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -753,7 +1148,7 @@ uninstall-am: installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + recheck tags tags-am uninstall uninstall-am @SET_MAKE@ diff --git a/test/bjc-unprint.c b/test/bjc-unprint.c index fbc3ed5..6eab9cc 100644 --- a/test/bjc-unprint.c +++ b/test/bjc-unprint.c @@ -1,4 +1,4 @@ -/* $Id: bjc-unprint.c,v 1.10 2004/09/17 18:38:27 rleigh Exp $ */ +/* $Id: bjc-unprint.c,v 1.13 2012/08/13 15:41:03 gernot2270 Exp $ */ /* * Convert BJC-printjobs to xbm files, one for each color channel * @@ -62,22 +62,34 @@ typedef struct bitimage_t_ { int xmax; } bitimage_t; +typedef struct level_t_ { + /* Max number of bits per ink so far known is 8 + Thus max number of levels is 256 (including value 0) + */ + int levelvals[256]; /* number of occurrences of each level */ + int numlevels; /* number of actual levels used */ + int maxlevel; /* maximum value */ + int numbits; /* deduced number bits used for numlevels */ +} level_t; + bitimage_t *bitimage_new (void); int last_bit (unsigned char i); int first_bit (unsigned char i); void rle_info (const unsigned char *inbuf, int n, int *first, int *last, int *width, int *length); -int rle_decode (unsigned char *inbuf, int n, unsigned char *outbuf, int max); +int rle_decode (unsigned char *inbuf, int n, unsigned char *outbuf, int max, level_t *levels); scanline_t* scanline_new (void); +level_t* level_new (void); +int calc_bits(int numlevels); scanline_t *scanline_store (scanline_t *line, int y, unsigned char *buf, int size); -bitimage_t *scanlines2bitimage (scanline_t *slimg); +bitimage_t *scanlines2bitimage (scanline_t *slimg, level_t *levels); char conv (char i); void save2xbm (const char *filename,char col, bitimage_t *img, int xmin, int ymin, int xmax, int ymax); int nextcmd (FILE *infile, unsigned char *inbuff, int *cnt); int process(FILE *infile, scanline_t *sf[7], int *xmin_, int *xmax_, - int *ymin_, int *ymax_); + int *ymin_, int *ymax_, level_t *lv[7]); bitimage_t *bitimage_new(void) @@ -157,33 +169,50 @@ void rle_info(const unsigned char *inbuf, int n, int *first, int *last, int *wid if (width) *width= (f<0) ? 0 : l-f+1; } -int rle_decode(unsigned char *inbuf, int n, unsigned char *outbuf,int max) +/* n is the size of the scanline */ +int rle_decode(unsigned char *inbuf, int n, unsigned char *outbuf,int max, level_t *levels) { - const char *ib= (const char *)inbuf; + const char *ib= (const char *)inbuf; /* input scanline */ char cnt; int o= 0; int i=0,j,num; + /* Results of the decoding are in the output buffer already. + We want to organize the decoded numbers to see + the total number of levels, and their values. + */ + /*fprintf(stderr,"rle_decode: decoding scanline\n");*/ if (n<=0) return 0; while (i<n) { cnt= ib[i]; if (cnt<0) { num= 1-cnt; - for (j=0; j<num; j++) outbuf[o+j]=inbuf[i+1]; + /*for (j=0; j<num; j++) outbuf[o+j]=inbuf[i+1];*/ + for (j=0; j<num; j++) { + outbuf[o+j]=inbuf[i+1]; + /*fprintf(stderr," %d ",outbuf[o+j]);*/ + levels->levelvals[outbuf[o+j]] += 1; + if ( outbuf[o+j] > levels->maxlevel ) levels->maxlevel = outbuf[o+j]; + } o+= num; i+= 2; } else { num= cnt+1; - for (j=0; j<num; j++) outbuf[o+j]=inbuf[i+j+1]; + /* for (j=0; j<num; j++) outbuf[o+j]=inbuf[i+j+1]; */ + for (j=0; j<num; j++) { + outbuf[o+j]=inbuf[i+j+1]; + /*fprintf(stderr," %d ",outbuf[o+j]);*/ + levels->levelvals[outbuf[o+j]] += 1; + if ( outbuf[o+j] > levels->maxlevel ) levels->maxlevel = outbuf[o+j]; + } o+= num; i+= num+1; } } - + /*fprintf(stderr,"\n");*/ return o; } - scanline_t* scanline_new(void) { scanline_t* tmp= (scanline_t*) stp_malloc (sizeof(scanline_t)); @@ -198,27 +227,49 @@ scanline_t* scanline_new(void) return tmp; } +level_t *level_new(void) +{ + int i; + level_t* tmp = (level_t*) stp_malloc (sizeof(level_t)); + tmp->numlevels=0; + tmp->maxlevel=0; + tmp->numbits=0; + for (i=0; i<256; i++) tmp->levelvals[i]=0; + return tmp; +} + +int calc_bits(int numlevels) { + if (numlevels > 128) return 8; + else if (numlevels > 64) return 7; + else if (numlevels > 32) return 6; + else if (numlevels > 16) return 5; + else if (numlevels > 8) return 4; + else if (numlevels > 4) return 3; + else if (numlevels > 2) return 2; + else if (numlevels > 1) return 1; + else return 0; +} + scanline_t *scanline_store(scanline_t *line, int y, unsigned char *buf, int size) { if (!line && !(line= scanline_new())) return 0; - line->size= size; + line->size= size; /* from cnt in nextcmd function */ line->buf= (unsigned char *) stp_malloc (size); memcpy(line->buf,buf,size); rle_info(buf,size,&line->xmin,&line->xmax,&line->width,&line->osize); - /* fprintf(stderr,"%d %d %d %d ",size,line->xmin,line->xmax,line->width); */ + /*fprintf(stderr,"Scanline size %d, xmin %d, xmax %d, width %d\n",size,line->xmin,line->xmax,line->width);*/ line->y= y; return line; } - -bitimage_t *scanlines2bitimage(scanline_t *slimg) +bitimage_t *scanlines2bitimage(scanline_t *slimg, level_t *level) { bitimage_t *img= 0; scanline_t *sl; int w= 0; int y0= -1; int y= 0; - int h; + int h,i; for (sl=slimg; sl!=0; sl=sl->next) { if (sl->width) { @@ -243,10 +294,20 @@ bitimage_t *scanlines2bitimage(scanline_t *slimg) for (sl=slimg; sl!=0; sl=sl->next) { y= sl->y- y0; if ((y>=0) && (y<h)) { - rle_decode(sl->buf,sl->size,img->buf+y*w,w); + rle_decode(sl->buf,sl->size,img->buf+y*w,w,level); } } + /* print out stats of levels */ + for (i=0;i<256;i++) { + fprintf(stderr,"level %d: %d\n",i,level->levelvals[i]); + if (level->levelvals[i] > 0) level->numlevels += 1; + } + fprintf(stderr,"numlevels: %d\n",level->numlevels); + fprintf(stderr,"maxlevel: %d\n",level->maxlevel); + level->numbits = calc_bits(level->maxlevel); + fprintf(stderr,"numbits: %d\n",level->numbits); + return img; } @@ -263,7 +324,6 @@ char conv(char i) { return o; } - void save2xbm(const char *filename,char col, bitimage_t *img, int xmin, int ymin, int xmax, int ymax) { @@ -335,6 +395,7 @@ int nextcmd(FILE *infile,unsigned char *inbuff,int *cnt) c2= fgetc(infile); if (feof(infile)) return 0; + /* 2 bytes: seems to be the size+1 of one scanline in cases where command is a scanline */ *cnt= c1+256*c2; if ((c=fread(inbuff,1,*cnt,infile) != *cnt)) { @@ -346,7 +407,7 @@ int nextcmd(FILE *infile,unsigned char *inbuff,int *cnt) return cmd; } -int process(FILE *infile,scanline_t *sf[7],int *xmin_,int *xmax_,int *ymin_,int *ymax_) +int process(FILE *infile,scanline_t *sf[7],int *xmin_,int *xmax_,int *ymin_,int *ymax_,level_t *lv[7]) { unsigned char inbuff[65540]; scanline_t *sl[7], *nsl; @@ -361,6 +422,8 @@ int process(FILE *infile,scanline_t *sf[7],int *xmin_,int *xmax_,int *ymin_,int for (i=0; i<7; i++) sf[i]= sl[i]= 0; + for (i=0; i<7; i++) lv[i] = level_new(); + if (!infile) return 0; fseek(infile,0,SEEK_SET); @@ -453,6 +516,7 @@ int main(int argc, char **argv) FILE *infile= 0; scanline_t *scanlines[7]; char colname[7] = { 'K', 'Y', 'M', 'C', 'y', 'm', 'c' }; + level_t *levels[7]; int xmin,xmax; int ymin,ymax; @@ -467,15 +531,22 @@ int main(int argc, char **argv) xsize=ysize=0; - process(infile,scanlines,&xmin,&xmax,&ymin,&ymax); - - save2xbm(outfilename,colname[0],scanlines2bitimage(scanlines[0]),xmin,ymin,xmax,ymax); - save2xbm(outfilename,colname[1],scanlines2bitimage(scanlines[1]),xmin,ymin,xmax,ymax); - save2xbm(outfilename,colname[2],scanlines2bitimage(scanlines[2]),xmin,ymin,xmax,ymax); - save2xbm(outfilename,colname[3],scanlines2bitimage(scanlines[3]),xmin,ymin,xmax,ymax); - save2xbm(outfilename,colname[4],scanlines2bitimage(scanlines[4]),xmin,ymin,xmax,ymax); - save2xbm(outfilename,colname[5],scanlines2bitimage(scanlines[5]),xmin,ymin,xmax,ymax); - save2xbm(outfilename,colname[6],scanlines2bitimage(scanlines[6]),xmin,ymin,xmax,ymax); + process(infile,scanlines,&xmin,&xmax,&ymin,&ymax,levels); + + fprintf(stderr,"Color %c\n",colname[0]); + save2xbm(outfilename,colname[0],scanlines2bitimage(scanlines[0],levels[0]),xmin,ymin,xmax,ymax); + fprintf(stderr,"Color %c\n",colname[1]); + save2xbm(outfilename,colname[1],scanlines2bitimage(scanlines[1],levels[1]),xmin,ymin,xmax,ymax); + fprintf(stderr,"Color %c\n",colname[2]); + save2xbm(outfilename,colname[2],scanlines2bitimage(scanlines[2],levels[2]),xmin,ymin,xmax,ymax); + fprintf(stderr,"Color %c\n",colname[3]); + save2xbm(outfilename,colname[3],scanlines2bitimage(scanlines[3],levels[3]),xmin,ymin,xmax,ymax); + fprintf(stderr,"Color %c\n",colname[4]); + save2xbm(outfilename,colname[4],scanlines2bitimage(scanlines[4],levels[4]),xmin,ymin,xmax,ymax); + fprintf(stderr,"Color %c\n",colname[5]); + save2xbm(outfilename,colname[5],scanlines2bitimage(scanlines[5],levels[5]),xmin,ymin,xmax,ymax); + fprintf(stderr,"Color %c\n",colname[6]); + save2xbm(outfilename,colname[6],scanlines2bitimage(scanlines[6],levels[6]),xmin,ymin,xmax,ymax); } else { fprintf(stderr,"\nusage: bjc-unprint INFILE [OUTFILE]\n\n"); diff --git a/test/curve.c b/test/curve.c index a526ea0..99bc65c 100644 --- a/test/curve.c +++ b/test/curve.c @@ -1,5 +1,5 @@ /* - * "$Id: curve.c,v 1.23 2008/01/21 23:19:41 rlk Exp $" + * "$Id: curve.c,v 1.24 2014/01/04 00:31:38 rlk Exp $" * * Copyright 2002 Robert Krawitz (rlk@alum.mit.edu) * @@ -29,6 +29,8 @@ #include <getopt.h> #endif +#pragma GCC diagnostic ignored "-Woverlength-strings" + #define DEBUG_SIGNAL #define MIN(x, y) ((x) <= (y) ? (x) : (y)) #include <gutenprint/gutenprint.h> @@ -497,7 +499,7 @@ piecewise_curve_checks(stp_curve_t *curve1, int resample_points, int expected) { TEST_FAIL(); if (!quiet) - printf("Expected %d points, got %d\n", expected, count); + printf("Expected %d points, got %lu\n", expected, count); } TEST("Comparing data"); for (i = 0; i < count; i++) diff --git a/test/pixma_parse.c b/test/pixma_parse.c index 0fc368b..ec79c5a 100644 --- a/test/pixma_parse.c +++ b/test/pixma_parse.c @@ -55,7 +55,6 @@ static int nextcmd( FILE *infile,unsigned char* cmd,unsigned char *buf, unsigned { unsigned char c1,c2; unsigned int startxml, endxml; - unsigned int xmldata; if (feof(infile)) return -1; while (!feof(infile)){ @@ -65,15 +64,15 @@ static int nextcmd( FILE *infile,unsigned char* cmd,unsigned char *buf, unsigned /* add skip for XML header and footer */ if (c1 == 60 ){ /* "<" for XML start */ if (*xml_read==0){ - /* start: */ - startxml=680; - xmldata=fread(buf,1,679,infile); /* 1 less than 680 */ + /* start */ + startxml=680-1; + fread(buf,1,startxml,infile); /* 1 less than 680 */ fprintf(stderr,"nextcmd: read starting XML %d %d\n", *xml_read, startxml); *xml_read=1; }else if (*xml_read==1) { /* end */ - endxml=263; - xmldata=fread(buf,1,262,infile); /* 1 less than 263*/ + endxml=263-1; + fread(buf,1,endxml,infile); /* 1 less than 263*/ fprintf(stderr,"nextcmd: read ending XML %d %d\n", *xml_read, endxml); *xml_read=2; } @@ -121,6 +120,7 @@ static color_t* get_color(image_t* img,char name){ return NULL; } +#if 0 /* return pointer to color info structure matching name less 0x80 */ static color_t* get_color2(image_t* img,char name){ int i; @@ -133,6 +133,7 @@ static color_t* get_color2(image_t* img,char name){ } return NULL; } +#endif static int valid_color(unsigned char color){ int i; @@ -159,6 +160,77 @@ static int eight2ten(unsigned char* inbuffer,unsigned char* outbuffer,int num_by return s.buf_ptr-s.buf; } +/* decompression routine for 3 4-bit pixels of 5 levels each */ +static int eight2twelve(unsigned char* inbuffer,unsigned char* outbuffer,int num_bytes,int outbuffer_size){ + PutBitContext s; + int read_pos=0; + init_put_bits(&s, outbuffer,outbuffer_size); + while(read_pos < num_bytes){ + unsigned short value=Table5Level[inbuffer[read_pos]]; + ++read_pos; + put_bits(&s,12,value); + } + return s.buf_ptr-s.buf; +} + +#if 0 +static int analysiseight2twelve(unsigned char* inbuffer,unsigned char* outbuffer,int num_bytes,int outbuffer_size){ + PutBitContext s; + int maxlevels; + int maxnum; + int read_pos=0; + init_put_bits(&s, outbuffer,outbuffer_size); + while(read_pos < num_bytes){ + unsigned short value=Table5Level[inbuffer[read_pos]]; + ++read_pos; + /*put_bits(&s,12,value);*/ + if (value>125) { + maxlevels+=1; + if (value>maxnum) { + maxnum=value; + } + } + } + /*return s.buf_ptr-s.buf;*/ + return maxnum; +} +#endif + +/* decompression routine for 3 4-bit pixels of 6 levels each */ +static int eight2twelve2(unsigned char* inbuffer,unsigned char* outbuffer,int num_bytes,int outbuffer_size){ + PutBitContext s; + int read_pos=0; + init_put_bits(&s, outbuffer,outbuffer_size); + while(read_pos < num_bytes){ + unsigned short value=Table6Level[inbuffer[read_pos]]; + ++read_pos; + put_bits(&s,12,value); + } + return s.buf_ptr-s.buf; +} + +#if 0 +static int analysiseight2twelve2(unsigned char* inbuffer,unsigned char* outbuffer,int num_bytes,int outbuffer_size){ + PutBitContext s; + int maxlevels; + int maxnum; + int read_pos=0; + init_put_bits(&s, outbuffer,outbuffer_size); + while(read_pos < num_bytes){ + unsigned short value=Table6Level[inbuffer[read_pos]]; + ++read_pos; + /*put_bits(&s,12,value);*/ + if (value>216) { + maxlevels+=1; + if (value>maxnum) { + maxnum=value; + } + } + } + /*return s.buf_ptr-s.buf;*/ + return maxnum; +} +#endif /* reads a run length encoded block of raster data, decodes and uncompresses it */ static int Raster(image_t* img,unsigned char* buffer,unsigned int len,unsigned char color_name,unsigned int maxw){ @@ -168,6 +240,13 @@ static int Raster(image_t* img,unsigned char* buffer,unsigned int len,unsigned c int cur_line=0; /* line relative to block begin */ unsigned char* dst=malloc(len*256); /* the destination buffer */ unsigned char* dstr=dst; + +#if 0 + /*int numbigvals;*/ /* number of values greater than number of decompression table max index value */ + int maxtablevalue; /* try to catch the range of table values needed for decompression table */ + maxtablevalue=0; +#endif + /* if(!color){ printf("no matching color for %c (0x%x, %i) in the database => ignoring %i bytes\n",color_name,color_name,color_name, len); } */ @@ -200,11 +279,37 @@ static int Raster(image_t* img,unsigned char* buffer,unsigned int len,unsigned c color->head->buf=calloc(1,size+8); /* allocate slightly bigger buffer for get_bits */ memcpy(color->head->buf,dstr,size); color->head->len=size; - /*printf("DEBUG color not compressed\n");*/ - }else{ /* handle 5pixel in 8 bits compression */ - color->head->buf=calloc(1,size*2+8); - size=color->head->len=eight2ten(dstr,color->head->buf,size,size*2); - /*printf("DEBUG color compressed 5pixel in 8 bits \n");*/ + if (DEBUG) { + printf("DEBUG color not compressed\n"); + } + }else{ + if (img->color->bpp==2) {/* handle 5pixel in 8 bits compression --- this is pixel-packing rather than compression, just not wasting space */ + color->head->buf=calloc(1,size*2+8); + size=color->head->len=eight2ten(dstr,color->head->buf,size,size*2); + /*printf("DEBUG 3-level color compressed\n");*/ + } else if(img->color->bpp==4){ /* handle 4-bit ink compression */ + if (img->color->level==5) {/* 5-level compression --- this is pixel-packing rather than compression, just not wasting space */ + color->head->buf=calloc(1,size*2+8); + size=color->head->len=eight2twelve(dstr,color->head->buf,size,size*2); + if (DEBUG) { + printf("DEBUG 5-level color compressed\n"); + } + /*maxtablevalue=analysiseight2twelve(dstr,color->head->buf,size,size*2); + if (maxtablevalue!=0) { + printf("maxtablevalue: %x",maxtablevalue); + }*/ + } else if (img->color->level==6) { /* 6-level compression --- this is pixel-packing rather than compression, just not wasting space */ + color->head->buf=calloc(1,size*2+8); + size=color->head->len=eight2twelve2(dstr,color->head->buf,size,size*2); + if (DEBUG) { + printf("DEBUG 6-level color compressed\n"); + } + /*maxtablevalue=analysiseight2twelve2(dstr,color->head->buf,size,size*2); + if (maxtablevalue!=0) { + printf("maxtablevalue: %x",maxtablevalue); + }*/ + } + } } } /* adjust the maximum image width */ @@ -291,15 +396,15 @@ static void write_line(image_t*img,FILE* fp,int pos_y){ color_t* m=get_color(img,'m'); color_t* y=get_color(img,'y'); color_t* k=get_color(img,'k'); - /*color_t* H=get_color(img,'H');*/ + /* color_t* H=get_color(img,'H'); */ /*color_t* R=get_color(img,'R');*/ /*color_t* G=get_color(img,'G');*/ /* experimenting with strange colors */ - color_t* P=get_color2(img,'P'); + /* color_t* P=get_color2(img,'P'); color_t* Q=get_color2(img,'Q'); color_t* R=get_color2(img,'R'); color_t* S=get_color2(img,'S'); - color_t* T=get_color2(img,'T'); + color_t* T=get_color2(img,'T'); */ /* color_t* A=get_color(img,'A'); */ /* color_t* B=get_color(img,'B'); */ @@ -423,11 +528,11 @@ static void write_ppm(image_t* img,FILE* fp){ /* allocate buffers for dot statistics */ for(i=0;i<MAX_COLORS;i++){ /*img->color[i].dots=calloc(1,sizeof(int)*(img->color[i].level+1));*/ - img->color[i].dots=calloc(1,sizeof(int)*(1<<(img->color[i].bpp)+1)); + img->color[i].dots=calloc(1,sizeof(int)*(1<<((img->color[i].bpp)+1))); } /* allocate buffers for levels used*/ for(i=0;i<MAX_COLORS;i++){ - img->color[i].usedlevels=calloc(1,sizeof(int)*(1<<(img->color[i].bpp)+1)); + img->color[i].usedlevels=calloc(1,sizeof(int)*(1<<((img->color[i].bpp)+1))); } /* write header */ @@ -490,6 +595,7 @@ static int process(FILE* in, FILE* out,int verbose,unsigned int maxw,unsigned in unsigned char* buf=malloc(0xFFFF); int returnv=0; int i; + int num_colors; unsigned int xml_read; xml_read=0; @@ -550,9 +656,10 @@ static int process(FILE* in, FILE* out,int verbose,unsigned int maxw,unsigned in fprintf(stderr,"ESC (t set image cnt %i\n",cnt); if(buf[0]>>7){ /* usual order */ + char order[]="CMYKcmyk"; /*char order[]="CMYKcmykHRGABDEFIJLMNOPQSTUVWXZabdef";*/ /* iP3500 test */ - char order[]="CMYKcmykHRGBCMYcmykabd"; + /*char order[]="CMYKcmykHRGBCMYcmykabd";*/ /*char order[]="CMYKcmykHpnoPQRSTykabd";*/ /*char order[]="KCMYkcmyHpnoPQRSTykabd";*/ /* MP960 photo modes: k instead of K */ @@ -563,8 +670,8 @@ static int process(FILE* in, FILE* out,int verbose,unsigned int maxw,unsigned in /*char order[]="KCcMmYykRHGABDEFIJLMNOPQSTUVWXZabdef";*/ /* MP990 etc. photo modes */ /* char order[]="KCcMmYykRHGABDEFIJLMNOPQSTUVWXZabdef"; */ - int black_found = 0; - int num_colors = (cnt - 3)/3; + /* int black_found = 0; */ + num_colors = (cnt - 3)/3; fprintf(stderr," bit_info: using detailed color settings for max %i colors\n",num_colors); if(buf[1]==0x80) fprintf(stderr," format: BJ indexed color image format\n"); @@ -613,8 +720,10 @@ static int process(FILE* in, FILE* out,int verbose,unsigned int maxw,unsigned in } else img->color[i].density = 128; /*128+96;*/ /* try to add 0x80 to sub-channels for MP450 hi-quality mode */ + /* if((order[i] == 'K' || order[i] == 'k') && img->color[i].bpp) black_found = 1; + */ /* if(order[i] == 'y' && !black_found && img->color[i].level){ printf("iP6700 hack: treating color definition at the y position as k\n"); @@ -629,8 +738,7 @@ static int process(FILE* in, FILE* out,int verbose,unsigned int maxw,unsigned in fprintf(stderr," Color %c Compression: %i bpp %i level %i\n",img->color[i].name, img->color[i].compression,img->color[i].bpp,img->color[i].level); }else{ - fprintf(stderr," Color %c Compression: %i bpp %i level %i\n",img->color[i].name, - img->color[i].compression,img->color[i].bpp,img->color[i].level); + fprintf(stderr," Color %i out of bounds!\n", i); /*printf(" Color ignoring setting %x %x %x\n",buf[3+i*3],buf[3+i*3+1],buf[3+i*3+2]);*/ } @@ -638,16 +746,17 @@ static int process(FILE* in, FILE* out,int verbose,unsigned int maxw,unsigned in }else if(buf[0]==0x1 && buf[1]==0x0 && buf[2]==0x1){ - fprintf(stderr," 1bit-per pixel\n"); - int num_colors = cnt*3; /*no idea yet! 3 for iP4000 */ + fprintf(stderr," 1bit-per pixel\n"); + num_colors = cnt*3; /*no idea yet! 3 for iP4000 */ /*num_colors=9;*/ /*for(i=0;i<MAX_COLORS;i++){*/ for(i=0;i<num_colors;i++){ if(i<MAX_COLORS){ /* usual */ + char order[]="CMYKcmyk"; /* const char order[]="CMYKcmykHRGABDEFIJLMNOPQSTUVWXZabdef";*/ /* iP3500 test */ - char order[]="CMYKcmykHRGBCMYcmykabd"; + /* char order[]="CMYKcmykHRGBCMYcmykabd"; */ /* MP990, MG6100, MG8100 plain modes */ /*const char order[]="KCcMmYykRHGABDEFIJLMNOPQSTUVWXZabdef";*/ img->color[i].name=order[i]; @@ -659,8 +768,7 @@ static int process(FILE* in, FILE* out,int verbose,unsigned int maxw,unsigned in fprintf(stderr," Color %c Compression: %i bpp %i level %i\n",img->color[i].name, img->color[i].compression,img->color[i].bpp,img->color[i].level); }else{ - fprintf(stderr," Color %c Compression: %i bpp %i level %i\n",img->color[i].name, - img->color[i].compression,img->color[i].bpp,img->color[i].level); + fprintf(stderr," Color %i out of bounds!", i); /*printf(" Color ignoring setting %x %x %x\n",buf[3+i*3],buf[3+i*3+1],buf[3+i*3+2]);*/ } } @@ -695,8 +803,8 @@ static int process(FILE* in, FILE* out,int verbose,unsigned int maxw,unsigned in break; case 'p': fprintf(stderr,"ESC (p set extended margin (len=%i):\n",cnt); - fprintf(stderr," printed length %i left %i\n",((buf[0]<<8 )+buf[1]) *6 / 5,(buf[2]<<8) + buf[3]); - fprintf(stderr," printed width %i top %i\n",((buf[4]<<8 )+buf[5]) * 6 / 5,(buf[6]<<8) + buf[7]); + fprintf(stderr," printed length %i left %i\n",((buf[0]<<8 )+buf[1]) *6 / 5 - 1,(buf[2]<<8) + buf[3]); + fprintf(stderr," printed width %i top %i\n",((buf[4]<<8 )+buf[5]) * 6 / 5 - 1,(buf[6]<<8) + buf[7]); if(cnt > 8){ int unit = (buf[12] << 8)| buf[13]; diff --git a/test/pixma_parse.h b/test/pixma_parse.h index 3307204..0eda3c0 100644 --- a/test/pixma_parse.h +++ b/test/pixma_parse.h @@ -194,7 +194,7 @@ static inline void init_get_bits(GetBitContext *s, } -/* 10to8 decompression table */ +/* 10to8 decompression table for 2-bit inks with 3 levels: 3^5 = 243 combinations --- 5 pixels can be compressed into 1 byte */ static const unsigned short Table8[] = { 0x0,0x1,0x2,0x4,0x5,0x6,0x8,0x9,0xa,0x10,0x11,0x12,0x14,0x15,0x16, 0x18,0x19,0x1a,0x20,0x21,0x22,0x24,0x25,0x26,0x28,0x29,0x2a,0x40,0x41,0x42, @@ -215,6 +215,46 @@ static const unsigned short Table8[] = { 0x2a8,0x2a9,0x2aa,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 }; +/* 5-level decompression table for 4-bit inks with 5 levels: 5^3 = 125 combinations --- 3 pixels can be compressed into 1 byte */ +/* So then we can put 3 in the lower 8 */ +static const unsigned short Table5Level[] = { + 0x0,0x1,0x2,0x3,0x4,0x10,0x11,0x12,0x13,0x14,0x20,0x21,0x22,0x23,0x24,0x30, + 0x31,0x32,0x33,0x34,0x40,0x41,0x42,0x43,0x44,0x100,0x101,0x102,0x103,0x104,0x110,0x111, + 0x112,0x113,0x114,0x120,0x121,0x122,0x123,0x124,0x130,0x131,0x132,0x133,0x134,0x140,0x141,0x142, + 0x143,0x144,0x200,0x201,0x202,0x203,0x204,0x210,0x211,0x212,0x213,0x214,0x220,0x221,0x222,0x223, + 0x224,0x230,0x231,0x232,0x233,0x234,0x240,0x241,0x242,0x243,0x244,0x300,0x301,0x302,0x303,0x304, + 0x310,0x311,0x312,0x313,0x314,0x320,0x321,0x322,0x323,0x324,0x330,0x331,0x332,0x333,0x334,0x340, + 0x341,0x342,0x343,0x344,0x400,0x401,0x402,0x403,0x404,0x410,0x411,0x412,0x413,0x414,0x420,0x421, + 0x422,0x423,0x424,0x430,0x431,0x432,0x433,0x434,0x440,0x441,0x442,0x443,0x444,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 +}; + +/* 6-level decompression table for 4-bit inks with 6 levels: 6^3 = 216 combinations --- 3 pixels can be compressed into 1 byte */ +static const unsigned short Table6Level[] = { + 0x0,0x1,0x2,0x3,0x4,0x5,0x10,0x11,0x12,0x13,0x14,0x15,0x20,0x21,0x22,0x23, + 0x24,0x25,0x30,0x31,0x32,0x33,0x34,0x35,0x40,0x41,0x42,0x43,0x44,0x45,0x50,0x51, + 0x52,0x53,0x54,0x55,0x100,0x101,0x102,0x103,0x104,0x105,0x110,0x111,0x112,0x113,0x114,0x115, + 0x120,0x121,0x122,0x123,0x124,0x125,0x130,0x131,0x132,0x133,0x134,0x135,0x140,0x141,0x142,0x143, + 0x144,0x145,0x150,0x151,0x152,0x153,0x154,0x155,0x200,0x201,0x202,0x203,0x204,0x205,0x210,0x211, + 0x212,0x213,0x214,0x215,0x220,0x221,0x222,0x223,0x224,0x225,0x230,0x231,0x232,0x233,0x234,0x235, + 0x240,0x241,0x242,0x243,0x244,0x245,0x250,0x251,0x252,0x253,0x254,0x255,0x300,0x301,0x302,0x303, + 0x304,0x305,0x310,0x311,0x312,0x313,0x314,0x315,0x320,0x321,0x322,0x323,0x324,0x325,0x330,0x331, + 0x332,0x333,0x334,0x335,0x340,0x341,0x342,0x343,0x344,0x345,0x350,0x351,0x352,0x353,0x354,0x355, + 0x400,0x401,0x402,0x403,0x404,0x405,0x410,0x411,0x412,0x413,0x414,0x415,0x420,0x421,0x422,0x423, + 0x424,0x425,0x430,0x431,0x432,0x433,0x434,0x435,0x440,0x441,0x442,0x443,0x444,0x445,0x450,0x451, + 0x452,0x453,0x454,0x455,0x500,0x501,0x502,0x503,0x504,0x505,0x510,0x511,0x512,0x513,0x514,0x515, + 0x520,0x521,0x522,0x523,0x524,0x525,0x530,0x531,0x532,0x533,0x534,0x535,0x540,0x541,0x542,0x543, + 0x544,0x545,0x550,0x551,0x552,0x553,0x554,0x555,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 +}; typedef struct rasterline_s { unsigned char* buf; @@ -225,7 +265,7 @@ typedef struct rasterline_s { typedef struct color_s { - char name; /* name (one of CMYKcmykRGH) */ + char name; /* name (one of CMYKcmykH) */ int bpp; /* number of bits */ int level; /* number of levels */ int density; /* relative density to the other colors*/ @@ -258,8 +298,9 @@ typedef struct image_s { int lines_per_block; } image_t; -/*static const unsigned char valid_colors[] = {'C','M','Y','K','c','m','y','k',0xa3,0xad}; */ -static const unsigned char valid_colors[] = {'C','M','Y','K','c','m','y','k','R','G','H','A','B','D','E','F','I','J','L','M','N','O','P','Q','S','T','U','V','W','X','Z','a','b','d','e','f'}; +/* static const unsigned char valid_colors[] = {'C','M','Y','K','c','m','y','k'}; */ +/* static const unsigned char valid_colors[] = {'C','M','Y','K','c','m','y','k',0xa3,0xad}; */ +static const unsigned char valid_colors[] = {'C','M','Y','K','c','m','y','k','R','G','H','A','B','D','E','F','I','J','L','M','N','O','P','Q','S','T','U','V','W','X','Z','a','b','d','e','f'}; #endif diff --git a/test/run-weavetest b/test/run-weavetest index 2444c66..d551ac2 100755 --- a/test/run-weavetest +++ b/test/run-weavetest @@ -21,7 +21,7 @@ fi passes='1,1,1 2,1,1 1,2,1 1,2,2 1,4,1 4,1,1 1,8,1 1,16,1 4,2,1 4,4,1 4,8,1 4,16,1 2,2,1 2,4,1 2,8,1 2,16,1 1,4,2 1,8,2 1,16,2 2,2,2 2,4,2 2,8,2 2,16,2 8,1,1 4,4,2 4,8,2 8,2,1 8,4,1 8,8,1 16,1,1 16,2,1 16,4,1' # All numbers of jets used by any printer. -jets='1 2 4 8 15 16 20 21 24 29 32 47 48 59 60 64 90 96 128 144 180 192 208 358 360 384' +jets='1 2 4 8 15 16 20 21 24 29 32 42 47 48 59 60 64 90 96 128 144 180 192 208 358 360 384' # All nozzle separations used by any printer at any resolution. separations='1 2 3 4 6 8 12 16 24' |