From 3950c83c2919fe59dbf442c0d4859778fadd0e8d Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Sun, 26 Oct 2008 16:16:09 +0000 Subject: Imported Upstream version 4.3.99+cvs20060521 --- src/Makefile.in | 7 +- src/cups/Makefile.am | 17 +- src/cups/Makefile.in | 98 +- src/cups/cups-genppdupdate.in | 165 +- src/cups/epson.c | 13 +- src/cups/genppd.c | 239 ++- src/cups/rastertoprinter.c | 107 +- src/cups/test-ppds | 56 + src/escputil/Makefile.in | 7 +- src/escputil/d4lib.c | 124 +- src/escputil/escputil.c | 1098 ++++++---- src/foomatic/Makefile.am | 7 +- src/foomatic/Makefile.in | 12 +- src/foomatic/foomatic-generator.in | 107 +- src/foomatic/foomatic-printermap | 1100 +++++----- src/foomatic/foomatic-templates-ijs/gutenprint.xml | 27 +- src/foomatic/printer_margins.c | 21 +- src/foomatic/printer_options.c | 8 +- src/ghost/Makefile.in | 7 +- src/ghost/ijsgutenprint.c | 245 ++- src/gimp/Makefile.in | 7 +- src/gimp/print.c | 3 +- src/gimp2/Makefile.in | 7 +- src/gimp2/print.c | 3 +- src/gutenprintui/Makefile.in | 7 +- src/gutenprintui2/Makefile.in | 7 +- src/gutenprintui2/panel.c | 8 +- src/main/Makefile.in | 7 +- src/main/bit-ops.c | 4 +- src/main/escp2-channels.c | 12 +- src/main/escp2-driver.c | 14 +- src/main/escp2-papers.c | 120 +- src/main/escp2-resolutions.c | 70 +- src/main/papers.xml | 25 +- src/main/print-canon.c | 98 +- src/main/print-dither-matrices.c | 8 +- src/main/print-escp2-data.c | 422 ++-- src/main/print-escp2.c | 153 +- src/main/print-escp2.h | 9 +- src/main/print-lexmark.c | 239 +-- src/main/print-olympus.c | 39 +- src/main/print-pcl.c | 20 +- src/main/print-ps.c | 57 +- src/main/print-raw.c | 3 +- src/main/print-weave.c | 17 +- src/main/printers.c | 247 ++- src/main/printers.xml | 2202 +++++++------------- src/testpattern/Makefile.am | 7 +- src/testpattern/Makefile.in | 33 +- src/testpattern/printer_options.c | 246 +++ src/testpattern/run-testpattern-2.in | 236 +++ src/testpattern/testpattern.c | 5 +- 52 files changed, 4592 insertions(+), 3208 deletions(-) create mode 100755 src/cups/test-ppds create mode 100644 src/testpattern/printer_options.c create mode 100644 src/testpattern/run-testpattern-2.in (limited to 'src') diff --git a/src/Makefile.in b/src/Makefile.in index 3d4243a..0de1821 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -15,6 +15,9 @@ @SET_MAKE@ # Variables + +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -250,6 +253,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -635,9 +639,6 @@ uninstall-info: uninstall-info-recursive @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: diff --git a/src/cups/Makefile.am b/src/cups/Makefile.am index f4ffc06..011bd07 100644 --- a/src/cups/Makefile.am +++ b/src/cups/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.83 2005/11/22 14:43:05 rleigh Exp $ +## $Id: Makefile.am,v 1.87 2006/05/14 16:46:03 rlk Exp $ ## Copyright (C) 2000 Roger Leigh ## ## This program is free software; you can redistribute it and/or modify @@ -45,6 +45,9 @@ endif LOCAL_CPPFLAGS = $(GUTENPRINT_CFLAGS) $(CUPS_CFLAGS) +STP_ENV= STP_MODULE_PATH=$(top_builddir)/src/main/.libs:$(top_builddir)/src/main STP_DATA_PATH=$(top_srcdir)/src/main + +TESTS= test-ppds ## Programs @@ -157,7 +160,7 @@ all-local: $(INSTALL_DATA_LOCAL_DEPS) ppd: ppd-stamp -ppd-stamp: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ $(top_srcdir)/src/main/printers.xml $(top_srcdir)/src/main/papers.xml +ppd-stamp: cups-genppdconfig.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ $(top_srcdir)/src/main/printers.xml $(top_srcdir)/src/main/papers.xml $(MAKE) ppd-stamp-phony touch ppd-stamp @@ -171,7 +174,7 @@ ppd-nonls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ for language in C ; do \ mkdir ppd/$$language ; \ echo "$$language:" ; \ - LANGUAGE=$$language ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ -p ppd/$$language ; \ + LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ -p ppd/$$language ; \ done ppd-nls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @@ -179,10 +182,10 @@ ppd-nls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ cd $(top_builddir)/po ; \ $(MAKE) ; \ $(MAKE) DESTDIR= prefix=$${wdir}/catalog datadir=$${wdir}/catalog/share install - for language in `./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ -L -c \`pwd\`/catalog/share/locale` ; do \ + for language in `$(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ -L -c \`pwd\`/catalog/share/locale` ; do \ mkdir ppd/$$language ; \ echo "$$language:" ; \ - LANGUAGE=$$language ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ -p ppd/$$language -c `pwd`/catalog/share/locale ; \ + LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ -p ppd/$$language -c `pwd`/catalog/share/locale ; \ done $(RM) -r catalog @@ -213,5 +216,7 @@ EXTRA_DIST = \ README \ calibrate.ppm \ command.txt \ - command.types + command.types \ + test-ppds + diff --git a/src/cups/Makefile.in b/src/cups/Makefile.in index 9f1ccf9..b0b8b9e 100644 --- a/src/cups/Makefile.in +++ b/src/cups/Makefile.in @@ -16,6 +16,9 @@ # Variables +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main + srcdir = @srcdir@ @@ -321,6 +324,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -388,6 +392,8 @@ cupsexec_filterdir = $(pkglibdir)/filter @CUPS_PPDS_AT_TOP_LEVEL_TRUE@cups_modeldir = $(pkgdatadir)/model/ @CUPS_PPDS_AT_TOP_LEVEL_TRUE@DONT_UNINSTALL_PPDS = true LOCAL_CPPFLAGS = $(GUTENPRINT_CFLAGS) $(CUPS_CFLAGS) +STP_ENV = STP_MODULE_PATH=$(top_builddir)/src/main/.libs:$(top_builddir)/src/main STP_DATA_PATH=$(top_srcdir)/src/main +TESTS = test-ppds @BUILD_CUPS_TRUE@sbin_SCRIPTS = cups-genppdconfig.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ cups-genppdupdate.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @BUILD_GENPPD_STATIC_TRUE@STATIC_LDOPTS = -static -export-dynamic cups_calibrate_SOURCES = cups-calibrate.c @@ -420,7 +426,8 @@ EXTRA_DIST = \ README \ calibrate.ppm \ command.txt \ - command.types + command.types \ + test-ppds all: all-am @@ -719,6 +726,79 @@ GTAGS: 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)'; \ + 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`; \ + echo "XPASS: $$tst"; \ + ;; \ + *) \ + echo "PASS: $$tst"; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *" $$tst "*) \ + xfail=`expr $$xfail + 1`; \ + echo "XFAIL: $$tst"; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + echo "SKIP: $$tst"; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all tests failed"; \ + else \ + banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + skipped="($$skip tests were not run)"; \ + 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`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0; \ + else :; fi + distdir: $(DISTFILES) $(mkdir_p) $(distdir)/../../scripts @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -751,6 +831,7 @@ distdir: $(DISTFILES) top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) all-local installdirs: @@ -842,8 +923,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-cupsexec_backendPROGRAMS \ uninstall-local uninstall-pkgdataDATA uninstall-pkgsysconfDATA \ uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS -.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ - clean-binPROGRAMS clean-cupsexec_backendPROGRAMS \ +.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \ + clean clean-binPROGRAMS clean-cupsexec_backendPROGRAMS \ clean-cupsexec_filterPROGRAMS clean-generic clean-libtool \ clean-local clean-sbinPROGRAMS ctags dist-hook distclean \ distclean-compile distclean-generic distclean-libtool \ @@ -867,9 +948,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-cupsexec_backendPROGRAMS \ @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: @@ -933,7 +1011,7 @@ all-local: $(INSTALL_DATA_LOCAL_DEPS) ppd: ppd-stamp -ppd-stamp: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ $(top_srcdir)/src/main/printers.xml $(top_srcdir)/src/main/papers.xml +ppd-stamp: cups-genppdconfig.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ $(top_srcdir)/src/main/printers.xml $(top_srcdir)/src/main/papers.xml $(MAKE) ppd-stamp-phony touch ppd-stamp @@ -947,7 +1025,7 @@ ppd-nonls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ for language in C ; do \ mkdir ppd/$$language ; \ echo "$$language:" ; \ - LANGUAGE=$$language ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ -p ppd/$$language ; \ + LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ -p ppd/$$language ; \ done ppd-nls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @@ -955,10 +1033,10 @@ ppd-nls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ cd $(top_builddir)/po ; \ $(MAKE) ; \ $(MAKE) DESTDIR= prefix=$${wdir}/catalog datadir=$${wdir}/catalog/share install - for language in `./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ -L -c \`pwd\`/catalog/share/locale` ; do \ + for language in `$(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ -L -c \`pwd\`/catalog/share/locale` ; do \ mkdir ppd/$$language ; \ echo "$$language:" ; \ - LANGUAGE=$$language ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ -p ppd/$$language -c `pwd`/catalog/share/locale ; \ + LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ -p ppd/$$language -c `pwd`/catalog/share/locale ; \ done $(RM) -r catalog diff --git a/src/cups/cups-genppdupdate.in b/src/cups/cups-genppdupdate.in index 1b90140..b0c3b0b 100644 --- a/src/cups/cups-genppdupdate.in +++ b/src/cups/cups-genppdupdate.in @@ -1,5 +1,5 @@ #! @PERL@ -w -# $Id: cups-genppdupdate.in,v 1.22 2005/12/24 22:41:11 rlk Exp $ +# $Id: cups-genppdupdate.in,v 1.24 2006/03/29 02:27:15 rlk Exp $ # Update CUPS PPDs for Gutenprint queues. # Copyright (C) 2002-2003 Roger Leigh (rleigh@debian.org) # @@ -37,6 +37,8 @@ our $opt_n; # No action our $opt_q; # Quiet mode our $opt_s; # Source PPD location our $opt_v; # Verbose mode +our $opt_N; # Don't update PPD file options +our $opt_o; # Output directory my $debug = 0; my $verbose = 0; # Verbose output @@ -45,11 +47,13 @@ if ($debug) { } my $quiet = 0; # No output my $no_action = 0; # Don't output files +my $reset_defaults = 0; # Reset options to default settings my $version = "@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@"; my $ppd_dir = "@cups_conf_serverroot@/ppd"; # Location of in-use CUPS PPDs my $ppd_root_dir = "@cups_conf_datadir@/model"; my $ppd_base_dir = "$ppd_root_dir/gutenprint/$version"; # Available PPDs +my $ppd_out_dir = ""; # By default output into source directory my $gzext = ".gz"; my $updated_ppd_count = 0; @@ -65,6 +69,7 @@ my %languagemappings = ( "french" => "fr", "german" => "de", "greek" => "el", + "hungarian" => "hu", "italian" => "it", "japanese" => "jp", "norwegian" => "no", @@ -90,10 +95,44 @@ umask 0177; # Find all in-use Gutenprint PPD files... -my @ppdglob = glob("$ppd_dir/*.{ppd,PPD}"); +my @ppdglob; +if (@ARGV) { + my $f; + foreach $f (@ARGV) { + if (-f $f and ($f =~ /\.ppd$/i or $f =~ /\//)) { + if (-f $f) { + push @ppdglob, $f; + } else { + print STDERR "Cannot find file $f\n"; + } + } elsif (-f "$ppd_dir/$f" or + -f "$ppd_dir/$f.ppd" or + -f "$ppd_dir/$f.PPD") { + if (-f "$ppd_dir/$f") { + push @ppdglob, "$ppd_dir/$f"; + } + if (-f "$ppd_dir/$f.ppd") { + push @ppdglob, "$ppd_dir/$f.ppd"; + } + if (-f "$ppd_dir/$f.PPD") { + push @ppdglob, "$ppd_dir/$f.PPD"; + } + } else { + print STDERR "Cannot find file $ppd_dir/$f, $ppd_dir/$f.ppd, or $ppd_dir/$f.PPD\n"; + } + } +} else { + @ppdglob = glob("$ppd_dir/*.{ppd,PPD}"); +} my $ppdlist = join ' ', @ppdglob; if (@ppdglob) { - open PPDFILES, '-|', 'egrep', '-i', '-l', 'Gutenprint|Gimp-Print', @ppdglob or die "can't grep $ppd_dir/*: $!"; + open PPDFILES, '-|', 'egrep', '-i', '-l', 'Gutenprint|Gimp-Print', @ppdglob or die "can't grep $ppdlist: $!"; + while () { + chomp; + push @ppd_files, $_; + } + open PPDFILES, '-|', 'egrep', '-i', '-L', 'Foomatic', @ppd_files or die "can't grep $ppdlist: $!"; + @ppd_files = (); while () { chomp; push @ppd_files, $_; @@ -118,7 +157,11 @@ foreach (@ppd_files) { if (!$quiet || $verbose) { if ($updated_ppd_count > 0) { - print STDOUT "Updated $updated_ppd_count PPD files. Restart cupsd for the changes to take effect.\n"; + my $plural = ""; + if ($updated_ppd_count != 1) { + $plural = "s"; + } + print STDOUT "Updated $updated_ppd_count PPD file${plural}. Restart cupsd for the changes to take effect.\n"; exit (0); } else { print STDOUT "Failed to update any PPD files\n"; @@ -129,7 +172,7 @@ if (!$quiet || $verbose) { sub parse_options () { - getopts("dhnqs:v"); + getopts("dhnqs:vNo:"); if ($opt_n) { $no_action = 1; @@ -142,7 +185,7 @@ sub parse_options () { $ppd_base_dir = "$opt_s"; } else { - die "$opt_s: invalid directory: $!"; + die "$opt_s: invalid directory: $!\n"; } } if ($opt_v) { @@ -153,8 +196,19 @@ sub parse_options () { $verbose = 0; $quiet = 1; } + if ($opt_N) { + $reset_defaults = 1; + } + if ($opt_o) { + if (-d $opt_o) { + $ppd_out_dir = "$opt_o"; + } + else { + die "$opt_s: invalid directory: $!\n"; + } + } if ($opt_h) { - print "Usage: $0 [OPTION]...\n"; + print "Usage: $0 [OPTION]... [PPD_FILE]...\n"; print "Update CUPS+Gutenprint PPD files.\n\n"; print " -d Enable debugging\n"; print " -h Display this help text\n"; @@ -162,6 +216,8 @@ sub parse_options () { print " -q Quiet mode. No messages except errors.\n"; print " -s ppd_dir Use ppd_dir as the source PPD directory.\n"; print " -v Verbose messages.\n"; + print " -N Reset options to defaults.\n"; + print " -o out_dir Output PPD files to out_dir.\n"; exit (0); } } @@ -170,6 +226,11 @@ sub parse_options () { # Update the named PPD file. sub update_ppd ($) { my $ppd_source_filename = $_; + my $ppd_dest_filename = $ppd_source_filename; + if ($ppd_out_dir) { + $ppd_dest_filename =~ s;(.*)/([^/]+);$2;; + $ppd_dest_filename = "$ppd_out_dir/$ppd_dest_filename"; + } open ORIG, $_ or die "$_: can't open PPD file: $!"; seek (ORIG, 0, 0) or die "can't seek to start of PPD file"; @@ -177,7 +238,6 @@ sub update_ppd ($) { if ($debug) { print "Source Filename: $ppd_source_filename\n"; } - # Get the `PCFileName'; the new source PPD will have the same name. my ($filename) = ""; my ($driver) = ""; my ($gutenprintdriver) = ""; @@ -322,45 +382,46 @@ sub update_ppd ($) { } - # Update source buffer with old defaults... + if (! $reset_defaults) { + # Update source buffer with old defaults... - # Loop through each default in turn. + # Loop through each default in turn. default_loop: - foreach (sort keys %defaults) { - my $default_option = $_; - my $option; - ($option = $_) =~ s/Default//; # Strip off `Default' - # Check method is valid - my $orig_method = $orig_default_types{$option}; - my $new_method = $new_default_types{$option}; - if ((!defined($orig_method) || !defined($new_method)) || - $orig_method ne $new_method) { - next; - } - if ($new_method eq "PickOne") { - # Check the old setting is valid - foreach (@{$options{$option}}) { - if ($defaults{$default_option} eq $_) { # Valid option - # Set the option in the new PPD - $source_data =~ s/\*($default_option).*/*$1:$defaults{$default_option}/m; - if ($verbose) { - print "$ppd_source_filename: Set *$default_option to $defaults{$default_option}\n"; + foreach (sort keys %defaults) { + my $default_option = $_; + my $option; + ($option = $_) =~ s/Default//; # Strip off `Default' + # Check method is valid + my $orig_method = $orig_default_types{$option}; + my $new_method = $new_default_types{$option}; + if ((!defined($orig_method) || !defined($new_method)) || + $orig_method ne $new_method) { + next; + } + if ($new_method eq "PickOne") { + # Check the old setting is valid + foreach (@{$options{$option}}) { + if ($defaults{$default_option} eq $_) { # Valid option + # Set the option in the new PPD + $source_data =~ s/\*($default_option).*/*$1:$defaults{$default_option}/m; + if ($verbose) { + print "$ppd_source_filename: Set *$default_option to $defaults{$default_option}\n"; + } + next default_loop; } - next default_loop; } + printf STDERR + "$ppd_source_filename: Invalid option: *$default_option: $defaults{$default_option}. Skipped.\n"; + next; } - printf STDERR - "$ppd_source_filename: Invalid option: *$default_option: $defaults{$default_option}. Skipped.\n"; - next; + print STDERR + "$ppd_source_filename: PPD OpenUI method $new_default_types{$_} not understood. Skipped\n"; } - print STDERR - "$ppd_source_filename: PPD OpenUI method $new_default_types{$_} not understood. Skipped\n"; } - # Write new PPD... - my $tmpnew = "${ppd_source_filename}.new"; + my $tmpnew = "${ppd_dest_filename}.new"; if (! open NEWPPD, "> $tmpnew") { warn "Can't open $tmpnew for writing: $!\n"; return 0; @@ -372,16 +433,20 @@ default_loop: return 0; } - if (! rename $tmpnew, $ppd_source_filename) { - warn "Can't rename $tmpnew to $ppd_source_filename: $!\n"; + if (! rename $tmpnew, $ppd_dest_filename) { + warn "Can't rename $tmpnew to $ppd_dest_filename: $!\n"; unlink $tmpnew; return 0; } - chown($orig_metadata[4], $orig_metadata[5], $ppd_source_filename); - chmod(($orig_metadata[2] & 0777), $ppd_source_filename); + chown($orig_metadata[4], $orig_metadata[5], $ppd_dest_filename); + chmod(($orig_metadata[2] & 0777), $ppd_dest_filename); if (!$quiet || $verbose) { - print STDOUT "Updated $ppd_source_filename using $source\n"; + if ($ppd_dest_filename eq $ppd_source_filename) { + print STDOUT "Updated $ppd_source_filename using $source\n"; + } else { + print STDOUT "Updated $ppd_source_filename to $ppd_dest_filename using $source\n"; + } } return 1; # All done! @@ -394,9 +459,14 @@ sub find_ppd ($$$$) { my ($key) = '^\\*FileVersion:[ ]*"@VERSION@"$'; my ($lingo, $suffix, $base, $basedir); my ($current_best_file, $current_best_time); - my ($stored_name, $stored_dir); + my ($stored_name, $stored_dir, $simplified); $stored_name = $gutenprintfilename; - $stored_name =~ s,.*/([^/]*)(.gz)?$,$1,; + $stored_name =~ s,.*/([^/]*)(.sim)?(.ppd)?(.gz)?$,$1,; + if ($gutenprintfilename =~ m,.*/([^/]*)(.sim)(.ppd)?(.gz)?$,) { + $simplified = ".sim"; + } else { + $simplified = ""; + } $stored_dir = $gutenprintfilename; $stored_dir =~ s,(.*)/([^/]*)$,$1,; @@ -411,8 +481,8 @@ sub find_ppd ($$$$) { "") { foreach $suffix (".ppd$gzext", ".ppd") { - foreach $base ("${drivername}.$version", - "stp-${drivername}.$version", + foreach $base ("${drivername}.$version${simplified}", + "stp-${drivername}.$version${simplified}", $stored_name, $drivername) { foreach $basedir ($ppd_base_dir, @@ -442,6 +512,9 @@ sub find_ppd ($$$$) { if ($sb[9] > $current_best_time) { $current_best_time = $sb[9]; $current_best_file = $fn; + if ($debug) { + print STDERR "***current_best_file is $fn\n"; + } } } elsif ($debug) { print " Format invalid\n"; diff --git a/src/cups/epson.c b/src/cups/epson.c index 434c1ae..38fec8c 100644 --- a/src/cups/epson.c +++ b/src/cups/epson.c @@ -1,5 +1,5 @@ /* - * "$Id: epson.c,v 1.6 2002/12/22 21:03:32 rleigh Exp $" + * "$Id: epson.c,v 1.7 2006/03/18 23:54:49 rlk Exp $" * * EPSON backend for the Common UNIX Printing System. * @@ -324,9 +324,10 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ while (nbytes > 0) { - if ((wbytes = write(fd_out, bufptr, nbytes)) < 0 && errno == EAGAIN) + if ((wbytes = write(fd_out, bufptr, nbytes)) < 0 && + (errno == EAGAIN || errno == EINTR)) { - /* Write would block, so sleep 0.2s and retry... */ + /* Write would block, so sleep 0.002s and retry... */ /* * Check for possible data coming back from the printer... @@ -340,13 +341,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ read_backchannel(fd_out); #if defined(HAVE_TIME_H) && defined(HAVE_NANOSLEEP) sleeptime.tv_sec = 0; - sleeptime.tv_nsec = 200000000; + sleeptime.tv_nsec = 2000000; nanosleep(&sleeptime, &sleeptime); #elif defined(HAVE_UNISTD_H) && defined(HAVE_USLEEP) usleep(200000); #else timeout.tv_sec = 0; - timeout.tv_usec = 200000; + timeout.tv_usec = 2000; select(1, NULL, NULL, NULL, &timeout); #endif continue; @@ -765,5 +766,5 @@ list_devices(void) /* - * End of "$Id: epson.c,v 1.6 2002/12/22 21:03:32 rleigh Exp $". + * End of "$Id: epson.c,v 1.7 2006/03/18 23:54:49 rlk Exp $". */ diff --git a/src/cups/genppd.c b/src/cups/genppd.c index bdff9fe..f9011b4 100644 --- a/src/cups/genppd.c +++ b/src/cups/genppd.c @@ -1,5 +1,5 @@ /* - * "$Id: genppd.c,v 1.113 2005/12/31 21:27:29 rlk Exp $" + * "$Id: genppd.c,v 1.117 2006/04/22 00:41:04 rlk Exp $" * * PPD file generation program for the CUPS drivers. * @@ -124,7 +124,6 @@ const char *special_options[] = "Resolution", "OutputOrder", "Quality", - "ImageType", "Duplex", NULL }; @@ -161,7 +160,7 @@ int checkcat (const struct dirent *localedir); void printlangs(char** langs); void printmodels(int verbose); int write_ppd(const stp_printer_t *p, const char *prefix, - const char *language, int verbose); + const char *language, int verbose, int simplified); /* @@ -218,6 +217,7 @@ main(int argc, /* I - Number of command-line arguments */ char **models = NULL; /* Models to output, all if NULL */ int opt_printlangs = 0; /* Print available translations */ int opt_printmodels = 0;/* Print available models */ + int which_ppds = 2; /* Simplified PPD's = 1, full = 2 */ /* * Parse command-line args... @@ -227,7 +227,7 @@ main(int argc, /* I - Number of command-line arguments */ for (;;) { - if ((i = getopt(argc, argv, "23hvqc:p:l:LMVd:")) == -1) + if ((i = getopt(argc, argv, "23hvqc:p:l:LMVd:sa")) == -1) break; switch (i) @@ -271,6 +271,12 @@ main(int argc, /* I - Number of command-line arguments */ case 'd': cups_modeldir = optarg; break; + case 's': + which_ppds = 1; + break; + case 'a': + which_ppds = 3; + break; case 'V': printf("cups-genppd version %s, " "Copyright (c) 1993-2005 by Easy Software Products and Robert Krawitz.\n\n", @@ -413,7 +419,11 @@ main(int argc, /* I - Number of command-line arguments */ if (printer) { - if (write_ppd(printer, prefix, language, verbose)) + if ((which_ppds & 1) && + write_ppd(printer, prefix, language, verbose, 1)) + return 1; + if ((which_ppds & 2) && + write_ppd(printer, prefix, language, verbose, 0)) return 1; } else @@ -430,8 +440,15 @@ main(int argc, /* I - Number of command-line arguments */ { printer = stp_get_printer_by_index(i); - if (printer && write_ppd(printer, prefix, language, verbose)) - return (1); + if (printer) + { + if ((which_ppds & 1) && + write_ppd(printer, prefix, language, verbose, 1)) + return (1); + if ((which_ppds & 2) && + write_ppd(printer, prefix, language, verbose, 0)) + return (1); + } } } if (!verbose) @@ -458,7 +475,7 @@ void usage(void) { puts("Usage: cups-genppd [-c localedir] " - "[-l locale] [-p prefix] [-q] [-v] models...\n" + "[-l locale] [-p prefix] [-s | -a] [-q] [-v] models...\n" " cups-genppd -L [-c localedir]\n" " cups-genppd -M [-v]\n" " cups-genppd -h\n" @@ -484,6 +501,8 @@ help(void) " -l locale Output PPDs translated with messages for locale.\n" " -p prefix Output PPDs in directory prefix.\n" " -d prefix Embed directory prefix in PPD file.\n" + " -s Generate simplified PPD files.\n" + " -a Generate all (simplified and full) PPD files.\n" " -q Quiet mode.\n" " -v Verbose mode.\n" "models:\n" @@ -745,7 +764,8 @@ int /* O - Exit status */ write_ppd(const stp_printer_t *p, /* I - Printer driver */ const char *prefix, /* I - Prefix (directory) for PPD files */ const char *language, - int verbose) + int verbose, + int simplified) { int i, j, k, l; /* Looping vars */ gzFile fp; /* File to write to */ @@ -772,8 +792,9 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ stp_parameter_list_t param_list; const stp_param_string_t *opt; int has_quality_parameter = 0; - int has_image_type_parameter = 0; int printer_is_color = 0; + int maximum_level = simplified ? + STP_PARAMETER_LEVEL_BASIC : STP_PARAMETER_LEVEL_ADVANCED4; /* * Initialize driver-specific variables... @@ -819,8 +840,9 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ * * stp-escp2-ex.5.0.ppd.gz */ - snprintf(filename, sizeof(filename) - 1, "%s/stp-%s.%s%s%s", - prefix, driver, GUTENPRINT_RELEASE_VERSION, ppdext, gzext); + snprintf(filename, sizeof(filename) - 1, "%s/stp-%s.%s%s%s%s", + prefix, driver, GUTENPRINT_RELEASE_VERSION, + simplified ? ".sim" : "", ppdext, gzext); /* * Open the PPD file... @@ -877,7 +899,8 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ */ gzprintf(fp, "*PCFileName: \"STP%05d.PPD\"\n", - stp_get_printer_index_by_driver(driver)); + stp_get_printer_index_by_driver(driver) + + simplified ? stp_printer_model_count() : 0); gzprintf(fp, "*Manufacturer: \"%s\"\n", manufacturer); /* @@ -909,8 +932,9 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ * If this is changed, the corresponding change must be made in * rastertoprinter.c. Look for "ppd->nickname" */ - gzprintf(fp, "*NickName: \"%s%s%s\"\n", - long_name, CUPS_PPD_NICKNAME_STRING, VERSION); + gzprintf(fp, "*NickName: \"%s%s%s%s\"\n", + long_name, CUPS_PPD_NICKNAME_STRING, VERSION, + simplified ? " Simplified" : ""); if (cups_ppd_ps_level == 2) gzputs(fp, "*PSVersion: \"(2017.000) 550\"\n"); else @@ -965,12 +989,13 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ gzputs(fp, "*cupsFilter: \"application/vnd.cups-command 33 commandtoepson\"\n"); gzputs(fp, "\n"); gzprintf(fp, "*StpDriverName: \"%s\"\n", driver); - gzprintf(fp, "*StpPPDLocation: \"%s%s%s/stp-%s.%s%s%s\"\n", + gzprintf(fp, "*StpPPDLocation: \"%s%s%s/stp-%s.%s%s%s%s\"\n", cups_modeldir, cups_modeldir[strlen(cups_modeldir) - 1] == '/' ? "" : "/", language ? language : "C", driver, GUTENPRINT_RELEASE_VERSION, + simplified ? ".sim" : "", ppdext, gzext); gzprintf(fp, "*StpLocale: \"%s\"\n", language ? language : "C"); @@ -1006,6 +1031,10 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ variable_sizes = 1; continue; } + if (simplified && num_opts >= 10 && + (papersize->paper_unit == PAPERSIZE_ENGLISH_EXTENDED || + papersize->paper_unit == PAPERSIZE_METRIC_EXTENDED)) + continue; width = papersize->width; height = papersize->height; @@ -1016,7 +1045,16 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ stp_set_string_parameter(v, "PageSize", opt->name); stp_get_media_size(v, &width, &height); - stp_get_imageable_area(v, &left, &right, &bottom, &top); + stp_get_maximum_imageable_area(v, &left, &right, &bottom, &top); + + if (left < 0) + left = 0; + if (right > width) + right = width; + if (bottom > height) + bottom = height; + if (top < 0) + top = 0; the_papers[cur_opt].name = opt->name; the_papers[cur_opt].text = opt->text; @@ -1085,7 +1123,15 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ &min_width, &min_height); stp_set_string_parameter(v, "PageSize", "Custom"); stp_get_media_size(v, &width, &height); - stp_get_imageable_area(v, &left, &right, &bottom, &top); + stp_get_maximum_imageable_area(v, &left, &right, &bottom, &top); + if (left < 0) + left = 0; + if (top < 0) + top = 0; + if (bottom > height) + bottom = height; + if (right > width) + width = right; gzprintf(fp, "*MaxMediaWidth: \"%d\"\n", max_width); gzprintf(fp, "*MaxMediaHeight: \"%d\"\n", max_height); @@ -1120,52 +1166,67 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ gzprintf(fp, "*ColorModel Gray/Grayscale:\t\"<<" "/cupsColorSpace %d" "/cupsColorOrder %d" + "%s" ">>setpagedevice\"\n", - CUPS_CSPACE_W, CUPS_ORDER_CHUNKED); + CUPS_CSPACE_W, CUPS_ORDER_CHUNKED, + simplified ? "/cupsBitsPerColor 8" : ""); gzprintf(fp, "*ColorModel Black/Inverted Grayscale:\t\"<<" "/cupsColorSpace %d" "/cupsColorOrder %d" + "%s" ">>setpagedevice\"\n", - CUPS_CSPACE_K, CUPS_ORDER_CHUNKED); + CUPS_CSPACE_K, CUPS_ORDER_CHUNKED, + simplified ? "/cupsBitsPerColor 8" : ""); if (printer_is_color) { gzprintf(fp, "*ColorModel RGB/RGB Color:\t\"<<" "/cupsColorSpace %d" "/cupsColorOrder %d" + "%s" ">>setpagedevice\"\n", - CUPS_CSPACE_RGB, CUPS_ORDER_CHUNKED); + CUPS_CSPACE_RGB, CUPS_ORDER_CHUNKED, + simplified ? "/cupsBitsPerColor 8" : ""); gzprintf(fp, "*ColorModel CMY/CMY Color:\t\"<<" "/cupsColorSpace %d" "/cupsColorOrder %d" + "%s" ">>setpagedevice\"\n", - CUPS_CSPACE_CMY, CUPS_ORDER_CHUNKED); + CUPS_CSPACE_CMY, CUPS_ORDER_CHUNKED, + simplified ? "/cupsBitsPerColor 8" : ""); gzprintf(fp, "*ColorModel CMYK/CMYK:\t\"<<" "/cupsColorSpace %d" "/cupsColorOrder %d" + "%s" ">>setpagedevice\"\n", - CUPS_CSPACE_CMYK, CUPS_ORDER_CHUNKED); + CUPS_CSPACE_CMYK, CUPS_ORDER_CHUNKED, + simplified ? "/cupsBitsPerColor 8" : ""); gzprintf(fp, "*ColorModel KCMY/KCMY:\t\"<<" "/cupsColorSpace %d" "/cupsColorOrder %d" + "%s" ">>setpagedevice\"\n", - CUPS_CSPACE_KCMY, CUPS_ORDER_CHUNKED); + CUPS_CSPACE_KCMY, CUPS_ORDER_CHUNKED, + simplified ? "/cupsBitsPerColor 8" : ""); } gzputs(fp, "*CloseUI: *ColorModel\n\n"); - /* - * 8 or 16 bit color (16 bit is slower) - */ - gzputs(fp, "*OpenUI *StpColorPrecision/Color Precision: PickOne\n"); - gzputs(fp, "*OrderDependency: 10 AnySetup *StpColorPrecision\n"); - gzputs(fp, "*DefaultStpColorPrecision: Normal\n"); - gzputs(fp, "*StpColorPrecision Normal/Normal:\t\"<<" - "/cupsBitsPerColor 8>>setpagedevice\"\n"); - gzputs(fp, "*StpColorPrecision Best/Best:\t\"<<" - "/cupsBitsPerColor 8" - "/cupsPreferredBitsPerColor 16>>setpagedevice\"\n"); - gzputs(fp, "*CloseUI: *StpColorPrecision\n\n"); + if (!simplified) + { + /* + * 8 or 16 bit color (16 bit is slower) + */ + gzputs(fp, "*OpenUI *StpColorPrecision/Color Precision: PickOne\n"); + gzputs(fp, "*OrderDependency: 10 AnySetup *StpColorPrecision\n"); + gzputs(fp, "*DefaultStpColorPrecision: Normal\n"); + gzputs(fp, "*StpColorPrecision Normal/Normal:\t\"<<" + "/cupsBitsPerColor 8>>setpagedevice\"\n"); + gzputs(fp, "*StpColorPrecision Best/Best:\t\"<<" + "/cupsBitsPerColor 8" + "/cupsPreferredBitsPerColor 16>>setpagedevice\"\n"); + gzputs(fp, "*CloseUI: *StpColorPrecision\n\n"); + } /* * Media types... @@ -1251,27 +1312,6 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ stp_parameter_description_destroy(&desc); stp_clear_string_parameter(v, "Quality"); - /* - * Image type - */ - - stp_describe_parameter(v, "ImageType", &desc); - if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST && desc.is_active) - { - has_image_type_parameter = 1; - gzprintf(fp, "*OpenUI *StpImageType/%s: PickOne\n", _(desc.text)); - gzputs(fp, "*OrderDependency: 5 AnySetup *StpImageType\n"); - gzprintf(fp, "*DefaultStpImageType: %s\n", desc.deflt.str); - num_opts = stp_string_list_count(desc.bounds.str); - for (i = 0; i < num_opts; i++) - { - opt = stp_string_list_param(desc.bounds.str, i); - gzprintf(fp, "*StpImageType %s/%s: \"\"\n", opt->name, opt->text); - } - gzputs(fp, "*CloseUI: *StpImageType\n\n"); - } - stp_parameter_description_destroy(&desc); - /* * Resolutions... */ @@ -1279,40 +1319,43 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ stp_describe_parameter(v, "Resolution", &desc); num_opts = stp_string_list_count(desc.bounds.str); - gzprintf(fp, "*OpenUI *Resolution/%s: PickOne\n", _("Resolution")); - gzputs(fp, "*OrderDependency: 20 AnySetup *Resolution\n"); - if (has_quality_parameter) - gzprintf(fp, "*DefaultResolution: None\n"); - else - gzprintf(fp, "*DefaultResolution: %s\n", desc.deflt.str); + if (!simplified || desc.p_level == STP_PARAMETER_LEVEL_BASIC) + { + gzprintf(fp, "*OpenUI *Resolution/%s: PickOne\n", _("Resolution")); + gzputs(fp, "*OrderDependency: 20 AnySetup *Resolution\n"); + if (has_quality_parameter) + gzprintf(fp, "*DefaultResolution: None\n"); + else + gzprintf(fp, "*DefaultResolution: %s\n", desc.deflt.str); - stp_clear_string_parameter(v, "Quality"); - if (has_quality_parameter) - gzprintf(fp, "*Resolution None/%s: \"\"\n", _("Automatic")); - for (i = 0; i < num_opts; i ++) - { - /* - * Strip resolution name to its essentials... - */ - opt = stp_string_list_param(desc.bounds.str, i); - stp_set_string_parameter(v, "Resolution", opt->name); - stp_describe_resolution(v, &xdpi, &ydpi); + stp_clear_string_parameter(v, "Quality"); + if (has_quality_parameter) + gzprintf(fp, "*Resolution None/%s: \"\"\n", _("Automatic")); + for (i = 0; i < num_opts; i ++) + { + /* + * Strip resolution name to its essentials... + */ + opt = stp_string_list_param(desc.bounds.str, i); + stp_set_string_parameter(v, "Resolution", opt->name); + stp_describe_resolution(v, &xdpi, &ydpi); - /* This should not happen! */ - if (xdpi == -1 || ydpi == -1) - continue; + /* This should not happen! */ + if (xdpi == -1 || ydpi == -1) + continue; - /* - * Write the resolution option... - */ + /* + * Write the resolution option... + */ - gzprintf(fp, "*Resolution %s/%s:\t\"<>setpagedevice\"\n", - opt->name, opt->text, xdpi, ydpi, i + 1); - } + gzprintf(fp, "*Resolution %s/%s:\t\"<>setpagedevice\"\n", + opt->name, opt->text, xdpi, ydpi, i + 1); + } - stp_parameter_description_destroy(&desc); + gzputs(fp, "*CloseUI: *Resolution\n\n"); + } - gzputs(fp, "*CloseUI: *Resolution\n\n"); + stp_parameter_description_destroy(&desc); stp_describe_parameter(v, "OutputOrder", &desc); if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST) @@ -1361,7 +1404,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ for (j = 0; j <= STP_PARAMETER_CLASS_OUTPUT; j++) { - for (k = 0; k <= STP_PARAMETER_LEVEL_ADVANCED4; k++) + for (k = 0; k <= maximum_level; k++) { int printed_open_group = 0; size_t param_count = stp_parameter_list_count(param_list); @@ -1450,14 +1493,17 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ gzprintf(fp, "*Stp%s None/%.3f: \"\"\n", desc.name, desc.deflt.dbl); gzprintf(fp, "*CloseUI: *Stp%s\n\n", desc.name); - gzprintf(fp, "*OpenUI *StpFine%s/%s %s: PickOne\n", - desc.name, _(desc.text), _("Fine Adjustment")); - gzprintf(fp, "*DefaultStpFine%s:None\n", desc.name); - gzprintf(fp, "*StpFine%s None/0.000: \"\"\n", desc.name); - for (i = 0; i < 100; i += 5) - gzprintf(fp, "*StpFine%s %d/%.3f: \"\"\n", - desc.name, i, ((double) i) * .001); - gzprintf(fp, "*CloseUI: *StpFine%s\n\n", desc.name); + if (!simplified) + { + gzprintf(fp, "*OpenUI *StpFine%s/%s %s: PickOne\n", + desc.name, _(desc.text), _("Fine Adjustment")); + gzprintf(fp, "*DefaultStpFine%s:None\n", desc.name); + gzprintf(fp, "*StpFine%s None/0.000: \"\"\n", desc.name); + for (i = 0; i < 100; i += 5) + gzprintf(fp, "*StpFine%s %d/%.3f: \"\"\n", + desc.name, i, ((double) i) * .001); + gzprintf(fp, "*CloseUI: *StpFine%s\n\n", desc.name); + } print_close_ui = 0; break; @@ -1479,9 +1525,6 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ gzprintf(fp, "*Stp%s %d/%.1f mm: \"\"\n", desc.name, i, ((double) i) * 25.4 / 72); } - gzprintf(fp, "*CloseUI: *Stp%s\n\n", desc.name); - print_close_ui = 0; - break; default: break; @@ -1551,5 +1594,5 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */ /* - * End of "$Id: genppd.c,v 1.113 2005/12/31 21:27:29 rlk Exp $". + * End of "$Id: genppd.c,v 1.117 2006/04/22 00:41:04 rlk Exp $". */ diff --git a/src/cups/rastertoprinter.c b/src/cups/rastertoprinter.c index 64b0d0d..b3f74e8 100644 --- a/src/cups/rastertoprinter.c +++ b/src/cups/rastertoprinter.c @@ -1,5 +1,5 @@ /* - * "$Id: rastertoprinter.c,v 1.97 2005/12/24 23:15:23 rlk Exp $" + * "$Id: rastertoprinter.c,v 1.99 2006/04/17 02:06:18 rlk Exp $" * * Gutenprint based raster filter for the Common UNIX Printing System. * @@ -82,6 +82,10 @@ typedef struct int top; int width; int height; + int left_trim; + int right_trim; + int top_trim; + int bottom_trim; int adjusted_width; int adjusted_height; int last_percent; @@ -325,6 +329,7 @@ static stp_vars_t * initialize_page(cups_image_t *cups, const stp_vars_t *default_settings) { const stp_papersize_t *size; /* Paper size */ + int tmp_left, tmp_right, tmp_top, tmp_bottom, tmp_width, tmp_height; stp_vars_t *v = stp_vars_create_copy(default_settings); stp_set_page_width(v, cups->header.PageSize[0]); @@ -414,15 +419,78 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings) &(cups->bottom), &(cups->top)); fprintf(stderr, "DEBUG: Gutenprint limits w %d l %d r %d h %d t %d b %d\n", cups->width, cups->left, cups->right, cups->height, cups->top, cups->bottom); + + tmp_left = cups->header.ImagingBoundingBox[0]; + tmp_top = cups->header.ImagingBoundingBox[1]; + tmp_right = cups->header.ImagingBoundingBox[2]; + tmp_bottom = cups->header.ImagingBoundingBox[3]; + tmp_width = cups->right - cups->left; + tmp_height = cups->bottom - cups->top; + if (tmp_left < cups->left) + { + cups->left_trim = cups->left - tmp_left; + fprintf(stderr, "DEBUG: Gutenprint left margin %d\n", cups->left_trim); + tmp_left = cups->left; + } + else + { + cups->left_trim = 0; + fprintf(stderr, "DEBUG: Gutenprint adjusting left margin from %d to %d\n", + cups->left, tmp_left); + cups->left = tmp_left; + } + if (tmp_right > cups->right) + { + cups->right_trim = tmp_right - cups->right; + fprintf(stderr, "DEBUG: Gutenprint right margin %d\n", cups->right_trim); + tmp_right = cups->right; + } + else + { + cups->right_trim = 0; + fprintf(stderr, "DEBUG: Gutenprint adjusting right margin from %d to %d\n", + cups->right, tmp_right); + cups->right = tmp_right; + } + if (tmp_top < cups->top) + { + cups->top_trim = cups->top - tmp_top; + fprintf(stderr, "DEBUG: Gutenprint top margin %d\n", cups->top_trim); + tmp_top = cups->top; + } + else + { + cups->top_trim = 0; + fprintf(stderr, "DEBUG: Gutenprint adjusting top margin from %d to %d\n", + cups->top, tmp_top); + cups->top = tmp_top; + } + if (tmp_bottom > cups->bottom) + { + cups->bottom_trim = tmp_bottom - cups->bottom; + fprintf(stderr, "DEBUG: Gutenprint bottom margin %d\n", cups->bottom_trim); + tmp_bottom = cups->bottom; + } + else + { + cups->bottom_trim = 0; + fprintf(stderr, "DEBUG: Gutenprint adjusting bottom margin from %d to %d\n", + cups->bottom, tmp_bottom); + cups->bottom = tmp_bottom; + } + stp_set_width(v, cups->right - cups->left); stp_set_height(v, cups->bottom - cups->top); stp_set_left(v, cups->left); stp_set_top(v, cups->top); + cups->right = cups->width - cups->right; cups->width = cups->width - cups->left - cups->right; cups->width = cups->header.HWResolution[0] * cups->width / 72; cups->left = cups->header.HWResolution[0] * cups->left / 72; cups->right = cups->header.HWResolution[0] * cups->right / 72; + cups->left_trim = cups->header.HWResolution[0] * cups->left_trim / 72; + cups->right_trim = cups->header.HWResolution[0] * cups->right_trim / 72; cups->adjusted_width = cups->width; if (cups->adjusted_width > cups->header.cupsWidth) cups->adjusted_width = cups->header.cupsWidth; @@ -432,6 +500,8 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings) cups->height = cups->header.HWResolution[1] * cups->height / 72; cups->top = cups->header.HWResolution[1] * cups->top / 72; cups->bottom = cups->header.HWResolution[1] * cups->bottom / 72; + cups->top_trim = cups->header.HWResolution[1] * cups->top_trim / 72; + cups->bottom_trim = cups->header.HWResolution[1] * cups->bottom_trim / 72; cups->adjusted_height = cups->height; if (cups->adjusted_height > cups->header.cupsHeight) cups->adjusted_height = cups->header.cupsHeight; @@ -659,7 +729,14 @@ main(int argc, /* I - Number of command-line arguments */ return (1); } else if (strcmp(ppd->nickname + strlen(ppd->modelname) + - strlen(CUPS_PPD_NICKNAME_STRING), version_id) != 0) + strlen(CUPS_PPD_NICKNAME_STRING), version_id) != 0 && + (strlen(ppd->nickname + strlen(ppd->modelname) + + strlen(CUPS_PPD_NICKNAME_STRING)) < strlen(version_id) || + !((strncmp(ppd->nickname + strlen(ppd->modelname) + + strlen(CUPS_PPD_NICKNAME_STRING), version_id, + strlen(version_id)) == 0) && + *(ppd->nickname + strlen(ppd->modelname) + + strlen(CUPS_PPD_NICKNAME_STRING)) != ' '))) { fprintf(stderr, "ERROR: Gutenprint: The version of Gutenprint software installed (%s) does not match the PPD file (%s).\n", version_id, @@ -943,6 +1020,7 @@ Image_get_row(stp_image_t *image, /* I - Image */ unsigned char *orig = data; /* Temporary pointer */ static int warned = 0; /* Error warning printed? */ int new_percent; + int left_margin, right_margin; if ((cups = (cups_image_t *)(image->rep)) == NULL) { @@ -952,7 +1030,13 @@ Image_get_row(stp_image_t *image, /* I - Image */ bytes_per_line = ((cups->adjusted_width * cups->header.cupsBitsPerPixel) + CHAR_BIT - 1) / CHAR_BIT; - margin = cups->header.cupsBytesPerLine - bytes_per_line; + + left_margin = ((cups->left_trim * cups->header.cupsBitsPerPixel) + CHAR_BIT - 1) / + CHAR_BIT; + right_margin = ((cups->right_trim * cups->header.cupsBitsPerPixel) + CHAR_BIT - 1) / + CHAR_BIT; + margin = cups->header.cupsBytesPerLine - left_margin - bytes_per_line - + right_margin; if (cups->row < cups->header.cupsHeight) { @@ -960,12 +1044,19 @@ Image_get_row(stp_image_t *image, /* I - Image */ bytes_per_line, cups->row); while (cups->row <= row && cups->row < cups->header.cupsHeight) { + if (left_margin > 0) + { + fprintf(stderr, "DEBUG2: Gutenprint tossing left %d (%d)\n", + left_margin, cups->left_trim); + throwaway_data(left_margin, cups); + } cupsRasterReadPixels(cups->ras, data, bytes_per_line); cups->row ++; - if (margin > 0) + if (margin + right_margin > 0) { - fprintf(stderr, "DEBUG2: Gutenprint tossing right %d\n", margin); - throwaway_data(margin, cups); + fprintf(stderr, "DEBUG2: Gutenprint tossing right %d (%d) + %d\n", + right_margin, cups->right_trim, margin); + throwaway_data(margin + right_margin, cups); } } } @@ -1001,7 +1092,7 @@ Image_get_row(stp_image_t *image, /* I - Image */ if (warned == 0) { fprintf(stderr, - "WARNING: Gutenprint detected broken job options. " + "WARNING: Gutenprint detected bad CUPS bit depth (1). " "Output quality is degraded. Are you using psnup or non-ADSC PostScript?\n"); warned = 1; } @@ -1098,5 +1189,5 @@ Image_width(stp_image_t *image) /* I - Image */ /* - * End of "$Id: rastertoprinter.c,v 1.97 2005/12/24 23:15:23 rlk Exp $". + * End of "$Id: rastertoprinter.c,v 1.99 2006/04/17 02:06:18 rlk Exp $". */ diff --git a/src/cups/test-ppds b/src/cups/test-ppds new file mode 100755 index 0000000..050906a --- /dev/null +++ b/src/cups/test-ppds @@ -0,0 +1,56 @@ +#!/bin/sh + +status=0 +verbose=0 +strict=0 + +usage() { + echo "Usage: run-testpattern [-v] [-s]" + exit +} + +set_args() { + while true ; do + case "$1" in + -h*|--h*) usage ;; + -v) verbose=1 ;; + -s) strict=1 ;; + --) shift; args="$@"; return ;; + *) return ;; + esac + shift + done +} + +set_args `getopt vhs "$@"` + + +if [ -d ppd ] ; then + for f in ppd/* ; do + echo -n "$f..." + cupstestppd -r -q $f/* + if [ $? -ne 0 ] ; then + echo -n "FAILED" + if [ $verbose -ne 0 ] ; then + cupstestppd $f/* 2>&1 | grep FAIL + fi + status=1 + else + cupstestppd -q $f/* + if [ $? -ne 0 ] ; then + # Don't actually error if strict checks fail. + # These errors are less important, and we'll accept them. + echo -n "WARNING: strict checks failed" + if [ $verbose -ne 0 ] ; then + cupstestppd $f/* 2>&1 | grep FAIL + fi + if [ $strict -ne 0 ] ; then + status=1 + fi + fi + fi + echo + done +fi + +exit $status diff --git a/src/escputil/Makefile.in b/src/escputil/Makefile.in index 4ba8eb2..8158d09 100644 --- a/src/escputil/Makefile.in +++ b/src/escputil/Makefile.in @@ -16,6 +16,9 @@ # Variables +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -262,6 +265,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -585,9 +589,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: diff --git a/src/escputil/d4lib.c b/src/escputil/d4lib.c index 3ae79a2..5525abd 100644 --- a/src/escputil/d4lib.c +++ b/src/escputil/d4lib.c @@ -177,10 +177,88 @@ static errorMessage_t errorMessage[] = sig = signal(SIGALRM, sigAlarm); \ } +/*******************************************************************/ +/* Function printHexValues */ +/* */ +/* Print hex code contained in the passed buffer */ +/* */ +/*******************************************************************/ + +static void printHexValues(const char *dir, const unsigned char *buf, int len) +{ + int i, j; + int printable_count = 0; + int longest_printable_run = 0; + int current_printable_run = 0; + int print_strings = 0; + int blocks = (len + 15) / 16; +#if 0 + len = len > 30 ? 30 : len; +#endif + fprintf(stderr,"%s\n",dir); + for (i = 0; i < len; i++) + { + if (isprint(buf[i])) + { + if (!isspace(buf[i])) + printable_count++; + current_printable_run++; + } + else + { + if (current_printable_run > longest_printable_run) + longest_printable_run = current_printable_run; + } + } + if (current_printable_run > longest_printable_run) + longest_printable_run = current_printable_run; + if (longest_printable_run >= 8 || + ((float) printable_count / (float) len > .75)) + print_strings = 1; + if (print_strings) + { + for (i = 0; i < len; i++) + { + fprintf(stderr,"%c",isprint(buf[i])||isspace(buf[i])?buf[i]:'*'); + if (buf[i] == ';' && i < len - 1) + fprintf(stderr, "\n"); + } + fprintf(stderr, "\n"); + } + for (j = 0; j < blocks; j++) + { + int baseidx = j * 16; + int count = len; + if (count > baseidx + 16) + count = baseidx + 16; + fprintf(stderr, "%4d: ", baseidx); + for ( i = baseidx; i < count;i++) + { + if (i % 4 == 0) + fprintf(stderr, " "); + fprintf(stderr," %02x",buf[i]); + } + if (print_strings) + { + fprintf(stderr,"\n "); + for ( i = baseidx; i < count;i++) + { + if (i % 4 == 0) + fprintf(stderr, " "); + fprintf(stderr," %c", + isprint(buf[i]) && !isspace(buf[i]) ? buf[i] : ' '); + } + } + fprintf(stderr, "\n"); + } +} + int SafeWrite(int fd, const void *data, int len) { int status; int retries=30; + if (debugD4) + printHexValues("SafeWrite: ", data, len); do { status = write(fd, data, len); @@ -192,29 +270,6 @@ int SafeWrite(int fd, const void *data, int len) return(status); } -/*******************************************************************/ -/* Function printHexValues */ -/* */ -/* Print hex code contained in the passed buffer */ -/* */ -/*******************************************************************/ - -static void printHexValues(const char *dir, unsigned char *buf, int len) -{ - int i; -#if 0 - len = len > 30 ? 30 : len; -#endif - fprintf(stderr,"%s",dir); - for ( i = 0; i < len;i++) - fprintf(stderr,"%02x ",buf[i]); - fprintf(stderr,"\n"); - fprintf(stderr," "); - for ( i = 0; i < len;i++) - fprintf(stderr,"%c ",isprint(buf[i])&&!isspace(buf[i])?buf[i]:' '); - fprintf(stderr,"\n"); -} - /*******************************************************************/ /* Function sigAlarm(int code) */ /* */ @@ -233,7 +288,7 @@ static void sigAlarm(int code) /* Function printError() */ /* print an error message on stderr */ /* */ -/* Input: unsigned char errorNb the error number */ +/* Input: unsigned char errorNb the error number */ /* */ /* Return: fatal = 1 or recoverable = 0 */ /* */ @@ -324,11 +379,11 @@ static int writeCmd(int fd, unsigned char *cmd, int len) # endif if ( cmd[0] == 0 && cmd[1] == 0 ) { - printHexValues("Send: ", (unsigned char*)cmd, len); + printHexValues("Send: ", cmd, len); } else { - printHexValues("Send: ", (unsigned char*)cmd, 6); + printHexValues("Send: ", cmd, 6); } } @@ -389,6 +444,7 @@ int readAnswer(int fd, unsigned char *buf, int len) struct itimerval ti, oti; long dt; int count = 0; + int first_read = 1; /* wait a little bit before reading an answer */ usleep(d4RdTimeout); @@ -408,8 +464,20 @@ int readAnswer(int fd, unsigned char *buf, int len) SET_TIMER(ti,oti, d4RdTimeout); rd = read(fd, buf+total, len-total); if (debugD4) - fprintf(stderr, "read: %i %s\n", rd, - rd < 0 && errno != 0 ?strerror(errno) : ""); + { + if (first_read) + { + fprintf(stderr, "read: "); + first_read = 0; + } + if (rd < 0) + { + fprintf(stderr, "%i %s\n", rd, errno != 0 ?strerror(errno) : ""); + first_read = 1; + } + else + fprintf(stderr, "%i ", rd); + } RESET_TIMER(ti,oti); if ( rd <= 0 ) { diff --git a/src/escputil/escputil.c b/src/escputil/escputil.c index 8997a97..0aa46db 100644 --- a/src/escputil/escputil.c +++ b/src/escputil/escputil.c @@ -1,5 +1,5 @@ /* - * "$Id: escputil.c,v 1.79 2005/12/31 21:23:08 rlk Exp $" + * "$Id: escputil.c,v 1.85 2006/04/16 01:00:51 rlk Exp $" * * Printer maintenance utility for EPSON Stylus (R) printers * @@ -31,6 +31,7 @@ #include #include #include +#include #if defined(HAVE_VARARGS_H) && !defined(HAVE_STDARG_H) #include #else @@ -67,13 +68,13 @@ int do_print_cmd(void); const char *banner = N_("\ -Escputil version " VERSION ", Copyright (C) 2000-2003 Robert Krawitz\n\ +Escputil version " VERSION ", Copyright (C) 2000-2006 Robert Krawitz\n\ Escputil comes with ABSOLUTELY NO WARRANTY; for details type 'escputil -l'\n\ This is free software, and you are welcome to redistribute it\n\ under certain conditions; type 'escputil -l' for details.\n"); const char *license = N_("\ -Copyright 2000 Robert Krawitz (rlk@alum.mit.edu)\n\ +Copyright 2000-2006 Robert Krawitz (rlk@alum.mit.edu)\n\ \n\ This program is free software; you can redistribute it and/or modify it\n\ under the terms of the GNU General Public License as published by the Free\n\ @@ -90,7 +91,7 @@ along with this program; if not, write to the Free Software\n\ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"); -#ifdef HAVE_GETOPT_H +#if defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG) struct option optlist[] = { @@ -110,12 +111,15 @@ struct option optlist[] = { "license", 0, NULL, (int) 'l' }, { "list-models", 0, NULL, (int) 'M' }, { "short-name", 0, NULL, (int) 'S' }, + { "choices", 0, NULL, (int) 'C' }, + { "patterns", 0, NULL, (int) 'p' }, { NULL, 0, NULL, 0 } }; const char *help_msg = N_("\ Usage: escputil [-c | -n | -a | -i | -e | -s | -d | -l | -M]\n\ [-P printer | -r device] [-u] [-q] [-m model] [ -S ]\n\ + [-C choices] [-p patterns]\n\ Perform maintenance on EPSON Stylus (R) printers.\n\ Examples: escputil --ink-level --raw-device /dev/usb/lp0\n\ escputil --clean-head --new --printer-name MyQueue\n\ @@ -150,12 +154,15 @@ Examples: escputil --ink-level --raw-device /dev/usb/lp0\n\ newer). Only needed when not using a raw device.\n\ -q|--quiet Suppress the banner.\n\ -S|--short-name Print the short name of the printer with --identify.\n\ - -m|--model Specify the precise printer model for head alignment.\n"); + -m|--model Specify the precise printer model for head alignment.\n\ + -C|--choices Specify the number of pattern choices for alignment\n\ + -p|--patterns Specify the number of sets of patterns for alignment\n"); #else const char *help_msg = N_("\ Usage: escputil [OPTIONS] [COMMAND]\n\ Usage: escputil [-c | -n | -a | -i | -e | -s | -d | -l | -M]\n\ [-P printer | -r device] [-u] [-q] [-m model] [ -S ]\n\ + [-C choices] [-p patterns]\n\ Perform maintenance on EPSON Stylus (R) printers.\n\ Examples: escputil -i -r /dev/usb/lp0\n\ escputil -c -u -P MyQueue\n\ @@ -189,7 +196,9 @@ Examples: escputil -i -r /dev/usb/lp0\n\ Only needed when not using a raw device.\n\ -q Suppress the banner.\n\ -S Print the short name of the printer with -d.\n\ - -m Specify the precise printer model for head alignment.\n"); + -m Specify the precise printer model for head alignment.\n\ + -C Specify the number of pattern choices for alignment\n\ + -p Specify the number of sets of patterns for alignment\n"); #endif char *the_printer = NULL; @@ -202,6 +211,8 @@ int found_unknown_old_printer = 0; int print_short_name = 0; const stp_printer_t *the_printer_t = NULL; int printer_was_in_packet_mode = 0; +int alignment_passes = 0; +int alignment_choices = 0; static int stp_debug = 0; #define STP_DEBUG(x) do { if (stp_debug || getenv("STP_DEBUG")) x; } while (0) @@ -251,6 +262,7 @@ exit_packet_mode_old(int do_init) { static char hdr[] = "\000\000\000\033\001@EJL 1284.4\n@EJL \n\033@"; memcpy(printer_cmd + bufpos, hdr, sizeof(hdr) - 1); /* DON'T include null! */ + STP_DEBUG(fprintf(stderr, "Exit packet mode (%d)\n", do_init)); bufpos += sizeof(hdr) - 1; if (!do_init) bufpos -= 2; @@ -260,6 +272,7 @@ static void initialize_print_cmd(int do_init) { bufpos = 0; + STP_DEBUG(fprintf(stderr, "Initialize print command\n")); if (isnew) exit_packet_mode_old(do_init); } @@ -349,6 +362,20 @@ main(int argc, char **argv) case 'S': print_short_name = 1; break; + case 'C': + alignment_choices = atoi(optarg); + if (alignment_choices < 1) + { + printf(_("Alignment choices must be at least 1.")); + do_help(1); + } + case 'p': + alignment_passes = atoi(optarg); + if (alignment_passes < 1) + { + printf(_("Alignment passes must be at least 1.")); + do_help(1); + } default: printf("%s\n", _(banner)); fprintf(stderr, _("Unknown option %c\n"), c); @@ -397,6 +424,24 @@ main(int argc, char **argv) exit(0); } +void +print_debug_data(const char *buf, size_t count) +{ + int i; + for (i = 0; i < count; i++) + { + if (i % 16 == 0) + fprintf(stderr, "\n%4d: ", i); + else if (i % 4 == 0) + fprintf(stderr, " "); + if (isgraph(buf[i])) + fprintf(stderr, " %c", (unsigned) ((unsigned char) buf[i])); + else + fprintf(stderr, " %02x", (unsigned) ((unsigned char) buf[i])); + } + fprintf(stderr, "\n"); +} + int do_print_cmd(void) { @@ -439,6 +484,9 @@ do_print_cmd(void) return 1; } } + STP_DEBUG(fprintf(stderr, "Sending print command to %s:", + raw_device ? raw_device : command)); + STP_DEBUG(print_debug_data(printer_cmd, bufpos)); while (bytes < bufpos) { int status = fwrite(printer_cmd + bytes, 1, bufpos - bytes, pfile); @@ -509,7 +557,12 @@ read_from_printer(int fd, char *buf, int bufsize, int quiet) } while ((status == 0) && (--retry != 0)); - if (status == 0 && retry == 0) + if (status > 0) + { + STP_DEBUG(fprintf(stderr, "read_from_printer returns %d\n", status)); + STP_DEBUG(print_debug_data(buf, status)); + } + else if (status == 0 && retry == 0) { if (!quiet) fprintf(stderr, _("Read from printer timed out\n")); @@ -524,26 +577,75 @@ read_from_printer(int fd, char *buf, int bufsize, int quiet) } static void -do_remote_cmd(const char *cmd, int nargs, ...) +start_remote_sequence(void) { static char remote_hdr[] = "\033@\033(R\010\000\000REMOTE1"; + memcpy(printer_cmd + bufpos, remote_hdr, sizeof(remote_hdr) - 1); + bufpos += sizeof(remote_hdr) - 1; + STP_DEBUG(fprintf(stderr, "Start remote sequence\n")); +} + +static void +end_remote_sequence(void) +{ static char remote_trailer[] = "\033\000\000\000\033\000"; + memcpy(printer_cmd + bufpos, remote_trailer, sizeof(remote_trailer) - 1); + bufpos += sizeof(remote_trailer) - 1; + STP_DEBUG(fprintf(stderr, "End remote sequence\n")); +} + +static void +do_remote_cmd(const char *cmd, int nargs, ...) +{ int i; va_list args; va_start(args, nargs); - memcpy(printer_cmd + bufpos, remote_hdr, sizeof(remote_hdr) - 1); - bufpos += sizeof(remote_hdr) - 1; + start_remote_sequence(); memcpy(printer_cmd + bufpos, cmd, 2); + STP_DEBUG(fprintf(stderr, "Remote command: %s", cmd)); bufpos += 2; printer_cmd[bufpos] = nargs % 256; printer_cmd[bufpos + 1] = (nargs >> 8) % 256; + STP_DEBUG(fprintf(stderr, " %02x %02x", + (unsigned) printer_cmd[bufpos], + (unsigned) printer_cmd[bufpos + 1])); if (nargs > 0) for (i = 0; i < nargs; i++) - printer_cmd[bufpos + 2 + i] = va_arg(args, int); + { + printer_cmd[bufpos + 2 + i] = va_arg(args, int); + STP_DEBUG(fprintf(stderr, " %02x", + (unsigned) printer_cmd[bufpos + 2 + i])); + } + STP_DEBUG(fprintf(stderr, "\n")); + bufpos += 2 + nargs; + end_remote_sequence(); +} + +static void +do_remote_cmd_only(const char *cmd, int nargs, ...) +{ + int i; + va_list args; + va_start(args, nargs); + + memcpy(printer_cmd + bufpos, cmd, 2); + STP_DEBUG(fprintf(stderr, "Remote command: %s", cmd)); + bufpos += 2; + printer_cmd[bufpos] = nargs % 256; + printer_cmd[bufpos + 1] = (nargs >> 8) % 256; + STP_DEBUG(fprintf(stderr, " %02x %02x", + (unsigned) printer_cmd[bufpos], + (unsigned) printer_cmd[bufpos + 1])); + if (nargs > 0) + for (i = 0; i < nargs; i++) + { + printer_cmd[bufpos + 2 + i] = va_arg(args, int); + STP_DEBUG(fprintf(stderr, " %02x", + (unsigned) printer_cmd[bufpos + 2 + i])); + } + STP_DEBUG(fprintf(stderr, "\n")); bufpos += 2 + nargs; - memcpy(printer_cmd + bufpos, remote_trailer, sizeof(remote_trailer) - 1); - bufpos += sizeof(remote_trailer) - 1; } static void @@ -560,6 +662,7 @@ static void add_newlines(int count) { int i; + STP_DEBUG(fprintf(stderr, "Add %d newlines\n", count)); for (i = 0; i < count; i++) { printer_cmd[bufpos++] = '\r'; @@ -571,6 +674,7 @@ static void add_resets(int count) { int i; + STP_DEBUG(fprintf(stderr, "Add %d resets\n", count)); for (i = 0; i < count; i++) { printer_cmd[bufpos++] = '\033'; @@ -678,15 +782,16 @@ initialize_printer(int quiet, int fail_if_not_found) strerror(errno)); exit(1); } - STP_DEBUG(fprintf(stderr, "Try %d alarm %d\n", tries, alarm_interrupt)); - STP_DEBUG(fprintf(stderr, "Reading response of old init command ...\n")); + STP_DEBUG(fprintf(stderr, "Try old command %d alarm %d\n", + tries, alarm_interrupt)); status = read_from_printer(fd, (char*)buf, 1024, 1); if (status <= 0 && tries > 0) { forced_packet_mode = !init_packet(fd, 1); status = 1; } - if (status > 0 && !strstr((char *) buf, "@EJL ID") && tries < 1) + if (!forced_packet_mode && + status > 0 && !strstr((char *) buf, "@EJL ID") && tries < 3) { STP_DEBUG(fprintf(stderr, "Found bad data: %s\n", buf)); /* @@ -709,34 +814,32 @@ initialize_printer(int quiet, int fail_if_not_found) isnew = 1; credit = askForCredit(fd, socket_id, &send_size, &receive_size); - if ( credit > -1 ) + if (credit < 0) { - /* request status command */ - if ( (status = writeData(fd, socket_id, (const unsigned char*)"di\1\0\1", 5, 1)) > 0 ) - { - do - { - if ( ( status = readData(fd, socket_id, (unsigned char*)buf, 1023) ) <= -1 ) - { - return NULL; - } - STP_DEBUG(fprintf(stderr, "readData try %d status %d\n", retry, status)); - } - while ( (retry-- != 0) && strncmp("di", (char*)buf, 2) && strncmp("@EJL ID", (char*)buf, 7)); - if (!retry) - { - return NULL; - } - } - else /* could not write */ - { - fprintf(stderr, _("\nCannot write to %s: %s\n"), raw_device, strerror(errno)); - return NULL; - } + STP_DEBUG(fprintf(stderr, "Cannot get credit\n")); + return NULL; + } + /* request status command */ + status = writeData(fd, socket_id, (const unsigned char*)"di\1\0\1", + 5, 1); + if (status <= 0) + { + fprintf(stderr, _("\nCannot write to %s: %s\n"), + raw_device, strerror(errno)); + return NULL; } - else /* no credit */ + do + { + status = readData(fd, socket_id, (unsigned char*)buf, 1023); + if (status <= -1 ) + return NULL; + STP_DEBUG(fprintf(stderr, "readData try %d status %d\n", + retry, status)); + } + while ( (retry-- != 0) && strncmp("di", (char*)buf, 2) && + strncmp("@EJL ID", (char*)buf, 7)); + if (!retry) { - STP_DEBUG(fprintf(stderr, _("\nCannot get credit (packet mode)!\n"))); return NULL; } } @@ -763,8 +866,8 @@ initialize_printer(int quiet, int fail_if_not_found) { if (!quiet && fail_if_not_found) { - printf(_("\nCannot detect printer type.\n" - "Please use -m to specify your printer model.\n")); + fprintf(stderr, _("\nCannot detect printer type.\n" + "Please use -m to specify your printer model.\n")); do_help(1); } /* @@ -782,8 +885,7 @@ initialize_printer(int quiet, int fail_if_not_found) * However, make it clear that this is a dummy, * so we don't actually try to print it out. */ - STP_DEBUG(fprintf(stderr, - "Can't find printer name, assuming Stylus Photo\n")); + STP_DEBUG(fprintf(stderr, "Can't find printer name, assuming Stylus Photo\n")); printer_model = c_strdup("escp2-photo"); } else @@ -812,8 +914,8 @@ initialize_printer(int quiet, int fail_if_not_found) !strcasecmp(printer_model, long_name) || (!strncmp(short_name, "escp2-", strlen("escp2-")) && !strcasecmp(printer_model, short_name + strlen("escp2-"))) || - (!strncmp(long_name, "EPSON ", strlen("EPSON ")) && - !strcasecmp(printer_model, long_name + strlen("EPSON ")))) + (!strncasecmp(long_name, "Epson ", strlen("Epson ")) && + !strcasecmp(printer_model, long_name + strlen("Epson ")))) { const stp_vars_t *printvars; stp_parameter_t desc; @@ -900,6 +1002,319 @@ static const char *aux_colors[] = }; static int aux_color_count = sizeof(aux_colors) / sizeof(const char *); +static void +print_status(int param) +{ + switch (param) + { + case 0: + printf(_("Status: Error\n")); + break; + case 1: + printf(_("Status: Self-Printing\n")); + break; + case 2: + printf(_("Status: Busy\n")); + break; + case 3: + printf(_("Status: Waiting\n")); + break; + case 4: + printf(_("Status: Idle\n")); + break; + case 5: + printf(_("Status: Paused\n")); + break; + case 7: + printf(_("Status: Cleaning\n")); + break; + case 8: + printf(_("Status: Factory shipment\n")); + break; + case 0xa: + printf(_("Status: Shutting down\n")); + break; + default: + printf(_("Status: Unknown (%d)\n"), param); + break; + } +} + +static void +print_error(int param) +{ + switch (param) + { + case 0: + printf(_("Error: Fatal Error\n")); + break; + case 1: + printf(_("Error: Other interface is selected\n")); + break; + case 2: + printf(_("Error: Cover Open\n")); + break; + case 4: + printf(_("Error: Paper jam\n")); + break; + case 5: + printf(_("Error: Ink out\n")); + break; + case 6: + printf(_("Error: Paper out\n")); + break; + case 0x11: + printf(_("Error: Wait return from the tear-off position\n")); + break; + case 0x12: + printf(_("Error: Double feed error\n")); + break; + case 0x1c: + printf(_("Error: Unrecoverable cutter error\n")); + break; + case 0x1d: + printf(_("Error: Recoverable cutter jam\n")); + break; + case 0x29: + printf(_("Error: CD Tray Out\n")); + break; + case 0x2a: + printf(_("Error: Card loading error\n")); + break; + case 0x2b: + printf(_("Error: Tray cover open\n")); + break; + default: + printf(_("Error: Unknown (%d)\n"), param); + break; + } +} + +static void +print_self_printing_state(int param) +{ + switch (param) + { + case 0: + printf(_("Printing nozzle self-test\n")); + break; + default: + break; + } +} + +static const char * +looking_at_command(const char *buf, const char *cmd) +{ + if (!strncmp(buf, cmd, strlen(cmd))) + { + const char *answer = buf + strlen(cmd); + if (answer[0] == ':') + return (answer + 1); + } + return NULL; +} + +static const char * +find_group(const char *buf) +{ + while (buf[0] == ';') + buf++; + buf = strchr(buf, ';'); + if (buf && buf[1]) + return buf + 1; + else + return NULL; +} + +static int +get_digit(char digit) +{ + if (digit >= '0' && digit <= '9') + return digit - '0'; + else if (digit >= 'A' && digit <= 'F') + return digit - 'A' + 10; + else if (digit >= 'a' && digit <= 'f') + return digit - 'a' + 10; + else + return 0; +} + +static void +print_old_ink_levels(const char *ind, stp_string_list_t *color_list) +{ + int i; + for (i = 0; i < stp_string_list_count(color_list); i++) + { + int val; + if (!ind[0] || ind[0] == ';') + return; + val = (get_digit(ind[0]) << 4) + get_digit(ind[1]); + printf("%18s %20d\n", + _(stp_string_list_param(color_list, i)->text), val); + ind += 2; + } +} + +static void +do_old_status(status_cmd_t cmd, const char *buf, const stp_printer_t *printer) +{ + do + { + const char *ind; + if (cmd == CMD_STATUS && (ind = looking_at_command(buf, "ST")) != 0) + print_status(atoi(ind)); + else if (cmd == CMD_STATUS && + (ind = looking_at_command(buf, "ER")) != 0) + print_error(atoi(ind)); + else if ((ind = looking_at_command(buf, "IQ")) != 0) + { + stp_string_list_t *color_list = NULL; + if (printer) + { + stp_parameter_t desc; + const stp_vars_t *printvars = stp_printer_get_defaults(printer); + stp_describe_parameter(printvars, "ChannelNames", &desc); + if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST) + { + color_list = stp_string_list_create_copy(desc.bounds.str); + STP_DEBUG(fprintf(stderr, + "Using color list from driver (%d %d)\n", + stp_string_list_count(desc.bounds.str), + stp_string_list_count(color_list))); + stp_parameter_description_destroy(&desc); + } + } + if (!color_list)/* use defaults */ + { + stp_string_list_add_string(color_list, "Black", _("Black")); + stp_string_list_add_string(color_list, "Cyan", _("Cyan")); + stp_string_list_add_string(color_list, "Magenta", _("Magenta")); + stp_string_list_add_string(color_list, "Yellow", _("Yellow")); + stp_string_list_add_string(color_list, "LightCyan", _("Light Cyan")); + stp_string_list_add_string(color_list, "LightMagenta", _("Light Magenta")); + } + + if (cmd == CMD_STATUS) + printf(_("Ink Levels:\n")); + printf("%18s %20s\n", _("Ink color"), _("Percent remaining")); + print_old_ink_levels(ind, color_list); + stp_string_list_destroy(color_list); + if (cmd == CMD_STATUS) + printf("\n"); + } + STP_DEBUG(fprintf(stderr, "looking at %s\n", buf)); + } while ((buf = find_group(buf)) != NULL); +} + +static void +do_new_status(status_cmd_t cmd, char *buf, int bytes, + const stp_printer_t *printer) +{ + int i = 0; + int j; + const char *ind; + STP_DEBUG(fprintf(stderr, "New format bytes: %d bytes\n", bytes)); + while (i < bytes) + { + unsigned hdr = buf[i]; + unsigned total_param_count = buf[i + 1]; + unsigned param = buf[i + 2]; + STP_DEBUG(fprintf(stderr, "Header: %x param count: %d\n", hdr, total_param_count)); + if (hdr == 0x0f) /* Always report ink */ + { + size_t count = (total_param_count - 1) / 3; + ind = buf + i + 3; + if (cmd == CMD_STATUS) + printf(_("Ink Levels:\n")); + printf("%18s %20s\n", _("Ink color"), _("Percent remaining")); + for (j = 0; j < count; j++) + { + if (ind[0] < color_count) + printf("%18s %20d\n", + _(colors_new[(int) ind[0]]), ind[2]); + else if (ind[j] == 0x40 && ind[1] < aux_color_count) + printf("%18s %20d\n", + _(aux_colors[(int) ind[1]]), ind[2]); + else + printf("%8s 0x%2x 0x%2x %20d\n", + _("Unknown"), (unsigned char) ind[0], + (unsigned char) ind[1], ind[2]); + ind += 3; + } + if (cmd == CMD_STATUS) + printf("\n"); + } + else if (cmd == CMD_STATUS) + { + switch (hdr) + { + case 0x1: /* Status */ + print_status(param); + break; + case 0x2: /* Error */ + print_error(param); + break; + case 0x3: /* Self-printing */ + print_self_printing_state(param); + break; + case 0x4: /* Warning */ +#if 0 + /* + * Bits mean different things on different printers + * Need to figure out how to do this... + * Maybe we don't really need to, since we're also + * printing out ink levels + */ + for (j = 0; j < total_param_count; i++) + { + param = (unsigned) buf[i + j + 2]; + switch (param) + { + case 0x10: + printf(_("Warning: Black Ink Low\n")); + break; + case 0x11: + printf(_("Warning: Black Ink Low\n")); + break; + case 0x12: + printf(_("Warning: Black Ink Low\n")); + break; + case 0x13: + printf(_("Warning: Black Ink Low\n")); + break; + case 0x14: + printf(_("Warning: Black Ink Low\n")); + break; + case 0x15: + printf(_("Warning: Black Ink Low\n")); + break; + default: + printf(_("Warning: Unknown (%d)\n"), param); + break; + } + } +#endif + break; + case 0x19: /* Job name */ + if (total_param_count > 5) + { + printf(_("Job Name: ")); + for (j = 5; j < total_param_count; j++) + putchar(buf[i + j + 2]); + putchar('\n'); + } + break; + default: + /* Ignore other commands */ + break; + } + } + i += total_param_count + 2; + } + exit(0); +} + static void do_status_command_internal(status_cmd_t cmd) { @@ -908,9 +1323,6 @@ do_status_command_internal(status_cmd_t cmd) int credit; int retry = 4; char buf[1024]; - char *ind = NULL; - char *oind; - int i; const stp_printer_t *printer; const char *cmd_name = NULL; switch (cmd) @@ -932,7 +1344,7 @@ do_status_command_internal(status_cmd_t cmd) STP_DEBUG(fprintf(stderr, "%s...\n", cmd_name)); printer = get_printer(1, 0); if (!found_unknown_old_printer) - STP_DEBUG(fprintf(stderr, "%s found %s%s\n", cmd_name, + STP_DEBUG(fprintf(stderr, "%s found %s%s\n", _(cmd_name), printer ? stp_printer_get_long_name(printer) : printer_model, printer ? "" : "(Unknown model)")); @@ -948,84 +1360,40 @@ do_status_command_internal(status_cmd_t cmd) if (isnew) { credit = askForCredit(fd, socket_id, &send_size, &receive_size); - if ( credit > -1 ) + if (credit < 0) { - /* request status command */ - if ( (status = writeData(fd, socket_id, (const unsigned char*)"st\1\0\1", 5, 1)) > 0 ) - { - do - { - if ( ( status = readData(fd, socket_id, (unsigned char*)buf, 1023) ) <= -1 ) - { - exit(1); - } - STP_DEBUG(fprintf(stderr, "readData try %d status %d\n", retry, status)); - } - while ( (retry-- != 0) && strncmp("st", buf, 2) && strncmp("@BDC ST", buf, 7) ); - /* "@BCD ST ST" found */ - if (!retry) - { - exit(1); - } - buf[status] = '\0'; - if (cmd == CMD_INK_LEVEL) - { - if ( buf[7] == '2' ) - { - STP_DEBUG(fprintf(stderr, "New format ink!\n")); - /* new binary format ! */ - i = 10; - while (buf[i] != 0x0f && i < status) - i += buf[i + 1] + 2; - ind = buf + i; - i = 3; - printf("%18s %20s\n", _("Ink color"), _("Percent remaining")); - while (i < ind[1]) - { - if (ind[i] < color_count) - printf("%18s %20d\n", _(colors_new[(int) ind[i]]), ind[i + 2]); - else if (ind[i] == 0x40 && ind[i + 1] < aux_color_count) - printf("%18s %20d\n", _(aux_colors[(int) ind[i + 1]]), ind[i + 2]); - else - printf("%8s 0x%2x 0x%2x %20d\n", _("Unknown"), (unsigned char) ind[i], (unsigned char) ind[i + 1], ind[i + 2]); - i+=3; - } - ind = NULL; - exit(0); - } - else - /* old format */ - { - STP_DEBUG(fprintf(stderr, "Old format ink!\n")); - buf[status] = '\0'; - ind = buf; - do - { - oind = ind; - ind = strchr(ind, 'I'); - } - while (ind && oind != ind && ind[1] != 'Q' && (ind[1] != '\0' && ind[2] != ':')); - if (!ind || ind[1] != 'Q' || ind[2] != ':' || ind[3] == ';') - { - ind = NULL; - } - } - } - else - ind = buf; - CloseChannel(fd, socket_id); - } - else /* could not write */ - { - fprintf(stderr, _("\nCannot write to %s: %s\n"), raw_device, strerror(errno)); - exit(1); - } - } - else /* no credit */ - { - STP_DEBUG(fprintf(stderr, _("\nCannot get credit (packet mode)!\n"))); + STP_DEBUG(fprintf(stderr, "\nCannot get credit\n")); exit(1); } + /* request status command */ + status = writeData(fd, socket_id, (const unsigned char*)"st\1\0\1", + 5, 1); + if (status <= 0) + { + fprintf(stderr, _("\nCannot write to %s: %s\n"), raw_device, strerror(errno)); + exit(1); + } + do + { + status = readData(fd, socket_id, (unsigned char*)buf, 1023); + if (status < 0) + { + exit(1); + } + STP_DEBUG(fprintf(stderr, "readData try %d status %d\n", retry, status)); + } while ((retry-- != 0) && strncmp("st", buf, 2) && + strncmp("@BDC ST", buf, 7)); + /* "@BCD ST ST" found */ + if (!retry) + { + exit(1); + } + buf[status] = '\0'; + if (buf[7] == '2') + do_new_status(cmd, buf + 12, status - 12, printer); + else + do_old_status(cmd, buf + 9, printer); + CloseChannel(fd, socket_id); } else { @@ -1046,71 +1414,10 @@ do_status_command_internal(status_cmd_t cmd) { exit(1); } - ind = buf; - if (cmd == CMD_INK_LEVEL) - { - do - { - oind = ind; - ind = strchr(ind, 'I'); - } - while (ind && oind != ind && ind[1] != 'Q' && (ind[1] != '\0' && ind[2] != ':')); - if (!ind || ind[1] != 'Q' || ind[2] != ':' || ind[3] == ';') - { - ind = NULL; - } - } - } while (--retry != 0 && !ind); - } - - if (!ind) - { - exit(1); - } - - if (cmd == CMD_INK_LEVEL) - { - stp_parameter_t desc; - const stp_vars_t *printvars; - printvars = stp_printer_get_defaults(printer); - stp_describe_parameter(printvars, "ChannelNames", &desc); - if (desc.p_type != STP_PARAMETER_TYPE_STRING_LIST) - { - fprintf(stderr, _("Printer does not support listing ink types!\n")); - exit(1); - } - ind += 3; - - printf("%18s %20s\n", _("Ink color"), _("Percent remaining")); - for (i = 0; i < stp_string_list_count(desc.bounds.str); i++) - { - int val, j; - if (!ind[0] || ind[0] == ';') - exit(0); - for (j = 0; j < 2; j++) - { - if (ind[j] >= '0' && ind[j] <= '9') - ind[j] -= '0'; - else if (ind[j] >= 'A' && ind[j] <= 'F') - ind[j] = ind[j] - 'A' + 10; - else if (ind[j] >= 'a' && ind[j] <= 'f') - ind[j] = ind[j] - 'a' + 10; - else - exit(1); - } - val = (ind[0] << 4) + ind[1]; - printf("%18s %20d\n",_(stp_string_list_param(desc.bounds.str, i)->text), - val); - ind += 2; - } - stp_parameter_description_destroy(&desc); - } - else - { - char *where; - while ((where = strchr(ind, ';')) != NULL) - *where = '\n'; - printf("%s\n", ind); + } while (--retry != 0 && !status); + buf[status] = '\0'; + if (status > 9) + do_old_status(cmd, buf + 9, printer); } (void) close(fd); exit(0); @@ -1152,8 +1459,9 @@ do_extended_ink_info(int extended_output) stp_describe_parameter(printvars, "ChannelNames", &desc); } else - printf("Warning! Printer %s is not known; information may be incomplete or incorrect\n", - printer_model); + fprintf(stderr, + "Warning! Printer %s is not known; information may be incomplete or incorrect\n", + printer_model); fd = open(raw_device, O_RDWR, 0666); if (fd == -1) @@ -1167,7 +1475,15 @@ do_extended_ink_info(int extended_output) { stp_string_list_t *color_list = stp_string_list_create(); - if (!printer) + if (printer) + { + color_list = stp_string_list_create_copy(desc.bounds.str); + STP_DEBUG(fprintf(stderr, "Using color list from driver (%d %d)\n", + stp_string_list_count(desc.bounds.str), + stp_string_list_count(color_list))); + stp_parameter_description_destroy(&desc); + } + else { /* * If we're using the "new" ink status format and we don't know @@ -1176,180 +1492,164 @@ do_extended_ink_info(int extended_output) * last chance to determine the inks */ credit = askForCredit(fd, socket_id, &send_size, &receive_size); - if ( credit > -1 ) + if (credit < 0) { - /* request status command */ - if ( (status = writeData(fd, socket_id, (const unsigned char*)"st\1\0\1", 5, 1)) > 0 ) - { - do - { - if ((status = readData(fd, socket_id, (unsigned char*)buf, 1023)) <= -1) - { - stp_parameter_description_destroy(&desc); - exit(1); - } - STP_DEBUG(fprintf(stderr, "readData try %d status %d\n", retry, status)); - } - while ( (retry-- != 0) && strncmp("st", buf, 2) && strncmp("@BDC ST", buf, 7) ); - /* "@BCD ST ST" found */ - if (!retry) - { - stp_parameter_description_destroy(&desc); - exit(1); - } - buf[status] = '\0'; - if ( buf[7] == '2' ) - { - STP_DEBUG(fprintf(stderr, "New format ink!\n")); - /* new binary format ! */ - i = 10; - while (buf[i] != 0x0f && i < status) - i += buf[i + 1] + 2; - ind = buf + i; - i = 3; - while (i < ind[1]) - { - if (ind[i] < color_count) - stp_string_list_add_string(color_list, - colors_new[(int) ind[i]], - colors_new[(int) ind[i]]); - else if (ind[i] == 0x40 && ind[i + 1] < aux_color_count) - stp_string_list_add_string(color_list, - aux_colors[(int) ind[i + 1]], - aux_colors[(int) ind[i + 1]]); - else - stp_string_list_add_string(color_list, "Unknown", - "Unknown"); - i+=3; - } - } - } - else /* could not write */ + stp_parameter_description_destroy(&desc); + STP_DEBUG(fprintf(stderr, "Cannot get credit\n")); + exit(1); + } + /* request status command */ + status = writeData(fd, socket_id, (const unsigned char*)"st\1\0\1", + 5, 1); + if (status <= 0) + { + stp_parameter_description_destroy(&desc); + fprintf(stderr, _("\nCannot write to %s: %s\n"), + raw_device, strerror(errno)); + exit(1); + } + do + { + status = readData(fd, socket_id, (unsigned char*)buf, 1023); + if (status < 0) { stp_parameter_description_destroy(&desc); - fprintf(stderr, _("\nCannot write to %s: %s\n"), raw_device, strerror(errno)); exit(1); } + STP_DEBUG(fprintf(stderr, "readData try %d status %d\n", + retry, status)); } - else /* no credit */ + while ((retry-- != 0) && strncmp("st", buf, 2) && + strncmp("@BDC ST", buf, 7)); + /* "@BCD ST ST" found */ + if (!retry) { stp_parameter_description_destroy(&desc); - STP_DEBUG(fprintf(stderr, _("\nCannot get credit (packet mode)!\n"))); exit(1); } + buf[status] = '\0'; + if ( buf[7] == '2' ) + { + STP_DEBUG(fprintf(stderr, "New format ink!\n")); + /* new binary format ! */ + i = 10; + while (buf[i] != 0x0f && i < status) + i += buf[i + 1] + 2; + ind = buf + i; + i = 3; + while (i < ind[1]) + { + if (ind[i] < color_count) + stp_string_list_add_string(color_list, + colors_new[(int) ind[i]], + colors_new[(int) ind[i]]); + else if (ind[i] == 0x40 && ind[i + 1] < aux_color_count) + stp_string_list_add_string(color_list, + aux_colors[(int) ind[i + 1]], + aux_colors[(int) ind[i + 1]]); + else + stp_string_list_add_string(color_list, "Unknown", + "Unknown"); + i+=3; + } + } STP_DEBUG(fprintf(stderr, "Using color list from status message\n")); } - else - { - color_list = stp_string_list_create_copy(desc.bounds.str); - STP_DEBUG(fprintf(stderr, "Using color list from driver (%d %d)\n", - stp_string_list_count(desc.bounds.str), - stp_string_list_count(color_list))); - stp_parameter_description_destroy(&desc); - } + for (i = 0; i < stp_string_list_count(color_list); i++) { + char req[] = "ii\2\0\1\1"; credit = askForCredit(fd, socket_id, &send_size, &receive_size); - if ( credit > -1 ) - { - char req[] = "ii\2\0\1\1"; - req[5] = i + 1; - /* request status command */ - if ( (status = writeData(fd, socket_id, (const unsigned char*)req, 6, 1)) > 0 ) - { - retry = 4; - do - { - if ( ( status = readData(fd, socket_id, (unsigned char*) buf, 1023) ) <= -1 ) - { - exit(1); - } - } while ((retry-- != 0) && strncmp("ii", buf, 2) && strncmp("@BDC PS", buf, 7)); - if (!retry) /* couldn't read answer */ - { - exit(1); - } - ind = strchr(buf, 'I'); - if (!ind) - printf("Cannot identify cartridge in slot %d\n", i); - else if (sscanf(ind, - "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:EPSON;IQT:%x,%x,%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:EPSON;", - &iv[0], &year, &month, &id, - &iv[1], &iv[2], &iv[3], &iv[4], &iv[5], - &year2, &month2, &id2) == 12 || - sscanf(ind, - "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;IQT:%x,%x,%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;", - &iv[0], &year, &month, &id, - &iv[1], &iv[2], &iv[3], &iv[4], &iv[5], - &year2, &month2, &id2) == 12) - { - int j; - printf("%18s %20s %12s %7s\n", - _("Ink color"), _("Percent remaining"), _("Part number"), - _("Date")); - printf("%18s %20d T0%03d %2d%02d-%02d\n", - _(stp_string_list_param(color_list, 0)->text), - iv[0], id, (year > 80 ? 19 : 20), year, month); - for (j = 1; j < 6; j++) - printf("%18s %20d T0%03d %2d%02d-%02d\n", - _(stp_string_list_param(color_list, j)->text), - iv[j], id2, (year2 > 80 ? 19 : 20), year2, month2); - break; - } - else if (sscanf(ind, - "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:EPSON;IQT:%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:EPSON;", - &iv[0], &year, &month, &id, - &iv[1], &iv[2], &iv[3], - &year2, &month2, &id2) == 10 || - sscanf(ind, - "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;IQT:%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;", - &iv[0], &year, &month, &id, - &iv[1], &iv[2], &iv[3], - &year2, &month2, &id2) == 10) - { - int j; - printf("%18s %20s %12s %7s\n", - _("Ink color"), _("Percent remaining"), _("Part number"), - _("Date")); - printf("%18s %20d T0%03d %2d%02d-%02d\n", - _(stp_string_list_param(color_list, 0)->text), - iv[0], id, (year > 80 ? 19 : 20), year, month); - for (j = 1; j < 4; j++) - printf("%18s %20d T0%03d %2d%02d-%02d\n", - _(stp_string_list_param(color_list, j)->text), - iv[j], id2, (year2 > 80 ? 19 : 20), year2, month2); - break; - } - else if (sscanf(ind, - "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:EPSON;", - &val, &year, &month, &id ) == 4 || - sscanf(ind, - "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;", - &val, &year, &month, &id ) == 4) - { - if (i == 0) - printf("%18s %20s %12s %7s\n", - _("Ink color"), _("Percent remaining"), _("Part number"), - _("Date")); - printf("%18s %20d T0%03d %2d%02d-%02d\n", - _(stp_string_list_param(color_list, i)->text), - val, id, (year > 80 ? 19 : 20), year, month); - } - else - { - printf("Cannot identify cartridge in slot %d\n", i); - } - } - else /* could not write */ - { - exit(1); - } - } - else /* no credit */ - { - exit(1); - } - } + if (credit < 0) + exit(1); + req[5] = i + 1; + /* request status command */ + status = writeData(fd, socket_id, (const unsigned char*)req, 6, 1); + if (status <= 0) + exit(1); + retry = 4; + do + { + status = readData(fd, socket_id, (unsigned char*) buf, 1023); + if (status < 0) + { + exit(1); + } + } while ((retry-- != 0) && strncmp("ii", buf, 2) && + strncmp("@BDC PS", buf, 7)); + if (!retry) /* couldn't read answer */ + exit(1); + ind = strchr(buf, 'I'); + if (!ind) + printf("Cannot identify cartridge in slot %d\n", i); + else if (sscanf(ind, + "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:EPSON;IQT:%x,%x,%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:EPSON;", + &iv[0], &year, &month, &id, + &iv[1], &iv[2], &iv[3], &iv[4], &iv[5], + &year2, &month2, &id2) == 12 || + sscanf(ind, + "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;IQT:%x,%x,%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;", + &iv[0], &year, &month, &id, + &iv[1], &iv[2], &iv[3], &iv[4], &iv[5], + &year2, &month2, &id2) == 12) + { + int j; + printf("%18s %20s %12s %7s\n", + _("Ink color"), _("Percent remaining"), _("Part number"), + _("Date")); + printf("%18s %20d T0%03d %2d%02d-%02d\n", + _(stp_string_list_param(color_list, 0)->text), + iv[0], id, (year > 80 ? 19 : 20), year, month); + for (j = 1; j < 6; j++) + printf("%18s %20d T0%03d %2d%02d-%02d\n", + _(stp_string_list_param(color_list, j)->text), + iv[j], id2, (year2 > 80 ? 19 : 20), year2, month2); + break; + } + else if (sscanf(ind, + "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:EPSON;IQT:%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:EPSON;", + &iv[0], &year, &month, &id, + &iv[1], &iv[2], &iv[3], + &year2, &month2, &id2) == 10 || + sscanf(ind, + "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;IQT:%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;", + &iv[0], &year, &month, &id, + &iv[1], &iv[2], &iv[3], + &year2, &month2, &id2) == 10) + { + int j; + printf("%18s %20s %12s %7s\n", + _("Ink color"), _("Percent remaining"), _("Part number"), + _("Date")); + printf("%18s %20d T0%03d %2d%02d-%02d\n", + _(stp_string_list_param(color_list, 0)->text), + iv[0], id, (year > 80 ? 19 : 20), year, month); + for (j = 1; j < 4; j++) + printf("%18s %20d T0%03d %2d%02d-%02d\n", + _(stp_string_list_param(color_list, j)->text), + iv[j], id2, (year2 > 80 ? 19 : 20), year2, month2); + break; + } + else if (sscanf(ind, + "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:EPSON;", + &val, &year, &month, &id ) == 4 || + sscanf(ind, + "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;", + &val, &year, &month, &id ) == 4) + { + if (i == 0) + printf("%18s %20s %12s %7s\n", + _("Ink color"), _("Percent remaining"), _("Part number"), + _("Date")); + printf("%18s %20d T0%03d %2d%02d-%02d\n", + _(stp_string_list_param(color_list, i)->text), + val, id, (year > 80 ? 19 : 20), year, month); + } + else + { + printf("Cannot identify cartridge in slot %d\n", i); + } + } stp_string_list_destroy(color_list); CloseChannel(fd, socket_id); } @@ -1404,6 +1704,7 @@ do_head_clean(void) { if (raw_device) (void) get_printer(1, 0); + initialize_print_cmd(1); do_remote_cmd("CH", 2, 0, 0); printf(_("Cleaning heads...\n")); exit(do_print_cmd()); @@ -1414,8 +1715,12 @@ do_nozzle_check(void) { if (raw_device) (void) get_printer(1, 0); - do_remote_cmd("VI", 2, 0, 0); - do_remote_cmd("NC", 2, 0, 0); + initialize_print_cmd(1); + start_remote_sequence(); + do_remote_cmd_only("VI", 2, 0, 0); + do_remote_cmd_only("NC", 2, 0, 0x10); + do_remote_cmd_only("NC", 2, 0, 0); + end_remote_sequence(); printf(_("Running nozzle check, please ensure paper is in the printer.\n")); exit(do_print_cmd()); } @@ -1506,9 +1811,16 @@ printer_error(void) static int do_final_alignment(void) { + int retry_count = 0; while (1) { char *inbuf; + retry_count++; + if (retry_count > 10) + { + printf(_("Exiting\n")); + exit(1); + } printf(_("Please inspect the final output very carefully to ensure that your\n" "printer is in proper alignment. You may now:\n" " (s)ave the results in the printer,\n" @@ -1518,6 +1830,8 @@ do_final_alignment(void) "What do you want to do (s, q, r)?\n")); fflush(stdout); inbuf = do_get_input(_("> ")); + if (!inbuf) + continue; switch (inbuf[0]) { case 'q': @@ -1525,6 +1839,8 @@ do_final_alignment(void) printf(_("Please confirm by typing 'q' again that you wish to quit without saving:\n")); fflush(stdout); inbuf = do_get_input (_("> ")); + if (!inbuf) + continue; if (inbuf[0] == 'q' || inbuf[0] == 'Q') { printf(_("OK, your printer is aligned, but the alignment has not been saved.\n" @@ -1538,6 +1854,8 @@ do_final_alignment(void) "alignment process:\n")); fflush(stdout); inbuf = do_get_input(_("> ")); + if (!inbuf) + continue; if (inbuf[0] == 'r' || inbuf[0] == 'R') { printf(_("Repeating the alignment process.\n")); @@ -1554,6 +1872,8 @@ do_final_alignment(void) fflush(stdout); inbuf = do_get_input(_("> ")); + if (!inbuf) + continue; if (inbuf[0] == 's' || inbuf[0] == 'S') { printf(_("About to save settings...")); @@ -1599,8 +1919,6 @@ do_align(void) int curpass; const stp_printer_t *printer = get_printer(0, 0); stp_parameter_t desc; - int passes = 0; - int choices = 0; const char *printer_name; stp_vars_t *v = stp_vars_create(); @@ -1610,28 +1928,35 @@ do_align(void) printer_name = stp_printer_get_long_name(printer); stp_set_driver(v, stp_printer_get_driver(printer)); - stp_describe_parameter(v, "AlignmentPasses", &desc); - if (desc.p_type != STP_PARAMETER_TYPE_INT) + if (alignment_passes == 0) { - fprintf(stderr, - "Unable to retrieve number of alignment passes for printer %s\n", - printer_name); - return; + stp_describe_parameter(v, "AlignmentPasses", &desc); + if (desc.p_type != STP_PARAMETER_TYPE_INT) + { + fprintf(stderr, + "Unable to retrieve number of alignment passes for printer %s\n", + printer_name); + return; + } + alignment_passes = desc.deflt.integer; + stp_parameter_description_destroy(&desc); } - passes = desc.deflt.integer; - stp_parameter_description_destroy(&desc); - stp_describe_parameter(v, "AlignmentChoices", &desc); - if (desc.p_type != STP_PARAMETER_TYPE_INT) + if (alignment_choices == 0) { - fprintf(stderr, - "Unable to retrieve number of alignment choices for printer %s\n", - printer_name); - return; + stp_describe_parameter(v, "AlignmentChoices", &desc); + if (desc.p_type != STP_PARAMETER_TYPE_INT) + { + fprintf(stderr, + "Unable to retrieve number of alignment choices for printer %s\n", + printer_name); + return; + } + alignment_choices = desc.deflt.integer; + stp_parameter_description_destroy(&desc); } - choices = desc.deflt.integer; - stp_parameter_description_destroy(&desc); - if (passes <= 0 || choices <= 0) + + if (alignment_passes <= 0 || alignment_choices <= 0) { printf("No alignment required for printer %s\n", printer_name); return; @@ -1639,23 +1964,32 @@ do_align(void) do { - do_align_help(passes, choices); + do_align_help(alignment_passes, alignment_choices); printf(_(printer_msg), _(printer_name)); inbuf = do_get_input(_("Press enter to continue > ")); top: initialize_print_cmd(1); - for (curpass = 0; curpass < passes; curpass++) + for (curpass = 0; curpass < alignment_passes; curpass++) do_remote_cmd("DT", 3, 0, curpass, 0); if (do_print_cmd()) printer_error(); printf(_("Please inspect the print, and choose the best pair of lines in each pattern.\n" "Type a pair number, '?' for help, or 'r' to repeat the procedure.\n")); initialize_print_cmd(1); - for (curpass = 1; curpass <= passes; curpass ++) + for (curpass = 1; curpass <= alignment_passes; curpass ++) { + int retry_count = 0; reread: + retry_count++; + if (retry_count > 10) + { + printf(_("Exiting\n")); + return; + } printf(_("Pass #%d"), curpass); inbuf = do_get_input(_("> ")); + if (!inbuf) + goto reread; switch (inbuf[0]) { case 'r': @@ -1668,7 +2002,7 @@ do_align(void) goto top; case 'h': case '?': - do_align_help(passes, choices); + do_align_help(alignment_passes, alignment_choices); fflush(stdout); case '\n': case '\000': @@ -1688,10 +2022,10 @@ do_align(void) fflush(stdout); goto reread; } - if (answer < 1 || answer > choices) + if (answer < 1 || answer > alignment_choices) { printf(_("The best pair of lines should be numbered between 1 and %d.\n"), - choices); + alignment_choices); fflush(stdout); goto reread; } @@ -1704,11 +2038,11 @@ do_align(void) printf(_("Please verify that the alignment is correct. After the alignment pattern\n" "is printed again, please ensure that the best pattern for each line is\n" "pattern %d. If it is not, you should repeat the process to get the best\n" - "quality printing.\n"), (choices + 1) / 2); + "quality printing.\n"), (alignment_choices + 1) / 2); printf(_("Please insert a fresh sheet of paper.\n")); (void) do_get_input(_("Press enter to continue > ")); initialize_print_cmd(1); - for (curpass = 0; curpass < passes; curpass++) + for (curpass = 0; curpass < alignment_passes; curpass++) do_remote_cmd("DT", 3, 0, curpass, 0); if (do_print_cmd()) printer_error(); diff --git a/src/foomatic/Makefile.am b/src/foomatic/Makefile.am index 316dcbe..c285af0 100644 --- a/src/foomatic/Makefile.am +++ b/src/foomatic/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.47 2005/11/22 14:43:05 rleigh Exp $ +## $Id: Makefile.am,v 1.49 2006/05/06 01:11:38 rlk Exp $ ## Copyright (C) 2000 Roger Leigh ## ## This program is free software; you can redistribute it and/or modify @@ -31,6 +31,7 @@ if BUILD_FOOMATIC_3 BUILD_FOOMATIC = 1 endif +STP_ENV= STP_MODULE_PATH=$(top_builddir)/src/main/.libs:$(top_builddir)/src/main STP_DATA_PATH=$(top_srcdir)/src/main ## Programs @@ -74,6 +75,7 @@ all-local: $(INSTALL_DATA_LOCAL_DEPS) install-data-local: $(INSTALL_DATA_LOCAL_DEPS) if test -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \ $(MAKE) install-kit FOOMATIC_DB=foomatic-db/gutenprint-ijs.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ ; \ + $(MAKE) install-kit FOOMATIC_DB=foomatic-db/gutenprint-ijs-simplified.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ ; \ fi install-kit: @@ -91,7 +93,8 @@ foomatic-data: foomatic-stamp foomatic-stamp: foomatic-generator foomatic-printermap $(noinst_PROGRAMS) mk_printerlist $(top_srcdir)/src/main/printers.xml $(top_srcdir)/src/main/papers.xml -$(RM) -r foomatic-db - ./foomatic-generator -m $(srcdir)/foomatic-printermap -t $(srcdir)/foomatic-templates $(FOOMATIC_GENERATOR_EXTRA_OPTS) $(FOOMATIC_GENERATOR_FOOMATIC_3_OPTS) + $(STP_ENV) ./foomatic-generator -m $(srcdir)/foomatic-printermap -t $(srcdir)/foomatic-templates $(FOOMATIC_GENERATOR_EXTRA_OPTS) $(FOOMATIC_GENERATOR_FOOMATIC_3_OPTS) + $(STP_ENV) ./foomatic-generator -s -m $(srcdir)/foomatic-printermap -t $(srcdir)/foomatic-templates $(FOOMATIC_GENERATOR_EXTRA_OPTS) $(FOOMATIC_GENERATOR_FOOMATIC_3_OPTS) touch foomatic-stamp dist-hook: diff --git a/src/foomatic/Makefile.in b/src/foomatic/Makefile.in index 52bb281..8f800ae 100644 --- a/src/foomatic/Makefile.in +++ b/src/foomatic/Makefile.in @@ -16,6 +16,9 @@ # Variables +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -280,6 +283,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -342,6 +346,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS DISTDIRS = foomatic-templates-ijs LOCAL_CPPFLAGS = $(GUTENPRINT_CFLAGS) @BUILD_FOOMATIC_3_TRUE@BUILD_FOOMATIC = 1 +STP_ENV = STP_MODULE_PATH=$(top_builddir)/src/main/.libs:$(top_builddir)/src/main STP_DATA_PATH=$(top_srcdir)/src/main printer_options_SOURCES = printer_options.c printer_options_LDADD = $(GUTENPRINT_LIBS) printer_margins_SOURCES = printer_margins.c @@ -618,9 +623,6 @@ uninstall-am: uninstall-info-am @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: @@ -640,6 +642,7 @@ all-local: $(INSTALL_DATA_LOCAL_DEPS) install-data-local: $(INSTALL_DATA_LOCAL_DEPS) if test -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \ $(MAKE) install-kit FOOMATIC_DB=foomatic-db/gutenprint-ijs.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ ; \ + $(MAKE) install-kit FOOMATIC_DB=foomatic-db/gutenprint-ijs-simplified.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ ; \ fi install-kit: @@ -657,7 +660,8 @@ foomatic-data: foomatic-stamp foomatic-stamp: foomatic-generator foomatic-printermap $(noinst_PROGRAMS) mk_printerlist $(top_srcdir)/src/main/printers.xml $(top_srcdir)/src/main/papers.xml -$(RM) -r foomatic-db - ./foomatic-generator -m $(srcdir)/foomatic-printermap -t $(srcdir)/foomatic-templates $(FOOMATIC_GENERATOR_EXTRA_OPTS) $(FOOMATIC_GENERATOR_FOOMATIC_3_OPTS) + $(STP_ENV) ./foomatic-generator -m $(srcdir)/foomatic-printermap -t $(srcdir)/foomatic-templates $(FOOMATIC_GENERATOR_EXTRA_OPTS) $(FOOMATIC_GENERATOR_FOOMATIC_3_OPTS) + $(STP_ENV) ./foomatic-generator -s -m $(srcdir)/foomatic-printermap -t $(srcdir)/foomatic-templates $(FOOMATIC_GENERATOR_EXTRA_OPTS) $(FOOMATIC_GENERATOR_FOOMATIC_3_OPTS) touch foomatic-stamp dist-hook: diff --git a/src/foomatic/foomatic-generator.in b/src/foomatic/foomatic-generator.in index d3cf386..fdb2a37 100644 --- a/src/foomatic/foomatic-generator.in +++ b/src/foomatic/foomatic-generator.in @@ -6,17 +6,29 @@ Getopt::Long::Configure("no_ignore_case", "pass_through"); GetOptions("m=s" => \$opt_m, # Map file "t=s" => \$opt_t, # Template directory "f=s" => \$opt_f, # Foomatic version - "d=s" => \@opt_d); # which Drivers? + "d=s" => \@opt_d, # which Drivers? + "s" => \$opt_s); # Generate simplified data + # Wherever we put it... my $mapfile; # $mapfile = "../main/printers.xml"; $mapfile = $opt_m; +my $simplified = 0; +my $simplified_subopt = ""; +my $simplified_suffix = ""; +if ($opt_s) { + $simplified = 1; + $simplified_subopt = "-s"; + $simplified_suffix = "-simplified"; +} + + my $templatedir; $templatedir = $opt_t; -my @drivertypes = (ijs); +my @drivertypes = ("ijs"); exit 0 if ($#drivertypes < 0); # Nothing to be done, exit silently @@ -84,8 +96,8 @@ my $opt_index = 0; use Data::Dumper; -open PIPE, "./printer_options|" or die "Cannot run printer_options: $!\n"; -print STDERR "Loading options from ./printer_options..."; +open PIPE, "./printer_options $simplified_subopt|" or die "Cannot run printer_options: $!\n"; +print STDERR "Loading options from ./printer_options $simplified_subopt..."; while() { #print $_; next if m!^#!; @@ -95,8 +107,8 @@ close PIPE or die "Cannot run printer_options: $!\n"; print STDERR "done.\n"; if ($foomatic3) { - open PIPE, "./printer_margins|" or die "Cannot run printer_margins: $!\n"; - print STDERR "Loading margins from ./printer_margins..."; + open PIPE, "./printer_margins $simplified_subopt|" or die "Cannot run printer_margins: $!\n"; + print STDERR "Loading margins from ./printer_margins $simplified_subopt..."; $code = join('', ); #print $code; close PIPE or die "Cannot run printer_margins: $!\n"; @@ -114,6 +126,53 @@ while() { close PIPE or die "Cannot run printers: $!\n"; print STDERR "done.\n"; +# Step 1: construct a map from Model= values to Foomatic model id's +# this map is %mapstp. The inverse from model to Model is %mapdb +# +# Foomatic is supposed to be a superset, so + +$missing_drivers = 0; + +%driverlist = (); +%foolist = (); + +open PRINTERS, $mapfile or die "Cannot open mapfile $mapfile: $!\n"; +for () { + if (m!^#\s*gptofoo\s+([^\s]+)\s+([^\s]+)!) { + if ($driverlist{$1}) { + $missing_drivers = 1; + warn "Duplicate driver $1\n"; + } + $driverlist{$1} = 1; + if ($foolist{$2}) { + $missing_drivers = 1; + warn "Duplicate Foomatic ID $2\n"; + } + $foolist{$2} = 1; + push (@{$mapstp{$1}}, $2); + $mapfoo{$2} = $1; # do we need? + } +} + +# Are we missing any stp printers? +for (keys(%stpdata)) { + if (!defined($mapstp{$_})) { + $missing_drivers = 1; + warn "No foomatic printer IDs for gutenprint printer $_.\n"; + } +} + +for (keys(%mapstp)) { + if (!defined($stpdata{$_})) { + $missing_drivers = 1; + warn "No gutenprint printer for foomatic ID $_.\n"; + } +} + +if ($missing_drivers) { + die "Cannot continue\n"; +} + # OK, now %stpdata is a big honking thing, and %defaults is in there, too. # Invert, to build %bar{$optionname} = [ choice1, choice2 ]; @@ -234,40 +293,6 @@ for $a (keys(%stp_dimension_values)) { #print join("\n", @intnumopts_list); #print join("\n", @dimensionnumopts_list); -# Step 1: construct a map from Model= values to Foomatic model id's -# this map is %mapstp. The inverse from model to Model is %mapdb -# -# Foomatic is supposed to be a superset, so - -open PRINTERS, $mapfile or die "Cannot open mapfile $mapfile: $!\n"; -for () { - if (m!^#\s*gptofoo\s+([^\s]+)\s+([^\s]+)!) { - push (@{$mapstp{$1}}, $2); - $mapfoo{$2} = $1; # do we need? - } -} - -$missing_drivers = 0; - -# Are we missing any stp printers? -for (keys(%stpdata)) { - if (!defined($mapstp{$_})) { - $missing_drivers = 1; - warn "No foomatic printer IDs for gutenprint printer $_.\n"; - } -} - -for (keys(%mapstp)) { - if (!defined($stpdata{$_})) { - $missing_drivers = 1; - warn "No gutenprint printer for foomatic ID $_.\n"; - } -} - -if ($missing_drivers) { - die "Cannot continue\n"; -} - # Figure out version etc open PIPE, "./gutenprint-version|" or die "Cannot run gutenprint-version: $!\n"; my $stpvers = ; @@ -382,7 +407,7 @@ my $tmpl; for $drivertype (@drivertypes) { $drivertypesuffix = "-$drivertype"; $drivertypesuffix =~ s/-gs//; - $drivertypesuffix .= ".$stprel"; + $drivertypesuffix .= "$simplified_suffix.$stprel"; my $drvname = "$drivernameprefix$drivertypesuffix"; $generalsubs->{'DRVNAME'} = $drvname; print "Generating Foomatic data for driver \"$drvname\"...\n"; diff --git a/src/foomatic/foomatic-printermap b/src/foomatic/foomatic-printermap index 4e3eeef..38758a3 100644 --- a/src/foomatic/foomatic-printermap +++ b/src/foomatic/foomatic-printermap @@ -1,112 +1,184 @@ -#gptofoo pcl-690 printer/Apollo-P-2100 -#gptofoo pcl-690 printer/Apollo-P-2150 -#gptofoo pcl-690 printer/Apollo-P-2200 -#gptofoo pcl-690 printer/Apollo-P-2250 -#gptofoo pcl-690 printer/Apollo-P-2500 -#gptofoo pcl-690 printer/Apollo-P-2550 -#gptofoo pcl-690 printer/Apollo-P-2600 -#gptofoo pcl-690 printer/Apollo-P-2650 +#gptofoo pcl-apollo-p2100 printer/Apollo-P-2100 +#gptofoo pcl-apollo-p2150 printer/Apollo-P-2150 +#gptofoo pcl-apollo-p2200 printer/Apollo-P-2200 +#gptofoo pcl-apollo-p2250 printer/Apollo-P-2250 +#gptofoo pcl-apollo-p2500 printer/Apollo-P-2500 +#gptofoo pcl-apollo-p2550 printer/Apollo-P-2550 +#gptofoo pcl-apollo-p2600 printer/Apollo-P-2600 +#gptofoo pcl-apollo-p2650 printer/Apollo-P-2650 #gptofoo pcl-apple-4100 printer/Apple-Color_StyleWriter_4100 #gptofoo pcl-apple-4500 printer/Apple-Color_StyleWriter_4500 #gptofoo pcl-apple-6500 printer/Apple-Color_StyleWriter_6500 -#gptofoo pcl-2 printer/Apple-LaserWriter_Select_360 -#gptofoo pcl-2 printer/Brother-DCP-1200 -#gptofoo pcl-2 printer/Brother-HL-4Ve -#gptofoo pcl-4 printer/Brother-HL-10h -#gptofoo pcl-3 printer/Brother-HL-10V -#gptofoo pcl-2 printer/Brother-HL-630 -#gptofoo pcl-4 printer/Brother-HL-660 -#gptofoo pcl-4 printer/Brother-HL-760 -#gptofoo pcl-4 printer/Brother-HL-960 -#gptofoo pcl-2 printer/Brother-HL-1040 -#gptofoo pcl-4 printer/Brother-HL-1050 -#gptofoo pcl-4 printer/Brother-HL-1060 -#gptofoo pcl-4 printer/Brother-HL-1070 -#gptofoo pcl-2 printer/Brother-HL-1240 -#gptofoo pcl-4 printer/Brother-HL-1250 -#gptofoo pcl-4 printer/Brother-HL-1260 -#gptofoo pcl-4 printer/Brother-HL-1270N -#gptofoo pcl-4 printer/Brother-HL-1440 -#gptofoo pcl-4 printer/Brother-HL-1660e -#gptofoo pcl-4 printer/Brother-HL-2060 -#gptofoo pcl-2 printer/Brother-MFC-6550MC -#gptofoo pcl-3 printer/Brother-MFC-8300 -#gptofoo pcl-2 printer/Brother-MFC-9500 -#gptofoo pcl-2 printer/Brother-MFC-9600 +#gptofoo pcl-apple-lw360 printer/Apple-LaserWriter_Select_360 +#gptofoo brother-dcp-1200 printer/Brother-DCP-1200 +#gptofoo brother-hl-1040 printer/Brother-HL-1040 +#gptofoo brother-hl-1050 printer/Brother-HL-1050 +#gptofoo brother-hl-1060 printer/Brother-HL-1060 +#gptofoo brother-hl-1070 printer/Brother-HL-1070 +#gptofoo brother-hl-10v printer/Brother-HL-10V +#gptofoo brother-hl-10h printer/Brother-HL-10h +#gptofoo brother-hl-1240 printer/Brother-HL-1240 +#gptofoo brother-hl-1250 printer/Brother-HL-1250 +#gptofoo brother-hl-1260 printer/Brother-HL-1260 +#gptofoo brother-hl-1270n printer/Brother-HL-1270N +#gptofoo brother-hl-1440 printer/Brother-HL-1440 +#gptofoo brother-hl-1660e printer/Brother-HL-1660e +#gptofoo brother-hl-2060 printer/Brother-HL-2060 +#gptofoo brother-hl-4ve printer/Brother-HL-4Ve +#gptofoo brother-hl-630 printer/Brother-HL-630 +#gptofoo brother-hl-660 printer/Brother-HL-660 +#gptofoo brother-hl-760 printer/Brother-HL-760 +#gptofoo brother-hl-960 printer/Brother-HL-960 +#gptofoo brother-mfc-6550mc printer/Brother-MFC-6550MC +#gptofoo brother-mfc-8300 printer/Brother-MFC-8300 +#gptofoo brother-mfc-9500 printer/Brother-MFC-9500 +#gptofoo brother-mfc-9600 printer/Brother-MFC-9600 #gptofoo bjc-30 printer/Canon-BJ-30 -#gptofoo bjc-50 printer/Canon-BJC-50 -#gptofoo bjc-55 printer/Canon-BJC-55 -#gptofoo bjc-80 printer/Canon-BJC-80 -#gptofoo bjc-85 printer/Canon-BJC-85 +#gptofoo bjc-1000 printer/Canon-BJC-1000 +#gptofoo bjc-2000 printer/Canon-BJC-2000 +#gptofoo bjc-2010 printer/Canon-BJC-2010 #gptofoo bjc-210 printer/Canon-BJC-210 +#gptofoo bjc-2100 printer/Canon-BJC-2100 +#gptofoo bjc-2110 printer/Canon-BJC-2110 #gptofoo bjc-240 printer/Canon-BJC-240 #gptofoo bjc-250 printer/Canon-BJC-250 -#gptofoo bjc-1000 printer/Canon-BJC-1000 -#gptofoo bjc-2000 printer/Canon-BJC-2000 -#gptofoo bjc-2000 printer/Canon-BJC-2010 -#gptofoo bjc-4300 printer/Canon-BJC-2100 -#gptofoo bjc-2000 printer/Canon-BJC-2110 #gptofoo bjc-3000 printer/Canon-BJC-3000 -#gptofoo bjc-4300 printer/Canon-BJC-4000 +#gptofoo bjc-4000 printer/Canon-BJC-4000 #gptofoo bjc-4300 printer/Canon-BJC-4300 #gptofoo bjc-4400 printer/Canon-BJC-4400 +#gptofoo bjc-50 printer/Canon-BJC-50 +#gptofoo bjc-55 printer/Canon-BJC-55 #gptofoo bjc-6000 printer/Canon-BJC-6000 #gptofoo bjc-6100 printer/Canon-BJC-6100 #gptofoo bjc-6200 printer/Canon-BJC-6200 #gptofoo bjc-6500 printer/Canon-BJC-6500 #gptofoo bjc-7000 printer/Canon-BJC-7000 #gptofoo bjc-7100 printer/Canon-BJC-7100 +#gptofoo bjc-80 printer/Canon-BJC-80 #gptofoo bjc-8200 printer/Canon-BJC-8200 +#gptofoo bjc-85 printer/Canon-BJC-85 #gptofoo canon-cp100 printer/Canon-CP-100 -#gptofoo canon-cp100 printer/Canon-CP-200 -#gptofoo canon-cp100 printer/Canon-CP-300 +#gptofoo canon-cp200 printer/Canon-CP-200 #gptofoo canon-cp220 printer/Canon-CP-220 -#gptofoo canon-cp220 printer/Canon-CP-330 -#gptofoo canon-cp220 printer/Canon-SELPHY-CP-400 -#gptofoo canon-cp220 printer/Canon-SELPHY-CP-500 -#gptofoo canon-cp220 printer/Canon-SELPHY-CP-510 -#gptofoo canon-cp220 printer/Canon-SELPHY-CP-600 -#gptofoo canon-cp220 printer/Canon-SELPHY-CP-710 -#gptofoo pcl-4 printer/Canon-GP_335 -#gptofoo pcl-3 printer/Canon-LBP-4sx -#gptofoo pcl-4l printer/Canon-LBP-430 -#gptofoo pcl-6 printer/Canon-LBP-1000 -#gptofoo pcl-6 printer/Canon-LBP-1260 -#gptofoo pcl-6 printer/Canon-LBP-1760 -#gptofoo bjc-4300 printer/Canon-S100 +#gptofoo canon-cp300 printer/Canon-CP-300 +#gptofoo canon-cp330 printer/Canon-CP-330 +#gptofoo canon-gp_335 printer/Canon-GP_335 +#gptofoo canon-lbp-1000 printer/Canon-LBP-1000 +#gptofoo canon-lbp-1260 printer/Canon-LBP-1260 +#gptofoo canon-lbp-1760 printer/Canon-LBP-1760 +#gptofoo canon-lbp-430 printer/Canon-LBP-430 +#gptofoo canon-lbp-4sx printer/Canon-LBP-4sx +#gptofoo bjc-s100 printer/Canon-S100 #gptofoo bjc-s200 printer/Canon-S200 -#gptofoo bjc-s800 printer/Canon-S300 +#gptofoo bjc-s300 printer/Canon-S300 #gptofoo bjc-s400 printer/Canon-S400 #gptofoo bjc-s450 printer/Canon-S450 -#gptofoo bjc-8200 printer/Canon-S500 -#gptofoo bjc-8200 printer/Canon-S600 -#gptofoo bjc-8200 printer/Canon-S630 -#gptofoo bjc-s800 printer/Canon-S800 #gptofoo bjc-s4500 printer/Canon-S4500 +#gptofoo bjc-s500 printer/Canon-S500 +#gptofoo bjc-s600 printer/Canon-S600 +#gptofoo bjc-s630 printer/Canon-S630 +#gptofoo bjc-s800 printer/Canon-S800 +#gptofoo canon-cp400 printer/Canon-SELPHY-CP-400 +#gptofoo canon-cp500 printer/Canon-SELPHY-CP-500 +#gptofoo canon-cp510 printer/Canon-SELPHY-CP-510 +#gptofoo canon-cp600 printer/Canon-SELPHY-CP-600 +#gptofoo canon-cp710 printer/Canon-SELPHY-CP-710 #gptofoo bjc-iP4000 printer/Canon-iP4000 -#gptofoo pcl-4 printer/Canon-imageRunner_330s -#gptofoo pcl-2 printer/Citizen-ProJet_II -#gptofoo pcl-3 printer/DEC-1800 -#gptofoo pcl-4 printer/DEC-LN17 -#gptofoo pcl-3 printer/Epson-ActionLaser_1100 -#gptofoo pcl-2 printer/Epson-ActionLaser_II -#gptofoo pcl-4 printer/Epson-AcuLaser_C2000 -#gptofoo pcl-4 printer/Epson-AcuLaser_C2000PS -#gptofoo pcl-4 printer/Epson-AcuLaser_C8500 -#gptofoo pcl-4 printer/Epson-AcuLaser_C8500PS -#gptofoo pcl-4 printer/Epson-AcuLaser_C8600 -#gptofoo pcl-4 printer/Epson-AcuLaser_C8600PS -#gptofoo pcl-3 printer/Epson-EPL-5200 -#gptofoo pcl-3 printer/Epson-EPL-5200plus -#gptofoo pcl-4 printer/Epson-EPL-5700 -#gptofoo pcl-4 printer/Epson-EPL-5700PS -#gptofoo pcl-4 printer/Epson-EPL-5800 -#gptofoo pcl-4 printer/Epson-EPL-5800PS -#gptofoo pcl-4 printer/Epson-EPL-5900 -#gptofoo pcl-4 printer/Epson-EPL-5900PS -#gptofoo pcl-4 printer/Epson-EPL-6100 -#gptofoo pcl-4 printer/Epson-EPL-6100PS -#gptofoo pcl-2 printer/Epson-EPL-7100 +#gptofoo canon-ir_330s printer/Canon-imageRunner_330s +#gptofoo citizen-projet_ii printer/Citizen-ProJet_II +#gptofoo dec-1800 printer/DEC-1800 +#gptofoo dec-ln17 printer/DEC-LN17 +#gptofoo epson-actl_1100 printer/Epson-ActionLaser_1100 +#gptofoo epson-actl_ii printer/Epson-ActionLaser_II +#gptofoo epson-acl_c2000 printer/Epson-AcuLaser_C2000 +#gptofoo epson-acl_c2000ps printer/Epson-AcuLaser_C2000PS +#gptofoo epson-acl_c8500 printer/Epson-AcuLaser_C8500 +#gptofoo epson-acl_c8500ps printer/Epson-AcuLaser_C8500PS +#gptofoo epson-acl_c8600 printer/Epson-AcuLaser_C8600 +#gptofoo epson-acl_c8600ps printer/Epson-AcuLaser_C8600PS +#gptofoo escp2-cl700 printer/Epson-CL_700 +#gptofoo escp2-cl750 printer/Epson-CL_750 +#gptofoo escp2-cl760 printer/Epson-CL_760 +#gptofoo escp2-em900c printer/Epson-EM_900C +#gptofoo escp2-em930c printer/Epson-EM_930C +#gptofoo epson-epl-5200 printer/Epson-EPL-5200 +#gptofoo epson-epl-5200plus printer/Epson-EPL-5200plus +#gptofoo epson-epl-5700 printer/Epson-EPL-5700 +#gptofoo epson-epl-5700ps printer/Epson-EPL-5700PS +#gptofoo epson-epl-5800 printer/Epson-EPL-5800 +#gptofoo epson-epl-5800ps printer/Epson-EPL-5800PS +#gptofoo epson-epl-5900 printer/Epson-EPL-5900 +#gptofoo epson-epl-5900ps printer/Epson-EPL-5900PS +#gptofoo epson-epl-6100 printer/Epson-EPL-6100 +#gptofoo epson-epl-6100ps printer/Epson-EPL-6100PS +#gptofoo epson-epl-7100 printer/Epson-EPL-7100 +#gptofoo escp2-e100 printer/Epson-E_100 +#gptofoo escp2-e150 printer/Epson-E_150 +#gptofoo escp2-e200 printer/Epson-E_200 +#gptofoo escp2-mc10000 printer/Epson-MC_10000 +#gptofoo escp2-mc2000 printer/Epson-MC_2000 +#gptofoo escp2-mc5000 printer/Epson-MC_5000 +#gptofoo escp2-mc7000 printer/Epson-MC_7000 +#gptofoo escp2-mc9000 printer/Epson-MC_9000 +#gptofoo escp2-mj5100c printer/Epson-MJ_5100C +#gptofoo escp2-mj6000c printer/Epson-MJ_6000C +#gptofoo escp2-mj8000c printer/Epson-MJ_8000C +#gptofoo escp2-mj930c printer/Epson-MJ_930C +#gptofoo escp2-pm10000 printer/Epson-PM_10000 +#gptofoo escp2-pm2000c printer/Epson-PM_2000C +#gptofoo escp2-pm2200c printer/Epson-PM_2200C +#gptofoo escp2-pm3000c printer/Epson-PM_3000C +#gptofoo escp2-pm3300c printer/Epson-PM_3300C +#gptofoo escp2-pm3500c printer/Epson-PM_3500C +#gptofoo escp2-pm3700c printer/Epson-PM_3700C +#gptofoo escp2-pm4000px printer/Epson-PM_4000PX +#gptofoo escp2-pm5000c printer/Epson-PM_5000C +#gptofoo escp2-pm7000c printer/Epson-PM_7000C +#gptofoo escp2-pm700c printer/Epson-PM_700C +#gptofoo escp2-pm730c printer/Epson-PM_730C +#gptofoo escp2-pm740c printer/Epson-PM_740C +#gptofoo escp2-pm750c printer/Epson-PM_750C +#gptofoo escp2-pm760c printer/Epson-PM_760C +#gptofoo escp2-pm770c printer/Epson-PM_770C +#gptofoo escp2-pm780c printer/Epson-PM_780C +#gptofoo escp2-pm790pt printer/Epson-PM_790PT +#gptofoo escp2-pm800c printer/Epson-PM_800C +#gptofoo escp2-pm850pt printer/Epson-PM_850PT +#gptofoo escp2-pm870c printer/Epson-PM_870C +#gptofoo escp2-pm880c printer/Epson-PM_880C +#gptofoo escp2-pm9000c printer/Epson-PM_9000C +#gptofoo escp2-pm930c printer/Epson-PM_930C +#gptofoo escp2-pm940c printer/Epson-PM_940C +#gptofoo escp2-pm950c printer/Epson-PM_950C +#gptofoo escp2-pm970c printer/Epson-PM_970C +#gptofoo escp2-pm980c printer/Epson-PM_980C +#gptofoo escp2-pma650 printer/Epson-PM_A650 +#gptofoo escp2-pma750 printer/Epson-PM_A750 +#gptofoo escp2-pma890 printer/Epson-PM_A890 +#gptofoo escp2-pma900 printer/Epson-PM_A900 +#gptofoo escp2-pma950 printer/Epson-PM_A950 +#gptofoo escp2-pmd1000 printer/Epson-PM_D1000 +#gptofoo escp2-pmd600 printer/Epson-PM_D600 +#gptofoo escp2-pmd750 printer/Epson-PM_D750 +#gptofoo escp2-pmd770 printer/Epson-PM_D770 +#gptofoo escp2-pmd800 printer/Epson-PM_D800 +#gptofoo escp2-pmg700 printer/Epson-PM_G700 +#gptofoo escp2-pmg720 printer/Epson-PM_G720 +#gptofoo escp2-pmg730 printer/Epson-PM_G730 +#gptofoo escp2-pmg800 printer/Epson-PM_G800 +#gptofoo escp2-pmg820 printer/Epson-PM_G820 +#gptofoo escp2-px5500 printer/Epson-PX_5500 +#gptofoo escp2-px7000 printer/Epson-PX_7000 +#gptofoo escp2-px9000 printer/Epson-PX_9000 +#gptofoo escp2-pxa650 printer/Epson-PX_A650 +#gptofoo escp2-pxg5000 printer/Epson-PX_G5000 +#gptofoo escp2-pxg900 printer/Epson-PX_G900 +#gptofoo escp2-pxg920 printer/Epson-PX_G920 +#gptofoo escp2-pxv500 printer/Epson-PX_V500 +#gptofoo escp2-pxv600 printer/Epson-PX_V600 +#gptofoo escp2-pxv630 printer/Epson-PX_V630 +#gptofoo escp2-picmate printer/Epson-PictureMate +#gptofoo escp2-picmated printer/Epson-PictureMate_Deluxe #gptofoo escp2-c20 printer/Epson-Stylus_C20 #gptofoo escp2-c20sx printer/Epson-Stylus_C20SX #gptofoo escp2-c20ux printer/Epson-Stylus_C20UX @@ -145,12 +217,41 @@ #gptofoo escp2-c85 printer/Epson-Stylus_C85 #gptofoo escp2-c86 printer/Epson-Stylus_C86 #gptofoo escp2-c88 printer/Epson-Stylus_C88 +#gptofoo escp2-cx1500 printer/Epson-Stylus_CX1500 +#gptofoo escp2-cx3100 printer/Epson-Stylus_CX3100 +#gptofoo escp2-cx3200 printer/Epson-Stylus_CX3200 +#gptofoo escp2-cx3500 printer/Epson-Stylus_CX3500 +#gptofoo escp2-cx3600 printer/Epson-Stylus_CX3600 +#gptofoo escp2-cx3650 printer/Epson-Stylus_CX3650 +#gptofoo escp2-cx3700 printer/Epson-Stylus_CX3700 +#gptofoo escp2-cx3800 printer/Epson-Stylus_CX3800 +#gptofoo escp2-cx3805 printer/Epson-Stylus_CX3805 +#gptofoo escp2-cx3810 printer/Epson-Stylus_CX3810 +#gptofoo escp2-cx4100 printer/Epson-Stylus_CX4100 +#gptofoo escp2-cx4200 printer/Epson-Stylus_CX4200 +#gptofoo escp2-cx4500 printer/Epson-Stylus_CX4500 +#gptofoo escp2-cx4600 printer/Epson-Stylus_CX4600 +#gptofoo escp2-cx4700 printer/Epson-Stylus_CX4700 +#gptofoo escp2-cx4800 printer/Epson-Stylus_CX4800 +#gptofoo escp2-cx5100 printer/Epson-Stylus_CX5100 +#gptofoo escp2-cx5200 printer/Epson-Stylus_CX5200 +#gptofoo escp2-cx5300 printer/Epson-Stylus_CX5300 +#gptofoo escp2-cx5400 printer/Epson-Stylus_CX5400 +#gptofoo escp2-cx5700 printer/Epson-Stylus_CX5700 +#gptofoo escp2-cx5800 printer/Epson-Stylus_CX5800 +#gptofoo escp2-cx6300 printer/Epson-Stylus_CX6300 +#gptofoo escp2-cx6400 printer/Epson-Stylus_CX6400 +#gptofoo escp2-cx6500 printer/Epson-Stylus_CX6500 +#gptofoo escp2-cx6600 printer/Epson-Stylus_CX6600 +#gptofoo escp2-cx7700 printer/Epson-Stylus_CX7700 +#gptofoo escp2-cx7800 printer/Epson-Stylus_CX7800 +#gptofoo escp2-cx8300 printer/Epson-Stylus_CX8300 +#gptofoo escp2-cx8400 printer/Epson-Stylus_CX8400 #gptofoo escp2 printer/Epson-Stylus_Color -#gptofoo escp2 printer/Epson-Stylus_Color_I -#gptofoo escp2 printer/Epson-Stylus_Color_II -#gptofoo escp2 printer/Epson-Stylus_Color_IIs -#gptofoo escp2-pro printer/Epson-Stylus_Color_PRO -#gptofoo escp2-pro-xl printer/Epson-Stylus_Pro_XL +#gptofoo escp2-1160 printer/Epson-Stylus_Color_1160 +#gptofoo escp2-1500 printer/Epson-Stylus_Color_1500 +#gptofoo escp2-1520 printer/Epson-Stylus_Color_1520 +#gptofoo escp2-3000 printer/Epson-Stylus_Color_3000 #gptofoo escp2-400 printer/Epson-Stylus_Color_400 #gptofoo escp2-440 printer/Epson-Stylus_Color_440 #gptofoo escp2-460 printer/Epson-Stylus_Color_460 @@ -165,18 +266,32 @@ #gptofoo escp2-740 printer/Epson-Stylus_Color_740 #gptofoo escp2-760 printer/Epson-Stylus_Color_760 #gptofoo escp2-777 printer/Epson-Stylus_Color_777 -#gptofoo escp2-83 printer/Epson-Stylus_Color_8_3 #gptofoo escp2-800 printer/Epson-Stylus_Color_800 #gptofoo escp2-850 printer/Epson-Stylus_Color_850 #gptofoo escp2-860 printer/Epson-Stylus_Color_860 #gptofoo escp2-880 printer/Epson-Stylus_Color_880 +#gptofoo escp2-83 printer/Epson-Stylus_Color_8_3 #gptofoo escp2-900 printer/Epson-Stylus_Color_900 #gptofoo escp2-980 printer/Epson-Stylus_Color_980 -#gptofoo escp2-1160 printer/Epson-Stylus_Color_1160 -#gptofoo escp2-1500 printer/Epson-Stylus_Color_1500 -#gptofoo escp2-1520 printer/Epson-Stylus_Color_1520 -#gptofoo escp2-3000 printer/Epson-Stylus_Color_3000 +#gptofoo escp2-i printer/Epson-Stylus_Color_I +#gptofoo escp2-ii printer/Epson-Stylus_Color_II +#gptofoo escp2-iis printer/Epson-Stylus_Color_IIs +#gptofoo escp2-pro printer/Epson-Stylus_Color_PRO +#gptofoo escp2-d68 printer/Epson-Stylus_D68 +#gptofoo escp2-d88 printer/Epson-Stylus_D88 +#gptofoo escp2-dx3800 printer/Epson-Stylus_DX3800 +#gptofoo escp2-dx3850 printer/Epson-Stylus_DX3850 +#gptofoo escp2-dx4200 printer/Epson-Stylus_DX4200 +#gptofoo escp2-dx4250 printer/Epson-Stylus_DX4250 +#gptofoo escp2-dx4800 printer/Epson-Stylus_DX4800 #gptofoo escp2-photo printer/Epson-Stylus_Photo +#gptofoo escp2-1200 printer/Epson-Stylus_Photo_1200 +#gptofoo escp2-1270 printer/Epson-Stylus_Photo_1270 +#gptofoo escp2-1280 printer/Epson-Stylus_Photo_1280 +#gptofoo escp2-1290 printer/Epson-Stylus_Photo_1290 +#gptofoo escp2-2000 printer/Epson-Stylus_Photo_2000P +#gptofoo escp2-2100 printer/Epson-Stylus_Photo_2100 +#gptofoo escp2-2200 printer/Epson-Stylus_Photo_2200 #gptofoo escp2-700 printer/Epson-Stylus_Photo_700 #gptofoo escp2-720 printer/Epson-Stylus_Photo_720 #gptofoo escp2-750 printer/Epson-Stylus_Photo_750 @@ -187,6 +302,7 @@ #gptofoo escp2-820 printer/Epson-Stylus_Photo_820 #gptofoo escp2-825 printer/Epson-Stylus_Photo_825 #gptofoo escp2-830 printer/Epson-Stylus_Photo_830 +#gptofoo escp2-830u printer/Epson-Stylus_Photo_830U #gptofoo escp2-870 printer/Epson-Stylus_Photo_870 #gptofoo escp2-875 printer/Epson-Stylus_Photo_875 #gptofoo escp2-890 printer/Epson-Stylus_Photo_890 @@ -197,22 +313,18 @@ #gptofoo escp2-935 printer/Epson-Stylus_Photo_935 #gptofoo escp2-950 printer/Epson-Stylus_Photo_950 #gptofoo escp2-960 printer/Epson-Stylus_Photo_960 -#gptofoo escp2-1200 printer/Epson-Stylus_Photo_1200 -#gptofoo escp2-1270 printer/Epson-Stylus_Photo_1270 -#gptofoo escp2-1280 printer/Epson-Stylus_Photo_1280 -#gptofoo escp2-1290 printer/Epson-Stylus_Photo_1290 -#gptofoo escp2-2000 printer/Epson-Stylus_Photo_2000P -#gptofoo escp2-2100 printer/Epson-Stylus_Photo_2100 -#gptofoo escp2-2200 printer/Epson-Stylus_Photo_2200 #gptofoo escp2-ex printer/Epson-Stylus_Photo_EX #gptofoo escp2-ex3 printer/Epson-Stylus_Photo_EX3 +#gptofoo escp2-r1800 printer/Epson-Stylus_Photo_R1800 #gptofoo escp2-r200 printer/Epson-Stylus_Photo_R200 #gptofoo escp2-r210 printer/Epson-Stylus_Photo_R210 #gptofoo escp2-r220 printer/Epson-Stylus_Photo_R220 +#gptofoo escp2-r2400 printer/Epson-Stylus_Photo_R2400 #gptofoo escp2-r300 printer/Epson-Stylus_Photo_R300 #gptofoo escp2-r310 printer/Epson-Stylus_Photo_R310 #gptofoo escp2-r320 printer/Epson-Stylus_Photo_R320 #gptofoo escp2-r340 printer/Epson-Stylus_Photo_R340 +#gptofoo escp2-r800 printer/Epson-Stylus_Photo_R800 #gptofoo escp2-rx400 printer/Epson-Stylus_Photo_RX400 #gptofoo escp2-rx420 printer/Epson-Stylus_Photo_RX420 #gptofoo escp2-rx425 printer/Epson-Stylus_Photo_RX425 @@ -223,9 +335,7 @@ #gptofoo escp2-rx620 printer/Epson-Stylus_Photo_RX620 #gptofoo escp2-rx630 printer/Epson-Stylus_Photo_RX630 #gptofoo escp2-rx700 printer/Epson-Stylus_Photo_RX700 -#gptofoo escp2-r800 printer/Epson-Stylus_Photo_R800 -#gptofoo escp2-r1800 printer/Epson-Stylus_Photo_R1800 -#gptofoo escp2-r2400 printer/Epson-Stylus_Photo_R2400 +#gptofoo escp2-10000 printer/Epson-Stylus_Pro_10000 #gptofoo escp2-5000 printer/Epson-Stylus_Pro_5000 #gptofoo escp2-5500 printer/Epson-Stylus_Pro_5500 #gptofoo escp2-7000 printer/Epson-Stylus_Pro_7000 @@ -234,500 +344,402 @@ #gptofoo escp2-9000 printer/Epson-Stylus_Pro_9000 #gptofoo escp2-9500 printer/Epson-Stylus_Pro_9500 #gptofoo escp2-9600 printer/Epson-Stylus_Pro_9600 -#gptofoo escp2-10000 printer/Epson-Stylus_Pro_10000 +#gptofoo escp2-pro-xl printer/Epson-Stylus_Pro_XL #gptofoo escp2-scan2000 printer/Epson-Stylus_Scan_2000 #gptofoo escp2-scan2500 printer/Epson-Stylus_Scan_2500 -#gptofoo escp2-cx1500 printer/Epson-Stylus_CX1500 -#gptofoo escp2-cx3100 printer/Epson-Stylus_CX3100 -#gptofoo escp2-cx3200 printer/Epson-Stylus_CX3200 -#gptofoo escp2-cx3500 printer/Epson-Stylus_CX3500 -#gptofoo escp2-cx3600 printer/Epson-Stylus_CX3600 -#gptofoo escp2-cx3650 printer/Epson-Stylus_CX3650 -#gptofoo escp2-cx3700 printer/Epson-Stylus_CX3700 -#gptofoo escp2-cx3800 printer/Epson-Stylus_CX3800 -#gptofoo escp2-cx3805 printer/Epson-Stylus_CX3805 -#gptofoo escp2-cx3810 printer/Epson-Stylus_CX3810 -#gptofoo escp2-cx4100 printer/Epson-Stylus_CX4100 -#gptofoo escp2-cx4200 printer/Epson-Stylus_CX4200 -#gptofoo escp2-cx4500 printer/Epson-Stylus_CX4500 -#gptofoo escp2-cx4600 printer/Epson-Stylus_CX4600 -#gptofoo escp2-cx4700 printer/Epson-Stylus_CX4700 -#gptofoo escp2-cx4800 printer/Epson-Stylus_CX4800 -#gptofoo escp2-cx5100 printer/Epson-Stylus_CX5100 -#gptofoo escp2-cx5200 printer/Epson-Stylus_CX5200 -#gptofoo escp2-cx5300 printer/Epson-Stylus_CX5300 -#gptofoo escp2-cx5400 printer/Epson-Stylus_CX5400 -#gptofoo escp2-cx5700 printer/Epson-Stylus_CX5700 -#gptofoo escp2-cx5800 printer/Epson-Stylus_CX5800 -#gptofoo escp2-cx6300 printer/Epson-Stylus_CX6300 -#gptofoo escp2-cx6400 printer/Epson-Stylus_CX6400 -#gptofoo escp2-cx6500 printer/Epson-Stylus_CX6500 -#gptofoo escp2-cx6600 printer/Epson-Stylus_CX6600 -#gptofoo escp2-cx7700 printer/Epson-Stylus_CX7700 -#gptofoo escp2-cx7800 printer/Epson-Stylus_CX7800 -#gptofoo escp2-cx8300 printer/Epson-Stylus_CX8300 -#gptofoo escp2-cx8400 printer/Epson-Stylus_CX8400 -#gptofoo escp2-d68 printer/Epson-Stylus_D68 -#gptofoo escp2-d88 printer/Epson-Stylus_D88 -#gptofoo escp2-dx3800 printer/Epson-Stylus_DX3800 -#gptofoo escp2-dx3850 printer/Epson-Stylus_DX3850 -#gptofoo escp2-dx4200 printer/Epson-Stylus_DX4200 -#gptofoo escp2-dx4250 printer/Epson-Stylus_DX4250 -#gptofoo escp2-dx4800 printer/Epson-Stylus_DX4800 -#gptofoo escp2-picmate printer/Epson-PictureMate -#gptofoo escp2-picmated printer/Epson-PictureMate_Deluxe -#gptofoo escp2-cl700 printer/Epson-CL_700 -#gptofoo escp2-cl750 printer/Epson-CL_750 -#gptofoo escp2-cl760 printer/Epson-CL_760 -#gptofoo escp2-e100 printer/Epson-E_100 -#gptofoo escp2-em900c printer/Epson-EM_900C -#gptofoo escp2-em930c printer/Epson-EM_930C -#gptofoo escp2-mc2000 printer/Epson-MC_2000 -#gptofoo escp2-mc5000 printer/Epson-MC_5000 -#gptofoo escp2-mc7000 printer/Epson-MC_7000 -#gptofoo escp2-mc9000 printer/Epson-MC_9000 -#gptofoo escp2-mc10000 printer/Epson-MC_10000 -#gptofoo escp2-mj930c printer/Epson-MJ_930C -#gptofoo escp2-mj5100c printer/Epson-MJ_5100C -#gptofoo escp2-mj6000c printer/Epson-MJ_6000C -#gptofoo escp2-mj8000c printer/Epson-MJ_8000C -#gptofoo escp2-pm700c printer/Epson-PM_700C -#gptofoo escp2-pm730c printer/Epson-PM_730C -#gptofoo escp2-pm740c printer/Epson-PM_740C -#gptofoo escp2-pm750c printer/Epson-PM_750C -#gptofoo escp2-pm760c printer/Epson-PM_760C -#gptofoo escp2-pm770c printer/Epson-PM_770C -#gptofoo escp2-pm780c printer/Epson-PM_780C -#gptofoo escp2-pm790pt printer/Epson-PM_790PT -#gptofoo escp2-pm800c printer/Epson-PM_800C -#gptofoo escp2-pm850pt printer/Epson-PM_850PT -#gptofoo escp2-pm870c printer/Epson-PM_870C -#gptofoo escp2-pm880c printer/Epson-PM_880C -#gptofoo escp2-pm930c printer/Epson-PM_930C -#gptofoo escp2-pm940c printer/Epson-PM_940C -#gptofoo escp2-pm950c printer/Epson-PM_950C -#gptofoo escp2-pm970c printer/Epson-PM_970C -#gptofoo escp2-pm980c printer/Epson-PM_980C -#gptofoo escp2-pm2000c printer/Epson-PM_2000C -#gptofoo escp2-pm2200c printer/Epson-PM_2200C -#gptofoo escp2-pm3000c printer/Epson-PM_3000C -#gptofoo escp2-pm3300c printer/Epson-PM_3300C -#gptofoo escp2-pm3500c printer/Epson-PM_3500C -#gptofoo escp2-pm3700c printer/Epson-PM_3700C -#gptofoo escp2-pm4000px printer/Epson-PM_4000PX -#gptofoo escp2-pm5000c printer/Epson-PM_5000C -#gptofoo escp2-pm7000c printer/Epson-PM_7000C -#gptofoo escp2-pm9000c printer/Epson-PM_9000C -#gptofoo escp2-pm10000 printer/Epson-PM_10000 -#gptofoo escp2-pma900 printer/Epson-PM_A900 -#gptofoo escp2-pmd750 printer/Epson-PM_D750 -#gptofoo escp2-pmd770 printer/Epson-PM_D770 -#gptofoo escp2-pmd1000 printer/Epson-PM_D1000 -#gptofoo escp2-pmg700 printer/Epson-PM_G700 -#gptofoo escp2-pmg720 printer/Epson-PM_G720 -#gptofoo escp2-pmg800 printer/Epson-PM_G800 -#gptofoo escp2-pmg820 printer/Epson-PM_G820 -#gptofoo escp2-pxa650 printer/Epson-PX_A650 -#gptofoo escp2-pxg900 printer/Epson-PX_G900 -#gptofoo escp2-pxg920 printer/Epson-PX_G920 -#gptofoo escp2-pxg5000 printer/Epson-PX_G5000 -#gptofoo escp2-pxv500 printer/Epson-PX_V500 -#gptofoo escp2-pxv600 printer/Epson-PX_V600 -#gptofoo escp2-px5500 printer/Epson-PX_5500 -#gptofoo escp2-px7000 printer/Epson-PX_7000 -#gptofoo escp2-px9000 printer/Epson-PX_9000 #gptofoo fujifilm-cx400 printer/Fujifilm-Printpix-CX-400 #gptofoo fujifilm-cx550 printer/Fujifilm-Printpix-CX-550 -#gptofoo pcl-4 printer/Fujitsu-PrintPartner_10V -#gptofoo pcl-4 printer/Fujitsu-PrintPartner_16DV -#gptofoo pcl-6 printer/Fujitsu-PrintPartner_20W -#gptofoo pcl-3 printer/Fujitsu-PrintPartner_8000 +#gptofoo fujitsu-pp_10v printer/Fujitsu-PrintPartner_10V +#gptofoo fujitsu-pp_16dv printer/Fujitsu-PrintPartner_16DV +#gptofoo fujitsu-pp_20w printer/Fujitsu-PrintPartner_20W +#gptofoo fujitsu-pp_8000 printer/Fujitsu-PrintPartner_8000 +#gptofoo pcl-g_4 printer/Generic-PCL_4_Printer +#gptofoo pcl-g_5 printer/Generic-PCL_5_Printer +#gptofoo pcl-g_5c printer/Generic-PCL_5c_Printer +#gptofoo pcl-g_5e printer/Generic-PCL_5e_Printer +#gptofoo pcl-g_6 printer/Generic-PCL_6_PCL_XL_Printer #gptofoo pcl-2000 printer/HP-2000C #gptofoo pcl-2500 printer/HP-2500C -#gptofoo pcl-2500 printer/HP-2500CM -#gptofoo pcl-900 printer/HP-Business_Inkjet_2200 -#gptofoo pcl-900 printer/HP-Business_Inkjet_2230 -#gptofoo pcl-900 printer/HP-Business_Inkjet_2250 -#gptofoo pcl-900 printer/HP-Business_Inkjet_2250TN -#gptofoo pcl-900 printer/HP-Business_Inkjet_2280 -#gptofoo pcl-900 printer/HP-Color_Inkjet_Printer_CP1160 -#gptofoo pcl-1220 printer/HP-Color_Inkjet_Printer_CP1700 -#gptofoo pcl-3 printer/HP-Color_LaserJet_5 -#gptofoo pcl-4 printer/HP-Color_LaserJet_2500 -#gptofoo pcl-4 printer/HP-Color_LaserJet_4500 -#gptofoo pcl-4 printer/HP-Color_LaserJet_4550 -#gptofoo pcl-4 printer/HP-Color_LaserJet_4600 -#gptofoo pcl-4 printer/HP-Color_LaserJet_5000 -#gptofoo pcl-4 printer/HP-Color_LaserJet_5500 -#gptofoo pcl-4 printer/HP-Color_LaserJet_8550GN +#gptofoo hp-2500cm printer/HP-2500CM +#gptofoo hp-bij_2200 printer/HP-Business_Inkjet_2200 +#gptofoo hp-bij_2230 printer/HP-Business_Inkjet_2230 +#gptofoo hp-bij_2250 printer/HP-Business_Inkjet_2250 +#gptofoo hp-bij_2250tn printer/HP-Business_Inkjet_2250TN +#gptofoo hp-bij_2280 printer/HP-Business_Inkjet_2280 +#gptofoo hp-cij_cp1160 printer/HP-Color_Inkjet_Printer_CP1160 +#gptofoo hp-cij_cp1700 printer/HP-Color_Inkjet_Printer_CP1700 +#gptofoo hp-clj_2500 printer/HP-Color_LaserJet_2500 +#gptofoo hp-clj_4500 printer/HP-Color_LaserJet_4500 +#gptofoo hp-clj_4550 printer/HP-Color_LaserJet_4550 +#gptofoo hp-clj_4600 printer/HP-Color_LaserJet_4600 +#gptofoo hp-clj_5 printer/HP-Color_LaserJet_5 +#gptofoo hp-clj_5000 printer/HP-Color_LaserJet_5000 +#gptofoo hp-clj_5500 printer/HP-Color_LaserJet_5500 +#gptofoo hp-clj_8550gn printer/HP-Color_LaserJet_8550GN #gptofoo pcl-desnj-230 printer/HP-DesignJet_230 +#gptofoo pcl-desnj-2500 printer/HP-DesignJet_2500CP #gptofoo pcl-desnj-250 printer/HP-DesignJet_250C +#gptofoo pcl-desnj-3500 printer/HP-DesignJet_3500CP #gptofoo pcl-desnj-430 printer/HP-DesignJet_430 #gptofoo pcl-desnj-450 printer/HP-DesignJet_450C #gptofoo pcl-desnj-455 printer/HP-DesignJet_455CA #gptofoo pcl-desnj-488 printer/HP-DesignJet_488CA #gptofoo pcl-desnj-700 printer/HP-DesignJet_700 #gptofoo pcl-750 printer/HP-DesignJet_750 -#gptofoo pcl-750 printer/HP-DesignJet_750C_Plus -#gptofoo pcl-desnj-2500 printer/HP-DesignJet_2500CP -#gptofoo pcl-desnj-3500 printer/HP-DesignJet_3500CP -#gptofoo pcl-2500 printer/HP-DesignJet_ColorPro_CAD +#gptofoo hp-desnj_750c_plus printer/HP-DesignJet_750C_Plus +#gptofoo hp-desnj_cp_cad printer/HP-DesignJet_ColorPro_CAD +#gptofoo pcl-1100 printer/HP-DeskJet_1100C +#gptofoo pcl-1120 printer/HP-DeskJet_1120C +#gptofoo hp-dj_1125c printer/HP-DeskJet_1125C +#gptofoo pcl-1200 printer/HP-DeskJet_1200C +#gptofoo pcl-1220 printer/HP-DeskJet_1220C +#gptofoo pcl-1600 printer/HP-DeskJet_1600C +#gptofoo hp-dj_1600cm printer/HP-DeskJet_1600CM #gptofoo pcl-340 printer/HP-DeskJet_340C +#gptofoo hp-dj_3810 printer/HP-DeskJet_3810 +#gptofoo hp-dj_3816 printer/HP-DeskJet_3816 +#gptofoo hp-dj_3820 printer/HP-DeskJet_3820 +#gptofoo hp-dj_3822 printer/HP-DeskJet_3822 #gptofoo pcl-400 printer/HP-DeskJet_400 -#gptofoo pcl-540 printer/HP-DeskJet_400C -#gptofoo pcl-540 printer/HP-DeskJet_420C -#gptofoo pcl-900 printer/HP-DeskJet_450 +#gptofoo hp-dj_420c printer/HP-DeskJet_420C +#gptofoo hp-dj_450 printer/HP-DeskJet_450 #gptofoo pcl-500 printer/HP-DeskJet_500 #gptofoo pcl-501 printer/HP-DeskJet_500C -#gptofoo pcl-500 printer/HP-DeskJet_505J_Plus -#gptofoo pcl-500 printer/HP-DeskJet_510 +#gptofoo hp-dj_505j_plus printer/HP-DeskJet_505J_Plus +#gptofoo hp-dj_510 printer/HP-DeskJet_510 #gptofoo pcl-520 printer/HP-DeskJet_520 #gptofoo pcl-540 printer/HP-DeskJet_540C #gptofoo pcl-550 printer/HP-DeskJet_550C +#gptofoo hp-dj_5550 printer/HP-DeskJet_5550 +#gptofoo hp-dj_5551 printer/HP-DeskJet_5551 #gptofoo pcl-560 printer/HP-DeskJet_560C #gptofoo pcl-600 printer/HP-DeskJet_600 -#gptofoo pcl-690 printer/HP-DeskJet_610C -#gptofoo pcl-690 printer/HP-DeskJet_610CL -#gptofoo pcl-690 printer/HP-DeskJet_612C -#gptofoo pcl-690 printer/HP-DeskJet_640C -#gptofoo pcl-690 printer/HP-DeskJet_648C -#gptofoo pcl-601 printer/HP-DeskJet_660C -#gptofoo pcl-601 printer/HP-DeskJet_670C -#gptofoo pcl-601 printer/HP-DeskJet_670TV -#gptofoo pcl-601 printer/HP-DeskJet_672C -#gptofoo pcl-601 printer/HP-DeskJet_680C -#gptofoo pcl-601 printer/HP-DeskJet_682C +#gptofoo pcl-601 printer/HP-DeskJet_600C +#gptofoo hp-dj_610c printer/HP-DeskJet_610C +#gptofoo hp-dj_610cl printer/HP-DeskJet_610CL +#gptofoo hp-dj_6122 printer/HP-DeskJet_6122 +#gptofoo hp-dj_6127 printer/HP-DeskJet_6127 +#gptofoo hp-dj_612c printer/HP-DeskJet_612C +#gptofoo hp-dj_640c printer/HP-DeskJet_640C +#gptofoo hp-dj_648c printer/HP-DeskJet_648C +#gptofoo hp-dj_660c printer/HP-DeskJet_660C +#gptofoo hp-dj_670c printer/HP-DeskJet_670C +#gptofoo hp-dj_670tv printer/HP-DeskJet_670TV +#gptofoo hp-dj_672c printer/HP-DeskJet_672C +#gptofoo hp-dj_680c printer/HP-DeskJet_680C +#gptofoo hp-dj_682c printer/HP-DeskJet_682C #gptofoo pcl-690 printer/HP-DeskJet_690C -#gptofoo pcl-690 printer/HP-DeskJet_692C -#gptofoo pcl-690 printer/HP-DeskJet_693C -#gptofoo pcl-690 printer/HP-DeskJet_694C -#gptofoo pcl-690 printer/HP-DeskJet_695C -#gptofoo pcl-690 printer/HP-DeskJet_697C +#gptofoo hp-dj_692c printer/HP-DeskJet_692C +#gptofoo hp-dj_693c printer/HP-DeskJet_693C +#gptofoo hp-dj_694c printer/HP-DeskJet_694C +#gptofoo hp-dj_695c printer/HP-DeskJet_695C +#gptofoo hp-dj_697c printer/HP-DeskJet_697C #gptofoo pcl-810 printer/HP-DeskJet_810C #gptofoo pcl-812 printer/HP-DeskJet_812C -#gptofoo pcl-812 printer/HP-DeskJet_815C -#gptofoo pcl-810 printer/HP-DeskJet_816C -#gptofoo pcl-845 printer/HP-DeskJet_825C -#gptofoo pcl-810 printer/HP-DeskJet_830C -#gptofoo pcl-810 printer/HP-DeskJet_832C +#gptofoo hp-dj_815c printer/HP-DeskJet_815C +#gptofoo hp-dj_816c printer/HP-DeskJet_816C +#gptofoo hp-dj_825c printer/HP-DeskJet_825C +#gptofoo hp-dj_830c printer/HP-DeskJet_830C +#gptofoo hp-dj_832c printer/HP-DeskJet_832C #gptofoo pcl-840 printer/HP-DeskJet_840C -#gptofoo pcl-840 printer/HP-DeskJet_841C +#gptofoo hp-dj_841c printer/HP-DeskJet_841C #gptofoo pcl-842 printer/HP-DeskJet_842C -#gptofoo pcl-842 printer/HP-DeskJet_843C +#gptofoo hp-dj_843c printer/HP-DeskJet_843C #gptofoo pcl-845 printer/HP-DeskJet_845C #gptofoo pcl-850 printer/HP-DeskJet_850C #gptofoo pcl-855 printer/HP-DeskJet_855C #gptofoo pcl-870 printer/HP-DeskJet_870C -#gptofoo pcl-810 printer/HP-DeskJet_880C -#gptofoo pcl-810 printer/HP-DeskJet_882C +#gptofoo hp-dj_880c printer/HP-DeskJet_880C +#gptofoo hp-dj_882c printer/HP-DeskJet_882C #gptofoo pcl-890 printer/HP-DeskJet_890C #gptofoo pcl-895 printer/HP-DeskJet_895C #gptofoo pcl-900 printer/HP-DeskJet_916C -#gptofoo pcl-900 printer/HP-DeskJet_920C -#gptofoo pcl-900 printer/HP-DeskJet_930C -#gptofoo pcl-900 printer/HP-DeskJet_932C -#gptofoo pcl-900 printer/HP-DeskJet_933C -#gptofoo pcl-900 printer/HP-DeskJet_934C -#gptofoo pcl-900 printer/HP-DeskJet_935C -#gptofoo pcl-900 printer/HP-DeskJet_940C -#gptofoo pcl-900 printer/HP-DeskJet_948C -#gptofoo pcl-900 printer/HP-DeskJet_950C -#gptofoo pcl-900 printer/HP-DeskJet_952C -#gptofoo pcl-900 printer/HP-DeskJet_955C -#gptofoo pcl-900 printer/HP-DeskJet_957C -#gptofoo pcl-900 printer/HP-DeskJet_959C -#gptofoo pcl-900 printer/HP-DeskJet_960C -#gptofoo pcl-900 printer/HP-DeskJet_970C -#gptofoo pcl-900 printer/HP-DeskJet_975C -#gptofoo pcl-900 printer/HP-DeskJet_980C -#gptofoo pcl-900 printer/HP-DeskJet_990C -#gptofoo pcl-900 printer/HP-DeskJet_995C -#gptofoo pcl-1100 printer/HP-DeskJet_1100C -#gptofoo pcl-1120 printer/HP-DeskJet_1120C -#gptofoo pcl-1120 printer/HP-DeskJet_1125C -#gptofoo pcl-1200 printer/HP-DeskJet_1200C -#gptofoo pcl-1220 printer/HP-DeskJet_1220C -#gptofoo pcl-1600 printer/HP-DeskJet_1600C -#gptofoo pcl-1600 printer/HP-DeskJet_1600CM -#gptofoo pcl-900 printer/HP-DeskJet_3810 -#gptofoo pcl-900 printer/HP-DeskJet_3816 -#gptofoo pcl-900 printer/HP-DeskJet_3820 -#gptofoo pcl-900 printer/HP-DeskJet_3822 -#gptofoo pcl-900 printer/HP-DeskJet_5550 -#gptofoo pcl-900 printer/HP-DeskJet_5551 -#gptofoo pcl-900 printer/HP-DeskJet_6122 -#gptofoo pcl-900 printer/HP-DeskJet_6127 -#gptofoo pcl-900 printer/HP-DeskJet_9300 -#gptofoo pcl-601 printer/HP-e-printer_e20 +#gptofoo hp-dj_920c printer/HP-DeskJet_920C +#gptofoo hp-dj_9300 printer/HP-DeskJet_9300 +#gptofoo hp-dj_930c printer/HP-DeskJet_930C +#gptofoo hp-dj_932c printer/HP-DeskJet_932C +#gptofoo hp-dj_933c printer/HP-DeskJet_933C +#gptofoo hp-dj_934c printer/HP-DeskJet_934C +#gptofoo hp-dj_935c printer/HP-DeskJet_935C +#gptofoo hp-dj_940c printer/HP-DeskJet_940C +#gptofoo hp-dj_948c printer/HP-DeskJet_948C +#gptofoo hp-dj_950c printer/HP-DeskJet_950C +#gptofoo hp-dj_952c printer/HP-DeskJet_952C +#gptofoo hp-dj_955c printer/HP-DeskJet_955C +#gptofoo hp-dj_957c printer/HP-DeskJet_957C +#gptofoo hp-dj_959c printer/HP-DeskJet_959C +#gptofoo hp-dj_960c printer/HP-DeskJet_960C +#gptofoo hp-dj_970c printer/HP-DeskJet_970C +#gptofoo hp-dj_975c printer/HP-DeskJet_975C +#gptofoo hp-dj_980c printer/HP-DeskJet_980C +#gptofoo hp-dj_990c printer/HP-DeskJet_990C +#gptofoo hp-dj_995c printer/HP-DeskJet_995C +#gptofoo hp-lj_1010 printer/HP-LaserJet_1010 +#gptofoo hp-lj_1012 printer/HP-LaserJet_1012 +#gptofoo hp-lj_1015 printer/HP-LaserJet_1015 +#gptofoo hp-lj_1100 printer/HP-LaserJet_1100 +#gptofoo hp-lj_1100a printer/HP-LaserJet_1100A +#gptofoo hp-lj_1150 printer/HP-LaserJet_1150 +#gptofoo hp-lj_1200 printer/HP-LaserJet_1200 +#gptofoo hp-lj_1220 printer/HP-LaserJet_1220 +#gptofoo hp-lj_1300 printer/HP-LaserJet_1300 #gptofoo pcl-2 printer/HP-LaserJet_2 -#gptofoo pcl-2 printer/HP-LaserJet_2D +#gptofoo hp-lj_2100 printer/HP-LaserJet_2100 +#gptofoo hp-lj_2100m printer/HP-LaserJet_2100M +#gptofoo hp-lj_2200 printer/HP-LaserJet_2200 +#gptofoo hp-lj_2300 printer/HP-LaserJet_2300 +#gptofoo hp-lj_2d printer/HP-LaserJet_2D #gptofoo pcl-2p printer/HP-LaserJet_2P -#gptofoo pcl-2p printer/HP-LaserJet_2P_Plus +#gptofoo hp-lj_2p_plus printer/HP-LaserJet_2P_Plus #gptofoo pcl-3 printer/HP-LaserJet_3 -#gptofoo pcl-3 printer/HP-LaserJet_3D -#gptofoo pcl-4l printer/HP-LaserJet_3P_w_PCL5 -#gptofoo pcl-3 printer/HP-LaserJet_3P_w_PS +#gptofoo hp-lj_3200 printer/HP-LaserJet_3200 +#gptofoo hp-lj_3200m printer/HP-LaserJet_3200m +#gptofoo hp-lj_3200se printer/HP-LaserJet_3200se +#gptofoo hp-lj_3300_mfp printer/HP-LaserJet_3300_MFP +#gptofoo hp-lj_3310_mfp printer/HP-LaserJet_3310_MFP +#gptofoo hp-lj_3320n_mfp printer/HP-LaserJet_3320N_MFP +#gptofoo hp-lj_3320_mfp printer/HP-LaserJet_3320_MFP +#gptofoo hp-lj_3330_mfp printer/HP-LaserJet_3330_MFP +#gptofoo hp-lj_3d printer/HP-LaserJet_3D +#gptofoo hp-lj_3p_w_pcl5 printer/HP-LaserJet_3P_w_PCL5 +#gptofoo hp-lj_3p_w_ps printer/HP-LaserJet_3P_w_PS #gptofoo pcl-4 printer/HP-LaserJet_4 -#gptofoo pcl-4 printer/HP-LaserJet_4_Plus +#gptofoo hp-lj_4000 printer/HP-LaserJet_4000 +#gptofoo hp-lj_4050 printer/HP-LaserJet_4050 +#gptofoo hp-lj_4100 printer/HP-LaserJet_4100 +#gptofoo hp-lj_4200 printer/HP-LaserJet_4200 +#gptofoo hp-lj_4300 printer/HP-LaserJet_4300 #gptofoo pcl-4l printer/HP-LaserJet_4L -#gptofoo pcl-4 printer/HP-LaserJet_4M -#gptofoo pcl-4 printer/HP-LaserJet_4ML -#gptofoo pcl-4 printer/HP-LaserJet_4P +#gptofoo hp-lj_4m printer/HP-LaserJet_4M +#gptofoo hp-lj_4ml printer/HP-LaserJet_4ML +#gptofoo hp-lj_4p printer/HP-LaserJet_4P #gptofoo pcl-4si printer/HP-LaserJet_4Si #gptofoo pcl-4v printer/HP-LaserJet_4V +#gptofoo hp-lj_4_plus printer/HP-LaserJet_4_Plus #gptofoo pcl-5 printer/HP-LaserJet_5 -#gptofoo pcl-4 printer/HP-LaserJet_5L -#gptofoo pcl-4 printer/HP-LaserJet_5M -#gptofoo pcl-4 printer/HP-LaserJet_5MP -#gptofoo pcl-5 printer/HP-LaserJet_5P +#gptofoo hp-lj_5000 printer/HP-LaserJet_5000 +#gptofoo hp-lj_5100 printer/HP-LaserJet_5100 +#gptofoo hp-lj_5l printer/HP-LaserJet_5L +#gptofoo hp-lj_5m printer/HP-LaserJet_5M +#gptofoo hp-lj_5mp printer/HP-LaserJet_5MP +#gptofoo hp-lj_5p printer/HP-LaserJet_5P #gptofoo pcl-5si printer/HP-LaserJet_5Si #gptofoo pcl-6 printer/HP-LaserJet_6 -#gptofoo pcl-4 printer/HP-LaserJet_6L -#gptofoo pcl-4 printer/HP-LaserJet_6MP -#gptofoo pcl-4 printer/HP-LaserJet_6P -#gptofoo pcl-5 printer/HP-LaserJet_1010 -#gptofoo pcl-5 printer/HP-LaserJet_1012 -#gptofoo pcl-5 printer/HP-LaserJet_1015 -#gptofoo pcl-6 printer/HP-LaserJet_1100 -#gptofoo pcl-6 printer/HP-LaserJet_1100A -#gptofoo pcl-6 printer/HP-LaserJet_1150 -#gptofoo pcl-6 printer/HP-LaserJet_1200 -#gptofoo pcl-6 printer/HP-LaserJet_1220 -#gptofoo pcl-6 printer/HP-LaserJet_1300 -#gptofoo pcl-6 printer/HP-LaserJet_2100 -#gptofoo pcl-6 printer/HP-LaserJet_2100M -#gptofoo pcl-6 printer/HP-LaserJet_2200 -#gptofoo pcl-6 printer/HP-LaserJet_2300 -#gptofoo pcl-6 printer/HP-LaserJet_3200 -#gptofoo pcl-6 printer/HP-LaserJet_3200m -#gptofoo pcl-6 printer/HP-LaserJet_3200se -#gptofoo pcl-6 printer/HP-LaserJet_3300 -#gptofoo pcl-6 printer/HP-LaserJet_3310 -#gptofoo pcl-6 printer/HP-LaserJet_3320 -#gptofoo pcl-6 printer/HP-LaserJet_3320N -#gptofoo pcl-6 printer/HP-LaserJet_3330 -#gptofoo pcl-6 printer/HP-LaserJet_4000 -#gptofoo pcl-6 printer/HP-LaserJet_4050 -#gptofoo pcl-6 printer/HP-LaserJet_4100 -#gptofoo pcl-6 printer/HP-LaserJet_4200 -#gptofoo pcl-6 printer/HP-LaserJet_4300 -#gptofoo pcl-6 printer/HP-LaserJet_5000 -#gptofoo pcl-6 printer/HP-LaserJet_5100 -#gptofoo pcl-6 printer/HP-LaserJet_8000 -#gptofoo pcl-6 printer/HP-LaserJet_8100 -#gptofoo pcl-6 printer/HP-LaserJet_8150 -#gptofoo pcl-6 printer/HP-LaserJet_9000 -#gptofoo pcl-6 printer/HP-Mopier_240 -#gptofoo pcl-6 printer/HP-Mopier_320 -#gptofoo pcl-520 printer/HP-OfficeJet -#gptofoo pcl-520 printer/HP-OfficeJet_300 -#gptofoo pcl-520 printer/HP-OfficeJet_330 -#gptofoo pcl-520 printer/HP-OfficeJet_350 -#gptofoo pcl-601 printer/HP-OfficeJet_500 -#gptofoo pcl-601 printer/HP-OfficeJet_520 -#gptofoo pcl-601 printer/HP-OfficeJet_570 -#gptofoo pcl-601 printer/HP-OfficeJet_580 -#gptofoo pcl-601 printer/HP-OfficeJet_590 -#gptofoo pcl-601 printer/HP-OfficeJet_600 -#gptofoo pcl-601 printer/HP-OfficeJet_610 -#gptofoo pcl-601 printer/HP-OfficeJet_625 -#gptofoo pcl-601 printer/HP-OfficeJet_630 -#gptofoo pcl-601 printer/HP-OfficeJet_635 -#gptofoo pcl-690 printer/HP-OfficeJet_700 -#gptofoo pcl-690 printer/HP-OfficeJet_710 -#gptofoo pcl-690 printer/HP-OfficeJet_720 -#gptofoo pcl-690 printer/HP-OfficeJet_725 -#gptofoo pcl-900 printer/HP-OfficeJet_5105 -#gptofoo pcl-900 printer/HP-OfficeJet_5110 -#gptofoo pcl-900 printer/HP-OfficeJet_5110xi -#gptofoo pcl-900 printer/HP-OfficeJet_6105 -#gptofoo pcl-900 printer/HP-OfficeJet_6110 -#gptofoo pcl-900 printer/HP-OfficeJet_7110 -#gptofoo pcl-900 printer/HP-OfficeJet_7130 -#gptofoo pcl-900 printer/HP-OfficeJet_7140 -#gptofoo pcl-900 printer/HP-OfficeJet_D125 -#gptofoo pcl-900 printer/HP-OfficeJet_D135 -#gptofoo pcl-900 printer/HP-OfficeJet_D145 -#gptofoo pcl-900 printer/HP-OfficeJet_D155 -#gptofoo pcl-900 printer/HP-OfficeJet_G55 -#gptofoo pcl-900 printer/HP-OfficeJet_G85 -#gptofoo pcl-900 printer/HP-OfficeJet_G95 -#gptofoo pcl-900 printer/HP-OfficeJet_K60 -#gptofoo pcl-900 printer/HP-OfficeJet_K60xi -#gptofoo pcl-900 printer/HP-OfficeJet_K80 -#gptofoo pcl-900 printer/HP-OfficeJet_K80xi -#gptofoo pcl-520 printer/HP-OfficeJet_LX -#gptofoo pcl-850 printer/HP-OfficeJet_Pro_1150C -#gptofoo pcl-890 printer/HP-OfficeJet_Pro_1170C -#gptofoo pcl-890 printer/HP-OfficeJet_Pro_1175C -#gptofoo pcl-840 printer/HP-OfficeJet_R40 -#gptofoo pcl-840 printer/HP-OfficeJet_R45 -#gptofoo pcl-840 printer/HP-OfficeJet_R60 -#gptofoo pcl-840 printer/HP-OfficeJet_R65 -#gptofoo pcl-840 printer/HP-OfficeJet_R80 -#gptofoo pcl-840 printer/HP-OfficeJet_T45 -#gptofoo pcl-840 printer/HP-OfficeJet_T65 -#gptofoo pcl-900 printer/HP-OfficeJet_V40 -#gptofoo pcl-900 printer/HP-OfficeJet_V40xi -#gptofoo pcl-900 printer/HP-PhotoSmart_P100 -#gptofoo pcl-900 printer/HP-PhotoSmart_P130 -#gptofoo pcl-900 printer/HP-PhotoSmart_P230 +#gptofoo hp-lj_6l printer/HP-LaserJet_6L +#gptofoo hp-lj_6mp printer/HP-LaserJet_6MP +#gptofoo hp-lj_6p printer/HP-LaserJet_6P +#gptofoo hp-lj_8000 printer/HP-LaserJet_8000 +#gptofoo hp-lj_8100 printer/HP-LaserJet_8100 +#gptofoo hp-lj_8150 printer/HP-LaserJet_8150 +#gptofoo hp-lj_9000 printer/HP-LaserJet_9000 +#gptofoo hp-mopier_240 printer/HP-Mopier_240 +#gptofoo hp-mopier_320 printer/HP-Mopier_320 +#gptofoo hp-oj printer/HP-OfficeJet +#gptofoo hp-oj_300 printer/HP-OfficeJet_300 +#gptofoo hp-oj_330 printer/HP-OfficeJet_330 +#gptofoo hp-oj_350 printer/HP-OfficeJet_350 +#gptofoo hp-oj_500 printer/HP-OfficeJet_500 +#gptofoo hp-oj_5105 printer/HP-OfficeJet_5105 +#gptofoo hp-oj_5110 printer/HP-OfficeJet_5110 +#gptofoo hp-oj_5110xi printer/HP-OfficeJet_5110xi +#gptofoo hp-oj_520 printer/HP-OfficeJet_520 +#gptofoo hp-oj_570 printer/HP-OfficeJet_570 +#gptofoo hp-oj_580 printer/HP-OfficeJet_580 +#gptofoo hp-oj_590 printer/HP-OfficeJet_590 +#gptofoo hp-oj_600 printer/HP-OfficeJet_600 +#gptofoo hp-oj_610 printer/HP-OfficeJet_610 +#gptofoo hp-oj_6105 printer/HP-OfficeJet_6105 +#gptofoo hp-oj_6110 printer/HP-OfficeJet_6110 +#gptofoo hp-oj_625 printer/HP-OfficeJet_625 +#gptofoo hp-oj_630 printer/HP-OfficeJet_630 +#gptofoo hp-oj_635 printer/HP-OfficeJet_635 +#gptofoo hp-oj_700 printer/HP-OfficeJet_700 +#gptofoo hp-oj_710 printer/HP-OfficeJet_710 +#gptofoo hp-oj_7110 printer/HP-OfficeJet_7110 +#gptofoo hp-oj_7130 printer/HP-OfficeJet_7130 +#gptofoo hp-oj_7140 printer/HP-OfficeJet_7140 +#gptofoo hp-oj_720 printer/HP-OfficeJet_720 +#gptofoo hp-oj_725 printer/HP-OfficeJet_725 +#gptofoo hp-oj_d125 printer/HP-OfficeJet_D125 +#gptofoo hp-oj_d135 printer/HP-OfficeJet_D135 +#gptofoo hp-oj_d145 printer/HP-OfficeJet_D145 +#gptofoo hp-oj_d155 printer/HP-OfficeJet_D155 +#gptofoo hp-oj_g55 printer/HP-OfficeJet_G55 +#gptofoo hp-oj_g85 printer/HP-OfficeJet_G85 +#gptofoo hp-oj_g95 printer/HP-OfficeJet_G95 +#gptofoo hp-oj_k60 printer/HP-OfficeJet_K60 +#gptofoo hp-oj_k60xi printer/HP-OfficeJet_K60xi +#gptofoo hp-oj_k80 printer/HP-OfficeJet_K80 +#gptofoo hp-oj_k80xi printer/HP-OfficeJet_K80xi +#gptofoo hp-oj_lx printer/HP-OfficeJet_LX +#gptofoo hp-oj_pro_1150c printer/HP-OfficeJet_Pro_1150C +#gptofoo hp-oj_pro_1170c printer/HP-OfficeJet_Pro_1170C +#gptofoo hp-oj_pro_1175c printer/HP-OfficeJet_Pro_1175C +#gptofoo hp-oj_r40 printer/HP-OfficeJet_R40 +#gptofoo hp-oj_r45 printer/HP-OfficeJet_R45 +#gptofoo hp-oj_r60 printer/HP-OfficeJet_R60 +#gptofoo hp-oj_r65 printer/HP-OfficeJet_R65 +#gptofoo hp-oj_r80 printer/HP-OfficeJet_R80 +#gptofoo hp-oj_t45 printer/HP-OfficeJet_T45 +#gptofoo hp-oj_t65 printer/HP-OfficeJet_T65 +#gptofoo hp-oj_v40 printer/HP-OfficeJet_V40 +#gptofoo hp-oj_v40xi printer/HP-OfficeJet_V40xi +#gptofoo hp-psc_2110 printer/HP-PSC_2110 +#gptofoo hp-psc_2150 printer/HP-PSC_2150 +#gptofoo hp-psc_2210 printer/HP-PSC_2210 +#gptofoo hp-psc_370 printer/HP-PSC_370 +#gptofoo hp-psc_380 printer/HP-PSC_380 +#gptofoo hp-psc_500 printer/HP-PSC_500 +#gptofoo hp-psc_750 printer/HP-PSC_750 +#gptofoo hp-psc_950 printer/HP-PSC_950 +#gptofoo hp-psc_950xi printer/HP-PSC_950xi +#gptofoo hp-psc_7150 printer/HP-PhotoSmart_7150 +#gptofoo hp-psc_7345 printer/HP-PhotoSmart_7345 +#gptofoo hp-psc_7350 printer/HP-PhotoSmart_7350 +#gptofoo hp-psc_7550 printer/HP-PhotoSmart_7550 +#gptofoo hp-psc_p100 printer/HP-PhotoSmart_P100 #gptofoo pcl-P1000 printer/HP-PhotoSmart_P1000 #gptofoo pcl-P1100 printer/HP-PhotoSmart_P1100 -#gptofoo pcl-900 printer/HP-PhotoSmart_P1115 -#gptofoo pcl-900 printer/HP-PhotoSmart_P1215 -#gptofoo pcl-900 printer/HP-PhotoSmart_P1218 -#gptofoo pcl-900 printer/HP-PhotoSmart_P1315 -#gptofoo pcl-900 printer/HP-PhotoSmart_7150 -#gptofoo pcl-900 printer/HP-PhotoSmart_7345 -#gptofoo pcl-900 printer/HP-PhotoSmart_7350 -#gptofoo pcl-900 printer/HP-PhotoSmart_7550 -#gptofoo pcl-690 printer/HP-PSC_370 -#gptofoo pcl-690 printer/HP-PSC_380 -#gptofoo pcl-840 printer/HP-PSC_500 -#gptofoo pcl-900 printer/HP-PSC_750 -#gptofoo pcl-900 printer/HP-PSC_950 -#gptofoo pcl-900 printer/HP-PSC_950xi -#gptofoo pcl-900 printer/HP-PSC_2110 -#gptofoo pcl-900 printer/HP-PSC_2150 -#gptofoo pcl-900 printer/HP-PSC_2210 -#gptofoo pcl-2 printer/IBM-4019 -#gptofoo pcl-3 printer/IBM-4029_030_LaserPrinter_10 -#gptofoo pcl-2 printer/IBM-4312 -#gptofoo pcl-6 printer/IBM-Infoprint_12 -#gptofoo pcl-4 printer/IBM-Page_Printer_3112 -#gptofoo pcl-6 printer/Infotec-4651_MF -#gptofoo pcl-2 printer/Kyocera-F-1010 -#gptofoo pcl-4 printer/Kyocera-FS-600 -#gptofoo pcl-4 printer/Kyocera-FS-600KPDL2 -#gptofoo pcl-4 printer/Kyocera-FS-680 -#gptofoo pcl-4 printer/Kyocera-FS-800 -#gptofoo pcl-4 printer/Kyocera-FS-1000 -#gptofoo pcl-4 printer/Kyocera-FS-1000plus -#gptofoo pcl-4 printer/Kyocera-FS-1010 -#gptofoo pcl-4 printer/Kyocera-FS-1050 -#gptofoo pcl-4 printer/Kyocera-FS-1200 -#gptofoo pcl-4 printer/Kyocera-FS-1600 -#gptofoo pcl-4 printer/Kyocera-FS-1600plus -#gptofoo pcl-4 printer/Kyocera-FS-1700 -#gptofoo pcl-4 printer/Kyocera-FS-1700plus -#gptofoo pcl-4 printer/Kyocera-FS-1750 -#gptofoo pcl-4 printer/Kyocera-FS-1800 -#gptofoo pcl-4 printer/Kyocera-FS-1800plus -#gptofoo pcl-4 printer/Kyocera-FS-1900 -#gptofoo pcl-3 printer/Kyocera-FS-3500 -#gptofoo pcl-4 printer/Kyocera-FS-3600 -#gptofoo pcl-4 printer/Kyocera-FS-3600plus -#gptofoo pcl-4 printer/Kyocera-FS-3700 -#gptofoo pcl-4 printer/Kyocera-FS-3700plus -#gptofoo pcl-6 printer/Kyocera-FS-3750 -#gptofoo pcl-4 printer/Kyocera-FS-3800 -#gptofoo pcl-4 printer/Kyocera-FS-5800C -#gptofoo pcl-4 printer/Kyocera-FS-5900C -#gptofoo pcl-3 printer/Kyocera-FS-6500 -#gptofoo pcl-3 printer/Kyocera-FS-6500plus -#gptofoo pcl-4 printer/Kyocera-FS-6700 -#gptofoo pcl-4 printer/Kyocera-FS-7000 -#gptofoo pcl-4 printer/Kyocera-FS-7000plus -#gptofoo pcl-4 printer/Kyocera-FS-8000C -#gptofoo pcl-4 printer/Kyocera-FS-9000 -#gptofoo pcl-4 printer/Kyocera-FS-9100DN -#gptofoo pcl-4 printer/Kyocera-FS-9500DN -#gptofoo pcl-4 printer/Kyocera-KM-1530 -#gptofoo pcl-4 printer/Kyocera-KM-1810 -#gptofoo pcl-4 printer/Kyocera-KM-2030 -#gptofoo pcl-4 printer/Kyocera-KM-2530 -#gptofoo pcl-4 printer/Kyocera-KM-3530 -#gptofoo pcl-4 printer/Kyocera-KM-4230 -#gptofoo pcl-4 printer/Kyocera-KM-4530 -#gptofoo pcl-4 printer/Kyocera-KM-5230 -#gptofoo pcl-4 printer/Kyocera-KM-5530 -#gptofoo pcl-4 printer/Kyocera-KM-6230 +#gptofoo hp-psc_p1115 printer/HP-PhotoSmart_P1115 +#gptofoo hp-psc_p1215 printer/HP-PhotoSmart_P1215 +#gptofoo hp-psc_p1218 printer/HP-PhotoSmart_P1218 +#gptofoo hp-psc_p130 printer/HP-PhotoSmart_P130 +#gptofoo hp-psc_p1315 printer/HP-PhotoSmart_P1315 +#gptofoo hp-psc_p230 printer/HP-PhotoSmart_P230 +#gptofoo hp-e-printer_e20 printer/HP-e-printer_e20 +#gptofoo ibm-4019 printer/IBM-4019 +#gptofoo ibm-4029_030_lp_10 printer/IBM-4029_030_LaserPrinter_10 +#gptofoo ibm-4312 printer/IBM-4312 +#gptofoo ibm-infoprint_12 printer/IBM-Infoprint_12 +#gptofoo ibm-pp_3112 printer/IBM-Page_Printer_3112 +#gptofoo infotec-4651_mf printer/Infotec-4651_MF +#gptofoo kyocera-f-1010 printer/Kyocera-F-1010 +#gptofoo kyocera-fs-1000 printer/Kyocera-FS-1000 +#gptofoo kyocera-fs-1000plus printer/Kyocera-FS-1000plus +#gptofoo kyocera-fs-1010 printer/Kyocera-FS-1010 +#gptofoo kyocera-fs-1050 printer/Kyocera-FS-1050 +#gptofoo kyocera-fs-1200 printer/Kyocera-FS-1200 +#gptofoo kyocera-fs-1600 printer/Kyocera-FS-1600 +#gptofoo kyocera-fs-1600plus printer/Kyocera-FS-1600plus +#gptofoo kyocera-fs-1700 printer/Kyocera-FS-1700 +#gptofoo kyocera-fs-1700plus printer/Kyocera-FS-1700plus +#gptofoo kyocera-fs-1750 printer/Kyocera-FS-1750 +#gptofoo kyocera-fs-1800 printer/Kyocera-FS-1800 +#gptofoo kyocera-fs-1800plus printer/Kyocera-FS-1800plus +#gptofoo kyocera-fs-1900 printer/Kyocera-FS-1900 +#gptofoo kyocera-fs-3500 printer/Kyocera-FS-3500 +#gptofoo kyocera-fs-3600 printer/Kyocera-FS-3600 +#gptofoo kyocera-fs-3600plus printer/Kyocera-FS-3600plus +#gptofoo kyocera-fs-3700 printer/Kyocera-FS-3700 +#gptofoo kyocera-fs-3700plus printer/Kyocera-FS-3700plus +#gptofoo kyocera-fs-3750 printer/Kyocera-FS-3750 +#gptofoo kyocera-fs-3800 printer/Kyocera-FS-3800 +#gptofoo kyocera-fs-5800c printer/Kyocera-FS-5800C +#gptofoo kyocera-fs-5900c printer/Kyocera-FS-5900C +#gptofoo kyocera-fs-600 printer/Kyocera-FS-600 +#gptofoo kyocera-fs-600_kpdl-2 printer/Kyocera-FS-600_KPDL-2 +#gptofoo kyocera-fs-6500 printer/Kyocera-FS-6500 +#gptofoo kyocera-fs-6500plus printer/Kyocera-FS-6500plus +#gptofoo kyocera-fs-6700 printer/Kyocera-FS-6700 +#gptofoo kyocera-fs-680 printer/Kyocera-FS-680 +#gptofoo kyocera-fs-7000 printer/Kyocera-FS-7000 +#gptofoo kyocera-fs-7000plus printer/Kyocera-FS-7000plus +#gptofoo kyocera-fs-800 printer/Kyocera-FS-800 +#gptofoo kyocera-fs-8000c printer/Kyocera-FS-8000C +#gptofoo kyocera-fs-9000 printer/Kyocera-FS-9000 +#gptofoo kyocera-fs-9100dn printer/Kyocera-FS-9100DN +#gptofoo kyocera-fs-9500dn printer/Kyocera-FS-9500DN +#gptofoo kyocera-km-1530 printer/Kyocera-KM-1530 +#gptofoo kyocera-km-1810 printer/Kyocera-KM-1810 +#gptofoo kyocera-km-2030 printer/Kyocera-KM-2030 +#gptofoo kyocera-km-2530 printer/Kyocera-KM-2530 +#gptofoo kyocera-km-3530 printer/Kyocera-KM-3530 +#gptofoo kyocera-km-4230 printer/Kyocera-KM-4230 +#gptofoo kyocera-km-4530 printer/Kyocera-KM-4530 +#gptofoo kyocera-km-5230 printer/Kyocera-KM-5230 +#gptofoo kyocera-km-5530 printer/Kyocera-KM-5530 +#gptofoo kyocera-km-6230 printer/Kyocera-KM-6230 #gptofoo lexmark-4076 printer/Lexmark-4076 -#gptofoo pcl-4 printer/Lexmark-Optra_E -#gptofoo pcl-4 printer/Lexmark-Optra_Eplus -#gptofoo pcl-2 printer/Lexmark-Valuewriter_300 +#gptofoo lexmark-optra_e printer/Lexmark-Optra_E +#gptofoo lexmark-optra_eplus printer/Lexmark-Optra_Eplus +#gptofoo lexmark-vw_300 printer/Lexmark-Valuewriter_300 #gptofoo lexmark-z42 printer/Lexmark-Z42 #gptofoo lexmark-z43 printer/Lexmark-Z43 #gptofoo lexmark-z52 printer/Lexmark-Z52 #gptofoo lexmark-z53 printer/Lexmark-Z53 -#gptofoo pcl-4 printer/Minolta-PagePro_6 -#gptofoo pcl-4 printer/Minolta-PagePro_6e -#gptofoo pcl-4 printer/Minolta-PagePro_6ex -#gptofoo pcl-4 printer/Minolta-PagePro_8 -#gptofoo pcl-2 printer/Minolta-PagePro_8L -#gptofoo pcl-6 printer/Minolta-PagePro_1100 -#gptofoo pcl-4 printer/NEC-SuperScript_660i -#gptofoo pcl-2 printer/NEC-SuperScript_860 -#gptofoo pcl-2 printer/NEC-SuperScript_870 -#gptofoo pcl-2 printer/NEC-SuperScript_1260 -#gptofoo pcl-4 printer/NEC-SuperScript_1400 -#gptofoo pcl-4 printer/NEC-SuperScript_1800 -#gptofoo pcl-2 printer/Okidata-OL400 -#gptofoo pcl-2 printer/Okidata-OL400e -#gptofoo pcl-2 printer/Okidata-OL400ex -#gptofoo pcl-4 printer/Okidata-OL410e -#gptofoo pcl-2 printer/Okidata-OL600e -#gptofoo pcl-2 printer/Okidata-OL610e_S -#gptofoo pcl-2 printer/Okidata-OL800 -#gptofoo pcl-4 printer/Okidata-OL810ex -#gptofoo pcl-4 printer/Okidata-Okipage_6e -#gptofoo pcl-4 printer/Okidata-Okipage_6ex -#gptofoo pcl-4 printer/Okidata-Okipage_8p -#gptofoo pcl-4 printer/Okidata-Okipage_10e -#gptofoo pcl-4 printer/Okidata-Okipage_10ex -#gptofoo pcl-4 printer/Okidata-Okipage_14ex -#gptofoo pcl-4l printer/Okidata-Super_6e -#gptofoo pcl-2 printer/Olivetti-JP350S -#gptofoo pcl-2 printer/Olivetti-PG_306 +#gptofoo minolta-pp_1100 printer/Minolta-PagePro_1100 +#gptofoo minolta-pp_6 printer/Minolta-PagePro_6 +#gptofoo minolta-pp_6e printer/Minolta-PagePro_6e +#gptofoo minolta-pp_6ex printer/Minolta-PagePro_6ex +#gptofoo minolta-pp_8 printer/Minolta-PagePro_8 +#gptofoo minolta-pp_8l printer/Minolta-PagePro_8L +#gptofoo nec-ssc_1260 printer/NEC-SuperScript_1260 +#gptofoo nec-ssc_1400 printer/NEC-SuperScript_1400 +#gptofoo nec-ssc_1800 printer/NEC-SuperScript_1800 +#gptofoo nec-ssc_660i printer/NEC-SuperScript_660i +#gptofoo nec-ssc_860 printer/NEC-SuperScript_860 +#gptofoo nec-ssc_870 printer/NEC-SuperScript_870 +#gptofoo okidata-ol400 printer/Okidata-OL400 +#gptofoo okidata-ol400e printer/Okidata-OL400e +#gptofoo okidata-ol400ex printer/Okidata-OL400ex +#gptofoo okidata-ol410e printer/Okidata-OL410e +#gptofoo okidata-ol600e printer/Okidata-OL600e +#gptofoo okidata-ol610e_s printer/Okidata-OL610e_S +#gptofoo okidata-ol800 printer/Okidata-OL800 +#gptofoo okidata-ol810ex printer/Okidata-OL810ex +#gptofoo okidata-okp_10e printer/Okidata-Okipage_10e +#gptofoo okidata-okp_10ex printer/Okidata-Okipage_10ex +#gptofoo okidata-okp_14ex printer/Okidata-Okipage_14ex +#gptofoo okidata-okp_6e printer/Okidata-Okipage_6e +#gptofoo okidata-okp_6ex printer/Okidata-Okipage_6ex +#gptofoo okidata-okp_8p printer/Okidata-Okipage_8p +#gptofoo okidata-super_6e printer/Okidata-Super_6e +#gptofoo olivetti-jp350s printer/Olivetti-JP350S +#gptofoo olivetti-pg_306 printer/Olivetti-PG_306 #gptofoo olympus-p10 printer/Olympus-P-10 -#gptofoo olympus-p10 printer/Olympus-P-11 +#gptofoo olympus-p11 printer/Olympus-P-11 #gptofoo olympus-p200 printer/Olympus-P-200 -#gptofoo olympus-p300 printer/Olympus-P-300E -#gptofoo olympus-p300 printer/Olympus-P-300U -#gptofoo olympus-p300 printer/Olympus-P-330E -#gptofoo olympus-p300 printer/Olympus-P-330NE +#gptofoo olympus-p300 printer/Olympus-P-300 +#gptofoo olympus-p300e printer/Olympus-P-300E +#gptofoo olympus-p300u printer/Olympus-P-300U +#gptofoo olympus-p330e printer/Olympus-P-330E +#gptofoo olympus-p330ne printer/Olympus-P-330NE #gptofoo olympus-p400 printer/Olympus-P-400 #gptofoo olympus-p440 printer/Olympus-P-440 -#gptofoo pcl-2 printer/PCPI-1030 -#gptofoo pcl-2 printer/Panasonic-KX-P4410 -#gptofoo pcl-3 printer/Panasonic-KX-P4450 -#gptofoo pcl-2 printer/Panasonic-KX-P6150 -#gptofoo pcl-2 printer/Panasonic-KX-P6500 -#gptofoo pcl-2 printer/Raven-LP-410 -#gptofoo pcl-6 printer/Ricoh-Aficio_220 -#gptofoo pcl-4 printer/Ricoh-Aficio_401 -#gptofoo pcl-4 printer/Ricoh-Aficio_700 -#gptofoo pcl-4 printer/Samsung-ML-85 -#gptofoo pcl-6 printer/Samsung-ML-4600 -#gptofoo pcl-4 printer/Samsung-ML-5000a -#gptofoo pcl-4 printer/Samsung-ML-6000 -#gptofoo pcl-4 printer/Samsung-ML-6100 -#gptofoo pcl-6 printer/Samsung-ML-7000 -#gptofoo pcl-6 printer/Samsung-ML-7000P -#gptofoo pcl-6 printer/Samsung-ML-7000N -#gptofoo pcl-6 printer/Samsung-ML-7050 -#gptofoo pcl-4 printer/Samsung-QL-5100A -#gptofoo pcl-4 printer/Samsung-QL-6050 -#gptofoo pcl-2 printer/Seiko-SpeedJET_200 -#gptofoo pcl-6 printer/Sharp-AR-161 -#gptofoo pcl-601 printer/Sony-IJP-V100 +#gptofoo pcpi-1030 printer/PCPI-1030 +#gptofoo panasonic-kx-p4410 printer/Panasonic-KX-P4410 +#gptofoo panasonic-kx-p4450 printer/Panasonic-KX-P4450 +#gptofoo panasonic-kx-p6150 printer/Panasonic-KX-P6150 +#gptofoo panasonic-kx-p6500 printer/Panasonic-KX-P6500 +#gptofoo raven-lp-410 printer/Raven-LP-410 +#gptofoo ricoh-afc_220 printer/Ricoh-Aficio_220 +#gptofoo ricoh-afc_401 printer/Ricoh-Aficio_401 +#gptofoo ricoh-afc_700 printer/Ricoh-Aficio_700 +#gptofoo samsung-ml-4600 printer/Samsung-ML-4600 +#gptofoo samsung-ml-5000a printer/Samsung-ML-5000a +#gptofoo samsung-ml-6000 printer/Samsung-ML-6000 +#gptofoo samsung-ml-6100 printer/Samsung-ML-6100 +#gptofoo samsung-ml-7000 printer/Samsung-ML-7000 +#gptofoo samsung-ml-7000n printer/Samsung-ML-7000N +#gptofoo samsung-ml-7000p printer/Samsung-ML-7000P +#gptofoo samsung-ml-7050 printer/Samsung-ML-7050 +#gptofoo samsung-ml-85 printer/Samsung-ML-85 +#gptofoo samsung-ql-5100a printer/Samsung-QL-5100A +#gptofoo samsung-ql-6050 printer/Samsung-QL-6050 +#gptofoo seiko-sj_200 printer/Seiko-SpeedJET_200 +#gptofoo sharp-ar-161 printer/Sharp-AR-161 +#gptofoo sony-ijp-v100 printer/Sony-IJP-V100 #gptofoo sony-updp10 printer/Sony-UP-DP10 #gptofoo sony-updr150 printer/Sony-UP-DR150 -#gptofoo pcl-2 printer/Star-LS-04 -#gptofoo pcl-2 printer/Star-LaserPrinter_8 -#gptofoo pcl-3 printer/Tally-MT908 -#gptofoo pcl-4 printer/Xerox-Able_1406 -#gptofoo pcl-4 printer/Xerox-DocuPrint_4508 -#gptofoo pcl-4 printer/Xerox-DocuPrint_N4512 -#gptofoo pcl-4 printer/Xerox-DocuPrint_N4512PS -#gptofoo pcl-2 printer/Xerox-DocuPrint_P12 -#gptofoo pcl-6 printer/Xerox-DocuPrint_P1202 -#gptofoo pcl-4 printer/Xerox-DocuPrint_C20 -#gptofoo pcl-4 printer/Xerox-DocuPrint_P8e -#gptofoo pcl-4 printer/Xerox-Document_Centre_400 -#gptofoo pcl-2 printer/Generic-PCL_4_Printer -#gptofoo pcl-3 printer/Generic-PCL_5_Printer -#gptofoo pcl-4 printer/Generic-PCL_5c_Printer -#gptofoo pcl-4 printer/Generic-PCL_5e_Printer -#gptofoo pcl-6 printer/Generic-PCL_6_PCL_XL_Printer +#gptofoo star-ls-04 printer/Star-LS-04 +#gptofoo star-lp_8 printer/Star-LaserPrinter_8 +#gptofoo tally-mt908 printer/Tally-MT908 +#gptofoo xerox-able_1406 printer/Xerox-Able_1406 +#gptofoo xerox-dp_4508 printer/Xerox-DocuPrint_4508 +#gptofoo xerox-dp_c20 printer/Xerox-DocuPrint_C20 +#gptofoo xerox-dp_n4512 printer/Xerox-DocuPrint_N4512 +#gptofoo xerox-dp_n4512ps printer/Xerox-DocuPrint_N4512PS +#gptofoo xerox-dp_p12 printer/Xerox-DocuPrint_P12 +#gptofoo xerox-dp_p1202 printer/Xerox-DocuPrint_P1202 +#gptofoo xerox-dp_p8e printer/Xerox-DocuPrint_P8e +#gptofoo xerox-dc_400 printer/Xerox-Document_Centre_400 diff --git a/src/foomatic/foomatic-templates-ijs/gutenprint.xml b/src/foomatic/foomatic-templates-ijs/gutenprint.xml index f5cb082..399dd8d 100644 --- a/src/foomatic/foomatic-templates-ijs/gutenprint.xml +++ b/src/foomatic/foomatic-templates-ijs/gutenprint.xml @@ -8,13 +8,9 @@ - <b>This page provides data for the IJS driver of the - Gutenprint 5.0 series, if you are using the GhostScript - ("stp") driver of the Gimp-Print 4.3.x series, go to the - "<a - href="show_driver.cgi?driver=gimp-print-unstable">gimp-print-unstable</a>" - page, if you are using the IJS - driver of the Gimp-Print 4.2.x series, go to the + <b>This page provides data for the IJS driver of Gutenprint + 5.0. If you are using a Gimp-Print 4.2 release (e. g. 4.2.7), + driver of the Gimp-Print 4.2.x series, please visit the "<a href="show_driver.cgi?driver=gimp-print-ijs">gimp-print-ijs</a>" page, and if you are using Gimp-Print 4.0.x, go to the "<a @@ -24,11 +20,11 @@ Gutenprint supports a wide variety of Epson Stylus, HP DeskJet, LaserJet, Canon BubbleJet, Lexmark inkjet printers, with the primary goal being uncompromising quality. Epson Stylus printers - in particular are supported in all resolutions and modes, and the - latest printers are capable of producing prints that rival - photographic prints in quality. This package also offers much - faster printing for high quality text and presentation graphics - when required.<p> + in particular are supported in all resolutions and modes, and many + models are capable of producing prints that rival photographic + prints in quality. This package also offers much faster printing + for high quality text and presentation graphics when + required.<p> The execution information currently here corresponds to driver version @@STPVER@@. If you use another version, use the Foomatic @@ -38,9 +34,10 @@ IJS driver of Gutenprint. For the native CUPS driver there are special PPD files provided by the Gutenprint package.<p> - This driver does not require patching and rebuilding GhostScript. - It is enough when you have an IJS enabled GhostScript (GNU - GhostScript 6.53 or newer, APFL GhostScript 7.04 or newer.<p> + This driver is built as an IJS driver, which does not require + recompiling Ghostscript. It requires an IJS enabled GhostScript + (GNU GhostScript 6.53 or newer, APFL GhostScript 7.04 or + newer).<p> diff --git a/src/foomatic/printer_margins.c b/src/foomatic/printer_margins.c index fef4d6f..89c68ed 100644 --- a/src/foomatic/printer_margins.c +++ b/src/foomatic/printer_margins.c @@ -1,5 +1,5 @@ /* - * "$Id: printer_margins.c,v 1.15 2004/09/17 18:38:12 rleigh Exp $" + * "$Id: printer_margins.c,v 1.17 2006/04/17 02:06:18 rlk Exp $" * * Dump the per-printer margins for Grant Taylor's *-omatic database * @@ -31,6 +31,9 @@ int main(int argc, char **argv) { int i, k; + int use_all_page_sizes = 1; + if (argc > 1 && !strcmp(argv[1], "-s")) + use_all_page_sizes = 0; stp_init(); for (i = 0; i < stp_printer_model_count(); i++) { @@ -71,6 +74,10 @@ main(int argc, char **argv) { printf("Unable to lookup size %s!\n", opt->name); continue; } + if (!use_all_page_sizes && num_opts >= 10 && + (papersize->paper_unit == PAPERSIZE_ENGLISH_EXTENDED || + papersize->paper_unit == PAPERSIZE_METRIC_EXTENDED)) + continue; width = papersize->width; height = papersize->height; @@ -78,7 +85,17 @@ main(int argc, char **argv) { stp_set_string_parameter(pv, "PageSize", opt->name); stp_get_media_size(pv, &width, &height); - stp_get_imageable_area(pv, &left, &right, &bottom, &top); + stp_get_maximum_imageable_area(pv, &left, &right, &bottom, &top); + + if (left < 0) + left = 0; + if (right > width) + right = width; + if (bottom > height) + bottom = height; + if (top < 0) + top = 0; + bottom = height - bottom; top = height - top; diff --git a/src/foomatic/printer_options.c b/src/foomatic/printer_options.c index 53fed4c..6c1a9ba 100644 --- a/src/foomatic/printer_options.c +++ b/src/foomatic/printer_options.c @@ -1,5 +1,5 @@ /* - * "$Id: printer_options.c,v 1.48 2005/08/10 11:29:46 rlk Exp $" + * "$Id: printer_options.c,v 1.49 2006/03/13 13:29:02 rlk Exp $" * * Dump the per-printer options for Grant Taylor's *-omatic database * @@ -32,6 +32,9 @@ int main(int argc, char **argv) { int i, j, k; + stp_parameter_level_t max_level = STP_PARAMETER_LEVEL_ADVANCED4; + if (argc > 1 && !strcmp(argv[1], "-s")) + max_level = STP_PARAMETER_LEVEL_BASIC; stp_init(); for (i = 0; i < stp_printer_model_count(); i++) @@ -71,7 +74,8 @@ main(int argc, char **argv) for (k = 0; k < nparams; k++) { const stp_parameter_t *p = stp_parameter_list_param(params, k); - if (p->read_only || p->p_level > STP_PARAMETER_LEVEL_ADVANCED4 || + if (p->read_only || + (p->p_level > max_level && strcmp(p->name, "Resolution") != 0) || (p->p_class != STP_PARAMETER_CLASS_OUTPUT && p->p_class != STP_PARAMETER_CLASS_FEATURE)) continue; diff --git a/src/ghost/Makefile.in b/src/ghost/Makefile.in index 4db2b1d..c8b76b5 100644 --- a/src/ghost/Makefile.in +++ b/src/ghost/Makefile.in @@ -16,6 +16,9 @@ # Variables +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -267,6 +270,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -592,9 +596,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: diff --git a/src/ghost/ijsgutenprint.c b/src/ghost/ijsgutenprint.c index 0a11d25..80167eb 100644 --- a/src/ghost/ijsgutenprint.c +++ b/src/ghost/ijsgutenprint.c @@ -1,5 +1,5 @@ /* - * $Id: ijsgutenprint.c,v 1.11 2005/10/18 02:08:16 rlk Exp $ + * $Id: ijsgutenprint.c,v 1.14 2006/04/19 03:24:26 rlk Exp $ * * IJS server for Gutenprint. * @@ -43,6 +43,7 @@ static int stp_debug = 1; volatile int SDEBUG = 1; +static int job_aborted = 0; #define STP_DEBUG(x) \ do \ @@ -75,6 +76,10 @@ typedef struct _IMAGE int xres; /* dpi */ int yres; int output_type; + int left_margin; + int right_margin; + int top_margin; + int bottom_margin; int monochrome_flag; /* for monochrome output */ int row; /* row number in buffer */ int row_width; /* length of a row */ @@ -99,10 +104,13 @@ ijsgutenprint: the version of Gutenprint software installed (%s)\n\ ERROR: ijsgutenprint: the version of Gutenprint software installed (%s) does not match the PPD file (%s).\n"); const char *gutenprint_ppd_version = NULL; +static int ppd_mode = 0; /* Use PPD-style margins */ static stp_string_list_t *option_remap_list = NULL; static int print_messages_as_errors = 0; +static double total_bytes_printed = 0; + static char * c_strdup(const char *s) { @@ -505,7 +513,23 @@ gutenprint_get_cb (void *get_cb_data, { int l, r, b, t; int h, w; - stp_get_imageable_area(v, &l, &r, &b, &t); + if (ppd_mode) + { + stp_get_media_size(v, &w, &h); + stp_get_maximum_imageable_area(v, &l, &r, &b, &t); + if (l < 0) + l = 0; + if (r > w) + r = w; + if (t < 0) + t = 0; + if (b > h) + b = h; + } + else + stp_get_imageable_area(v, &l, &r, &b, &t); + + h = b - t; w = r - l; /* Force locale to "C", because decimal numbers sent to the IJS @@ -533,7 +557,20 @@ gutenprint_get_cb (void *get_cb_data, int l, r, b, t; int h, w; stp_get_media_size(v, &w, &h); - stp_get_imageable_area(v, &l, &r, &b, &t); + if (ppd_mode) + { + stp_get_maximum_imageable_area(v, &l, &r, &b, &t); + if (l < 0) + l = 0; + if (r > w) + r = w; + if (t < 0) + t = 0; + if (b > h) + b = h; + } + else + stp_get_imageable_area(v, &l, &r, &b, &t); /* Force locale to "C", because decimal numbers sent to the IJS client must have a decimal point, nver a decimal comma */ setlocale(LC_ALL, "C"); @@ -623,8 +660,25 @@ gutenprint_set_cb (void *set_cb_data, IjsServerCtx *ctx, IjsJobId jobid, { int l, r, b, t, pw, ph; double w, h; - stp_get_imageable_area(img->v, &l, &r, &b, &t); stp_get_media_size(img->v, &pw, &ph); + if (ppd_mode) + { + stp_get_maximum_imageable_area(img->v, &l, &r, &b, &t); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: l %d r %d t %d b %d pw %d ph %d\n", + l, r, t, b, pw, ph)); + if (l < 0) + l = 0; + if (r > pw) + r = pw; + if (t < 0) + t = 0; + if (b > ph) + b = ph; + } + else + stp_get_imageable_area(img->v, &l, &r, &b, &t); + STP_DEBUG(fprintf(stderr, "ijsgutenprint ppd_mode %d top left: %s\n", + ppd_mode, vbuf)); STP_DEBUG(fprintf(stderr, "ijsgutenprint: l %d r %d t %d b %d pw %d ph %d\n", l, r, t, b, pw, ph)); code = gutenprint_parse_wxh(vbuf, strlen(vbuf), &w, &h); @@ -686,6 +740,7 @@ gutenprint_set_cb (void *set_cb_data, IjsServerCtx *ctx, IjsJobId jobid, } else if (strcmp(key, "STP_VERSION") == 0) { + ppd_mode = 1; if (strcmp(vbuf, version_id) != 0) { fprintf(stderr, _(version_mismatch), @@ -840,6 +895,7 @@ gutenprint_errfunc(void *file, const char *buf, size_t bytes) static void gutenprint_outfunc(void *data, const char *buffer, size_t bytes) { + total_bytes_printed += bytes; if ((data != NULL) && (buffer != NULL) && (bytes != 0)) fwrite(buffer, 1, bytes, (FILE *)data); } @@ -851,6 +907,7 @@ static int gutenprint_image_width(stp_image_t *image) { IMAGE *img = (IMAGE *)(image->rep); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: image width %d\n", img->width)); return img->width; } @@ -858,9 +915,26 @@ static int gutenprint_image_height(stp_image_t *image) { IMAGE *img = (IMAGE *)(image->rep); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: image height %d (%d)\n", + img->height, img->height * img->xres / img->yres)); return img->height * img->xres / img->yres; } +static void +throwaway_data(int amount, IMAGE *img) +{ + char trash[4096]; /* Throwaway */ + int block_count = amount / 4096; + int leftover = amount % 4096; + while (block_count > 0) + { + ijs_server_get_data(img->ctx, trash, 4096); + block_count--; + } + if (leftover) + ijs_server_get_data(img->ctx, trash, leftover); +} + static int image_next_row(IMAGE *img) { @@ -875,16 +949,21 @@ image_next_row(IMAGE *img) STP_DEBUG(fprintf(stderr, "ijsgutenprint: %.0f bytes left, reading %.d, on row %d\n", img->bytes_left, (int) n_bytes, img->row)); #endif + throwaway_data(img->left_margin, img); status = ijs_server_get_data(img->ctx, img->row_buf, (int) n_bytes); if (status) { - STP_DEBUG(fprintf(stderr, "ERROR: ijsgutenprint: page aborted!\n")); + STP_DEBUG(fprintf(stderr, "ERROR: ijsgutenprint: page aborted (%d) at line %d!\n", + status, img->row)); + job_aborted = 1; + return status; } else { img->row++; - img->bytes_left -= n_bytes; + img->bytes_left -= (n_bytes + img->right_margin + img->left_margin); } + throwaway_data(img->right_margin, img); } else return 1; /* Done */ @@ -1027,7 +1106,7 @@ purge_unused_float_parameters(stp_vars_t *v) int i; stp_parameter_list_t params = stp_get_parameter_list(v); size_t count = stp_parameter_list_count(params); - STP_DEBUG(fprintf(stderr, "ijsgutenprint: Purging unused floating point parameters")); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: Purging unused floating point parameters\n")); for (i = 0; i < count; i++) { const stp_parameter_t *param = stp_parameter_list_param(params, i); @@ -1209,19 +1288,11 @@ main (int argc, char **argv) STP_DEBUG(stp_dbg("ijsgutenprint: about to start\n", img.v)); - do + STP_DEBUG(fprintf(stderr, "ijsgutenprint: About to get page header\n")); + status = ijs_server_get_page_header(img.ctx, &ph); + while (status == 0) { - - STP_DEBUG(fprintf(stderr, "ijsgutenprint: About to get page header\n")); - status = ijs_server_get_page_header(img.ctx, &ph); - STP_DEBUG(fprintf(stderr, "ijsgutenprint: Got page header %d\n", status)); - if (status) - { - if (status < 0) - fprintf(stderr, _("ERROR: ijsgutenprint: ijs_server_get_page_header failed %d\n"), - status); - break; - } + stp_vars_t *old_v = NULL; STP_DEBUG(fprintf(stderr, "ijsgutenprint: got page header, %d x %d\n", ph.width, ph.height)); STP_DEBUG(stp_dbg("ijsgutenprint: have page header\n", img.v)); @@ -1281,6 +1352,81 @@ main (int argc, char **argv) stp_set_float_parameter(img.v, "AppGamma", 1.0); stp_get_media_size(img.v, &w, &h); stp_get_imageable_area(img.v, &l, &r, &b, &t); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: chan %d bps %d image w %d %d h %d %d\n", + ph.n_chan, ph.bps, stp_get_width(img.v), img.width, + stp_get_height(img.v), img.height)); + if (ppd_mode) + { + int lt, rt, bt, tt; + + stp_get_maximum_imageable_area(img.v, <, &rt, &bt, &tt); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: w %d h %d l %d %d t %d %d r %d %d b %d %d\n", + w, h, l, lt, t, tt, r, rt, b, bt)); + if (lt < 0) + lt = 0; + if (tt < 0) + tt = 0; + if (rt > w) + rt = w; + if (bt > h) + bt = h; + if (l < 0) + l = 0; + if (t < 0) + t = 0; + if (r > w + l) + r = w + l; + if (b > h + t) + b = h + t; + STP_DEBUG(fprintf(stderr, "ijsgutenprint: w %d h %d l %d %d t %d %d r %d %d b %d %d\n", + w, h, l, lt, t, tt, r, rt, b, bt)); + if (lt < l) + { + STP_DEBUG(fprintf(stderr, "ijsgutenprint: l %d, lt %d\n", l, lt)); + img.left_margin = (l - lt) * ph.xres * ph.n_chan * ph.bps / 8 / 72; + img.width -= (l - lt) * ph.xres / 72; + STP_DEBUG(fprintf(stderr, "ijsgutenprint: chan %d bps %d image w %d %d h %d %d\n", + ph.n_chan, ph.bps, stp_get_width(img.v), img.width, + stp_get_height(img.v), img.height)); + } + else + img.left_margin = 0; + stp_set_left(img.v, l); + if (tt < t) + { + STP_DEBUG(fprintf(stderr, "ijsgutenprint: t %d, tt %d\n", t, tt)); + img.top_margin = (t - tt) * ph.yres * ph.n_chan * ph.bps / 8 / 72; + img.height -= (t - tt) * ph.yres / 72; + STP_DEBUG(fprintf(stderr, "ijsgutenprint: chan %d bps %d image w %d %d h %d %d\n", + ph.n_chan, ph.bps, stp_get_width(img.v), img.width, + stp_get_height(img.v), img.height)); + } + else + img.top_margin = 0; + stp_set_top(img.v, t); + if (rt > r) + { + STP_DEBUG(fprintf(stderr, "ijsgutenprint: r %d, rt %d\n", r, rt)); + img.right_margin = (rt - r) * ph.xres * ph.n_chan * ph.bps / 8 / 72; + img.width -= (rt - r) * ph.xres / 72; + STP_DEBUG(fprintf(stderr, "ijsgutenprint: chan %d bps %d image w %d %d h %d %d\n", + ph.n_chan, ph.bps, stp_get_width(img.v), img.width, + stp_get_height(img.v), img.height)); + } + else + img.right_margin = 0; + if (bt > b) + { + STP_DEBUG(fprintf(stderr, "ijsgutenprint: b %d, bt %d\n", b, bt)); + img.bottom_margin = (bt - b) * ph.yres * ph.n_chan * ph.bps / 8 / 72; + img.height -= (bt - b) * ph.yres / 72; + STP_DEBUG(fprintf(stderr, "ijsgutenprint: chan %d bps %d image w %d %d h %d %d\n", + ph.n_chan, ph.bps, stp_get_width(img.v), img.width, + stp_get_height(img.v), img.height)); + } + else + img.bottom_margin = 0; + } if (l < 0) width = r; else @@ -1290,8 +1436,19 @@ main (int argc, char **argv) height = b; else height = b - t; + img.row_width -= img.left_margin; + img.row_width -= img.right_margin; stp_set_height(img.v, height); stp_set_int_parameter(img.v, "PageNumber", page); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: w %d h %d l %d r %d t %d b %d\n", + width, height, l, r, t, b)); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: chan %d bps %d image w %d %d h %d %d\n", + ph.n_chan, ph.bps, stp_get_width(img.v), img.width, + stp_get_height(img.v), img.height)); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: margins l %d r %d t %d b %d row width %d\n", + img.left_margin, img.right_margin, + img.top_margin, img.bottom_margin, + img.row_width)); /* * Fix up the duplex/tumble settings stored in the "x_" parameters @@ -1327,6 +1484,10 @@ main (int argc, char **argv) validate_options(&si); STP_DEBUG(stp_dbg("ijsgutenprint: about to print", img.v)); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: w %d h %d l %d t %d\n", + stp_get_width(img.v), stp_get_height(img.v), + stp_get_left(img.v), stp_get_top(img.v))); + STP_DEBUG(fprintf(stderr, "ijsgutenprint: start printing page %d\n", page)); print_messages_as_errors = 1; if (!version_is_ok) { @@ -1340,6 +1501,7 @@ main (int argc, char **argv) if (page == 0) stp_start_job(img.v, &si); stp_print(img.v, &si); + old_v = stp_vars_create_copy(img.v); } else { @@ -1347,25 +1509,40 @@ main (int argc, char **argv) status = IJS_ERANGE; break; } - - while (img.bytes_left) + if (job_aborted) { - status = image_next_row(&img); - if (status) + STP_DEBUG(fprintf(stderr, "ijsgutenprint: aborting job\n")); + status = 1; + } + else + { + STP_DEBUG(fprintf(stderr, "ijsgutenprint: done printing page %d\n", page)); + + while (img.bytes_left) { - fprintf(stderr, _("ERROR: ijsgutenprint: Get next row failed at %.0f\n"), - img.bytes_left); - break; + status = image_next_row(&img); + if (status) + { + fprintf(stderr, _("ERROR: ijsgutenprint: Get next row failed at %.0f\n"), + img.bytes_left); + break; + } } - } - image_finish(&img); - page++; + image_finish(&img); + status = ijs_server_get_page_header(img.ctx, &ph); + } + if (status > 0) + { + fprintf(stderr, "Ending job after page %d\n", page); + stp_end_job(old_v, &si); + } + else + { + stp_vars_destroy(old_v); + page++; + } } - while (status == 0); - if (status > 0) - stp_end_job(img.v, &si); - if (f) { fclose(f); @@ -1376,6 +1553,8 @@ main (int argc, char **argv) ijs_server_done(img.ctx); + STP_DEBUG(fprintf (stderr, "ijsgutenprint: printed total %.0f bytes\n", + total_bytes_printed)); STP_DEBUG(fprintf (stderr, "ijsgutenprint: server exiting with status %d\n", status)); return status; } diff --git a/src/gimp/Makefile.in b/src/gimp/Makefile.in index fa5c842..ff81bf0 100644 --- a/src/gimp/Makefile.in +++ b/src/gimp/Makefile.in @@ -16,6 +16,9 @@ # Variables +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -262,6 +265,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -594,9 +598,6 @@ uninstall-am: uninstall-gimp_plug_inPROGRAMS uninstall-info-am @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: diff --git a/src/gimp/print.c b/src/gimp/print.c index ac3d15e..e5ee0fd 100644 --- a/src/gimp/print.c +++ b/src/gimp/print.c @@ -1,5 +1,5 @@ /* - * "$Id: print.c,v 1.65 2004/09/29 00:41:59 rlk Exp $" + * "$Id: print.c,v 1.66 2006/05/04 11:30:08 rlk Exp $" * * Print plug-in for the GIMP. * @@ -129,6 +129,7 @@ query (void) (BAD_CONST_CHAR) auth, (BAD_CONST_CHAR) copy, (BAD_CONST_CHAR) VERSION " - " RELEASE_DATE, + /* Do not translate the "" */ (BAD_CONST_CHAR) N_("/File/Print..."), (BAD_CONST_CHAR) types, GIMP_PLUGIN, diff --git a/src/gimp2/Makefile.in b/src/gimp2/Makefile.in index d520068..5c4723e 100644 --- a/src/gimp2/Makefile.in +++ b/src/gimp2/Makefile.in @@ -16,6 +16,9 @@ # Variables +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -262,6 +265,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -594,9 +598,6 @@ uninstall-am: uninstall-gimp2_plug_inPROGRAMS uninstall-info-am @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: diff --git a/src/gimp2/print.c b/src/gimp2/print.c index 8ae4e26..ef61867 100644 --- a/src/gimp2/print.c +++ b/src/gimp2/print.c @@ -1,5 +1,5 @@ /* - * "$Id: print.c,v 1.6 2004/11/01 20:46:34 rleigh Exp $" + * "$Id: print.c,v 1.7 2006/05/04 11:10:58 rlk Exp $" * * Print plug-in for the GIMP. * @@ -133,6 +133,7 @@ query (void) (BAD_CONST_CHAR) auth, (BAD_CONST_CHAR) copy, (BAD_CONST_CHAR) VERSION " - " RELEASE_DATE, + /* Do not translate the prefix "" */ (BAD_CONST_CHAR) N_("/File/Print..."), (BAD_CONST_CHAR) types, GIMP_PLUGIN, diff --git a/src/gutenprintui/Makefile.in b/src/gutenprintui/Makefile.in index 55f33a0..94c5726 100644 --- a/src/gutenprintui/Makefile.in +++ b/src/gutenprintui/Makefile.in @@ -16,6 +16,9 @@ # Variables +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main + srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -281,6 +284,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -701,9 +705,6 @@ uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: diff --git a/src/gutenprintui2/Makefile.in b/src/gutenprintui2/Makefile.in index 0d5e20e..6c56519 100644 --- a/src/gutenprintui2/Makefile.in +++ b/src/gutenprintui2/Makefile.in @@ -16,6 +16,9 @@ # Variables +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main + srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -283,6 +286,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -724,9 +728,6 @@ uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: diff --git a/src/gutenprintui2/panel.c b/src/gutenprintui2/panel.c index 1e20809..466f684 100644 --- a/src/gutenprintui2/panel.c +++ b/src/gutenprintui2/panel.c @@ -1,5 +1,5 @@ /* - * "$Id: panel.c,v 1.9 2005/12/30 20:32:07 rlk Exp $" + * "$Id: panel.c,v 1.10 2006/03/18 23:56:37 rlk Exp $" * * Main window code for Print plug-in for the GIMP. * @@ -3990,11 +3990,11 @@ fill_buffer_writefunc(void *priv, const char *buffer, size_t bytes) for (i = 0; i < pixels; i++) { if (mask & 1) - where[0] = -xbuffer[0]; + where[0] = ~xbuffer[0]; if (mask & 2) - where[1] = -xbuffer[1]; + where[1] = ~xbuffer[1]; if (mask & 4) - where[2] = -xbuffer[2]; + where[2] = ~xbuffer[2]; where += 3; xbuffer += 3; } diff --git a/src/main/Makefile.in b/src/main/Makefile.in index d4191c1..b387ad5 100644 --- a/src/main/Makefile.in +++ b/src/main/Makefile.in @@ -16,6 +16,9 @@ # Variables +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main + srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -353,6 +356,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -886,9 +890,6 @@ uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: diff --git a/src/main/bit-ops.c b/src/main/bit-ops.c index 5cff81d..063348d 100644 --- a/src/main/bit-ops.c +++ b/src/main/bit-ops.c @@ -1,5 +1,5 @@ /* - * "$Id: bit-ops.c,v 1.8 2005/06/29 01:42:34 rlk Exp $" + * "$Id: bit-ops.c,v 1.9 2006/03/28 03:27:57 rlk Exp $" * * Softweave calculator for Gutenprint. * @@ -1087,7 +1087,7 @@ stp_pack_uncompressed(stp_vars_t *v, find_first_and_last(line, length, first, last); memcpy(comp_buf, line, length); *comp_ptr = comp_buf + length; - if (first > last) + if (first && last && *first > *last) return 0; else return 1; diff --git a/src/main/escp2-channels.c b/src/main/escp2-channels.c index 30636da..6f258ba 100644 --- a/src/main/escp2-channels.c +++ b/src/main/escp2-channels.c @@ -1,5 +1,5 @@ /* - * "$Id: escp2-channels.c,v 1.60 2006/01/06 22:10:41 rlk Exp $" + * "$Id: escp2-channels.c,v 1.61 2006/01/31 03:09:48 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -2142,9 +2142,9 @@ static const shade_set_t ultrachrome_matte_shades = /* Ultrachrome with matte bl static const shade_set_t ultra3_photo_shades = /* R2400 with photo black ink */ { - { 3, { 1.0, 0.555, 0.185 }}, - { 2, { 1.0, 0.25 }}, - { 2, { 1.0, 0.25 }}, + { 3, { 1.0, 0.48, 0.16 }}, + { 2, { 1.0, 0.35 }}, + { 2, { 1.0, 0.20 }}, { 1, { 1.0 }}, { 1, { 1.0 }}, { 1, { 1.0 }}, @@ -2155,8 +2155,8 @@ static const shade_set_t ultra3_photo_shades = /* R2400 with photo black ink */ static const shade_set_t ultra3_matte_shades = /* R2400 with matte black ink */ { { 3, { 1.0, 0.278, 0.093 }}, - { 2, { 1.0, 0.25 }}, - { 2, { 1.0, 0.25 }}, + { 2, { 1.0, 0.35 }}, + { 2, { 1.0, 0.20 }}, { 1, { 1.0 }}, { 1, { 1.0 }}, { 1, { 1.0 }}, diff --git a/src/main/escp2-driver.c b/src/main/escp2-driver.c index a680048..845a7a1 100644 --- a/src/main/escp2-driver.c +++ b/src/main/escp2-driver.c @@ -1,5 +1,5 @@ /* - * "$Id: escp2-driver.c,v 1.27 2006/01/06 22:10:41 rlk Exp $" + * "$Id: escp2-driver.c,v 1.28 2006/04/30 21:29:52 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -244,9 +244,16 @@ escp2_set_remote_sequence(stp_vars_t *v) /* These commands do not appear to do anything on the */ /* 2200. Need to test on R800. */ /* From the R1800 manual -- bottom margin borderless */ - stp_send_command(v, "US", "bcc", 0, 2); + stp_send_command(v, "PM", "bcc", 0, 0); + stp_send_command(v, "DP", "bcc", 0, 0); + stp_send_command(v, "SN", "bc", 0); + stp_send_command(v, "MI", "bccc", 1, 0xb, 1); + stp_send_command(v, "US", "bccc", 0, 0, 2); + stp_send_command(v, "US", "bccc", 0, 1, 0); /* This command means "check paper size - no" */ - stp_send_command(v, "US", "bcc", 2, 0); + stp_send_command(v, "US", "bccc", 0, 2, 0); + stp_send_command(v, "DR", "bcccc", 0, 0, 0, 0); + stp_send_command(v, "PP", "bccc", 0, 1, 0xff); #endif } } @@ -471,7 +478,6 @@ set_horizontal_position(stp_vars_t *v, stp_pass_t *pass, int vertical_subpass) if (pos != 0) { - /* Note hard-coded 1440 -- from Epson manuals */ if (pd->command_set == MODEL_COMMAND_PRO || pd->variable_dots) stp_send_command(v, "\033($", "bl", pos); else if (pd->advanced_command_set || pd->res->hres > 720) diff --git a/src/main/escp2-papers.c b/src/main/escp2-papers.c index 9796ac7..6a71ac1 100644 --- a/src/main/escp2-papers.c +++ b/src/main/escp2-papers.c @@ -1,5 +1,5 @@ /* - * "$Id: escp2-papers.c,v 1.91 2006/01/08 02:33:16 rlk Exp $" + * "$Id: escp2-papers.c,v 1.97 2006/04/13 12:10:04 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -369,12 +369,12 @@ static const char ultra_k3_matte_lum_adj[] = "\n" "\n" "\n" -/* C */ "0.49 0.51 0.55 0.61 0.67 0.71 0.76 0.79 " /* B */ +/* C */ "0.55 0.57 0.61 0.64 0.67 0.69 0.72 0.75 " /* B */ /* B */ "0.83 0.80 0.76 0.76 0.78 0.79 0.83 0.86 " /* M */ /* M */ "0.93 0.95 0.97 0.97 0.97 0.97 0.96 0.96 " /* R */ /* R */ "0.96 0.97 0.97 0.98 0.99 1.00 1.00 1.00 " /* Y */ /* Y */ "1.00 0.98 0.97 0.95 0.93 0.91 0.88 0.83 " /* G */ -/* G */ "0.75 0.64 0.58 0.54 0.52 0.51 0.50 0.49 " /* C */ +/* G */ "0.83 0.71 0.65 0.61 0.58 0.56 0.55 0.55 " /* C */ "\n" "\n" "\n"; @@ -414,12 +414,12 @@ static const char ultra_k3_glossy_lum_adj[] = "\n" "\n" "\n" -/* C */ "0.49 0.53 0.60 0.64 0.67 0.69 0.72 0.75 " /* B */ +/* C */ "0.55 0.57 0.61 0.64 0.67 0.69 0.72 0.75 " /* B */ /* B */ "0.75 0.71 0.70 0.70 0.72 0.76 0.81 0.87 " /* M */ /* M */ "0.93 0.95 0.97 0.98 0.98 0.97 0.96 0.96 " /* R */ /* R */ "0.96 0.97 0.98 0.98 0.99 1.00 1.00 1.00 " /* Y */ /* Y */ "1.00 0.98 0.97 0.96 0.95 0.93 0.90 0.87 " /* G */ -/* G */ "0.83 0.69 0.61 0.55 0.53 0.52 0.50 0.49 " /* C */ +/* G */ "0.83 0.71 0.65 0.61 0.58 0.56 0.55 0.55 " /* C */ "\n" "\n" "\n"; @@ -479,8 +479,8 @@ static const char r800_matte_hue_adj[] = /* B */ "-.38 -.38 -.30 -.20 -.10 -.00 0.02 0.02 " /* M */ /* M */ "-.00 -.00 -.00 -.00 -.00 -.00 -.00 0.00 " /* R */ /* R */ "0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 " /* Y */ -/* Y */ "0.00 -.00 -.00 -.00 -.00 -.00 -.00 -.00 " /* G */ -/* G */ "-.00 -.00 -.00 -.00 -.00 -.00 -.00 -.00 " /* C */ +/* Y */ "0.00 0.02 0.05 0.09 0.13 0.15 0.16 0.17 " /* G */ +/* G */ "0.17 0.17 0.16 0.15 0.13 0.09 0.05 0.02 " /* C */ "\n" "\n" "\n"; @@ -525,8 +525,8 @@ static const char r800_glossy_hue_adj[] = /* B */ "-.38 -.38 -.30 -.20 -.10 -.00 0.00 0.00 " /* M */ /* M */ "-.00 -.00 -.00 -.00 -.00 -.00 -.00 0.00 " /* R */ /* R */ "0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 " /* Y */ -/* Y */ "0.00 -.00 -.00 -.00 -.00 -.00 -.00 -.00 " /* G */ -/* G */ "-.00 -.00 -.00 -.00 -.00 -.00 -.00 -.00 " /* C */ +/* Y */ "0.00 0.02 0.05 0.09 0.13 0.15 0.16 0.17 " /* G */ +/* G */ "0.17 0.17 0.16 0.15 0.13 0.09 0.05 0.02 " /* C */ "\n" "\n" "\n"; @@ -681,25 +681,25 @@ DECLARE_PAPER_ADJUSTMENTS(photo2); static const paper_adjustment_t photo3_adjustments[] = { - { "Plain", 0.615, .35, 0.75, .15, .9, 1, .7, .8, .9, 1, 1.0, + { "Plain", 0.615, .35, 0.75, .15, .9, 1, .85, .85, .9, 1, 1.0, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "PlainFast", 0.615, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0, + { "PlainFast", 0.615, .35, 0.75, .15, .9, 1, .85, .85, .9, 1, 1.0, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Postcard", 0.692, .35, 0.5, .2, .9, 1, .59, .7, .9, 1, 1.0, + { "Postcard", 0.692, .35, 0.5, .2, .9, 1, .85, .85, .9, 1, 1.0, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "GlossyFilm", 0.833, .5, 0.75, .2, .999, 1, .59, .7, .9, 1, 1, + { "GlossyFilm", 0.833, .5, 0.75, .2, .999, 1, .7, .8, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, { "Transparency", 0.833, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Envelope", 0.615, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0, + { "Envelope", 0.615, .35, 0.75, .15, .9, 1, .85, .85, .9, 1, 1.0, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, { "BackFilm", 0.833, .5, 0.75, .2, .999, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Matte", 0.833, .35, 0.5, .25, .999, 1, .63, .72, .9, 1, 1, + { "Matte", 0.833, .35, 0.5, .25, .999, 1, .67, .72, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "MatteHeavy", 0.833, .35, 0.5, .25, .999, 1, .63, .72, .9, 1, 1, + { "MatteHeavy", 0.833, .35, 0.5, .25, .999, 1, .85, .85, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Inkjet", 0.709, .5, 0.75, .2, .9, 1, .59, .7, .9, 1, 1, + { "Inkjet", 0.709, .5, 0.75, .2, .9, 1, .85, .85, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, { "Coated", 0.833, .45, 0.5, .25, .999, 1, .76, .84, .66, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, @@ -717,7 +717,7 @@ static const paper_adjustment_t photo3_adjustments[] = photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, { "ColorLife", 0.833, .5, 0.75, .2, .9, 1, .59, .7, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, - { "Other", 0.615, .35, 0.5, .5, .9, 1, .59, .7, .9, 1, 1, + { "Other", 0.615, .35, 0.5, .5, .9, 1, .85, .85, .9, 1, 1, photo3_hue_adj, photo3_lum_adj, photo3_sat_adj }, }; @@ -845,7 +845,7 @@ static const paper_adjustment_t ultrachrome_matte_adjustments[] = ultra_glossy_hue_adj, ultra_glossy_lum_adj, ultra_glossy_sat_adj }, { "Semigloss", 0.72, .8, 1, .01, 0.5, 1, 1, 1, .6, 1, .92, ultra_glossy_hue_adj, ultra_glossy_lum_adj, ultra_glossy_sat_adj }, - { "Luster", 0.72, .8, 1, .01, 0.5, 1, 1, 1, 1, .5, .92, + { "Luster", 0.72, .8, 1, .01, 0.5, 1, 1, 1, 1, 1, .92, ultra_glossy_hue_adj, ultra_glossy_lum_adj, ultra_glossy_sat_adj }, { "WaterColorRadiant", 0.92, 0.4, 1, .01, 0.5, 1, 1, 1, .6, 1, 1.0, ultra_matte_hue_adj, ultra_matte_lum_adj, ultra_matte_sat_adj }, @@ -863,47 +863,47 @@ DECLARE_PAPER_ADJUSTMENTS(ultrachrome_matte); static const paper_adjustment_t ultrachrome_k3_photo_adjustments[] = { - { "Plain", 0.72, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "Plain", 0.72, .8, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "PlainFast", 0.72, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "PlainFast", 0.72, .8, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Postcard", 0.72, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "Postcard", 0.72, .8, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "GlossyFilm", 0.83, 1.0, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "GlossyFilm", 0.83, 1.0, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Transparency", 0.83, .75, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "Transparency", 0.83, .75, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Envelope", 0.72, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "Envelope", 0.72, .8, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "BackFilm", 0.83, .75, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "BackFilm", 0.83, .75, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Matte", 0.92, 0.8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "Matte", 0.92, 0.8, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "MatteHeavy", 0.92, 0.8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "MatteHeavy", 0.92, 0.8, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Inkjet", 0.72, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "Inkjet", 0.72, .8, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Coated", 0.83, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "Coated", 0.83, .8, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Photo", 1.0, .5, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "Photo", 1.0, .5, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "GlossyPhoto", 0.72, 1, 1, .01, 1.8, 1, 1, 1, 1, 1, .92, + { "GlossyPhoto", 0.72, .8, 1, .01, 1.8, 1, .95, .9, 1, 1, .92, ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj }, - { "Semigloss", 0.72, .8, 1, .01, 1.8, 1, 1, 1, 1, 1, .92, + { "Semigloss", 0.72, .8, 1, .01, 1.8, 1, .95, .9, 1, 1, .92, ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj }, - { "Luster", 0.72, .8, 1, .01, 1.8, 1, 1, 1, 1, 1, .92, + { "Luster", 0.72, .8, 1, .01, 1.8, 1, .95, .9, 1, 1, .92, ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj }, - { "ArchivalMatte", 0.92, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "ArchivalMatte", 0.92, .8, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "WaterColorRadiant", 0.92, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "WaterColorRadiant", 0.92, .8, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "GlossyPaper", 0.83, 1.0, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "GlossyPaper", 0.83, 1.0, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Ilford", 0.83, 1.0, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "Ilford", 0.83, 1.0, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "ColorLife", 0.83, 1.0, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "ColorLife", 0.83, 1.0, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Other", 0.72, .1, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0, + { "Other", 0.72, .1, 1, .01, 1.5, 1, .95, .9, 1, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, }; @@ -911,45 +911,45 @@ DECLARE_PAPER_ADJUSTMENTS(ultrachrome_k3_photo); static const paper_adjustment_t ultrachrome_k3_matte_adjustments[] = { - { "Plain", 0.72, .1, 1, 0, 0.5, 1, 1, 1, .6, 1, 1.0, + { "Plain", 0.72, .1, 1, 0, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "PlainFast", 0.72, .1, 1, 0, 0.5, 1, 1, 1, .6, 1, 1.0, + { "PlainFast", 0.72, .1, 1, 0, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Postcard", 0.72, .1, 1, 0, 0.5, 1, 1, 1, .6, 1, 1.0, + { "Postcard", 0.72, .1, 1, 0, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "GlossyFilm", 0.83, .5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "GlossyFilm", 0.83, .5, 1, 0.00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Transparency", 0.83, .5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "Transparency", 0.83, .5, 1, 0.00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Envelope", 0.72, .1, 1, 0, 0.5, 1, 1, 1, .6, 1, 1.0, + { "Envelope", 0.72, .1, 1, 0, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "BackFilm", 0.83, .5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "BackFilm", 0.83, .5, 1, 0.00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Matte", 0.92, 0.5, 1, 0.00, 1.25, 1, 1, 1, .6, 1, 1.0, + { "Matte", 0.92, 0.5, 1, 0.00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "MatteHeavy", 0.92, 0.4, .4, .01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "MatteHeavy", 0.92, 0.5, 1, .00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Inkjet", 0.72, .3, 1, .01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "Inkjet", 0.72, .3, 1, .00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Coated", 0.83, .4, 1, .01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "Coated", 0.83, .4, 1, .00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Photo", 1.0, 0.5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "Photo", 1.0, 0.5, 1, 0.00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "GlossyPhoto", 0.72, 1, 1, .01, 0.5, 1, 1, 1, .6, 1, .92, + { "GlossyPhoto", 0.72, 1, 1, .00, 1.25, 1, .95, .9, .6, 1, .92, ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj }, - { "Semigloss", 0.72, .8, 1, .01, 0.5, 1, 1, 1, .6, 1, .92, + { "Semigloss", 0.72, .8, 1, .00, 1.25, 1, .95, .9, .6, 1, .92, ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj }, - { "Luster", 0.72, .8, 1, .01, 0.5, 1, 1, 1, 1, .5, .92, + { "Luster", 0.72, .8, 1, .00, 1.25, 1, .95, .9, .6, 1, .92, ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj }, - { "WaterColorRadiant", 0.92, 0.4, 1, .01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "WaterColorRadiant", 0.92, 0.4, 1, .00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "GlossyPaper", 0.83, 0.5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "GlossyPaper", 0.83, 0.5, 1, 0.00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Ilford", 0.83, 0.5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "Ilford", 0.83, 0.5, 1, 0.00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "ColorLife", 0.83, 0.5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0, + { "ColorLife", 0.83, 0.5, 1, 0.00, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, - { "Other", 0.72, .1, .4, 0, 0.5, 1, 1, 1, .6, 1, 1.0, + { "Other", 0.72, .1, .4, 0, 1.25, 1, .95, .9, .6, 1, 1.0, ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj }, }; diff --git a/src/main/escp2-resolutions.c b/src/main/escp2-resolutions.c index a60dad1..9dfe8e7 100644 --- a/src/main/escp2-resolutions.c +++ b/src/main/escp2-resolutions.c @@ -1,5 +1,5 @@ /* - * "$Id: escp2-resolutions.c,v 1.31 2006/01/07 02:43:28 rlk Exp $" + * "$Id: escp2-resolutions.c,v 1.33 2006/05/06 21:30:59 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -138,6 +138,15 @@ static const res_t r_1440x1440sw = static const res_t r_1440x1440ov = { "1440x1440ov", N_("1440 x 1440 DPI"), 2880, 1440, 1440, 1440, 1, 0, 1}; +static const res_t r_1440x1440sw3650 = +{ "1440x1440ov", N_("1440 x 1440"), + 1440, 1440, 1440, 1440, 1, 0, 1}; +static const res_t r_1440x1440sw3650hq = +{ "2880x1440sw", N_("1440 x 1440 DPI High Quality"), + 1440, 1440, 1440, 1440, 1, 0, 2}; +static const res_t r_1440x1440sw3650hq2 = +{ "5760x1440sw", N_("1440 x 1440 DPI Highest Quality"), + 1440, 1440, 1440, 1440, 1, 0, 4}; static const res_t r_2880x1440mw = { "2880x1440mw", N_("2880 x 1440 DPI"), @@ -148,6 +157,15 @@ static const res_t r_2880x1440sw = static const res_t r_1440x2880sw = { "1440x2880sw", N_("2880 x 1440 DPI Transposed"), 1440, 2880, 1440, 2880, 1, 0, 1}; +static const res_t r_2880x1440sw2400 = +{ "2880x1440sw", N_("2880 x 1440 DPI"), + 1440, 2880, 1440, 2880, 1, 0, 1}; +static const res_t r_2880x1440sw2400hq = +{ "2880x2880sw", N_("2880 x 1440 DPI High Quality"), + 1440, 2880, 1440, 2880, 1, 0, 2}; +static const res_t r_2880x1440sw2400hq2 = +{ "5760x2880sw", N_("2880 x 1440 DPI Highest Quality"), + 1440, 2880, 1440, 2880, 1, 0, 4}; static const res_t r_5760x1440sw = { "5760x1440sw", N_("5760 x 1440 DPI"), @@ -331,6 +349,56 @@ const res_t *const stpi_escp2_superfine_reslist[] = NULL }; +const res_t *const stpi_escp2_r2400_reslist[] = +{ + &r_360x120sw, + + &r_360x180sw, + + &r_360x240sw, + + &r_360sw, + + &r_720x360sw, + + &r_720sw, + + &r_1440x720sw, + &r_720x1440sw, + + &r_1440x1440sw, + + &r_2880x1440sw2400, + &r_2880x1440sw2400hq, + &r_2880x1440sw2400hq2, + + NULL +}; + +const res_t *const stpi_escp2_cx3650_reslist[] = +{ + &r_360x120sw, + + &r_360x180sw, + + &r_360x240sw, + + &r_360sw, + + &r_720x360sw, + + &r_720sw, + + &r_1440x720sw, + &r_720x1440sw, + + &r_1440x1440sw3650, + &r_1440x1440sw3650hq, + &r_1440x1440sw3650hq2, + + NULL +}; + const res_t *const stpi_escp2_picturemate_reslist[] = { diff --git a/src/main/papers.xml b/src/main/papers.xml index 44db989..4f2bacd 100644 --- a/src/main/papers.xml +++ b/src/main/papers.xml @@ -4,7 +4,7 @@ XML description of papers known to libgutenprint. It should be edited by hand. - "$Id: papers.xml,v 1.19 2005/12/31 17:22:32 rlk Exp $" + "$Id: papers.xml,v 1.21 2006/04/20 00:33:41 rlk Exp $" --> diff --git a/src/main/print-canon.c b/src/main/print-canon.c index 53b56b0..090e9f1 100644 --- a/src/main/print-canon.c +++ b/src/main/print-canon.c @@ -1,5 +1,5 @@ /* - * "$Id: print-canon.c,v 1.167 2005/10/21 13:31:41 faust3 Exp $" + * "$Id: print-canon.c,v 1.173 2006/05/12 22:43:23 rlk Exp $" * * Print plug-in CANON BJL driver for the GIMP. * @@ -636,6 +636,16 @@ static const canon_variable_inklist_t canon_ink_standardphoto[] = &ci_CcMmYK_2, &ci_CcMmYK_2, &ci_CcMmYK_2, &ci_CcMmYK_2, &ci_CcMmYK_2, &ci_CcMmYK_2, }, + { + 1,7, + &ci_CcMmYK_1, &ci_CcMmYK_1, &ci_CcMmYK_1, + &ci_CcMmYK_1, &ci_CcMmYK_1, &ci_CcMmYK_1, + }, + { + 2,7, + &ci_CcMmYK_2, &ci_CcMmYK_2, &ci_CcMmYK_2, + &ci_CcMmYK_2, &ci_CcMmYK_2, &ci_CcMmYK_2, + }, }; /* Ink set for printers using CMYK and CcMmYK printing, 1 or 3bit/pixel */ @@ -656,6 +666,11 @@ static const canon_variable_inklist_t canon_ink_superphoto[] = &ci_CcMmYK_3, &ci_CcMmYK_3, &ci_CcMmYK_3, &ci_CcMmYK_3, &ci_CcMmYK_3, &ci_CcMmYK_3, }, + { + 3,7, + &ci_CcMmYK_3, &ci_CcMmYK_3, &ci_CcMmYK_3, + &ci_CcMmYK_3, &ci_CcMmYK_3, &ci_CcMmYK_3, + }, }; @@ -963,7 +978,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {-1,-1,1,0,-1,-1},/*090x090 180x180 360x360 720x360 720x720 1440x1440*/ {1,1,1,1,1,1}, /*------- ------- 360x360 720x360 ------- ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -982,7 +997,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {-1,1,0,0,-1,-1}, /*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/ {1,1,1,1,1,1}, /*------- 360x360 720x720 1440x720 --------- ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -1001,7 +1016,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {-1,-1,0,0,-1,-1},/*090x090 180x180 360x360 720x360 720x720 1440x1440*/ {1,1,1,1,1,1}, /*------- ------- 360x360 720x360 ------- ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -1194,7 +1209,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {-1,1,0,0,-1,-1}, /*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/ {1,1,1,1,1,1}, /*------- 360x360 720x720 1440x720 --------- ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -1212,7 +1227,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {-1,1,0,0,-1,-1}, /*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/ {1,1,1,1,1,1}, /*------- 360x360 720x720 1440x720 --------- ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -1230,7 +1245,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {-1,0,0,0,-1,-1}, /*150x150 300x300 600x600 1200x600 1200x1200 2400x2400*/ {1,3.5,1.8,1,1,1},/*------- 300x300 600x600 1200x600 --------- ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -1248,7 +1263,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {-1,0,0,0,-1,-1}, /*150x150 300x300 600x600 1200x600 1200x1200 2400x2400*/ {1,1,1,1,1,1}, /*------- 300x300 600x600 1200x600 --------- ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -1274,7 +1289,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {-1,1,0,0,-1,-1}, /*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/ {1,1,1,1,1,1}, /*------- 360x360 720x720 1440x720 --------- ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -1292,7 +1307,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {0,0,-1,-1,-1,-1},/*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/ {1,1,1,1,1,1}, /*180x180 360x360 ------- -------- --------- ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -1310,7 +1325,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {-1,1,0,0,-1,-1}, /*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/ {1,1,1,1,1,1}, /*------- 360x360 720x720 1440x720 --------- ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -1328,7 +1343,7 @@ static const canon_cap_t canon_model_capabilities[] = #ifndef EXPERIMENTAL_STUFF {-1,0,0,-1,0,-1}, /*150x150 300x300 600x600 1200x600 1200x1200 2400x2400*/ {1,1,1,1,1,1}, /*------- 300x300 600x600 -------- 1200x1200 ---------*/ - CANON_INK(canon_ink_standard), + CANON_INK(canon_ink_standardphoto), #endif standard_lum_adjustment, standard_hue_adjustment, @@ -1344,7 +1359,7 @@ static const canon_cap_t canon_model_capabilities[] = CANON_CAP_STD0|CANON_CAP_extended_t|CANON_CAP_5pixelin1byte|CANON_CAP_DUPLEX, /*features */ CANON_MODES(canon_nomodes), #ifndef EXPERIMENTAL_STUFF - {-1,0,0,-1,-1,-1}, /*150x150 300x300 600x600 1200x600 1200x1200 2400x2400*/ + {-1,-1,0,-1,-1,-1}, /*150x150 300x300 600x600 1200x600 1200x1200 2400x2400*/ {1,1,1,1,1,1}, /*------- 300x300 600x600 1200x600 --------- ---------*/ CANON_INK(canon_ink_standard_pixma), #endif @@ -1675,14 +1690,16 @@ canon_printhead_colors(const char *name, const canon_cap_t * caps) if (!strcmp(name,"PhotoCMYK")) return COLOR_CCMMYYK; } - if (name && *name == 0) { - if (caps->inks & CANON_INK_CMYK) return COLOR_CMYK; - if (caps->inks & CANON_INK_CMY) return COLOR_CMY; - if (caps->inks & CANON_INK_K) return COLOR_MONOCHROME; - } - - stp_deprintf(STP_DBG_CANON,"canon: Unknown head combo '%s' - reverting to black\n",name); - return COLOR_MONOCHROME; + if (caps->inks & CANON_INK_CcMmYyK) + return COLOR_CCMMYYK; + else if (caps->inks & CANON_INK_CcMmYK) + return COLOR_CCMMYK; + else if (caps->inks & CANON_INK_CMYK) + return COLOR_CMYK; + else if (caps->inks & CANON_INK_CMY) + return COLOR_CMY; + else + return COLOR_MONOCHROME; } static unsigned char @@ -1889,6 +1906,8 @@ canon_describe_output(const stp_vars_t *v) case COLOR_CMY: return "CMY"; case COLOR_CMYK: + case COLOR_CCMMYK: + case COLOR_CCMMYYK: return "CMYK"; case COLOR_MONOCHROME: default: @@ -1938,11 +1957,24 @@ canon_parameters(const stp_vars_t *v, const char *name, for (i = 0; i < float_parameter_count; i++) if (strcmp(name, float_parameters[i].param.name) == 0) { + const char *print_mode = stp_get_string_parameter(v, "PrintingMode"); + const char *ink_type = stp_get_string_parameter(v, "InkType"); + colormode_t colormode = canon_printhead_colors(ink_type,caps); + int printhead= canon_printhead_type(ink_type,caps); + + if ((print_mode && strcmp(print_mode, "BW") == 0) || + printhead == 0 || caps->inks == CANON_INK_K) + colormode = COLOR_MONOCHROME; + stp_fill_parameter_settings(description, - &(float_parameters[i].param)); + &(float_parameters[i].param)); description->deflt.dbl = float_parameters[i].defval; description->bounds.dbl.upper = float_parameters[i].max; description->bounds.dbl.lower = float_parameters[i].min; + if (colormode != COLOR_MONOCHROME || !float_parameters[i].color_only) + description->is_active = 1; + else + description->is_active = 0; return; } @@ -2012,21 +2044,21 @@ canon_parameters(const stp_vars_t *v, const char *name, { description->bounds.str= stp_string_list_create(); /* used internally: do not translate */ - if ((caps->inks & CANON_INK_K)) + if ((caps->inks & CANON_INK_CcMmYyK)) stp_string_list_add_string(description->bounds.str, - "Gray", _("Black")); - if ((caps->inks & CANON_INK_CMY)) + "PhotoCMYK", _("Photo CcMmYK Color")); + if ((caps->inks & CANON_INK_CcMmYK)) stp_string_list_add_string(description->bounds.str, - "RGB", _("CMY Color")); + "PhotoCMY", _("Photo CcMmY Color")); if ((caps->inks & CANON_INK_CMYK)) stp_string_list_add_string(description->bounds.str, "CMYK", _("CMYK Color")); - if ((caps->inks & CANON_INK_CcMmYK)) + if ((caps->inks & CANON_INK_CMY)) stp_string_list_add_string(description->bounds.str, - "PhotoCMY", _("Photo CcMmY Color")); - if ((caps->inks & CANON_INK_CcMmYyK)) + "RGB", _("CMY Color")); + if ((caps->inks & CANON_INK_K)) stp_string_list_add_string(description->bounds.str, - "PhotoCMYK", _("Photo CcMmYK Color")); + "Gray", _("Black")); description->deflt.str = stp_string_list_param(description->bounds.str, 0)->name; } @@ -2069,8 +2101,9 @@ canon_parameters(const stp_vars_t *v, const char *name, else if (strcmp(name, "PrintingMode") == 0) { description->bounds.str = stp_string_list_create(); - stp_string_list_add_string - (description->bounds.str, "Color", _("Color")); + if (caps->inks != CANON_INK_K) + stp_string_list_add_string + (description->bounds.str, "Color", _("Color")); stp_string_list_add_string (description->bounds.str, "BW", _("Black and White")); description->deflt.str = @@ -3418,6 +3451,7 @@ static const stp_printfuncs_t print_canon_printfuncs = canon_parameters, stp_default_media_size, canon_imageable_area, + canon_imageable_area, canon_limit, canon_print, canon_describe_resolution, diff --git a/src/main/print-dither-matrices.c b/src/main/print-dither-matrices.c index b7fa06a..0d30cbb 100644 --- a/src/main/print-dither-matrices.c +++ b/src/main/print-dither-matrices.c @@ -1,5 +1,5 @@ /* - * "$Id: print-dither-matrices.c,v 1.35 2005/10/23 19:43:14 rlk Exp $" + * "$Id: print-dither-matrices.c,v 1.36 2006/03/19 00:19:09 rlk Exp $" * * Print plug-in driver utility functions for the GIMP. * @@ -597,7 +597,7 @@ xml_doc_get_dither_array(stp_mxml_node_t *doc) if (doc == NULL ) { - fprintf(stderr,"xml_doc_get_dither_array: XML file not parsed successfully.\n"); + stp_erprintf("xml_doc_get_dither_array: XML file not parsed successfully.\n"); return NULL; } @@ -605,14 +605,14 @@ xml_doc_get_dither_array(stp_mxml_node_t *doc) if (cur == NULL) { - fprintf(stderr,"xml_doc_get_dither_array: empty document\n"); + stp_erprintf("xml_doc_get_dither_array: empty document\n"); return NULL; } xmlseq = stp_xml_get_node(cur, "gutenprint", "dither-matrix", NULL); if (xmlseq == NULL ) { - fprintf(stderr,"xml-doc-get-dither-array: XML file is not a dither matrix.\n"); + stp_erprintf("xml-doc-get-dither-array: XML file is not a dither matrix.\n"); return NULL; } diff --git a/src/main/print-escp2-data.c b/src/main/print-escp2-data.c index 93b9994..e5c33d7 100644 --- a/src/main/print-escp2-data.c +++ b/src/main/print-escp2-data.c @@ -1,5 +1,5 @@ /* - * "$Id: print-escp2-data.c,v 1.190 2006/01/10 03:15:30 rlk Exp $" + * "$Id: print-escp2-data.c,v 1.199 2006/05/06 21:30:59 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -295,6 +295,14 @@ static const escp2_densities_t picturemate_densities = { 0, 0, 0, 0, 1.596, 0.798, 0.650, 0.530, 0.0 }; +#define DECLARE_INPUT_SLOT(name) \ +static const input_slot_list_t name##_input_slot_list = \ +{ \ + #name, \ + name##_input_slots, \ + sizeof(name##_input_slots) / sizeof(const input_slot_t), \ +} + static const input_slot_t standard_roll_feed_input_slots[] = { { @@ -317,11 +325,7 @@ static const input_slot_t standard_roll_feed_input_slots[] = } }; -static const input_slot_list_t standard_roll_feed_input_slot_list = -{ - standard_roll_feed_input_slots, - sizeof(standard_roll_feed_input_slots) / sizeof(const input_slot_t) -}; +DECLARE_INPUT_SLOT(standard_roll_feed); static const input_slot_t cutter_roll_feed_input_slots[] = { @@ -354,11 +358,7 @@ static const input_slot_t cutter_roll_feed_input_slots[] = } }; -static const input_slot_list_t cutter_roll_feed_input_slot_list = -{ - cutter_roll_feed_input_slots, - sizeof(cutter_roll_feed_input_slots) / sizeof(const input_slot_t) -}; +DECLARE_INPUT_SLOT(cutter_roll_feed); static const input_slot_t cd_cutter_roll_feed_input_slots[] = { @@ -409,11 +409,7 @@ static const input_slot_t cd_cutter_roll_feed_input_slots[] = } }; -static const input_slot_list_t cd_cutter_roll_feed_input_slot_list = -{ - cd_cutter_roll_feed_input_slots, - sizeof(cd_cutter_roll_feed_input_slots) / sizeof(const input_slot_t) -}; +DECLARE_INPUT_SLOT(cd_cutter_roll_feed); static const input_slot_t cd_roll_feed_input_slots[] = { @@ -455,12 +451,143 @@ static const input_slot_t cd_roll_feed_input_slots[] = } }; -static const input_slot_list_t cd_roll_feed_input_slot_list = +DECLARE_INPUT_SLOT(cd_roll_feed); + +static const input_slot_t r2400_input_slots[] = { - cd_roll_feed_input_slots, - sizeof(cd_roll_feed_input_slots) / sizeof(const input_slot_t) + { + "Standard", + N_("Standard"), + 0, + 0, + 0, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000PP\003\000\000\001\377" }, + { 6, "IR\002\000\000\000"} + }, + { + "Velvet", + N_("Manual Sheet Guide"), + 0, + 0, + 0, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000PP\003\000\000\003\000" }, + { 6, "IR\002\000\000\000"} + }, + { + "Matte", + N_("Manual Feed (Front)"), + 0, + 0, + 0, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000PP\003\000\000\002\000" }, + { 6, "IR\002\000\000\000"} + }, + { + "Roll", + N_("Roll Feed"), + 0, + 1, + ROLL_FEED_DONT_EJECT, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001PP\003\000\000\003\001" }, + { 6, "IR\002\000\000\002" } + } +}; + +DECLARE_INPUT_SLOT(r2400); + +static const input_slot_t r1800_input_slots[] = +{ + { + "Standard", + N_("Standard"), + 0, + 0, + 0, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000PP\003\000\000\001\377" }, + { 6, "IR\002\000\000\000"} + }, + { + "Velvet", + N_("Manual Sheet Guide"), + 0, + 0, + 0, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000PP\003\000\000\003\000" }, + { 6, "IR\002\000\000\000"} + }, + { + "Matte", + N_("Manual Feed (Front)"), + 0, + 0, + 0, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000PP\003\000\000\002\000" }, + { 6, "IR\002\000\000\000"} + }, + { + "Roll", + N_("Roll Feed"), + 0, + 1, + ROLL_FEED_DONT_EJECT, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001PP\003\000\000\003\001" }, + { 6, "IR\002\000\000\002" } + }, + { + "CD", + N_("Print to CD"), + 1, + 0, + 0, + { 36, "PM\002\000\000\000IR\002\000\000\001EX\006\000\000\000\000\000\005\000FP\003\000\000\000\000PP\003\000\000\002\001" }, + { 6, "IR\002\000\000\000"} + }, +}; + +DECLARE_INPUT_SLOT(r1800); + +static const input_slot_t rx700_input_slots[] = +{ + { + "Rear", + N_("Rear Tray"), + 0, + 0, + 0, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000PP\003\000\000\001\000" }, + { 6, "IR\002\000\000\000"} + }, + { + "Front", + N_("Front Tray"), + 0, + 0, + 0, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000PP\003\000\000\001\001" }, + { 6, "IR\002\000\000\000"} + }, + { + "CD", + N_("Print to CD"), + 1, + 0, + 0, + { 36, "PM\002\000\000\000IR\002\000\000\001EX\006\000\000\000\000\000\005\000FP\003\000\000\000\000PP\003\000\000\002\001" }, + { 6, "IR\002\000\000\000"} + }, + { + "PhotoBoard", + N_("Photo Board"), + 0, + 0, + 0, + { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000PP\003\000\000\002\000" }, + { 6, "IR\002\000\000\000"} + }, }; +DECLARE_INPUT_SLOT(rx700); + static const input_slot_t pro_roll_feed_input_slots[] = { { @@ -483,11 +610,7 @@ static const input_slot_t pro_roll_feed_input_slots[] = } }; -static const input_slot_list_t pro_roll_feed_input_slot_list = -{ - pro_roll_feed_input_slots, - sizeof(pro_roll_feed_input_slots) / sizeof(const input_slot_t) -}; +DECLARE_INPUT_SLOT(pro_roll_feed); static const input_slot_t spro5000_input_slots[] = { @@ -529,14 +652,11 @@ static const input_slot_t spro5000_input_slots[] = } }; -static const input_slot_list_t spro5000_input_slot_list = -{ - spro5000_input_slots, - sizeof(spro5000_input_slots) / sizeof(const input_slot_t) -}; +DECLARE_INPUT_SLOT(spro5000); static const input_slot_list_t default_input_slot_list = { + "Standard", NULL, 0, }; @@ -583,9 +703,9 @@ static const quality_t p1_5_qualities[] = { "Draft", N_("Draft"), 360, 360, 360, 360, 360, 360 }, { "Standard", N_("Standard"), 0, 0, 0, 0, 720, 360 }, { "High", N_("High"), 0, 0, 0, 0, 720, 720 }, - { "Photo", N_("Photo"), 1440, 1440, 1440, 1440, 1440, 1440 }, - { "HighPhoto", N_("Super Photo"), 2880, 1440, 2880, 1440, 2880, 1440 }, - { "UltraPhoto", N_("Ultra Photo"), 2880, 2880, 2880, 2880, 2880, 2880 }, + { "Photo", N_("Photo"), 1440, 720, 1440, 720, 1440, 720 }, + { "HighPhoto", N_("Super Photo"), 1440, 1440, 1440, 1440, 1440, 1440 }, + { "UltraPhoto", N_("Ultra Photo"), 1440, 2880, 1440, 2880, 1440, 2880 }, { "Best", N_("Best"), 720, 360, 0, 0, -1, -1 }, }; @@ -755,7 +875,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 15, 1, 4, 15, 1, 4, 15, 1, 4, 4, - 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -772,7 +892,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -789,7 +909,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17), INCH(44), INCH(2), INCH(2), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -806,7 +926,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 32, 1, 4, 32, 1, 4, 32, 1, 4, 4, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 8, 9, 0, 30, 8, 9, 0, 30, 8, 9, 0, 0, 8, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -823,7 +943,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 64, 1, 2, 64, 1, 2, 64, 1, 2, 4, - 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 4, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 4, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 8, 9, 9, 40, 8, 9, 9, 40, 8, 9, 0, 0, 8, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -840,7 +960,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 64, 1, 2, 64, 1, 2, 64, 1, 2, 4, - 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 4, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 4, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -857,7 +977,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 64, 1, 2, 64, 1, 2, 64, 1, 2, 4, - 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 4, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 4, 0, 0, 0, 0, 1, INCH(17), INCH(44), INCH(2), INCH(2), 8, 9, 9, 40, 8, 9, 9, 40, 8, 9, 0, 0, 8, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -876,10 +996,10 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 32, 1, 4, 32, 1, 4, 32, 1, 4, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 0, 30, 9, 9, 0, 30, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, - 1, 7, 0, 0, + 1, 15, 0, 0, /* Is it really 15 pairs??? */ sp700_dotsizes, sp700_densities, &stpi_escp2_simple_drops, stpi_escp2_g3_reslist, &stpi_escp2_photo_gen1_inkgroup, standard_bits, g3_base_res, &default_input_slot_list, @@ -893,7 +1013,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_NO | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 32, 1, 4, 32, 1, 4, 32, 1, 4, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, 1, INCH(118 / 10), INCH(44), INCH(2), INCH(2), 9, 9, 0, 30, 9, 9, 0, 30, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -910,7 +1030,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 32, 1, 4, 32, 1, 4, 32, 1, 4, 6, - 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, + 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 0, 30, 9, 9, 0, 30, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -929,7 +1049,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 21, 1, 4, 21, 1, 4, 21, 1, 4, 4, - 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, + 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 15, 0, 0, @@ -946,7 +1066,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 32, 1, 4, 32, 1, 4, 32, 1, 4, 4, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 15, 0, 0, @@ -963,7 +1083,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 48, 1, 3, 144, 1, 1, 144, 1, 1, 4, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -980,7 +1100,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 96, 1, 2, 192, 1, 1, 192, 1, 1, 4, - 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -997,7 +1117,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 48, 1, 3, 48, 1, 3, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1014,7 +1134,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 48, 1, 3, 48, 1, 3, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(13), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1031,7 +1151,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 144, 1, 1, 144, 1, 1, 4, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1048,7 +1168,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 144, 1, 1, 144, 1, 1, 4, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(13), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1065,7 +1185,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 32, 1, 4, 32, 1, 4, 32, 1, 4, 4, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 8, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 9, 9, 9, 9, 9, 26, 9, 9, 9, 0, 9, 9, 9, 0, -1, -1, 0, 0, 1, 15, 0, 0, @@ -1082,7 +1202,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 144, 1, 1, 144, 1, 1, 4, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1099,7 +1219,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 32, 1, 4, 32, 1, 4, 32, 1, 4, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1116,7 +1236,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_YES | MODEL_PACKET_MODE_YES), 15, 15, 3, 48, 48, 3, 48, 48, 3, 4, - 360, 14400, 360, 720, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, + 360, 14400, 360, 720, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1133,7 +1253,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 48, 1, 3, 48, 1, 3, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 97, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 97, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1150,7 +1270,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 48, 1, 3, 48, 1, 3, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 97, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 97, 0, 0, 0, 1, INCH(13), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1167,7 +1287,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 64, 1, 2, 64, 1, 2, 64, 1, 2, 4, - 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 4, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 4, 0, 0, 0, 0, 1, INCH(17), INCH(44), INCH(2), INCH(2), 8, 9, 9, 40, 8, 9, 9, 40, 8, 9, 0, 0, 8, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -1184,7 +1304,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 32, 1, 4, 64, 1, 2, 64, 1, 2, 4, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1201,7 +1321,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 144, 1, 1, 144, 1, 1, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(13), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 2, 15, 0, 0, @@ -1218,7 +1338,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 64, 1, 2, 64, 1, 2, 64, 1, 2, 6, - 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 0, 0, 0, 0, 4, + 360, 14400, -1, 1440, 720, 180, 180, 0, 1, 0, 0, 0, 0, 4, 1, INCH(13), INCH(44), INCH(2), INCH(2), 9, 9, 0, 30, 9, 9, 0, 30, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -1235,7 +1355,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(24), INCH(1200), INCH(7), INCH(7), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, 0, 0, 1, 7, 0, 0, @@ -1252,7 +1372,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(24), INCH(1200), INCH(7), INCH(7), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, 0, 0, 1, 7, 0, 0, @@ -1269,7 +1389,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(44), INCH(1200), INCH(7), INCH(7), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, 0, 0, 1, 7, 0, 0, @@ -1286,7 +1406,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(44), INCH(1200), INCH(7), INCH(7), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, 0, 0, 1, 7, 0, 0, @@ -1303,7 +1423,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 144, 1, 1, 144, 1, 1, 4, - 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1320,7 +1440,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 144, 1, 1, 144, 1, 1, 4, - 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1337,7 +1457,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 96, 1, 2, 192, 1, 1, 192, 1, 1, 4, - 360, 14400, -1, 2880, 720, 180, 180, 38, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 2880, 720, 180, 180, 38, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1354,7 +1474,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 48, 1, 3, 48, 1, 3, 6, - 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 55, 0, 0, 0, + 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 55, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1371,7 +1491,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 48, 1, 3, 48, 1, 3, 6, - 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 55, 0, 0, 0, + 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 55, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1388,7 +1508,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 48, 1, 3, 48, 1, 3, 6, - 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 55, 0, 0, 0, + 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 55, 0, 0, 0, 1, INCH(13), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1405,7 +1525,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_YES | MODEL_PACKET_MODE_YES), 15, 15, 3, 48, 48, 3, 48, 48, 3, 4, - 360, 14400, 360, 1440, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, + 360, 14400, 360, 1440, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1422,7 +1542,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 16, 1, 4, 16, 1, 4, 16, 1, 4, 4, - 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(13), INCH(1200), INCH(2), INCH(2), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -1439,7 +1559,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(13), INCH(1200), INCH(2), INCH(2), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -1456,7 +1576,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(44), INCH(1200), INCH(7), INCH(7), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 9, 9, 9, 9, 9, 9, -1, -1, 0, 0, 1, 7, 0, 0, @@ -1473,7 +1593,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_YES | MODEL_PACKET_MODE_YES), 15, 15, 3, 48, 48, 3, 48, 48, 3, 4, - 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, + 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1490,7 +1610,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_YES | MODEL_PACKET_MODE_YES), 15, 15, 3, 48, 48, 3, 48, 48, 3, 4, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1507,7 +1627,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 60, 60, 2, 180, 180, 2, 180, 180, 2, 4, - 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 0, -240, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 0, -240, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 4, 15, 0, 0, @@ -1524,7 +1644,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_NO), 16, 1, 4, 16, 1, 4, 16, 1, 4, 4, - 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 720, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(44), INCH(2), INCH(2), 9, 9, 9, 40, 9, 9, 9, 40, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 1, 7, 0, 0, @@ -1541,7 +1661,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 96, 96, 2, 96, 96, 2, 24, 24, 1, 6, - 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 190, 0, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 190, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, 4, 15, 0, 0, @@ -1558,7 +1678,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 96, 96, 2, 96, 96, 2, 192, 192, 1, 7, - 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 190, 0, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 190, 0, 0, 0, 1, INCH(13), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, 4, 15, 0, 0, @@ -1575,7 +1695,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, - 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 0, 0, 0, 0, 1, INCH(24), INCH(1200), INCH(7), INCH(7), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1592,7 +1712,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, - 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 0, 0, 0, 0, 1, INCH(44), INCH(1200), INCH(7), INCH(7), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1609,7 +1729,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 48, 1, 3, 48, 1, 3, 6, - 360, 14400, -1, 2880, 1440, 90, 90, 0, 1, 0, 55, 0, 0, 0, + 360, 14400, -1, 2880, 1440, 90, 90, 0, 1, 0, 55, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1626,7 +1746,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 48, 1, 3, 48, 1, 3, 6, - 360, 14400, -1, 2880, 1440, 90, 90, 0, 1, 0, 55, 0, 0, 0, + 360, 14400, -1, 2880, 1440, 90, 90, 0, 1, 0, 55, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1643,7 +1763,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 144, 1, 1, 144, 1, 1, 4, - 360, 14400, -1, 2880, 1440, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 2880, 1440, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1660,7 +1780,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 96, 96, 2, 96, 96, 2, 24, 24, 1, 6, - 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 190, 0, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 190, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, 4, 15, 0, 0, @@ -1677,7 +1797,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 32, 1, 4, 32, 1, 4, 32, 1, 4, 6, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, 0, 0, 0, 1, INCH(13), INCH(44), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1694,7 +1814,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 59, 60, 2, 180, 180, 2, 180, 180, 2, 4, - 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 0, -240, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 0, -240, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 4, 15, 0, 0, @@ -1711,7 +1831,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 15, 15, 3, 48, 48, 3, 48, 48, 3, 4, - 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, + 360, 14400, -1, 1440, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1727,8 +1847,8 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES | MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), - 180, 180, 2, 360, 360, 1, 360, 360, 1, 6, - 360, 14400, -1, 2880, 2880, 720, 360, 0, 1, 0, 190, 0, 0, 0, + 180, 180, 2, 360, 360, 1, 360, 360, 1, 7, + 360, 14400, -1, 2880, 2880, 720, 360, 0, 1, 0, 190, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 4, 15, 0, 0, @@ -1745,7 +1865,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 90, 90, 2, 90, 90, 2, 90, 90, 2, 6, - 360, 14400, -1, 2880, 2880, 720, 360, 0, 1, 0, 190, 0, 0, 0, + 360, 14400, -1, 2880, 2880, 720, 360, 0, 1, 0, 190, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 4, 15, 0, 0, @@ -1762,7 +1882,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_YES | MODEL_PACKET_MODE_YES), 15, 15, 3, 48, 48, 3, 48, 48, 3, 4, - 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, + 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 0, -99, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 3, 15, 0, 0, @@ -1779,7 +1899,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 59, 60, 2, 180, 180, 2, 180, 180, 2, 4, - 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 0, -240, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 180, 0, 1, 0, 0, -240, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 4, 15, 0, 0, @@ -1796,7 +1916,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 29, 30, 3, 90, 90, 3, 90, 90, 3, 4, - 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 0, -180, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 0, -180, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 4, 15, 0, 0, @@ -1813,7 +1933,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 48, 1, 3, 48, 1, 3, 48, 1, 3, 6, - 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 55, 0, 0, 0, + 360, 14400, -1, 2880, 720, 90, 90, 0, 1, 0, 55, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 399, 394, 595, 842, 3, 15, 0, 0, @@ -1830,7 +1950,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 90, 1, 3, 90, 1, 3, 90, 1, 3, 6, - 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 190, 0, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 190, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 4, 15, 0, 0, @@ -1847,12 +1967,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 180, 1, 2, 180, 1, 2, 180, 1, 2, 8, - 360, 28800, -1, 5760, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, + 360, 28800, -1, 1440, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, 8, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 4, 15, 0, 0, p1_5pl_dotsizes, p1_5pl_densities, &stpi_escp2_variable_1_5pl_drops, - stpi_escp2_superfine_reslist, &stpi_escp2_cmykrb_inkgroup, + stpi_escp2_r2400_reslist, &stpi_escp2_cmykrb_inkgroup, variable_bits, c1_5_base_res, &cd_roll_feed_input_slot_list, &p1_5_quality_list, &new_init_sequence, &je_deinit_sequence, NULL, &r800_channel_name_list @@ -1863,13 +1983,13 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO | MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), - 90, 1, 3, 90, 1, 3, 90, 1, 3, 6, - 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 190, 0, 0, 0, + 90, 1, 3, 90, 1, 3, 90, 1, 3, 4, + 360, 14400, -1, 1440, 1440, 360, 120, 0, 1, 0, 190, 0, 0, 0, 8, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 4, 15, 0, 0, p3pl_dotsizes, p3pl_densities, &stpi_escp2_variable_3pl_pmg_drops, - stpi_escp2_superfine_reslist, &stpi_escp2_cx3650_inkgroup, + stpi_escp2_cx3650_reslist, &stpi_escp2_cx3650_inkgroup, variable_bits, variable_base_res, &default_input_slot_list, &standard_quality_list, &new_init_sequence, &je_deinit_sequence, NULL, &mfp2005_channel_name_list @@ -1881,7 +2001,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 29, 30, 3, 90, 90, 3, 90, 90, 3, 4, - 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 0, -180, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 0, -180, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 4, 15, 0, 0, @@ -1898,13 +2018,13 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 180, 1, 2, 180, 1, 2, 180, 1, 2, 8, - 360, 28800, -1, 5760, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, + 360, 28800, -1, 1440, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, 8, INCH(13), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 4, 15, 0, 0, p1_5pl_dotsizes, p1_5pl_densities, &stpi_escp2_variable_1_5pl_drops, - stpi_escp2_superfine_reslist, &stpi_escp2_cmykrb_inkgroup, - variable_bits, c1_5_base_res, &cd_roll_feed_input_slot_list, + stpi_escp2_r2400_reslist, &stpi_escp2_cmykrb_inkgroup, + variable_bits, c1_5_base_res, &r1800_input_slot_list, &p1_5_quality_list, &new_init_sequence, &je_deinit_sequence, NULL, &r800_channel_name_list }, @@ -1915,12 +2035,12 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 180, 1, 2, 180, 1, 2, 180, 1, 2, 8, - 360, 14400, -1, 2880, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, + 360, 14400, -1, 1440, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, 8, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 4, 15, 0, 0, p1_5pl_dotsizes, p1_5pl_densities, &stpi_escp2_variable_1_5pl_drops, - stpi_escp2_superfine_reslist, &stpi_escp2_photo_gen3_inkgroup, + stpi_escp2_r2400_reslist, &stpi_escp2_photo_gen3_inkgroup, variable_bits, c1_5_base_res, &cd_roll_feed_input_slot_list, &standard_quality_list, &new_init_sequence, &je_deinit_sequence, NULL, &r800_channel_name_list @@ -1932,7 +2052,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 59, 60, 2, 180, 180, 2, 180, 180, 2, 4, - 360, 14400, -1, 2880, 2880, 360, 180, 0, 1, 0, 0, -240, 0, 0, + 360, 14400, -1, 2880, 2880, 360, 180, 0, 1, 0, 0, -240, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 4, 15, 0, 0, @@ -1949,13 +2069,13 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 180, 1, 2, 180, 1, 2, 180, 1, 2, 6, - 360, 28800, -1, 5760, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, + 360, 28800, -1, 5760, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 263, 595, 842, 4, 15, 0, 0, p1_5pl_dotsizes, p1_5pl_densities, &stpi_escp2_variable_1_5pl_drops, stpi_escp2_superfine_reslist, &stpi_escp2_photo_gen3_inkgroup, - variable_bits, c1_5_base_res, &cd_roll_feed_input_slot_list, + variable_bits, c1_5_base_res, &rx700_input_slot_list, &p1_5_quality_list, &new_init_sequence, &je_deinit_sequence, NULL, &rx700_channel_name_list }, @@ -1966,13 +2086,13 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 180, 1, 2, 180, 1, 2, 180, 1, 2, 8, - 360, 14400, -1, 2880, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, + 360, 14400, -1, 1440, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, 8, INCH(13), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 4, 15, 0, 0, p3_5pl_dotsizes, p3_5pl_densities, &stpi_escp2_variable_r2400_drops, - stpi_escp2_superfine_reslist, &stpi_escp2_f360_ultrachrome_k3_inkgroup, - variable_bits, c1_5_base_res, &cd_roll_feed_input_slot_list, + stpi_escp2_r2400_reslist, &stpi_escp2_f360_ultrachrome_k3_inkgroup, + variable_bits, c1_5_base_res, &r2400_input_slot_list, &standard_quality_list, &new_init_sequence, &je_deinit_sequence, NULL, &r2400_channel_name_list }, @@ -1983,7 +2103,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 29, 30, 3, 90, 90, 3, 90, 90, 3, 4, - 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 0, -180, 0, 0, + 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 0, -180, 0, 0, 1, INCH(17 / 2), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 4, 15, 0, 0, @@ -2000,7 +2120,7 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | MODEL_PACKET_MODE_YES), 90, 1, 3, 90, 1, 3, 90, 1, 3, 6, - 360, 28800, -1, 5760, 1440, 1440, 720, 0, 1, 0, 0, 0, 0, 0, + 360, 28800, -1, 5760, 1440, 1440, 720, 0, 1, 0, 0, 0, 0, 0, 1, INCH(4), INCH(1200), INCH(2), INCH(2), 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 4, 15, 0, 0, @@ -2010,6 +2130,74 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] = &picturemate_quality_list, &new_init_sequence, &je_deinit_sequence, NULL, &picturemate_channel_name_list }, + /* 74: PM-A650 */ + { + (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES | + MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO | + MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | + MODEL_PACKET_MODE_YES), + 90, 90, 3, 90, 90, 3, 90, 90, 3, 4, + 360, 14400, -1, 5760, 1440, 360, 120, 0, 1, 0, 190, 0, 0, 0, 1, + INCH(17 / 2), INCH(1200), INCH(2), INCH(2), + 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, + 4, 15, 0, 0, + c3pl_pigment_dotsizes, c3pl_pigment_c66_densities, &stpi_escp2_variable_3pl_pigment_c66_drops, + stpi_escp2_superfine_reslist, &stpi_escp2_c64_inkgroup, + variable_bits, variable_base_res, &cd_roll_feed_input_slot_list, + &standard_quality_list, &new_init_sequence, &je_deinit_sequence, + NULL, &standard_channel_name_list + }, + /* 75: Japanese PM-A750 */ + { + (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO | + MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES | + MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | + MODEL_PACKET_MODE_YES), + 90, 90, 3, 90, 90, 3, 90, 90, 3, 4, + 360, 14400, -1, 5760, 1440, 360, 120, 0, 1, 0, 190, 0, 0, 0, 1, + INCH(17 / 2), INCH(1200), INCH(2), INCH(2), + 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, + 4, 15, 0, 0, + c2pl_dotsizes, c2pl_densities, &stpi_escp2_variable_2pl_drops, + stpi_escp2_superfine_reslist, &stpi_escp2_c64_inkgroup, + variable_bits, variable_base_res, &cd_roll_feed_input_slot_list, + &standard_quality_list, &new_init_sequence, &je_deinit_sequence, + NULL, &standard_channel_name_list + }, + /* 76: Japanese PM-A890 */ + { + (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO | + MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES | + MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | + MODEL_PACKET_MODE_YES), + 90, 90, 3, 90, 90, 3, 90, 90, 3, 6, + 360, 14400, -1, 5760, 1440, 360, 120, 0, 1, 0, 190, 0, 0, 0, 1, + INCH(17 / 2), INCH(1200), INCH(2), INCH(2), + 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, + 4, 15, 0, 0, + c2pl_dotsizes, c2pl_densities, &stpi_escp2_variable_2pl_drops, + stpi_escp2_superfine_reslist, &stpi_escp2_photo_gen3_inkgroup, + variable_bits, variable_base_res, &cd_roll_feed_input_slot_list, + &standard_quality_list, &new_init_sequence, &je_deinit_sequence, + NULL, &standard_channel_name_list + }, + /* 77: Japanese PM-D600 */ + { + (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES | + MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO | + MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO | + MODEL_PACKET_MODE_YES), + 90, 1, 3, 90, 1, 3, 90, 1, 3, 4, + 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 190, 0, 0, 0, 1, + INCH(17 / 2), INCH(1200), INCH(2), INCH(2), + 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, + 4, 15, 0, 0, + p3pl_dotsizes, p3pl_densities, &stpi_escp2_variable_3pl_pmg_drops, + stpi_escp2_superfine_reslist, &stpi_escp2_c64_inkgroup, + variable_bits, variable_base_res, &cd_roll_feed_input_slot_list, + &standard_quality_list, &new_init_sequence, &je_deinit_sequence, + NULL, &photo_channel_name_list + }, }; const int stpi_escp2_model_limit = diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c index 0711874..42b7c62 100644 --- a/src/main/print-escp2.c +++ b/src/main/print-escp2.c @@ -1,5 +1,5 @@ /* - * "$Id: print-escp2.c,v 1.347 2006/01/09 12:20:44 rlk Exp $" + * "$Id: print-escp2.c,v 1.350 2006/04/30 21:29:53 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -385,6 +385,7 @@ static const stp_parameter_t the_parameters[] = PARAMETER_INT(max_black_resolution), PARAMETER_INT(zero_margin_offset), PARAMETER_INT(extra_720dpi_separation), + PARAMETER_INT(horizontal_position_alignment), PARAMETER_INT(physical_channels), PARAMETER_INT(left_margin), PARAMETER_INT(right_margin), @@ -665,6 +666,7 @@ DEF_SIMPLE_ACCESSOR(black_initial_vertical_offset, int) DEF_SIMPLE_ACCESSOR(max_black_resolution, int) DEF_SIMPLE_ACCESSOR(zero_margin_offset, int) DEF_SIMPLE_ACCESSOR(extra_720dpi_separation, int) +DEF_SIMPLE_ACCESSOR(horizontal_position_alignment, unsigned) DEF_SIMPLE_ACCESSOR(physical_channels, int) DEF_SIMPLE_ACCESSOR(alignment_passes, int) DEF_SIMPLE_ACCESSOR(alignment_choices, int) @@ -1872,6 +1874,7 @@ imax(int a, int b) static void internal_imageable_area(const stp_vars_t *v, int use_paper_margins, + int use_maximum_area, int *left, int *right, int *bottom, int *top) { int width, height; /* Size of page */ @@ -1885,7 +1888,7 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins, const stp_papersize_t *pt = NULL; const input_slot_t *input_slot = NULL; - if (media_size && use_paper_margins) + if (media_size) pt = stp_get_papersize_by_name(media_size); input_slot = get_input_slot(v); @@ -1898,14 +1901,24 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins, stp_default_media_size(v, &width, &height); if (cd) { - left_margin = 0; - right_margin = 0; - bottom_margin = 0; - top_margin = 0; + if (pt) + { + left_margin = pt->left; + right_margin = pt->right; + bottom_margin = pt->bottom; + top_margin = pt->top; + } + else + { + left_margin = 0; + right_margin = 0; + bottom_margin = 0; + top_margin = 0; + } } else { - if (pt) + if (pt && use_paper_margins) { left_margin = pt->left; right_margin = pt->right; @@ -1922,14 +1935,21 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins, *right = width - right_margin; *top = top_margin; *bottom = height - bottom_margin; - if (!cd && - escp2_has_cap(v, MODEL_XZEROMARGIN, MODEL_XZEROMARGIN_YES) && - stp_get_boolean_parameter(v, "FullBleed")) + if (escp2_has_cap(v, MODEL_XZEROMARGIN, MODEL_XZEROMARGIN_YES) && + (use_maximum_area || + (!cd && stp_get_boolean_parameter(v, "FullBleed")))) { - *left -= 80 / (360 / 72); /* 80 per the Epson manual */ - *right += 80 / (360 / 72); /* 80 per the Epson manual */ - *bottom += escp2_nozzles(v) * escp2_nozzle_separation(v) * 72 / - escp2_base_separation(v); + if (pt) + { + if (pt->left <= 0 && pt->right <= 0 && pt->top <= 0 && + pt->bottom <= 0) + { + *left -= 80 / (360 / 72); /* 80 per the Epson manual */ + *right += 80 / (360 / 72); /* 80 per the Epson manual */ + *bottom += escp2_nozzles(v) * escp2_nozzle_separation(v) * 72 / + escp2_base_separation(v); + } + } } } @@ -1944,7 +1964,17 @@ escp2_imageable_area(const stp_vars_t *v, /* I */ int *bottom, /* O - Bottom position in points */ int *top) /* O - Top position in points */ { - internal_imageable_area(v, 1, left, right, bottom, top); + internal_imageable_area(v, 1, 0, left, right, bottom, top); +} + +static void +escp2_maximum_imageable_area(const stp_vars_t *v, /* I */ + int *left, /* O - Left position in points */ + int *right, /* O - Right position in points */ + int *bottom, /* O - Bottom position in points */ + int *top) /* O - Top position in points */ +{ + internal_imageable_area(v, 1, 1, left, right, bottom, top); } static void @@ -2281,12 +2311,15 @@ setup_inks(stp_vars_t *v) { stp_erprintf("Not enough shades!\n"); } - if (strcmp(param, "BlackDensity") == 0) - stp_channel_set_black_channel(v, i); - else if (strcmp(param, "GlossDensity") == 0) + if (ink_type->inkset != INKSET_EXTENDED) { - gloss_scale *= get_double_param(v, param); - gloss_channel = i; + if (strcmp(param, "BlackDensity") == 0) + stp_channel_set_black_channel(v, i); + else if (strcmp(param, "GlossDensity") == 0) + { + gloss_scale *= get_double_param(v, param); + gloss_channel = i; + } } stp_dither_set_inks(v, i, 1.0, ink_darknesses[i % 8], channel->n_subchannels, shades->shades, @@ -2302,37 +2335,40 @@ setup_inks(stp_vars_t *v) stp_channel_set_cutoff_adjustment(v, i, j, paper->subchannel_cutoff); } - if (channel->hue_curve && channel->hue_curve->curve_name) + if (ink_type->inkset != INKSET_EXTENDED) { - char *hue_curve_name; - const stp_curve_t *curve = NULL; - stp_asprintf(&hue_curve_name, "%sHueCurve", - channel->hue_curve->curve_name); - curve = stp_get_curve_parameter(v, hue_curve_name); - if (curve) + if (channel->hue_curve && channel->hue_curve->curve_name) { - stp_channel_set_curve(v, i, curve); - hue_curve_found = 1; + char *hue_curve_name; + const stp_curve_t *curve = NULL; + stp_asprintf(&hue_curve_name, "%sHueCurve", + channel->hue_curve->curve_name); + curve = stp_get_curve_parameter(v, hue_curve_name); + if (curve) + { + stp_channel_set_curve(v, i, curve); + hue_curve_found = 1; + } + stp_free(hue_curve_name); } - stp_free(hue_curve_name); - } - if (channel->hue_curve && !hue_curve_found) - { - if (!channel->hue_curve->curve_impl) - channel->hue_curve->curve_impl = - stp_curve_create_from_string(channel->hue_curve->curve); - if (channel->hue_curve->curve_impl) + if (channel->hue_curve && !hue_curve_found) { - stp_curve_t *curve_tmp = - stp_curve_create_copy(channel->hue_curve->curve_impl); + if (!channel->hue_curve->curve_impl) + channel->hue_curve->curve_impl = + stp_curve_create_from_string(channel->hue_curve->curve); + if (channel->hue_curve->curve_impl) + { + stp_curve_t *curve_tmp = + stp_curve_create_copy(channel->hue_curve->curve_impl); #if 0 - (void) stp_curve_rescale(curve_tmp, - sqrt(1.0 / stp_get_float_parameter(v, "Gamma")), - STP_CURVE_COMPOSE_EXPONENTIATE, - STP_CURVE_BOUNDS_RESCALE); + (void) stp_curve_rescale(curve_tmp, + sqrt(1.0 / stp_get_float_parameter(v, "Gamma")), + STP_CURVE_COMPOSE_EXPONENTIATE, + STP_CURVE_BOUNDS_RESCALE); #endif - stp_channel_set_curve(v, i, curve_tmp); - stp_curve_destroy(curve_tmp); + stp_channel_set_curve(v, i, curve_tmp); + stp_curve_destroy(curve_tmp); + } } } } @@ -2581,7 +2617,7 @@ setup_resolution(stp_vars_t *v) if (escp2_use_extended_commands(v, pd->res->softweave)) { - pd->unit_scale = escp2_max_hres(v); + pd->unit_scale = MAX(escp2_max_hres(v), escp2_max_vres(v)); pd->horizontal_units = horizontal; pd->micro_units = horizontal; } @@ -2594,6 +2630,7 @@ setup_resolution(stp_vars_t *v) pd->micro_units = horizontal; pd->horizontal_units = vertical; } + /* Note hard-coded 1440 -- from Epson manuals */ if (escp2_has_cap(v, MODEL_COMMAND, MODEL_COMMAND_1999) && escp2_has_cap(v, MODEL_VARIABLE_DOT, MODEL_VARIABLE_NO)) pd->micro_units = 1440; @@ -2739,8 +2776,11 @@ setup_page(stp_vars_t *v) safe and print 16 mm */ stp_default_media_size(v, &n, &(pd->page_true_height)); - internal_imageable_area(v, 0, &pd->page_left, &pd->page_right, + internal_imageable_area(v, 0, 0, &pd->page_left, &pd->page_right, &pd->page_bottom, &pd->page_top); + /* Don't use full bleed mode if the paper itself has a margin */ + if (pd->page_left > 0 || pd->page_top > 0) + stp_set_boolean_parameter(v, "FullBleed", 0); if (input_slot && input_slot->is_cd && escp2_cd_x_offset(v) > 0) { @@ -2748,6 +2788,13 @@ setup_page(stp_vars_t *v) stp_get_dimension_parameter(v, "CDXAdjustment"); int top_center = escp2_cd_y_offset(v) + stp_get_dimension_parameter(v, "CDYAdjustment"); + pd->page_true_height = pd->page_bottom - pd->page_top; + stp_set_left(v, stp_get_left(v) - pd->page_left); + stp_set_top(v, stp_get_top(v) - pd->page_top); + pd->page_right -= pd->page_left; + pd->page_bottom -= pd->page_top; + pd->page_top = 0; + pd->page_left = 0; extra_top = top_center - (pd->page_bottom / 2); extra_left = left_center - (pd->page_right / 2); pd->cd_inner_radius = hub_size * pd->micro_units * 10 / 254 / 2; @@ -2771,6 +2818,14 @@ setup_page(stp_vars_t *v) pd->image_scaled_width = pd->image_width * pd->res->hres / 72; pd->image_printed_width = pd->image_width * pd->res->printed_hres / 72; pd->image_left_position = pd->image_left * pd->micro_units / 72; + /* + * Many printers print extremely slowly if the starting position + * is not a multiple of 8 + */ + if (escp2_horizontal_position_alignment(v) > 1) + pd->image_left_position = + (pd->image_left_position / escp2_horizontal_position_alignment(v)) * + escp2_horizontal_position_alignment(v); pd->page_bottom += extra_top + 1; @@ -3012,7 +3067,8 @@ escp2_do_print(stp_vars_t *v, stp_image_t *image, int print_op) stp_allocate_component_data(v, "Driver", NULL, NULL, pd); pd->inkname = get_inktype(v); - if (stp_check_boolean_parameter(v, "UseGloss", STP_PARAMETER_ACTIVE) && + if (pd->inkname->inkset != INKSET_EXTENDED && + stp_check_boolean_parameter(v, "UseGloss", STP_PARAMETER_ACTIVE) && stp_get_boolean_parameter(v, "UseGloss")) pd->use_aux_channels = 1; else @@ -3081,6 +3137,7 @@ static const stp_printfuncs_t print_escp2_printfuncs = escp2_parameters, stp_default_media_size, escp2_imageable_area, + escp2_maximum_imageable_area, escp2_limit, escp2_print, escp2_describe_resolution, diff --git a/src/main/print-escp2.h b/src/main/print-escp2.h index e49f7e6..9ad648f 100644 --- a/src/main/print-escp2.h +++ b/src/main/print-escp2.h @@ -1,5 +1,5 @@ /* - * "$Id: print-escp2.h,v 1.100 2006/01/10 03:15:30 rlk Exp $" + * "$Id: print-escp2.h,v 1.103 2006/05/06 21:30:59 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -317,6 +317,7 @@ typedef struct typedef struct { + const char *name; const input_slot_t *slots; size_t n_input_slots; } input_slot_list_t; @@ -454,6 +455,8 @@ typedef struct escp2_printer short initial_vertical_offset; short black_initial_vertical_offset; short extra_720dpi_separation; + short horizontal_position_alignment; /* Horizontal alignment */ + /* for good performance */ /*****************************************************************************/ /* Paper size limits */ int max_paper_width; /* Maximum paper width, in points */ @@ -559,6 +562,8 @@ extern const paper_adjustment_list_t stpi_escp2_r800_matte_paper_adjustment_list extern const paper_adjustment_list_t stpi_escp2_picturemate_paper_adjustment_list; extern const res_t *const stpi_escp2_superfine_reslist[]; +extern const res_t *const stpi_escp2_r2400_reslist[]; +extern const res_t *const stpi_escp2_cx3650_reslist[]; extern const res_t *const stpi_escp2_no_printer_weave_reslist[]; extern const res_t *const stpi_escp2_pro_reslist[]; extern const res_t *const stpi_escp2_sp5000_reslist[]; @@ -716,5 +721,5 @@ extern void stpi_escp2_terminate_page(stp_vars_t *v); #endif /* GUTENPRINT_INTERNAL_ESCP2_H */ /* - * End of "$Id: print-escp2.h,v 1.100 2006/01/10 03:15:30 rlk Exp $". + * End of "$Id: print-escp2.h,v 1.103 2006/05/06 21:30:59 rlk Exp $". */ diff --git a/src/main/print-lexmark.c b/src/main/print-lexmark.c index b57233c..0f6faa6 100644 --- a/src/main/print-lexmark.c +++ b/src/main/print-lexmark.c @@ -1,6 +1,6 @@ /* - * "$Id: print-lexmark.c,v 1.150 2005/07/03 22:13:39 rlk Exp $" + * "$Id: print-lexmark.c,v 1.153 2006/05/12 00:56:09 rlk Exp $" * * Print plug-in Lexmark driver for the GIMP. * @@ -817,9 +817,8 @@ lexmark_get_model_capabilities(int model) if (i != -1) { return &(lexmark_model_capabilities[i]); } -#ifdef DEBUG - stp_erprintf("lexmark: model %d not found in capabilities list.\n",model); -#endif + stp_deprintf(STP_DBG_LEXMARK, + "lexmark: model %d not found in capabilities list.\n",model); return &(lexmark_model_capabilities[0]); } @@ -961,9 +960,9 @@ lexmark_source_type(const char *name, const lexmark_cap_t * caps) if (!strcmp(name,"ManualNP")) return 1; } -#ifdef DEBUG - stp_erprintf("lexmark: Unknown source type '%s' - reverting to auto\n",name); -#endif + stp_deprintf(STP_DBG_LEXMARK, + "lexmark: Unknown source type '%s' - reverting to auto\n",name); + return 4; } @@ -981,9 +980,7 @@ lexmark_head_offset(int ydpi, /* i */ { int i; -#ifdef DEBUG - stp_erprintf(" sizie %d, size_v %d, size_v[0] %d\n", sizeof(*lineoff_buffer), sizeof(lineoff_buffer->v), sizeof(lineoff_buffer->v[0])); -#endif + stp_deprintf(STP_DBG_LEXMARK, " sizie %d, size_v %d, size_v[0] %d\n", sizeof(*lineoff_buffer), sizeof(lineoff_buffer->v), sizeof(lineoff_buffer->v[0])); memcpy(lineoff_buffer, ink_parameter->head_offset, sizeof(*lineoff_buffer)); for (i=0; i < (sizeof(lineoff_buffer->v) / sizeof(lineoff_buffer->v[0])); i++) { @@ -1020,12 +1017,10 @@ lexmark_size_type(const stp_vars_t *v, const lexmark_cap_t * caps) if (!strcmp(name,"w288h144")) return 0x2d; /* custom */ -#ifdef DEBUG - stp_erprintf("lexmark: Unknown paper size '%s' - using custom\n",name); + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: Unknown paper size '%s' - using custom\n",name); } else { - stp_erprintf("lexmark: Couldn't look up paper size %dx%d - " + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: Couldn't look up paper size %dx%d - " "using custom\n",stp_get_page_height(v), stp_get_page_width(v)); -#endif } return 0; } @@ -1064,7 +1059,7 @@ static const lexmark_res_t res++; } } - stp_erprintf("lexmark_get_resolution_para: resolution not found (%s)\n", resolution); + stp_deprintf(STP_DBG_LEXMARK, "lexmark_get_resolution_para: resolution not found (%s)\n", resolution); return NULL; } @@ -1152,7 +1147,7 @@ lexmark_describe_output(const stp_vars_t *v) ink_parameter = lexmark_get_ink_parameter(ink_type, printing_color, caps, v); - if (ink_parameter->used_colors == COLOR_MODE_K || + if (!ink_parameter || ink_parameter->used_colors == COLOR_MODE_K || caps->inks == LEXMARK_INK_K || !printing_color) return "Grayscale"; else if (!(ink_parameter->used_colors & COLOR_MODE_K)) @@ -1279,8 +1274,9 @@ lexmark_parameters(const stp_vars_t *v, const char *name, else if (strcmp(name, "PrintingMode") == 0) { description->bounds.str = stp_string_list_create(); - stp_string_list_add_string - (description->bounds.str, "Color", _("Color")); + if (caps->inks != LEXMARK_INK_K) + stp_string_list_add_string + (description->bounds.str, "Color", _("Color")); stp_string_list_add_string (description->bounds.str, "BW", _("Black and White")); description->deflt.str = @@ -1434,11 +1430,9 @@ lexmark_init_printer(const stp_vars_t *v, const lexmark_cap_t * caps, /* -#ifdef DEBUG - stp_erprintf("lexmark: printable size = %dx%d (%dx%d) %02x%02x %02x%02x\n", + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: printable size = %dx%d (%dx%d) %02x%02x %02x%02x\n", page_width,page_height,printable_width,printable_length, arg_70_1,arg_70_2,arg_70_3,arg_70_4); -#endif */ return 1; } @@ -1455,8 +1449,8 @@ static void lexmark_deinit_printer(const stp_vars_t *v, const lexmark_cap_t * ca buffer[2] = 0x7; buffer[3] = 0x65; + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: <> %x %x %x %x\n", buffer[0], buffer[1], buffer[2], buffer[3]); #ifdef DEBUG - stp_erprintf("lexmark: <> %x %x %x %x %lx\n", buffer[0], buffer[1], buffer[2], buffer[3], dbgfileprn); lex_write_tmp_file(dbgfileprn, (void *)&(buffer[0]), 4); #endif /* eject page */ @@ -1467,8 +1461,8 @@ static void lexmark_deinit_printer(const stp_vars_t *v, const lexmark_cap_t * ca case m_z42: { unsigned char buffer[12] = {0x1B,0x2A,0x07,0x65,0x1B,0x2A,0x82,0x00,0x00,0x00,0x00,0xAC}; + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: <>\n"); #ifdef DEBUG - stp_erprintf("lexmark: <>\n"); lex_write_tmp_file(dbgfileprn, (void *)&(buffer[0]), 12); #endif /* eject page */ @@ -1485,9 +1479,7 @@ static void lexmark_deinit_printer(const stp_vars_t *v, const lexmark_cap_t * ca 0x1b, 0x33, 0x10, 0x00, 0x00, 0x00, 0x00, 0x33 }; -#ifdef DEBUG - stp_erprintf("Headpos: %d\n", lxm3200_headpos); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "Headpos: %d\n", lxm3200_headpos); lxm3200_linetoeject += 2400; buffer[3] = lxm3200_linetoeject >> 8; @@ -1543,9 +1535,7 @@ static void paper_shift(const stp_vars_t *v, int offset, const lexmark_cap_t * c break; } -#ifdef DEBUG - stp_erprintf("Lines to eject: %d\n", lxm3200_linetoeject); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "Lines to eject: %d\n", lxm3200_linetoeject); } /* @@ -1709,9 +1699,7 @@ lexmark_do_print(stp_vars_t *v, stp_image_t *image) */ stp_describe_resolution(v, &xdpi, &ydpi); -#ifdef DEBUG - stp_erprintf("lexmark: resolution=%dx%d\n",xdpi,ydpi); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: resolution=%dx%d\n",xdpi,ydpi); switch (res_para_ptr->resid) { case DPI300: @@ -1736,7 +1724,7 @@ lexmark_do_print(stp_vars_t *v, stp_image_t *image) #ifdef DEBUG if (res_para_ptr->resid == DPItest) { - stp_erprintf("Start test print1\n"); + stp_dprintf(STP_DBG_LEXMARK, v, "Start test print1\n"); doTestPrint = 1; } #endif @@ -1749,10 +1737,8 @@ densityDivisor /= 1.2; nozzle_separation = ydpi / physical_ydpi; horizontal_passes = xdpi / physical_xdpi; -#ifdef DEBUG - stp_erprintf("lexmark: horizontal_passes %i, xdpi %i, physical_xdpi %i\n", + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: horizontal_passes %i, xdpi %i, physical_xdpi %i\n", horizontal_passes, xdpi, physical_xdpi); -#endif @@ -1760,9 +1746,7 @@ densityDivisor /= 1.2; if (!strcmp(resolution+(strlen(resolution)-3),"DMT") && (caps->features & LEXMARK_CAP_DMT)) { use_dmt= 1; -#ifdef DEBUG - stpi_erprintf("lexmark: using drop modulation technology\n"); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: using drop modulation technology\n"); } /* @@ -1779,9 +1763,7 @@ densityDivisor /= 1.2; page_width = page_right - page_left; page_height = page_bottom - page_top; -#ifdef DEBUG - stp_erprintf("page_right %d, page_left %d, page_top %d, page_bottom %d, left %d, top %d\n",page_right, page_left, page_top, page_bottom,left, top); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "page_right %d, page_left %d, page_top %d, page_bottom %d, left %d, top %d\n",page_right, page_left, page_top, page_bottom,left, top); image_height = stp_image_height(image); image_width = stp_image_width(image); @@ -1803,22 +1785,18 @@ densityDivisor /= 1.2; out_width = xdpi * out_width / 72; out_height = ydpi * out_height / 72; -#ifdef DEBUG - stp_erprintf("border: left %ld, x_raster_res %d, offser_left %ld\n", left, caps->x_raster_res, caps->offset_left_border); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "border: left %d, x_raster_res %d, offser_left %d\n", left, caps->x_raster_res, caps->offset_left_border); left = ((caps->x_raster_res * left) / 72) + caps->offset_left_border; -#ifdef DEBUG - stp_erprintf("border: left %d\n", left); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "border: left %d\n", left); #ifdef DEBUG if (doTestPrint == 1) { - stp_erprintf("Start test print\n"); + stp_dprintf(STP_DBG_LEXMARK, v, "Start test print\n"); testprint(&td); out_width = td.x; out_height = td.y; @@ -1845,9 +1823,7 @@ densityDivisor /= 1.2; buf_length= length; } -#ifdef DEBUG - stp_erprintf("lexmark: buflength is %d!\n",buf_length); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: buflength is %d!\n",buf_length); /* Now we know the color which are used, let's get the memory for every color image */ @@ -1892,17 +1868,14 @@ densityDivisor /= 1.2; else stp_set_string_parameter(v, "STPIOutputType", "CMY"); -#ifdef DEBUG - stp_erprintf("lexmark: driver will use colors "); - if (cols.p.c) stp_erputc('c'); - if (cols.p.C) stp_erputc('C'); - if (cols.p.m) stp_erputc('m'); - if (cols.p.M) stp_erputc('M'); - if (cols.p.y) stp_erputc('y'); - if (cols.p.Y) stp_erputc('Y'); - if (cols.p.k) stp_erputc('k'); - stp_erprintf("\n"); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: driver will use colors %c%c%c%c%c%c%c\n", + (cols.p.c) ? 'c' : ' ', + (cols.p.C) ? 'C' : ' ', + (cols.p.m) ? 'm' : ' ', + (cols.p.M) ? 'M' : ' ', + (cols.p.y) ? 'y' : ' ', + (cols.p.Y) ? 'Y' : ' ', + (cols.p.k) ? 'k' : ' '); /* initialize soft weaveing */ privdata.ink_parameter = ink_parameter; @@ -1943,16 +1916,13 @@ densityDivisor /= 1.2; stp_set_float_parameter(v, "Density", 1.0); } -#ifdef DEBUG - stp_erprintf("density is %f\n",stp_get_parameter(v, "Density")); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "density is %f\n", + stp_get_float_parameter(v, "Density")); -#ifdef DEBUG - stp_erprintf("density is %f and will be changed to %f (%f)\n", + stp_dprintf(STP_DBG_LEXMARK, v, "density is %f and will be changed to %f (%f)\n", stp_get_float_parameter(v, "Density"), stp_get_float_parameter(v, "Density") / densityDivisor, densityDivisor); -#endif /* Lexmark do not have differnet pixel sizes. We have to correct the density according the print resolution. */ stp_scale_float_parameter(v, "Density", 1.0 / densityDivisor); @@ -1985,9 +1955,7 @@ densityDivisor /= 1.2; if (stp_get_float_parameter(v, "Density") > 1.0) stp_set_float_parameter(v, "Density", 1.0); -#ifdef DEBUG - stp_erprintf("density is %f\n",stp_get_float_parameter(v, "Density")); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "density is %f\n",stp_get_float_parameter(v, "Density")); if (!stp_check_float_parameter(v, "GCRLower", STP_PARAMETER_ACTIVE)) @@ -2003,6 +1971,23 @@ densityDivisor /= 1.2; /* if (use_glossy_film) */ + if (cols.p.k) + { + stp_dither_add_channel(v, cols.p.k, STP_ECOLOR_K, 0); + stp_channel_set_black_channel(v, STP_ECOLOR_K); + } + if (cols.p.c) + stp_dither_add_channel(v, cols.p.c, STP_ECOLOR_C, 0); + if (cols.p.C) + stp_dither_add_channel(v, cols.p.C, STP_ECOLOR_C, 1); + if (cols.p.m) + stp_dither_add_channel(v, cols.p.m, STP_ECOLOR_M, 0); + if (cols.p.M) + stp_dither_add_channel(v, cols.p.M, STP_ECOLOR_M, 1); + if (cols.p.y) + stp_dither_add_channel(v, cols.p.y, STP_ECOLOR_Y, 0); + if (cols.p.Y) + stp_dither_add_channel(v, cols.p.Y, STP_ECOLOR_Y, 1); if (!use_dmt) { if (cols.p.C) @@ -2093,9 +2078,7 @@ densityDivisor /= 1.2; out_channels = stp_color_init(v, image, 65536); /* calculate the memory we need for one line of the printer image (hopefully we are right) */ -#ifdef DEBUG - stp_erprintf("---------- buffer mem size = %d\n", (((((pass_length/8)*11)/10)+40) * out_width)+200); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "---------- buffer mem size = %d\n", (((((pass_length/8)*11)/10)+40) * out_width)+200); errdiv = image_height / out_height; errmod = image_height % out_height; @@ -2103,29 +2086,13 @@ densityDivisor /= 1.2; errlast = -1; errline = 0; - if (cols.p.k) - { - stp_dither_add_channel(v, cols.p.k, STP_ECOLOR_K, 0); - stp_channel_set_black_channel(v, STP_ECOLOR_K); - } - if (cols.p.c) - stp_dither_add_channel(v, cols.p.c, STP_ECOLOR_C, 0); - if (cols.p.C) - stp_dither_add_channel(v, cols.p.C, STP_ECOLOR_C, 1); - if (cols.p.m) - stp_dither_add_channel(v, cols.p.m, STP_ECOLOR_M, 0); - if (cols.p.M) - stp_dither_add_channel(v, cols.p.M, STP_ECOLOR_M, 1); - if (cols.p.y) - stp_dither_add_channel(v, cols.p.y, STP_ECOLOR_Y, 0); - if (cols.p.Y) - stp_dither_add_channel(v, cols.p.Y, STP_ECOLOR_Y, 1); privdata.hoffset = left; privdata.ydpi = ydpi; privdata.model = model; privdata.width = out_width; privdata.xdpi = xdpi; privdata.physical_xdpi = physical_xdpi; + privdata.bitwidth = 1; for (y = 0; y < out_height; y ++) { @@ -2193,6 +2160,7 @@ static const stp_printfuncs_t print_lexmark_printfuncs = lexmark_parameters, stp_default_media_size, lexmark_imageable_area, + lexmark_imageable_area, lexmark_limit, lexmark_print, lexmark_describe_resolution, @@ -2245,9 +2213,7 @@ lexmark_init_line(int mode, unsigned char *prnBuf, /* K could only be present if black is printed only. */ if ((mode & COLOR_MODE_K) || (mode & (COLOR_MODE_K | COLOR_MODE_LC | COLOR_MODE_LM))) { -#ifdef DEBUG - stp_erprintf("set photo/black catridge \n"); -#endif + stp_deprintf(STP_DBG_LEXMARK, "set photo/black catridge \n"); prnBuf[LX_Z52_COLOR_MODE_POS] = LX_Z52_BLACK_PRINT; if (direction) { @@ -2255,9 +2221,7 @@ lexmark_init_line(int mode, unsigned char *prnBuf, offset += ink_parameter->h_direction_offset; } } else { -#ifdef DEBUG - stp_erprintf("set color cartridge \n"); -#endif + stp_deprintf(STP_DBG_LEXMARK, "set color cartridge \n"); prnBuf[LX_Z52_COLOR_MODE_POS] = LX_Z52_COLOR_PRINT; if (direction) { @@ -2456,30 +2420,22 @@ lexmark_write(const stp_vars_t *v, /* I - Print file or command */ int anyCol=0; int colIndex; int rwidth; /* real with used at printing (includes shift between even & odd nozzles) */ -#ifdef DEBUG - /* stp_erprintf("<%c>",("CMYKcmy"[coloridx])); */ - stp_erprintf("pass length %d\n", pass_length); -#endif + /* stp_dprintf(STP_DBG_LEXMARK, v, "<%c>",("CMYKcmy"[coloridx])); */ + stp_dprintf(STP_DBG_LEXMARK, v, "pass length %d\n", pass_length); /* first, we check the length of the line an cut it if necessary. */ if ((((width*caps->x_raster_res)/xdpi)+offset) > ((caps->max_paper_width*caps->x_raster_res)/72)) { /* line too long !! Cut the line */ -#ifdef DEBUG - stp_erprintf("!! Line too long !! reduce it from %d", width); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "!! Line too long !! reduce it from %d", width); width = ((((caps->max_paper_width*caps->x_raster_res)/72) - offset)*xdpi)/caps->x_raster_res; -#ifdef DEBUG - stp_erprintf(" down to %d\n", width); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, " down to %d\n", width); } /* we have to write the initial sequence for a line */ -#ifdef DEBUG - stp_erprintf("lexmark: printer line initialized.\n"); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: printer line initialized.\n"); if (direction) { /* left to right */ @@ -2500,9 +2456,7 @@ lexmark_write(const stp_vars_t *v, /* I - Print file or command */ ink_parameter, caps); -#ifdef DEBUG - stp_erprintf("lexmark: xStart %d, xEnd %d, xIter %d.\n", xStart, xEnd, xIter); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: xStart %d, xEnd %d, xIter %d.\n", xStart, xEnd, xIter); /* now we can start to write the pixels */ yCount = 2; @@ -2623,15 +2577,11 @@ lexmark_write(const stp_vars_t *v, /* I - Print file or command */ anyCol = 1; } else { /* there are no dots, make empy package */ -#ifdef DEBUG - /* stp_erprintf("-- empty col %i\n", x); */ -#endif + /* stp_dprintf(STP_DBG_LEXMARK, v, "-- empty col %i\n", x); */ } } -#ifdef DEBUG - stp_erprintf("lexmark: 4\n"); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: 4\n"); clen=((unsigned char *)p)-prnBuf; @@ -2664,13 +2614,11 @@ lexmark_write(const stp_vars_t *v, /* I - Print file or command */ stp_zfwrite((const char *)prnBuf,1,clen,v); #ifdef DEBUG lex_write_tmp_file(dbgfileprn, (void *)prnBuf,clen); - stp_erprintf("lexmark: line written.\n"); #endif + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: line written.\n"); return 1; } else { -#ifdef DEBUG - stp_erprintf("-- empty line\n"); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "-- empty line\n"); return 0; } @@ -2747,26 +2695,13 @@ flush_pass(stp_vars_t *v, int passno, int vertical_subpass) {0, NULL, 128/2, 192/2, 64}}; -#ifdef DEBUG - stp_erprintf("Lexmark: flush_pass, here we are !\n"); - stp_erprintf(" passno %i, pd->ncolors %i, width %d, lwidth %d, linecount k % d, linecount m % d, bitwidth %d\n", - passno, pd->ncolors, width, lwidth, /*linecount[0].p.k, linecount[0].p.m,*/ pd->bitwidth); - stp_erprintf("microoffset %d, vertical_subpass %d, pd->horizontal_weave %d\n", microoffset,vertical_subpass, pd->horizontal_weave); - - stp_erprintf("Lexmark: last_pass_offset %d, logicalpassstart %d\n", pd->last_pass_offset, pass->logicalpassstart); - stp_erprintf("Lexmark: vertical adapt: caps->y_raster_res %d, ydpi %d, \n", caps->y_raster_res, ydpi); - -#endif - - if (1) { /* wisi */ + stp_dprintf(STP_DBG_LEXMARK, v, "Lexmark: flush_pass, here we are !\n"); + stp_dprintf(STP_DBG_LEXMARK, v, " passno %d, pd->ncolors %d, width %d, lwidth %d, bitwidth %d\n", + passno, pd->ncolors, width, lwidth, pd->bitwidth); + stp_dprintf(STP_DBG_LEXMARK, v, "microoffset %d, vertical_subpass %d, pd->horizontal_weave %d\n", microoffset,vertical_subpass, pd->horizontal_weave); -#ifdef DEBUG - stp_erprintf("1\n"); - stp_erprintf("\n"); - stp_erprintf("lineoffs[0].v[j] %d\n", lineoffs[0].v[0]); - stp_erprintf("lineoffs[0].v[j] %d\n", lineoffs[0].v[1]); - -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "Lexmark: last_pass_offset %d, logicalpassstart %d\n", pd->last_pass_offset, pass->logicalpassstart); + stp_dprintf(STP_DBG_LEXMARK, v, "Lexmark: vertical adapt: caps->y_raster_res %d, ydpi %d, \n", caps->y_raster_res, ydpi); switch (physical_xdpi) { case 300: @@ -2779,15 +2714,16 @@ flush_pass(stp_vars_t *v, int passno, int vertical_subpass) prn_mode = PRINT_MODE_1200; break; default: -#ifdef DEBUG - stp_erprintf("Eror: Unsupported phys resolution (%d)\n", physical_xdpi); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "Eror: Unsupported phys resolution (%d)\n", physical_xdpi); return; break; } /* calculate paper shift and adapt actual resoution to physical positioning resolution */ paperShift = (pass->logicalpassstart - pd->last_pass_offset) * (caps->y_raster_res/ydpi); - + for (j = 0; j < pd->ncolors; j++) + stp_dprintf(STP_DBG_LEXMARK, v, "Color %d: active %d line %p jets %d offset %ld\n", + j, lineactive[0].v[j], bufs[0].v[j], linecount[0].v[j], + lineoffs[0].v[j]); /*** do we have to print something with the color cartridge ? ***/ if ((STP_ECOLOR_C < pd->ncolors) && (lineactive[0].v[STP_ECOLOR_C] > 0)) @@ -2827,9 +2763,7 @@ flush_pass(stp_vars_t *v, int passno, int vertical_subpass) -#ifdef DEBUG - stp_erprintf("lexmark_write: lwidth %d\n", lwidth); -#endif + stp_dprintf(STP_DBG_LEXMARK, v, "lexmark_write: lwidth %d\n", lwidth); lexmark_write(v, /* I - Print file or command */ pd->outbuf,/*unsigned char *prnBuf, mem block to buffer output */ &paperShift, /* int *paperShift, */ @@ -2950,7 +2884,6 @@ flush_pass(stp_vars_t *v, int passno, int vertical_subpass) } /* store paper position in respect if there was a paper shift */ pd->last_pass_offset = pass->logicalpassstart - (paperShift / (caps->y_raster_res/ydpi)); - } for (j = 0; j < pd->ncolors; j++) { @@ -2958,9 +2891,7 @@ flush_pass(stp_vars_t *v, int passno, int vertical_subpass) linecount[0].v[j] = 0; } -#ifdef DEBUG - stp_erprintf("lexmark_write finished\n"); -#endif + stp_deprintf(STP_DBG_LEXMARK, "lexmark_write finished\n"); } diff --git a/src/main/print-olympus.c b/src/main/print-olympus.c index a3dc35d..24c6a2c 100644 --- a/src/main/print-olympus.c +++ b/src/main/print-olympus.c @@ -1,5 +1,5 @@ /* - * "$Id: print-olympus.c,v 1.57 2005/10/21 08:55:40 m0m Exp $" + * "$Id: print-olympus.c,v 1.58 2006/04/17 02:06:19 rlk Exp $" * * Print plug-in Olympus driver for the GIMP. * @@ -1569,11 +1569,12 @@ olympus_parameters(const stp_vars_t *v, const char *name, static void -olympus_imageable_area(const stp_vars_t *v, - int *left, - int *right, - int *bottom, - int *top) +olympus_imageable_area_internal(const stp_vars_t *v, + int use_maximum_area, + int *left, + int *right, + int *bottom, + int *top) { int width, height; int i; @@ -1597,8 +1598,9 @@ olympus_imageable_area(const stp_vars_t *v, stp_default_media_size(v, &width, &height); - if (olympus_feature(caps, OLYMPUS_FEATURE_BORDERLESS) - && stp_get_boolean_parameter(v, "Borderless")) + if (use_maximum_area || + (olympus_feature(caps, OLYMPUS_FEATURE_BORDERLESS) && + stp_get_boolean_parameter(v, "Borderless"))) { *left = 0; *top = 0; @@ -1617,6 +1619,26 @@ olympus_imageable_area(const stp_vars_t *v, } } +static void +olympus_imageable_area(const stp_vars_t *v, + int *left, + int *right, + int *bottom, + int *top) +{ + olympus_imageable_area_internal(v, 0, left, right, bottom, top); +} + +static void +olympus_maximum_imageable_area(const stp_vars_t *v, + int *left, + int *right, + int *bottom, + int *top) +{ + olympus_imageable_area_internal(v, 1, left, right, bottom, top); +} + static void olympus_limit(const stp_vars_t *v, /* I */ int *width, int *height, @@ -2156,6 +2178,7 @@ static const stp_printfuncs_t print_olympus_printfuncs = olympus_parameters, stp_default_media_size, olympus_imageable_area, + olympus_maximum_imageable_area, olympus_limit, olympus_print, olympus_describe_resolution, diff --git a/src/main/print-pcl.c b/src/main/print-pcl.c index ea41b4f..1feaacf 100644 --- a/src/main/print-pcl.c +++ b/src/main/print-pcl.c @@ -1,5 +1,5 @@ /* - * "$Id: print-pcl.c,v 1.140 2005/10/18 02:08:17 rlk Exp $" + * "$Id: print-pcl.c,v 1.142 2006/05/12 00:53:18 rlk Exp $" * * Print plug-in HP PCL driver for the GIMP. * @@ -2107,7 +2107,7 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image) stp_deprintf(STP_DBG_PCL, "privdata.do_cret = %d\n", privdata.do_cret); stp_deprintf(STP_DBG_PCL, "privdata.do_cretb = %d\n", privdata.do_cretb); - if (ink_type) + if (ink_type && printing_color) privdata.do_6color = (strcmp(ink_type, "Photo") == 0); else privdata.do_6color = 0; @@ -2534,8 +2534,9 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image) if (privdata.do_cret) /* 4-level printing for 800/1120 */ { - stp_dither_set_inks_simple(v, STP_ECOLOR_Y, 3, dot_sizes_use, 1.0, 0.08); - if (!privdata.do_cretb) + if (yellow) + stp_dither_set_inks_simple(v, STP_ECOLOR_Y, 3, dot_sizes_use, 1.0, 0.08); + if (black && !privdata.do_cretb) stp_dither_set_inks_simple(v, STP_ECOLOR_K, 3, dot_sizes_use, 1.0, 1.0); /* Note: no printer I know of does both CRet (4-level) and 6 colour, but @@ -2550,10 +2551,12 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image) } else { - stp_dither_set_inks_simple(v, STP_ECOLOR_C, 3, dot_sizes_use, 1.0, - 0.31 / .5); - stp_dither_set_inks_simple(v, STP_ECOLOR_M, 3, dot_sizes_use, 1.0, - 0.61 / .7); + if (cyan) + stp_dither_set_inks_simple(v, STP_ECOLOR_C, 3, dot_sizes_use, 1.0, + 0.31 / .5); + if (magenta) + stp_dither_set_inks_simple(v, STP_ECOLOR_M, 3, dot_sizes_use, 1.0, + 0.61 / .7); } } else if (privdata.do_6color) @@ -2714,6 +2717,7 @@ static const stp_printfuncs_t print_pcl_printfuncs = pcl_parameters, stp_default_media_size, pcl_imageable_area, + pcl_imageable_area, pcl_limit, pcl_print, pcl_describe_resolution, diff --git a/src/main/print-ps.c b/src/main/print-ps.c index 9d7e20e..d85dd94 100644 --- a/src/main/print-ps.c +++ b/src/main/print-ps.c @@ -1,5 +1,5 @@ /* - * "$Id: print-ps.c,v 1.81 2005/10/10 12:52:29 rlk Exp $" + * "$Id: print-ps.c,v 1.84 2006/04/17 02:06:19 rlk Exp $" * * Print plug-in Adobe PostScript driver for the GIMP. * @@ -189,6 +189,8 @@ ps_parameters_internal(const stp_vars_t *v, const char *name, stp_string_list_param(description->bounds.str, 0)->name; description->is_active = 1; } + else if (strcmp(name, "PPDFile") == 0) + description->is_active = 1; else description->is_active = 0; return; @@ -281,6 +283,7 @@ ps_media_size(const stp_vars_t *v, int *width, int *height) static void ps_imageable_area_internal(const stp_vars_t *v, /* I */ + int use_max_area, /* I - Use maximum area */ int *left, /* O - Left position in points */ int *right, /* O - Right position in points */ int *bottom, /* O - Bottom position in points */ @@ -308,6 +311,17 @@ ps_imageable_area_internal(const stp_vars_t *v, /* I */ *right = (int)fright; *bottom = height - (int)fbottom; *top = height - (int)ftop; + if (use_max_area) + { + if (*left > 0) + *left = 0; + if (*right < width) + *right = width; + if (*top > 0) + *top = 0; + if (*bottom < height) + *bottom = height; + } } else *left = *right = *bottom = *top = 0; @@ -316,10 +330,10 @@ ps_imageable_area_internal(const stp_vars_t *v, /* I */ } else { - *left = 18; - *right = width - 18; - *top = 36; - *bottom = height - 36; + *left = 0; + *right = width; + *top = 0; + *bottom = height; } } @@ -331,7 +345,19 @@ ps_imageable_area(const stp_vars_t *v, /* I */ int *top) /* O - Top position in points */ { setlocale(LC_ALL, "C"); - ps_imageable_area_internal(v, left, right, bottom, top); + ps_imageable_area_internal(v, 0, left, right, bottom, top); + setlocale(LC_ALL, ""); +} + +static void +ps_maximum_imageable_area(const stp_vars_t *v, /* I */ + int *left, /* O - Left position in points */ + int *right, /* O - Right position in points */ + int *bottom, /* O - Bottom position in points */ + int *top) /* O - Top position in points */ +{ + setlocale(LC_ALL, "C"); + ps_imageable_area_internal(v, 1, left, right, bottom, top); setlocale(LC_ALL, ""); } @@ -406,6 +432,8 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image) page_bottom, /* Bottom of page */ page_width, /* Width of page */ page_height, /* Height of page */ + paper_width, /* Width of physical page */ + paper_height, /* Height of physical page */ out_width, /* Width of image on page */ out_height, /* Height of image on page */ out_channels, /* Output bytes per pixel */ @@ -452,8 +480,7 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image) out_height = stp_get_height(v); ps_imageable_area(nv, &page_left, &page_right, &page_bottom, &page_top); - left -= page_left; - top -= page_top; + ps_media_size(v, &paper_width, &paper_height); page_width = page_right - page_left; page_height = page_bottom - page_top; @@ -466,9 +493,7 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image) curtime = time(NULL); - left += page_left; - - top = page_height - top; + top = paper_height - top; stp_dprintf(STP_DBG_PS, v, "out_width = %d, out_height = %d\n", out_width, out_height); @@ -476,6 +501,12 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image) "page_left = %d, page_right = %d, page_bottom = %d, page_top = %d\n", page_left, page_right, page_bottom, page_top); stp_dprintf(STP_DBG_PS, v, "left = %d, top = %d\n", left, top); + stp_dprintf(STP_DBG_PS, v, "page_width = %d, page_height = %d\n", + page_width, page_height); + + stp_dprintf(STP_DBG_PS, v, "bounding box l %d b %d r %d t %d\n", + page_left, paper_height - page_bottom, + page_right, paper_height - page_top); stp_puts("%!PS-Adobe-3.0\n", v); #ifdef HAVE_CONFIG_H @@ -487,7 +518,8 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image) stp_zprintf(v, "%%%%CreationDate: %s", ctime(&curtime)); stp_puts("%Copyright: 1997-2002 by Michael Sweet (mike@easysw.com) and Robert Krawitz (rlk@alum.mit.edu)\n", v); stp_zprintf(v, "%%%%BoundingBox: %d %d %d %d\n", - left, top - out_height, left + out_width, top); + page_left, paper_height - page_bottom, + page_right, paper_height - page_top); stp_puts("%%DocumentData: Clean7Bit\n", v); stp_zprintf(v, "%%%%LanguageLevel: %d\n", model + 1); stp_puts("%%Pages: 1\n", v); @@ -956,6 +988,7 @@ static const stp_printfuncs_t print_ps_printfuncs = ps_parameters, ps_media_size, ps_imageable_area, + ps_maximum_imageable_area, ps_limit, ps_print, ps_describe_resolution, diff --git a/src/main/print-raw.c b/src/main/print-raw.c index dfad151..b63f3d7 100644 --- a/src/main/print-raw.c +++ b/src/main/print-raw.c @@ -1,5 +1,5 @@ /* - * "$Id: print-raw.c,v 1.37 2005/09/17 21:54:34 rlk Exp $" + * "$Id: print-raw.c,v 1.38 2006/04/17 02:06:19 rlk Exp $" * * Print plug-in RAW driver for the GIMP. * @@ -325,6 +325,7 @@ static const stp_printfuncs_t print_raw_printfuncs = raw_parameters, stp_default_media_size, raw_imageable_area, + raw_imageable_area, raw_limit, raw_print, raw_describe_resolution, diff --git a/src/main/print-weave.c b/src/main/print-weave.c index 498e839..e33e737 100644 --- a/src/main/print-weave.c +++ b/src/main/print-weave.c @@ -1,5 +1,5 @@ /* - * "$Id: print-weave.c,v 1.63 2005/06/29 01:42:35 rlk Exp $" + * "$Id: print-weave.c,v 1.64 2006/03/26 01:07:07 rlk Exp $" * * Softweave calculator for Gutenprint. * @@ -1146,6 +1146,19 @@ stp_initialize_weave(stp_vars_t *v, sw->linebases[i].v[j] = NULL; } } + stp_dprintf(STP_DBG_WEAVE_PARAMS, v, + "Weave parameters: separation %d jets %d (%d) h %d v %d v_sub %d\n", + sw->separation, sw->jets, sw->virtual_jets, osample, + v_subpasses, v_subsample); + stp_dprintf(STP_DBG_WEAVE_PARAMS, v, + " ncolors %d bpp %d width %d (%d) line_count %d first %d last %d\n", + sw->ncolors, sw->bitwidth, linewidth, sw->horizontal_width, + sw->vertical_height, first_line, last_line); + stp_dprintf(STP_DBG_WEAVE_PARAMS, v, + " oversample %d line buffer count %d total buffer %d\n", + sw->oversample, sw->vmod, + sw->vmod * sw->virtual_jets * sw->bitwidth * + sw->ncolors * sw->horizontal_width); stp_allocate_component_data(v, "Weave", NULL, stpi_destroy_weave, sw); return; } @@ -1182,7 +1195,7 @@ weave_parameters_by_row(const stp_vars_t *v, const stpi_softweave_t *sw, memcpy(&(wsw->wcache), w, sizeof(stp_weave_t)); w->pass = (w->pass * sw->repeat_count) + sub_repeat_count; - stp_dprintf(STP_DBG_WEAVE_PARAMS, v, "row %d, jet %d of pass %d " + stp_dprintf(STP_DBG_ROWS, v, "row %d, jet %d of pass %d " "(pos %d, start %d, end %d, missing rows %d)\n", w->row, w->jet, w->pass, w->logicalpassstart, w->physpassstart, w->physpassend, w->missingstartrows); diff --git a/src/main/printers.c b/src/main/printers.c index e2f0f2e..d182637 100644 --- a/src/main/printers.c +++ b/src/main/printers.c @@ -1,5 +1,5 @@ /* - * "$Id: printers.c,v 1.75 2005/04/16 03:02:08 rlk Exp $" + * "$Id: printers.c,v 1.78 2006/04/17 23:33:56 rlk Exp $" * * Print plug-in driver utility functions for the GIMP. * @@ -42,6 +42,17 @@ #define FMIN(a, b) ((a) < (b) ? (a) : (b)) +static void stpi_printvars_freefunc(void *item); +static const char* stpi_printvars_namefunc(const void *item); + +static stp_list_t *printvars_list = NULL; + +typedef struct stp_printvars +{ + const char *name; + stp_vars_t *printvars; +} stp_printvars_t; + static void stpi_printer_freefunc(void *item); static const char* stpi_printer_namefunc(const void *item); static const char* stpi_printer_long_namefunc(const void *item); @@ -59,6 +70,18 @@ struct stp_printer stp_vars_t *printvars; }; +static void +stpi_init_printvars_list(void) +{ + if (!printvars_list) + { + printvars_list = stp_list_create(); + stp_list_set_freefunc(printvars_list, stpi_printvars_freefunc); + stp_list_set_namefunc(printvars_list, stpi_printvars_namefunc); + stp_list_set_long_namefunc(printvars_list, stpi_printvars_namefunc); + } +} + static int stpi_init_printer_list(void) { @@ -69,7 +92,6 @@ stpi_init_printer_list(void) stp_list_set_namefunc(printer_list, stpi_printer_namefunc); stp_list_set_long_namefunc(printer_list, stpi_printer_long_namefunc); /* stp_list_set_sortfunc(printer_list, stpi_printer_sortfunc); */ - return 0; } @@ -124,6 +146,19 @@ stpi_printer_freefunc(void *item) stp_free(printer); } +/* ARGSUSED */ +static void +stpi_printvars_freefunc(void *item) +{ +} + +static const char * +stpi_printvars_namefunc(const void *item) +{ + const stp_printvars_t *printvars = (const stp_printvars_t *) item; + return printvars->name; +} + const char * stp_printer_get_driver(const stp_printer_t *printer) { @@ -356,6 +391,15 @@ stp_get_imageable_area(const stp_vars_t *v, (printfuncs->imageable_area)(v, left, right, bottom, top); } +void +stp_get_maximum_imageable_area(const stp_vars_t *v, + int *left, int *right, int *bottom, int *top) +{ + const stp_printfuncs_t *printfuncs = + stpi_get_printfuncs(stp_get_printer(v)); + (printfuncs->maximum_imageable_area)(v, left, right, bottom, top); +} + void stp_get_size_limit(const stp_vars_t *v, int *max_width, int *max_height, int *min_width, int *min_height) @@ -789,6 +833,34 @@ stp_verify_printer_params(stp_vars_t *v) return answer; } +static const stp_vars_t * +stp_find_params(const char *name, const char *family) +{ + if (printvars_list) + { + char *stmp = + stp_malloc(strlen(family) + strlen("::") + strlen(name) + 1); + stp_list_item_t *item; + strcpy(stmp, family); + strcat(stmp, "::"); + strcat(stmp, name); + item = stp_list_get_item_by_name(printvars_list, stmp); + if (item) + { + stp_free(stmp); + return ((const stp_printvars_t *) + stp_list_item_get_data(item))->printvars; + } + strcpy(stmp, name); + item = stp_list_get_item_by_name(printvars_list, stmp); + stp_free(stmp); + if (item) + return ((const stp_printvars_t *) + stp_list_item_get_data(item))->printvars; + } + return NULL; +} + int stp_family_register(stp_list_t *family) { @@ -854,49 +926,10 @@ stp_family_unregister(stp_list_t *family) return 0; } -/* - * Parse the printer node, and return the generated printer. Returns - * NULL on failure. - */ -static stp_printer_t* -stp_printer_create_from_xmltree(stp_mxml_node_t *printer, /* The printer node */ - const char *family, /* Family name */ - const stp_printfuncs_t *printfuncs) - /* Family printfuncs */ +static void +stp_fill_printvars_from_xmltree(stp_mxml_node_t *prop, + stp_vars_t *v) { - stp_mxml_node_t *prop; /* Temporary node pointer */ - const char *stmp; /* Temporary string */ - stp_printer_t *outprinter; /* Generated printer */ - int - driver = 0, /* Check driver */ - long_name = 0; - - outprinter = stp_zalloc(sizeof(stp_printer_t)); - if (!outprinter) - return NULL; - outprinter->printvars = stp_vars_create(); - if (outprinter->printvars == NULL) - { - stp_free(outprinter); - return NULL; - } - - stmp = stp_mxmlElementGetAttr(printer, "driver"); - stp_set_driver(outprinter->printvars, (const char *) stmp); - - outprinter->long_name = stp_strdup(stp_mxmlElementGetAttr(printer, "name")); - outprinter->manufacturer = stp_strdup(stp_mxmlElementGetAttr(printer, "manufacturer")); - outprinter->model = stp_xmlstrtol(stp_mxmlElementGetAttr(printer, "model")); - outprinter->family = stp_strdup((const char *) family); - - if (stp_get_driver(outprinter->printvars)) - driver = 1; - if (outprinter->long_name) - long_name = 1; - - outprinter->printfuncs = printfuncs; - - prop = printer->child; while (prop) { if (prop->type == STP_MXML_ELEMENT) @@ -908,41 +941,37 @@ stp_printer_create_from_xmltree(stp_mxml_node_t *printer, /* The printer node */ const char *p_name = stp_mxmlElementGetAttr(prop, "name"); stp_mxml_node_t *child = prop->child; if (!p_type || !p_name) - stp_erprintf("Bad property on driver %s\n", outprinter->driver); + stp_erprintf("Bad property found!\n"); else if (strcmp(p_type, "float") == 0) { if (child->type == STP_MXML_TEXT) stp_set_float_parameter - (outprinter->printvars, p_name, - stp_xmlstrtod(child->value.text.string)); + (v, p_name, stp_xmlstrtod(child->value.text.string)); } else if (strcmp(p_type, "integer") == 0) { if (child->type == STP_MXML_TEXT) stp_set_int_parameter - (outprinter->printvars, p_name, - (int) stp_xmlstrtol(child->value.text.string)); + (v, p_name, (int) stp_xmlstrtol(child->value.text.string)); } else if (strcmp(p_type, "boolean") == 0) { if (child->type == STP_MXML_TEXT) stp_set_boolean_parameter - (outprinter->printvars, p_name, - (int) stp_xmlstrtol(child->value.text.string)); + (v, p_name, (int) stp_xmlstrtol(child->value.text.string)); } else if (strcmp(p_type, "string") == 0) { if (child->type == STP_MXML_TEXT) stp_set_string_parameter - (outprinter->printvars, p_name, child->value.text.string); + (v, p_name, child->value.text.string); } else if (strcmp(p_type, "curve") == 0) { stp_curve_t *curve = stp_curve_create_from_xmltree(child); if (curve) { - stp_set_curve_parameter(outprinter->printvars, - p_name, curve); + stp_set_curve_parameter(v, p_name, curve); stp_curve_destroy(curve); } } @@ -951,21 +980,110 @@ stp_printer_create_from_xmltree(stp_mxml_node_t *printer, /* The printer node */ stp_array_t *array = stp_array_create_from_xmltree(child); if (array) { - stp_set_array_parameter(outprinter->printvars, - p_name, array); + stp_set_array_parameter(v, p_name, array); stp_array_destroy(array); } } else { - stp_erprintf("Bad property %s type %s on driver %s\n", - p_name, p_type, outprinter->driver); + stp_erprintf("Bad property %s type %s\n", p_name, p_type); continue; } } } prop = prop->next; } +} + +static stp_printvars_t * +stp_printvars_create_from_xmltree(stp_mxml_node_t *printer, + const char *family) +{ + stp_mxml_node_t *prop; /* Temporary node pointer */ + const char *stmp; /* Temporary string */ + char *sbuf; + stp_printvars_t *outprintvars; + outprintvars = stp_zalloc(sizeof(stp_printvars_t)); + if (!outprintvars) + return NULL; + outprintvars->printvars = stp_vars_create(); + if (outprintvars->printvars == NULL) + { + stp_free(outprintvars); + return NULL; + } + stmp = stp_mxmlElementGetAttr(printer, "name"); + if (!stmp) + { + stp_vars_destroy(outprintvars->printvars); + stp_free(outprintvars); + return NULL; + } + sbuf = stp_malloc(strlen(family) + strlen("::") + strlen(stmp) + 1); + strcpy(sbuf, family); + strcat(sbuf, "::"); + strcat(sbuf, stmp); + outprintvars->name = sbuf; + prop = printer->child; + stp_fill_printvars_from_xmltree(prop, outprintvars->printvars); + if (stp_get_debug_level() & STP_DBG_XML) + stp_deprintf(STP_DBG_XML, "stp_printvars_create_from_xmltree: %s\n", + outprintvars->name); + return outprintvars; +} + + +/* + * Parse the printer node, and return the generated printer. Returns + * NULL on failure. + */ +static stp_printer_t* +stp_printer_create_from_xmltree(stp_mxml_node_t *printer, /* The printer node */ + const char *family, /* Family name */ + const stp_printfuncs_t *printfuncs) + /* Family printfuncs */ +{ + stp_mxml_node_t *prop; /* Temporary node pointer */ + const char *stmp; /* Temporary string */ + stp_printer_t *outprinter; /* Generated printer */ + int + driver = 0, /* Check driver */ + long_name = 0; + + outprinter = stp_zalloc(sizeof(stp_printer_t)); + if (!outprinter) + return NULL; + stmp = stp_mxmlElementGetAttr(printer, "parameters"); + if (stmp && !stp_find_params(stmp, family)) + stp_erprintf("stp_printer_create_from_xmltree: cannot find parameters %s::%s\n", + family, stmp); + if (stmp && stp_find_params(stmp, family)) + outprinter->printvars = stp_vars_create_copy(stp_find_params(stmp, family)); + else + outprinter->printvars = stp_vars_create(); + if (outprinter->printvars == NULL) + { + stp_free(outprinter); + return NULL; + } + + stmp = stp_mxmlElementGetAttr(printer, "driver"); + stp_set_driver(outprinter->printvars, (const char *) stmp); + + outprinter->long_name = stp_strdup(stp_mxmlElementGetAttr(printer, "name")); + outprinter->manufacturer = stp_strdup(stp_mxmlElementGetAttr(printer, "manufacturer")); + outprinter->model = stp_xmlstrtol(stp_mxmlElementGetAttr(printer, "model")); + outprinter->family = stp_strdup((const char *) family); + + if (stp_get_driver(outprinter->printvars)) + driver = 1; + if (outprinter->long_name) + long_name = 1; + + outprinter->printfuncs = printfuncs; + + prop = printer->child; + stp_fill_printvars_from_xmltree(prop, outprinter->printvars); if (driver && long_name && printfuncs) { if (stp_get_debug_level() & STP_DBG_XML) @@ -993,7 +1111,6 @@ stpi_xml_process_family(stp_mxml_node_t *family) /* The family node */ stp_module_t *family_module_data; /* Family module data */ stp_family_t *family_data = NULL; /* Family data */ int family_valid = 0; /* Is family valid? */ - stp_printer_t *outprinter; /* Generated printer */ family_module_list = stp_module_get_class(STP_MODULE_CLASS_FAMILY); if (!family_module_list) @@ -1026,13 +1143,23 @@ stpi_xml_process_family(stp_mxml_node_t *family) /* The family node */ const char *printer_name = printer->value.element.name; if (!strcmp(printer_name, "printer")) { - outprinter = + stp_printer_t *outprinter = stp_printer_create_from_xmltree(printer, family_name, family_data->printfuncs); if (outprinter) stp_list_item_create(family_data->printer_list, NULL, outprinter); } + else if (!strcmp(printer_name, "parameters")) + { + stp_printvars_t *printvars = + stp_printvars_create_from_xmltree(printer, family_name); + if (printvars) + { + stpi_init_printvars_list(); + stp_list_item_create(printvars_list, NULL, printvars); + } + } } printer = printer->next; } diff --git a/src/main/printers.xml b/src/main/printers.xml index bd4c41f..81d197b 100644 --- a/src/main/printers.xml +++ b/src/main/printers.xml @@ -4,7 +4,7 @@ XML description of printers known to libgutenprint This file was originally generated. It should be edited by hand. - "$Id: printers.xml,v 1.140 2006/01/10 03:15:30 rlk Exp $" + "$Id: printers.xml,v 1.144 2006/03/12 22:22:12 rlk Exp $" --> - - 1.000 - 1.000 - - - 1.000 - 1.000 - + + - - 2.000 - 0.800 - - + + 0.8 + + + 0.8 0.5 - 0.800 - - - 0.5 - 0.800 - - - 0.5 - 0.800 - - - 0.5 - 0.800 - - - 1.000 - 0.800 - - - 1.000 - 0.800 - - - 1.000 - 0.800 - - - 1.000 - 0.800 - - - 1.000 - 0.800 - - - 1.000 - 0.800 - - - 0.750 - 1.000 - - - 1.000 - 0.800 - - - 0.750 - 1.000 - - - 1.000 - 0.800 - - - 0.750 - 1.000 - - - 0.750 - 1.000 - - - 0.600 - 0.800 - - - 1.000 - 0.800 - - - 1.000 - 0.800 - - -        0.800 -        0.900 -      - - 1.000 - 0.800 - - - 0.750 - 1.000 - - - 1.000 - 0.800 - - - 0.750 - 1.000 - - - 1.000 - 1.000 - + + + 0.8 + 0.6 + + + 0.9 + 0.8 + + + 0.8 + 2.0 + + + 0.75 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.8 - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.8 - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.8 - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - + 0.470 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.96 - 1.02 - 1.02 - 0.500 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - + + 0.95 0.9 0.470 - 1.0 - - - 0.95 - 0.9 - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.8 - 0.470 - 1.0 - - + + 0.8 0.470 - 1.0 - - - 0.8 - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - + + 0.96 1.02 1.02 0.500 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - - - 0.470 - 1.0 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - + 0.818 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 0.818 - 0.786 - - - 1.000 - 1.000 - - - 1.000 - 1.000 - - - 1.000 - 1.000 - - - 1.000 - 1.000 - - - 1.000 - 1.000 - - - 1.000 - 1.000 - - - 1.000 - 1.000 - - + + 1.000 1.000 - - - 1.000 - 1.000 - - - 1.000 - 1.000 - - - 0.818 - 0.786 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - 0.95 - 1.0 - 0.5 - 2.0 - - - 0.95 - 1.0 - 0.5 - 2.0 - - - 0.95 - 1.0 - 0.5 - 2.0 - - + 0.95 - 1.0 0.5 2.0 - + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + diff --git a/src/testpattern/Makefile.am b/src/testpattern/Makefile.am index 45027ff..6db8e05 100644 --- a/src/testpattern/Makefile.am +++ b/src/testpattern/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.23 2005/11/21 11:16:23 rleigh Exp $ +## $Id: Makefile.am,v 1.24 2006/05/12 01:10:19 rlk Exp $ ## Copyright (C) 2000 Roger Leigh ## ## This program is free software; you can redistribute it and/or modify @@ -26,14 +26,14 @@ include $(top_srcdir)/scripts/global.mk pkgdatadir = $(datadir)/$(PACKAGE)/samples -TESTS = run-testpattern run-testpattern-1 +TESTS = run-testpattern run-testpattern-1 run-testpattern-2 ## Programs if BUILD_TESTPATTERN bin_PROGRAMS = testpattern -noinst_PROGRAMS = printers +noinst_PROGRAMS = printers printer_options endif AM_LFLAGS = -i @@ -46,6 +46,7 @@ testpatternl.o: testpatterny.o testpattern.o: testpatterny.o printers_LDADD = $(GUTENPRINT_LIBS) +printer_options_LDADD = $(GUTENPRINT_LIBS) ## Data diff --git a/src/testpattern/Makefile.in b/src/testpattern/Makefile.in index 0a5dbd8..698168d 100644 --- a/src/testpattern/Makefile.in +++ b/src/testpattern/Makefile.in @@ -16,6 +16,9 @@ # Variables +#export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main +#export STP_DATA_PATH = $(top_srcdir)/src/main + srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -39,10 +42,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/scripts/global.mk testpatternl.c testpatterny.c \ - testpatterny.h + $(srcdir)/run-testpattern-2.in $(top_srcdir)/scripts/global.mk \ + testpatternl.c testpatterny.c testpatterny.h @BUILD_TESTPATTERN_TRUE@bin_PROGRAMS = testpattern$(EXEEXT) -@BUILD_TESTPATTERN_TRUE@noinst_PROGRAMS = printers$(EXEEXT) +@BUILD_TESTPATTERN_TRUE@noinst_PROGRAMS = printers$(EXEEXT) \ +@BUILD_TESTPATTERN_TRUE@ printer_options$(EXEEXT) subdir = src/testpattern ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ @@ -56,13 +60,16 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = run-testpattern-2 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +printer_options_SOURCES = printer_options.c +printer_options_OBJECTS = printer_options.$(OBJEXT) +am__DEPENDENCIES_1 = $(top_builddir)/src/main/libgutenprint.la +printer_options_DEPENDENCIES = $(am__DEPENDENCIES_1) printers_SOURCES = printers.c printers_OBJECTS = printers.$(OBJEXT) -am__DEPENDENCIES_1 = $(top_builddir)/src/main/libgutenprint.la printers_DEPENDENCIES = $(am__DEPENDENCIES_1) am_testpattern_OBJECTS = testpattern.$(OBJEXT) testpatterny.$(OBJEXT) \ testpatternl.$(OBJEXT) @@ -84,8 +91,8 @@ LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ $(AM_YFLAGS) -SOURCES = printers.c $(testpattern_SOURCES) -DIST_SOURCES = printers.c $(testpattern_SOURCES) +SOURCES = printer_options.c printers.c $(testpattern_SOURCES) +DIST_SOURCES = printer_options.c printers.c $(testpattern_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -281,6 +288,7 @@ USE_NLS = @USE_NLS@ USE_NLS_FALSE = @USE_NLS_FALSE@ USE_NLS_TRUE = @USE_NLS_TRUE@ VERSION = @VERSION@ +WHICH_PPDS = @WHICH_PPDS@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ @@ -340,12 +348,13 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS) -TESTS = run-testpattern run-testpattern-1 +TESTS = run-testpattern run-testpattern-1 run-testpattern-2 AM_LFLAGS = -i AM_YFLAGS = -d testpattern_SOURCES = testpattern.c testpatterny.y testpatternl.l testpattern.h testpattern_LDADD = $(GUTENPRINT_LIBS) printers_LDADD = $(GUTENPRINT_LIBS) +printer_options_LDADD = $(GUTENPRINT_LIBS) pkgdata_DATA = testpattern.sample extended.sample MAINTAINERCLEANFILES = Makefile.in testpatternl.c testpatterny.c testpatterny.h EXTRA_DIST = testpatterny.h $(pkgdata_DATA) run-testpattern run-testpattern-1 @@ -382,6 +391,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +run-testpattern-2: $(top_builddir)/config.status $(srcdir)/run-testpattern-2.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @@ -417,6 +428,9 @@ clean-noinstPROGRAMS: echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done +printer_options$(EXEEXT): $(printer_options_OBJECTS) $(printer_options_DEPENDENCIES) + @rm -f printer_options$(EXEEXT) + $(LINK) $(printer_options_LDFLAGS) $(printer_options_OBJECTS) $(printer_options_LDADD) $(LIBS) printers$(EXEEXT): $(printers_OBJECTS) $(printers_DEPENDENCIES) @rm -f printers$(EXEEXT) $(LINK) $(printers_LDFLAGS) $(printers_OBJECTS) $(printers_LDADD) $(LIBS) @@ -749,9 +763,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am \ @SET_MAKE@ -export STP_MODULE_PATH = $(top_builddir)/src/main/.libs:$(top_builddir)/src/main -export STP_DATA_PATH = $(top_srcdir)/src/main - # Rules $(top_builddir)/src/main/libgutenprint.la: diff --git a/src/testpattern/printer_options.c b/src/testpattern/printer_options.c new file mode 100644 index 0000000..9381be0 --- /dev/null +++ b/src/testpattern/printer_options.c @@ -0,0 +1,246 @@ +/* + * "$Id: printer_options.c,v 1.1 2006/05/12 01:10:19 rlk Exp $" + * + * Dump the per-printer options for Grant Taylor's *-omatic database + * + * Copyright 2000 Robert Krawitz (rlk@alum.mit.edu) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif +#include +#include +#include +#include + +int +main(int argc, char **argv) +{ + int i, j, k; + stp_parameter_level_t max_level = STP_PARAMETER_LEVEL_ADVANCED4; + if (argc > 1 && !strcmp(argv[1], "-s")) + max_level = STP_PARAMETER_LEVEL_BASIC; + + stp_init(); + for (i = 0; i < stp_printer_model_count(); i++) + { + stp_parameter_list_t params; + int nparams; + stp_parameter_t desc; + const stp_printer_t *printer = stp_get_printer_by_index(i); + const char *driver = stp_printer_get_driver(printer); + const char *family = stp_printer_get_family(printer); + stp_vars_t *pv = stp_vars_create_copy(stp_printer_get_defaults(printer)); + int tcount = 0; + size_t count; + int printer_is_color = 0; + if (strcmp(family, "ps") == 0 || strcmp(family, "raw") == 0) + continue; + + /* Set Job Mode to "Job" as this enables the Duplex option */ + stp_set_string_parameter(pv, "JobMode", "Job"); + + stp_describe_parameter(pv, "PrintingMode", &desc); + if (stp_string_list_is_present(desc.bounds.str, "Color")) + printer_is_color = 1; + stp_parameter_description_destroy(&desc); + if (printer_is_color) + stp_set_string_parameter(pv, "PrintingMode", "Color"); + else + stp_set_string_parameter(pv, "PrintingMode", "BW"); + stp_set_string_parameter(pv, "ChannelBitDepth", "8"); + + printf("# Printer model %s, long name `%s'\n", driver, + stp_printer_get_long_name(printer)); + + printf("$families{'%s'} = '%s';\n", driver, family); + printf("$models{'%s'} = '%d';\n", driver, stp_get_model_id(pv)); + + params = stp_get_parameter_list(pv); + nparams = stp_parameter_list_count(params); + + for (k = 0; k < nparams; k++) + { + const stp_parameter_t *p = stp_parameter_list_param(params, k); + if (p->read_only || + (p->p_level > max_level && strcmp(p->name, "Resolution") != 0) || + (p->p_class != STP_PARAMETER_CLASS_OUTPUT && + p->p_class != STP_PARAMETER_CLASS_CORE && + p->p_class != STP_PARAMETER_CLASS_FEATURE)) + continue; + count = 0; + stp_describe_parameter(pv, p->name, &desc); + if (desc.is_active) + { + printf("$longnames{'%s'} = '%s';\n", + desc.name, desc.text); + printf("$param_classes{'%s'} = %d;\n", + desc.name, desc.p_class); + printf("$param_levels{'%s'} = %d;\n", + desc.name, desc.p_level); + if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST) + { + count = stp_string_list_count(desc.bounds.str); + if (count > 0) + { + if (desc.is_mandatory) + { + printf("$defaults{'%s'}{'%s'} = '%s';\n", + driver, desc.name, desc.deflt.str); + } + else + { + printf("$defaults{'%s'}{'%s'} = '%s';\n", + driver, desc.name, "None"); + printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n", + driver, desc.name, "None", "None"); + } + for (j = 0; j < count; j++) + { + const stp_param_string_t *param = + stp_string_list_param(desc.bounds.str, j); + printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n", + driver, desc.name, param->name, param->text); + if (strcmp(desc.name, "Resolution") == 0) + { + int x, y; + stp_set_string_parameter(pv, "Resolution", + param->name); + stp_describe_resolution(pv, &x, &y); + if (x > 0 && y > 0) + { + printf("$stpdata{'%s'}{'%s'}{'%s'} = '%d';\n", + driver, "x_resolution", param->name, x); + printf("$stpdata{'%s'}{'%s'}{'%s'} = '%d';\n", + driver, "y_resolution", param->name, y); + } + } + } + } + } + else if (desc.p_type == STP_PARAMETER_TYPE_BOOLEAN) + { + if (desc.is_mandatory) + { + printf("$defaults{'%s'}{'%s'} = '%d';\n", + driver, desc.name, desc.deflt.boolean); + } + else + { + printf("$defaults{'%s'}{'%s'} = '%s';\n", + driver, desc.name, "None"); + printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n", + driver, desc.name, "None", "None"); + } + + printf("$stpdata{'%s'}{'%s'}{'False'} = 'False';\n", + driver, desc.name); + printf("$stpdata{'%s'}{'%s'}{'True'} = 'True';\n", + driver, desc.name); + } + else if (desc.p_type == STP_PARAMETER_TYPE_DOUBLE) + { + if (desc.bounds.dbl.lower <= desc.deflt.dbl && + desc.bounds.dbl.upper >= desc.deflt.dbl) + { + printf("$stp_float_values{'%s'}{'MINVAL'}{'%s'} = %.3f;\n", + driver, desc.name, desc.bounds.dbl.lower); + printf("$stp_float_values{'%s'}{'MAXVAL'}{'%s'} = %.3f;\n", + driver, desc.name, desc.bounds.dbl.upper); + printf("$stp_float_values{'%s'}{'DEFVAL'}{'%s'} = %.3f;\n", + driver, desc.name, desc.deflt.dbl); + /* printf("$stp_float_values{'%s'}{'LONG_NAME'}{'%s'} = '%s';\n", + driver, desc.name, _(desc.text)); */ + printf("$stp_float_values{'%s'}{'CATEGORY'}{'%s'} = '%s';\n", + driver, desc.name, _(desc.category)); + printf("$stp_float_values{'%s'}{'HELP'}{'%s'} = q(%s);\n", + driver, desc.name, (desc.help ? _(desc.help) : "''")); + printf("$stp_float_values{'%s'}{'MANDATORY'}{'%s'} = q(%d);\n", + driver, desc.name, desc.is_mandatory); + } + } + else if (desc.p_type == STP_PARAMETER_TYPE_INT) + { + if (desc.bounds.integer.lower <= desc.deflt.integer && + desc.bounds.integer.upper >= desc.deflt.integer) + { + printf("$stp_int_values{'%s'}{'MINVAL'}{'%s'} = %d;\n", + driver, desc.name, desc.bounds.integer.lower); + printf("$stp_int_values{'%s'}{'MAXVAL'}{'%s'} = %d;\n", + driver, desc.name, desc.bounds.integer.upper); + printf("$stp_int_values{'%s'}{'DEFVAL'}{'%s'} = %d;\n", + driver, desc.name, desc.deflt.integer); + /* printf("$stp_int_values{'%s'}{'LONG_NAME'}{'%s'} = '%s';\n", + driver, desc.name, _(desc.text)); */ + printf("$stp_int_values{'%s'}{'CATEGORY'}{'%s'} = '%s';\n", + driver, desc.name, _(desc.category)); + printf("$stp_int_values{'%s'}{'HELP'}{'%s'} = q(%s);\n", + driver, desc.name, (desc.help ? _(desc.help) : "''")); + printf("$stp_int_values{'%s'}{'MANDATORY'}{'%s'} = q(%d);\n", + driver, desc.name, desc.is_mandatory); + } + } + else if (desc.p_type == STP_PARAMETER_TYPE_DIMENSION) + { + if (desc.bounds.dimension.lower <= desc.deflt.dimension && + desc.bounds.dimension.upper >= desc.deflt.dimension) + { + printf("$stp_dimension_values{'%s'}{'MINVAL'}{'%s'} = %d;\n", + driver, desc.name, desc.bounds.dimension.lower); + printf("$stp_dimension_values{'%s'}{'MAXVAL'}{'%s'} = %d;\n", + driver, desc.name, desc.bounds.dimension.upper); + printf("$stp_dimension_values{'%s'}{'DEFVAL'}{'%s'} = %d;\n", + driver, desc.name, desc.deflt.dimension); + /* printf("$stp_dimension_values{'%s'}{'LONG_NAME'}{'%s'} = '%s';\n", + driver, desc.name, _(desc.text)); */ + printf("$stp_dimension_values{'%s'}{'CATEGORY'}{'%s'} = '%s';\n", + driver, desc.name, _(desc.category)); + printf("$stp_dimension_values{'%s'}{'HELP'}{'%s'} = q(%s);\n", + driver, desc.name, (desc.help ? _(desc.help) : "''")); + printf("$stp_dimension_values{'%s'}{'MANDATORY'}{'%s'} = q(%d);\n", + driver, desc.name, desc.is_mandatory); + } + } + tcount += count; + } + stp_parameter_description_destroy(&desc); + } + stp_parameter_list_destroy(params); + if (tcount > 0) + { + if (printer_is_color) + { + printf("$defaults{'%s'}{'%s'} = '%s';\n", + driver, "Color", "Color"); + printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n", + driver, "Color", "Color", "Color"); + printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n", + driver, "Color", "RawCMYK", "Raw CMYK"); + } + else + printf("$defaults{'%s'}{'%s'} = '%s';\n", + driver, "Color", "Grayscale"); + printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n", + driver, "Color", "Grayscale", "Gray Scale"); + printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n", + driver, "Color", "BlackAndWhite", "Black and White"); + } + stp_vars_destroy(pv); + } + return 0; +} diff --git a/src/testpattern/run-testpattern-2.in b/src/testpattern/run-testpattern-2.in new file mode 100644 index 0000000..daba8db --- /dev/null +++ b/src/testpattern/run-testpattern-2.in @@ -0,0 +1,236 @@ +#!@PERL@ + +use Getopt::Long; +Getopt::Long::Configure("bundling", "no_ignore_case", "pass_through"); + +use strict; + +my $valgrind = 0; +my $cachegrind = 0; +my $gdb_attach = 0; +my $dontrun = 0; +my $retval = 0; +my @printer_list = (); + +my @extras = (); +my @messages = (); +my %stpdata = (); +my %models_found = (); +my %models; +my %families; +my $skip_duplicate_printers = 0; + +GetOptions("v+" => \$valgrind, + "c" => \$cachegrind, + "g" => \$gdb_attach, + "n" => \$dontrun, + "s!" => \$skip_duplicate_printers); + +my $pwd = `pwd`; +chomp $pwd; + +if (! defined $ENV{"STP_DATA_PATH"}) { + $ENV{"STP_DATA_PATH"} = "${pwd}/../main"; +} + +if (! defined $ENV{"STP_MODULE_PATH"}) { + $ENV{"STP_MODULE_PATH"} = "${pwd}/../main:${pwd}/../main/.libs"; +} + +sub set_opt($$) { + my ($opt, $val) = @_; + push @extras, "parameter \"$opt\" \"$val\";\n"; +} + +sub set_message($) { + my ($message) = @_; + push @messages, "message \"$message\";\n"; +} + +sub print_one_testpattern($) { + my ($printer) = @_; + my $stuff = "printer \"$printer\";\n"; + $stuff .= join "", @extras, @messages; + $stuff .= << 'EOF'; +hsize 0.1; +vsize 0.1; +left 0.15; +top 0.15; +blackline 0; +steps 16; +mode rgb 8; +pattern 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 ; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 1.0 0.0 1.0 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 -2.0 1.0 0.0 -2.0 1.0 0.0 -2.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 1.0 1.0 -2.0 -2.0 -2.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 0.1 0.3 1.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 0.3 0.7 -2.0 -2.0 -2.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 0.1 0.999 1.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 0.3 0.999 1.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 0.5 0.999 1.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 0.1 0.3 -2.0 -2.0 -2.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 0.3 0.7 1.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 0.1 0.999 -2.0 -2.0 -2.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 0.3 0.999 -2.0 -2.0 -2.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 0.5 0.999 -2.0 -2.0 -2.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.0 1.0 0.0 0.75 1.0 0.0 0.75 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.0 1.0 0.0 0.75 1.0 0.0 0.75 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.0 1.0 0.0 0.25 1.0 0.0 0.25 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.0 1.0 0.0 0.25 1.0 0.0 0.25 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.0 1.0 0.0 0.1 1.0 0.0 0.1 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.0 1.0 0.0 0.1 1.0 0.0 0.1 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.75 1.0 0.0 0.0 1.0 0.0 0.75 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.75 1.0 0.0 0.0 1.0 0.0 0.75 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.0 1.0 0.0 0.5 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.0 1.0 0.0 0.5 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.25 1.0 0.0 0.0 1.0 0.0 0.25 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.25 1.0 0.0 0.0 1.0 0.0 0.25 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.1 1.0 0.0 0.0 1.0 0.0 0.1 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.1 1.0 0.0 0.0 1.0 0.0 0.1 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 1.0 0.0 0.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.75 1.0 0.0 0.75 1.0 0.0 0.0 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.25 1.0 0.0 0.75 1.0 0.0 0.75 1.0 0.0 0.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.0 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.25 1.0 0.0 0.25 1.0 0.0 0.0 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.75 1.0 0.0 0.25 1.0 0.0 0.25 1.0 0.0 0.0 1.0; +pattern 1.0 1.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.1 1.0 0.0 0.1 1.0 0.0 0.0 1.0; +pattern 0.0 0.0 1.0 1.0 1.0 0.0 0.9 1.0 0.0 0.1 1.0 0.0 0.1 1.0 0.0 0.0 1.0; +end; +EOF + return $stuff; +} + +open PIPE, "./printer_options|" or die "Cannot run printer_options: $!\n"; +while() { + next if m!^#!; + eval $_; +} +close PIPE or die "Cannot run printer_options: $!\n"; + +if ($#ARGV >= 0) { + @printer_list = @ARGV; +} else { + open PIPE, "./printers|" or die "Cannot run printers: $!\n"; + while() { + next if m!^#!; + chomp; + push @printer_list, $_; + } + close PIPE; +} + +sub do_printer($$) { + my ($printer, $fh) = @_; + my $tmp = $stpdata{$printer}{'Resolution'}; + my $min_res_name; + my $min_res_value = 0; + my $first_time = 1; + my $model_id = $models{$printer}; + my $family_id = $families{$printer}; + if ($skip_duplicate_printers && $models_found{$family_id}{$model_id}) { + return; + } else { + $models_found{$family_id}{$model_id} = 1; + } + my (@resolutions) = grep {$_ ne 'None' } keys %$tmp; + $tmp = $stpdata{$printer}{'PrintingMode'}; + my (@printing_modes) = grep {$_ ne 'None' } keys %$tmp; + $tmp = $stpdata{$printer}{'InkType'}; + my (@ink_types) = grep {$_ ne 'None' } keys %$tmp; + foreach $tmp (sort @resolutions) { + my $res_value = ($stpdata{$printer}{'x_resolution'}{$tmp} * + $stpdata{$printer}{'y_resolution'}{$tmp}); + if ($min_res_value == 0 || $res_value < $min_res_value) { + $min_res_value = $res_value; + $min_res_name = $tmp; + } + } + # We want to do all resolutions and all ink types in both color modes. + # We don't need to do both resolutions and ink types. + my $pmode; + foreach $pmode (@printing_modes) { + my ($resolution, $ink_type); + foreach $resolution (@resolutions) { + @extras = (); + @messages = (); + if ($first_time) { + set_message("$printer\n"); + $first_time = 0; + } + set_opt("PrintingMode", $pmode); + set_opt("Resolution", $resolution); + set_opt("DitherAlgorithm", "Fast"); + set_opt("ColorCorrection", "Raw"); + set_message(" ${pmode}+${resolution}"); + my $output = print_one_testpattern($printer); + print $fh $output; + } + if ($#ink_types >= 1) { + foreach $ink_type (@ink_types) { + @extras = (); + @messages = (); + if ($first_time) { + set_message("$printer\n"); + $first_time = 0; + } + set_opt("PrintingMode", $pmode); + set_opt("Resolution", $min_res_name); + set_opt("InkType", $ink_type); + set_opt("DitherAlgorithm", "Fast"); + set_opt("ColorCorrection", "Raw"); + set_message(" ${ink_type}+${pmode}+${min_res_name}"); + my $output = print_one_testpattern($printer); + print $fh $output; + } + } + } +} + +if ($dontrun) { + map { do_printer($_, \*STDOUT) } @printer_list; + exit 0; +} else { + my $testpattern_command; + my $valgrind_command; + my $valopts; + if ($cachegrind) { + $valopts = '--tool=cachegrind'; + $valgrind = 4; + } elsif ($valgrind) { + $valopts = '--tool=memcheck'; + } + if ($gdb_attach) { + $valopts .= ' --db-attach=yes'; + } + if ($valgrind == 1) { + $valgrind_command = "valgrind $valopts -q --num-callers=100 --error-limit=no --leak-check=yes"; + } elsif ($valgrind == 2) { + $valgrind_command = "valgrind $valopts --num-callers=100 --error-limit=no --show-reachable=yes --leak-resolution=high --leak-check=yes"; + } elsif ($valgrind == 3) { + $valgrind_command = "valgrind $valopts --error-limit=no --num-callers=100 --show-reachable=yes --leak-resolution=high --leak-check=yes"; + } elsif ($valgrind == 4) { + $valgrind_command = "valgrind $valopts"; + } + + $testpattern_command = "$valgrind_command ./testpattern -n"; + + open TESTPATTERN, "|$testpattern_command" or + die "Can't run $testpattern_command: $!\n"; + map { do_printer($_, \*TESTPATTERN) } @printer_list; + my $status = close TESTPATTERN; + if ($status) { + exit 0; + } else { + exit 1; + } +} diff --git a/src/testpattern/testpattern.c b/src/testpattern/testpattern.c index 1585303..db7fe2f 100644 --- a/src/testpattern/testpattern.c +++ b/src/testpattern/testpattern.c @@ -1,5 +1,5 @@ /* - * "$Id: testpattern.c,v 1.43 2006/01/15 22:00:57 rlk Exp $" + * "$Id: testpattern.c,v 1.44 2006/04/18 12:30:57 rlk Exp $" * * Test pattern generator for Gimp-Print * @@ -39,6 +39,7 @@ #include #include #include "testpattern.h" +#include extern int yyparse(void); @@ -239,7 +240,9 @@ do_print(void) stp_set_outdata(global_vars, stdout); stp_set_errdata(global_vars, stderr); + setlocale(LC_ALL, "C"); retval = yyparse(); + setlocale(LC_ALL, ""); if (retval) return retval + 1; -- cgit v1.2.3