summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2008-10-26 16:17:32 +0000
committerRoger Leigh <rleigh@debian.org>2008-10-26 16:17:32 +0000
commitcda0fb3b8a7cb56045b24fd0af0ed36591b5d7eb (patch)
tree31ef197ec5c98ac9ac08714a2440a787c065d8c7 /src
parent92b02ddce00dec2787514568fa9d644d4f0350e9 (diff)
Imported Upstream version 5.0.1
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in46
-rw-r--r--src/cups/Makefile.am38
-rw-r--r--src/cups/Makefile.in205
-rw-r--r--src/cups/canon.c155
-rw-r--r--src/cups/cups-genppdconfig.in4
-rw-r--r--src/cups/cups-genppdupdate.in253
-rw-r--r--src/cups/epson.c159
-rw-r--r--src/cups/genppd.c1207
-rw-r--r--src/cups/rastertoprinter.c125
-rw-r--r--src/escputil/Makefile.in71
-rw-r--r--src/escputil/escputil.c4
-rw-r--r--src/foomatic/Makefile.in74
-rw-r--r--src/foomatic/foomatic-generator.in58
-rw-r--r--src/foomatic/foomatic-printermap71
-rw-r--r--src/foomatic/gutenprint-version.c4
-rw-r--r--src/foomatic/mk_printerlist.in2
-rw-r--r--src/foomatic/paper_sizes.c4
-rw-r--r--src/foomatic/printer_margins.c22
-rw-r--r--src/foomatic/printer_options.c225
-rw-r--r--src/foomatic/printers.c4
-rw-r--r--src/ghost/Makefile.in70
-rw-r--r--src/gimp/Makefile.in71
-rw-r--r--src/gimp2/Makefile.in73
-rw-r--r--src/gutenprintui/Makefile.in111
-rw-r--r--src/gutenprintui/gutenprintui-internal.h4
-rw-r--r--src/gutenprintui/panel.c99
-rw-r--r--src/gutenprintui/plist.c49
-rw-r--r--src/gutenprintui/printrcl.c1341
-rw-r--r--src/gutenprintui/printrcy.c1421
-rw-r--r--src/gutenprintui/printrcy.h33
-rw-r--r--src/gutenprintui/printrcy.y209
-rw-r--r--src/gutenprintui2/Makefile.in132
-rw-r--r--src/gutenprintui2/panel.c104
-rw-r--r--src/gutenprintui2/plist.c65
-rw-r--r--src/gutenprintui2/printrcy.c1421
-rw-r--r--src/gutenprintui2/printrcy.h33
-rw-r--r--src/gutenprintui2/printrcy.y209
-rw-r--r--src/main/Makefile.am12
-rw-r--r--src/main/Makefile.in155
-rw-r--r--src/main/bit-ops.c242
-rw-r--r--src/main/buffer-image.c153
-rw-r--r--src/main/canon-inks.h420
-rw-r--r--src/main/canon-media.h146
-rw-r--r--src/main/canon-modes.h285
-rw-r--r--src/main/canon-printers.h519
-rw-r--r--src/main/curve.c12
-rw-r--r--src/main/escp2-channels.c448
-rw-r--r--src/main/escp2-driver.c45
-rw-r--r--src/main/escp2-inks.c160
-rw-r--r--src/main/escp2-papers.c585
-rw-r--r--src/main/escp2-resolutions.c323
-rw-r--r--src/main/papers.xml15
-rw-r--r--src/main/print-canon.c3357
-rw-r--r--src/main/print-canon.h138
-rw-r--r--src/main/print-color.c4
-rw-r--r--src/main/print-escp2-data.c1922
-rw-r--r--src/main/print-escp2.c410
-rw-r--r--src/main/print-escp2.h175
-rw-r--r--src/main/print-olympus.c1921
-rw-r--r--src/main/print-pcl.c7
-rw-r--r--src/main/print-ps.c177
-rw-r--r--src/main/print-util.c30
-rw-r--r--src/main/print-vars.c315
-rw-r--r--src/main/print-weave.c6
-rw-r--r--src/main/printers.c69
-rw-r--r--src/main/printers.xml140
-rw-r--r--src/main/sequence.c8
-rw-r--r--src/main/util.h7
-rw-r--r--src/main/xml.c27
-rw-r--r--src/testpattern/Makefile.in74
-rw-r--r--src/testpattern/printer_options.c20
-rw-r--r--src/testpattern/printers.c4
-rw-r--r--src/testpattern/run-testpattern-2.in122
-rw-r--r--src/testpattern/testpatterny.c1673
-rw-r--r--src/testpattern/testpatterny.h33
-rw-r--r--src/testpattern/testpatterny.y14
76 files changed, 13819 insertions, 8530 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index fed1cfc..ba6f519 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -46,18 +46,17 @@ subdir = src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
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 =
-depcomp =
-am__depfiles_maybe =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -72,13 +71,18 @@ DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -104,6 +108,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -111,6 +117,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -123,12 +130,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -163,6 +172,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -258,14 +268,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -282,6 +295,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -299,17 +315,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -340,9 +360,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/Makefile
+ $(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/cups/Makefile.am b/src/cups/Makefile.am
index 011bd07..8b99888 100644
--- a/src/cups/Makefile.am
+++ b/src/cups/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.87 2006/05/14 16:46:03 rlk Exp $
+## $Id: Makefile.am,v 1.87.8.2 2007/05/29 01:47:26 rlk Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -35,6 +35,7 @@ pkglibdir = $(cups_conf_serverbin)
pkgsysconfdir = $(cups_conf_serverroot)
cupsexec_backenddir = $(pkglibdir)/backend
+cupsexec_driverdir = $(pkglibdir)/driver
cupsexec_filterdir = $(pkglibdir)/filter
if CUPS_PPDS_AT_TOP_LEVEL
cups_modeldir = $(pkgdatadir)/model/
@@ -51,6 +52,20 @@ TESTS= test-ppds
## Programs
+if BUILD_TRANSLATED_CUPS_PPDS
+PPD_NLS = $(PPD_NLS_1)
+LINGUAS = $(ALL_LINGUAS)
+TRANSLATE_PPDS = -DCUPS_TRANSLATED_PPDS
+endif
+
+if BUILD_SIMPLIFIED_CUPS_PPDS
+BUILD_SIMPLE_PPDS=-DGENERATE_SIMPLIFIED_PPDS
+endif
+
+if BUILD_CUPS_1_2
+cupsexec_driver_PROGRAMS = gutenprint.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
+endif
+
if BUILD_CUPS
bin_PROGRAMS = cups-calibrate
sbin_PROGRAMS = cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
@@ -66,6 +81,9 @@ endif
cups_calibrate_SOURCES = cups-calibrate.c
cups_calibrate_LDADD = -lm
+commandtocanon_SOURCES = commandtocanon.c
+commandtocanon_LDADD = $(CUPS_LIBS)
+
commandtoepson_SOURCES = commandtoepson.c
commandtoepson_LDADD = $(CUPS_LIBS)
@@ -76,9 +94,15 @@ epson_SOURCES = epson.c
epson_LDADD = $(CUPS_LIBS)
cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES = genppd.c
+cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS = -DALL_LINGUAS='"@ALL_LINGUAS@"' $(BUILD_SIMPLE_PPDS) $(TRANSLATE_PPDS)
cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD = $(CUPS_LIBS) $(GENPPD_LIBS) $(GUTENPRINT_LIBS)
cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES = genppd.c
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS = -DCUPS_DRIVER_INTERFACE -DALL_LINGUAS='"@ALL_LINGUAS@"' $(BUILD_SIMPLE_PPDS) $(TRANSLATE_PPDS)
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD = $(CUPS_LIBS) $(GUTENPRINT_LIBS)
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
+
rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES = rastertoprinter.c
rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD = $(CUPS_LIBS) $(GUTENPRINT_LIBS)
rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
@@ -104,11 +128,6 @@ if BUILD_CUPS_PPDS
INSTALL_DATA_LOCAL_DEPS = ppd-stamp
endif
-if BUILD_TRANSLATED_CUPS_PPDS
-PPD_NLS = $(PPD_NLS_1)
-LINGUAS = $(ALL_LINGUAS)
-endif
-
if USE_NLS
PPD_NLS_1 = ppd-nls
endif
@@ -117,7 +136,7 @@ endif
## Rules
install-data-local: $(INSTALL_DATA_LOCAL_DEPS)
- if test -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \
+ if test -n "$(CUPS_PKG)" -a -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \
$(mkdir_p) $(DESTDIR)$(cups_modeldir); \
cd ppd ; \
for language in * ; do \
@@ -146,6 +165,7 @@ install-data-hook:
-rmdir $(DESTDIR)$(cups_modeldir)
-rmdir $(DESTDIR)$(pkgdatadir)
-rmdir $(DESTDIR)$(cupsexec_backenddir)
+ -rmdir $(DESTDIR)$(cupsexec_driverdir)
-rmdir $(DESTDIR)$(cupsexec_filterdir)
-rmdir $(DESTDIR)$(bindir)
-rmdir $(DESTDIR)$(pkglibdir)
@@ -174,7 +194,7 @@ ppd-nonls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
for language in C ; do \
mkdir ppd/$$language ; \
echo "$$language:" ; \
- LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ -p ppd/$$language ; \
+ LC_ALL=$$language LANG=$$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@
@@ -185,7 +205,7 @@ ppd-nls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
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 $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ -p ppd/$$language -c `pwd`/catalog/share/locale ; \
+ LC_ALL=$$language LANG=$$language LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ -l $$language -p ppd/$$language -c `pwd`/catalog/share/locale ; \
done
$(RM) -r catalog
diff --git a/src/cups/Makefile.in b/src/cups/Makefile.in
index 848dee5..e1f7f29 100644
--- a/src/cups/Makefile.in
+++ b/src/cups/Makefile.in
@@ -44,6 +44,7 @@ host_triplet = @host@
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/cups-genppdconfig.in $(srcdir)/cups-genppdupdate.in \
$(top_srcdir)/scripts/global.mk COPYING
+@BUILD_CUPS_1_2_TRUE@cupsexec_driver_PROGRAMS = gutenprint.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@$(EXEEXT)
@BUILD_CUPS_TRUE@bin_PROGRAMS = cups-calibrate$(EXEEXT)
@BUILD_CUPS_TRUE@sbin_PROGRAMS = cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@$(EXEEXT)
@BUILD_CUPS_TRUE@cupsexec_backend_PROGRAMS = epson$(EXEEXT) \
@@ -55,11 +56,12 @@ subdir = src/cups
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -67,30 +69,32 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = cups-genppdconfig cups-genppdupdate
am__installdirs = "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(cupsexec_backenddir)" \
+ "$(DESTDIR)$(cupsexec_driverdir)" \
"$(DESTDIR)$(cupsexec_filterdir)" "$(DESTDIR)$(sbindir)" \
"$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgdatadir)" \
"$(DESTDIR)$(pkgsysconfdir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
cupsexec_backendPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+cupsexec_driverPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
cupsexec_filterPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS) $(cupsexec_backend_PROGRAMS) \
- $(cupsexec_filter_PROGRAMS) $(sbin_PROGRAMS)
+ $(cupsexec_driver_PROGRAMS) $(cupsexec_filter_PROGRAMS) \
+ $(sbin_PROGRAMS)
am_canon_OBJECTS = canon.$(OBJEXT)
canon_OBJECTS = $(am_canon_OBJECTS)
am__DEPENDENCIES_1 =
canon_DEPENDENCIES = $(am__DEPENDENCIES_1)
-commandtocanon_SOURCES = commandtocanon.c
-commandtocanon_OBJECTS = commandtocanon.$(OBJEXT)
-commandtocanon_LDADD = $(LDADD)
+am_commandtocanon_OBJECTS = commandtocanon.$(OBJEXT)
+commandtocanon_OBJECTS = $(am_commandtocanon_OBJECTS)
+commandtocanon_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_commandtoepson_OBJECTS = commandtoepson.$(OBJEXT)
commandtoepson_OBJECTS = $(am_commandtoepson_OBJECTS)
commandtoepson_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_cups_calibrate_OBJECTS = cups-calibrate.$(OBJEXT)
cups_calibrate_OBJECTS = $(am_cups_calibrate_OBJECTS)
cups_calibrate_DEPENDENCIES =
-am_cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS = \
- genppd.$(OBJEXT)
+am_cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS = cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.$(OBJEXT)
cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS = $(am_cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS)
am__DEPENDENCIES_2 = $(top_builddir)/src/main/libgutenprint.la
cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_DEPENDENCIES = \
@@ -99,6 +103,10 @@ cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_DEPENDENCIES =
am_epson_OBJECTS = epson.$(OBJEXT)
epson_OBJECTS = $(am_epson_OBJECTS)
epson_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS = gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.$(OBJEXT)
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS = $(am_gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS)
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_DEPENDENCIES = \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
am_rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS = \
rastertoprinter.$(OBJEXT)
rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS = $(am_rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS)
@@ -107,8 +115,8 @@ rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_DEPENDE
sbinSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(sbin_SCRIPTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -117,15 +125,17 @@ LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(canon_SOURCES) commandtocanon.c $(commandtoepson_SOURCES) \
- $(cups_calibrate_SOURCES) \
+SOURCES = $(canon_SOURCES) $(commandtocanon_SOURCES) \
+ $(commandtoepson_SOURCES) $(cups_calibrate_SOURCES) \
$(cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES) \
$(epson_SOURCES) \
+ $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES) \
$(rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES)
-DIST_SOURCES = $(canon_SOURCES) commandtocanon.c \
+DIST_SOURCES = $(canon_SOURCES) $(commandtocanon_SOURCES) \
$(commandtoepson_SOURCES) $(cups_calibrate_SOURCES) \
$(cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES) \
$(epson_SOURCES) \
+ $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES) \
$(rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -143,13 +153,18 @@ pkgdatadir = $(cups_conf_datadir)
pkglibdir = $(cups_conf_serverbin)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -175,6 +190,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -182,6 +199,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -194,12 +212,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -234,6 +254,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -329,14 +350,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @cups_bindir@
@@ -353,6 +377,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -370,17 +397,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @cups_sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -389,6 +420,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS
empty =
pkgsysconfdir = $(cups_conf_serverroot)
cupsexec_backenddir = $(pkglibdir)/backend
+cupsexec_driverdir = $(pkglibdir)/driver
cupsexec_filterdir = $(pkglibdir)/filter
@CUPS_PPDS_AT_TOP_LEVEL_FALSE@cups_modeldir = $(pkgdatadir)/model/gutenprint/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@/
@CUPS_PPDS_AT_TOP_LEVEL_TRUE@cups_modeldir = $(pkgdatadir)/model/
@@ -396,10 +428,16 @@ cupsexec_filterdir = $(pkglibdir)/filter
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_TRANSLATED_CUPS_PPDS_TRUE@PPD_NLS = $(PPD_NLS_1)
+@BUILD_TRANSLATED_CUPS_PPDS_TRUE@LINGUAS = $(ALL_LINGUAS)
+@BUILD_TRANSLATED_CUPS_PPDS_TRUE@TRANSLATE_PPDS = -DCUPS_TRANSLATED_PPDS
+@BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@BUILD_SIMPLE_PPDS = -DGENERATE_SIMPLIFIED_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
cups_calibrate_LDADD = -lm
+commandtocanon_SOURCES = commandtocanon.c
+commandtocanon_LDADD = $(CUPS_LIBS)
commandtoepson_SOURCES = commandtoepson.c
commandtoepson_LDADD = $(CUPS_LIBS)
canon_SOURCES = canon.c
@@ -407,8 +445,13 @@ canon_LDADD = $(CUPS_LIBS)
epson_SOURCES = epson.c
epson_LDADD = $(CUPS_LIBS)
cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES = genppd.c
+cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS = -DALL_LINGUAS='"@ALL_LINGUAS@"' $(BUILD_SIMPLE_PPDS) $(TRANSLATE_PPDS)
cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD = $(CUPS_LIBS) $(GENPPD_LIBS) $(GUTENPRINT_LIBS)
cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES = genppd.c
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS = -DCUPS_DRIVER_INTERFACE -DALL_LINGUAS='"@ALL_LINGUAS@"' $(BUILD_SIMPLE_PPDS) $(TRANSLATE_PPDS)
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD = $(CUPS_LIBS) $(GUTENPRINT_LIBS)
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES = rastertoprinter.c
rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD = $(CUPS_LIBS) $(GUTENPRINT_LIBS)
rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS = $(STATIC_LDOPTS)
@@ -417,8 +460,6 @@ rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS
pkgdata_DATA = $(CUPS_PKG)
pkgsysconf_DATA = $(CUPS_CONF)
@BUILD_CUPS_PPDS_TRUE@INSTALL_DATA_LOCAL_DEPS = ppd-stamp
-@BUILD_TRANSLATED_CUPS_PPDS_TRUE@PPD_NLS = $(PPD_NLS_1)
-@BUILD_TRANSLATED_CUPS_PPDS_TRUE@LINGUAS = $(ALL_LINGUAS)
@USE_NLS_TRUE@PPD_NLS_1 = ppd-nls
CLEANFILES = ppd-stamp
DISTCLEANFILES = cups-genppdconfig.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ cups-genppdupdate.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
@@ -444,9 +485,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/cups/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/cups/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/cups/Makefile
+ $(AUTOMAKE) --gnu src/cups/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -524,6 +565,34 @@ clean-cupsexec_backendPROGRAMS:
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
+install-cupsexec_driverPROGRAMS: $(cupsexec_driver_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(cupsexec_driverdir)" || $(mkdir_p) "$(DESTDIR)$(cupsexec_driverdir)"
+ @list='$(cupsexec_driver_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(cupsexec_driverPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(cupsexec_driverdir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(cupsexec_driverPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(cupsexec_driverdir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-cupsexec_driverPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(cupsexec_driver_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(cupsexec_driverdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(cupsexec_driverdir)/$$f"; \
+ done
+
+clean-cupsexec_driverPROGRAMS:
+ @list='$(cupsexec_driver_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
install-cupsexec_filterPROGRAMS: $(cupsexec_filter_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(cupsexec_filterdir)" || $(mkdir_p) "$(DESTDIR)$(cupsexec_filterdir)"
@@ -598,6 +667,9 @@ cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@$(EXEEXT): $(cu
epson$(EXEEXT): $(epson_OBJECTS) $(epson_DEPENDENCIES)
@rm -f epson$(EXEEXT)
$(LINK) $(epson_LDFLAGS) $(epson_OBJECTS) $(epson_LDADD) $(LIBS)
+gutenprint.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@$(EXEEXT): $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS) $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_DEPENDENCIES)
+ @rm -f gutenprint.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@$(EXEEXT)
+ $(LINK) $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS) $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS) $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD) $(LIBS)
rastertogutenprint.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@$(EXEEXT): $(rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS) $(rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_DEPENDENCIES)
@rm -f rastertogutenprint.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@$(EXEEXT)
$(LINK) $(rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDFLAGS) $(rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_OBJECTS) $(rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_LDADD) $(LIBS)
@@ -627,14 +699,63 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commandtocanon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commandtoepson.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cups-calibrate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epson.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rastertoprinter.Po@am__quote@
+
.c.o:
- $(COMPILE) -c $<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.o: genppd.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS) $(CFLAGS) -MT cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.o -MD -MP -MF "$(DEPDIR)/cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo" -c -o cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.o `test -f 'genppd.c' || echo '$(srcdir)/'`genppd.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo" "$(DEPDIR)/cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Po"; else rm -f "$(DEPDIR)/cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='genppd.c' object='cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS) $(CFLAGS) -c -o cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.o `test -f 'genppd.c' || echo '$(srcdir)/'`genppd.c
+
+cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.obj: genppd.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS) $(CFLAGS) -MT cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.obj -MD -MP -MF "$(DEPDIR)/cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo" -c -o cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.obj `if test -f 'genppd.c'; then $(CYGPATH_W) 'genppd.c'; else $(CYGPATH_W) '$(srcdir)/genppd.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo" "$(DEPDIR)/cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Po"; else rm -f "$(DEPDIR)/cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='genppd.c' object='cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS) $(CFLAGS) -c -o cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.obj `if test -f 'genppd.c'; then $(CYGPATH_W) 'genppd.c'; else $(CYGPATH_W) '$(srcdir)/genppd.c'; fi`
+
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.o: genppd.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS) $(CFLAGS) -MT gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.o -MD -MP -MF "$(DEPDIR)/gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo" -c -o gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.o `test -f 'genppd.c' || echo '$(srcdir)/'`genppd.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo" "$(DEPDIR)/gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Po"; else rm -f "$(DEPDIR)/gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='genppd.c' object='gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS) $(CFLAGS) -c -o gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.o `test -f 'genppd.c' || echo '$(srcdir)/'`genppd.c
+
+gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.obj: genppd.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS) $(CFLAGS) -MT gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.obj -MD -MP -MF "$(DEPDIR)/gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo" -c -o gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.obj `if test -f 'genppd.c'; then $(CYGPATH_W) 'genppd.c'; else $(CYGPATH_W) '$(srcdir)/genppd.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo" "$(DEPDIR)/gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Po"; else rm -f "$(DEPDIR)/gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='genppd.c' object='gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_CFLAGS) $(CFLAGS) -c -o gutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@-genppd.obj `if test -f 'genppd.c'; then $(CYGPATH_W) 'genppd.c'; else $(CYGPATH_W) '$(srcdir)/genppd.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
@@ -837,7 +958,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) all-local
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cupsexec_backenddir)" "$(DESTDIR)$(cupsexec_filterdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgsysconfdir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cupsexec_backenddir)" "$(DESTDIR)$(cupsexec_driverdir)" "$(DESTDIR)$(cupsexec_filterdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgsysconfdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
@@ -870,10 +991,12 @@ maintainer-clean-generic:
clean: clean-am
clean-am: clean-binPROGRAMS clean-cupsexec_backendPROGRAMS \
- clean-cupsexec_filterPROGRAMS clean-generic clean-libtool \
- clean-local clean-sbinPROGRAMS mostlyclean-am
+ clean-cupsexec_driverPROGRAMS clean-cupsexec_filterPROGRAMS \
+ clean-generic clean-libtool clean-local clean-sbinPROGRAMS \
+ mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -894,6 +1017,7 @@ install-data-am: install-data-local install-pkgdataDATA \
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-exec-am: install-binPROGRAMS install-cupsexec_backendPROGRAMS \
+ install-cupsexec_driverPROGRAMS \
install-cupsexec_filterPROGRAMS install-sbinPROGRAMS \
install-sbinSCRIPTS
@@ -904,6 +1028,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -921,18 +1046,20 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-cupsexec_backendPROGRAMS \
+ uninstall-cupsexec_driverPROGRAMS \
uninstall-cupsexec_filterPROGRAMS uninstall-info-am \
uninstall-local uninstall-pkgdataDATA uninstall-pkgsysconfDATA \
uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS
.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 \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS \
+ clean-cupsexec_driverPROGRAMS clean-cupsexec_filterPROGRAMS \
+ clean-generic clean-libtool clean-local clean-sbinPROGRAMS \
+ ctags dist-hook distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
install-cupsexec_backendPROGRAMS \
+ install-cupsexec_driverPROGRAMS \
install-cupsexec_filterPROGRAMS install-data install-data-am \
install-data-hook install-data-local install-exec \
install-exec-am install-info install-info-am install-man \
@@ -943,6 +1070,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-cupsexec_backendPROGRAMS \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-cupsexec_backendPROGRAMS \
+ uninstall-cupsexec_driverPROGRAMS \
uninstall-cupsexec_filterPROGRAMS uninstall-info-am \
uninstall-local uninstall-pkgdataDATA uninstall-pkgsysconfDATA \
uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS
@@ -970,7 +1098,7 @@ cups-genppdupdate.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@: $(top_b
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/cups-genppdupdate
install-data-local: $(INSTALL_DATA_LOCAL_DEPS)
- if test -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \
+ if test -n "$(CUPS_PKG)" -a -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \
$(mkdir_p) $(DESTDIR)$(cups_modeldir); \
cd ppd ; \
for language in * ; do \
@@ -999,6 +1127,7 @@ install-data-hook:
-rmdir $(DESTDIR)$(cups_modeldir)
-rmdir $(DESTDIR)$(pkgdatadir)
-rmdir $(DESTDIR)$(cupsexec_backenddir)
+ -rmdir $(DESTDIR)$(cupsexec_driverdir)
-rmdir $(DESTDIR)$(cupsexec_filterdir)
-rmdir $(DESTDIR)$(bindir)
-rmdir $(DESTDIR)$(pkglibdir)
@@ -1027,7 +1156,7 @@ ppd-nonls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
for language in C ; do \
mkdir ppd/$$language ; \
echo "$$language:" ; \
- LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ -p ppd/$$language ; \
+ LC_ALL=$$language LANG=$$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@
@@ -1038,7 +1167,7 @@ ppd-nls: cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@
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 $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ -p ppd/$$language -c `pwd`/catalog/share/locale ; \
+ LC_ALL=$$language LANG=$$language LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@ @WHICH_PPDS@ -l $$language -p ppd/$$language -c `pwd`/catalog/share/locale ; \
done
$(RM) -r catalog
diff --git a/src/cups/canon.c b/src/cups/canon.c
index 963d446..25c235e 100644
--- a/src/cups/canon.c
+++ b/src/cups/canon.c
@@ -35,6 +35,14 @@
# include <netdb.h>
#endif /* WIN32 || __EMX__ */
+#ifdef __linux
+# include <sys/param.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <dirent.h>
+# include <unistd.h>
+#endif /* __linux */
+
#ifdef __sgi
# include <invent.h>
# ifndef INV_EPP_ECP_PLP
@@ -439,6 +447,7 @@ list_devices(void)
int fd; /* File descriptor */
char device[255]; /* Device filename */
FILE *probe; /* /proc/parport/n/autoprobe file */
+ DIR *dirprobe; /* scan /sys/bus/usb/drivers/usblp */
char line[1024], /* Line from file */
*delim, /* Delimiter in file */
make[IPP_MAX_NAME], /* Make from file */
@@ -451,12 +460,17 @@ list_devices(void)
for (i = 0; i < 4; i ++)
{
- sprintf(device, "/proc/parport/%d/autoprobe", i);
- if ((probe = fopen(device, "r")) != NULL)
+ sprintf(device, "/proc/sys/dev/parport/parport%d/autoprobe", i);
+ probe = fopen(device, "r");
+ if ( probe == NULL ) /* older kernel versions */
+ {
+ sprintf(device, "/proc/parport/%d/autoprobe", i);
+ probe = fopen(device, "r");
+ }
+ if ( probe != NULL )
{
memset(make, 0, sizeof(make));
memset(model, 0, sizeof(model));
- strcpy(model, "CANON");
while (fgets(line, sizeof(line), probe) != NULL)
{
@@ -474,17 +488,17 @@ list_devices(void)
*/
if (strncmp(line, "MODEL:", 6) == 0 &&
- strncmp(line, "MODEL:CANON", 13) != 0)
+ strncmp(line, "MODEL:Unknown", 13) != 0)
strncpy(model, line + 6, sizeof(model) - 1);
else if (strncmp(line, "MANUFACTURER:", 13) == 0 &&
- strncmp(line, "MANUFACTURER:CANON", 20) != 0)
+ strncmp(line, "MANUFACTURER:Unknown", 20) != 0)
strncpy(make, line + 13, sizeof(make) - 1);
}
fclose(probe);
- if (strcmp(make, "CANON") == 0)
- printf("direct canon:/dev/lp%d \"%s %s\" \"Parallel Port #%d\"\n",
+ if (strcasecmp(make, "CANON") == 0)
+ printf("direct canon:/dev/lp%d \"%s %s\" \"Gutenprint Parallel Port #%d\"\n",
i, make, model, i + 1);
}
else
@@ -493,7 +507,7 @@ list_devices(void)
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct canon:%s \"CANON\" \"Parallel Port #%d\"\n", device, i + 1);
+ printf("direct canon:%s \"CANON\" \"Gutenprint Parallel Port #%d\"\n", device, i + 1);
}
}
}
@@ -502,7 +516,110 @@ list_devices(void)
* Probe for USB devices...
*/
- if ((probe = fopen("/proc/bus/usb/devices", "r")) != NULL)
+ if ((dirprobe = opendir("/sys/class/usb")) != NULL) /* SYSFS in kernel 2.6 */
+ {
+ struct dirent *dirent; /* directory entries */
+ struct stat statbuf; /* file stat */
+ char entry[MAXPATHLEN]; /* pathname to usb entries */
+ char link[MAXPATHLEN]; /* linkname of usb entries */
+ char *cptr; /* multi used character pointer */
+ FILE *file; /* read printer specific info from */
+
+ i = 0;
+ /* scan the directory entries */
+ while((dirent = readdir(dirprobe)) != 0)
+ {
+ /* skip "." and ".." */
+ if (dirent->d_name[0] != 'l' || dirent->d_name[1] != 'p')
+ continue;
+
+ /* generate path to work with */
+ snprintf(entry, MAXPATHLEN, "/sys/class/usb/%s/device", dirent->d_name);
+
+ /* look, if we have a pointer */
+ if(lstat(entry, &statbuf) < 0)
+ {
+ perror(entry);
+ continue;
+ }
+
+ if (S_ISLNK(statbuf.st_mode))
+ {
+ /* get the path to the link */
+ if (readlink(entry, link, MAXPATHLEN) < 0)
+ continue;
+
+ /* find right occurance of '/' */
+ if ((cptr = strrchr(link, '/')) == NULL)
+ {
+ continue;
+ }
+
+ /*
+ * and truncate path: cut away everything after the '/',
+ * because parallel directory contains the information we need
+ */
+ *cptr = '\0';
+
+ memset(make, 0, sizeof(make));
+ memset(model, 0, sizeof(model));
+ /* read manufacturer */
+ snprintf(entry, MAXPATHLEN, "/sys/class/usb/%s/%s/manufacturer",
+ dirent->d_name, link);
+
+ if ((file = fopen(entry, "r")) == NULL)
+ {
+ /* skip this entry, there is no file "manufacturer" */
+ continue;
+ }
+ /* read data in */
+ fread(make, sizeof(make)-1, sizeof(char), file);
+ fclose(file);
+
+ /* beautify "make" - strip newline away */
+ if ((cptr = strrchr(make, '\n')) != NULL)
+ {
+ *cptr = '\0';
+ }
+
+ /* next entry, if manufacturer is not CANON */
+ if (strcasecmp(make, "CANON") != 0)
+ continue;
+
+ /* read product name */
+ snprintf(entry, MAXPATHLEN, "/sys/class/usb/%s/%s/product",
+ dirent->d_name, link);
+
+ if ((file = fopen(entry, "r")) == NULL)
+ {
+ /* skip this entry, there is no file "product" */
+ continue;
+ }
+ /* read data in */
+ fread(model, sizeof(model)-1, sizeof(char), file);
+ fclose(file);
+
+ /* beautify "model" - strip away newline */
+ if ((cptr = strrchr(model, '\n')) != NULL)
+ {
+ *cptr = '\0';
+ }
+ sprintf(device, "/dev/usb/%s", dirent->d_name);
+ if (access(device, 0))
+ {
+ sprintf(device, "/dev/usb/usb%s", dirent->d_name);
+
+ if (access(device, 0))
+ sprintf(device, "/dev/usb%s", dirent->d_name);
+ }
+
+ printf("direct canon:%s \"%s %s\" \"Gutenprint USB Printer #%d\"\n",
+ device, make, model, ++i);
+ }
+ }
+ closedir(dirprobe);
+ }
+ else if ((probe = fopen("/proc/bus/usb/devices", "r")) != NULL)
{
i = 0;
@@ -556,7 +673,7 @@ list_devices(void)
sprintf(device, "/dev/usblp%d", i);
}
- printf("direct canon:%s \"%s %s\" \"USB Printer #%d\"\n",
+ printf("direct canon:%s \"%s %s\" \"Gutenprint USB Printer #%d\"\n",
device, make, model, i + 1);
}
@@ -577,21 +694,21 @@ list_devices(void)
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct canon:%s \"CANON\" \"USB Printer #%d\"\n", device, i + 1);
+ printf("direct canon:%s \"CANON\" \"Gutenprint USB Printer #%d\"\n", device, i + 1);
}
sprintf(device, "/dev/usb/usblp%d", i);
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct canon:%s \"CANON\" \"USB Printer #%d\"\n", device, i + 1);
+ printf("direct canon:%s \"CANON\" \"Gutenprint USB Printer #%d\"\n", device, i + 1);
}
sprintf(device, "/dev/usblp%d", i);
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct canon:%s \"CANON\" \"USB Printer #%d\"\n", device, i + 1);
+ printf("direct canon:%s \"CANON\" \"Gutenprint USB Printer #%d\"\n", device, i + 1);
}
}
}
@@ -615,7 +732,7 @@ list_devices(void)
* Standard parallel port...
*/
- puts("direct canon:/dev/plpbi \"CANON\" \"Onboard Parallel Port\"");
+ puts("direct canon:/dev/plpbi \"CANON\" \"Gutenprint Onboard Parallel Port\"");
}
}
@@ -633,7 +750,7 @@ list_devices(void)
{
sprintf(device, "/dev/ecpp%d", i);
if (access(device, 0) == 0)
- printf("direct canon:%s \"CANON\" \"Sun IEEE-1284 Parallel Port #%d\"\n",
+ printf("direct canon:%s \"CANON\" \"Gutenprint Sun IEEE-1284 Parallel Port #%d\"\n",
device, i + 1);
}
@@ -642,7 +759,7 @@ list_devices(void)
sprintf(device, "/dev/lp%d", i);
if (access(device, 0) == 0)
- printf("direct canon:%s \"CANON\" \"PC Parallel Port #%d\"\n",
+ printf("direct canon:%s \"CANON\" \"Gutenprint PC Parallel Port #%d\"\n",
device, i + 1);
}
#elif defined(FreeBSD) || defined(OpenBSD) || defined(NetBSD)
@@ -661,14 +778,14 @@ list_devices(void)
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct canon:%s \"CANON\" \"Parallel Port #%d (interrupt-driven)\"\n", device, i + 1);
+ printf("direct canon:%s \"CANON\" \"Gutenprint Parallel Port #%d (interrupt-driven)\"\n", device, i + 1);
}
sprintf(device, "/dev/lpa%d", i);
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct canon:%s \"CANON\" \"Parallel Port #%d (polled)\"\n", device, i + 1);
+ printf("direct canon:%s \"CANON\" \"Gutenprint Parallel Port #%d (polled)\"\n", device, i + 1);
}
}
@@ -682,7 +799,7 @@ list_devices(void)
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct canon:%s \"CANON\" \"USB Port #%d\"\n", device, i + 1);
+ printf("direct canon:%s \"CANON\" \"Gutenprint USB Port #%d\"\n", device, i + 1);
}
}
#endif
diff --git a/src/cups/cups-genppdconfig.in b/src/cups/cups-genppdconfig.in
index 26ae5e7..aa80920 100644
--- a/src/cups/cups-genppdconfig.in
+++ b/src/cups/cups-genppdconfig.in
@@ -1,5 +1,5 @@
#! @PERL@ -w
-# $Id: cups-genppdconfig.in,v 1.13 2006/05/30 19:25:36 rleigh Exp $
+# $Id: cups-genppdconfig.in,v 1.13.8.1 2007/05/29 01:47:26 rlk Exp $
# A user-friendly dialog-based wrapper for cups-genppd(8).
# Copyright (C) 2002 Roger Leigh <rleigh@debian.org>
#
@@ -396,7 +396,7 @@ sub create_ppds {
$count = 0;
foreach $language (@chosen_languages) { # loop through languages
open GENPPD,
- "LANGUAGE=$language cups-genppd.$version -v -p $chosen_location/$language $printers 2>&1 |"
+ "LC_ALL=$language LANG=$language LANGUAGE=$language cups-genppd.$version -v -p $chosen_location/$language $printers 2>&1 |"
or die "can't fork cups-genppd: $!";
$file = "";
while ( defined($file = <GENPPD>)) { # dump genppd stats into guage
diff --git a/src/cups/cups-genppdupdate.in b/src/cups/cups-genppdupdate.in
index 1a1a8f4..ee49a0b 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.25 2006/05/22 20:25:51 rleigh Exp $
+# $Id: cups-genppdupdate.in,v 1.25.8.2 2007/05/29 01:47:26 rlk Exp $
# Update CUPS PPDs for Gutenprint queues.
# Copyright (C) 2002-2003 Roger Leigh (rleigh@debian.org)
#
@@ -25,6 +25,7 @@ use File::Copy qw(mv);
sub parse_options ();
sub update_ppd ($); # Original PPD filename
+sub get_ppd_contents ($$$$$); # Return contents of desired PPD
sub find_ppd ($$$$); # Gutenprint Filename, driver, language (e.g. en, sv),
# region (e.g. GB, DE)
sub get_default_types (*); # Source PPD FH
@@ -49,6 +50,8 @@ 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 $micro_version = "@GUTENPRINT_VERSION@";
+my $use_static_ppd = "@BUILD_CUPS_PPDS@";
my $ppd_dir = "@cups_conf_serverroot@/ppd"; # Location of in-use CUPS PPDs
my $ppd_root_dir = "@cups_conf_datadir@/model";
@@ -56,6 +59,11 @@ 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;
+my $exit_after_parse_args = 0;
+
+my $serverdir = "@cups_conf_serverbin@";
+
+$Getopt::Std::STANDARD_HELP_VERSION = 1;
my @ppd_files; # A list of in-use Gutenprint PPD files
@@ -166,21 +174,53 @@ if (!$quiet || $verbose) {
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";
+ if ($no_action) {
+ print STDOUT "Did not update any PPD files\n";
+ } else {
+ print STDOUT "Failed to update any PPD files\n";
+ }
exit (0);
}
}
+sub HELP_MESSAGE($;$$$) {
+ my ($fh) = @_;
+ print $fh "Usage: $0 [OPTION]... [PPD_FILE]...\n";
+ print $fh "Update CUPS+Gutenprint PPD files.\n\n";
+ print $fh " -d flags Enable debugging\n";
+ print $fh " -h Display this help text\n";
+ print $fh " -n No-action. Don't overwrite any PPD files.\n";
+ print $fh " -q Quiet mode. No messages except errors.\n";
+ print $fh " -s ppd_dir Use ppd_dir as the source PPD directory.\n";
+ print $fh " -v Verbose messages.\n";
+ print $fh " -N Reset options to defaults.\n";
+ print $fh " -o out_dir Output PPD files to out_dir.\n";
+ exit(0);
+}
+# Getopt::Std calls VERSION_MESSAGE followed by HELP_MESSAGE if --help
+# is passed. If --version is passed, it calls only VERSION_MESSAGE.
+# So we have to make sure to exit, but we want to allow --help to
+# print out the help message.
+sub VERSION_MESSAGE($;$$$) {
+ my ($fh) = @_;
+ print "cups-genppdupdate from Gutenprint $micro_version\n";
+ $exit_after_parse_args = 1;
+}
-sub parse_options () {
- getopts("dhnqs:vNo:");
+sub help() {
+ HELP_MESSAGE(\*STDOUT);
+}
+sub parse_options () {
+ if (!getopts('d:hnqs:vNo:')) {
+ help();
+ }
if ($opt_n) {
$no_action = 1;
}
if ($opt_d) {
- $debug = 1;
+ $debug = $opt_d;
}
if ($opt_s) {
if (-d $opt_s) {
@@ -210,20 +250,81 @@ sub parse_options () {
}
}
if ($opt_h) {
- 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";
- print " -n No-action. Don't overwrite any PPD files.\n";
- 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);
+ help();
+ }
+ if ($exit_after_parse_args) {
+ exit(0);
}
}
+sub get_ppd_contents($$$$$) {
+ my ($ppd_source_filename, $filename, $driver, $locale, $region) = @_;
+
+ my $source_data;
+ my ($new_ppd_filename);
+
+ if ($use_static_ppd eq "no") {
+ my ($driver_bin) = "$serverdir/driver/gutenprint.$version";
+ my ($driver_version) = `$driver_bin VERSION`;
+ chomp $driver_version;
+ if ($driver_version eq "@VERSION@") {
+ my ($simplified);
+ if ($filename =~ m,.*/([^/]*)(.sim)(.ppd)?(.gz)?$,) {
+ $simplified = "simple";
+ } else {
+ $simplified = "expert";
+ }
+ my ($url);
+ foreach $url ("gutenprint.$version://$driver/$simplified/${locale}_${region}",
+ "gutenprint.$version://$driver/$simplified/${locale}",
+ "gutenprint.$version://$driver/$simplified") {
+ $new_ppd_filename = $url;
+ if (open PPD, "$driver_bin cat $url 2>/dev/null |") {
+ while (<PPD>) {
+ $source_data .= $_;
+ }
+ close PPD;
+ if ($source_data) {
+ return ( $new_ppd_filename, $source_data );
+ }
+ }
+ }
+ }
+ # Otherwise fall through and try to find a static PPD
+ }
+
+ # Search for a PPD matching our criteria...
+
+ $new_ppd_filename = find_ppd($filename, $driver, $locale, $region);
+ if (!defined($new_ppd_filename)) {
+ # There wasn't a valid source PPD file, so give up.
+ print STDERR "$ppd_source_filename: no valid candidate for replacement. Skipping\n";
+ print STDERR "$ppd_source_filename: please upgrade this PPD manually\n";
+ return ("", 0);
+ }
+ if ($debug & 1) {
+ print "Candidate PPD: $new_ppd_filename\n";
+ }
+
+ my $suffix = "\\" . $gzext; # Add '\', so m// matches the '.'.
+ if ($new_ppd_filename =~ m/.gz$/) { # Decompress input buffer
+ open GZIN, "gunzip -c $new_ppd_filename |"
+ or die "$_: can't open for decompression: $!";
+ while (<GZIN>) {
+ $source_data .= $_;
+ }
+ close GZIN;
+ } else {
+ open SOURCE, $new_ppd_filename
+ or die "$new_ppd_filename: can't open source file: $!";
+ binmode SOURCE;
+ my $source_size = (stat(SOURCE))[7];
+ read (SOURCE, $source_data, $source_size)
+ or die "$new_ppd_filename: error reading source: $!";
+ close SOURCE or die "$new_ppd_filename: can't close file: $!";
+ }
+ return ( $new_ppd_filename, $source_data );
+}
# Update the named PPD file.
sub update_ppd ($) {
@@ -237,7 +338,7 @@ sub update_ppd ($) {
open ORIG, $_ or die "$_: can't open PPD file: $!";
seek (ORIG, 0, 0) or die "can't seek to start of PPD file";
my @orig_metadata = stat(ORIG);
- if ($debug) {
+ if ($debug & 1) {
print "Source Filename: $ppd_source_filename\n";
}
my ($filename) = "";
@@ -274,7 +375,7 @@ sub update_ppd ($) {
print STDERR "$ppd_source_filename: this PPD file cannot be upgraded automatically (only files based on Gutenprint 4.3.21 and newer can be)\n";
return 0;
}
- if ($debug) {
+ if ($debug & 2) {
print "Gutenprint Filename: $filename\n";
print "Locale: $locale\n";
print "Language: $lingo\n";
@@ -295,46 +396,19 @@ sub update_ppd ($) {
if (! defined($region)) {
$region = "";
}
- if ($debug) {
- print "Locale: $locale\n";
+ if ($debug & 2) {
+ print "Base Locale: $locale\n";
print "Region: $region\n";
}
- # Search for a PPD matching our criteria...
-
- my $source = find_ppd($filename, $driver, $locale, $region);
- if (!defined($source)) {
- # There wasn't a valid source PPD file, so give up.
- print STDERR "$ppd_source_filename: no valid candidate for replacement. Skipping\n";
- print STDERR "$ppd_source_filename: please upgrade this PPD manually\n";
- return 0;
- }
- if ($debug) {
- print "Candidate PPD: $source\n";
- }
-
-
# Read in the new PPD, decompressing it if needed...
- my $source_data;
+ my ($new_ppd_filename, $source_data) =
+ get_ppd_contents($ppd_source_filename, $filename,
+ $driver, $locale, $region);
- my $suffix = "\\" . $gzext; # Add '\', so m// matches the '.'.
- if ($source =~ m/.gz$/) { # Decompress input buffer
- open GZIN, "gunzip -c $source |"
- or die "$_: can't open for decompression: $!";
- while (<GZIN>) {
- $source_data .= $_;
- }
- close GZIN;
- }
- else {
- open SOURCE, $source
- or die "$source: can't open source file: $!";
- binmode SOURCE;
- my $source_size = (stat(SOURCE))[7];
- read (SOURCE, $source_data, $source_size)
- or die "$source: error reading source: $!";
- close SOURCE or die "$source: can't close file: $!";
+ if (! $source_data) {
+ die "Unable to retrieve PPD file!\n";
}
# Save new PPD in a temporary file, for processing...
@@ -360,30 +434,55 @@ sub update_ppd ($) {
close $tmpfile or die "can't close temporary file $tmpfile: $!";
- if ($debug) {
- print "Original Default Types:\n";
- foreach (sort keys %orig_default_types) {
- print " $_: $orig_default_types{$_}\n";
- }
- print "New Default Types:\n";
- foreach (sort keys %new_default_types) {
- print " $_: $new_default_types{$_}\n";
- }
- print "Defaults:\n";
- foreach (sort keys %defaults) {
- print " $_: $defaults{$_}\n";
- }
- print "Options:\n";
+ if ($debug & 4) {
+ print "Options (Old->New Default Type):\n";
foreach (sort keys %options) {
- print " $_: ";
+ my ($old_type) = $orig_default_types{$_};
+ my ($new_type) = $new_default_types{$_};
+ if (! defined($old_type)) {
+ $old_type = '(New)';
+ }
+ if ($old_type ne $new_type) {
+ print " $_ ($old_type -> $new_type) : ";
+ } else {
+ print " $_ ($new_type) : ";
+ }
+ my ($def) = $defaults{"Default$_"};
foreach my $opt (@{$options{$_}}) {
+ if (defined $def && $def eq $opt) {
+ print "*";
+ }
print "$opt ";
}
print "\n";
}
-
+ print "Non-UI Defaults:\n";
+ foreach (sort keys %defaults) {
+ my ($xkey) = $_;
+ $xkey =~ s/^Default//;
+ if (! defined ($options{$xkey})) {
+ print " $_: $defaults{$_}\n";
+ }
+ }
+ print "Default Types of dropped options:\n";
+ foreach (sort keys %orig_default_types) {
+ if (! defined($options{$_})) {
+ print " $_: $orig_default_types{$_}\n";
+ }
+ }
}
+ if ($no_action) {
+ if (!$quiet || $verbose) {
+ if ($ppd_dest_filename eq $ppd_source_filename) {
+ print STDOUT "Would update $ppd_source_filename using $new_ppd_filename\n";
+ } else {
+ print STDOUT "Would update $ppd_source_filename to $ppd_dest_filename using $new_ppd_filename\n";
+ }
+ }
+ return 0;
+ }
+
if (! $reset_defaults) {
# Update source buffer with old defaults...
@@ -412,12 +511,10 @@ default_loop:
next default_loop;
}
}
- printf STDERR
- "$ppd_source_filename: Invalid option: *$default_option: $defaults{$default_option}. Skipped.\n";
+ warn "Warning: $ppd_source_filename: Invalid option: *$default_option: $defaults{$default_option}. Using default setting.\n";
next;
}
- print STDERR
- "$ppd_source_filename: PPD OpenUI method $new_default_types{$_} not understood. Skipped\n";
+ warn "Warning: $ppd_source_filename: PPD OpenUI method $new_default_types{$_} not understood.\n";
}
}
@@ -445,9 +542,9 @@ default_loop:
if (!$quiet || $verbose) {
if ($ppd_dest_filename eq $ppd_source_filename) {
- print STDOUT "Updated $ppd_source_filename using $source\n";
+ print STDOUT "Updated $ppd_source_filename using $new_ppd_filename\n";
} else {
- print STDOUT "Updated $ppd_source_filename to $ppd_dest_filename using $source\n";
+ print STDOUT "Updated $ppd_source_filename to $ppd_dest_filename using $new_ppd_filename\n";
}
}
return 1;
@@ -492,7 +589,7 @@ sub find_ppd ($$$$) {
$ppd_root_dir) {
if (! $basedir || ! $base) { next; }
my ($fn) = "$basedir/$lingo$base$suffix";
- if ($debug) {
+ if ($debug & 8) {
print "Trying $fn for $gutenprintfilename, $lang, $region\n";
}
# Check that it is a regular file, owned by root.root, not writable
@@ -508,17 +605,17 @@ sub find_ppd ($$$$) {
$file_version = `cat $fn | grep '$key'`;
}
if ($file_version ne "") {
- if ($debug) {
+ if ($debug & 8) {
print " Format valid: time $sb[9] best $current_best_time prev $current_best_file cur $fn!\n";
}
if ($sb[9] > $current_best_time) {
$current_best_time = $sb[9];
$current_best_file = $fn;
- if ($debug) {
+ if ($debug & 8) {
print STDERR "***current_best_file is $fn\n";
}
}
- } elsif ($debug) {
+ } elsif ($debug & 8) {
print " Format invalid\n";
}
}
diff --git a/src/cups/epson.c b/src/cups/epson.c
index 38fec8c..e1e14c4 100644
--- a/src/cups/epson.c
+++ b/src/cups/epson.c
@@ -1,5 +1,5 @@
/*
- * "$Id: epson.c,v 1.7 2006/03/18 23:54:49 rlk Exp $"
+ * "$Id: epson.c,v 1.7.8.1 2007/05/12 19:32:08 faust3 Exp $"
*
* EPSON backend for the Common UNIX Printing System.
*
@@ -66,6 +66,14 @@
# include <netdb.h>
#endif /* WIN32 || __EMX__ */
+#ifdef __linux
+# include <sys/param.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <dirent.h>
+# include <unistd.h>
+#endif /* __linux */
+
#ifdef __sgi
# include <invent.h>
# ifndef INV_EPP_ECP_PLP
@@ -515,6 +523,7 @@ list_devices(void)
int fd; /* File descriptor */
char device[255]; /* Device filename */
FILE *probe; /* /proc/parport/n/autoprobe file */
+ DIR *dirprobe; /* scan /sys/bus/usb/drivers/usblp */
char line[1024], /* Line from file */
*delim, /* Delimiter in file */
make[IPP_MAX_NAME], /* Make from file */
@@ -527,12 +536,17 @@ list_devices(void)
for (i = 0; i < 4; i ++)
{
- sprintf(device, "/proc/parport/%d/autoprobe", i);
- if ((probe = fopen(device, "r")) != NULL)
+ sprintf(device, "/proc/sys/dev/parport/parport%d/autoprobe", i);
+ probe = fopen(device, "r");
+ if ( probe == NULL ) /* older kernel versions */
+ {
+ sprintf(device, "/proc/parport/%d/autoprobe", i);
+ probe = fopen(device, "r");
+ }
+ if ( probe != NULL )
{
memset(make, 0, sizeof(make));
memset(model, 0, sizeof(model));
- strcpy(model, "EPSON");
while (fgets(line, sizeof(line), probe) != NULL)
{
@@ -550,17 +564,17 @@ list_devices(void)
*/
if (strncmp(line, "MODEL:", 6) == 0 &&
- strncmp(line, "MODEL:EPSON", 13) != 0)
+ strncmp(line, "MODEL:Unknown", 13) != 0)
strncpy(model, line + 6, sizeof(model) - 1);
else if (strncmp(line, "MANUFACTURER:", 13) == 0 &&
- strncmp(line, "MANUFACTURER:EPSON", 20) != 0)
+ strncmp(line, "MANUFACTURER:Unknown", 20) != 0)
strncpy(make, line + 13, sizeof(make) - 1);
}
fclose(probe);
- if (strcmp(make, "EPSON") == 0)
- printf("direct epson:/dev/lp%d \"%s %s\" \"Parallel Port #%d\"\n",
+ if (strcasecmp(make, "EPSON") == 0)
+ printf("direct epson:/dev/lp%d \"%s %s\" \"Gutenprint Parallel Port #%d\"\n",
i, make, model, i + 1);
}
else
@@ -569,7 +583,7 @@ list_devices(void)
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct epson:%s \"EPSON\" \"Parallel Port #%d\"\n", device, i + 1);
+ printf("direct epson:%s \"EPSON\" \"Gutenprint Parallel Port #%d\"\n", device, i + 1);
}
}
}
@@ -578,7 +592,110 @@ list_devices(void)
* Probe for USB devices...
*/
- if ((probe = fopen("/proc/bus/usb/devices", "r")) != NULL)
+ if ((dirprobe = opendir("/sys/class/usb")) != NULL) /* SYSFS in kernel 2.6 */
+ {
+ struct dirent *dirent; /* directory entries */
+ struct stat statbuf; /* file stat */
+ char entry[MAXPATHLEN]; /* pathname to usb entries */
+ char link[MAXPATHLEN]; /* linkname of usb entries */
+ char *cptr; /* multi used character pointer */
+ FILE *file; /* read printer specific info from */
+
+ i = 0;
+ /* scan the directory entries */
+ while((dirent = readdir(dirprobe)) != 0)
+ {
+ /* skip "." and ".." */
+ if (dirent->d_name[0] != 'l' || dirent->d_name[1] != 'p')
+ continue;
+
+ /* generate path to work with */
+ snprintf(entry, MAXPATHLEN, "/sys/class/usb/%s/device", dirent->d_name);
+
+ /* look, if we have a pointer */
+ if(lstat(entry, &statbuf) < 0)
+ {
+ perror(entry);
+ continue;
+ }
+
+ if (S_ISLNK(statbuf.st_mode))
+ {
+ /* get the path to the link */
+ if (readlink(entry, link, MAXPATHLEN) < 0)
+ continue;
+
+ /* find right occurance of '/' */
+ if ((cptr = strrchr(link, '/')) == NULL)
+ {
+ continue;
+ }
+
+ /*
+ * and truncate path: cut away everything after the '/',
+ * because parallel directory contains the information we need
+ */
+ *cptr = '\0';
+
+ memset(make, 0, sizeof(make));
+ memset(model, 0, sizeof(model));
+ /* read manufacturer */
+ snprintf(entry, MAXPATHLEN, "/sys/class/usb/%s/%s/manufacturer",
+ dirent->d_name, link);
+
+ if ((file = fopen(entry, "r")) == NULL)
+ {
+ /* skip this entry, there is no file "manufacturer" */
+ continue;
+ }
+ /* read data in */
+ fread(make, sizeof(make)-1, sizeof(char), file);
+ fclose(file);
+
+ /* beautify "make" - strip newline away */
+ if ((cptr = strrchr(make, '\n')) != NULL)
+ {
+ *cptr = '\0';
+ }
+
+ /* next entry, if manufacturer is not EPSON */
+ if (strcasecmp(make, "EPSON") != 0)
+ continue;
+
+ /* read product name */
+ snprintf(entry, MAXPATHLEN, "/sys/class/usb/%s/%s/product",
+ dirent->d_name, link);
+
+ if ((file = fopen(entry, "r")) == NULL)
+ {
+ /* skip this entry, there is no file "product" */
+ continue;
+ }
+ /* read data in */
+ fread(model, sizeof(model)-1, sizeof(char), file);
+ fclose(file);
+
+ /* beautify "model" - strip away newline */
+ if ((cptr = strrchr(model, '\n')) != NULL)
+ {
+ *cptr = '\0';
+ }
+ sprintf(device, "/dev/usb/%s", dirent->d_name);
+ if (access(device, 0))
+ {
+ sprintf(device, "/dev/usb/usb%s", dirent->d_name);
+
+ if (access(device, 0))
+ sprintf(device, "/dev/usb%s", dirent->d_name);
+ }
+
+ printf("direct epson:%s \"%s %s\" \"Gutenprint USB Printer #%d\"\n",
+ device, make, model, ++i);
+ }
+ }
+ closedir(dirprobe);
+ }
+ else if ((probe = fopen("/proc/bus/usb/devices", "r")) != NULL)
{
i = 0;
@@ -632,7 +749,7 @@ list_devices(void)
sprintf(device, "/dev/usblp%d", i);
}
- printf("direct epson:%s \"%s %s\" \"USB Printer #%d\"\n",
+ printf("direct epson:%s \"%s %s\" \"Gutenprint USB Printer #%d\"\n",
device, make, model, i + 1);
}
@@ -653,21 +770,21 @@ list_devices(void)
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct epson:%s \"EPSON\" \"USB Printer #%d\"\n", device, i + 1);
+ printf("direct epson:%s \"EPSON\" \"Gutenprint USB Printer #%d\"\n", device, i + 1);
}
sprintf(device, "/dev/usb/usblp%d", i);
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct epson:%s \"EPSON\" \"USB Printer #%d\"\n", device, i + 1);
+ printf("direct epson:%s \"EPSON\" \"Gutenprint USB Printer #%d\"\n", device, i + 1);
}
sprintf(device, "/dev/usblp%d", i);
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct epson:%s \"EPSON\" \"USB Printer #%d\"\n", device, i + 1);
+ printf("direct epson:%s \"EPSON\" \"Gutenprint USB Printer #%d\"\n", device, i + 1);
}
}
}
@@ -691,7 +808,7 @@ list_devices(void)
* Standard parallel port...
*/
- puts("direct epson:/dev/plpbi \"EPSON\" \"Onboard Parallel Port\"");
+ puts("direct epson:/dev/plpbi \"EPSON\" \"Gutenprint Onboard Parallel Port\"");
}
}
@@ -709,7 +826,7 @@ list_devices(void)
{
sprintf(device, "/dev/ecpp%d", i);
if (access(device, 0) == 0)
- printf("direct epson:%s \"EPSON\" \"Sun IEEE-1284 Parallel Port #%d\"\n",
+ printf("direct epson:%s \"EPSON\" \"Gutenprint Sun IEEE-1284 Parallel Port #%d\"\n",
device, i + 1);
}
@@ -718,7 +835,7 @@ list_devices(void)
sprintf(device, "/dev/lp%d", i);
if (access(device, 0) == 0)
- printf("direct epson:%s \"EPSON\" \"PC Parallel Port #%d\"\n",
+ printf("direct epson:%s \"EPSON\" \"Gutenprint PC Parallel Port #%d\"\n",
device, i + 1);
}
#elif defined(FreeBSD) || defined(OpenBSD) || defined(NetBSD)
@@ -737,14 +854,14 @@ list_devices(void)
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct epson:%s \"EPSON\" \"Parallel Port #%d (interrupt-driven)\"\n", device, i + 1);
+ printf("direct epson:%s \"EPSON\" \"Gutenprint Parallel Port #%d (interrupt-driven)\"\n", device, i + 1);
}
sprintf(device, "/dev/lpa%d", i);
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct epson:%s \"EPSON\" \"Parallel Port #%d (polled)\"\n", device, i + 1);
+ printf("direct epson:%s \"EPSON\" \"Gutenprint Parallel Port #%d (polled)\"\n", device, i + 1);
}
}
@@ -758,7 +875,7 @@ list_devices(void)
if ((fd = open(device, O_RDWR)) >= 0)
{
close(fd);
- printf("direct epson:%s \"EPSON\" \"USB Port #%d\"\n", device, i + 1);
+ printf("direct epson:%s \"EPSON\" \"Gutenprint USB Port #%d\"\n", device, i + 1);
}
}
#endif
@@ -766,5 +883,5 @@ list_devices(void)
/*
- * End of "$Id: epson.c,v 1.7 2006/03/18 23:54:49 rlk Exp $".
+ * End of "$Id: epson.c,v 1.7.8.1 2007/05/12 19:32:08 faust3 Exp $".
*/
diff --git a/src/cups/genppd.c b/src/cups/genppd.c
index 6f77c62..4b49ba6 100644
--- a/src/cups/genppd.c
+++ b/src/cups/genppd.c
@@ -1,9 +1,9 @@
/*
- * "$Id: genppd.c,v 1.118 2006/05/28 16:59:03 rlk Exp $"
+ * "$Id: genppd.c,v 1.119.2.3 2007/05/29 01:47:26 rlk Exp $"
*
* PPD file generation program for the CUPS drivers.
*
- * Copyright 1993-2005 by Easy Software Products and Robert Krawitz.
+ * Copyright 1993-2007 by Easy Software Products and Robert Krawitz.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License,
@@ -21,7 +21,7 @@
* Attn: CUPS Licensing Information
* Easy Software Products
* 44141 Airport View Drive, Suite 204
- * Hollywood, Maryland 20636-3111 USA
+ * Hollywood, Maryland 20636 USA
*
* Voice: (301) 373-9603
* EMail: cups-info@cups.org
@@ -29,14 +29,20 @@
*
* Contents:
*
- * main() - Process files on the command-line...
- * usage() - Show program usage.
- * help() - Show detailed program usage.
- * getlangs() - Get available translations.
- * printlangs() - Show available translations.
- * printmodels() - Show available printer models.
- * checkcat() - Check message catalogue exists.
- * write_ppd() - Write a PPD file.
+ * main() - Process files on the command-line...
+ * cat_ppd() - Copy the named PPD to stdout.
+ * generate_ppd() - Generate a PPD file.
+ * getlangs() - Get a list of available translations.
+ * help() - Show detailed help.
+ * is_special_option() - Determine if an option should be grouped.
+ * list_ppds() - List the available drivers.
+ * print_group_close() - Close a UI group.
+ * print_group_open() - Open a new UI group.
+ * printlangs() - Print list of available translations.
+ * printmodels() - Print a list of available models.
+ * set_language() - Set the current translation language.
+ * usage() - Show program usage.
+ * write_ppd() - Write a PPD file.
*/
/*
@@ -57,8 +63,26 @@
#include <string.h>
#include <ctype.h>
#include <errno.h>
+#include <libgen.h>
+
+#ifdef CUPS_DRIVER_INTERFACE
+# ifdef HAVE_LIBZ
+# undef HAVE_LIBZ
+# endif /* HAVE_LIBZ */
+#endif /* CUPS_DRIVER_INTERFACE */
+
+static const char *cups_modeldir = CUPS_MODELDIR;
+
#ifdef HAVE_LIBZ
#include <zlib.h>
+static const char *gzext = ".gz";
+#else
+static const char *gzext = "";
+# define gzopen fopen
+# define gzclose fclose
+# define gzFile FILE *
+# define gzprintf fprintf
+# define gzputs(f,s) fputs((s),(f))
#endif
#include <cups/cups.h>
@@ -68,6 +92,17 @@
#include <gutenprint/gutenprint-intl.h>
/*
+ * Some of the Gutenprint resolution names are not PPD-compliant.
+ * In Gutenprint 5.0, use the legacy names with the CUPS 1.1 interface
+ * for back compatibility. With CUPS 1.2, or Gutenprint 5.1 or above,
+ * generate compliant names.
+ */
+
+#if defined(CUPS_DRIVER_INTERFACE) || (STP_MAJOR_VERSION > 5) || (STP_MAJOR_VERSION == 5 && STP_MINOR_VERSION > 0)
+#define USE_COMPLIANT_RESOLUTIONS 1
+#endif
+
+/*
* Note:
*
* The current release of ESP Ghostscript is fully Level 3 compliant,
@@ -76,33 +111,11 @@
int cups_ppd_ps_level = CUPS_PPD_PS_LEVEL;
-static const char *cups_modeldir = CUPS_MODELDIR;
-
/*
* File handling stuff...
*/
static const char *ppdext = ".ppd";
-#ifdef HAVE_LIBZ
-static const char *gzext = ".gz";
-#else
-static const char *gzext = "";
-# define gzFile FILE *
-# define gzopen fopen
-# define gzclose fclose
-# define gzprintf fprintf
-# define gzputs(f,s) fputs((s),(f))
-# define gzputc(f,c) putc((c),(f))
-#endif /* HAVE_LIBZ */
-
-
-/*
- * Size data...
- */
-
-#define DEFAULT_SIZE "Letter"
-/*#define DEFAULT_SIZE "A4"*/
-#define CATALOG "LC_MESSAGES/gutenprint.mo"
typedef struct /**** Media size values ****/
{
@@ -149,55 +162,271 @@ const char *parameter_level_names[] =
* Local functions...
*/
-void usage(void);
-void help(void);
-char ** getlangs(void);
-static int stpi_scandir (const char *dir,
- struct dirent ***namelist,
- int (*sel) (const struct dirent *),
- int (*cmp) (const void *, const void *));
-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, int simplified);
+#ifdef CUPS_DRIVER_INTERFACE
+static int cat_ppd(int argc, char **argv);
+static int list_ppds(const char *argv0);
+#else /* !CUPS_DRIVER_INTERFACE */
+static int generate_ppd(const char *prefix, int verbose,
+ const stp_printer_t *p, const char *language,
+ int simplified);
+static void help(void);
+static void printlangs(char** langs);
+static void printmodels(int verbose);
+static void usage(void);
+#endif /* !CUPS_DRIVER_INTERFACE */
+#ifdef ENABLE_NLS
+static char **getlangs(void);
+static void set_language(const char *lang);
+#endif /* ENABLE_NLS */
+static int is_special_option(const char *name);
+static void print_group_close(gzFile fp, stp_parameter_class_t p_class,
+ stp_parameter_level_t p_level);
+static void print_group_open(gzFile fp, stp_parameter_class_t p_class,
+ stp_parameter_level_t p_level);
+static int write_ppd(gzFile fp, const stp_printer_t *p,
+ const char *language, const char *ppd_location,
+ int simplified);
+
+#ifdef ENABLE_NLS
+typedef struct {
+ const char *lang;
+ const char *mapping;
+} locale_map;
+
+static const locale_map lang_mappings[] =
+ {
+ { "cs", "CS_CZ" },
+ { "da", "da_DK" },
+ { "de", "de_DE" },
+ { "el", "el_GR" },
+ { "es", "es_ES" },
+ { "fr", "fr_FR" },
+ { "hu", "hu_HU" },
+ { "ja", "ja_JP" },
+ { "nb", "nb_NO" },
+ { "nl", "nl_NL" },
+ { "pl", "pl_PL" },
+ { "pt", "pt_PT" },
+ { "sk", "sk_SK" },
+ { "sv", "sv_SE" },
+ };
+static int lang_map_count = sizeof(lang_mappings) / sizeof(locale_map);
+
+static const char *baselocaledir = PACKAGE_LOCALE_DIR;
+#endif
/*
* Global variables...
*/
-const char *baselocaledir = PACKAGE_LOCALE_DIR;
-static int
-is_special_option(const char *name)
+
+#ifdef CUPS_DRIVER_INTERFACE
+
+/*
+ * 'main()' - Process files on the command-line...
+ */
+
+int /* O - Exit status */
+main(int argc, /* I - Number of command-line arguments */
+ char *argv[]) /* I - Command-line arguments */
{
- int i = 0;
- while (special_options[i])
+
+ /*
+ * Initialise libgutenprint
+ */
+
+ stp_init();
+
+ /*
+ * Process command-line...
+ */
+
+ if (argc == 2 && !strcmp(argv[1], "list"))
+ return (list_ppds(argv[0]));
+ else if (argc == 3 && !strcmp(argv[1], "cat"))
+ return (cat_ppd(argc, argv));
+ else if (argc == 2 && !strcmp(argv[1], "VERSION"))
{
- if (strcmp(name, special_options[i]) == 0)
- return 1;
- i++;
+ printf("%s\n", VERSION);
+ return (0);
}
- return 0;
+ else
+ {
+ fprintf(stderr, "Usage: %s list\n", argv[0]);
+ fprintf(stderr, " %s cat URI\n", argv[0]);
+ return (1);
+ }
}
-static void
-print_group_open(FILE *fp, stp_parameter_class_t p_class,
- stp_parameter_level_t p_level)
+
+/*
+ * 'cat_ppd()' - Copy the named PPD to stdout.
+ */
+
+static int /* O - Exit status */
+cat_ppd(int argc, char **argv) /* I - Driver URI */
{
- gzprintf(fp, "*OpenGroup: %s %s\n\n",
- gettext(parameter_class_names[p_class]),
- gettext(parameter_level_names[p_level]));
+ const char *uri = argv[2];
+ char scheme[64], /* URI scheme */
+ userpass[32], /* URI user/pass (unused) */
+ hostname[32], /* URI hostname */
+ resource[1024]; /* URI resource */
+ int port; /* URI port (unused) */
+ http_uri_status_t status; /* URI decode status */
+ const stp_printer_t *p; /* Printer driver */
+ const char *lang = "C";
+ char *s;
+#ifdef ENABLE_NLS
+ char **all_langs = getlangs();
+#endif
+ char filename[1024], /* Filename */
+ ppd_location[1024]; /* Installed location */
+
+ if ((status = httpSeparateURI(HTTP_URI_CODING_ALL, uri,
+ scheme, sizeof(scheme),
+ userpass, sizeof(userpass),
+ hostname, sizeof(hostname),
+ &port, resource, sizeof(resource)))
+ < HTTP_URI_OK)
+ {
+ fprintf(stderr, "ERROR: Bad ppd-name \"%s\" (%d)!\n", uri, status);
+ return (1);
+ }
+
+ s = strchr(resource + 1, '/');
+ if (s)
+ {
+ lang = s + 1;
+ *s = '\0';
+ }
+
+#ifdef ENABLE_NLS
+ if (!lang || strcmp(lang, "C") != 0)
+ {
+ while (*all_langs)
+ {
+ if (!strcmp(lang, *all_langs))
+ break;
+ all_langs++;
+ }
+ if (! *all_langs)
+ {
+ fprintf(stderr, "ERROR: Unable to find language \"%s\"!\n", lang);
+ return (1);
+ }
+ }
+ set_language(lang);
+#endif
+
+ if ((p = stp_get_printer_by_driver(hostname)) == NULL)
+ {
+ fprintf(stderr, "ERROR: Unable to find driver \"%s\"!\n", hostname);
+ return (1);
+ }
+
+ /*
+ * This isn't really the right thing to do. We really shouldn't
+ * be embedding filenames in automatically generated PPD files, but
+ * if the user ever decides to go back from generated PPD files to
+ * static PPD files we'll need to have this for genppdupdate to work.
+ */
+ snprintf(filename, sizeof(filename) - 1, "%s/stp-%s.%s%s%s%s",
+ "ppd", hostname, GUTENPRINT_RELEASE_VERSION,
+ strcmp(resource + 1, "simple") ? "" : ".sim", ppdext, gzext);
+ snprintf(ppd_location, sizeof(ppd_location) - 1, "%s%s%s/%s",
+ cups_modeldir,
+ cups_modeldir[strlen(cups_modeldir) - 1] == '/' ? "" : "/",
+ lang ? lang : "C",
+ filename);
+
+ return (write_ppd(stdout, p, lang, ppd_location,
+ !strcmp(resource + 1, "simple")));
}
-static void
-print_group_close(FILE *fp, stp_parameter_class_t p_class,
- stp_parameter_level_t p_level)
+/*
+ * 'list_ppds()' - List the available drivers.
+ */
+
+static int /* O - Exit status */
+list_ppds(const char *argv0) /* I - Name of program */
{
- gzprintf(fp, "*CloseGroup: %s %s\n\n",
- gettext(parameter_class_names[p_class]),
- gettext(parameter_level_names[p_level]));
+ const char *scheme; /* URI scheme */
+ int i; /* Looping var */
+ const stp_printer_t *printer; /* Pointer to printer driver */
+#if defined(ENABLE_NLS) && defined(CUPS_TRANSLATED_PPDS)
+ char **langs = getlangs();
+ char **langptr;
+#endif
+
+ if ((scheme = strrchr(argv0, '/')) != NULL)
+ scheme ++;
+ else
+ scheme = argv0;
+
+ for (i = 0; i < stp_printer_model_count(); i++)
+ if ((printer = stp_get_printer_by_index(i)) != NULL)
+ {
+ if (!strcmp(stp_printer_get_family(printer), "ps") ||
+ !strcmp(stp_printer_get_family(printer), "raw"))
+ continue;
+
+ printf("\"%s://%s/expert/%s\" "
+ "%s "
+ "\"%s\" "
+ "\"%s" CUPS_PPD_NICKNAME_STRING VERSION "\" "
+ "\"\"\n", /* No IEEE-1284 Device ID yet */
+ scheme, stp_printer_get_driver(printer), "C",
+ "en",
+ stp_printer_get_manufacturer(printer),
+ stp_printer_get_long_name(printer));
+
+#ifdef GENERATE_SIMPLIFIED_PPDS
+ printf("\"%s://%s/simple/%s\" "
+ "%s "
+ "\"%s\" "
+ "\"%s" CUPS_PPD_NICKNAME_STRING VERSION " Simplified\" "
+ "\"\"\n", /* No IEEE-1284 Device ID yet */
+ scheme, stp_printer_get_driver(printer), "C",
+ "en",
+ stp_printer_get_manufacturer(printer),
+ stp_printer_get_long_name(printer));
+#endif
+#if defined(ENABLE_NLS) && defined(CUPS_TRANSLATED_PPDS)
+ langptr = langs;
+ while (*langptr != 0 && strcmp(*langptr, "") != 0)
+ {
+ printf("\"%s://%s/expert/%s\" "
+ "%s "
+ "\"%s\" "
+ "\"%s" CUPS_PPD_NICKNAME_STRING VERSION "\" "
+ "\"\"\n", /* No IEEE-1284 Device ID yet */
+ scheme, stp_printer_get_driver(printer), *langptr,
+ *langptr,
+ stp_printer_get_manufacturer(printer),
+ stp_printer_get_long_name(printer));
+
+#ifdef GENERATE_SIMPLIFIED_PPDS
+ printf("\"%s://%s/simple/%s\" "
+ "%s "
+ "\"%s\" "
+ "\"%s" CUPS_PPD_NICKNAME_STRING VERSION " Simplified\" "
+ "\"\"\n", /* No IEEE-1284 Device ID yet */
+ scheme, stp_printer_get_driver(printer), *langptr,
+ *langptr,
+ stp_printer_get_manufacturer(printer),
+ stp_printer_get_long_name(printer));
+#endif
+ langptr++;
+ }
+#endif
+ }
+
+ return (0);
}
+#endif /* CUPS_DRIVER_INTERFACE */
+
+#ifndef CUPS_DRIVER_INTERFACE
/*
* 'main()' - Process files on the command-line...
@@ -239,6 +468,7 @@ main(int argc, /* I - Number of command-line arguments */
break;
case 'h':
help();
+ exit(EXIT_SUCCESS);
break;
case 'v':
verbose = 1;
@@ -247,16 +477,18 @@ main(int argc, /* I - Number of command-line arguments */
verbose = 0;
break;
case 'c':
+# ifdef ENABLE_NLS
baselocaledir = optarg;
-#ifdef DEBUG
- fprintf (stderr, "DEBUG: baselocaledir: %s\n", baselocaledir);
-#endif
+# ifdef DEBUG
+ fprintf(stderr, "DEBUG: baselocaledir: %s\n", baselocaledir);
+# endif
+# endif
break;
case 'p':
prefix = optarg;
-#ifdef DEBUG
- fprintf (stderr, "DEBUG: prefix: %s\n", prefix);
-#endif
+# ifdef DEBUG
+ fprintf(stderr, "DEBUG: prefix: %s\n", prefix);
+# endif
break;
case 'l':
language = optarg;
@@ -278,7 +510,7 @@ main(int argc, /* I - Number of command-line arguments */
break;
case 'V':
printf("cups-genppd version %s, "
- "Copyright (c) 1993-2005 by Easy Software Products and Robert Krawitz.\n\n",
+ "Copyright 1993-2006 by Easy Software Products and Robert Krawitz.\n\n",
VERSION);
printf("Default CUPS PPD PostScript Level: %d\n", cups_ppd_ps_level);
printf("Default PPD location (prefix): %s\n", CUPS_MODELDIR);
@@ -291,8 +523,8 @@ main(int argc, /* I - Number of command-line arguments */
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
- "\n"
- "You should have received a copy of the GNU General Public License\n"
+ "\n");
+ puts("You should have received a copy of the GNU General Public License\n"
"along with this program; if not, please contact Easy Software\n"
"Products at:\n"
"\n"
@@ -304,11 +536,11 @@ main(int argc, /* I - Number of command-line arguments */
" Voice: (301) 373-9603\n"
" EMail: cups-info@cups.org\n"
" WWW: http://www.cups.org\n");
- exit (EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
break;
default:
usage();
- exit (EXIT_FAILURE);
+ exit(EXIT_FAILURE);
break;
}
}
@@ -320,15 +552,11 @@ main(int argc, /* I - Number of command-line arguments */
{
models[n] = argv[optind+n];
}
- models[numargs] = (char*) NULL;
+ models[numargs] = (char*)NULL;
n=0;
}
-#ifdef ENABLE_NLS
- langs = getlangs();
-#endif
-
/*
* Initialise libgutenprint
*/
@@ -339,68 +567,27 @@ main(int argc, /* I - Number of command-line arguments */
* Set the language...
*/
- if (language)
- {
- unsetenv("LC_CTYPE");
- unsetenv("LC_COLLATE");
- unsetenv("LC_TIME");
- unsetenv("LC_NUMERIC");
- unsetenv("LC_MONETARY");
- unsetenv("LC_MESSAGES");
- unsetenv("LC_ALL");
- unsetenv("LANG");
- setenv("LC_ALL", language, 1);
- setenv("LANG", language, 1);
- }
- setlocale(LC_ALL, "");
+# ifdef ENABLE_NLS
+ langs = getlangs();
-#ifdef LC_NUMERIC
- setlocale(LC_NUMERIC, "C");
-#endif /* LC_NUMERIC */
+ if (language)
+ set_language(language);
+# endif /* ENABLE_NLS */
/*
- * Set up the catalog
+ * Print lists
*/
-#ifdef ENABLE_NLS
- if (baselocaledir)
- {
- if ((bindtextdomain(PACKAGE, baselocaledir)) == NULL)
- {
- fprintf(stderr, "cups-genppd: cannot load message catalog %s under %s: %s\n",
- PACKAGE, baselocaledir, strerror(errno));
- exit(EXIT_FAILURE);
- }
-#ifdef DEBUG
- fprintf (stderr, "DEBUG: bound textdomain: %s under %s\n",
- PACKAGE, baselocaledir);
-#endif
- if ((textdomain(PACKAGE)) == NULL)
- {
- fprintf(stderr, "cups-genppd: cannot select message catalog %s under %s: %s\n",
- PACKAGE, baselocaledir, strerror(errno));
- exit(EXIT_FAILURE);
- }
-#ifdef DEBUG
- fprintf (stderr, "DEBUG: textdomain set: %s\n", PACKAGE);
-#endif
- }
-#endif
-
- /*
- * Print lists
- */
-
if (opt_printlangs)
{
printlangs(langs);
- exit (EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
if (opt_printmodels)
{
printmodels(verbose);
- exit (EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/*
@@ -419,11 +606,11 @@ main(int argc, /* I - Number of command-line arguments */
if (printer)
{
if ((which_ppds & 1) &&
- write_ppd(printer, prefix, language, verbose, 1))
- return 1;
+ generate_ppd(prefix, verbose, printer, language, 1))
+ return (1);
if ((which_ppds & 2) &&
- write_ppd(printer, prefix, language, verbose, 0))
- return 1;
+ generate_ppd(prefix, verbose, printer, language, 0))
+ return (1);
}
else
{
@@ -442,45 +629,109 @@ main(int argc, /* I - Number of command-line arguments */
if (printer)
{
if ((which_ppds & 1) &&
- write_ppd(printer, prefix, language, verbose, 1))
+ generate_ppd(prefix, verbose, printer, language, 1))
return (1);
if ((which_ppds & 2) &&
- write_ppd(printer, prefix, language, verbose, 0))
+ generate_ppd(prefix, verbose, printer, language, 0))
return (1);
}
}
}
if (!verbose)
fprintf(stderr, " done.\n");
- if (langs)
- {
- char **langs_tmp = langs;
- while (*langs_tmp)
- {
- stp_free(*langs_tmp);
- langs_tmp++;
- }
- stp_free(langs);
- }
return (0);
}
/*
- * 'usage()' - Show program usage...
+ * 'generate_ppd()' - Generate a PPD file.
*/
-void
-usage(void)
+static int /* O - Exit status */
+generate_ppd(
+ const char *prefix, /* I - PPD directory prefix */
+ int verbose, /* I - Verbosity level */
+ const stp_printer_t *p, /* I - Driver */
+ const char *language, /* I - Primary language */
+ int simplified) /* I - 1 = simplified options */
{
- puts("Usage: cups-genppd [-c localedir] "
- "[-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"
- " cups-genppd -V\n");
+ int status; /* Exit status */
+ gzFile fp; /* File to write to */
+ char filename[1024], /* Filename */
+ ppd_location[1024]; /* Installed location */
+ struct stat dir; /* Prefix dir status */
+
+
+ /*
+ * Skip the PostScript drivers...
+ */
+
+ if (!strcmp(stp_printer_get_family(p), "ps") ||
+ !strcmp(stp_printer_get_family(p), "raw"))
+ return (0);
+
+ /*
+ * Make sure the destination directory exists...
+ */
+
+ if (stat(prefix, &dir) && !S_ISDIR(dir.st_mode))
+ {
+ if (mkdir(prefix, 0777))
+ {
+ printf("cups-genppd: Cannot create directory %s: %s\n",
+ prefix, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ /*
+ * The files will be named stp-<driver>.<major>.<minor>.ppd, for
+ * example:
+ *
+ * stp-escp2-ex.5.0.ppd
+ *
+ * or
+ *
+ * stp-escp2-ex.5.0.ppd.gz
+ */
+
+ snprintf(filename, sizeof(filename) - 1, "%s/stp-%s.%s%s%s%s",
+ prefix, stp_printer_get_driver(p), GUTENPRINT_RELEASE_VERSION,
+ simplified ? ".sim" : "", ppdext, gzext);
+
+ /*
+ * Open the PPD file...
+ */
+
+ if ((fp = gzopen(filename, "wb")) == NULL)
+ {
+ fprintf(stderr, "cups-genppd: Unable to create file \"%s\" - %s.\n",
+ filename, strerror(errno));
+ return (2);
+ }
+
+ if (verbose)
+ fprintf(stderr, "Writing %s...\n", filename);
+ else
+ fprintf(stderr, ".");
+
+ snprintf(ppd_location, sizeof(ppd_location), "%s%s%s/%s",
+ cups_modeldir,
+ cups_modeldir[strlen(cups_modeldir) - 1] == '/' ? "" : "/",
+ language ? language : "C",
+ basename(filename));
+
+ status = write_ppd(fp, p, language, ppd_location, simplified);
+
+ gzclose(fp);
+
+ return (status);
}
+/*
+ * 'help()' - Show detailed help.
+ */
+
void
help(void)
{
@@ -494,8 +745,8 @@ help(void)
" -L List available translations (message catalogs).\n"
" -M List available printer models.\n"
" -V Show version information and defaults.\n"
- " The default is to output PPDs.\n"
- "Options:\n"
+ " The default is to output PPDs.\n");
+ puts("Options:\n"
" -c localedir Use localedir as the base directory for locale data.\n"
" -l locale Output PPDs translated with messages for locale.\n"
" -p prefix Output PPDs in directory prefix.\n"
@@ -509,72 +760,46 @@ help(void)
}
/*
- * 'dirent_sort()' - sort directory entries
+ * 'usage()' - Show program usage.
*/
-static int
-dirent_sort(const void *a,
- const void *b)
-{
- return strcoll ((*(const struct dirent *const *) a)->d_name,
- (*(const struct dirent *const *) b)->d_name);
-}
-/*
- * 'getlangs()' - Get a list of available translations
- */
-
-char **
-getlangs(void)
+void
+usage(void)
{
- struct dirent** langdirs = NULL;
- int n;
- char **langs;
-
- n = stpi_scandir (baselocaledir, &langdirs, checkcat, dirent_sort);
- if (n >= 0)
- {
- int idx;
- langs = stp_malloc((n+1) * sizeof(char*));
- for (idx = 0; idx < n; ++idx)
- {
- langs[idx] = (char*) stp_malloc((strlen(langdirs[idx]->d_name)+1) * sizeof(char));
- strcpy(langs[idx], langdirs[idx]->d_name);
- free (langdirs[idx]); /* Must use plain free() */
- }
- langs[n] = NULL;
- free (langdirs); /* Must use plain free() */
- }
- else
- return NULL;
-
- return langs;
+ puts("Usage: cups-genppd [-c localedir] "
+ "[-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"
+ " cups-genppd -V\n");
}
-
/*
- * 'printlangs()' - Print list of available translations
+ * 'printlangs()' - Print list of available translations.
*/
-void printlangs(char **langs)
+void
+printlangs(char **langs) /* I - Languages */
{
if (langs)
{
int n = 0;
while (langs && langs[n])
{
- printf("%s\n", langs[n]);
+ puts(langs[n]);
n++;
}
}
- exit (EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/*
- * 'printmodels' - Print a list of available models
+ * 'printmodels()' - Print a list of available models.
*/
-void printmodels(int verbose)
+void
+printmodels(int verbose) /* I - Verbosity level */
{
const stp_printer_t *p;
int i;
@@ -593,182 +818,177 @@ void printmodels(int verbose)
printf("%s\n", stp_printer_get_driver(p));
}
}
- exit (EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
-/* Adapted from GNU libc <dirent.h>
- These macros extract size information from a `struct dirent *'.
- They may evaluate their argument multiple times, so it must not
- have side effects. Each of these may involve a relatively costly
- call to `strlen' on some systems, so these values should be cached.
-
- _D_EXACT_NAMLEN (DP) returns the length of DP->d_name, not including
- its terminating null character.
+#endif /* !CUPS_DRIVER_INTERFACE */
- _D_ALLOC_NAMLEN (DP) returns a size at least (_D_EXACT_NAMLEN (DP) + 1);
- that is, the allocation size needed to hold the DP->d_name string.
- Use this macro when you don't need the exact length, just an upper bound.
- This macro is less likely to require calling `strlen' than _D_EXACT_NAMLEN.
- */
-
-#ifdef _DIRENT_HAVE_D_NAMLEN
-# ifndef _D_EXACT_NAMLEN
-# define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
-# endif
-# ifndef _D_ALLOC_NAMLEN
-# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
-# endif
-#else
-# ifndef _D_EXACT_NAMLEN
-# define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
-# endif
-# ifndef _D_ALLOC_NAMLEN
-# ifdef _DIRENT_HAVE_D_RECLEN
-# define _D_ALLOC_NAMLEN(d) (((char *) (d) + (d)->d_reclen) - &(d)->d_name[0])
-# else
-# define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name : \
- _D_EXACT_NAMLEN (d) + 1)
-# endif
-# endif
-#endif
/*
- * 'stpi_scandir()' - BSD scandir() replacement.
+ * 'getlangs()' - Get a list of available translations.
*/
-static int
-stpi_scandir (const char *dir,
- struct dirent ***namelist,
- int (*sel) (const struct dirent *),
- int (*cmp) (const void *, const void *))
+#ifdef ENABLE_NLS
+char ** /* O - Array of languages */
+getlangs(void)
{
- DIR *dp = opendir (dir);
- struct dirent **v = NULL;
- size_t vsize = 0, i;
- struct dirent *d;
- int save;
+ int i; /* Looping var */
+ char *ptr; /* Pointer into string */
+ static char all_linguas[] = ALL_LINGUAS;
+ /* List of languages from configure.ac */
+ static char **langs = NULL; /* Array of languages */
- if (dp == NULL)
- return -1;
- save = errno;
- errno = 0;
+ if (!langs)
+ {
+ /*
+ * Create the langs array...
+ */
- i = 0;
- while ((d = readdir (dp)) != NULL)
- if (sel == NULL || (*sel) (d))
- {
- struct dirent *vnew;
- size_t dsize;
-
- /* Ignore errors from sel or readdir */
- errno = 0;
-
- if (i == vsize)
- {
- struct dirent **new;
- if (vsize == 0)
- vsize = 10;
- else
- vsize *= 2;
- new = (struct dirent **) realloc (v, vsize * sizeof (*v));
- if (new == NULL)
- break;
- v = new;
- }
-
- dsize = &d->d_name[_D_ALLOC_NAMLEN (d)] - (char *) d;
- vnew = (struct dirent *) malloc (dsize);
- if (vnew == NULL)
- break;
-
- v[i++] = (struct dirent *) memcpy (vnew, d, dsize);
- }
+ for (i = 1, ptr = strchr(all_linguas, ' '); ptr; ptr = strchr(ptr + 1, ' '))
+ i ++;
+
+ langs = calloc(i + 1, sizeof(char *));
- if (errno != 0)
+ langs[0] = all_linguas;
+ for (i = 1, ptr = strchr(all_linguas, ' '); ptr; ptr = strchr(ptr + 1, ' '))
{
- save = errno;
+ *ptr = '\0';
+ langs[i] = ptr + 1;
+ i ++;
+ }
+ }
- while (i > 0)
- free (v[--i]);
- free (v);
+ return (langs);
+}
- i = -1;
- }
- else
+/*
+ * 'set_language()' - Set the current translation language.
+ */
+
+static void
+set_language(const char *lang) /* I - Locale name */
+{
+ char *l = setlocale(LC_ALL, lang ? lang : "");
+
+ /* Make sure the locale we tried to set was accepted! */
+ if (lang && !l)
{
- /* Sort the list if we have a comparison function to sort with. */
- if (cmp != NULL)
- qsort (v, i, sizeof (*v), cmp);
+ int i;
+ for (i = 0; i < lang_map_count; i++)
+ {
+ const locale_map *lm = &(lang_mappings[i]);
+ if (!strcmp(lang, lm->lang))
+ {
+ l = setlocale(LC_ALL, lm->mapping);
+ if (l)
+ break;
+ }
+ }
+ }
- *namelist = v;
+# ifdef LC_CTYPE
+ setlocale(LC_CTYPE, l ? l : "");
+# endif /* LC_CTYPE */
+# ifdef LC_NUMERIC
+ setlocale(LC_NUMERIC, "C");
+# endif /* LC_NUMERIC */
+
+ /*
+ * Set up the catalog
+ */
+
+ if (baselocaledir)
+ {
+ if ((bindtextdomain(PACKAGE, baselocaledir)) == NULL)
+ {
+ fprintf(stderr, "cups-genppd: cannot load message catalog %s under %s: %s\n",
+ PACKAGE, baselocaledir, strerror(errno));
+ exit(EXIT_FAILURE);
}
- (void) closedir (dp);
- errno = save;
+# ifdef DEBUG
+ fprintf(stderr, "DEBUG: bound textdomain: %s under %s\n",
+ PACKAGE, baselocaledir);
+# endif /* DEBUG */
- return i;
+ if ((textdomain(PACKAGE)) == NULL)
+ {
+ fprintf(stderr,
+ "cups-genppd: cannot select message catalog %s under %s: %s\n",
+ PACKAGE, baselocaledir, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+# ifdef DEBUG
+ fprintf(stderr, "DEBUG: textdomain set: %s\n", PACKAGE);
+# endif /* DEBUG */
+ }
}
+#endif /* ENABLE_NLS */
/*
- * 'checkcat()' - A callback for stpi_scandir() to check
- * if a message catalogue exists
+ * 'is_special_option()' - Determine if an option should be grouped.
*/
-int
-checkcat (const struct dirent *localedir)
+static int /* O - 1 if non-grouped, 0 otherwise */
+is_special_option(const char *name) /* I - Option name */
{
- char* catpath;
- int catlen, status = 0, savederr;
- struct stat catstat;
-
- savederr = errno; /* since we are a callback, preserve stpi_scandir() state */
-
- /* LOCALEDIR / LANG / LC_MESSAGES/CATALOG */
- /* Add 3, for two '/' separators and '\0' */
- catlen = strlen(baselocaledir) + strlen(localedir->d_name) + strlen(CATALOG) + 3;
- catpath = (char*) stp_malloc(catlen * sizeof(char));
-
- strncpy (catpath, baselocaledir, strlen(baselocaledir));
- catlen = strlen(baselocaledir);
- *(catpath+catlen) = '/';
- catlen++;
- strncpy (catpath+catlen, localedir->d_name, strlen(localedir->d_name));
- catlen += strlen(localedir->d_name);
- *(catpath+catlen) = '/';
- catlen++;
- strncpy (catpath+catlen, CATALOG, strlen(CATALOG));
- catlen += strlen(CATALOG);
- *(catpath+catlen) = '\0';
-
- if (!stat (catpath, &catstat))
+ int i = 0;
+ while (special_options[i])
{
- if (S_ISREG(catstat.st_mode))
- {
- status = 1;
- }
- }
+ if (strcmp(name, special_options[i]) == 0)
+ return 1;
+ i++;
+ }
+ return 0;
+}
+
+
+/*
+ * 'print_group_close()' - Close a UI group.
+ */
+
+static void
+print_group_close(
+ gzFile fp, /* I - File to write to */
+ stp_parameter_class_t p_class, /* I - Option class */
+ stp_parameter_level_t p_level) /* I - Option level */
+{
+ gzprintf(fp, "*CloseGroup: %s %s\n\n",
+ gettext(parameter_class_names[p_class]),
+ gettext(parameter_level_names[p_level]));
+}
- stp_free (catpath);
- errno = savederr;
- return status;
+/*
+ * 'print_group_open()' - Open a new UI group.
+ */
+
+static void
+print_group_open(
+ gzFile fp, /* I - File to write to */
+ stp_parameter_class_t p_class, /* I - Option class */
+ stp_parameter_level_t p_level) /* I - Option level */
+{
+ gzprintf(fp, "*OpenGroup: %s %s\n\n",
+ gettext(parameter_class_names[p_class]),
+ gettext(parameter_level_names[p_level]));
}
+
/*
* 'write_ppd()' - Write a PPD file.
*/
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 simplified)
+write_ppd(
+ gzFile fp, /* I - File to write to */
+ const stp_printer_t *p, /* I - Printer driver */
+ const char *language, /* I - Primary language */
+ const char *ppd_location, /* I - Location of PPD file */
+ int simplified) /* I - 1 = simplified options */
{
int i, j, k, l; /* Looping vars */
- gzFile fp; /* File to write to */
- char filename[1024]; /* Filename */
int num_opts; /* Number of printer options */
int xdpi, ydpi; /* Resolution info */
stp_vars_t *v; /* Variable info */
@@ -778,10 +998,9 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
const char *driver; /* Driver name */
const char *long_name; /* Driver long name */
const char *manufacturer; /* Manufacturer of printer */
- const stp_vars_t *printvars; /* Printer option names */
+ const stp_vars_t *printvars; /* Printer option names */
paper_t *the_papers; /* Media sizes */
int cur_opt; /* Current option */
- struct stat dir; /* prefix dir status */
int variable_sizes; /* Does the driver support variable sizes? */
int min_width, /* Min/max custom size */
min_height,
@@ -795,6 +1014,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
int maximum_level = simplified ?
STP_PARAMETER_LEVEL_BASIC : STP_PARAMETER_LEVEL_ADVANCED4;
+
/*
* Initialize driver-specific variables...
*/
@@ -807,77 +1027,24 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
cur_opt = 0;
/*
- * Skip the PostScript drivers...
- */
-
- if (strcmp(stp_printer_get_family(p), "ps") == 0 ||
- strcmp(stp_printer_get_family(p), "raw") == 0)
- return (0);
-
- /*
- * Make sure the destination directory exists...
- */
-
-
- if (stat(prefix, &dir) && !S_ISDIR(dir.st_mode))
- {
- if (mkdir(prefix, 0777))
- {
- printf("cups-genppd: Cannot create directory %s: %s\n",
- prefix, strerror(errno));
- exit (EXIT_FAILURE);
- }
- }
-
- /*
- * The files will be named stp-<driver>.<major>.<minor>.ppd, for
- * example:
- *
- * stp-escp2-ex.5.0.ppd
- *
- * or
- *
- * stp-escp2-ex.5.0.ppd.gz
- */
- 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...
- */
-
- if ((fp = gzopen(filename, "wb")) == NULL)
- {
- fprintf(stderr, "cups-genppd: Unable to create file \"%s\" - %s.\n",
- filename, strerror(errno));
- return (2);
- }
-
- /*
* Write a standard header...
*/
- if (verbose)
- fprintf(stderr, "Writing %s...\n", filename);
- else
- fprintf(stderr, ".");
-
gzputs(fp, "*PPD-Adobe: \"4.3\"\n");
- gzputs(fp, "*%PPD file for CUPS/Gutenprint.\n");
- gzputs(fp, "*%Copyright 1993-2005 by Easy Software Products and Robert Krawitz.\n");
- gzputs(fp, "*%This program is free software; you can redistribute it and/or\n");
- gzputs(fp, "*%modify it under the terms of the GNU General Public License,\n");
- gzputs(fp, "*%version 2, as published by the Free Software Foundation.\n");
+ gzputs(fp, "*% PPD file for CUPS/Gutenprint.\n");
+ gzputs(fp, "*% Copyright 1993-2006 by Easy Software Products and Robert Krawitz.\n");
+ gzputs(fp, "*% This program is free software; you can redistribute it and/or\n");
+ gzputs(fp, "*% modify it under the terms of the GNU General Public License,\n");
+ gzputs(fp, "*% version 2, as published by the Free Software Foundation.\n");
gzputs(fp, "*%\n");
- gzputs(fp, "*%This program is distributed in the hope that it will be useful, but\n");
- gzputs(fp, "*%WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n");
- gzputs(fp, "*%or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n");
- gzputs(fp, "*%for more details.\n");
+ gzputs(fp, "*% This program is distributed in the hope that it will be useful, but\n");
+ gzputs(fp, "*% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n");
+ gzputs(fp, "*% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n");
+ gzputs(fp, "*% for more details.\n");
gzputs(fp, "*%\n");
- gzputs(fp, "*%You should have received a copy of the GNU General Public License\n");
- gzputs(fp, "*%along with this program; if not, write to the Free Software\n");
- gzputs(fp, "*%Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n");
+ gzputs(fp, "*% You should have received a copy of the GNU General Public License\n");
+ gzputs(fp, "*% along with this program; if not, write to the Free Software\n");
+ gzputs(fp, "*% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n");
gzputs(fp, "*%\n");
gzputs(fp, "*FormatVersion: \"4.3\"\n");
gzputs(fp, "*FileVersion: \"" VERSION "\"\n");
@@ -925,11 +1092,11 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
* with commas. Now use a dash instead...
*/
- /*
- * NOTE - code in rastertoprinter looks for this version string.
- * If this is changed, the corresponding change must be made in
- * rastertoprinter.c. Look for "ppd->nickname"
- */
+ /*
+ * NOTE - code in rastertoprinter looks for this version string.
+ * If this is changed, the corresponding change must be made in
+ * rastertoprinter.c. Look for "ppd->nickname"
+ */
gzprintf(fp, "*NickName: \"%s%s%s%s\"\n",
long_name, CUPS_PPD_NICKNAME_STRING, VERSION,
simplified ? " Simplified" : "");
@@ -987,16 +1154,8 @@ 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%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");
+ gzprintf(fp, "*StpPPDLocation: \"%s\"\n", ppd_location);
+ gzprintf(fp, "*StpLocale: \"%s\"\n", language ? language : "C");
/*
* Get the page sizes from the driver...
@@ -1064,6 +1223,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
the_papers[cur_opt].top = height - top;
cur_opt++;
+ stp_clear_string_parameter(v, "PageSize");
}
/*
@@ -1076,6 +1236,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzputs(fp, "*OpenUI *PageSize: PickOne\n");
gzputs(fp, "*OrderDependency: 10 AnySetup *PageSize\n");
gzprintf(fp, "*DefaultPageSize: %s\n", desc.deflt.str);
+ gzprintf(fp, "*StpDefaultPageSize: %s\n", desc.deflt.str);
for (i = 0; i < cur_opt; i ++)
{
gzprintf(fp, "*PageSize %s", the_papers[i].name);
@@ -1087,6 +1248,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzputs(fp, "*OpenUI *PageRegion: PickOne\n");
gzputs(fp, "*OrderDependency: 10 AnySetup *PageRegion\n");
gzprintf(fp, "*DefaultPageRegion: %s\n", desc.deflt.str);
+ gzprintf(fp, "*StpDefaultPageRegion: %s\n", desc.deflt.str);
for (i = 0; i < cur_opt; i ++)
{
gzprintf(fp, "*PageRegion %s", the_papers[i].name);
@@ -1096,6 +1258,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzputs(fp, "*CloseUI: *PageRegion\n\n");
gzprintf(fp, "*DefaultImageableArea: %s\n", desc.deflt.str);
+ gzprintf(fp, "*StpDefaultImageableArea: %s\n", desc.deflt.str);
for (i = 0; i < cur_opt; i ++)
{
gzprintf(fp, "*ImageableArea %s", the_papers[i].name);
@@ -1106,6 +1269,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzputs(fp, "\n");
gzprintf(fp, "*DefaultPaperDimension: %s\n", desc.deflt.str);
+ gzprintf(fp, "*StpDefaultPaperDimension: %s\n", desc.deflt.str);
for (i = 0; i < cur_opt; i ++)
{
@@ -1143,6 +1307,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzputs(fp, "*ParamCustomPageSize WidthOffset: 3 points 0 0\n");
gzputs(fp, "*ParamCustomPageSize HeightOffset: 4 points 0 0\n");
gzputs(fp, "*ParamCustomPageSize Orientation: 5 int 0 0\n\n");
+ stp_clear_string_parameter(v, "PageSize");
}
stp_parameter_description_destroy(&desc);
@@ -1157,9 +1322,15 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzputs(fp, "*OrderDependency: 10 AnySetup *ColorModel\n");
if (printer_is_color)
- gzputs(fp, "*DefaultColorModel: RGB\n");
+ {
+ gzputs(fp, "*DefaultColorModel: RGB\n");
+ gzputs(fp, "*StpDefaultColorModel: RGB\n");
+ }
else
- gzputs(fp, "*DefaultColorModel: Gray\n");
+ {
+ gzputs(fp, "*DefaultColorModel: Gray\n");
+ gzputs(fp, "*StpDefaultColorModel: Gray\n");
+ }
gzprintf(fp, "*ColorModel Gray/Grayscale:\t\"<<"
"/cupsColorSpace %d"
@@ -1218,6 +1389,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzputs(fp, "*OpenUI *StpColorPrecision/Color Precision: PickOne\n");
gzputs(fp, "*OrderDependency: 10 AnySetup *StpColorPrecision\n");
gzputs(fp, "*DefaultStpColorPrecision: Normal\n");
+ gzputs(fp, "*StpDefaultStpColorPrecision: Normal\n");
gzputs(fp, "*StpColorPrecision Normal/Normal:\t\"<<"
"/cupsBitsPerColor 8>>setpagedevice\"\n");
gzputs(fp, "*StpColorPrecision Best/Best:\t\"<<"
@@ -1238,6 +1410,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzprintf(fp, "*OpenUI *MediaType/%s: PickOne\n", _("Media Type"));
gzputs(fp, "*OrderDependency: 10 AnySetup *MediaType\n");
gzprintf(fp, "*DefaultMediaType: %s\n", desc.deflt.str);
+ gzprintf(fp, "*StpDefaultMediaType: %s\n", desc.deflt.str);
for (i = 0; i < num_opts; i ++)
{
@@ -1262,6 +1435,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzprintf(fp, "*OpenUI *InputSlot/%s: PickOne\n", _("Media Source"));
gzputs(fp, "*OrderDependency: 10 AnySetup *InputSlot\n");
gzprintf(fp, "*DefaultInputSlot: %s\n", desc.deflt.str);
+ gzprintf(fp, "*StpDefaultInputSlot: %s\n", desc.deflt.str);
for (i = 0; i < num_opts; i ++)
{
@@ -1284,8 +1458,9 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
stp_clear_string_parameter(v, "Resolution");
has_quality_parameter = 1;
gzprintf(fp, "*OpenUI *StpQuality/%s: PickOne\n", gettext(desc.text));
- gzputs(fp, "*OrderDependency: 5 AnySetup *StpQuality\n");
+ gzputs(fp, "*OrderDependency: 10 AnySetup *StpQuality\n");
gzprintf(fp, "*DefaultStpQuality: %s\n", desc.deflt.str);
+ gzprintf(fp, "*StpDefaultStpQuality: %s\n", desc.deflt.str);
num_opts = stp_string_list_count(desc.bounds.str);
for (i = 0; i < num_opts; i++)
{
@@ -1319,12 +1494,43 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
if (!simplified || desc.p_level == STP_PARAMETER_LEVEL_BASIC)
{
+#ifdef USE_COMPLIANT_RESOLUTIONS
+ stp_string_list_t *res_list = stp_string_list_create();
+ char res_name[64]; /* Plenty long enough for XXXxYYYdpi */
+ int resolution_ok;
+ int tmp_xdpi, tmp_ydpi;
+#endif
+
gzprintf(fp, "*OpenUI *Resolution/%s: PickOne\n", _("Resolution"));
- gzputs(fp, "*OrderDependency: 20 AnySetup *Resolution\n");
+ gzputs(fp, "*OrderDependency: 10 AnySetup *Resolution\n");
if (has_quality_parameter)
- gzprintf(fp, "*DefaultResolution: None\n");
+ {
+ gzprintf(fp, "*DefaultResolution: None\n");
+ gzprintf(fp, "*StpDefaultResolution: None\n");
+ }
else
+ {
+#ifdef USE_COMPLIANT_RESOLUTIONS
+ stp_set_string_parameter(v, "Resolution", desc.deflt.str);
+ stp_describe_resolution(v, &xdpi, &ydpi);
+
+ if (xdpi == ydpi)
+ (void) snprintf(res_name, 63, "%ddpi", xdpi);
+ else
+ (void) snprintf(res_name, 63, "%dx%ddpi", xdpi, ydpi);
+ gzprintf(fp, "*DefaultResolution: %s\n", res_name);
+ gzprintf(fp, "*StpDefaultResolution: %s\n", res_name);
+ /*
+ * We need to add this to the resolution list here so that
+ * some non-default resolution won't wind up with the
+ * default resolution name
+ */
+ stp_string_list_add_string(res_list, res_name, res_name);
+#else /* !USE_COMPLIANT_RESOLUTIONS */
gzprintf(fp, "*DefaultResolution: %s\n", desc.deflt.str);
+ gzprintf(fp, "*StpDefaultResolution: %s\n", desc.deflt.str);
+#endif /* USE_COMPLIANT_RESOLUTIONS */
+ }
stp_clear_string_parameter(v, "Quality");
if (has_quality_parameter)
@@ -1342,14 +1548,38 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
if (xdpi == -1 || ydpi == -1)
continue;
- /*
- * Write the resolution option...
- */
-
+#ifdef USE_COMPLIANT_RESOLUTIONS
+ resolution_ok = 0;
+ tmp_xdpi = xdpi;
+ tmp_ydpi = ydpi;
+ do
+ {
+ if (tmp_xdpi == tmp_ydpi)
+ (void) snprintf(res_name, 63, "%ddpi", tmp_xdpi);
+ else
+ (void) snprintf(res_name, 63, "%dx%ddpi", tmp_xdpi, tmp_ydpi);
+ if (strcmp(opt->name, desc.deflt.str) == 0 ||
+ !stp_string_list_is_present(res_list, res_name))
+ {
+ resolution_ok = 1;
+ stp_string_list_add_string(res_list, res_name, res_name);
+ }
+ else if (tmp_ydpi > tmp_xdpi)
+ tmp_ydpi++;
+ else
+ tmp_xdpi++;
+ } while (!resolution_ok);
+ gzprintf(fp, "*Resolution %s/%s:\t\"<</HWResolution[%d %d]/cupsCompression %d>>setpagedevice\"\n",
+ res_name, opt->text, xdpi, ydpi, i + 1);
+#else /* !USE_COMPLIANT_RESOLUTIONS */
gzprintf(fp, "*Resolution %s/%s:\t\"<</HWResolution[%d %d]/cupsCompression %d>>setpagedevice\"\n",
opt->name, opt->text, xdpi, ydpi, i + 1);
+#endif /* USE_COMPLIANT_RESOLUTIONS */
}
+#ifdef USE_COMPLIANT_RESOLUTIONS
+ stp_string_list_destroy(res_list);
+#endif
gzputs(fp, "*CloseUI: *Resolution\n\n");
}
@@ -1361,13 +1591,14 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzputs(fp, "*OpenUI *OutputOrder: PickOne\n");
gzputs(fp, "*OrderDependency: 10 AnySetup *OutputOrder\n");
gzprintf(fp, "*DefaultOutputOrder: %s\n", desc.deflt.str);
+ gzprintf(fp, "*StpDefaultOutputOrder: %s\n", desc.deflt.str);
gzputs(fp, "*OutputOrder Normal/Normal: \"\"\n");
gzputs(fp, "*OutputOrder Reverse/Reverse: \"\"\n");
gzputs(fp, "*CloseUI: *OutputOrder\n\n");
}
stp_parameter_description_destroy(&desc);
- /*
+ /*
* Duplex
* Note that the opt->name strings MUST match those in the printer driver(s)
* else the PPD files will not be generated correctly
@@ -1379,9 +1610,10 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
num_opts = stp_string_list_count(desc.bounds.str);
if (num_opts > 0)
{
- gzputs(fp, "*OpenUI *Duplex/Double-Sided Printing: PickOne\n");
- gzputs(fp, "*OrderDependency: 20 AnySetup *Duplex\n");
+ gzprintf(fp, "*OpenUI *Duplex/%s: PickOne\n", _("2-Sided Printing"));
+ gzputs(fp, "*OrderDependency: 10 AnySetup *Duplex\n");
gzprintf(fp, "*DefaultDuplex: %s\n", desc.deflt.str);
+ gzprintf(fp, "*StpDefaultDuplex: %s\n", desc.deflt.str);
for (i = 0; i < num_opts; i++)
{
@@ -1398,6 +1630,16 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
}
stp_parameter_description_destroy(&desc);
+ gzprintf(fp, "*OpenUI *StpiShrinkOutput/%s: PickOne\n",
+ _("Shrink Page If Necessary to Fit Borders"));
+ gzputs(fp, "*OrderDependency: 10 AnySetup *StpiShrinkOutput\n");
+ gzputs(fp, "*DefaultStpiShrinkOutput: Shrink\n");
+ gzputs(fp, "*StpDefaultStpiShrinkOutput: Shrink\n");
+ gzprintf(fp, "*StpiShrinkOutput %s/%s: \"\"\n", "Shrink", _("Shrink (print the whole page)"));
+ gzprintf(fp, "*StpiShrinkOutput %s/%s: \"\"\n", "Crop", _("Crop (preserve dimensions)"));
+ gzprintf(fp, "*StpiShrinkOutput %s/%s: \"\"\n", "Expand", _("Expand (use maximum page area)"));
+ gzputs(fp, "*CloseUI: *StpiShrinkOutput\n\n");
+
param_list = stp_get_parameter_list(v);
for (j = 0; j <= STP_PARAMETER_CLASS_OUTPUT; j++)
@@ -1429,23 +1671,25 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
}
gzprintf(fp, "*OpenUI *Stp%s/%s: PickOne\n",
desc.name, gettext(desc.text));
-#if 0
- gzprintf(fp, "*OrderDependency: %d AnySetup *Stp%s\n",
- (100 + l + (j * param_count) +
- (k * STP_PARAMETER_LEVEL_INTERNAL * param_count)),
+ gzprintf(fp, "*OrderDependency: 10 AnySetup *Stp%s\n",
desc.name);
-#endif
- if (!desc.is_mandatory)
- gzprintf(fp, "*DefaultStp%s: None\n", desc.name);
switch (desc.p_type)
{
case STP_PARAMETER_TYPE_STRING_LIST:
if (desc.is_mandatory)
- gzprintf(fp, "*DefaultStp%s: %s\n",
- desc.name, desc.deflt.str);
+ {
+ gzprintf(fp, "*DefaultStp%s: %s\n",
+ desc.name, desc.deflt.str);
+ gzprintf(fp, "*StpDefaultStp%s: %s\n",
+ desc.name, desc.deflt.str);
+ }
else
- gzprintf(fp, "*Stp%s %s/%s: \"\"\n", desc.name,
- "None", _("None"));
+ {
+ gzprintf(fp, "*DefaultStp%s: None\n", desc.name);
+ gzprintf(fp, "*StpDefaultStp%s: None\n", desc.name);
+ gzprintf(fp, "*Stp%s %s/%s: \"\"\n", desc.name,
+ "None", _("None"));
+ }
num_opts = stp_string_list_count(desc.bounds.str);
for (i = 0; i < num_opts; i++)
{
@@ -1456,21 +1700,27 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
break;
case STP_PARAMETER_TYPE_BOOLEAN:
if (desc.is_mandatory)
- gzprintf(fp, "*DefaultStp%s: %s\n", desc.name,
- desc.deflt.boolean ? "True" : "False");
+ {
+ gzprintf(fp, "*DefaultStp%s: %s\n", desc.name,
+ desc.deflt.boolean ? "True" : "False");
+ gzprintf(fp, "*StpDefaultStp%s: %s\n", desc.name,
+ desc.deflt.boolean ? "True" : "False");
+ }
else
- gzprintf(fp, "*Stp%s %s/%s: \"\"\n", desc.name,
- "None", _("None"));
+ {
+ gzprintf(fp, "*DefaultStp%s: None\n", desc.name);
+ gzprintf(fp, "*StpDefaultStp%s: None\n", desc.name);
+ gzprintf(fp, "*Stp%s %s/%s: \"\"\n", desc.name,
+ "None", _("None"));
+ }
gzprintf(fp, "*Stp%s %s/%s: \"\"\n",
desc.name, "False", _("No"));
gzprintf(fp, "*Stp%s %s/%s: \"\"\n",
desc.name, "True", _("Yes"));
break;
case STP_PARAMETER_TYPE_DOUBLE:
- if (desc.is_mandatory)
- {
- gzprintf(fp, "*DefaultStp%s: None\n", desc.name);
- }
+ gzprintf(fp, "*DefaultStp%s: None\n", desc.name);
+ gzprintf(fp, "*StpDefaultStp%s: None\n", desc.name);
for (i = desc.bounds.dbl.lower * 1000;
i <= desc.bounds.dbl.upper * 1000 ; i += 100)
{
@@ -1491,11 +1741,21 @@ 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);
+
+ /*
+ * Add custom option code and value parameter...
+ */
+
+ gzprintf(fp, "*CustomStp%s True: \"pop\"\n", desc.name);
+ gzprintf(fp, "*ParamCustomStp%s Value/%s: 1 real %.3f %.3f\n\n",
+ desc.name, _("Value"), desc.bounds.dbl.lower,
+ desc.bounds.dbl.upper);
if (!simplified)
{
gzprintf(fp, "*OpenUI *StpFine%s/%s %s: PickOne\n",
desc.name, gettext(desc.text), _("Fine Adjustment"));
gzprintf(fp, "*DefaultStpFine%s:None\n", desc.name);
+ gzprintf(fp, "*StpDefaultStpFine%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",
@@ -1503,15 +1763,23 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzprintf(fp, "*CloseUI: *StpFine%s\n\n", desc.name);
}
print_close_ui = 0;
-
+
break;
case STP_PARAMETER_TYPE_DIMENSION:
if (desc.is_mandatory)
- gzprintf(fp, "*DefaultStp%s: %d\n",
- desc.name, desc.deflt.dimension);
+ {
+ gzprintf(fp, "*DefaultStp%s: %d\n",
+ desc.name, desc.deflt.dimension);
+ gzprintf(fp, "*StpDefaultStp%s: %d\n",
+ desc.name, desc.deflt.dimension);
+ }
else
- gzprintf(fp, "*Stp%s %s/%s: \"\"\n", desc.name,
- "None", _("None"));
+ {
+ gzprintf(fp, "*DefaultStp%s: None\n", desc.name);
+ gzprintf(fp, "*StpDefaultStp%s: None\n", desc.name);
+ gzprintf(fp, "*Stp%s %s/%s: \"\"\n", desc.name,
+ "None", _("None"));
+ }
for (i = desc.bounds.dimension.lower;
i <= desc.bounds.dimension.upper; i++)
{
@@ -1523,6 +1791,20 @@ 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);
}
+
+ print_close_ui = 0;
+ gzprintf(fp, "*CloseUI: *Stp%s\n\n", desc.name);
+
+ /*
+ * Add custom option code and value parameter...
+ */
+
+ gzprintf(fp, "*CustomStp%s True: \"pop\"\n", desc.name);
+ gzprintf(fp, "*ParamCustomStp%s Value/%s: 1 points %d %d\n\n",
+ desc.name, _("Value"),
+ desc.bounds.dimension.lower,
+ desc.bounds.dimension.upper);
+
break;
default:
break;
@@ -1579,12 +1861,9 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
gzputs(fp, "*Font ZapfChancery-MediumItalic: Standard \"(001.007S)\" Standard ROM\n");
gzputs(fp, "*Font ZapfDingbats: Special \"(001.004S)\" Standard ROM\n");
- gzprintf(fp, "\n*%%End of stp-%s.%s%s\n",
- driver,
- GUTENPRINT_RELEASE_VERSION,
- ppdext);
-
- gzclose(fp);
+ gzprintf(fp, "\n*%% End of stp-%s.%s%s%s\n",
+ driver, GUTENPRINT_RELEASE_VERSION, simplified ? ".sim" : "",
+ ppdext);
stp_vars_destroy(v);
return (0);
@@ -1592,5 +1871,5 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
/*
- * End of "$Id: genppd.c,v 1.118 2006/05/28 16:59:03 rlk Exp $".
+ * End of "$Id: genppd.c,v 1.119.2.3 2007/05/29 01:47:26 rlk Exp $".
*/
diff --git a/src/cups/rastertoprinter.c b/src/cups/rastertoprinter.c
index 626fcf9..52d3592 100644
--- a/src/cups/rastertoprinter.c
+++ b/src/cups/rastertoprinter.c
@@ -1,9 +1,9 @@
/*
- * "$Id: rastertoprinter.c,v 1.104 2006/07/04 02:19:14 rlk Exp $"
+ * "$Id: rastertoprinter.c,v 1.105.2.1 2007/03/02 12:01:16 rlk Exp $"
*
* Gutenprint based raster filter for the Common UNIX Printing System.
*
- * Copyright 1993-2003 by Easy Software Products.
+ * Copyright 1993-2007 by Easy Software Products.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License,
@@ -89,6 +89,7 @@ typedef struct
int adjusted_width;
int adjusted_height;
int last_percent;
+ int shrink_to_fit;
cups_page_header_t header; /* Page header from file */
} cups_image_t;
@@ -219,6 +220,7 @@ print_debug_block(const stp_vars_t *v, const cups_image_t *cups)
fprintf(stderr, "DEBUG: Gutenprint stp_get_top(v) |%d|\n", stp_get_top(v));
fprintf(stderr, "DEBUG: Gutenprint stp_get_page_width(v) |%d|\n", stp_get_page_width(v));
fprintf(stderr, "DEBUG: Gutenprint stp_get_page_height(v) |%d|\n", stp_get_page_height(v));
+ fprintf(stderr, "DEBUG: Gutenprint shrink page to fit %d\n", cups->shrink_to_fit);
params = stp_get_parameter_list(v);
nparams = stp_parameter_list_count(params);
for (i = 0; i < nparams; i++)
@@ -347,13 +349,13 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings)
switch (cups->header.cupsColorSpace)
{
case CUPS_CSPACE_W :
- /* Olympus photo printers don't support black & white ink! */
+ /* DyeSub photo printers don't support black & white ink! */
if (printer_supports_bw(v))
set_string_parameter(v, "PrintingMode", "BW");
set_string_parameter(v, "InputImageType", "Whitescale");
break;
case CUPS_CSPACE_K :
- /* Olympus photo printers don't support black & white ink! */
+ /* DyeSub photo printers don't support black & white ink! */
if (printer_supports_bw(v))
set_string_parameter(v, "PrintingMode", "BW");
set_string_parameter(v, "InputImageType", "Grayscale");
@@ -413,6 +415,8 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings)
set_string_parameter(v, "Duplex", "DuplexNoTumble");
}
+ cups->shrink_to_fit = stp_get_int_parameter(v, "CUPSShrinkPage");
+
set_string_parameter(v, "JobMode", "Job");
validate_options(v, cups);
stp_get_media_size(v, &(cups->width), &(cups->height));
@@ -437,9 +441,14 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings)
tmp_height = cups->bottom - cups->top;
if (tmp_left < cups->left)
{
- cups->left_trim = cups->left - tmp_left;
+ if (cups->shrink_to_fit != 1)
+ {
+ cups->left_trim = cups->left - tmp_left;
+ tmp_left = cups->left;
+ }
+ else
+ cups->left_trim = 0;
fprintf(stderr, "DEBUG: Gutenprint left margin %d\n", cups->left_trim);
- tmp_left = cups->left;
}
else
{
@@ -450,9 +459,14 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings)
}
if (tmp_right > cups->right)
{
- cups->right_trim = tmp_right - cups->right;
+ if (cups->shrink_to_fit != 1)
+ {
+ cups->right_trim = tmp_right - cups->right;
+ tmp_right = cups->right;
+ }
+ else
+ cups->right_trim = 0;
fprintf(stderr, "DEBUG: Gutenprint right margin %d\n", cups->right_trim);
- tmp_right = cups->right;
}
else
{
@@ -463,9 +477,14 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings)
}
if (tmp_top < cups->top)
{
- cups->top_trim = cups->top - tmp_top;
+ if (cups->shrink_to_fit != 1)
+ {
+ cups->top_trim = cups->top - tmp_top;
+ tmp_top = cups->top;
+ }
+ else
+ cups->top_trim = 0;
fprintf(stderr, "DEBUG: Gutenprint top margin %d\n", cups->top_trim);
- tmp_top = cups->top;
}
else
{
@@ -476,9 +495,14 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings)
}
if (tmp_bottom > cups->bottom)
{
- cups->bottom_trim = tmp_bottom - cups->bottom;
+ if (cups->shrink_to_fit != 1)
+ {
+ cups->bottom_trim = tmp_bottom - cups->bottom;
+ tmp_bottom = cups->bottom;
+ }
+ else
+ cups->bottom_trim = 0;
fprintf(stderr, "DEBUG: Gutenprint bottom margin %d\n", cups->bottom_trim);
- tmp_bottom = cups->bottom;
}
else
{
@@ -488,13 +512,28 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings)
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);
+ if (cups->shrink_to_fit == 2)
+ {
+ int t_left, t_right, t_bottom, t_top;
+ stp_get_imageable_area(v, &(t_left), &(t_right), &(t_bottom), &(t_top));
+ stp_set_width(v, t_right - t_left);
+ stp_set_height(v, t_bottom - t_top);
+ stp_set_left(v, t_left);
+ stp_set_top(v, t_top);
+ }
+ else
+ {
+ 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;
+ if (cups->shrink_to_fit == 1)
+ cups->width = tmp_right - tmp_left;
+ else
+ 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;
@@ -505,7 +544,10 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings)
cups->adjusted_width = cups->header.cupsWidth;
cups->bottom = cups->height - cups->bottom;
- cups->height = cups->height - cups->top - cups->bottom;
+ if (cups->shrink_to_fit == 1)
+ cups->height = tmp_bottom - tmp_top;
+ else
+ cups->height = cups->height - cups->top - cups->bottom;
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;
@@ -546,14 +588,32 @@ set_all_options(stp_vars_t *v, cups_option_t *options, int num_options,
stp_parameter_list_t params = stp_get_parameter_list(v);
int nparams = stp_parameter_list_count(params);
int i;
+ const char *val; /* CUPS option value */
+ ppd_option_t *ppd_option;
+ val = cupsGetOption("StpiShrinkOutput", num_options, options);
+ if (!val)
+ {
+ ppd_option = ppdFindOption(ppd, "StpiShrinkOutput");
+ if (ppd_option)
+ val = ppd_option->defchoice;
+ }
+ if (val)
+ {
+ if (!strcasecmp(val, "crop"))
+ stp_set_int_parameter(v, "CUPSShrinkPage", 0);
+ else if (!strcasecmp(val, "expand"))
+ stp_set_int_parameter(v, "CUPSShrinkPage", 2);
+ else
+ stp_set_int_parameter(v, "CUPSShrinkPage", 1);
+ }
+ else
+ stp_set_int_parameter(v, "CUPSShrinkPage", 1);
for (i = 0; i < nparams; i++)
{
const stp_parameter_t *param = stp_parameter_list_param(params, i);
stp_parameter_t desc;
char *ppd_option_name = stp_malloc(strlen(param->name) + 8); /* StpFineFOO\0 */
- const char *val; /* CUPS option value */
- ppd_option_t *ppd_option;
stp_describe_parameter(v, param->name, &desc);
if (desc.p_type == STP_PARAMETER_TYPE_DOUBLE)
{
@@ -565,7 +625,17 @@ set_all_options(stp_vars_t *v, cups_option_t *options, int num_options,
if (ppd_option)
val = ppd_option->defchoice;
}
- if (val && strlen(val) > 0 && strcmp(val, "None") != 0)
+ if (val && !strncasecmp(val, "Custom.", 7))
+ {
+ double dval = atof(val + 7);
+
+ fprintf(stderr, "DEBUG: Gutenprint set float %s to %f\n",
+ desc.name, dval);
+ if (dval > desc.bounds.dbl.upper)
+ dval = desc.bounds.dbl.upper;
+ stp_set_float_parameter(v, desc.name, dval);
+ }
+ else if (val && strlen(val) > 0 && strcmp(val, "None") != 0)
{
double coarse_val = atof(val) * 0.001;
double fine_val = 0;
@@ -608,13 +678,20 @@ set_all_options(stp_vars_t *v, cups_option_t *options, int num_options,
set_string_parameter(v, desc.name, val);
break;
case STP_PARAMETER_TYPE_INT:
+ if (!strncasecmp(val, "Custom.", 7))
+ val += 7;
+
fprintf(stderr, "DEBUG: Gutenprint set int %s to %s\n",
desc.name, val);
stp_set_int_parameter(v, desc.name, atoi(val));
break;
case STP_PARAMETER_TYPE_DIMENSION:
+ if (!strncasecmp(val, "Custom.", 7))
+ val += 7;
+
fprintf(stderr, "DEBUG: Gutenprint set dimension %s to %s\n",
desc.name, val);
+
stp_set_dimension_parameter(v, desc.name, atoi(val));
break;
case STP_PARAMETER_TYPE_BOOLEAN:
@@ -979,7 +1056,7 @@ cups_errfunc(void *file, const char *buf, size_t bytes)
* 'cancel_job()' - Cancel the current job...
*/
-void
+static void
cancel_job(int sig) /* I - Signal */
{
(void)sig;
@@ -1018,7 +1095,7 @@ throwaway_data(int amount, cups_image_t *cups)
cupsRasterReadPixels(cups->ras, trash, leftover);
}
-stp_image_status_t
+static stp_image_status_t
Image_get_row(stp_image_t *image, /* I - Image */
unsigned char *data, /* O - Row */
size_t byte_limit, /* I - how many bytes in data */
@@ -1201,5 +1278,5 @@ Image_width(stp_image_t *image) /* I - Image */
/*
- * End of "$Id: rastertoprinter.c,v 1.104 2006/07/04 02:19:14 rlk Exp $".
+ * End of "$Id: rastertoprinter.c,v 1.105.2.1 2007/03/02 12:01:16 rlk Exp $".
*/
diff --git a/src/escputil/Makefile.in b/src/escputil/Makefile.in
index b07898b..95fee43 100644
--- a/src/escputil/Makefile.in
+++ b/src/escputil/Makefile.in
@@ -48,11 +48,12 @@ subdir = src/escputil
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -67,8 +68,8 @@ am__DEPENDENCIES_1 = $(top_builddir)/src/main/libgutenprint.la
am__DEPENDENCIES_2 =
escputil_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -84,13 +85,18 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -116,6 +122,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -123,6 +131,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -135,12 +144,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -175,6 +186,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -270,14 +282,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -294,6 +309,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -311,17 +329,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -343,9 +365,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/escputil/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/escputil/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/escputil/Makefile
+ $(AUTOMAKE) --gnu src/escputil/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -401,14 +423,29 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d4lib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escputil.Po@am__quote@
+
.c.o:
- $(COMPILE) -c $<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -533,6 +570,7 @@ clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -558,6 +596,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/escputil/escputil.c b/src/escputil/escputil.c
index ffaacec..5394b77 100644
--- a/src/escputil/escputil.c
+++ b/src/escputil/escputil.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escputil.c,v 1.87 2006/05/31 08:31:59 rleigh Exp $"
+ * "$Id: escputil.c,v 1.87.8.1 2007/05/29 01:47:27 rlk Exp $"
*
* Printer maintenance utility for EPSON Stylus (R) printers
*
@@ -285,7 +285,7 @@ main(int argc, char **argv)
int c;
/* Set up gettext */
-#ifdef ENABLE_NLS
+#ifdef HAVE_LOCALE_H
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
#endif
diff --git a/src/foomatic/Makefile.in b/src/foomatic/Makefile.in
index 897cfb3..830736e 100644
--- a/src/foomatic/Makefile.in
+++ b/src/foomatic/Makefile.in
@@ -53,11 +53,12 @@ subdir = src/foomatic
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -81,8 +82,8 @@ am_printers_OBJECTS = printers.$(OBJEXT)
printers_OBJECTS = $(am_printers_OBJECTS)
printers_DEPENDENCIES = $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -102,13 +103,18 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -134,6 +140,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -141,6 +149,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -153,12 +162,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -193,6 +204,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -288,14 +300,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -312,6 +327,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -329,17 +347,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -381,9 +403,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/foomatic/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/foomatic/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/foomatic/Makefile
+ $(AUTOMAKE) --gnu src/foomatic/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -434,14 +456,32 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gutenprint-version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paper_sizes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printer_margins.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printer_options.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printers.Po@am__quote@
+
.c.o:
- $(COMPILE) -c $<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -568,6 +608,7 @@ clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -593,6 +634,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/foomatic/foomatic-generator.in b/src/foomatic/foomatic-generator.in
index 02a863c..c72679d 100644
--- a/src/foomatic/foomatic-generator.in
+++ b/src/foomatic/foomatic-generator.in
@@ -110,10 +110,12 @@ print STDERR "done.\n";
if ($foomatic3) {
open PIPE, "./printer_margins $simplified_subopt|" or die "Cannot run printer_margins: $!\n";
print STDERR "Loading margins from ./printer_margins $simplified_subopt...";
- $code = join('', <PIPE>);
- #print $code;
+ while(<PIPE>) {
+ #print $_;
+ next if m!^#!;
+ eval $_;
+ }
close PIPE or die "Cannot run printer_margins: $!\n";
- eval $code or die "Cannot run printer_margins: $!\n";
print STDERR "done.\n";
}
@@ -223,11 +225,11 @@ if ($foomatic3) {
# for each value range. Therefore the filenames of numerical options
# are numbered (eg. Contrast-1.xml).
for $a (keys(%stp_float_values)) {
- for $vtmp (keys %{$stp_float_values{$a}}) {
- for $otmp (keys %{$stp_float_values{$a}{$vtmp}}) {
- my $min = $stp_float_values{$a}{'MINVAL'}{$otmp};
- my $max = $stp_float_values{$a}{'MAXVAL'}{$otmp};
- my $def = $stp_float_values{$a}{'DEFVAL'}{$otmp};
+ for $otmp (keys %{$stp_float_values{$a}}) {
+ for $vtmp (keys %{$stp_float_values{$a}{$otmp}}) {
+ my $min = $stp_float_values{$a}{$otmp}{'MINVAL'};
+ my $max = $stp_float_values{$a}{$otmp}{'MAXVAL'};
+ my $def = $stp_float_values{$a}{$otmp}{'DEFVAL'};
# Skip options with invalid values, the library contains such
# options in the case when only one constant value is allowed
next if (($min >= $max) || ($def < $min) || ($def > $max));
@@ -245,11 +247,11 @@ for $a (keys(%stp_float_values)) {
}
}
for $a (keys(%stp_int_values)) {
- for $vtmp (keys %{$stp_int_values{$a}}) {
- for $otmp (keys %{$stp_int_values{$a}{$vtmp}}) {
- my $min = $stp_int_values{$a}{'MINVAL'}{$otmp};
- my $max = $stp_int_values{$a}{'MAXVAL'}{$otmp};
- my $def = $stp_int_values{$a}{'DEFVAL'}{$otmp};
+ for $otmp (keys %{$stp_int_values{$a}}) {
+ for $vtmp (keys %{$stp_int_values{$a}{$otmp}}) {
+ my $min = $stp_int_values{$a}{$otmp}{'MINVAL'};
+ my $max = $stp_int_values{$a}{$otmp}{'MAXVAL'};
+ my $def = $stp_int_values{$a}{$otmp}{'DEFVAL'};
# Skip options with invalid values, the library contains such
# options in the case when only one constant value is allowed
next if (($min >= $max) || ($def < $min) || ($def > $max));
@@ -268,11 +270,11 @@ for $a (keys(%stp_int_values)) {
}
for $a (keys(%stp_dimension_values)) {
- for $vtmp (keys %{$stp_dimension_values{$a}}) {
- for $otmp (keys %{$stp_dimension_values{$a}{$vtmp}}) {
- my $min = $stp_dimension_values{$a}{'MINVAL'}{$otmp};
- my $max = $stp_dimension_values{$a}{'MAXVAL'}{$otmp};
- my $def = $stp_dimension_values{$a}{'DEFVAL'}{$otmp};
+ for $otmp (keys %{$stp_dimension_values{$a}}) {
+ for $vtmp (keys %{$stp_dimension_values{$a}{$otmp}}) {
+ my $min = $stp_dimension_values{$a}{$otmp}{'MINVAL'};
+ my $max = $stp_dimension_values{$a}{$otmp}{'MAXVAL'};
+ my $def = $stp_dimension_values{$a}{$otmp}{'DEFVAL'};
# Skip options with invalid values, the library contains such
# options in the case when only one constant value is allowed
next if (($min >= $max) || ($def < $min) || ($def > $max));
@@ -844,22 +846,22 @@ sub build_num_cons {
# this option and a default value for it.
my $stpdef;
if ((defined($stpdef =
- $stp_float_values{$stpname}{"DEFVAL"}{$stpopt})) ||
+ $stp_float_values{$stpname}{$stpopt}{"DEFVAL"})) ||
(defined($stpdef =
- $stp_int_values{$stpname}{"DEFVAL"}{$stpopt})) ||
+ $stp_int_values{$stpname}{$stpopt}{"DEFVAL"})) ||
(defined($stpdef =
- $stp_dimension_values{$stpname}{"DEFVAL"}{$stpopt}))) {
+ $stp_dimension_values{$stpname}{$stpopt}{"DEFVAL"}))) {
# Find minimum and maximum
my ($min, $max);
if ($type eq "float") {
- $min = $stp_float_values{$stpname}{"MINVAL"}{$stpopt};
- $max = $stp_float_values{$stpname}{"MAXVAL"}{$stpopt};
+ $min = $stp_float_values{$stpname}{$stpopt}{"MINVAL"};
+ $max = $stp_float_values{$stpname}{$stpopt}{"MAXVAL"};
} elsif ($type eq "dimension") {
- $min = $stp_dimension_values{$stpname}{"MINVAL"}{$stpopt};
- $max = $stp_dimension_values{$stpname}{"MAXVAL"}{$stpopt};
+ $min = $stp_dimension_values{$stpname}{$stpopt}{"MINVAL"};
+ $max = $stp_dimension_values{$stpname}{$stpopt}{"MAXVAL"};
} else {
- $min = $stp_int_values{$stpname}{"MINVAL"}{$stpopt};
- $max = $stp_int_values{$stpname}{"MAXVAL"}{$stpopt};
+ $min = $stp_int_values{$stpname}{$stpopt}{"MINVAL"};
+ $max = $stp_int_values{$stpname}{$stpopt}{"MAXVAL"};
}
# Does the range of this option with this printer match
# the Foomatic option entry we are building currently?
@@ -1314,6 +1316,8 @@ sub qualityorder {
"oov",
# Canon
"dmt",
+ "dpi_high",
+ "dpi_draft"
);
my ($a, $b) = @_;
# Bring the suffixes to lower case
diff --git a/src/foomatic/foomatic-printermap b/src/foomatic/foomatic-printermap
index 38758a3..bb0df69 100644
--- a/src/foomatic/foomatic-printermap
+++ b/src/foomatic/foomatic-printermap
@@ -57,6 +57,7 @@
#gptofoo bjc-80 printer/Canon-BJC-80
#gptofoo bjc-8200 printer/Canon-BJC-8200
#gptofoo bjc-85 printer/Canon-BJC-85
+#gptofoo canon-cp10 printer/Canon-CP-10
#gptofoo canon-cp100 printer/Canon-CP-100
#gptofoo canon-cp200 printer/Canon-CP-200
#gptofoo canon-cp220 printer/Canon-CP-220
@@ -83,9 +84,35 @@
#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-PIXMA-iP2000 printer/Canon-PIXMA-iP2000
+#gptofoo bjc-PIXMA-iP3000 printer/Canon-PIXMA-iP3000
+#gptofoo bjc-PIXMA-iP3100 printer/Canon-PIXMA-iP3100
#gptofoo bjc-iP4000 printer/Canon-iP4000
+#gptofoo bjc-PIXMA-iP4100 printer/Canon-PIXMA-iP4100
+#gptofoo bjc-PIXMA-iP4200 printer/Canon-PIXMA-iP4200
+#gptofoo bjc-PIXMA-iP4300 printer/Canon-PIXMA-iP4300
+#gptofoo bjc-PIXMA-iP5000 printer/Canon-PIXMA-iP5000
+#gptofoo bjc-PIXMA-iP5200 printer/Canon-PIXMA-iP5200
+#gptofoo bjc-PIXMA-iP6700 printer/Canon-PIXMA-iP6700
+#gptofoo bjc-MULTIPASS-MP150 printer/Canon-MULTIPASS-MP150
+#gptofoo bjc-MULTIPASS-MP500 printer/Canon-MULTIPASS-MP500
+#gptofoo bjc-MULTIPASS-MP700 printer/Canon-MULTIPASS-MP700
+#gptofoo bjc-MULTIPASS-MP730 printer/Canon-MULTIPASS-MP730
+#gptofoo bjc-MULTIPASS-MP750 printer/Canon-MULTIPASS-MP750
+#gptofoo bjc-MULTIPASS-MP760 printer/Canon-MULTIPASS-MP760
+#gptofoo bjc-MULTIPASS-MP770 printer/Canon-MULTIPASS-MP770
+#gptofoo bjc-MULTIPASS-MP780 printer/Canon-MULTIPASS-MP780
+#gptofoo bjc-MULTIPASS-MP790 printer/Canon-MULTIPASS-MP790
+#gptofoo bjc-MULTIPASS-MP830 printer/Canon-MULTIPASS-MP830
+#gptofoo bjc-PIXUS-iP3100 printer/Canon-PIXUS-iP3100
+#gptofoo bjc-PIXUS-iP4100 printer/Canon-PIXUS-iP4100
+#gptofoo bjc-i560 printer/Canon-i560
+#gptofoo bjc-i850 printer/Canon-i850
+#gptofoo bjc-i860 printer/Canon-i860
+#gptofoo bjc-i865 printer/Canon-i865
#gptofoo canon-ir_330s printer/Canon-imageRunner_330s
#gptofoo citizen-projet_ii printer/Citizen-ProJet_II
+#gptofoo compaq-ij1200 printer/Compaq-IJ1200
#gptofoo dec-1800 printer/DEC-1800
#gptofoo dec-ln17 printer/DEC-LN17
#gptofoo epson-actl_1100 printer/Epson-ActionLaser_1100
@@ -154,6 +181,7 @@
#gptofoo escp2-pm980c printer/Epson-PM_980C
#gptofoo escp2-pma650 printer/Epson-PM_A650
#gptofoo escp2-pma750 printer/Epson-PM_A750
+#gptofoo escp2-pma820 printer/Epson-PM_A820
#gptofoo escp2-pma890 printer/Epson-PM_A890
#gptofoo escp2-pma900 printer/Epson-PM_A900
#gptofoo escp2-pma950 printer/Epson-PM_A950
@@ -162,11 +190,14 @@
#gptofoo escp2-pmd750 printer/Epson-PM_D750
#gptofoo escp2-pmd770 printer/Epson-PM_D770
#gptofoo escp2-pmd800 printer/Epson-PM_D800
+#gptofoo escp2-pmd870 printer/Epson-PM_D870
#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-pmg850 printer/Epson-PM_G850
+#gptofoo escp2-pmg4500 printer/Epson-PM_G4500
#gptofoo escp2-px5500 printer/Epson-PX_5500
#gptofoo escp2-px7000 printer/Epson-PX_7000
#gptofoo escp2-px9000 printer/Epson-PX_9000
@@ -179,6 +210,14 @@
#gptofoo escp2-pxv630 printer/Epson-PX_V630
#gptofoo escp2-picmate printer/Epson-PictureMate
#gptofoo escp2-picmated printer/Epson-PictureMate_Deluxe
+#gptofoo escp2-picmateflash printer/Epson-PictureMate_Flash
+#gptofoo escp2-picmatepal printer/Epson-PictureMate_Pal
+#gptofoo escp2-picmatesnap printer/Epson-PictureMate_Snap
+#gptofoo escp2-picmate200 printer/Epson-PictureMate_200
+#gptofoo escp2-picmate210 printer/Epson-PictureMate_210
+#gptofoo escp2-picmate240 printer/Epson-PictureMate_240
+#gptofoo escp2-picmate250 printer/Epson-PictureMate_250
+#gptofoo escp2-picmate280 printer/Epson-PictureMate_280
#gptofoo escp2-c20 printer/Epson-Stylus_C20
#gptofoo escp2-c20sx printer/Epson-Stylus_C20SX
#gptofoo escp2-c20ux printer/Epson-Stylus_C20UX
@@ -210,12 +249,14 @@
#gptofoo escp2-c66 printer/Epson-Stylus_C66
#gptofoo escp2-c68 printer/Epson-Stylus_C68
#gptofoo escp2-c70 printer/Epson-Stylus_C70
+#gptofoo escp2-c79 printer/Epson-Stylus_C79
#gptofoo escp2-c80 printer/Epson-Stylus_C80
#gptofoo escp2-c82 printer/Epson-Stylus_C82
#gptofoo escp2-c83 printer/Epson-Stylus_C83
#gptofoo escp2-c84 printer/Epson-Stylus_C84
#gptofoo escp2-c85 printer/Epson-Stylus_C85
#gptofoo escp2-c86 printer/Epson-Stylus_C86
+#gptofoo escp2-c87 printer/Epson-Stylus_C87
#gptofoo escp2-c88 printer/Epson-Stylus_C88
#gptofoo escp2-cx1500 printer/Epson-Stylus_CX1500
#gptofoo escp2-cx3100 printer/Epson-Stylus_CX3100
@@ -233,16 +274,20 @@
#gptofoo escp2-cx4600 printer/Epson-Stylus_CX4600
#gptofoo escp2-cx4700 printer/Epson-Stylus_CX4700
#gptofoo escp2-cx4800 printer/Epson-Stylus_CX4800
+#gptofoo escp2-cx5000 printer/Epson-Stylus_CX5000
+#gptofoo escp2-cx5000f printer/Epson-Stylus_CX5000F
#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-cx6000 printer/Epson-Stylus_CX6000
#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-cx7000f printer/Epson-Stylus_CX7000F
#gptofoo escp2-cx7700 printer/Epson-Stylus_CX7700
#gptofoo escp2-cx7800 printer/Epson-Stylus_CX7800
#gptofoo escp2-cx8300 printer/Epson-Stylus_CX8300
@@ -289,6 +334,8 @@
#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-1400 printer/Epson-Stylus_Photo_1400
+#gptofoo escp2-1410 printer/Epson-Stylus_Photo_1410
#gptofoo escp2-2000 printer/Epson-Stylus_Photo_2000P
#gptofoo escp2-2100 printer/Epson-Stylus_Photo_2100
#gptofoo escp2-2200 printer/Epson-Stylus_Photo_2200
@@ -316,14 +363,24 @@
#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-r2400 printer/Epson-Stylus_Photo_R2400
#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-r230 printer/Epson-Stylus_Photo_R230
+#gptofoo escp2-r240 printer/Epson-Stylus_Photo_R240
+#gptofoo escp2-r245 printer/Epson-Stylus_Photo_R245
+#gptofoo escp2-r260 printer/Epson-Stylus_Photo_R260
+#gptofoo escp2-r265 printer/Epson-Stylus_Photo_R265
+#gptofoo escp2-r270 printer/Epson-Stylus_Photo_R270
#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-r350 printer/Epson-Stylus_Photo_R350
+#gptofoo escp2-r360 printer/Epson-Stylus_Photo_R360
+#gptofoo escp2-r380 printer/Epson-Stylus_Photo_R380
+#gptofoo escp2-r390 printer/Epson-Stylus_Photo_R390
#gptofoo escp2-r800 printer/Epson-Stylus_Photo_R800
#gptofoo escp2-rx400 printer/Epson-Stylus_Photo_RX400
#gptofoo escp2-rx420 printer/Epson-Stylus_Photo_RX420
@@ -331,9 +388,13 @@
#gptofoo escp2-rx430 printer/Epson-Stylus_Photo_RX430
#gptofoo escp2-rx500 printer/Epson-Stylus_Photo_RX500
#gptofoo escp2-rx510 printer/Epson-Stylus_Photo_RX510
+#gptofoo escp2-rx560 printer/Epson-Stylus_Photo_RX560
+#gptofoo escp2-rx580 printer/Epson-Stylus_Photo_RX580
+#gptofoo escp2-rx590 printer/Epson-Stylus_Photo_RX590
#gptofoo escp2-rx600 printer/Epson-Stylus_Photo_RX600
#gptofoo escp2-rx620 printer/Epson-Stylus_Photo_RX620
#gptofoo escp2-rx630 printer/Epson-Stylus_Photo_RX630
+#gptofoo escp2-rx640 printer/Epson-Stylus_Photo_RX640
#gptofoo escp2-rx700 printer/Epson-Stylus_Photo_RX700
#gptofoo escp2-10000 printer/Epson-Stylus_Pro_10000
#gptofoo escp2-5000 printer/Epson-Stylus_Pro_5000
@@ -349,6 +410,7 @@
#gptofoo escp2-scan2500 printer/Epson-Stylus_Scan_2500
#gptofoo fujifilm-cx400 printer/Fujifilm-Printpix-CX-400
#gptofoo fujifilm-cx550 printer/Fujifilm-Printpix-CX-550
+#gptofoo fujifilm-nx500 printer/Fujifilm-FinePix-NX-500
#gptofoo fujitsu-pp_10v printer/Fujitsu-PrintPartner_10V
#gptofoo fujitsu-pp_16dv printer/Fujitsu-PrintPartner_16DV
#gptofoo fujitsu-pp_20w printer/Fujitsu-PrintPartner_20W
@@ -613,6 +675,7 @@
#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 kodak-dock printer/Kodak-Easyshare-Printer-Dock
#gptofoo kyocera-f-1010 printer/Kyocera-F-1010
#gptofoo kyocera-fs-1000 printer/Kyocera-FS-1000
#gptofoo kyocera-fs-1000plus printer/Kyocera-FS-1000plus
@@ -662,7 +725,9 @@
#gptofoo lexmark-4076 printer/Lexmark-4076
#gptofoo lexmark-optra_e printer/Lexmark-Optra_E
#gptofoo lexmark-optra_eplus printer/Lexmark-Optra_Eplus
+#gptofoo lexmark-optra_e220 printer/Lexmark-Optra_E220
#gptofoo lexmark-vw_300 printer/Lexmark-Valuewriter_300
+#gptofoo lexmark-x73 printer/Lexmark-X73
#gptofoo lexmark-z42 printer/Lexmark-Z42
#gptofoo lexmark-z43 printer/Lexmark-Z43
#gptofoo lexmark-z52 printer/Lexmark-Z52
@@ -706,6 +771,7 @@
#gptofoo olympus-p330ne printer/Olympus-P-330NE
#gptofoo olympus-p400 printer/Olympus-P-400
#gptofoo olympus-p440 printer/Olympus-P-440
+#gptofoo olympus-ps100 printer/Olympus-P-S100
#gptofoo pcpi-1030 printer/PCPI-1030
#gptofoo panasonic-kx-p4410 printer/Panasonic-KX-P4410
#gptofoo panasonic-kx-p4450 printer/Panasonic-KX-P4450
@@ -729,7 +795,9 @@
#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-dppex5 printer/Sony-DPP-EX5
#gptofoo sony-updp10 printer/Sony-UP-DP10
+#gptofoo sony-updr100 printer/Sony-UP-DR100
#gptofoo sony-updr150 printer/Sony-UP-DR150
#gptofoo star-ls-04 printer/Star-LS-04
#gptofoo star-lp_8 printer/Star-LaserPrinter_8
@@ -743,3 +811,4 @@
#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
+#gptofoo xerox-wc_m118 printer/Xerox-Work_Centre_M118
diff --git a/src/foomatic/gutenprint-version.c b/src/foomatic/gutenprint-version.c
index 786dfe6..16c248a 100644
--- a/src/foomatic/gutenprint-version.c
+++ b/src/foomatic/gutenprint-version.c
@@ -1,7 +1,7 @@
/*
- * "$Id: gutenprint-version.c,v 1.2 2005/04/12 00:45:10 rlk Exp $"
+ * "$Id: gutenprint-version.c,v 1.2.18.1 2007/03/04 23:57:48 tillkamppeter Exp $"
*
- * Dump the per-printer options for Grant Taylor's *-omatic database
+ * Dump the per-printer options for the OpenPrinting database
*
* Copyright 2000 Robert Krawitz (rlk@alum.mit.edu)
*
diff --git a/src/foomatic/mk_printerlist.in b/src/foomatic/mk_printerlist.in
index a8f516f..da669ad 100644
--- a/src/foomatic/mk_printerlist.in
+++ b/src/foomatic/mk_printerlist.in
@@ -5,7 +5,7 @@
eval `./printers`;
-open PRINTERS, "(wget -q -O - http://www.linuxprinting.org/printer_list.cgi; cat foomatic-printermap) |" or die "Can't get print list: $!";
+open PRINTERS, "(wget -q -O - http://www.openprinting.org/printer_list.cgi; cat foomatic-printermap) |" or die "Can't get print list: $!";
while (<PRINTERS>) {
if (/make ==/) {
diff --git a/src/foomatic/paper_sizes.c b/src/foomatic/paper_sizes.c
index e22f5fd..7b12fe1 100644
--- a/src/foomatic/paper_sizes.c
+++ b/src/foomatic/paper_sizes.c
@@ -1,7 +1,7 @@
/*
- * "$Id: paper_sizes.c,v 1.8 2004/09/17 18:38:12 rleigh Exp $"
+ * "$Id: paper_sizes.c,v 1.8.18.1 2007/03/04 23:57:48 tillkamppeter Exp $"
*
- * Dump the per-printer options for Grant Taylor's *-omatic database
+ * Dump the per-printer options for the OpenPrinting database
*
* Copyright 2000 Robert Krawitz (rlk@alum.mit.edu)
*
diff --git a/src/foomatic/printer_margins.c b/src/foomatic/printer_margins.c
index 89c68ed..11c50ad 100644
--- a/src/foomatic/printer_margins.c
+++ b/src/foomatic/printer_margins.c
@@ -1,10 +1,10 @@
/*
- * "$Id: printer_margins.c,v 1.17 2006/04/17 02:06:18 rlk Exp $"
+ * "$Id: printer_margins.c,v 1.17.8.2 2007/05/29 01:47:27 rlk Exp $"
*
- * Dump the per-printer margins for Grant Taylor's *-omatic database
+ * Dump the per-printer margins for the OpenPrinting database
*
* Copyright 2000, 2003 Robert Krawitz (rlk@alum.mit.edu) and
- * Till Kamppeter (till.kamppeter@gmx.net)
+ * Till Kamppeter (till.kamppeter@gmail.com)
*
* 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
@@ -107,16 +107,16 @@ main(int argc, char **argv) {
height = 0;
}
- printf("$stpdata{'%s'}{'PageSize'}{'%s'} = '%s';\n",
+ printf("$stpdata{'%s'}{'PageSize'}{'%s'} = '%s';",
driver, opt->name, opt->text);
- printf("$imageableareas{'%s'}{'%s'} = {\n",
+ printf("$imageableareas{'%s'}{'%s'} = {",
driver, opt->name);
- printf(" 'left' => '%d',\n", left);
- printf(" 'right' => '%d',\n", right);
- printf(" 'top' => '%d',\n", top);
- printf(" 'bottom' => '%d',\n", bottom);
- printf(" 'width' => '%d',\n", width);
- printf(" 'height' => '%d'\n", height);
+ printf(" 'left' => '%d',", left);
+ printf(" 'right' => '%d',", right);
+ printf(" 'top' => '%d',", top);
+ printf(" 'bottom' => '%d',", bottom);
+ printf(" 'width' => '%d',", width);
+ printf(" 'height' => '%d'", height);
printf("};\n");
}
stp_parameter_description_destroy(&desc);
diff --git a/src/foomatic/printer_options.c b/src/foomatic/printer_options.c
index d3a3b42..6848354 100644
--- a/src/foomatic/printer_options.c
+++ b/src/foomatic/printer_options.c
@@ -1,7 +1,7 @@
/*
- * "$Id: printer_options.c,v 1.50 2006/05/28 16:59:03 rlk Exp $"
+ * "$Id: printer_options.c,v 1.50.8.2 2007/05/29 01:47:27 rlk Exp $"
*
- * Dump the per-printer options for Grant Taylor's *-omatic database
+ * Dump the per-printer options for the OpenPrinting database
*
* Copyright 2000 Robert Krawitz (rlk@alum.mit.edu)
*
@@ -33,10 +33,12 @@ main(int argc, char **argv)
{
int i, j, k;
stp_parameter_level_t max_level = STP_PARAMETER_LEVEL_ADVANCED4;
+ stp_string_list_t *params_seen;
if (argc > 1 && !strcmp(argv[1], "-s"))
max_level = STP_PARAMETER_LEVEL_BASIC;
stp_init();
+ params_seen = stp_string_list_create();
for (i = 0; i < stp_printer_model_count(); i++)
{
stp_parameter_list_t params;
@@ -83,65 +85,96 @@ main(int argc, char **argv)
stp_describe_parameter(pv, p->name, &desc);
if (desc.is_active)
{
+ char buf[1024];
+ sprintf(buf, "STP_%s", desc.name);
+ if (!stp_string_list_find(params_seen, buf))
+ {
+ stp_string_list_add_string(params_seen, buf, buf);
+ if ((desc.p_type == STP_PARAMETER_TYPE_DOUBLE ||
+ desc.p_type == STP_PARAMETER_TYPE_DIMENSION ||
+ desc.p_type == STP_PARAMETER_TYPE_INT) &&
+ !desc.is_mandatory)
+ {
+ sprintf(buf, "STP_Enable%s", desc.name);
+ if (!stp_string_list_find(params_seen, buf))
+ {
+ stp_string_list_add_string(params_seen, buf, buf);
+ /*
+ * Create a dummy option that enables or disables
+ * the option as appropriate. The long name ends in
+ * enable, rather than starts with enable, because
+ * CUPS has this nasty habit of sorting options
+ * alphabetically rather than leaving them in the
+ * order listed. This ensures that the enable
+ * option is adjacent to the value it controls.
+ */
+ printf("$longnames{'STP_Enable%s'} = '%s Enable';",
+ desc.name, desc.text);
+ printf("$param_classes{'STP_Enable%s'} = %d;",
+ desc.name, desc.p_class);
+ printf("$param_levels{'STP_Enable%s'} = %d;",
+ desc.name, desc.p_level);
+ printf("$longnames{'STP_%s'} = '%s Value';",
+ desc.name, desc.text);
+ }
+ }
+ else
+ printf("$longnames{'STP_%s'} = '%s';",
+ desc.name, desc.text);
+ printf("$param_classes{'STP_%s'} = %d;",
+ desc.name, desc.p_class);
+ printf("$param_levels{'STP_%s'} = %d;",
+ desc.name, desc.p_level);
+ }
if ((desc.p_type == STP_PARAMETER_TYPE_DOUBLE ||
desc.p_type == STP_PARAMETER_TYPE_DIMENSION ||
desc.p_type == STP_PARAMETER_TYPE_INT) &&
!desc.is_mandatory)
{
- /*
- * Create a dummy option that enables or disables
- * the option as appropriate. The long name ends in
- * enable, rather than starts with enable, because
- * CUPS has this nasty habit of sorting options
- * alphabetically rather than leaving them in the
- * order listed. This ensures that the enable
- * option is adjacent to the value it controls.
- */
- printf("$longnames{'STP_Enable%s'} = '%s Enable';\n",
- desc.name, desc.text);
- printf("$param_classes{'STP_Enable%s'} = %d;\n",
- desc.name, desc.p_class);
- printf("$param_levels{'STP_Enable%s'} = %d;\n",
- desc.name, desc.p_level);
- printf("$defaults{'%s'}{'STP_Enable%s'} = 'Disabled';\n",
+ printf("$defaults{'%s'}{'STP_Enable%s'} = 'Disabled';",
driver, desc.name);
- printf("$stpdata{'%s'}{'STP_Enable%s'}{'Disabled'} = 'Disabled';\n",
+ printf("$stpdata{'%s'}{'STP_Enable%s'}{'Disabled'} = 'Disabled';",
driver, desc.name);
- printf("$stpdata{'%s'}{'STP_Enable%s'}{'Enabled'} = 'Enabled';\n",
+ printf("$stpdata{'%s'}{'STP_Enable%s'}{'Enabled'} = 'Enabled';",
driver, desc.name);
- printf("$longnames{'STP_%s'} = '%s Value';\n",
- desc.name, desc.text);
}
- else
- printf("$longnames{'STP_%s'} = '%s';\n",
- desc.name, desc.text);
- printf("$param_classes{'STP_%s'} = %d;\n",
- desc.name, desc.p_class);
- printf("$param_levels{'STP_%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)
{
+ printf("{ $stpdata{'%s'}{'STP_%s'} = {};",
+ driver, desc.name);
+ printf("my $tmp = $stpdata{'%s'}{'STP_%s'};",
+ driver, desc.name);
+ if (strcmp(desc.name, "Resolution") == 0)
+ {
+ printf("$stpdata{'%s'}{'x_resolution'} = {};",
+ driver);
+ printf("my $x_t = $stpdata{'%s'}{'x_resolution'};",
+ driver);
+ printf("$stpdata{'%s'}{'y_resolution'} = {};",
+ driver);
+ printf("my $y_t = $stpdata{'%s'}{'y_resolution'};",
+ driver);
+ }
if (desc.is_mandatory)
{
- printf("$defaults{'%s'}{'STP_%s'} = '%s';\n",
+ printf("$defaults{'%s'}{'STP_%s'} = '%s';",
driver, desc.name, desc.deflt.str);
}
else
{
- printf("$defaults{'%s'}{'STP_%s'} = '%s';\n",
+ printf("$defaults{'%s'}{'STP_%s'} = '%s';",
driver, desc.name, "None");
- printf("$stpdata{'%s'}{'STP_%s'}{'%s'} = '%s';\n",
- driver, desc.name, "None", "None");
+ printf("$$tmp{'%s'} = '%s';", "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'}{'STP_%s'}{'%s'} = '%s';\n",
- driver, desc.name, param->name, param->text);
+ printf("$$tmp{'%s'} = '%s';",
+ param->name, param->text);
if (strcmp(desc.name, "Resolution") == 0)
{
int x, y;
@@ -150,31 +183,30 @@ main(int argc, char **argv)
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);
+ printf("$$x_t{'%s'} = '%d';",param->name, x);
+ printf("$$y_t{'%s'} = '%d';",param->name, y);
}
}
}
+ printf("}\n");
}
}
else if (desc.p_type == STP_PARAMETER_TYPE_BOOLEAN)
{
if (desc.is_mandatory)
{
- printf("$defaults{'%s'}{'STP_%s'} = '%d';\n",
+ printf("$defaults{'%s'}{'STP_%s'} = '%d';",
driver, desc.name, desc.deflt.boolean);
}
else
{
- printf("$defaults{'%s'}{'STP_%s'} = '%s';\n",
+ printf("$defaults{'%s'}{'STP_%s'} = '%s';",
driver, desc.name, "None");
- printf("$stpdata{'%s'}{'STP_%s'}{'%s'} = '%s';\n",
+ printf("$stpdata{'%s'}{'STP_%s'}{'%s'} = '%s';",
driver, desc.name, "None", "None");
}
- printf("$stpdata{'%s'}{'STP_%s'}{'False'} = 'False';\n",
+ printf("$stpdata{'%s'}{'STP_%s'}{'False'} = 'False';",
driver, desc.name);
printf("$stpdata{'%s'}{'STP_%s'}{'True'} = 'True';\n",
driver, desc.name);
@@ -184,20 +216,25 @@ main(int argc, char **argv)
if (desc.bounds.dbl.lower <= desc.deflt.dbl &&
desc.bounds.dbl.upper >= desc.deflt.dbl)
{
- printf("$stp_float_values{'%s'}{'MINVAL'}{'STP_%s'} = %.3f;\n",
- driver, desc.name, desc.bounds.dbl.lower);
- printf("$stp_float_values{'%s'}{'MAXVAL'}{'STP_%s'} = %.3f;\n",
- driver, desc.name, desc.bounds.dbl.upper);
- printf("$stp_float_values{'%s'}{'DEFVAL'}{'STP_%s'} = %.3f;\n",
- driver, desc.name, desc.deflt.dbl);
- /* printf("$stp_float_values{'%s'}{'LONG_NAME'}{'STP_%s'} = '%s';\n",
- driver, desc.name, gettext(desc.text)); */
- printf("$stp_float_values{'%s'}{'CATEGORY'}{'STP_%s'} = '%s';\n",
- driver, desc.name, gettext(desc.category));
- printf("$stp_float_values{'%s'}{'HELP'}{'STP_%s'} = q(%s);\n",
- driver, desc.name, (desc.help ? gettext(desc.help) : "''"));
- printf("$stp_float_values{'%s'}{'MANDATORY'}{'STP_%s'} = q(%d);\n",
- driver, desc.name, desc.is_mandatory);
+ printf("{ $stp_float_values{'%s'}{'STP_%s'} = {};",
+ driver, desc.name);
+ printf("my $tmp = $stp_float_values{'%s'}{'STP_%s'};",
+ driver, desc.name);
+ printf("$$tmp{'MINVAL'} = %.3f;",
+ desc.bounds.dbl.lower);
+ printf("$$tmp{'MAXVAL'} = %.3f;",
+ desc.bounds.dbl.upper);
+ printf("$$tmp{'DEFVAL'} = %.3f;",
+ desc.deflt.dbl);
+ /* printf("$$tmp{'LONG_NAME'} = '%s';",
+ gettext(desc.text)); */
+ printf("$$tmp{'CATEGORY'} = '%s';",
+ gettext(desc.category));
+ printf("$$tmp{'HELP'} = q(%s);",
+ (desc.help ? gettext(desc.help) : "''"));
+ printf("$$tmp{'MANDATORY'} = q(%d);",
+ desc.is_mandatory);
+ printf("}\n");
}
}
else if (desc.p_type == STP_PARAMETER_TYPE_INT)
@@ -205,20 +242,25 @@ main(int argc, char **argv)
if (desc.bounds.integer.lower <= desc.deflt.integer &&
desc.bounds.integer.upper >= desc.deflt.integer)
{
- printf("$stp_int_values{'%s'}{'MINVAL'}{'STP_%s'} = %d;\n",
- driver, desc.name, desc.bounds.integer.lower);
- printf("$stp_int_values{'%s'}{'MAXVAL'}{'STP_%s'} = %d;\n",
- driver, desc.name, desc.bounds.integer.upper);
- printf("$stp_int_values{'%s'}{'DEFVAL'}{'STP_%s'} = %d;\n",
- driver, desc.name, desc.deflt.integer);
- /* printf("$stp_int_values{'%s'}{'LONG_NAME'}{'STP_%s'} = '%s';\n",
- driver, desc.name, gettext(desc.text)); */
- printf("$stp_int_values{'%s'}{'CATEGORY'}{'STP_%s'} = '%s';\n",
- driver, desc.name, gettext(desc.category));
- printf("$stp_int_values{'%s'}{'HELP'}{'STP_%s'} = q(%s);\n",
- driver, desc.name, (desc.help ? gettext(desc.help) : "''"));
- printf("$stp_int_values{'%s'}{'MANDATORY'}{'STP_%s'} = q(%d);\n",
- driver, desc.name, desc.is_mandatory);
+ printf("{ $stp_int_values{'%s'}{'STP_%s'} = {};",
+ driver, desc.name);
+ printf("my $tmp = $stp_int_values{'%s'}{'STP_%s'};",
+ driver, desc.name);
+ printf("$$tmp{'MINVAL'} = %d;",
+ desc.bounds.integer.lower);
+ printf("$$tmp{'MAXVAL'} = %d;",
+ desc.bounds.integer.upper);
+ printf("$$tmp{'DEFVAL'} = %d;",
+ desc.deflt.integer);
+ /* printf("$$tmp{'LONG_NAME'} = '%s';",
+ gettext(desc.text)); */
+ printf("$$tmp{'CATEGORY'} = '%s';",
+ gettext(desc.category));
+ printf("$$tmp{'HELP'} = q(%s);",
+ (desc.help ? gettext(desc.help) : "''"));
+ printf("$$tmp{'MANDATORY'} = q(%d);",
+ desc.is_mandatory);
+ printf("}\n");
}
}
else if (desc.p_type == STP_PARAMETER_TYPE_DIMENSION)
@@ -226,20 +268,25 @@ main(int argc, char **argv)
if (desc.bounds.dimension.lower <= desc.deflt.dimension &&
desc.bounds.dimension.upper >= desc.deflt.dimension)
{
- printf("$stp_dimension_values{'%s'}{'MINVAL'}{'STP_%s'} = %d;\n",
- driver, desc.name, desc.bounds.dimension.lower);
- printf("$stp_dimension_values{'%s'}{'MAXVAL'}{'STP_%s'} = %d;\n",
- driver, desc.name, desc.bounds.dimension.upper);
- printf("$stp_dimension_values{'%s'}{'DEFVAL'}{'STP_%s'} = %d;\n",
- driver, desc.name, desc.deflt.dimension);
- /* printf("$stp_dimension_values{'%s'}{'LONG_NAME'}{'STP_%s'} = '%s';\n",
- driver, desc.name, gettext(desc.text)); */
- printf("$stp_dimension_values{'%s'}{'CATEGORY'}{'STP_%s'} = '%s';\n",
- driver, desc.name, gettext(desc.category));
- printf("$stp_dimension_values{'%s'}{'HELP'}{'STP_%s'} = q(%s);\n",
- driver, desc.name, (desc.help ? gettext(desc.help) : "''"));
- printf("$stp_dimension_values{'%s'}{'MANDATORY'}{'STP_%s'} = q(%d);\n",
- driver, desc.name, desc.is_mandatory);
+ printf("{ $stp_dimension_values{'%s'}{'STP_%s'} = {};",
+ driver, desc.name);
+ printf("my $tmp = $stp_dimension_values{'%s'}{'STP_%s'};",
+ driver, desc.name);
+ printf("$$tmp{'MINVAL'} = %d;",
+ desc.bounds.dimension.lower);
+ printf("$$tmp{'MAXVAL'} = %d;",
+ desc.bounds.dimension.upper);
+ printf("$$tmp{'DEFVAL'} = %d;",
+ desc.deflt.dimension);
+ /* printf("$$tmp{'LONG_NAME'} = '%s';",
+ gettext(desc.text)); */
+ printf("$$tmp{'CATEGORY'} = '%s';",
+ gettext(desc.category));
+ printf("$$tmp{'HELP'} = q(%s);",
+ (desc.help ? gettext(desc.help) : "''"));
+ printf("$$tmp{'MANDATORY'} = q(%d);",
+ desc.is_mandatory);
+ printf("}\n");
}
}
tcount += count;
@@ -251,17 +298,17 @@ main(int argc, char **argv)
{
if (printer_is_color)
{
- printf("$defaults{'%s'}{'%s'} = '%s';\n",
+ printf("$defaults{'%s'}{'%s'} = '%s';",
driver, "Color", "Color");
- printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n",
+ printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';",
driver, "Color", "Color", "Color");
printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n",
driver, "Color", "RawCMYK", "Raw CMYK");
}
else
- printf("$defaults{'%s'}{'%s'} = '%s';\n",
+ printf("$defaults{'%s'}{'%s'} = '%s';",
driver, "Color", "Grayscale");
- printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n",
+ printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';",
driver, "Color", "Grayscale", "Gray Scale");
printf("$stpdata{'%s'}{'%s'}{'%s'} = '%s';\n",
driver, "Color", "BlackAndWhite", "Black and White");
diff --git a/src/foomatic/printers.c b/src/foomatic/printers.c
index 112abf0..9eb34ce 100644
--- a/src/foomatic/printers.c
+++ b/src/foomatic/printers.c
@@ -1,7 +1,7 @@
/*
- * "$Id: printers.c,v 1.10 2004/09/17 18:38:12 rleigh Exp $"
+ * "$Id: printers.c,v 1.10.18.1 2007/03/04 23:57:48 tillkamppeter Exp $"
*
- * Dump the per-printer options for Grant Taylor's *-omatic database
+ * Dump the per-printer options for the OpenPrinting database
*
* Copyright 2000 Robert Krawitz (rlk@alum.mit.edu)
*
diff --git a/src/ghost/Makefile.in b/src/ghost/Makefile.in
index 4d1902e..da11a47 100644
--- a/src/ghost/Makefile.in
+++ b/src/ghost/Makefile.in
@@ -48,11 +48,12 @@ subdir = src/ghost
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -72,8 +73,8 @@ am__DEPENDENCIES_2 =
@BUILD_GHOSTSCRIPT_TRUE@ $(am__DEPENDENCIES_1) \
@BUILD_GHOSTSCRIPT_TRUE@ $(am__DEPENDENCIES_2)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -89,13 +90,18 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -121,6 +127,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -128,6 +136,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -140,12 +149,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -180,6 +191,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -275,14 +287,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -299,6 +314,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -316,17 +334,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -350,9 +372,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/ghost/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ghost/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/ghost/Makefile
+ $(AUTOMAKE) --gnu src/ghost/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -408,14 +430,28 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ijsgutenprint.Po@am__quote@
+
.c.o:
- $(COMPILE) -c $<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -540,6 +576,7 @@ clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -565,6 +602,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/gimp/Makefile.in b/src/gimp/Makefile.in
index 6038199..83fc3fd 100644
--- a/src/gimp/Makefile.in
+++ b/src/gimp/Makefile.in
@@ -48,11 +48,12 @@ subdir = src/gimp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -67,8 +68,8 @@ am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = \
$(top_builddir)/src/gutenprintui/libgutenprintui.la
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -84,13 +85,18 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -116,6 +122,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -123,6 +131,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -135,12 +144,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -175,6 +186,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -270,14 +282,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -294,6 +309,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -311,17 +329,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -350,9 +372,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/gimp/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gimp/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/gimp/Makefile
+ $(AUTOMAKE) --gnu src/gimp/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -408,14 +430,29 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-image-gimp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print.Po@am__quote@
+
.c.o:
- $(COMPILE) -c $<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -541,6 +578,7 @@ clean-am: clean-generic clean-gimp_plug_inPROGRAMS clean-libtool \
mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -566,6 +604,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/gimp2/Makefile.in b/src/gimp2/Makefile.in
index d051d04..0f31ca7 100644
--- a/src/gimp2/Makefile.in
+++ b/src/gimp2/Makefile.in
@@ -49,11 +49,12 @@ subdir = src/gimp2
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -72,8 +73,8 @@ am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
am_print_OBJECTS = $(am__objects_1) print-print.$(OBJEXT)
print_OBJECTS = $(am_print_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -89,13 +90,18 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -121,6 +127,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -128,6 +136,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -140,12 +149,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -180,6 +191,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -275,14 +287,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -299,6 +314,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -316,17 +334,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -360,9 +382,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/gimp2/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gimp2/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/gimp2/Makefile
+ $(AUTOMAKE) --gnu src/gimp2/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -421,14 +443,31 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-gutenprint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-image-gimp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-print.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print.Po@am__quote@
+
.c.o:
- $(COMPILE) -c $<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -555,6 +594,7 @@ clean-am: clean-generic clean-gimp2_plug_inPROGRAMS clean-libtool \
mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -580,6 +620,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/gutenprintui/Makefile.in b/src/gutenprintui/Makefile.in
index 96534d5..2da21b8 100644
--- a/src/gutenprintui/Makefile.in
+++ b/src/gutenprintui/Makefile.in
@@ -49,11 +49,12 @@ subdir = src/gutenprintui
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -79,8 +80,8 @@ libgutenprintui_la_OBJECTS = $(am_libgutenprintui_la_OBJECTS)
@BUILD_LIBGUTENPRINTUI_TRUE@am_libgutenprintui_la_rpath = -rpath \
@BUILD_LIBGUTENPRINTUI_TRUE@ $(libdir)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -103,13 +104,18 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -135,6 +141,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -142,6 +150,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -154,12 +163,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -194,6 +205,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -289,14 +301,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -313,6 +328,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -330,17 +348,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -386,9 +408,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/gutenprintui/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gutenprintui/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/gutenprintui/Makefile
+ $(AUTOMAKE) --gnu src/gutenprintui/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -449,32 +471,75 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-panel.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-plist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-print-image-thumbnail.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-printrcl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-printrcy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-ui-utils.Plo@am__quote@
+
.c.o:
- $(COMPILE) -c $<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
libgutenprintui_la-printrcy.lo: printrcy.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-printrcy.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-printrcy.Tpo" -c -o libgutenprintui_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-printrcy.Tpo" "$(DEPDIR)/libgutenprintui_la-printrcy.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-printrcy.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printrcy.c' object='libgutenprintui_la-printrcy.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c
libgutenprintui_la-printrcl.lo: printrcl.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-printrcl.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-printrcl.Tpo" -c -o libgutenprintui_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-printrcl.Tpo" "$(DEPDIR)/libgutenprintui_la-printrcl.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-printrcl.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printrcl.c' object='libgutenprintui_la-printrcl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c
libgutenprintui_la-plist.lo: plist.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-plist.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-plist.Tpo" -c -o libgutenprintui_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-plist.Tpo" "$(DEPDIR)/libgutenprintui_la-plist.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-plist.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='plist.c' object='libgutenprintui_la-plist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c
libgutenprintui_la-panel.lo: panel.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-panel.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-panel.Tpo" -c -o libgutenprintui_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-panel.Tpo" "$(DEPDIR)/libgutenprintui_la-panel.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-panel.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='panel.c' object='libgutenprintui_la-panel.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c
libgutenprintui_la-ui-utils.lo: ui-utils.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-ui-utils.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-ui-utils.Tpo" -c -o libgutenprintui_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-ui-utils.Tpo" "$(DEPDIR)/libgutenprintui_la-ui-utils.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-ui-utils.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ui-utils.c' object='libgutenprintui_la-ui-utils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c
libgutenprintui_la-print-image-thumbnail.lo: print-image-thumbnail.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-print-image-thumbnail.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-print-image-thumbnail.Tpo" -c -o libgutenprintui_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-print-image-thumbnail.Tpo" "$(DEPDIR)/libgutenprintui_la-print-image-thumbnail.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-print-image-thumbnail.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='print-image-thumbnail.c' object='libgutenprintui_la-print-image-thumbnail.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c
.l.c:
$(LEXCOMPILE) $<
@@ -646,6 +711,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -671,6 +737,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/gutenprintui/gutenprintui-internal.h b/src/gutenprintui/gutenprintui-internal.h
index 3eb98d8..7c4547d 100644
--- a/src/gutenprintui/gutenprintui-internal.h
+++ b/src/gutenprintui/gutenprintui-internal.h
@@ -1,5 +1,5 @@
/*
- * "$Id: gutenprintui-internal.h,v 1.2 2005/09/17 21:54:33 rlk Exp $"
+ * "$Id: gutenprintui-internal.h,v 1.2.12.1 2007/03/02 12:01:17 rlk Exp $"
*
* Print plug-in for the GIMP.
*
@@ -139,7 +139,7 @@ typedef struct
extern gint stpui_plist_count; /* Number of system printers */
extern gint stpui_plist_current; /* Current system printer */
extern stpui_plist_t *stpui_plist; /* System printers */
-extern const char *stpui_printrc_current_printer;
+extern char *stpui_printrc_current_printer;
extern int stpui_show_all_paper_sizes;
extern stp_string_list_t *stpui_system_print_queues;
diff --git a/src/gutenprintui/panel.c b/src/gutenprintui/panel.c
index ea8eb70..a8b1858 100644
--- a/src/gutenprintui/panel.c
+++ b/src/gutenprintui/panel.c
@@ -1,5 +1,5 @@
/*
- * "$Id: panel.c,v 1.9 2006/07/16 21:02:22 rlk Exp $"
+ * "$Id: panel.c,v 1.9.6.1 2007/03/02 12:01:17 rlk Exp $"
*
* Main window code for Print plug-in for the GIMP.
*
@@ -120,6 +120,8 @@ static GtkWidget *ppd_box;
static GtkWidget *ppd_label; /* PPD file entry */
static GtkWidget *ppd_button; /* PPD file browse button */
static GtkWidget *ppd_browser; /* File selection dialog for PPDs */
+static GtkWidget *ppd_model_label; /* PPD file entry */
+static GtkWidget *ppd_model; /* PPD file entry */
static GtkWidget *new_printer_dialog; /* New printer dialog window */
static GtkWidget *new_printer_entry; /* New printer text entry */
static GtkWidget *file_button; /* PPD file browse button */
@@ -192,6 +194,7 @@ static void combo_callback (GtkWidget *widget, gpointer data);
static void output_type_callback (GtkWidget *widget, gpointer data);
static void unit_callback (GtkWidget *widget, gpointer data);
static void orientation_callback (GtkWidget *widget, gpointer data);
+static void ppd_file_callback (GtkWidget *widget, gpointer data);
static void printandsave_callback (void);
static void about_callback (void);
static void print_callback (void);
@@ -1647,6 +1650,8 @@ create_printer_dialog (void)
GTK_FILL, GTK_FILL, 0, 0);
ppd_file = gtk_entry_new ();
+ gtk_signal_connect(GTK_OBJECT(ppd_file), "activate",
+ GTK_SIGNAL_FUNC(ppd_file_callback), NULL);
gtk_box_pack_start (GTK_BOX (ppd_box), ppd_file, TRUE, TRUE, 0);
gtk_widget_show (ppd_file);
@@ -1663,6 +1668,19 @@ create_printer_dialog (void)
gtk_signal_connect (GTK_OBJECT (ppd_button), "clicked",
GTK_SIGNAL_FUNC (ppd_browse_callback), NULL);
+ ppd_model_label = gtk_label_new (_("Printer Model:"));
+ gtk_misc_set_alignment (GTK_MISC (ppd_model_label), 1.0, 0.5);
+ gtk_table_attach (GTK_TABLE (table), ppd_model_label, 1, 2, 4, 5,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (ppd_model_label);
+
+ ppd_model = gtk_label_new ("");
+ gtk_misc_set_alignment (GTK_MISC (ppd_model), 0.0, 0.5);
+ gtk_table_attach (GTK_TABLE (table), ppd_model, 2, 7, 4, 5,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (ppd_model);
+
+
/*
* Print command.
*/
@@ -1670,11 +1688,11 @@ create_printer_dialog (void)
group = NULL;
for (i = 0; i < command_options_count; i++)
group = stpui_create_radio_button(&(command_options[i]), group, table,
- 0, i > 0 ? i + 5 : i + 4,
+ 0, i > 0 ? i + 6 : i + 5,
command_type_callback);
standard_cmd_entry = gtk_entry_new();
- gtk_table_attach (GTK_TABLE (table), standard_cmd_entry, 2, 7, 5, 6,
+ gtk_table_attach (GTK_TABLE (table), standard_cmd_entry, 2, 7, 6, 7,
GTK_FILL, GTK_FILL, 0, 0);
gtk_entry_set_editable(GTK_ENTRY(standard_cmd_entry), FALSE);
gtk_widget_set_sensitive(standard_cmd_entry, FALSE);
@@ -1692,13 +1710,13 @@ create_printer_dialog (void)
"or model, of printer) that you wish to print to"));
label = gtk_label_new(_("Printer Queue:"));
gtk_widget_show(label);
- gtk_table_attach (GTK_TABLE (table), label, 2, 3, 4, 5,
+ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 5, 6,
GTK_FILL, GTK_FILL, 0, 0);
- gtk_table_attach (GTK_TABLE (table), event_box, 3, 7, 4, 5,
+ gtk_table_attach (GTK_TABLE (table), event_box, 3, 7, 5, 6,
GTK_FILL, GTK_FILL, 0, 0);
custom_command_entry = gtk_entry_new ();
- gtk_table_attach (GTK_TABLE (table), custom_command_entry, 2, 7, 6, 7,
+ gtk_table_attach (GTK_TABLE (table), custom_command_entry, 2, 7, 7, 8,
GTK_FILL, GTK_FILL, 0, 0);
gtk_signal_connect(GTK_OBJECT(custom_command_entry), "activate",
GTK_SIGNAL_FUNC(setup_callback), NULL);
@@ -1709,7 +1727,7 @@ create_printer_dialog (void)
(custom_command_entry, _("Enter the correct command to print to your printer. "));
file_entry = gtk_entry_new ();
- gtk_table_attach (GTK_TABLE (table), file_entry, 2, 6, 7, 8,
+ gtk_table_attach (GTK_TABLE (table), file_entry, 2, 6, 8, 9,
GTK_FILL, GTK_FILL, 0, 0);
gtk_signal_connect(GTK_OBJECT(file_entry), "activate",
GTK_SIGNAL_FUNC(setup_callback), NULL);
@@ -1721,7 +1739,7 @@ create_printer_dialog (void)
file_button = gtk_button_new_with_label (_("Browse"));
- gtk_table_attach (GTK_TABLE (table), file_button, 6, 7, 7, 8,
+ gtk_table_attach (GTK_TABLE (table), file_button, 6, 7, 8, 9,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (file_button);
@@ -2597,9 +2615,10 @@ plist_build_combo (GtkWidget *combo, /* I - Combo widget */
gtk_combo_set_popdown_strings (GTK_COMBO (combo), list);
- for (i = 0; i < num_items; i ++)
- if (strcmp(stp_string_list_param(items, i)->name, cur_item) == 0)
- break;
+ if (cur_item)
+ for (i = 0; i < num_items; i ++)
+ if (strcmp(stp_string_list_param(items, i)->name, cur_item) == 0)
+ break;
if (i >= num_items && def_value)
for (i = 0; i < num_items; i ++)
@@ -3564,6 +3583,7 @@ setup_update (void)
gint idx = 0;
gint i;
gchar *tmp;
+ stp_parameter_t desc;
const char *ppd_file_name = stp_get_file_parameter(pv->v, "PPDFile");
for (i = 0; i < GTK_CLIST(manufacturer_clist)->rows; i++)
@@ -3586,23 +3606,49 @@ setup_update (void)
idx = 0;
*/
gtk_clist_select_row (GTK_CLIST (printer_driver), idx, 0);
- gtk_label_set_text (GTK_LABEL (printer_model_label),
- gettext (stp_printer_get_long_name (tmp_printer)));
+ stp_describe_parameter(pv->v, "ModelName", &desc);
+ if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST && desc.is_active &&
+ desc.deflt.str)
+ {
+ const char *extra_printer_model = desc.deflt.str;
+ char *label_text =
+ g_malloc(strlen(gettext (stp_printer_get_long_name (tmp_printer))) +
+ 2 + /* " (" */
+ strlen(extra_printer_model) +
+ 2); /* ")" + null terminator */
+ strcpy(label_text, extra_printer_model);
+ strcat(label_text, " (");
+ strcat(label_text, gettext (stp_printer_get_long_name (tmp_printer)));
+ strcat(label_text, ")");
+ gtk_label_set_text (GTK_LABEL (printer_model_label), label_text);
+ g_free(label_text);
+ }
+ else
+ {
+ gtk_label_set_text (GTK_LABEL (printer_model_label),
+ gettext (stp_printer_get_long_name (tmp_printer)));
+ }
+ stp_parameter_description_destroy(&desc);
if (ppd_file_name)
gtk_entry_set_text (GTK_ENTRY (ppd_file), ppd_file_name);
else
gtk_entry_set_text (GTK_ENTRY (ppd_file), "");
+ ppd_file_callback(ppd_file, NULL);
if (stp_parameter_find_in_settings(pv->v, "PPDFile"))
{
gtk_widget_show (ppd_box);
gtk_widget_show (ppd_label);
+ gtk_widget_show (ppd_model_label);
+ gtk_widget_show (ppd_model);
}
else
{
gtk_widget_hide (ppd_box);
gtk_widget_hide (ppd_label);
+ gtk_widget_hide (ppd_model_label);
+ gtk_widget_hide (ppd_model);
}
gtk_entry_set_text (GTK_ENTRY (custom_command_entry),
stpui_plist_get_custom_command (pv));
@@ -3619,6 +3665,27 @@ setup_update (void)
TRUE);
}
+static void
+ppd_file_callback(GtkWidget *widget, gpointer data)
+{
+ const gchar *name = gtk_entry_get_text(GTK_ENTRY(widget));
+ if (name && pv && pv->v)
+ {
+ stp_parameter_t desc;
+ stp_vars_t *v = stp_vars_create_copy(pv->v);
+ stp_set_file_parameter(v, "PPDFile", name);
+ stp_describe_parameter(v, "ModelName", &desc);
+ if (desc.is_active)
+ gtk_label_set_text(GTK_LABEL(ppd_model), desc.deflt.str);
+ else
+ gtk_label_set_text(GTK_LABEL(ppd_model), "");
+ stp_parameter_description_destroy(&desc);
+ stp_vars_destroy(v);
+ }
+ else
+ gtk_label_set_text(GTK_LABEL(ppd_model), "");
+}
+
/*
* setup_open_callback() -
*/
@@ -3739,11 +3806,15 @@ pop_ppd_box(void)
{
gtk_widget_show (ppd_label);
gtk_widget_show (ppd_box);
+ gtk_widget_show (ppd_model_label);
+ gtk_widget_show (ppd_model);
}
else
{
gtk_widget_hide (ppd_label);
gtk_widget_hide (ppd_box);
+ gtk_widget_hide (ppd_model_label);
+ gtk_widget_hide (ppd_model);
}
}
@@ -3847,6 +3918,8 @@ ppd_ok_callback (void)
gtk_entry_set_text
(GTK_ENTRY (ppd_file),
gtk_file_selection_get_filename (GTK_FILE_SELECTION (ppd_browser)));
+ ppd_file_callback(ppd_file, NULL);
+ update_options();
}
/*
diff --git a/src/gutenprintui/plist.c b/src/gutenprintui/plist.c
index cea5a43..3809eeb 100644
--- a/src/gutenprintui/plist.c
+++ b/src/gutenprintui/plist.c
@@ -1,5 +1,5 @@
/*
- * "$Id: plist.c,v 1.3 2006/07/16 23:07:32 rlk Exp $"
+ * "$Id: plist.c,v 1.3.6.1 2007/03/02 12:01:18 rlk Exp $"
*
* Print plug-in for the GIMP.
*
@@ -315,6 +315,19 @@ stpui_set_image_channel_depth(gint depth)
image_channel_depth = depth;
}
+static void
+writefunc(void *file, const char *buf, size_t bytes)
+{
+ FILE *prn = (FILE *)file;
+ fwrite(buf, 1, bytes, prn);
+}
+
+static void
+stpui_errfunc(void *file, const char *buf, size_t bytes)
+{
+ g_message(buf);
+}
+
void
stpui_printer_initialize(stpui_plist_t *printer)
{
@@ -331,6 +344,8 @@ stpui_printer_initialize(stpui_plist_t *printer)
printer->auto_size_roll_feed_paper = 0;
printer->unit = 0;
printer->v = stp_vars_create();
+ stp_set_errfunc(printer->v, writefunc);
+ stp_set_errdata(printer->v, stderr);
stpui_plist_set_copy_count(printer, 1);
stp_set_string_parameter(printer->v, "InputImageType", image_type);
if (image_raw_channels)
@@ -566,11 +581,11 @@ do { \
} while (0)
static void *
-psearch(const void *key, const void *base, size_t nmemb, size_t size,
+psearch(const void *key, void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *))
{
int i;
- const char *cbase = (const char *) base;
+ char *cbase = (char *) base;
for (i = 0; i < nmemb; i++)
{
if ((*compar)(key, (const void *) cbase) == 0)
@@ -613,6 +628,8 @@ stpui_plist_add(const stpui_plist_t *key, int add_only)
* always first in the list, else call psearch.
*/
stpui_plist_t *p;
+ if (!stp_get_printer(key->v))
+ stp_set_driver(key->v, "ps2");
if (stp_get_printer(key->v))
{
p = psearch(key, stpui_plist, stpui_plist_count,
@@ -642,8 +659,13 @@ stpui_plist_add(const stpui_plist_t *key, int add_only)
#endif
stpui_plist_copy(p, key);
}
+ return 1;
+ }
+ else
+ {
+ fprintf(stderr, "No printer found!\n");
+ return 0;
}
- return 1;
}
static void
@@ -910,7 +932,7 @@ stpui_printrc_load_v1(FILE *fp)
}
}
-const char *stpui_printrc_current_printer = NULL;
+char *stpui_printrc_current_printer = NULL;
extern FILE *yyin;
extern int yyparse(void);
@@ -921,7 +943,9 @@ stpui_printrc_load_v2(FILE *fp)
yyin = fp;
stpui_printrc_current_printer = NULL;
+ setlocale(LC_ALL, "C");
retval = yyparse();
+ setlocale(LC_ALL, "");
if (stpui_printrc_current_printer)
{
int i;
@@ -1232,19 +1256,6 @@ usr1_handler (int sig)
usr1_interrupt = 1;
}
-static void
-writefunc(void *file, const char *buf, size_t bytes)
-{
- FILE *prn = (FILE *)file;
- fwrite(buf, 1, bytes, prn);
-}
-
-static void
-stpui_errfunc(void *file, const char *buf, size_t bytes)
-{
- g_message(buf);
-}
-
/*
*
* Process control for actually printing. Documented 20040821
@@ -1751,5 +1762,5 @@ stpui_print(const stpui_plist_t *printer, stpui_image_t *image)
}
/*
- * End of "$Id: plist.c,v 1.3 2006/07/16 23:07:32 rlk Exp $".
+ * End of "$Id: plist.c,v 1.3.6.1 2007/03/02 12:01:18 rlk Exp $".
*/
diff --git a/src/gutenprintui/printrcl.c b/src/gutenprintui/printrcl.c
index e1718e4..f4490d4 100644
--- a/src/gutenprintui/printrcl.c
+++ b/src/gutenprintui/printrcl.c
@@ -1,31 +1,92 @@
-/* A lexical scanner generated by flex */
-/* Scanner skeleton version:
- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
- */
+#line 3 "printrcl.c"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 33
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+/* end standard C headers. */
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
#endif
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
-#ifdef __cplusplus
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
-#include <stdlib.h>
-#include <unistd.h>
+#endif /* ! FLEXINT_H */
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
+#ifdef __cplusplus
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
@@ -34,34 +95,17 @@
#if __STDC__
-#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
/* Returned upon end-of-file. */
#define YY_NULL 0
@@ -76,71 +120,75 @@
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
-#define BEGIN yy_start = 1 + 2 *
+#define BEGIN (yy_start) = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
-#define YY_START ((yy_start - 1) / 2)
+#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
+#define YY_NEW_FILE yyrestart(yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 16384
+#endif
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
extern int yyleng;
+
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
+ #define YY_LESS_LINENO(n)
+
+/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-#define unput(c) yyunput( c, yytext_ptr )
+#define unput(c) yyunput( c, (yytext_ptr) )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
-typedef unsigned int yy_size_t;
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef unsigned int yy_size_t;
+#endif
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
FILE *yy_input_file;
@@ -177,12 +225,16 @@ struct yy_buffer_state
*/
int yy_at_bol;
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
+
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
@@ -196,28 +248,38 @@ struct yy_buffer_state
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
+
};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-static YY_BUFFER_STATE yy_current_buffer = 0;
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
*/
-#define YY_CURRENT_BUFFER yy_current_buffer
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-
static int yy_n_chars; /* number of characters read into yy_ch_buf */
-
-
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1; /* whether we need to initialize */
+static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
@@ -225,69 +287,90 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart YY_PROTO(( FILE *input_file ));
+void yyrestart (FILE *input_file );
+void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
+void yy_delete_buffer (YY_BUFFER_STATE b );
+void yy_flush_buffer (YY_BUFFER_STATE b );
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state (void );
+
+static void yyensure_buffer_stack (void );
+static void yy_load_buffer_state (void );
+static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
+void *yyalloc (yy_size_t );
+void *yyrealloc (void *,yy_size_t );
+void yyfree (void * );
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_is_interactive = is_interactive; \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_at_bol = at_bol; \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-#define yywrap() 1
+#define yywrap(n) 1
#define YY_SKIP_YYWRAP
+
typedef unsigned char YY_CHAR;
+
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+
typedef int yy_state_type;
+
+extern int yylineno;
extern char *yytext;
#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[] );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
- yytext_ptr = yy_bp; \
- yyleng = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (size_t) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
- yy_c_buf_p = yy_cp;
+ (yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 40
#define YY_END_OF_BUFFER 41
-static yyconst short int yy_accept[335] =
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static yyconst flex_int16_t yy_accept[335] =
{ 0,
0, 0, 41, 40, 37, 39, 40, 38, 40, 40,
31, 35, 35, 35, 35, 35, 35, 35, 35, 35,
@@ -328,7 +411,7 @@ static yyconst short int yy_accept[335] =
0, 2, 18, 0
} ;
-static yyconst int yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -360,7 +443,7 @@ static yyconst int yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst int yy_meta[39] =
+static yyconst flex_int32_t yy_meta[39] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
3, 1, 3, 3, 3, 3, 3, 3, 3, 3,
@@ -368,7 +451,7 @@ static yyconst int yy_meta[39] =
3, 3, 3, 3, 3, 3, 3, 3
} ;
-static yyconst short int yy_base[340] =
+static yyconst flex_int16_t yy_base[340] =
{ 0,
0, 0, 374, 375, 371, 375, 368, 343, 364, 29,
32, 336, 341, 18, 26, 21, 32, 343, 0, 340,
@@ -409,7 +492,7 @@ static yyconst short int yy_base[340] =
81, 375, 375, 375, 94, 97, 100, 89, 103
} ;
-static yyconst short int yy_def[340] =
+static yyconst flex_int16_t yy_def[340] =
{ 0,
334, 1, 334, 334, 334, 334, 335, 336, 337, 334,
334, 338, 338, 338, 338, 338, 338, 338, 338, 338,
@@ -450,7 +533,7 @@ static yyconst short int yy_def[340] =
334, 334, 334, 0, 334, 334, 334, 334, 334
} ;
-static yyconst short int yy_nxt[414] =
+static yyconst flex_int16_t yy_nxt[414] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 10, 4, 11,
11, 4, 4, 12, 13, 14, 15, 16, 17, 18,
@@ -500,7 +583,7 @@ static yyconst short int yy_nxt[414] =
334, 334, 334
} ;
-static yyconst short int yy_chk[414] =
+static yyconst flex_int16_t yy_chk[414] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -553,6 +636,9 @@ static yyconst short int yy_chk[414] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
@@ -562,7 +648,6 @@ static char *yy_last_accepting_cpos;
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "printrcl.l"
-#define INITIAL 0
/* -*-Mode: C-*-
* "$Id: printrcl.l,v 1.1 2004/09/17 18:38:14 rleigh Exp $"
*
@@ -621,7 +706,23 @@ q_strdup(const char *s)
return g_strndup(s + 1, strlen(s) - 2);
}
-#line 625 "printrcl.c"
+#line 710 "printrcl.c"
+
+#define INITIAL 0
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals (void );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -629,65 +730,30 @@ q_strdup(const char *s)
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
+extern "C" int yywrap (void );
#else
-extern int yywrap YY_PROTO(( void ));
-#endif
+extern int yywrap (void );
#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
+ static void yyunput (int c,char *buf_ptr );
+
#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
+#ifdef __cplusplus
+static int yyinput (void );
#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
+static int input (void );
#endif
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
#endif
/* Amount of stuff to slurp up with each read. */
@@ -696,7 +762,6 @@ YY_MALLOC_DECL
#endif
/* Copy whatever the last rule matched to the standard output. */
-
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
@@ -709,9 +774,10 @@ YY_MALLOC_DECL
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
- int c = '*', n; \
+ int c = '*'; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -721,9 +787,22 @@ YY_MALLOC_DECL
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
+ else \
+ { \
+ errno=0; \
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -744,12 +823,18 @@ YY_MALLOC_DECL
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
+/* end tables serialization structures and prototypes */
+
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
@@ -766,27 +851,29 @@ YY_MALLOC_DECL
#define YY_RULE_SETUP \
YY_USER_ACTION
+/** The main scanner function which does all the work.
+ */
YY_DECL
- {
+{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
-
+
#line 73 "printrcl.l"
-#line 779 "printrcl.c"
+#line 866 "printrcl.c"
- if ( yy_init )
+ if ( !(yy_init) )
{
- yy_init = 0;
+ (yy_init) = 1;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
- if ( ! yy_start )
- yy_start = 1; /* first start state */
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
@@ -794,34 +881,36 @@ YY_DECL
if ( ! yyout )
yyout = stdout;
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer(yyin,YY_BUF_SIZE );
+ }
- yy_load_buffer_state();
+ yy_load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
{
- yy_cp = yy_c_buf_p;
+ yy_cp = (yy_c_buf_p);
/* Support of yytext. */
- *yy_cp = yy_hold_char;
+ *yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
- yy_current_state = yy_start;
+ yy_current_state = (yy_start);
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -838,24 +927,22 @@ yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
-
do_action: /* This label is used only to access EOF actions. */
-
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yy_hold_char;
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
goto yy_find_action;
case 1:
@@ -1019,6 +1106,7 @@ YY_RULE_SETUP
yylval.dval = strtod(yytext, NULL); DBG(tDOUBLE); return tDOUBLE;
YY_BREAK
case 33:
+/* rule 33 can match eol */
YY_RULE_SETUP
#line 109 "printrcl.l"
yylval.sval = q_strdup(yytext); DBG(tSTRING); return tSTRING;
@@ -1034,6 +1122,7 @@ YY_RULE_SETUP
yylval.sval = g_strdup(yytext); DBG(tWORD); return tWORD;
YY_BREAK
case 36:
+/* rule 36 can match eol */
YY_RULE_SETUP
#line 112 "printrcl.l"
DBG(PRINTRC_HDR); return PRINTRC_HDR;
@@ -1049,6 +1138,7 @@ YY_RULE_SETUP
DBG(comment1); /* Skip comments */
YY_BREAK
case 39:
+/* rule 39 can match eol */
YY_RULE_SETUP
#line 115 "printrcl.l"
DBG(newline); mylineno++;
@@ -1058,33 +1148,33 @@ YY_RULE_SETUP
#line 116 "printrcl.l"
ECHO;
YY_BREAK
-#line 1062 "printrcl.c"
+#line 1152 "printrcl.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yy_hold_char;
+ *yy_cp = (yy_hold_char);
YY_RESTORE_YY_MORE_OFFSET
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
- * consistency between yy_current_buffer and our
+ * consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
@@ -1094,13 +1184,13 @@ case YY_STATE_EOF(INITIAL):
* end-of-buffer state). Contrast this with the test
* in input().
*/
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
@@ -1113,30 +1203,30 @@ case YY_STATE_EOF(INITIAL):
yy_next_state = yy_try_NUL_trans( yy_current_state );
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
+ yy_cp = ++(yy_c_buf_p);
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
- yy_cp = yy_c_buf_p;
+ yy_cp = (yy_c_buf_p);
goto yy_find_action;
}
}
- else switch ( yy_get_next_buffer() )
+ else switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_END_OF_FILE:
{
- yy_did_buffer_switch_on_eof = 0;
+ (yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap() )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -1147,7 +1237,7 @@ case YY_STATE_EOF(INITIAL):
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
@@ -1155,30 +1245,30 @@ case YY_STATE_EOF(INITIAL):
else
{
- if ( ! yy_did_buffer_switch_on_eof )
+ if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p =
- yytext_ptr + yy_amount_of_matched_text;
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_find_action;
}
break;
@@ -1189,8 +1279,7 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
- } /* end of yylex */
-
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1199,21 +1288,20 @@ case YY_STATE_EOF(INITIAL):
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
-
-static int yy_get_next_buffer()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
+static int yy_get_next_buffer (void)
+{
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ register char *source = (yytext_ptr);
register int number_to_move, i;
int ret_val;
- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
- if ( yy_current_buffer->yy_fill_buffer == 0 )
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
@@ -1233,34 +1321,30 @@ static int yy_get_next_buffer()
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
- yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
else
{
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = yy_current_buffer;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
int yy_c_buf_p_offset =
- (int) (yy_c_buf_p - b->yy_ch_buf);
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
@@ -1273,8 +1357,7 @@ static int yy_get_next_buffer()
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1284,35 +1367,35 @@ static int yy_get_next_buffer()
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = yy_current_buffer->yy_buf_size -
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
-#endif
+
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
- if ( yy_n_chars == 0 )
+ if ( (yy_n_chars) == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
+ yyrestart(yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_buffer_status =
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
@@ -1320,32 +1403,31 @@ static int yy_get_next_buffer()
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
return ret_val;
- }
-
+}
/* yy_get_previous_state - get the state just before the EOB char was reached */
-static yy_state_type yy_get_previous_state()
- {
+ static yy_state_type yy_get_previous_state (void)
+{
register yy_state_type yy_current_state;
register char *yy_cp;
+
+ yy_current_state = (yy_start);
- yy_current_state = yy_start;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -1357,30 +1439,23 @@ static yy_state_type yy_get_previous_state()
}
return yy_current_state;
- }
-
+}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
- {
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
register int yy_is_jam;
- register char *yy_cp = yy_c_buf_p;
+ register char *yy_cp = (yy_c_buf_p);
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -1392,80 +1467,73 @@ yy_state_type yy_current_state;
yy_is_jam = (yy_current_state == 334);
return yy_is_jam ? 0 : yy_current_state;
- }
-
+}
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
- {
- register char *yy_cp = yy_c_buf_p;
+ static void yyunput (int c, register char * yy_bp )
+{
+ register char *yy_cp;
+
+ yy_cp = (yy_c_buf_p);
/* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
+ *yy_cp = (yy_hold_char);
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
+ register int number_to_move = (yy_n_chars) + 2;
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
- while ( source > yy_current_buffer->yy_ch_buf )
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
+ (yytext_ptr) = yy_bp;
+ (yy_hold_char) = *yy_cp;
+ (yy_c_buf_p) = yy_cp;
+}
- yytext_ptr = yy_bp;
- yy_hold_char = *yy_cp;
- yy_c_buf_p = yy_cp;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
-
+#ifndef YY_NO_INPUT
#ifdef __cplusplus
-static int yyinput()
+ static int yyinput (void)
#else
-static int input()
+ static int input (void)
#endif
- {
- int c;
- *yy_c_buf_p = yy_hold_char;
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
/* This was really a NUL. */
- *yy_c_buf_p = '\0';
+ *(yy_c_buf_p) = '\0';
else
{ /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
- ++yy_c_buf_p;
+ int offset = (yy_c_buf_p) - (yytext_ptr);
+ ++(yy_c_buf_p);
- switch ( yy_get_next_buffer() )
+ switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
@@ -1479,16 +1547,16 @@ static int input()
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ yyrestart(yyin );
- /* fall through */
+ /*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap() )
+ if ( yywrap( ) )
return EOF;
- if ( ! yy_did_buffer_switch_on_eof )
+ if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
@@ -1498,90 +1566,92 @@ static int input()
}
case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + offset;
+ (yy_c_buf_p) = (yytext_ptr) + offset;
break;
}
}
}
- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
- *yy_c_buf_p = '\0'; /* preserve yytext */
- yy_hold_char = *++yy_c_buf_p;
-
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
return c;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+}
+#endif /* ifndef YY_NO_INPUT */
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer(yyin,YY_BUF_SIZE );
}
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ yy_load_buffer_state( );
+}
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
- {
- if ( yy_current_buffer == new_buffer )
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
return;
- if ( yy_current_buffer )
+ if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
- yy_current_buffer = new_buffer;
- yy_load_buffer_state();
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
- yy_did_buffer_switch_on_eof = 1;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+static void yy_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
- {
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1590,80 +1660,75 @@ int size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer( b, file );
+ yy_init_buffer(b,file );
return b;
- }
-
+}
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
if ( ! b )
return;
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
+ yyfree((void *) b->yy_ch_buf );
+ yyfree((void *) b );
+}
-#ifndef YY_ALWAYS_INTERACTIVE
-#ifndef YY_NEVER_INTERACTIVE
-extern int isatty YY_PROTO(( int ));
-#endif
-#endif
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
- {
- yy_flush_buffer( b );
+{
+ int oerrno = errno;
+
+ yy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
-#if YY_ALWAYS_INTERACTIVE
- b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
- b->yy_is_interactive = 0;
-#else
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
- {
- if ( ! b )
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
return;
b->yy_n_chars = 0;
@@ -1680,29 +1745,121 @@ YY_BUFFER_STATE b;
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
+ if ( b == YY_CURRENT_BUFFER )
+ yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
}
+}
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+ int num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
- {
- YY_BUFFER_STATE b;
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+ /* Increase the buffer to prepare for a possible push. */
+ int grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
@@ -1716,56 +1873,51 @@ yy_size_t size;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer( b );
+ yy_switch_to_buffer(b );
return b;
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
- {
- int len;
- for ( len = 0; yy_str[len]; ++len )
- ;
-
- return yy_scan_bytes( yy_str, len );
- }
-#endif
+}
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param str a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+{
+
+ return yy_scan_bytes(yystr,strlen(yystr) );
+}
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
- {
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
+{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
- n = len + 2;
- buf = (char *) yy_flex_alloc( n );
+ n = _yybytes_len + 2;
+ buf = (char *) yyalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer( buf, n );
+ b = yy_scan_buffer(buf,n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
@@ -1775,148 +1927,177 @@ int len;
b->yy_is_our_buffer = 1;
return b;
- }
-#endif
-
+}
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
+static void yy_fatal_error (yyconst char* msg )
+{
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
+/* Accessor methods (get/set functions) to struct members. */
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
- BEGIN(new_state);
- }
-#endif
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
+/** Get the current token.
+ *
+ */
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
+char *yyget_text (void)
+{
+ return yytext;
+}
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * in_str )
+{
+ yyin = in_str ;
+}
+void yyset_out (FILE * out_str )
+{
+ yyout = out_str ;
+}
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
+void yyset_debug (int bdebug )
+{
+ yy_flex_debug = bdebug ;
+}
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = 0;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = (char *) 0;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
#else
-static void yy_fatal_error( msg )
-char msg[];
+ yyin = (FILE *) 0;
+ yyout = (FILE *) 0;
#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
- }
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
-/* Redefine yyless() so it works in section 3 code. */
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n; \
- yy_hold_char = *yy_c_buf_p; \
- *yy_c_buf_p = '\0'; \
- yyleng = n; \
- } \
- while ( 0 )
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+ return 0;
+}
-/* Internal utility routines. */
+/*
+ * Internal utility routines.
+ */
#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
- {
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
- }
+}
#endif
#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
+static int yy_flex_strlen (yyconst char * s )
+{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
- }
+}
#endif
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
- {
+void *yyalloc (yy_size_t size )
+{
return (void *) malloc( size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
- {
+void *yyrealloc (void * ptr, yy_size_t size )
+{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -1925,23 +2106,13 @@ yy_size_t size;
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
-#endif
#line 116 "printrcl.l"
diff --git a/src/gutenprintui/printrcy.c b/src/gutenprintui/printrcy.c
index 1609566..ffc38c6 100644
--- a/src/gutenprintui/printrcy.c
+++ b/src/gutenprintui/printrcy.c
@@ -1,7 +1,9 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
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
@@ -15,16 +17,24 @@
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. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
-/* Written by Richard Stallman by simplifying the original so called
- ``semantic'' parser. */
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
@@ -36,6 +46,9 @@
/* Identify Bison output. */
#define YYBISON 1
+/* Bison version. */
+#define YYBISON_VERSION "2.3"
+
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -93,6 +106,7 @@
pCURVE = 295
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tDIMENSION 260
@@ -183,7 +197,12 @@ static stpui_plist_t *current_printer = NULL;
# define YYERROR_VERBOSE 0
#endif
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -195,49 +214,171 @@ typedef int YYSTYPE;
/* Copy the second part of user declarations. */
-/* Line 214 of yacc.c. */
-#line 199 "printrcy.c"
+/* Line 216 of yacc.c. */
+#line 219 "printrcy.c"
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
+#ifdef short
+# undef short
+#endif
-/* The parser invokes alloca or malloc; define the necessary symbols. */
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
# else
-# ifndef YYSTACK_USE_ALLOCA
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+ int i;
+#endif
+{
+ return i;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
# else
-# if defined (__STDC__) || defined (__cplusplus)
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
# endif
-# define YYSTACK_ALLOC malloc
-# define YYSTACK_FREE free
# endif
-#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-#if (! defined (yyoverflow) \
- && (! defined (__cplusplus) \
- || (YYSTYPE_IS_TRIVIAL)))
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short yyss;
+ yytype_int16 yyss;
YYSTYPE yyvs;
};
@@ -247,24 +388,24 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if 1 < __GNUC__
+# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
- while (0)
+ while (YYID (0))
# endif
# endif
@@ -282,39 +423,33 @@ union yyalloc
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
- while (0)
+ while (YYID (0))
#endif
-#if defined (__STDC__) || defined (__cplusplus)
- typedef signed char yysigned_char;
-#else
- typedef short yysigned_char;
-#endif
-
-/* YYFINAL -- State number of the termination state. */
+/* YYFINAL -- State number of the termination state. */
#define YYFINAL 10
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 75
-/* YYNTOKENS -- Number of terminals. */
+/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 41
-/* YYNNTS -- Number of nonterminals. */
+/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 42
-/* YYNRULES -- Number of rules. */
+/* YYNRULES -- Number of rules. */
#define YYNRULES 70
-/* YYNRULES -- Number of states. */
+/* YYNRULES -- Number of states. */
#define YYNSTATES 114
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 295
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const unsigned char yytranslate[] =
+static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -351,7 +486,7 @@ static const unsigned char yytranslate[] =
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
-static const unsigned char yyprhs[] =
+static const yytype_uint8 yyprhs[] =
{
0, 0, 3, 7, 10, 13, 16, 19, 22, 25,
28, 31, 34, 37, 40, 43, 46, 49, 52, 53,
@@ -363,8 +498,8 @@ static const unsigned char yyprhs[] =
189
};
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yysigned_char yyrhs[] =
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int8 yyrhs[] =
{
82, 0, -1, 12, 7, 7, -1, 13, 7, -1,
26, 7, -1, 27, 7, -1, 28, 7, -1, 29,
@@ -389,50 +524,50 @@ static const yysigned_char yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short yyrline[] =
+static const yytype_uint16 yyrline[] =
{
- 0, 100, 100, 111, 118, 128, 138, 148, 158, 164,
- 168, 172, 176, 180, 184, 188, 206, 210, 214, 217,
- 231, 246, 261, 275, 289, 307, 327, 327, 327, 327,
- 328, 328, 328, 331, 334, 334, 337, 337, 337, 337,
- 338, 338, 338, 338, 338, 339, 339, 339, 339, 340,
- 340, 343, 343, 346, 349, 349, 352, 356, 366, 366,
- 369, 372, 383, 383, 386, 386, 389, 392, 392, 392,
- 395
+ 0, 100, 100, 111, 118, 128, 138, 148, 158, 165,
+ 172, 179, 186, 193, 200, 207, 228, 235, 242, 245,
+ 262, 280, 298, 315, 332, 353, 376, 376, 376, 376,
+ 377, 377, 377, 380, 383, 383, 386, 386, 386, 386,
+ 387, 387, 387, 387, 387, 388, 388, 388, 388, 389,
+ 389, 392, 392, 395, 398, 398, 401, 405, 415, 415,
+ 418, 421, 432, 432, 435, 435, 438, 441, 441, 441,
+ 444
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "tINT", "tDOUBLE", "tDIMENSION",
- "tBOOLEAN", "tSTRING", "tWORD", "tGSWORD", "CURRENT_PRINTER",
- "SHOW_ALL_PAPER_SIZES", "PRINTER", "DESTINATION", "SCALING",
- "ORIENTATION", "AUTOSIZE_ROLL_PAPER", "UNIT", "DRIVER", "LEFT", "TOP",
- "CUSTOM_PAGE_WIDTH", "CUSTOM_PAGE_HEIGHT", "OUTPUT_TYPE", "PRINTRC_HDR",
- "PARAMETER", "QUEUE_NAME", "OUTPUT_FILENAME", "EXTRA_PRINTER_OPTIONS",
- "CUSTOM_COMMAND", "COMMAND_TYPE", "GLOBAL_SETTINGS", "GLOBAL",
- "END_GLOBAL_SETTINGS", "pINT", "pSTRING_LIST", "pFILE", "pDOUBLE",
- "pDIMENSION", "pBOOLEAN", "pCURVE", "$accept", "Printer", "Destination",
- "Queue_Name", "Output_Filename", "Extra_Printer_Options",
- "Custom_Command", "Command_Type", "Scaling", "Orientation",
- "Autosize_Roll_Paper", "Unit", "Left", "Top", "Output_Type",
- "Custom_Page_Width", "Custom_Page_Height", "Empty", "Int_Param",
- "String_List_Param", "File_Param", "Double_Param", "Dimension_Param",
- "Boolean_Param", "Curve_Param", "Typed_Param", "Parameter",
- "Parameters", "Standard_Value", "Standard_Values", "A_Printer",
- "Printers", "Current_Printer", "Show_All_Paper_Sizes", "Global",
- "Old_Globals", "New_Global_Setting", "Global_Setting",
- "Global_Settings", "Global_Subblock", "Global_Block", "Thing", 0
+ "$end", "error", "$undefined", "tINT", "tDOUBLE", "tDIMENSION",
+ "tBOOLEAN", "tSTRING", "tWORD", "tGSWORD", "CURRENT_PRINTER",
+ "SHOW_ALL_PAPER_SIZES", "PRINTER", "DESTINATION", "SCALING",
+ "ORIENTATION", "AUTOSIZE_ROLL_PAPER", "UNIT", "DRIVER", "LEFT", "TOP",
+ "CUSTOM_PAGE_WIDTH", "CUSTOM_PAGE_HEIGHT", "OUTPUT_TYPE", "PRINTRC_HDR",
+ "PARAMETER", "QUEUE_NAME", "OUTPUT_FILENAME", "EXTRA_PRINTER_OPTIONS",
+ "CUSTOM_COMMAND", "COMMAND_TYPE", "GLOBAL_SETTINGS", "GLOBAL",
+ "END_GLOBAL_SETTINGS", "pINT", "pSTRING_LIST", "pFILE", "pDOUBLE",
+ "pDIMENSION", "pBOOLEAN", "pCURVE", "$accept", "Printer", "Destination",
+ "Queue_Name", "Output_Filename", "Extra_Printer_Options",
+ "Custom_Command", "Command_Type", "Scaling", "Orientation",
+ "Autosize_Roll_Paper", "Unit", "Left", "Top", "Output_Type",
+ "Custom_Page_Width", "Custom_Page_Height", "Empty", "Int_Param",
+ "String_List_Param", "File_Param", "Double_Param", "Dimension_Param",
+ "Boolean_Param", "Curve_Param", "Typed_Param", "Parameter", "Parameters",
+ "Standard_Value", "Standard_Values", "A_Printer", "Printers",
+ "Current_Printer", "Show_All_Paper_Sizes", "Global", "Old_Globals",
+ "New_Global_Setting", "Global_Setting", "Global_Settings",
+ "Global_Subblock", "Global_Block", "Thing", 0
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const unsigned short yytoknum[] =
+static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -443,7 +578,7 @@ static const unsigned short yytoknum[] =
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const unsigned char yyr1[] =
+static const yytype_uint8 yyr1[] =
{
0, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
@@ -456,7 +591,7 @@ static const unsigned char yyr1[] =
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const unsigned char yyr2[] =
+static const yytype_uint8 yyr2[] =
{
0, 2, 3, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 0, 4,
@@ -471,7 +606,7 @@ static const unsigned char yyr2[] =
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
-static const unsigned char yydefact[] =
+static const yytype_uint8 yydefact[] =
{
0, 18, 0, 0, 18, 69, 0, 68, 67, 18,
1, 56, 65, 0, 0, 60, 55, 70, 0, 66,
@@ -487,8 +622,8 @@ static const unsigned char yydefact[] =
22, 23, 24, 25
};
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yysigned_char yydefgoto[] =
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
{
-1, 27, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 5, 85, 86,
@@ -500,7 +635,7 @@ static const yysigned_char yydefgoto[] =
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -26
-static const yysigned_char yypact[] =
+static const yytype_int8 yypact[] =
{
-22, -2, 6, 0, -26, -26, 5, -26, -26, -26,
-26, -26, -26, -7, 11, -26, -26, 7, 13, -26,
@@ -517,7 +652,7 @@ static const yysigned_char yypact[] =
};
/* YYPGOTO[NTERM-NUM]. */
-static const yysigned_char yypgoto[] =
+static const yytype_int8 yypgoto[] =
{
-26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
-26, -26, -26, -26, -26, -26, -26, -4, -26, -26,
@@ -531,7 +666,7 @@ static const yysigned_char yypgoto[] =
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1
-static const unsigned char yytable[] =
+static const yytype_uint8 yytable[] =
{
12, 18, 1, 3, 14, 16, 10, 11, 3, 93,
94, 95, 96, 97, 98, 99, 14, 25, 84, 26,
@@ -543,7 +678,7 @@ static const unsigned char yytable[] =
108, 109, 110, 111, 113, 112
};
-static const yysigned_char yycheck[] =
+static const yytype_int8 yycheck[] =
{
4, 8, 24, 10, 11, 9, 0, 7, 10, 34,
35, 36, 37, 38, 39, 40, 11, 6, 8, 12,
@@ -557,7 +692,7 @@ static const yysigned_char yycheck[] =
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
-static const unsigned char yystos[] =
+static const yytype_uint8 yystos[] =
{
0, 24, 82, 10, 31, 58, 73, 76, 80, 81,
0, 7, 58, 79, 11, 74, 58, 72, 8, 33,
@@ -573,22 +708,6 @@ static const unsigned char yystos[] =
4, 3, 6, 7
};
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
@@ -596,7 +715,8 @@ static const unsigned char yystos[] =
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
+#define YYERROR goto yyerrorlab
+
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
@@ -613,30 +733,63 @@ do \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
+ YYPOPSTACK (1); \
goto yybackup; \
} \
else \
- { \
- yyerror ("syntax error: cannot back up");\
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
-while (0)
+while (YYID (0))
+
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
- are run). */
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- Current.first_line = Rhs[1].first_line; \
- Current.first_column = Rhs[1].first_column; \
- Current.last_line = Rhs[N].last_line; \
- Current.last_column = Rhs[N].last_column;
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
#endif
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
@@ -657,42 +810,96 @@ while (0)
do { \
if (yydebug) \
YYFPRINTF Args; \
-} while (0)
+} while (YYID (0))
-# define YYDSYMPRINT(Args) \
-do { \
- if (yydebug) \
- yysymprint Args; \
-} while (0)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
-# define YYDSYMPRINTF(Title, Token, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yysymprint (stderr, \
- Token, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (0)
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded). |
+| TOP (included). |
`------------------------------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (short *bottom, short *top)
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
yy_stack_print (bottom, top)
- short *bottom;
- short *top;
+ yytype_int16 *bottom;
+ yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (/* Nothing. */; bottom <= top; ++bottom)
+ for (; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
@@ -701,45 +908,52 @@ yy_stack_print (bottom, top)
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
-} while (0)
+} while (YYID (0))
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_reduce_print (int yyrule)
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
#else
static void
-yy_reduce_print (yyrule)
+yy_reduce_print (yyvsp, yyrule)
+ YYSTYPE *yyvsp;
int yyrule;
#endif
{
+ int yynrhs = yyr2[yyrule];
int yyi;
- unsigned int yylineno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylineno);
- /* Print the symbols being reduced, and their result. */
- for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ fprintf (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ fprintf (stderr, "\n");
+ }
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
- yy_reduce_print (Rule); \
-} while (0)
+ yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
@@ -754,13 +968,9 @@ int yydebug;
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
@@ -770,45 +980,47 @@ int yydebug;
#if YYERROR_VERBOSE
# ifndef yystrlen
-# if defined (__GLIBC__) && defined (_STRING_H)
+# if defined __GLIBC__ && defined _STRING_H
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
-# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
-# else
+#else
+static YYSIZE_T
yystrlen (yystr)
- const char *yystr;
-# endif
+ const char *yystr;
+#endif
{
- register const char *yys = yystr;
-
- while (*yys++ != '\0')
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
continue;
-
- return yys - yystr - 1;
+ return yylen;
}
# endif
# endif
# ifndef yystpcpy
-# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static char *
-# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
-# else
+#else
+static char *
yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-# endif
+ char *yydest;
+ const char *yysrc;
+#endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -818,70 +1030,192 @@ yystpcpy (yydest, yysrc)
# endif
# endif
-#endif /* !YYERROR_VERBOSE */
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
-
+ if (! yyres)
+ return yystrlen (yystr);
-#if YYDEBUG
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yysymprint (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
{
- /* Pacify ``unused variable'' warnings. */
- (void) yyvaluep;
+ int yyn = yypact[yystate];
- if (yytype < YYNTOKENS)
- {
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
- }
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- switch (yytype)
{
- default:
- break;
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
}
- YYFPRINTF (yyoutput, ")");
}
+#endif /* YYERROR_VERBOSE */
+
-#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
-yydestruct (yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
#endif
{
- /* Pacify ``unused variable'' warnings. */
- (void) yyvaluep;
+ YYUSE (yyvaluep);
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
default:
- break;
+ break;
}
}
@@ -889,13 +1223,13 @@ yydestruct (yytype, yyvaluep)
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
+#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
-# else
+#else
int yyparse ();
-# endif
+#endif
#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
+#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
@@ -904,10 +1238,10 @@ int yyparse ();
-/* The lookahead symbol. */
+/* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
@@ -920,14 +1254,18 @@ int yynerrs;
`----------*/
#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM)
-# else
-int yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-# endif
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
#else
@@ -938,13 +1276,19 @@ yyparse ()
#endif
{
- register int yystate;
- register int yyn;
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Lookahead token as an internal (translated) token number. */
+ /* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
/* Three stacks and their tools:
`yyss': related to states,
@@ -955,18 +1299,18 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- short yyssa[YYINITDEPTH];
- short *yyss = yyssa;
- register short *yyssp;
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
-#define YYPOPSTACK (yyvsp--, yyssp--)
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
YYSIZE_T yystacksize = YYINITDEPTH;
@@ -975,9 +1319,9 @@ yyparse ()
YYSTYPE yyval;
- /* When reducing, the number of symbols on the RHS of the reduced
- rule. */
- int yylen;
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1001,8 +1345,7 @@ yyparse ()
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks.
- */
+ have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
yysetstate:
@@ -1015,18 +1358,18 @@ yyparse ()
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
+ /* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
- yyoverflow ("parser stack overflow",
+ yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
@@ -1037,21 +1380,21 @@ yyparse ()
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
- short *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
@@ -1082,19 +1425,17 @@ yyparse ()
`-----------*/
yybackup:
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to lookahead token. */
+ /* Do appropriate processing given the current state. Read a
+ look-ahead token if we need one and don't already have one. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1109,7 +1450,7 @@ yybackup:
else
{
yytoken = YYTRANSLATE (yychar);
- YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
@@ -1129,22 +1470,21 @@ yybackup:
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
- YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
yystate = yyn;
+ *++yyvsp = yylval;
+
goto yynewstate;
@@ -1182,27 +1522,27 @@ yyreduce:
case 2:
#line 101 "printrcy.y"
{
- current_printer = stpui_plist_create(yyvsp[-1].sval, yyvsp[0].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ current_printer = stpui_plist_create((yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval));
+ g_free((yyvsp[(2) - (3)].sval));
+ g_free((yyvsp[(3) - (3)].sval));
}
break;
case 3:
#line 112 "printrcy.y"
{
- if (yyvsp[0].sval)
- g_free(yyvsp[0].sval);
+ if ((yyvsp[(2) - (2)].sval))
+ g_free((yyvsp[(2) - (2)].sval));
}
break;
case 4:
#line 119 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if (current_printer && (yyvsp[(2) - (2)].sval))
{
- stpui_plist_set_queue_name(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_queue_name(current_printer, (yyvsp[(2) - (2)].sval));
+ g_free((yyvsp[(2) - (2)].sval));
}
}
break;
@@ -1210,10 +1550,10 @@ yyreduce:
case 5:
#line 129 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if (current_printer && (yyvsp[(2) - (2)].sval))
{
- stpui_plist_set_output_filename(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_output_filename(current_printer, (yyvsp[(2) - (2)].sval));
+ g_free((yyvsp[(2) - (2)].sval));
}
}
break;
@@ -1221,10 +1561,10 @@ yyreduce:
case 6:
#line 139 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if (current_printer && (yyvsp[(2) - (2)].sval))
{
- stpui_plist_set_extra_printer_options(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_extra_printer_options(current_printer, (yyvsp[(2) - (2)].sval));
+ g_free((yyvsp[(2) - (2)].sval));
}
}
break;
@@ -1232,10 +1572,10 @@ yyreduce:
case 7:
#line 149 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if (current_printer && (yyvsp[(2) - (2)].sval))
{
- stpui_plist_set_custom_command(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_custom_command(current_printer, (yyvsp[(2) - (2)].sval));
+ g_free((yyvsp[(2) - (2)].sval));
}
}
break;
@@ -1243,224 +1583,272 @@ yyreduce:
case 8:
#line 159 "printrcy.y"
{
- stpui_plist_set_command_type(current_printer, yyvsp[0].ival);
+ if (current_printer)
+ stpui_plist_set_command_type(current_printer, (yyvsp[(2) - (2)].ival));
}
break;
case 9:
-#line 165 "printrcy.y"
- { current_printer->scaling = yyvsp[0].dval; }
+#line 166 "printrcy.y"
+ {
+ if (current_printer)
+ current_printer->scaling = (yyvsp[(2) - (2)].dval);
+ }
break;
case 10:
-#line 169 "printrcy.y"
- { current_printer->orientation = yyvsp[0].ival; }
+#line 173 "printrcy.y"
+ {
+ if (current_printer)
+ current_printer->orientation = (yyvsp[(2) - (2)].ival);
+ }
break;
case 11:
-#line 173 "printrcy.y"
- { current_printer->auto_size_roll_feed_paper = yyvsp[0].ival; }
+#line 180 "printrcy.y"
+ {
+ if (current_printer)
+ current_printer->auto_size_roll_feed_paper = (yyvsp[(2) - (2)].ival);
+ }
break;
case 12:
-#line 177 "printrcy.y"
- { current_printer->unit = yyvsp[0].ival; }
+#line 187 "printrcy.y"
+ {
+ if (current_printer)
+ current_printer->unit = (yyvsp[(2) - (2)].ival);
+ }
break;
case 13:
-#line 181 "printrcy.y"
- { stp_set_left(current_printer->v, yyvsp[0].ival); }
+#line 194 "printrcy.y"
+ {
+ if (current_printer)
+ stp_set_left(current_printer->v, (yyvsp[(2) - (2)].ival));
+ }
break;
case 14:
-#line 185 "printrcy.y"
- { stp_set_top(current_printer->v, yyvsp[0].ival); }
+#line 201 "printrcy.y"
+ {
+ if (current_printer)
+ stp_set_top(current_printer->v, (yyvsp[(2) - (2)].ival));
+ }
break;
case 15:
-#line 189 "printrcy.y"
+#line 208 "printrcy.y"
{
- switch (yyvsp[0].ival)
+ if (current_printer)
{
- case 0:
- stp_set_string_parameter
- (current_printer->v, "PrintingMode", "BW");
- break;
- case 1:
- case 2:
- default:
- stp_set_string_parameter
- (current_printer->v, "PrintingMode", "Color");
- break;
+ switch ((yyvsp[(2) - (2)].ival))
+ {
+ case 0:
+ stp_set_string_parameter
+ (current_printer->v, "PrintingMode", "BW");
+ break;
+ case 1:
+ case 2:
+ default:
+ stp_set_string_parameter
+ (current_printer->v, "PrintingMode", "Color");
+ break;
+ }
}
}
break;
case 16:
-#line 207 "printrcy.y"
- { stp_set_page_width(current_printer->v, yyvsp[0].ival); }
+#line 229 "printrcy.y"
+ {
+ if (current_printer)
+ stp_set_page_width(current_printer->v, (yyvsp[(2) - (2)].ival));
+ }
break;
case 17:
-#line 211 "printrcy.y"
- { stp_set_page_height(current_printer->v, yyvsp[0].ival); }
+#line 236 "printrcy.y"
+ {
+ if (current_printer)
+ stp_set_page_height(current_printer->v, (yyvsp[(2) - (2)].ival));
+ }
break;
case 19:
-#line 218 "printrcy.y"
+#line 246 "printrcy.y"
{
- stp_set_int_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].ival);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_int_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_int_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ if (current_printer)
+ {
+ stp_set_int_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].ival));
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_int_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_int_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
}
break;
case 20:
-#line 232 "printrcy.y"
+#line 263 "printrcy.y"
{
- stp_set_string_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].sval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_string_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_string_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ if (current_printer)
+ {
+ stp_set_string_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].sval));
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_string_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_string_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
+ g_free((yyvsp[(4) - (4)].sval));
}
break;
case 21:
-#line 247 "printrcy.y"
+#line 281 "printrcy.y"
{
- stp_set_file_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].sval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_file_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_file_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ if (current_printer)
+ {
+ stp_set_file_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].sval));
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_file_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_file_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
+ g_free((yyvsp[(4) - (4)].sval));
}
break;
case 22:
-#line 262 "printrcy.y"
+#line 299 "printrcy.y"
{
- stp_set_float_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].dval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_float_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_float_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ if (current_printer)
+ {
+ stp_set_float_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].dval));
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_float_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_float_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
}
break;
case 23:
-#line 276 "printrcy.y"
+#line 316 "printrcy.y"
{
- stp_set_dimension_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].ival);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_dimension_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_dimension_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ if (current_printer)
+ {
+ stp_set_dimension_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].ival));
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_dimension_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_dimension_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
}
break;
case 24:
-#line 290 "printrcy.y"
+#line 333 "printrcy.y"
{
- if (strcmp(yyvsp[0].sval, "False") == 0)
- stp_set_boolean_parameter(current_printer->v, yyvsp[-3].sval, 0);
- else
- stp_set_boolean_parameter(current_printer->v, yyvsp[-3].sval, 1);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_boolean_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_boolean_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ if (current_printer)
+ {
+ if (strcmp((yyvsp[(4) - (4)].sval), "False") == 0)
+ stp_set_boolean_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), 0);
+ else
+ stp_set_boolean_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), 1);
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_boolean_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_boolean_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
+ g_free((yyvsp[(4) - (4)].sval));
}
break;
case 25:
-#line 308 "printrcy.y"
+#line 354 "printrcy.y"
{
- stp_curve_t *curve = stp_curve_create_from_string(yyvsp[0].sval);
- if (curve)
+ if (current_printer)
{
- stp_set_curve_parameter(current_printer->v, yyvsp[-3].sval, curve);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_curve_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_curve_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- stp_curve_destroy(curve);
+ stp_curve_t *curve = stp_curve_create_from_string((yyvsp[(4) - (4)].sval));
+ if (curve)
+ {
+ stp_set_curve_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), curve);
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_curve_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_curve_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ stp_curve_destroy(curve);
+ }
}
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
+ g_free((yyvsp[(4) - (4)].sval));
}
break;
case 56:
-#line 353 "printrcy.y"
- { stpui_printrc_current_printer = yyvsp[0].sval; }
+#line 402 "printrcy.y"
+ { stpui_printrc_current_printer = (yyvsp[(2) - (2)].sval); }
break;
case 57:
-#line 357 "printrcy.y"
+#line 406 "printrcy.y"
{
- if (strcmp(yyvsp[0].sval, "True") == 0)
+ if (strcmp((yyvsp[(2) - (2)].sval), "True") == 0)
stpui_show_all_paper_sizes = 1;
else
stpui_show_all_paper_sizes = 0;
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[(2) - (2)].sval));
}
break;
case 61:
-#line 373 "printrcy.y"
+#line 422 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[(2) - (2)].sval))
{
- stpui_set_global_parameter(yyvsp[-1].sval, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_set_global_parameter((yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].sval));
+ g_free((yyvsp[(2) - (2)].sval));
}
- g_free(yyvsp[-1].sval);
+ g_free((yyvsp[(1) - (2)].sval));
}
break;
+/* Line 1267 of yacc.c. */
+#line 1846 "printrcy.c"
+ default: break;
}
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-/* Line 991 of yacc.c. */
-#line 1458 "printrcy.c"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-
-
+ YYPOPSTACK (yylen);
+ yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
@@ -1489,109 +1877,93 @@ yyerrlab:
if (!yyerrstatus)
{
++yynerrs;
-#if YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (YYPACT_NINF < yyn && yyn < YYLAST)
- {
- YYSIZE_T yysize = 0;
- int yytype = YYTRANSLATE (yychar);
- char *yymsg;
- int yyx, yycount;
-
- yycount = 0;
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- yysize += yystrlen (yytname[yyx]) + 15, yycount++;
- yysize += yystrlen ("syntax error, unexpected ") + 1;
- yysize += yystrlen (yytname[yytype]);
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg != 0)
- {
- char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
- yyp = yystpcpy (yyp, yytname[yytype]);
-
- if (yycount < 5)
- {
- yycount = 0;
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *));
- yyx++)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- const char *yyq = ! yycount ? ", expecting " : " or ";
- yyp = yystpcpy (yyp, yyq);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yycount++;
- }
- }
- yyerror (yymsg);
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+ {
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
- }
- else
- yyerror ("syntax error; also virtual memory exhausted");
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror ("syntax error");
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
+ }
+#endif
}
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- {
- /* Pop the error token. */
- YYPOPSTACK;
- /* Pop the rest of the stack. */
- while (yyss < yyssp)
- {
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[*yyssp], yyvsp);
- YYPOPSTACK;
- }
- YYABORT;
- }
-
- YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
- yydestruct (yytoken, &yylval);
- yychar = YYEMPTY;
-
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
- goto yyerrlab2;
+ goto yyerrlab1;
-/*----------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action. |
-`----------------------------------------------------*/
-yyerrlab1:
-
- /* Suppress GCC warning that yyerrlab1 is unused when no action
- invokes YYERROR. */
-#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
- && !defined __cplusplus
- __attribute__ ((__unused__))
-#endif
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
- goto yyerrlab2;
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
-/*---------------------------------------------------------------.
-| yyerrlab2 -- pop states until the error token can be shifted. |
-`---------------------------------------------------------------*/
-yyerrlab2:
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
@@ -1612,22 +1984,23 @@ yyerrlab2:
if (yyssp == yyss)
YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[yystate], yyvsp);
- yyvsp--;
- yystate = *--yyssp;
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
if (yyn == YYFINAL)
YYACCEPT;
- YYDPRINTF ((stderr, "Shifting error token, "));
-
*++yyvsp = yylval;
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
yystate = yyn;
goto yynewstate;
@@ -1647,24 +2020,42 @@ yyabortlab:
goto yyreturn;
#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here. |
-`----------------------------------------------*/
-yyoverflowlab:
- yyerror ("parser stack overflow");
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
- return yyresult;
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
}
-#line 398 "printrcy.y"
+#line 447 "printrcy.y"
diff --git a/src/gutenprintui/printrcy.h b/src/gutenprintui/printrcy.h
index afa662b..8a6c041 100644
--- a/src/gutenprintui/printrcy.h
+++ b/src/gutenprintui/printrcy.h
@@ -1,7 +1,9 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
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
@@ -15,13 +17,21 @@
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. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
@@ -69,6 +79,7 @@
pCURVE = 295
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tDIMENSION 260
@@ -111,7 +122,7 @@
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -120,5 +131,3 @@ typedef int YYSTYPE;
extern YYSTYPE yylval;
-
-
diff --git a/src/gutenprintui/printrcy.y b/src/gutenprintui/printrcy.y
index 99cfaeb..f2dd851 100644
--- a/src/gutenprintui/printrcy.y
+++ b/src/gutenprintui/printrcy.y
@@ -1,5 +1,5 @@
/*
- * "$Id: printrcy.y,v 1.1 2004/09/17 18:38:14 rleigh Exp $"
+ * "$Id: printrcy.y,v 1.1.18.1 2007/03/02 12:01:19 rlk Exp $"
*
* Test pattern generator for Gutenprint
*
@@ -117,7 +117,7 @@ Destination: DESTINATION tSTRING
Queue_Name: QUEUE_NAME tSTRING
{
- if ($2)
+ if (current_printer && $2)
{
stpui_plist_set_queue_name(current_printer, $2);
g_free($2);
@@ -127,7 +127,7 @@ Queue_Name: QUEUE_NAME tSTRING
Output_Filename: OUTPUT_FILENAME tSTRING
{
- if ($2)
+ if (current_printer && $2)
{
stpui_plist_set_output_filename(current_printer, $2);
g_free($2);
@@ -137,7 +137,7 @@ Output_Filename: OUTPUT_FILENAME tSTRING
Extra_Printer_Options: EXTRA_PRINTER_OPTIONS tSTRING
{
- if ($2)
+ if (current_printer && $2)
{
stpui_plist_set_extra_printer_options(current_printer, $2);
g_free($2);
@@ -147,7 +147,7 @@ Extra_Printer_Options: EXTRA_PRINTER_OPTIONS tSTRING
Custom_Command: CUSTOM_COMMAND tSTRING
{
- if ($2)
+ if (current_printer && $2)
{
stpui_plist_set_custom_command(current_printer, $2);
g_free($2);
@@ -157,58 +157,86 @@ Custom_Command: CUSTOM_COMMAND tSTRING
Command_Type: COMMAND_TYPE tINT
{
- stpui_plist_set_command_type(current_printer, $2);
+ if (current_printer)
+ stpui_plist_set_command_type(current_printer, $2);
}
;
Scaling: SCALING tDOUBLE
- { current_printer->scaling = $2; }
+ {
+ if (current_printer)
+ current_printer->scaling = $2;
+ }
;
Orientation: ORIENTATION tINT
- { current_printer->orientation = $2; }
+ {
+ if (current_printer)
+ current_printer->orientation = $2;
+ }
;
Autosize_Roll_Paper: AUTOSIZE_ROLL_PAPER tINT
- { current_printer->auto_size_roll_feed_paper = $2; }
+ {
+ if (current_printer)
+ current_printer->auto_size_roll_feed_paper = $2;
+ }
;
Unit: UNIT tINT
- { current_printer->unit = $2; }
+ {
+ if (current_printer)
+ current_printer->unit = $2;
+ }
;
Left: LEFT tINT
- { stp_set_left(current_printer->v, $2); }
+ {
+ if (current_printer)
+ stp_set_left(current_printer->v, $2);
+ }
;
Top: TOP tINT
- { stp_set_top(current_printer->v, $2); }
+ {
+ if (current_printer)
+ stp_set_top(current_printer->v, $2);
+ }
;
Output_Type: OUTPUT_TYPE tINT
{
- switch ($2)
+ if (current_printer)
{
- case 0:
- stp_set_string_parameter
- (current_printer->v, "PrintingMode", "BW");
- break;
- case 1:
- case 2:
- default:
- stp_set_string_parameter
- (current_printer->v, "PrintingMode", "Color");
- break;
+ switch ($2)
+ {
+ case 0:
+ stp_set_string_parameter
+ (current_printer->v, "PrintingMode", "BW");
+ break;
+ case 1:
+ case 2:
+ default:
+ stp_set_string_parameter
+ (current_printer->v, "PrintingMode", "Color");
+ break;
+ }
}
}
;
Custom_Page_Width: CUSTOM_PAGE_WIDTH tINT
- { stp_set_page_width(current_printer->v, $2); }
+ {
+ if (current_printer)
+ stp_set_page_width(current_printer->v, $2);
+ }
;
Custom_Page_Height: CUSTOM_PAGE_HEIGHT tINT
- { stp_set_page_height(current_printer->v, $2); }
+ {
+ if (current_printer)
+ stp_set_page_height(current_printer->v, $2);
+ }
;
Empty:
@@ -216,13 +244,16 @@ Empty:
Int_Param: tWORD pINT tBOOLEAN tINT
{
- stp_set_int_parameter(current_printer->v, $1, $4);
- if (strcmp($3, "False") == 0)
- stp_set_int_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_int_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ stp_set_int_parameter(current_printer->v, $1, $4);
+ if (strcmp($3, "False") == 0)
+ stp_set_int_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_int_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
}
@@ -230,13 +261,16 @@ Int_Param: tWORD pINT tBOOLEAN tINT
String_List_Param: tWORD pSTRING_LIST tBOOLEAN tSTRING
{
- stp_set_string_parameter(current_printer->v, $1, $4);
- if (strcmp($3, "False") == 0)
- stp_set_string_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_string_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ stp_set_string_parameter(current_printer->v, $1, $4);
+ if (strcmp($3, "False") == 0)
+ stp_set_string_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_string_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
g_free($4);
@@ -245,13 +279,16 @@ String_List_Param: tWORD pSTRING_LIST tBOOLEAN tSTRING
File_Param: tWORD pFILE tBOOLEAN tSTRING
{
- stp_set_file_parameter(current_printer->v, $1, $4);
- if (strcmp($3, "False") == 0)
- stp_set_file_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_file_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ stp_set_file_parameter(current_printer->v, $1, $4);
+ if (strcmp($3, "False") == 0)
+ stp_set_file_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_file_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
g_free($4);
@@ -260,13 +297,16 @@ File_Param: tWORD pFILE tBOOLEAN tSTRING
Double_Param: tWORD pDOUBLE tBOOLEAN tDOUBLE
{
- stp_set_float_parameter(current_printer->v, $1, $4);
- if (strcmp($3, "False") == 0)
- stp_set_float_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_float_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ stp_set_float_parameter(current_printer->v, $1, $4);
+ if (strcmp($3, "False") == 0)
+ stp_set_float_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_float_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
}
@@ -274,13 +314,16 @@ Double_Param: tWORD pDOUBLE tBOOLEAN tDOUBLE
Dimension_Param: tWORD pDIMENSION tBOOLEAN tINT
{
- stp_set_dimension_parameter(current_printer->v, $1, $4);
- if (strcmp($3, "False") == 0)
- stp_set_dimension_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_dimension_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ stp_set_dimension_parameter(current_printer->v, $1, $4);
+ if (strcmp($3, "False") == 0)
+ stp_set_dimension_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_dimension_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
}
@@ -288,16 +331,19 @@ Dimension_Param: tWORD pDIMENSION tBOOLEAN tINT
Boolean_Param: tWORD pBOOLEAN tBOOLEAN tBOOLEAN
{
- if (strcmp($4, "False") == 0)
- stp_set_boolean_parameter(current_printer->v, $1, 0);
- else
- stp_set_boolean_parameter(current_printer->v, $1, 1);
- if (strcmp($3, "False") == 0)
- stp_set_boolean_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_boolean_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ if (strcmp($4, "False") == 0)
+ stp_set_boolean_parameter(current_printer->v, $1, 0);
+ else
+ stp_set_boolean_parameter(current_printer->v, $1, 1);
+ if (strcmp($3, "False") == 0)
+ stp_set_boolean_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_boolean_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
g_free($4);
@@ -306,17 +352,20 @@ Boolean_Param: tWORD pBOOLEAN tBOOLEAN tBOOLEAN
Curve_Param: tWORD pCURVE tBOOLEAN tSTRING
{
- stp_curve_t *curve = stp_curve_create_from_string($4);
- if (curve)
+ if (current_printer)
{
- stp_set_curve_parameter(current_printer->v, $1, curve);
- if (strcmp($3, "False") == 0)
- stp_set_curve_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_curve_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
- stp_curve_destroy(curve);
+ stp_curve_t *curve = stp_curve_create_from_string($4);
+ if (curve)
+ {
+ stp_set_curve_parameter(current_printer->v, $1, curve);
+ if (strcmp($3, "False") == 0)
+ stp_set_curve_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_curve_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ stp_curve_destroy(curve);
+ }
}
g_free($1);
g_free($3);
diff --git a/src/gutenprintui2/Makefile.in b/src/gutenprintui2/Makefile.in
index 9226fe7..3500a8d 100644
--- a/src/gutenprintui2/Makefile.in
+++ b/src/gutenprintui2/Makefile.in
@@ -49,11 +49,12 @@ subdir = src/gutenprintui2
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -81,8 +82,8 @@ libgutenprintui2_la_OBJECTS = $(am_libgutenprintui2_la_OBJECTS)
@BUILD_LIBGUTENPRINTUI2_TRUE@am_libgutenprintui2_la_rpath = -rpath \
@BUILD_LIBGUTENPRINTUI2_TRUE@ $(libdir)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -105,13 +106,18 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -137,6 +143,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -144,6 +152,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -156,12 +165,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -196,6 +207,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -291,14 +303,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -315,6 +330,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -332,17 +350,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -400,9 +422,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/gutenprintui2/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gutenprintui2/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/gutenprintui2/Makefile
+ $(AUTOMAKE) --gnu src/gutenprintui2/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -463,41 +485,99 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-curve.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-gammacurve.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-panel.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-plist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-print-image-thumbnail.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-printrcl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-printrcy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-typebuiltins.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-ui-utils.Plo@am__quote@
+
.c.o:
- $(COMPILE) -c $<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
libgutenprintui2_la-printrcy.lo: printrcy.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-printrcy.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-printrcy.Tpo" -c -o libgutenprintui2_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-printrcy.Tpo" "$(DEPDIR)/libgutenprintui2_la-printrcy.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-printrcy.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printrcy.c' object='libgutenprintui2_la-printrcy.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c
libgutenprintui2_la-printrcl.lo: printrcl.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-printrcl.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-printrcl.Tpo" -c -o libgutenprintui2_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-printrcl.Tpo" "$(DEPDIR)/libgutenprintui2_la-printrcl.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-printrcl.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printrcl.c' object='libgutenprintui2_la-printrcl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c
libgutenprintui2_la-panel.lo: panel.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-panel.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-panel.Tpo" -c -o libgutenprintui2_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-panel.Tpo" "$(DEPDIR)/libgutenprintui2_la-panel.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-panel.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='panel.c' object='libgutenprintui2_la-panel.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c
libgutenprintui2_la-plist.lo: plist.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-plist.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-plist.Tpo" -c -o libgutenprintui2_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-plist.Tpo" "$(DEPDIR)/libgutenprintui2_la-plist.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-plist.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='plist.c' object='libgutenprintui2_la-plist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c
libgutenprintui2_la-ui-utils.lo: ui-utils.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-ui-utils.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-ui-utils.Tpo" -c -o libgutenprintui2_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-ui-utils.Tpo" "$(DEPDIR)/libgutenprintui2_la-ui-utils.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-ui-utils.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ui-utils.c' object='libgutenprintui2_la-ui-utils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c
libgutenprintui2_la-print-image-thumbnail.lo: print-image-thumbnail.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-print-image-thumbnail.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-print-image-thumbnail.Tpo" -c -o libgutenprintui2_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-print-image-thumbnail.Tpo" "$(DEPDIR)/libgutenprintui2_la-print-image-thumbnail.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-print-image-thumbnail.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='print-image-thumbnail.c' object='libgutenprintui2_la-print-image-thumbnail.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c
libgutenprintui2_la-curve.lo: curve.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-curve.lo `test -f 'curve.c' || echo '$(srcdir)/'`curve.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-curve.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-curve.Tpo" -c -o libgutenprintui2_la-curve.lo `test -f 'curve.c' || echo '$(srcdir)/'`curve.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-curve.Tpo" "$(DEPDIR)/libgutenprintui2_la-curve.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-curve.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='curve.c' object='libgutenprintui2_la-curve.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-curve.lo `test -f 'curve.c' || echo '$(srcdir)/'`curve.c
libgutenprintui2_la-gammacurve.lo: gammacurve.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-gammacurve.lo `test -f 'gammacurve.c' || echo '$(srcdir)/'`gammacurve.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-gammacurve.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-gammacurve.Tpo" -c -o libgutenprintui2_la-gammacurve.lo `test -f 'gammacurve.c' || echo '$(srcdir)/'`gammacurve.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-gammacurve.Tpo" "$(DEPDIR)/libgutenprintui2_la-gammacurve.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-gammacurve.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gammacurve.c' object='libgutenprintui2_la-gammacurve.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-gammacurve.lo `test -f 'gammacurve.c' || echo '$(srcdir)/'`gammacurve.c
libgutenprintui2_la-typebuiltins.lo: typebuiltins.c
- $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-typebuiltins.lo `test -f 'typebuiltins.c' || echo '$(srcdir)/'`typebuiltins.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-typebuiltins.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-typebuiltins.Tpo" -c -o libgutenprintui2_la-typebuiltins.lo `test -f 'typebuiltins.c' || echo '$(srcdir)/'`typebuiltins.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-typebuiltins.Tpo" "$(DEPDIR)/libgutenprintui2_la-typebuiltins.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-typebuiltins.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='typebuiltins.c' object='libgutenprintui2_la-typebuiltins.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-typebuiltins.lo `test -f 'typebuiltins.c' || echo '$(srcdir)/'`typebuiltins.c
.l.c:
$(LEXCOMPILE) $<
@@ -669,6 +749,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -694,6 +775,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/gutenprintui2/panel.c b/src/gutenprintui2/panel.c
index d979ab7..cf4a06b 100644
--- a/src/gutenprintui2/panel.c
+++ b/src/gutenprintui2/panel.c
@@ -1,5 +1,5 @@
/*
- * "$Id: panel.c,v 1.11 2006/05/28 16:59:04 rlk Exp $"
+ * "$Id: panel.c,v 1.11.8.2 2007/05/29 01:47:27 rlk Exp $"
*
* Main window code for Print plug-in for the GIMP.
*
@@ -120,6 +120,8 @@ static GtkWidget *ppd_box;
static GtkWidget *ppd_label; /* PPD file entry */
static GtkWidget *ppd_button; /* PPD file browse button */
static GtkWidget *ppd_browser; /* File selection dialog for PPDs */
+static GtkWidget *ppd_model_label; /* PPD file entry */
+static GtkWidget *ppd_model; /* PPD file entry */
static GtkWidget *new_printer_dialog; /* New printer dialog window */
static GtkWidget *new_printer_entry; /* New printer text entry */
static GtkWidget *file_button; /* PPD file browse button */
@@ -192,6 +194,7 @@ static void combo_callback (GtkWidget *widget, gpointer data);
static void output_type_callback (GtkWidget *widget, gpointer data);
static void unit_callback (GtkWidget *widget, gpointer data);
static void orientation_callback (GtkWidget *widget, gpointer data);
+static void ppd_file_callback (GtkWidget *widget, gpointer data);
static void printandsave_callback (void);
static void about_callback (void);
static void print_callback (void);
@@ -1647,6 +1650,8 @@ create_printer_dialog (void)
GTK_FILL, GTK_FILL, 0, 0);
ppd_file = gtk_entry_new ();
+ g_signal_connect(G_OBJECT(ppd_file), "activate",
+ G_CALLBACK(ppd_file_callback), NULL);
gtk_box_pack_start (GTK_BOX (ppd_box), ppd_file, TRUE, TRUE, 0);
gtk_widget_show (ppd_file);
@@ -1663,6 +1668,19 @@ create_printer_dialog (void)
g_signal_connect (G_OBJECT (ppd_button), "clicked",
G_CALLBACK (ppd_browse_callback), NULL);
+ ppd_model_label = gtk_label_new (_("Printer Model:"));
+ gtk_misc_set_alignment (GTK_MISC (ppd_model_label), 1.0, 0.5);
+ gtk_table_attach (GTK_TABLE (table), ppd_model_label, 1, 2, 4, 5,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (ppd_model_label);
+
+ ppd_model = gtk_label_new ("");
+ gtk_misc_set_alignment (GTK_MISC (ppd_model), 0.0, 0.5);
+ gtk_table_attach (GTK_TABLE (table), ppd_model, 2, 7, 4, 5,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show (ppd_model);
+
+
/*
* Print command.
*/
@@ -1670,11 +1688,11 @@ create_printer_dialog (void)
group = NULL;
for (i = 0; i < command_options_count; i++)
group = stpui_create_radio_button(&(command_options[i]), group, table,
- 0, i > 0 ? i + 5 : i + 4,
+ 0, i > 0 ? i + 6 : i + 5,
G_CALLBACK(command_type_callback));
standard_cmd_entry = gtk_entry_new();
- gtk_table_attach (GTK_TABLE (table), standard_cmd_entry, 2, 7, 5, 6,
+ gtk_table_attach (GTK_TABLE (table), standard_cmd_entry, 2, 7, 6, 7,
GTK_FILL, GTK_FILL, 0, 0);
gtk_entry_set_editable(GTK_ENTRY(standard_cmd_entry), FALSE);
gtk_widget_set_sensitive(standard_cmd_entry, FALSE);
@@ -1692,13 +1710,13 @@ create_printer_dialog (void)
"or model, of printer) that you wish to print to"));
label = gtk_label_new(_("Printer Queue:"));
gtk_widget_show(label);
- gtk_table_attach (GTK_TABLE (table), label, 2, 3, 4, 5,
+ gtk_table_attach (GTK_TABLE (table), label, 2, 3, 5, 6,
GTK_FILL, GTK_FILL, 0, 0);
- gtk_table_attach (GTK_TABLE (table), event_box, 3, 7, 4, 5,
+ gtk_table_attach (GTK_TABLE (table), event_box, 3, 7, 5, 6,
GTK_FILL, GTK_FILL, 0, 0);
custom_command_entry = gtk_entry_new ();
- gtk_table_attach (GTK_TABLE (table), custom_command_entry, 2, 7, 6, 7,
+ gtk_table_attach (GTK_TABLE (table), custom_command_entry, 2, 7, 7, 8,
GTK_FILL, GTK_FILL, 0, 0);
g_signal_connect(G_OBJECT(custom_command_entry), "activate",
G_CALLBACK(setup_callback), NULL);
@@ -1709,7 +1727,7 @@ create_printer_dialog (void)
(custom_command_entry, _("Enter the correct command to print to your printer. "));
file_entry = gtk_entry_new ();
- gtk_table_attach (GTK_TABLE (table), file_entry, 2, 6, 7, 8,
+ gtk_table_attach (GTK_TABLE (table), file_entry, 2, 6, 8, 9,
GTK_FILL, GTK_FILL, 0, 0);
g_signal_connect(G_OBJECT(file_entry), "activate",
G_CALLBACK(setup_callback), NULL);
@@ -1721,7 +1739,7 @@ create_printer_dialog (void)
file_button = gtk_button_new_with_label (_("Browse"));
- gtk_table_attach (GTK_TABLE (table), file_button, 6, 7, 7, 8,
+ gtk_table_attach (GTK_TABLE (table), file_button, 6, 7, 8, 9,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (file_button);
@@ -2623,9 +2641,10 @@ plist_build_combo (GtkWidget *combo, /* I - Combo widget */
gtk_combo_set_popdown_strings (GTK_COMBO (combo), list);
- for (i = 0; i < num_items; i ++)
- if (strcmp(stp_string_list_param(items, i)->name, cur_item) == 0)
- break;
+ if (cur_item)
+ for (i = 0; i < num_items; i ++)
+ if (strcmp(stp_string_list_param(items, i)->name, cur_item) == 0)
+ break;
if (i >= num_items && def_value)
for (i = 0; i < num_items; i ++)
@@ -3601,6 +3620,7 @@ setup_update (void)
gint idx = 0;
gint i;
gchar *tmp;
+ stp_parameter_t desc;
const char *ppd_file_name = stp_get_file_parameter(pv->v, "PPDFile");
for (i = 0; i < GTK_CLIST(manufacturer_clist)->rows; i++)
@@ -3623,23 +3643,49 @@ setup_update (void)
idx = 0;
*/
gtk_clist_select_row (GTK_CLIST (printer_driver), idx, 0);
- gtk_label_set_text (GTK_LABEL (printer_model_label),
- gettext (stp_printer_get_long_name (tmp_printer)));
+ stp_describe_parameter(pv->v, "ModelName", &desc);
+ if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST && desc.is_active &&
+ desc.deflt.str)
+ {
+ const char *extra_printer_model = desc.deflt.str;
+ char *label_text =
+ g_malloc(strlen(gettext (stp_printer_get_long_name (tmp_printer))) +
+ 2 + /* " (" */
+ strlen(extra_printer_model) +
+ 2); /* ")" + null terminator */
+ strcpy(label_text, extra_printer_model);
+ strcat(label_text, " (");
+ strcat(label_text, gettext (stp_printer_get_long_name (tmp_printer)));
+ strcat(label_text, ")");
+ gtk_label_set_text (GTK_LABEL (printer_model_label), label_text);
+ g_free(label_text);
+ }
+ else
+ {
+ gtk_label_set_text (GTK_LABEL (printer_model_label),
+ gettext (stp_printer_get_long_name (tmp_printer)));
+ }
+ stp_parameter_description_destroy(&desc);
if (ppd_file_name)
gtk_entry_set_text (GTK_ENTRY (ppd_file), ppd_file_name);
else
gtk_entry_set_text (GTK_ENTRY (ppd_file), "");
+ ppd_file_callback(ppd_file, NULL);
if (stp_parameter_find_in_settings(pv->v, "PPDFile"))
{
gtk_widget_show (ppd_box);
gtk_widget_show (ppd_label);
+ gtk_widget_show (ppd_model_label);
+ gtk_widget_show (ppd_model);
}
else
{
gtk_widget_hide (ppd_box);
gtk_widget_hide (ppd_label);
+ gtk_widget_hide (ppd_model_label);
+ gtk_widget_hide (ppd_model);
}
gtk_entry_set_text (GTK_ENTRY (custom_command_entry),
stpui_plist_get_custom_command (pv));
@@ -3656,6 +3702,27 @@ setup_update (void)
TRUE);
}
+static void
+ppd_file_callback(GtkWidget *widget, gpointer data)
+{
+ const gchar *name = gtk_entry_get_text(GTK_ENTRY(widget));
+ if (name && pv && pv->v)
+ {
+ stp_parameter_t desc;
+ stp_vars_t *v = stp_vars_create_copy(pv->v);
+ stp_set_file_parameter(v, "PPDFile", name);
+ stp_describe_parameter(v, "ModelName", &desc);
+ if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST && desc.is_active)
+ gtk_label_set_text(GTK_LABEL(ppd_model), desc.deflt.str);
+ else
+ gtk_label_set_text(GTK_LABEL(ppd_model), "");
+ stp_parameter_description_destroy(&desc);
+ stp_vars_destroy(v);
+ }
+ else
+ gtk_label_set_text(GTK_LABEL(ppd_model), "");
+}
+
/*
* setup_open_callback() -
*/
@@ -3776,11 +3843,15 @@ pop_ppd_box(void)
{
gtk_widget_show (ppd_label);
gtk_widget_show (ppd_box);
+ gtk_widget_show (ppd_model_label);
+ gtk_widget_show (ppd_model);
}
else
{
gtk_widget_hide (ppd_label);
gtk_widget_hide (ppd_box);
+ gtk_widget_hide (ppd_model_label);
+ gtk_widget_hide (ppd_model);
}
}
@@ -3884,6 +3955,8 @@ ppd_ok_callback (void)
gtk_entry_set_text
(GTK_ENTRY (ppd_file),
gtk_file_selection_get_filename (GTK_FILE_SELECTION (ppd_browser)));
+ ppd_file_callback(ppd_file, NULL);
+ update_options();
}
/*
@@ -4903,12 +4976,13 @@ dimension_update (GtkAdjustment *adjustment)
opt->info.flt.adjustment &&
adjustment == GTK_ADJUSTMENT(opt->info.flt.adjustment))
{
+ int new_value = (adjustment->value + (.5 / unit_scaler)) * unit_scaler;
invalidate_preview_thumbnail ();
if (stp_get_dimension_parameter(pv->v, opt->fast_desc->name) !=
- adjustment->value * unit_scaler)
+ new_value)
{
stp_set_dimension_parameter(pv->v, opt->fast_desc->name,
- adjustment->value * unit_scaler);
+ new_value);
update_adjusted_thumbnail(FALSE);
}
}
diff --git a/src/gutenprintui2/plist.c b/src/gutenprintui2/plist.c
index 05a13ee..96036a4 100644
--- a/src/gutenprintui2/plist.c
+++ b/src/gutenprintui2/plist.c
@@ -1,5 +1,5 @@
/*
- * "$Id: plist.c,v 1.6 2005/10/26 01:28:35 rlk Exp $"
+ * "$Id: plist.c,v 1.6.10.3 2007/05/29 01:47:28 rlk Exp $"
*
* Print plug-in for the GIMP.
*
@@ -41,7 +41,6 @@
#include <signal.h>
#include <sys/wait.h>
-
typedef enum
{
PRINTERS_NONE,
@@ -180,6 +179,7 @@ stpui_build_standard_print_command(const stpui_plist_t *plist,
int raw = 0;
char *print_cmd;
char *count_string = NULL;
+ char *quoted_queue_name = NULL;
if (!queue_name)
queue_name = "";
identify_print_system();
@@ -192,15 +192,19 @@ stpui_build_standard_print_command(const stpui_plist_t *plist,
stp_asprintf(&count_string, "%s %d ",
global_printing_system->copy_count_command, copy_count);
+ if (queue_name[0])
+ quoted_queue_name = g_shell_quote(queue_name);
+
stp_asprintf(&print_cmd, "%s %s %s %s %s%s%s",
global_printing_system->print_command,
queue_name[0] ? global_printing_system->queue_select : "",
- queue_name[0] ? g_shell_quote(queue_name) : "",
+ queue_name[0] ? quoted_queue_name : "",
count_string ? count_string : "",
raw ? global_printing_system->raw_flag : "",
extra_options ? " " : "",
extra_options ? extra_options : "");
SAFE_FREE(count_string);
+ SAFE_FREE(quoted_queue_name);
return print_cmd;
}
@@ -321,7 +325,7 @@ writefunc(void *file, const char *buf, size_t bytes)
static void
stpui_errfunc(void *file, const char *buf, size_t bytes)
{
- g_message(buf);
+ g_message("%s",buf);
}
void
@@ -624,6 +628,8 @@ stpui_plist_add(const stpui_plist_t *key, int add_only)
* always first in the list, else call psearch.
*/
stpui_plist_t *p;
+ if (!stp_get_printer(key->v))
+ stp_set_driver(key->v, "ps2");
if (stp_get_printer(key->v))
{
p = psearch(key, stpui_plist, stpui_plist_count,
@@ -653,8 +659,13 @@ stpui_plist_add(const stpui_plist_t *key, int add_only)
#endif
stpui_plist_copy(p, key);
}
+ return 1;
+ }
+ else
+ {
+ fprintf(stderr, "No printer found!\n");
+ return 0;
}
- return 1;
}
static void
@@ -796,8 +807,7 @@ stpui_printrc_load_v1(FILE *fp)
#endif
if (strcasecmp("current-printer", keyword) == 0)
{
- if (current_printer)
- g_free (current_printer);
+ SAFE_FREE(current_printer);
current_printer = g_strdup(value);
}
else if (strcasecmp("printer", keyword) == 0)
@@ -930,11 +940,18 @@ stpui_printrc_load_v2(FILE *fp)
{
int retval;
yyin = fp;
+ char *locale;
stpui_printrc_current_printer = NULL;
- setlocale(LC_ALL, "C");
+#ifdef HAVE_LOCALE_H
+ locale = g_strdup(setlocale(LC_NUMERIC, NULL));
+ setlocale(LC_NUMERIC, "C");
+#endif
retval = yyparse();
- setlocale(LC_ALL, "");
+#ifdef HAVE_LOCALE_H
+ setlocale(LC_NUMERIC, locale);
+ SAFE_FREE(locale);
+#endif
if (stpui_printrc_current_printer)
{
int i;
@@ -976,17 +993,23 @@ stpui_printrc_load(void)
(void) memset(line, 0, 1024);
if (fgets(line, sizeof(line), fp) != NULL)
{
- /* Force locale to "C", so that numbers scan correctly */
- setlocale(LC_ALL, "C");
+#ifdef HAVE_LOCALE_H
+ char *locale = g_strdup(setlocale(LC_NUMERIC, NULL));
+ setlocale(LC_NUMERIC, "C");
+#endif
if (strncmp("#PRINTRCv", line, 9) == 0)
{
+ /* Force locale to "C", so that numbers scan correctly */
#ifdef DEBUG
fprintf(stderr, "Found printrc version tag: `%s'\n", line);
fprintf(stderr, "Version number: `%s'\n", &(line[9]));
#endif
(void) sscanf(&(line[9]), "%d", &format);
}
- setlocale(LC_ALL, "");
+#ifdef HAVE_LOCALE_H
+ setlocale(LC_NUMERIC, locale);
+ SAFE_FREE(locale);
+#endif
}
rewind(fp);
switch (format)
@@ -1029,7 +1052,10 @@ stpui_printrc_save(void)
*/
/* Force locale to "C", so that numbers print correctly */
- setlocale(LC_ALL, "C");
+#ifdef HAVE_LOCALE_H
+ char *locale = g_strdup(setlocale(LC_NUMERIC, NULL));
+ setlocale(LC_NUMERIC, "C");
+#endif
#ifdef DEBUG
fprintf(stderr, "Number of printers: %d\n", stpui_plist_count);
#endif
@@ -1164,7 +1190,10 @@ stpui_printrc_save(void)
fprintf(stderr, "Wrote printer %d: %s\n", i, p->name);
#endif
}
- setlocale(LC_ALL, "");
+#ifdef HAVE_LOCALE_H
+ setlocale(LC_NUMERIC, locale);
+ SAFE_FREE(locale);
+#endif
fclose(fp);
}
else
@@ -1202,6 +1231,8 @@ stpui_get_system_printers(void)
identify_print_system();
if (global_printing_system)
{
+ const char *old_locale = getenv("LC_ALL");
+ (void) setenv("LC_ALL", "C", 1);
if ((pfile = popen(global_printing_system->scan_command, "r")) != NULL)
{
/*
@@ -1223,6 +1254,10 @@ stpui_get_system_printers(void)
}
}
pclose(pfile);
+ if (old_locale)
+ setenv("LC_ALL", old_locale, 1);
+ else
+ unsetenv("LC_ALL");
}
}
}
@@ -1751,5 +1786,5 @@ stpui_print(const stpui_plist_t *printer, stpui_image_t *image)
}
/*
- * End of "$Id: plist.c,v 1.6 2005/10/26 01:28:35 rlk Exp $".
+ * End of "$Id: plist.c,v 1.6.10.3 2007/05/29 01:47:28 rlk Exp $".
*/
diff --git a/src/gutenprintui2/printrcy.c b/src/gutenprintui2/printrcy.c
index 0c96062..178c7f5 100644
--- a/src/gutenprintui2/printrcy.c
+++ b/src/gutenprintui2/printrcy.c
@@ -1,7 +1,9 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
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
@@ -15,16 +17,24 @@
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. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
-/* Written by Richard Stallman by simplifying the original so called
- ``semantic'' parser. */
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
@@ -36,6 +46,9 @@
/* Identify Bison output. */
#define YYBISON 1
+/* Bison version. */
+#define YYBISON_VERSION "2.3"
+
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -93,6 +106,7 @@
pCURVE = 295
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tDIMENSION 260
@@ -183,7 +197,12 @@ static stpui_plist_t *current_printer = NULL;
# define YYERROR_VERBOSE 0
#endif
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -195,49 +214,171 @@ typedef int YYSTYPE;
/* Copy the second part of user declarations. */
-/* Line 214 of yacc.c. */
-#line 199 "printrcy.c"
+/* Line 216 of yacc.c. */
+#line 219 "printrcy.c"
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
+#ifdef short
+# undef short
+#endif
-/* The parser invokes alloca or malloc; define the necessary symbols. */
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
# else
-# ifndef YYSTACK_USE_ALLOCA
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+ int i;
+#endif
+{
+ return i;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
# else
-# if defined (__STDC__) || defined (__cplusplus)
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
# endif
-# define YYSTACK_ALLOC malloc
-# define YYSTACK_FREE free
# endif
-#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-#if (! defined (yyoverflow) \
- && (! defined (__cplusplus) \
- || (YYSTYPE_IS_TRIVIAL)))
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short yyss;
+ yytype_int16 yyss;
YYSTYPE yyvs;
};
@@ -247,24 +388,24 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if 1 < __GNUC__
+# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
- while (0)
+ while (YYID (0))
# endif
# endif
@@ -282,39 +423,33 @@ union yyalloc
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
- while (0)
+ while (YYID (0))
#endif
-#if defined (__STDC__) || defined (__cplusplus)
- typedef signed char yysigned_char;
-#else
- typedef short yysigned_char;
-#endif
-
-/* YYFINAL -- State number of the termination state. */
+/* YYFINAL -- State number of the termination state. */
#define YYFINAL 10
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 75
-/* YYNTOKENS -- Number of terminals. */
+/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 41
-/* YYNNTS -- Number of nonterminals. */
+/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 42
-/* YYNRULES -- Number of rules. */
+/* YYNRULES -- Number of rules. */
#define YYNRULES 70
-/* YYNRULES -- Number of states. */
+/* YYNRULES -- Number of states. */
#define YYNSTATES 114
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 295
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const unsigned char yytranslate[] =
+static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -351,7 +486,7 @@ static const unsigned char yytranslate[] =
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
-static const unsigned char yyprhs[] =
+static const yytype_uint8 yyprhs[] =
{
0, 0, 3, 7, 10, 13, 16, 19, 22, 25,
28, 31, 34, 37, 40, 43, 46, 49, 52, 53,
@@ -363,8 +498,8 @@ static const unsigned char yyprhs[] =
189
};
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yysigned_char yyrhs[] =
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int8 yyrhs[] =
{
82, 0, -1, 12, 7, 7, -1, 13, 7, -1,
26, 7, -1, 27, 7, -1, 28, 7, -1, 29,
@@ -389,50 +524,50 @@ static const yysigned_char yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short yyrline[] =
+static const yytype_uint16 yyrline[] =
{
- 0, 100, 100, 111, 118, 128, 138, 148, 158, 164,
- 168, 172, 176, 180, 184, 188, 206, 210, 214, 217,
- 231, 246, 261, 275, 289, 307, 327, 327, 327, 327,
- 328, 328, 328, 331, 334, 334, 337, 337, 337, 337,
- 338, 338, 338, 338, 338, 339, 339, 339, 339, 340,
- 340, 343, 343, 346, 349, 349, 352, 356, 366, 366,
- 369, 372, 383, 383, 386, 386, 389, 392, 392, 392,
- 395
+ 0, 100, 100, 111, 118, 128, 138, 148, 158, 165,
+ 172, 179, 186, 193, 200, 207, 228, 235, 242, 245,
+ 262, 280, 298, 315, 332, 353, 376, 376, 376, 376,
+ 377, 377, 377, 380, 383, 383, 386, 386, 386, 386,
+ 387, 387, 387, 387, 387, 388, 388, 388, 388, 389,
+ 389, 392, 392, 395, 398, 398, 401, 405, 415, 415,
+ 418, 421, 432, 432, 435, 435, 438, 441, 441, 441,
+ 444
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "tINT", "tDOUBLE", "tDIMENSION",
- "tBOOLEAN", "tSTRING", "tWORD", "tGSWORD", "CURRENT_PRINTER",
- "SHOW_ALL_PAPER_SIZES", "PRINTER", "DESTINATION", "SCALING",
- "ORIENTATION", "AUTOSIZE_ROLL_PAPER", "UNIT", "DRIVER", "LEFT", "TOP",
- "CUSTOM_PAGE_WIDTH", "CUSTOM_PAGE_HEIGHT", "OUTPUT_TYPE", "PRINTRC_HDR",
- "PARAMETER", "QUEUE_NAME", "OUTPUT_FILENAME", "EXTRA_PRINTER_OPTIONS",
- "CUSTOM_COMMAND", "COMMAND_TYPE", "GLOBAL_SETTINGS", "GLOBAL",
- "END_GLOBAL_SETTINGS", "pINT", "pSTRING_LIST", "pFILE", "pDOUBLE",
- "pDIMENSION", "pBOOLEAN", "pCURVE", "$accept", "Printer", "Destination",
- "Queue_Name", "Output_Filename", "Extra_Printer_Options",
- "Custom_Command", "Command_Type", "Scaling", "Orientation",
- "Autosize_Roll_Paper", "Unit", "Left", "Top", "Output_Type",
- "Custom_Page_Width", "Custom_Page_Height", "Empty", "Int_Param",
- "String_List_Param", "File_Param", "Double_Param", "Dimension_Param",
- "Boolean_Param", "Curve_Param", "Typed_Param", "Parameter",
- "Parameters", "Standard_Value", "Standard_Values", "A_Printer",
- "Printers", "Current_Printer", "Show_All_Paper_Sizes", "Global",
- "Old_Globals", "New_Global_Setting", "Global_Setting",
- "Global_Settings", "Global_Subblock", "Global_Block", "Thing", 0
+ "$end", "error", "$undefined", "tINT", "tDOUBLE", "tDIMENSION",
+ "tBOOLEAN", "tSTRING", "tWORD", "tGSWORD", "CURRENT_PRINTER",
+ "SHOW_ALL_PAPER_SIZES", "PRINTER", "DESTINATION", "SCALING",
+ "ORIENTATION", "AUTOSIZE_ROLL_PAPER", "UNIT", "DRIVER", "LEFT", "TOP",
+ "CUSTOM_PAGE_WIDTH", "CUSTOM_PAGE_HEIGHT", "OUTPUT_TYPE", "PRINTRC_HDR",
+ "PARAMETER", "QUEUE_NAME", "OUTPUT_FILENAME", "EXTRA_PRINTER_OPTIONS",
+ "CUSTOM_COMMAND", "COMMAND_TYPE", "GLOBAL_SETTINGS", "GLOBAL",
+ "END_GLOBAL_SETTINGS", "pINT", "pSTRING_LIST", "pFILE", "pDOUBLE",
+ "pDIMENSION", "pBOOLEAN", "pCURVE", "$accept", "Printer", "Destination",
+ "Queue_Name", "Output_Filename", "Extra_Printer_Options",
+ "Custom_Command", "Command_Type", "Scaling", "Orientation",
+ "Autosize_Roll_Paper", "Unit", "Left", "Top", "Output_Type",
+ "Custom_Page_Width", "Custom_Page_Height", "Empty", "Int_Param",
+ "String_List_Param", "File_Param", "Double_Param", "Dimension_Param",
+ "Boolean_Param", "Curve_Param", "Typed_Param", "Parameter", "Parameters",
+ "Standard_Value", "Standard_Values", "A_Printer", "Printers",
+ "Current_Printer", "Show_All_Paper_Sizes", "Global", "Old_Globals",
+ "New_Global_Setting", "Global_Setting", "Global_Settings",
+ "Global_Subblock", "Global_Block", "Thing", 0
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const unsigned short yytoknum[] =
+static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -443,7 +578,7 @@ static const unsigned short yytoknum[] =
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const unsigned char yyr1[] =
+static const yytype_uint8 yyr1[] =
{
0, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
@@ -456,7 +591,7 @@ static const unsigned char yyr1[] =
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const unsigned char yyr2[] =
+static const yytype_uint8 yyr2[] =
{
0, 2, 3, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 0, 4,
@@ -471,7 +606,7 @@ static const unsigned char yyr2[] =
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
-static const unsigned char yydefact[] =
+static const yytype_uint8 yydefact[] =
{
0, 18, 0, 0, 18, 69, 0, 68, 67, 18,
1, 56, 65, 0, 0, 60, 55, 70, 0, 66,
@@ -487,8 +622,8 @@ static const unsigned char yydefact[] =
22, 23, 24, 25
};
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yysigned_char yydefgoto[] =
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
{
-1, 27, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 5, 85, 86,
@@ -500,7 +635,7 @@ static const yysigned_char yydefgoto[] =
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -26
-static const yysigned_char yypact[] =
+static const yytype_int8 yypact[] =
{
-22, -2, 6, 0, -26, -26, 5, -26, -26, -26,
-26, -26, -26, -7, 11, -26, -26, 7, 13, -26,
@@ -517,7 +652,7 @@ static const yysigned_char yypact[] =
};
/* YYPGOTO[NTERM-NUM]. */
-static const yysigned_char yypgoto[] =
+static const yytype_int8 yypgoto[] =
{
-26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
-26, -26, -26, -26, -26, -26, -26, -4, -26, -26,
@@ -531,7 +666,7 @@ static const yysigned_char yypgoto[] =
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1
-static const unsigned char yytable[] =
+static const yytype_uint8 yytable[] =
{
12, 18, 1, 3, 14, 16, 10, 11, 3, 93,
94, 95, 96, 97, 98, 99, 14, 25, 84, 26,
@@ -543,7 +678,7 @@ static const unsigned char yytable[] =
108, 109, 110, 111, 113, 112
};
-static const yysigned_char yycheck[] =
+static const yytype_int8 yycheck[] =
{
4, 8, 24, 10, 11, 9, 0, 7, 10, 34,
35, 36, 37, 38, 39, 40, 11, 6, 8, 12,
@@ -557,7 +692,7 @@ static const yysigned_char yycheck[] =
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
-static const unsigned char yystos[] =
+static const yytype_uint8 yystos[] =
{
0, 24, 82, 10, 31, 58, 73, 76, 80, 81,
0, 7, 58, 79, 11, 74, 58, 72, 8, 33,
@@ -573,22 +708,6 @@ static const unsigned char yystos[] =
4, 3, 6, 7
};
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
@@ -596,7 +715,8 @@ static const unsigned char yystos[] =
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
+#define YYERROR goto yyerrorlab
+
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
@@ -613,30 +733,63 @@ do \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
+ YYPOPSTACK (1); \
goto yybackup; \
} \
else \
- { \
- yyerror ("syntax error: cannot back up");\
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
-while (0)
+while (YYID (0))
+
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
- are run). */
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- Current.first_line = Rhs[1].first_line; \
- Current.first_column = Rhs[1].first_column; \
- Current.last_line = Rhs[N].last_line; \
- Current.last_column = Rhs[N].last_column;
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
#endif
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
@@ -657,42 +810,96 @@ while (0)
do { \
if (yydebug) \
YYFPRINTF Args; \
-} while (0)
+} while (YYID (0))
-# define YYDSYMPRINT(Args) \
-do { \
- if (yydebug) \
- yysymprint Args; \
-} while (0)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
-# define YYDSYMPRINTF(Title, Token, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yysymprint (stderr, \
- Token, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (0)
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded). |
+| TOP (included). |
`------------------------------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (short *bottom, short *top)
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
yy_stack_print (bottom, top)
- short *bottom;
- short *top;
+ yytype_int16 *bottom;
+ yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (/* Nothing. */; bottom <= top; ++bottom)
+ for (; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
@@ -701,45 +908,52 @@ yy_stack_print (bottom, top)
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
-} while (0)
+} while (YYID (0))
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_reduce_print (int yyrule)
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
#else
static void
-yy_reduce_print (yyrule)
+yy_reduce_print (yyvsp, yyrule)
+ YYSTYPE *yyvsp;
int yyrule;
#endif
{
+ int yynrhs = yyr2[yyrule];
int yyi;
- unsigned int yylineno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylineno);
- /* Print the symbols being reduced, and their result. */
- for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ fprintf (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ fprintf (stderr, "\n");
+ }
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
- yy_reduce_print (Rule); \
-} while (0)
+ yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
@@ -754,13 +968,9 @@ int yydebug;
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
@@ -770,45 +980,47 @@ int yydebug;
#if YYERROR_VERBOSE
# ifndef yystrlen
-# if defined (__GLIBC__) && defined (_STRING_H)
+# if defined __GLIBC__ && defined _STRING_H
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
-# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
-# else
+#else
+static YYSIZE_T
yystrlen (yystr)
- const char *yystr;
-# endif
+ const char *yystr;
+#endif
{
- register const char *yys = yystr;
-
- while (*yys++ != '\0')
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
continue;
-
- return yys - yystr - 1;
+ return yylen;
}
# endif
# endif
# ifndef yystpcpy
-# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static char *
-# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
-# else
+#else
+static char *
yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-# endif
+ char *yydest;
+ const char *yysrc;
+#endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -818,70 +1030,192 @@ yystpcpy (yydest, yysrc)
# endif
# endif
-#endif /* !YYERROR_VERBOSE */
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
-
+ if (! yyres)
+ return yystrlen (yystr);
-#if YYDEBUG
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yysymprint (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
{
- /* Pacify ``unused variable'' warnings. */
- (void) yyvaluep;
+ int yyn = yypact[yystate];
- if (yytype < YYNTOKENS)
- {
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
- }
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- switch (yytype)
{
- default:
- break;
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
}
- YYFPRINTF (yyoutput, ")");
}
+#endif /* YYERROR_VERBOSE */
+
-#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
-yydestruct (yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
#endif
{
- /* Pacify ``unused variable'' warnings. */
- (void) yyvaluep;
+ YYUSE (yyvaluep);
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
default:
- break;
+ break;
}
}
@@ -889,13 +1223,13 @@ yydestruct (yytype, yyvaluep)
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
+#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
-# else
+#else
int yyparse ();
-# endif
+#endif
#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
+#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
@@ -904,10 +1238,10 @@ int yyparse ();
-/* The lookahead symbol. */
+/* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
@@ -920,14 +1254,18 @@ int yynerrs;
`----------*/
#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM)
-# else
-int yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-# endif
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
#else
@@ -938,13 +1276,19 @@ yyparse ()
#endif
{
- register int yystate;
- register int yyn;
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Lookahead token as an internal (translated) token number. */
+ /* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
/* Three stacks and their tools:
`yyss': related to states,
@@ -955,18 +1299,18 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- short yyssa[YYINITDEPTH];
- short *yyss = yyssa;
- register short *yyssp;
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
-#define YYPOPSTACK (yyvsp--, yyssp--)
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
YYSIZE_T yystacksize = YYINITDEPTH;
@@ -975,9 +1319,9 @@ yyparse ()
YYSTYPE yyval;
- /* When reducing, the number of symbols on the RHS of the reduced
- rule. */
- int yylen;
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1001,8 +1345,7 @@ yyparse ()
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks.
- */
+ have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
yysetstate:
@@ -1015,18 +1358,18 @@ yyparse ()
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
+ /* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
- yyoverflow ("parser stack overflow",
+ yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
@@ -1037,21 +1380,21 @@ yyparse ()
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
- short *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
@@ -1082,19 +1425,17 @@ yyparse ()
`-----------*/
yybackup:
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to lookahead token. */
+ /* Do appropriate processing given the current state. Read a
+ look-ahead token if we need one and don't already have one. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1109,7 +1450,7 @@ yybackup:
else
{
yytoken = YYTRANSLATE (yychar);
- YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
@@ -1129,22 +1470,21 @@ yybackup:
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
- YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
yystate = yyn;
+ *++yyvsp = yylval;
+
goto yynewstate;
@@ -1182,27 +1522,27 @@ yyreduce:
case 2:
#line 101 "printrcy.y"
{
- current_printer = stpui_plist_create(yyvsp[-1].sval, yyvsp[0].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ current_printer = stpui_plist_create((yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval));
+ g_free((yyvsp[(2) - (3)].sval));
+ g_free((yyvsp[(3) - (3)].sval));
}
break;
case 3:
#line 112 "printrcy.y"
{
- if (yyvsp[0].sval)
- g_free(yyvsp[0].sval);
+ if ((yyvsp[(2) - (2)].sval))
+ g_free((yyvsp[(2) - (2)].sval));
}
break;
case 4:
#line 119 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if (current_printer && (yyvsp[(2) - (2)].sval))
{
- stpui_plist_set_queue_name(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_queue_name(current_printer, (yyvsp[(2) - (2)].sval));
+ g_free((yyvsp[(2) - (2)].sval));
}
}
break;
@@ -1210,10 +1550,10 @@ yyreduce:
case 5:
#line 129 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if (current_printer && (yyvsp[(2) - (2)].sval))
{
- stpui_plist_set_output_filename(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_output_filename(current_printer, (yyvsp[(2) - (2)].sval));
+ g_free((yyvsp[(2) - (2)].sval));
}
}
break;
@@ -1221,10 +1561,10 @@ yyreduce:
case 6:
#line 139 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if (current_printer && (yyvsp[(2) - (2)].sval))
{
- stpui_plist_set_extra_printer_options(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_extra_printer_options(current_printer, (yyvsp[(2) - (2)].sval));
+ g_free((yyvsp[(2) - (2)].sval));
}
}
break;
@@ -1232,10 +1572,10 @@ yyreduce:
case 7:
#line 149 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if (current_printer && (yyvsp[(2) - (2)].sval))
{
- stpui_plist_set_custom_command(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_custom_command(current_printer, (yyvsp[(2) - (2)].sval));
+ g_free((yyvsp[(2) - (2)].sval));
}
}
break;
@@ -1243,224 +1583,272 @@ yyreduce:
case 8:
#line 159 "printrcy.y"
{
- stpui_plist_set_command_type(current_printer, yyvsp[0].ival);
+ if (current_printer)
+ stpui_plist_set_command_type(current_printer, (yyvsp[(2) - (2)].ival));
}
break;
case 9:
-#line 165 "printrcy.y"
- { current_printer->scaling = yyvsp[0].dval; }
+#line 166 "printrcy.y"
+ {
+ if (current_printer)
+ current_printer->scaling = (yyvsp[(2) - (2)].dval);
+ }
break;
case 10:
-#line 169 "printrcy.y"
- { current_printer->orientation = yyvsp[0].ival; }
+#line 173 "printrcy.y"
+ {
+ if (current_printer)
+ current_printer->orientation = (yyvsp[(2) - (2)].ival);
+ }
break;
case 11:
-#line 173 "printrcy.y"
- { current_printer->auto_size_roll_feed_paper = yyvsp[0].ival; }
+#line 180 "printrcy.y"
+ {
+ if (current_printer)
+ current_printer->auto_size_roll_feed_paper = (yyvsp[(2) - (2)].ival);
+ }
break;
case 12:
-#line 177 "printrcy.y"
- { current_printer->unit = yyvsp[0].ival; }
+#line 187 "printrcy.y"
+ {
+ if (current_printer)
+ current_printer->unit = (yyvsp[(2) - (2)].ival);
+ }
break;
case 13:
-#line 181 "printrcy.y"
- { stp_set_left(current_printer->v, yyvsp[0].ival); }
+#line 194 "printrcy.y"
+ {
+ if (current_printer)
+ stp_set_left(current_printer->v, (yyvsp[(2) - (2)].ival));
+ }
break;
case 14:
-#line 185 "printrcy.y"
- { stp_set_top(current_printer->v, yyvsp[0].ival); }
+#line 201 "printrcy.y"
+ {
+ if (current_printer)
+ stp_set_top(current_printer->v, (yyvsp[(2) - (2)].ival));
+ }
break;
case 15:
-#line 189 "printrcy.y"
+#line 208 "printrcy.y"
{
- switch (yyvsp[0].ival)
+ if (current_printer)
{
- case 0:
- stp_set_string_parameter
- (current_printer->v, "PrintingMode", "BW");
- break;
- case 1:
- case 2:
- default:
- stp_set_string_parameter
- (current_printer->v, "PrintingMode", "Color");
- break;
+ switch ((yyvsp[(2) - (2)].ival))
+ {
+ case 0:
+ stp_set_string_parameter
+ (current_printer->v, "PrintingMode", "BW");
+ break;
+ case 1:
+ case 2:
+ default:
+ stp_set_string_parameter
+ (current_printer->v, "PrintingMode", "Color");
+ break;
+ }
}
}
break;
case 16:
-#line 207 "printrcy.y"
- { stp_set_page_width(current_printer->v, yyvsp[0].ival); }
+#line 229 "printrcy.y"
+ {
+ if (current_printer)
+ stp_set_page_width(current_printer->v, (yyvsp[(2) - (2)].ival));
+ }
break;
case 17:
-#line 211 "printrcy.y"
- { stp_set_page_height(current_printer->v, yyvsp[0].ival); }
+#line 236 "printrcy.y"
+ {
+ if (current_printer)
+ stp_set_page_height(current_printer->v, (yyvsp[(2) - (2)].ival));
+ }
break;
case 19:
-#line 218 "printrcy.y"
+#line 246 "printrcy.y"
{
- stp_set_int_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].ival);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_int_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_int_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ if (current_printer)
+ {
+ stp_set_int_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].ival));
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_int_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_int_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
}
break;
case 20:
-#line 232 "printrcy.y"
+#line 263 "printrcy.y"
{
- stp_set_string_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].sval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_string_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_string_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ if (current_printer)
+ {
+ stp_set_string_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].sval));
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_string_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_string_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
+ g_free((yyvsp[(4) - (4)].sval));
}
break;
case 21:
-#line 247 "printrcy.y"
+#line 281 "printrcy.y"
{
- stp_set_file_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].sval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_file_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_file_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ if (current_printer)
+ {
+ stp_set_file_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].sval));
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_file_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_file_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
+ g_free((yyvsp[(4) - (4)].sval));
}
break;
case 22:
-#line 262 "printrcy.y"
+#line 299 "printrcy.y"
{
- stp_set_float_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].dval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_float_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_float_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ if (current_printer)
+ {
+ stp_set_float_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].dval));
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_float_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_float_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
}
break;
case 23:
-#line 276 "printrcy.y"
+#line 316 "printrcy.y"
{
- stp_set_dimension_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].ival);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_dimension_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_dimension_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ if (current_printer)
+ {
+ stp_set_dimension_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].ival));
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_dimension_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_dimension_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
}
break;
case 24:
-#line 290 "printrcy.y"
+#line 333 "printrcy.y"
{
- if (strcmp(yyvsp[0].sval, "False") == 0)
- stp_set_boolean_parameter(current_printer->v, yyvsp[-3].sval, 0);
- else
- stp_set_boolean_parameter(current_printer->v, yyvsp[-3].sval, 1);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_boolean_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_boolean_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ if (current_printer)
+ {
+ if (strcmp((yyvsp[(4) - (4)].sval), "False") == 0)
+ stp_set_boolean_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), 0);
+ else
+ stp_set_boolean_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), 1);
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_boolean_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_boolean_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ }
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
+ g_free((yyvsp[(4) - (4)].sval));
}
break;
case 25:
-#line 308 "printrcy.y"
+#line 354 "printrcy.y"
{
- stp_curve_t *curve = stp_curve_create_from_string(yyvsp[0].sval);
- if (curve)
+ if (current_printer)
{
- stp_set_curve_parameter(current_printer->v, yyvsp[-3].sval, curve);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_curve_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_curve_parameter_active(current_printer->v, yyvsp[-3].sval,
- STP_PARAMETER_ACTIVE);
- stp_curve_destroy(curve);
+ stp_curve_t *curve = stp_curve_create_from_string((yyvsp[(4) - (4)].sval));
+ if (curve)
+ {
+ stp_set_curve_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), curve);
+ if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
+ stp_set_curve_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_curve_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
+ STP_PARAMETER_ACTIVE);
+ stp_curve_destroy(curve);
+ }
}
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[(1) - (4)].sval));
+ g_free((yyvsp[(3) - (4)].sval));
+ g_free((yyvsp[(4) - (4)].sval));
}
break;
case 56:
-#line 353 "printrcy.y"
- { stpui_printrc_current_printer = yyvsp[0].sval; }
+#line 402 "printrcy.y"
+ { stpui_printrc_current_printer = (yyvsp[(2) - (2)].sval); }
break;
case 57:
-#line 357 "printrcy.y"
+#line 406 "printrcy.y"
{
- if (strcmp(yyvsp[0].sval, "True") == 0)
+ if (strcmp((yyvsp[(2) - (2)].sval), "True") == 0)
stpui_show_all_paper_sizes = 1;
else
stpui_show_all_paper_sizes = 0;
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[(2) - (2)].sval));
}
break;
case 61:
-#line 373 "printrcy.y"
+#line 422 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[(2) - (2)].sval))
{
- stpui_set_global_parameter(yyvsp[-1].sval, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_set_global_parameter((yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].sval));
+ g_free((yyvsp[(2) - (2)].sval));
}
- g_free(yyvsp[-1].sval);
+ g_free((yyvsp[(1) - (2)].sval));
}
break;
+/* Line 1267 of yacc.c. */
+#line 1846 "printrcy.c"
+ default: break;
}
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-/* Line 991 of yacc.c. */
-#line 1458 "printrcy.c"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-
-
+ YYPOPSTACK (yylen);
+ yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
@@ -1489,109 +1877,93 @@ yyerrlab:
if (!yyerrstatus)
{
++yynerrs;
-#if YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (YYPACT_NINF < yyn && yyn < YYLAST)
- {
- YYSIZE_T yysize = 0;
- int yytype = YYTRANSLATE (yychar);
- char *yymsg;
- int yyx, yycount;
-
- yycount = 0;
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- yysize += yystrlen (yytname[yyx]) + 15, yycount++;
- yysize += yystrlen ("syntax error, unexpected ") + 1;
- yysize += yystrlen (yytname[yytype]);
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg != 0)
- {
- char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
- yyp = yystpcpy (yyp, yytname[yytype]);
-
- if (yycount < 5)
- {
- yycount = 0;
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *));
- yyx++)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- const char *yyq = ! yycount ? ", expecting " : " or ";
- yyp = yystpcpy (yyp, yyq);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yycount++;
- }
- }
- yyerror (yymsg);
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+ {
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
- }
- else
- yyerror ("syntax error; also virtual memory exhausted");
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror ("syntax error");
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
+ }
+#endif
}
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- {
- /* Pop the error token. */
- YYPOPSTACK;
- /* Pop the rest of the stack. */
- while (yyss < yyssp)
- {
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[*yyssp], yyvsp);
- YYPOPSTACK;
- }
- YYABORT;
- }
-
- YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
- yydestruct (yytoken, &yylval);
- yychar = YYEMPTY;
-
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
- goto yyerrlab2;
+ goto yyerrlab1;
-/*----------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action. |
-`----------------------------------------------------*/
-yyerrlab1:
-
- /* Suppress GCC warning that yyerrlab1 is unused when no action
- invokes YYERROR. */
-#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
- && !defined __cplusplus
- __attribute__ ((__unused__))
-#endif
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
- goto yyerrlab2;
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
-/*---------------------------------------------------------------.
-| yyerrlab2 -- pop states until the error token can be shifted. |
-`---------------------------------------------------------------*/
-yyerrlab2:
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
@@ -1612,22 +1984,23 @@ yyerrlab2:
if (yyssp == yyss)
YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[yystate], yyvsp);
- yyvsp--;
- yystate = *--yyssp;
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
if (yyn == YYFINAL)
YYACCEPT;
- YYDPRINTF ((stderr, "Shifting error token, "));
-
*++yyvsp = yylval;
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
yystate = yyn;
goto yynewstate;
@@ -1647,24 +2020,42 @@ yyabortlab:
goto yyreturn;
#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here. |
-`----------------------------------------------*/
-yyoverflowlab:
- yyerror ("parser stack overflow");
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
- return yyresult;
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
}
-#line 398 "printrcy.y"
+#line 447 "printrcy.y"
diff --git a/src/gutenprintui2/printrcy.h b/src/gutenprintui2/printrcy.h
index afa662b..8a6c041 100644
--- a/src/gutenprintui2/printrcy.h
+++ b/src/gutenprintui2/printrcy.h
@@ -1,7 +1,9 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
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
@@ -15,13 +17,21 @@
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. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
@@ -69,6 +79,7 @@
pCURVE = 295
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tDIMENSION 260
@@ -111,7 +122,7 @@
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -120,5 +131,3 @@ typedef int YYSTYPE;
extern YYSTYPE yylval;
-
-
diff --git a/src/gutenprintui2/printrcy.y b/src/gutenprintui2/printrcy.y
index 58bd36e..625d1d7 100644
--- a/src/gutenprintui2/printrcy.y
+++ b/src/gutenprintui2/printrcy.y
@@ -1,5 +1,5 @@
/*
- * "$Id: printrcy.y,v 1.1 2004/09/17 18:38:14 rleigh Exp $"
+ * "$Id: printrcy.y,v 1.1.18.1 2007/03/02 12:01:20 rlk Exp $"
*
* Test pattern generator for Gutenprint
*
@@ -117,7 +117,7 @@ Destination: DESTINATION tSTRING
Queue_Name: QUEUE_NAME tSTRING
{
- if ($2)
+ if (current_printer && $2)
{
stpui_plist_set_queue_name(current_printer, $2);
g_free($2);
@@ -127,7 +127,7 @@ Queue_Name: QUEUE_NAME tSTRING
Output_Filename: OUTPUT_FILENAME tSTRING
{
- if ($2)
+ if (current_printer && $2)
{
stpui_plist_set_output_filename(current_printer, $2);
g_free($2);
@@ -137,7 +137,7 @@ Output_Filename: OUTPUT_FILENAME tSTRING
Extra_Printer_Options: EXTRA_PRINTER_OPTIONS tSTRING
{
- if ($2)
+ if (current_printer && $2)
{
stpui_plist_set_extra_printer_options(current_printer, $2);
g_free($2);
@@ -147,7 +147,7 @@ Extra_Printer_Options: EXTRA_PRINTER_OPTIONS tSTRING
Custom_Command: CUSTOM_COMMAND tSTRING
{
- if ($2)
+ if (current_printer && $2)
{
stpui_plist_set_custom_command(current_printer, $2);
g_free($2);
@@ -157,58 +157,86 @@ Custom_Command: CUSTOM_COMMAND tSTRING
Command_Type: COMMAND_TYPE tINT
{
- stpui_plist_set_command_type(current_printer, $2);
+ if (current_printer)
+ stpui_plist_set_command_type(current_printer, $2);
}
;
Scaling: SCALING tDOUBLE
- { current_printer->scaling = $2; }
+ {
+ if (current_printer)
+ current_printer->scaling = $2;
+ }
;
Orientation: ORIENTATION tINT
- { current_printer->orientation = $2; }
+ {
+ if (current_printer)
+ current_printer->orientation = $2;
+ }
;
Autosize_Roll_Paper: AUTOSIZE_ROLL_PAPER tINT
- { current_printer->auto_size_roll_feed_paper = $2; }
+ {
+ if (current_printer)
+ current_printer->auto_size_roll_feed_paper = $2;
+ }
;
Unit: UNIT tINT
- { current_printer->unit = $2; }
+ {
+ if (current_printer)
+ current_printer->unit = $2;
+ }
;
Left: LEFT tINT
- { stp_set_left(current_printer->v, $2); }
+ {
+ if (current_printer)
+ stp_set_left(current_printer->v, $2);
+ }
;
Top: TOP tINT
- { stp_set_top(current_printer->v, $2); }
+ {
+ if (current_printer)
+ stp_set_top(current_printer->v, $2);
+ }
;
Output_Type: OUTPUT_TYPE tINT
{
- switch ($2)
+ if (current_printer)
{
- case 0:
- stp_set_string_parameter
- (current_printer->v, "PrintingMode", "BW");
- break;
- case 1:
- case 2:
- default:
- stp_set_string_parameter
- (current_printer->v, "PrintingMode", "Color");
- break;
+ switch ($2)
+ {
+ case 0:
+ stp_set_string_parameter
+ (current_printer->v, "PrintingMode", "BW");
+ break;
+ case 1:
+ case 2:
+ default:
+ stp_set_string_parameter
+ (current_printer->v, "PrintingMode", "Color");
+ break;
+ }
}
}
;
Custom_Page_Width: CUSTOM_PAGE_WIDTH tINT
- { stp_set_page_width(current_printer->v, $2); }
+ {
+ if (current_printer)
+ stp_set_page_width(current_printer->v, $2);
+ }
;
Custom_Page_Height: CUSTOM_PAGE_HEIGHT tINT
- { stp_set_page_height(current_printer->v, $2); }
+ {
+ if (current_printer)
+ stp_set_page_height(current_printer->v, $2);
+ }
;
Empty:
@@ -216,13 +244,16 @@ Empty:
Int_Param: tWORD pINT tBOOLEAN tINT
{
- stp_set_int_parameter(current_printer->v, $1, $4);
- if (strcmp($3, "False") == 0)
- stp_set_int_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_int_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ stp_set_int_parameter(current_printer->v, $1, $4);
+ if (strcmp($3, "False") == 0)
+ stp_set_int_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_int_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
}
@@ -230,13 +261,16 @@ Int_Param: tWORD pINT tBOOLEAN tINT
String_List_Param: tWORD pSTRING_LIST tBOOLEAN tSTRING
{
- stp_set_string_parameter(current_printer->v, $1, $4);
- if (strcmp($3, "False") == 0)
- stp_set_string_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_string_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ stp_set_string_parameter(current_printer->v, $1, $4);
+ if (strcmp($3, "False") == 0)
+ stp_set_string_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_string_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
g_free($4);
@@ -245,13 +279,16 @@ String_List_Param: tWORD pSTRING_LIST tBOOLEAN tSTRING
File_Param: tWORD pFILE tBOOLEAN tSTRING
{
- stp_set_file_parameter(current_printer->v, $1, $4);
- if (strcmp($3, "False") == 0)
- stp_set_file_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_file_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ stp_set_file_parameter(current_printer->v, $1, $4);
+ if (strcmp($3, "False") == 0)
+ stp_set_file_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_file_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
g_free($4);
@@ -260,13 +297,16 @@ File_Param: tWORD pFILE tBOOLEAN tSTRING
Double_Param: tWORD pDOUBLE tBOOLEAN tDOUBLE
{
- stp_set_float_parameter(current_printer->v, $1, $4);
- if (strcmp($3, "False") == 0)
- stp_set_float_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_float_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ stp_set_float_parameter(current_printer->v, $1, $4);
+ if (strcmp($3, "False") == 0)
+ stp_set_float_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_float_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
}
@@ -274,13 +314,16 @@ Double_Param: tWORD pDOUBLE tBOOLEAN tDOUBLE
Dimension_Param: tWORD pDIMENSION tBOOLEAN tINT
{
- stp_set_dimension_parameter(current_printer->v, $1, $4);
- if (strcmp($3, "False") == 0)
- stp_set_dimension_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_dimension_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ stp_set_dimension_parameter(current_printer->v, $1, $4);
+ if (strcmp($3, "False") == 0)
+ stp_set_dimension_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_dimension_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
}
@@ -288,16 +331,19 @@ Dimension_Param: tWORD pDIMENSION tBOOLEAN tINT
Boolean_Param: tWORD pBOOLEAN tBOOLEAN tBOOLEAN
{
- if (strcmp($4, "False") == 0)
- stp_set_boolean_parameter(current_printer->v, $1, 0);
- else
- stp_set_boolean_parameter(current_printer->v, $1, 1);
- if (strcmp($3, "False") == 0)
- stp_set_boolean_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_boolean_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
+ if (current_printer)
+ {
+ if (strcmp($4, "False") == 0)
+ stp_set_boolean_parameter(current_printer->v, $1, 0);
+ else
+ stp_set_boolean_parameter(current_printer->v, $1, 1);
+ if (strcmp($3, "False") == 0)
+ stp_set_boolean_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_boolean_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ }
g_free($1);
g_free($3);
g_free($4);
@@ -306,17 +352,20 @@ Boolean_Param: tWORD pBOOLEAN tBOOLEAN tBOOLEAN
Curve_Param: tWORD pCURVE tBOOLEAN tSTRING
{
- stp_curve_t *curve = stp_curve_create_from_string($4);
- if (curve)
+ if (current_printer)
{
- stp_set_curve_parameter(current_printer->v, $1, curve);
- if (strcmp($3, "False") == 0)
- stp_set_curve_parameter_active(current_printer->v, $1,
- STP_PARAMETER_INACTIVE);
- else
- stp_set_curve_parameter_active(current_printer->v, $1,
- STP_PARAMETER_ACTIVE);
- stp_curve_destroy(curve);
+ stp_curve_t *curve = stp_curve_create_from_string($4);
+ if (curve)
+ {
+ stp_set_curve_parameter(current_printer->v, $1, curve);
+ if (strcmp($3, "False") == 0)
+ stp_set_curve_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_INACTIVE);
+ else
+ stp_set_curve_parameter_active(current_printer->v, $1,
+ STP_PARAMETER_ACTIVE);
+ stp_curve_destroy(curve);
+ }
}
g_free($1);
g_free($3);
diff --git a/src/main/Makefile.am b/src/main/Makefile.am
index aa19a62..55b2868 100644
--- a/src/main/Makefile.am
+++ b/src/main/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.92 2005/11/21 11:16:23 rleigh Exp $
+## $Id: Makefile.am,v 1.92.10.1 2007/03/02 12:01:20 rlk Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -50,7 +50,14 @@ color_traditional_la_SOURCES = \
color_traditional_la_LDFLAGS = -module -avoid-version
-print_canon_la_SOURCES = print-canon.c
+print_canon_la_SOURCES = \
+ print-canon.c \
+ print-canon.h \
+ canon-inks.h \
+ canon-media.h \
+ canon-modes.h \
+ canon-printers.h
+
print_canon_la_LDFLAGS = -module -avoid-version
print_escp2_la_SOURCES = \
@@ -124,6 +131,7 @@ libgutenprint_la_SOURCES = \
dither-predithered.c \
generic-options.c \
image.c \
+ buffer-image.c \
module.c \
path.c \
print-dither-matrices.c \
diff --git a/src/main/Makefile.in b/src/main/Makefile.in
index 0ef0165..1d50529 100644
--- a/src/main/Makefile.in
+++ b/src/main/Makefile.in
@@ -48,11 +48,12 @@ subdir = src/main
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -80,14 +81,16 @@ am__libgutenprint_la_SOURCES_DIST = array.c bit-ops.c channel.c \
color.c curve.c curve-cache.c dither-ed.c dither-eventone.c \
dither-inks.c dither-main.c dither-ordered.c \
dither-very-fast.c dither-predithered.c generic-options.c \
- image.c module.c path.c print-dither-matrices.c print-list.c \
- print-papers.c print-util.c print-vars.c print-version.c \
- print-weave.c printers.c sequence.c string-list.c xml.c \
- mxml-attr.c mxml-file.c mxml-node.c mxml-search.c \
- dither-impl.h dither-inlined-functions.h generic-options.h \
- gutenprint-internal.h util.h print-color.c color-conversion.h \
- color-conversions.c print-canon.c print-escp2.c escp2-driver.c \
- print-escp2.h print-escp2-data.c escp2-channels.c escp2-inks.c \
+ image.c buffer-image.c module.c path.c print-dither-matrices.c \
+ print-list.c print-papers.c print-util.c print-vars.c \
+ print-version.c print-weave.c printers.c sequence.c \
+ string-list.c xml.c mxml-attr.c mxml-file.c mxml-node.c \
+ mxml-search.c dither-impl.h dither-inlined-functions.h \
+ generic-options.h gutenprint-internal.h util.h print-color.c \
+ color-conversion.h color-conversions.c print-canon.c \
+ print-canon.h canon-inks.h canon-media.h canon-modes.h \
+ canon-printers.h print-escp2.c escp2-driver.c print-escp2.h \
+ print-escp2-data.c escp2-channels.c escp2-inks.c \
escp2-papers.c escp2-resolutions.c print-lexmark.c print-pcl.c \
print-ps.c print-olympus.c print-raw.c
am__objects_1 = mxml-attr.lo mxml-file.lo mxml-node.lo mxml-search.lo
@@ -110,11 +113,11 @@ am_libgutenprint_la_OBJECTS = array.lo bit-ops.lo channel.lo color.lo \
curve.lo curve-cache.lo dither-ed.lo dither-eventone.lo \
dither-inks.lo dither-main.lo dither-ordered.lo \
dither-very-fast.lo dither-predithered.lo generic-options.lo \
- image.lo module.lo path.lo print-dither-matrices.lo \
- print-list.lo print-papers.lo print-util.lo print-vars.lo \
- print-version.lo print-weave.lo printers.lo sequence.lo \
- string-list.lo xml.lo $(am__objects_1) $(am__objects_2) \
- $(am__objects_12)
+ image.lo buffer-image.lo module.lo path.lo \
+ print-dither-matrices.lo print-list.lo print-papers.lo \
+ print-util.lo print-vars.lo print-version.lo print-weave.lo \
+ printers.lo sequence.lo string-list.lo xml.lo $(am__objects_1) \
+ $(am__objects_2) $(am__objects_12)
libgutenprint_la_OBJECTS = $(am_libgutenprint_la_OBJECTS)
print_canon_la_LIBADD =
am_print_canon_la_OBJECTS = print-canon.lo
@@ -147,8 +150,8 @@ am_print_raw_la_OBJECTS = print-raw.lo
print_raw_la_OBJECTS = $(am_print_raw_la_OBJECTS)
@BUILD_MODULES_TRUE@am_print_raw_la_rpath = -rpath $(pkgmoduledir)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -175,13 +178,18 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -207,6 +215,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -214,6 +224,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -226,12 +237,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -266,6 +279,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -361,14 +375,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -385,6 +402,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -402,17 +422,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -437,7 +461,14 @@ color_traditional_la_SOURCES = \
color-conversions.c
color_traditional_la_LDFLAGS = -module -avoid-version
-print_canon_la_SOURCES = print-canon.c
+print_canon_la_SOURCES = \
+ print-canon.c \
+ print-canon.h \
+ canon-inks.h \
+ canon-media.h \
+ canon-modes.h \
+ canon-printers.h
+
print_canon_la_LDFLAGS = -module -avoid-version
print_escp2_la_SOURCES = \
print-escp2.c \
@@ -501,6 +532,7 @@ libgutenprint_la_SOURCES = \
dither-predithered.c \
generic-options.c \
image.c \
+ buffer-image.c \
module.c \
path.c \
print-dither-matrices.c \
@@ -554,9 +586,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/main/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/main/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/main/Makefile
+ $(AUTOMAKE) --gnu src/main/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -655,14 +687,75 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bit-ops.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer-image.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/channel.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color-conversions.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve-cache.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-ed.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-eventone.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-inks.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-main.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-ordered.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-predithered.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-very-fast.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escp2-channels.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escp2-driver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escp2-inks.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escp2-papers.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escp2-resolutions.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generic-options.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mxml-attr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mxml-file.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mxml-node.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mxml-search.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-canon.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-color.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-dither-matrices.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-escp2-data.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-escp2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-lexmark.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-list.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-olympus.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-papers.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-pcl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-ps.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-raw.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-vars.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-version.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-weave.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printers.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sequence.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string-list.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml.Plo@am__quote@
+
.c.o:
- $(COMPILE) -c $<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -826,6 +919,7 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
clean-pkgmoduleLTLIBRARIES mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -852,6 +946,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/main/bit-ops.c b/src/main/bit-ops.c
index 063348d..ab111ca 100644
--- a/src/main/bit-ops.c
+++ b/src/main/bit-ops.c
@@ -1,5 +1,5 @@
/*
- * "$Id: bit-ops.c,v 1.9 2006/03/28 03:27:57 rlk Exp $"
+ * "$Id: bit-ops.c,v 1.9.8.2 2007/05/12 19:14:27 faust3 Exp $"
*
* Softweave calculator for Gutenprint.
*
@@ -73,6 +73,201 @@ stp_fold(const unsigned char *line,
}
}
+void
+stp_fold_3bit(const unsigned char *line,
+ int single_length,
+ unsigned char *outbuf)
+{
+ int i;
+ memset(outbuf, 0, single_length * 3);
+ for (i = 0; i < single_length; i++) {
+ outbuf[0] =
+ ((line[0] & (1 << 7)) >> 2) |
+ ((line[0] & (1 << 6)) >> 4) |
+ ((line[single_length] & (1 << 7)) >> 1) |
+ ((line[single_length] & (1 << 6)) >> 3) |
+ ((line[single_length] & (1 << 5)) >> 5) |
+ ((line[2*single_length] & (1 << 7)) << 0) |
+ ((line[2*single_length] & (1 << 6)) >> 2) |
+ ((line[2*single_length] & (1 << 5)) >> 4);
+ outbuf[1] =
+ ((line[0] & (1 << 5)) << 2) |
+ ((line[0] & (1 << 4)) << 0) |
+ ((line[0] & (1 << 3)) >> 2) |
+ ((line[single_length] & (1 << 4)) << 1) |
+ ((line[single_length] & (1 << 3)) >> 1) |
+ ((line[2*single_length] & (1 << 4)) << 2) |
+ ((line[2*single_length] & (1 << 3)) << 0) |
+ ((line[2*single_length] & (1 << 2)) >> 2);
+ outbuf[2] =
+ ((line[0] & (1 << 2)) << 4) |
+ ((line[0] & (1 << 1)) << 2) |
+ ((line[0] & (1 << 0)) << 0) |
+ ((line[single_length] & (1 << 2)) << 5) |
+ ((line[single_length] & (1 << 1)) << 3) |
+ ((line[single_length] & (1 << 0)) << 1) |
+ ((line[2*single_length] & (1 << 1)) << 4) |
+ ((line[2*single_length] & (1 << 0)) << 2);
+ line++;
+ outbuf += 3;
+ }
+}
+
+void
+stp_fold_3bit_323(const unsigned char *line,
+ int single_length,
+ unsigned char *outbuf)
+{
+ unsigned char A0,A1,A2,B0,B1,B2,C0,C1,C2;
+ const unsigned char *last= line+single_length;
+ memset(outbuf, 0, single_length * 3);
+ for (; line < last; line+=3, outbuf+=8) {
+
+ A0= line[0]; B0= line[single_length]; C0= line[2*single_length];
+
+ if (line<last-2) {
+ A1= line[1]; B1= line[single_length+1]; C1= line[2*single_length+1];
+ } else {
+ A1= 0; B1= 0; C1= 0;
+ }
+ if (line<last-1) {
+ A2= line[2]; B2= line[single_length+2]; C2= line[2*single_length+2];
+ } else {
+ A2= 0; B2= 0; C2= 0;
+ }
+
+ outbuf[0] =
+ ((C0 & 0x80) >> 0) |
+ ((B0 & 0x80) >> 1) |
+ ((A0 & 0x80) >> 2) |
+ ((B0 & 0x40) >> 2) |
+ ((A0 & 0x40) >> 3) |
+ ((C0 & 0x20) >> 3) |
+ ((B0 & 0x20) >> 4) |
+ ((A0 & 0x20) >> 5);
+ outbuf[1] =
+ ((C0 & 0x10) << 3) |
+ ((B0 & 0x10) << 2) |
+ ((A0 & 0x10) << 1) |
+ ((B0 & 0x08) << 1) |
+ ((A0 & 0x08) << 0) |
+ ((C0 & 0x04) >> 0) |
+ ((B0 & 0x04) >> 1) |
+ ((A0 & 0x04) >> 2);
+ outbuf[2] =
+ ((C0 & 0x02) << 6) |
+ ((B0 & 0x02) << 5) |
+ ((A0 & 0x02) << 4) |
+ ((B0 & 0x01) << 4) |
+ ((A0 & 0x01) << 3) |
+ ((C1 & 0x80) >> 5) |
+ ((B1 & 0x80) >> 6) |
+ ((A1 & 0x80) >> 7);
+ outbuf[3] =
+ ((C1 & 0x40) << 1) |
+ ((B1 & 0x40) << 0) |
+ ((A1 & 0x40) >> 1) |
+ ((B1 & 0x20) >> 1) |
+ ((A1 & 0x20) >> 2) |
+ ((C1 & 0x10) >> 2) |
+ ((B1 & 0x10) >> 3) |
+ ((A1 & 0x10) >> 4);
+ outbuf[4] =
+ ((C1 & 0x08) << 4) |
+ ((B1 & 0x08) << 3) |
+ ((A1 & 0x08) << 2) |
+ ((B1 & 0x04) << 2) |
+ ((A1 & 0x04) << 1) |
+ ((C1 & 0x02) << 1) |
+ ((B1 & 0x02) >> 0) |
+ ((A1 & 0x02) >> 1);
+ outbuf[5] =
+ ((C1 & 0x01) << 7) |
+ ((B1 & 0x01) << 6) |
+ ((A1 & 0x01) << 5) |
+ ((B2 & 0x80) >> 3) |
+ ((A2 & 0x80) >> 4) |
+ ((C2 & 0x40) >> 4) |
+ ((B2 & 0x40) >> 5) |
+ ((A2 & 0x40) >> 6);
+ outbuf[6] =
+ ((C2 & 0x20) << 2) |
+ ((B2 & 0x20) << 1) |
+ ((A2 & 0x20) << 0) |
+ ((B2 & 0x10) >> 0) |
+ ((A2 & 0x10) >> 1) |
+ ((C2 & 0x08) >> 1) |
+ ((B2 & 0x08) >> 2) |
+ ((A2 & 0x08) >> 3);
+ outbuf[7] =
+ ((C2 & 0x04) << 5) |
+ ((B2 & 0x04) << 4) |
+ ((A2 & 0x04) << 3) |
+ ((B2 & 0x02) << 3) |
+ ((A2 & 0x02) << 2) |
+ ((C2 & 0x01) << 2) |
+ ((B2 & 0x01) << 1) |
+ ((A2 & 0x01) << 0);
+ }
+}
+
+void
+stp_fold_4bit(const unsigned char *line,
+ int single_length,
+ unsigned char *outbuf)
+{
+ int i;
+ memset(outbuf, 0, single_length * 4);
+ for (i = 0; i < single_length; i++){
+ unsigned char l0 = line[0];
+ unsigned char l1 = line[single_length];
+ unsigned char l2 = line[single_length*2];
+ unsigned char l3 = line[single_length*3];
+ if(l0 || l1 || l2 || l3){
+ outbuf[0] =
+ ((l3 & (1<<7)) >> 0)|
+ ((l2 & (1<<7)) >> 1)|
+ ((l1 & (1<<7)) >> 2)|
+ ((l0 & (1<<7)) >> 3)|
+ ((l3 & (1<<6)) >> 3)|
+ ((l2 & (1<<6)) >> 4)|
+ ((l1 & (1<<6)) >> 5)|
+ ((l0 & (1<<6)) >> 6);
+
+ outbuf[1] =
+ ((l3 & (1<<5)) << 2)|
+ ((l2 & (1<<5)) << 1)|
+ ((l1 & (1<<5)) << 0)|
+ ((l0 & (1<<5)) >> 1)|
+ ((l3 & (1<<4)) >> 1)|
+ ((l2 & (1<<4)) >> 2)|
+ ((l1 & (1<<4)) >> 3)|
+ ((l0 & (1<<4)) >> 4);
+
+ outbuf[2] =
+ ((l3 & (1<<3)) << 4)|
+ ((l2 & (1<<3)) << 3)|
+ ((l1 & (1<<3)) << 2)|
+ ((l0 & (1<<3)) << 1)|
+ ((l3 & (1<<2)) << 1)|
+ ((l2 & (1<<2)) << 0)|
+ ((l1 & (1<<2)) >> 1)|
+ ((l0 & (1<<2)) >> 2);
+ outbuf[3] =
+ ((l3 & (1<<1)) << 6)|
+ ((l2 & (1<<1)) << 5)|
+ ((l1 & (1<<1)) << 4)|
+ ((l0 & (1<<1)) << 3)|
+ ((l3 & (1<<0)) << 3)|
+ ((l2 & (1<<0)) << 2)|
+ ((l1 & (1<<0)) << 1)|
+ ((l0 & (1<<0)) << 0);
+ }
+ line++;
+ outbuf += 4;
+ }
+}
+
static void
stpi_split_2_1(int length,
const unsigned char *in,
@@ -950,27 +1145,30 @@ stpi_unpack_16_2(int length,
if (tempin & 3)
temp[7] |= ((tempin & 3) << 6) >> shift;
- tempin = *in++;
-
- if (tempin & 192)
- temp[8] |= (tempin & 192) >> shift;
- if (tempin & 48)
- temp[9] |= ((tempin & 48) << 2) >> shift;
- if (tempin & 12)
- temp[10] |= ((tempin & 12) << 4) >> shift;
- if (tempin & 3)
- temp[11] |= ((tempin & 3) << 6) >> shift;
-
- tempin = *in++;
-
- if (tempin & 192)
- temp[12] |= (tempin & 192) >> shift;
- if (tempin & 48)
- temp[13] |= ((tempin & 48) << 2) >> shift;
- if (tempin & 12)
- temp[14] |= ((tempin & 12) << 4) >> shift;
- if (tempin & 3)
- temp[15] |= ((tempin & 3) << 6) >> shift;
+ if (length-- > 0)
+ {
+ tempin = *in++;
+
+ if (tempin & 192)
+ temp[8] |= (tempin & 192) >> shift;
+ if (tempin & 48)
+ temp[9] |= ((tempin & 48) << 2) >> shift;
+ if (tempin & 12)
+ temp[10] |= ((tempin & 12) << 4) >> shift;
+ if (tempin & 3)
+ temp[11] |= ((tempin & 3) << 6) >> shift;
+
+ tempin = *in++;
+
+ if (tempin & 192)
+ temp[12] |= (tempin & 192) >> shift;
+ if (tempin & 48)
+ temp[13] |= ((tempin & 48) << 2) >> shift;
+ if (tempin & 12)
+ temp[14] |= ((tempin & 12) << 4) >> shift;
+ if (tempin & 3)
+ temp[15] |= ((tempin & 3) << 6) >> shift;
+ }
if (shift < 6)
shift += 2;
diff --git a/src/main/buffer-image.c b/src/main/buffer-image.c
new file mode 100644
index 0000000..030d398
--- /dev/null
+++ b/src/main/buffer-image.c
@@ -0,0 +1,153 @@
+/*
+ * Buffer an Image
+ *
+ * Copyright 2007 Sascha Sommer <saschasommer@freenet.de>
+ *
+ * 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 <config.h>
+#endif
+#include <gutenprint/gutenprint.h>
+#include "gutenprint-internal.h"
+
+struct buffered_image_priv
+{
+ stp_image_t* image;
+ unsigned char** buf;
+ unsigned int flags;
+};
+
+static void
+buffered_image_init(stp_image_t* image)
+{
+ struct buffered_image_priv *priv = image->rep;
+ if(priv->image->init)
+ priv->image->init(priv->image);
+}
+
+
+static int
+buffered_image_width(stp_image_t * image)
+{
+ struct buffered_image_priv *priv = image->rep;
+ return priv->image->width(priv->image);
+}
+
+static int
+buffered_image_height(stp_image_t * image)
+{
+ struct buffered_image_priv *priv = image->rep;
+ return priv->image->height(priv->image);
+}
+
+static const char *
+buffered_image_get_appname(stp_image_t *image)
+{
+ struct buffered_image_priv *priv = image->rep;
+ return priv->image->get_appname(priv->image);
+}
+
+
+static stp_image_status_t
+buffered_image_get_row(stp_image_t* image,unsigned char *data, size_t byte_limit, int row)
+{
+ struct buffered_image_priv *priv = image->rep;
+ int width = buffered_image_width(image);
+ int height = buffered_image_height(image);
+ /* FIXME this will break with padding bytes */
+ int bytes_per_pixel = byte_limit / width;
+ int inc = bytes_per_pixel;
+ unsigned char* src;
+ int i;
+ /* fill buffer */
+ if(!priv->buf){
+ priv->buf = stp_zalloc((sizeof(unsigned short*) + 1) * height);
+ if(!priv->buf){
+ return STP_IMAGE_STATUS_ABORT;
+ }
+ for(i=0;i<height;i++){
+ priv->buf[i] = stp_malloc(byte_limit);
+ if(STP_IMAGE_STATUS_OK != priv->image->get_row(priv->image,priv->buf[i],byte_limit,i))
+ return STP_IMAGE_STATUS_ABORT;
+ }
+ }
+ if(priv->flags & BUFFER_FLAG_FLIP_Y)
+ row = height - row - 1;
+
+ src = priv->buf[row];
+
+ if(priv->flags & BUFFER_FLAG_FLIP_X){
+ src += byte_limit - bytes_per_pixel;
+ inc = -bytes_per_pixel;
+ }
+
+ /* copy data */
+ for( i = 0 ; i < width ; i++){
+ memcpy(data,src,bytes_per_pixel);
+ src += inc;
+ data += bytes_per_pixel;
+ }
+ return STP_IMAGE_STATUS_OK;
+}
+
+static void
+buffered_image_conclude(stp_image_t * image)
+{
+ struct buffered_image_priv *priv = image->rep;
+ if(priv->buf){
+ int i = 0;
+ while(priv->buf[i]){
+ stp_free(priv->buf[i]);
+ ++i;
+ }
+ stp_free(priv->buf);
+ priv->buf = NULL;
+ }
+ if(priv->image->conclude)
+ priv->image->conclude(priv->image);
+
+}
+
+stp_image_t*
+stpi_buffer_image(stp_image_t* image, unsigned int flags)
+{
+ struct buffered_image_priv *priv;
+ stp_image_t* buffered_image = stp_zalloc(sizeof(stp_image_t));
+ if(!buffered_image){
+ return NULL;
+ }
+ priv = buffered_image->rep = stp_zalloc(sizeof(struct buffered_image_priv));
+ if(!priv){
+ stp_free(buffered_image);
+ return NULL;
+ }
+
+ if(image->init)
+ buffered_image->init = buffered_image_init;
+ buffered_image->width = buffered_image_width;
+ buffered_image->height = buffered_image_height;
+ buffered_image->get_row = buffered_image_get_row;
+ priv->image = image;
+ priv->flags = flags;
+ if(image->get_appname)
+ buffered_image->get_appname = buffered_image_get_appname;
+
+
+ return buffered_image;
+}
+
+
diff --git a/src/main/canon-inks.h b/src/main/canon-inks.h
new file mode 100644
index 0000000..458cb2a
--- /dev/null
+++ b/src/main/canon-inks.h
@@ -0,0 +1,420 @@
+/*
+ * Print plug-in CANON BJL driver for the GIMP.
+ *
+ * Copyright 1997-2000 Michael Sweet (mike@easysw.com),
+ * Robert Krawitz (rlk@alum.mit.edu) and
+ * Andy Thaller (thaller@ph.tum.de)
+ * Copyright (c) 2006 - 2007 Sascha Sommer (saschasommer@freenet.de)
+ *
+ * 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.
+ */
+
+/* This file contains definitions for the various inks
+*/
+
+#ifndef GUTENPRINT_INTERNAL_CANON_INKS_H
+#define GUTENPRINT_INTERNAL_CANON_INKS_H
+
+/* ink definition:
+ * ink dots can be printed in various sizes
+ * one size is called level
+ * every level is represented by a bitcombination and a density
+ * the density ranges from 0 (no dot is printed) to 1.0 (maximum dot size)
+ *
+ * an ink is therefore defined by the number of bits used for the bitpattern (bitdepth) and the number of possible levels:
+ * a 1 bit ink can have 2 possible levels 0 and 1
+ * a 2 bit ink can have 2*2=4 possible levels with the bitpatterns 0,1,2 and 3
+ * a 3 bit ink can have 2*2*2=8 possible levels with the bitpatterns 0 to 7
+ * ...
+ * some inks use less levels than possible with the given bitdepth
+ * some inks use special compressions to store for example 5 3 level pixels in 1 byte
+ * naming:
+ * dotsizes are named dotsizes_xl where x is the number of levels (number of dotsizes + 1)
+ * inks are named canon_xb_yl_ink where x is the number of bits representing the y possible ink levels
+ * inks that contain special (compression) flags are named canon_xb_yl_c_ink
+ * order:
+ * dotsizes are ordered ascending by the number of dots
+ *
+*/
+
+
+typedef struct {
+ const int bits; /* bitdepth */
+ const int flags; /* flags: */
+#define INK_FLAG_5pixel_in_1byte 0x1 /* use special compression where 5 3level pixels get stored in 1 byte */
+ int numsizes; /* number of possible {bit,density} tuples */
+ const stp_dotsize_t *dot_sizes; /* pointer to an array of {bit,density} tuples */
+} canon_ink_t;
+
+/* declare a standard ink */
+#define DECLARE_INK(bits,levels) \
+static const canon_ink_t canon_##bits##b_##levels##l_ink = { \
+ bits,0, \
+ sizeof(dotsizes_##levels##l)/sizeof(stp_dotsize_t), dotsizes_##levels##l \
+}
+
+/* declare an ink with flags */
+#define DECLARE_INK_EXTENDED(bits,levels,flags) \
+static const canon_ink_t canon_##bits##b_##levels##l_c_ink = { \
+ bits,flags, \
+ sizeof(dotsizes_##levels##l)/sizeof(stp_dotsize_t), dotsizes_##levels##l \
+}
+
+
+
+/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
+ *
+ * Some of the bitpattern/density combinations were taken from print-escp2.c
+ * and do NOT represent the requirements of canon inks. Feel free to play
+ * with them and send a patch to gimp-print-devel@lists.sourceforge.net
+ */
+
+
+static const stp_dotsize_t dotsizes_2l[] = {
+ { 0x1, 1.0 }
+};
+
+DECLARE_INK(1,2);
+
+
+static const stp_dotsize_t dotsizes_3l[] = {
+ { 0x1, 0.5 },
+ { 0x2, 1.0 }
+};
+
+DECLARE_INK(2,3);
+
+DECLARE_INK_EXTENDED(2,3,INK_FLAG_5pixel_in_1byte);
+
+static const stp_dotsize_t dotsizes_4l[] = {
+ { 0x1, 0.45 },
+ { 0x2, 0.68 },
+ { 0x3, 1.0 }
+};
+
+DECLARE_INK(2,4);
+
+static const stp_dotsize_t dotsizes_7l[] = {
+ { 0x1, 0.45 },
+ { 0x2, 0.55 },
+ { 0x3, 0.66 },
+ { 0x4, 0.77 },
+ { 0x5, 0.88 },
+ { 0x6, 1.0 }
+};
+
+DECLARE_INK(3,7);
+
+static const stp_dotsize_t dotsizes_8l[] = {
+ { 0x1, 0.14 },
+ { 0x2, 0.29 },
+ { 0x3, 0.43 },
+ { 0x4, 0.58 },
+ { 0x5, 0.71 },
+ { 0x6, 0.86 },
+ { 0x7, 1.00 }
+};
+
+DECLARE_INK(4,8);
+
+static const stp_dotsize_t dotsizes_16l[] = {
+ { 0x1, 0.07 },
+ { 0x2, 0.13 },
+ { 0x3, 0.20 },
+ { 0x4, 0.27 },
+ { 0x5, 0.33 },
+ { 0x6, 0.40 },
+ { 0x7, 0.47 },
+ { 0x8, 0.53 },
+ { 0x9, 0.60 },
+ { 0xA, 0.67 },
+ { 0xB, 0.73 },
+ { 0xC, 0.80 },
+ { 0xD, 0.87 },
+ { 0xE, 0.93 },
+ { 0xF, 1.00 }
+};
+
+DECLARE_INK(4,16);
+
+
+/* A inkset is a list of inks and their (relative) densities
+ * For printers that use the extended SetImage command t)
+ * the inkset will be used to build the parameter list
+ * therefore invalid inksets will let the printer fallback
+ * to a default mode which will then lead to wrong output
+ * use {0,0.0,NULL} for undefined placeholder inks
+ * set density to 0.0 to disable certain inks
+ * the paramters will then still occure in the t) command
+ *
+ * names:
+ * inksets are named canon_X_ where X is the number of possible inks in the set
+ * followed by YZ combinations for every defined ink where Y is the letter
+ * representing the color and Z the maximum level of the color
+ * if an inkset contains one or more compressed inks a _c is appended
+ * the inkset name ends with _inkset
+ * see the examples below
+ * order:
+ * inksets are ordered by ascending number of possible inks, used inks, compression
+ *
+ */
+
+
+typedef struct {
+ const int channel;
+ const double density;
+ const canon_ink_t* ink;
+} canon_inkset_t;
+
+
+/* Inkset for printing in K and 1bit/pixel */
+static const canon_inkset_t canon_1_K2_inkset[] = {
+ {'K',1.0,&canon_1b_2l_ink}
+};
+
+/* Inkset for printing in CMY and 1bit/pixel */
+static const canon_inkset_t canon_3_C2M2Y2_inkset[] = {
+ {'C',1.0,&canon_1b_2l_ink},
+ {'M',1.0,&canon_1b_2l_ink},
+ {'Y',1.0,&canon_1b_2l_ink}
+};
+
+
+/* Inkset for printing in CMY and 2bit/pixel */
+static const canon_inkset_t canon_3_C4M4Y4_inkset[] = {
+ {'C',1.0,&canon_2b_4l_ink},
+ {'M',1.0,&canon_2b_4l_ink},
+ {'Y',1.0,&canon_2b_4l_ink}
+};
+
+/* Inkset for printing in CMYK and 1bit/pixel */
+static const canon_inkset_t canon_4_C2M2Y2K2_inkset[] = {
+ {'C',1.0,&canon_1b_2l_ink},
+ {'M',1.0,&canon_1b_2l_ink},
+ {'Y',1.0,&canon_1b_2l_ink},
+ {'K',1.0,&canon_1b_2l_ink}
+};
+
+/* Inkset for printing in CMYK and 2bit/pixel */
+static const canon_inkset_t canon_4_C4M4Y4K4_inkset[] = {
+ {'C',1.0,&canon_2b_4l_ink},
+ {'M',1.0,&canon_2b_4l_ink},
+ {'Y',1.0,&canon_2b_4l_ink},
+ {'K',1.0,&canon_2b_4l_ink}
+};
+
+/*
+ * Dither ranges specifically for any Color and 3bit/pixel
+ * (see NOTE above)
+ *
+ * BIG NOTE: The bjc8200 has this kind of ink. One Byte seems to hold
+ * drop sizes for 3 pixels in a 3/2/2 bit fashion.
+ * Size values for 3bit-sized pixels range from 1 to 7,
+ * size values for 2bit-sized picels from 1 to 3 (kill msb).
+ *
+ *
+ */
+
+/* Inkset for printing in CMYK and 3bit/pixel */
+static const canon_inkset_t canon_4_C7M7Y7K7_inkset[] = {
+ {'C',1.0,&canon_3b_7l_ink},
+ {'M',1.0,&canon_3b_7l_ink},
+ {'Y',1.0,&canon_3b_7l_ink},
+ {'K',1.0,&canon_3b_7l_ink}
+};
+
+/* Inkset for printing in CMYKcm and 1bit/pixel */
+/* FIXME is it really correct that the density of the CM inks is lowered? */
+static const canon_inkset_t canon_6_C2M2Y2K2c2m2_inkset[] = {
+ {'C',0.25,&canon_1b_2l_ink},
+ {'M',0.26,&canon_1b_2l_ink},
+ {'Y',1.0,&canon_1b_2l_ink},
+ {'K',1.0,&canon_1b_2l_ink},
+ {'c',1.0,&canon_1b_2l_ink},
+ {'m',1.0,&canon_1b_2l_ink}
+};
+
+/* Inkset for printing in CMYKcm and 2bit/pixel */
+/* FIXME is it really correct that the density of the CM inks is lowered? */
+static const canon_inkset_t canon_6_C4M4Y4K4c4m4_inkset[] = {
+ {'C',0.33,&canon_2b_4l_ink},
+ {'M',0.33,&canon_2b_4l_ink},
+ {'Y',1.0,&canon_2b_4l_ink},
+ {'K',1.0,&canon_2b_4l_ink},
+ {'c',1.0,&canon_2b_4l_ink},
+ {'m',1.0,&canon_2b_4l_ink}
+};
+
+/* Inkset for printing in CMYKcm and 3bit/pixel */
+/* FIXME is it really correct that the density of the CM inks is lowered? */
+static const canon_inkset_t canon_6_C7M7Y7K7c7m7_inkset[] = {
+ {'C',0.33,&canon_3b_7l_ink},
+ {'M',0.33,&canon_3b_7l_ink},
+ {'Y',1.0,&canon_3b_7l_ink},
+ {'K',1.0,&canon_3b_7l_ink},
+ {'c',1.0,&canon_3b_7l_ink},
+ {'m',1.0,&canon_3b_7l_ink}
+};
+
+static const canon_inkset_t canon_9_C3M3Y2K2_inkset[] = {
+ {'C',1.0,&canon_2b_3l_ink},
+ {'M',1.0,&canon_2b_3l_ink},
+ {'Y',1.0,&canon_1b_2l_ink},
+ {'K',1.0,&canon_1b_2l_ink},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+};
+
+static const canon_inkset_t canon_9_C3M3Y2K2_c_inkset[] = {
+ {'C',1.0,&canon_2b_3l_c_ink},
+ {'M',1.0,&canon_2b_3l_c_ink},
+ {'Y',1.0,&canon_1b_2l_ink},
+ {'K',1.0,&canon_1b_2l_ink},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL}
+};
+
+static const canon_inkset_t canon_9_C3M3Y2K2k3_c_inkset[] = {
+ {'C',1.0,&canon_2b_3l_c_ink},
+ {'M',1.0,&canon_2b_3l_c_ink},
+ {'Y',1.0,&canon_1b_2l_ink},
+ {'K',1.0,&canon_1b_2l_ink},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {'k',0.0,&canon_2b_3l_c_ink}, /* even though we won't use the photo black in this mode its parameters have to be set */
+ {0,0.0,NULL}
+};
+
+static const canon_inkset_t canon_9_C4M4Y4K2c4m4k4_inkset[] = {
+ {'C',1.0,&canon_2b_4l_ink},
+ {'M',1.0,&canon_2b_4l_ink},
+ {'Y',1.0,&canon_2b_4l_ink},
+ {'K',1.0,&canon_1b_2l_ink},
+ {'c',0.5,&canon_2b_4l_ink},
+ {'m',0.5,&canon_2b_4l_ink},
+ {0,0.0,NULL},
+ {'k',0.5,&canon_2b_4l_ink},
+ {0,0.0,NULL}
+};
+
+static const canon_inkset_t canon_9_C8M8Y8c16m16k8_inkset[] = {
+ {'C',1.0,&canon_4b_8l_ink},
+ {'M',1.0,&canon_4b_8l_ink},
+ {'Y',1.0,&canon_4b_8l_ink},
+ {0,0.0,NULL},
+ {'c',0.5,&canon_4b_16l_ink},
+ {'m',0.5,&canon_4b_16l_ink},
+ {0,0.0,NULL},
+ {'k',1.0,&canon_4b_8l_ink},
+ {0,0.0,NULL}
+};
+
+static const canon_inkset_t canon_13_C3M3Y2K2_inkset[] = {
+ {'C',1.0,&canon_2b_3l_ink},
+ {'M',1.0,&canon_2b_3l_ink},
+ {'Y',1.0,&canon_1b_2l_ink},
+ {'K',1.0,&canon_1b_2l_ink},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+};
+
+static const canon_inkset_t canon_19_C3M3Y3k3_inkset[] = {
+ {'C',1.0,&canon_2b_3l_ink},
+ {'M',1.0,&canon_2b_3l_ink},
+ {'Y',1.0,&canon_2b_3l_ink},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {'k',1.0,&canon_2b_3l_ink},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+};
+
+static const canon_inkset_t canon_22_C3M3Y2K2k3_c_inkset[] = {
+ {'C',1.0,&canon_2b_3l_c_ink},
+ {'M',1.0,&canon_2b_3l_c_ink},
+ {'Y',1.0,&canon_1b_2l_ink},
+ {'K',1.0,&canon_1b_2l_ink},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {'k',0.0,&canon_2b_3l_c_ink}, /* even though we won't use the photo black in this mode its parameters have to be set */
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+};
+
+static const canon_inkset_t canon_22_C4M4Y4K2c4m4k4_inkset[] = {
+ {'C',1.0,&canon_2b_4l_ink},
+ {'M',1.0,&canon_2b_4l_ink},
+ {'Y',1.0,&canon_2b_4l_ink},
+ {'K',1.0,&canon_1b_2l_ink},
+ {'c',0.5,&canon_2b_4l_ink},
+ {'m',0.5,&canon_2b_4l_ink},
+ {0,0.0,NULL},
+ {'k',0.0,&canon_2b_4l_ink}, /* even though we won't use the photo black in this mode its parameters have to be set */
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0xa3,0.0,&canon_2b_4l_ink},
+ {0xad,0.0,&canon_2b_4l_ink},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+ {0,0.0,NULL},
+};
+
+#endif
+
diff --git a/src/main/canon-media.h b/src/main/canon-media.h
new file mode 100644
index 0000000..d6ed971
--- /dev/null
+++ b/src/main/canon-media.h
@@ -0,0 +1,146 @@
+/*
+ * Print plug-in CANON BJL driver for the GIMP.
+ *
+ * Copyright 1997-2000 Michael Sweet (mike@easysw.com),
+ * Robert Krawitz (rlk@alum.mit.edu) and
+ * Andy Thaller (thaller@ph.tum.de)
+ * Copyright (c) 2006 Sascha Sommer (saschasommer@freenet.de)
+ *
+ * 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.
+ */
+
+/* This file contains the definitions for the possible Media Types
+ TODO: Color Correction and Density adjustment
+*/
+
+#ifndef GUTENPRINT_INTERNAL_CANON_MEDIA_H
+#define GUTENPRINT_INTERNAL_CANON_MEDIA_H
+
+/* media related structs */
+
+
+/* media slots */
+
+typedef struct {
+ const char* name;
+ const char* text;
+ unsigned char code;
+} canon_slot_t;
+
+typedef struct {
+ const char *name;
+ short count;
+ const canon_slot_t *slots;
+} canon_slotlist_t;
+
+#define DECLARE_SLOTS(name) \
+static const canon_slotlist_t name##_slotlist = { \
+ #name, \
+ sizeof(name##_slots) / sizeof(canon_slot_t), \
+ name##_slots \
+}
+
+
+static const canon_slot_t canon_default_slots[] = {
+ { "Auto", N_ ("Auto Sheet Feeder"), 4 },
+ { "Manual", N_ ("Manual with Pause"), 0 },
+ { "ManualNP", N_ ("Manual without Pause"), 1 },
+ { "Cassette", N_ ("Cassette"), 8 },
+ { "CD", N_ ("CD tray"), 10 },
+};
+DECLARE_SLOTS(canon_default);
+
+
+static const canon_slot_t canon_PIXMA_iP4000_slots[] = {
+ { "SelectKey", N_ ("Selected by Paper Select Key"), 3 },
+ { "Auto", N_ ("Auto Sheet Feeder"), 4 },
+ { "Cassette", N_ ("Cassette"), 0x8 },
+ { "CD", N_ ("CD tray"), 10 },
+ { "AutoSwitch", N_ ("Automatic Paper Source Switching"), 15 },
+};
+DECLARE_SLOTS(canon_PIXMA_iP4000);
+
+/* media types */
+
+typedef struct {
+ const char *name; /* Internal Name may not contain spaces */
+ const char *text; /* Translateable name */
+ unsigned char media_code_c; /* Media Code used for the ESC (c (SetColor) command */
+ unsigned char media_code_l; /* Media Code used for the ESC (l (SetTray) command */
+ unsigned int qualities;
+#define Q0 0 /* lowest quality */
+#define Q1 1
+#define Q2 2
+#define Q3 4
+#define Q4 8 /* highest quality */
+ double base_density;
+ double k_lower_scale;
+ double k_upper;
+ const char *hue_adjustment;
+ const char *lum_adjustment;
+ const char *sat_adjustment;
+} canon_paper_t;
+
+typedef struct {
+ const char *name;
+ short count;
+ const canon_paper_t *papers;
+} canon_paperlist_t;
+
+#define DECLARE_PAPERS(name) \
+static const canon_paperlist_t name##_paperlist = { \
+ #name, \
+ sizeof(name##_papers) / sizeof(canon_paper_t), \
+ name##_papers \
+}
+
+
+/* paperlists for the various printers. The first entry will be the default */
+
+static const canon_paper_t canon_default_papers[] = {
+ { "Plain", N_ ("Plain Paper"), 0x00, 0x00,Q2,0.50, 0.25, 0.500, 0, 0, 0 },
+ { "Transparency", N_ ("Transparencies"), 0x02, 0x02,Q2,1.00, 1.00, 0.900, 0, 0, 0 },
+ { "BackPrint", N_ ("Back Print Film"), 0x03, 0x03,Q2,1.00, 1.00, 0.900, 0, 0, 0 },
+ { "Fabric", N_ ("Fabric Sheets"), 0x04, 0x04,Q2,0.50, 0.25, 0.500, 0, 0, 0 },
+ { "Envelope", N_ ("Envelope"), 0x08, 0x08,Q2,0.50, 0.25, 0.500, 0, 0, 0 },
+ { "Coated", N_ ("High Resolution Paper"), 0x07, 0x07,Q2,0.78, 0.25, 0.500, 0, 0, 0 },
+ { "TShirt", N_ ("T-Shirt Transfers"), 0x03, 0x03,Q2,0.50, 0.25, 0.500, 0, 0, 0 },
+ { "GlossyFilm", N_ ("High Gloss Film"), 0x06, 0x06,Q2,1.00, 1.00, 0.999, 0, 0, 0 },
+ { "GlossyPaper", N_ ("Glossy Photo Paper"), 0x05, 0x05,Q2,1.00, 1.00, 0.999, 0, 0, 0 },
+ { "GlossyCard", N_ ("Glossy Photo Cards"), 0x0a, 0x0a,Q2,1.00, 1.00, 0.999, 0, 0, 0 },
+ { "GlossyPro", N_ ("Photo Paper Pro"), 0x09, 0x09,Q2,1.00, 1.00, 0.999, 0, 0, 0 },
+ { "Other", N_ ("Other"), 0x00, 0x00,Q2,0.50, 0.25, .5, 0, 0, 0 },
+};
+DECLARE_PAPERS(canon_default);
+
+static const canon_paper_t canon_PIXMA_iP4000_papers[] = {
+ { "Plain", N_ ("Plain Paper"), 0x00,0x00,Q0|Q1|Q2|Q3,1.00, 0.25, 0.500, 0, 0, 0 },
+ { "Transparency", N_ ("Transparencies"), 0x02,0x02,Q2|Q3,0.78, 0.25, 0.500, 0, 0, 0 },
+ { "TShirt", N_ ("T-Shirt Transfers"), 0x03,0x03,Q2,0.78, 0.25, 0.500, 0, 0, 0 },
+ { "GlossyPaper", N_ ("Glossy Photo Paper"), 0x05,0x05,Q2|Q3,0.78, 0.25, 0.500, 0, 0, 0 },
+ { "Coated", N_ ("High Resolution Paper"), 0x07,0x07,Q2|Q3,0.78, 0.25, 0.500, 0, 0, 0 },
+ { "Envelope", N_ ("Envelope"), 0x08,0x08,Q2|Q3,0.78, 0.25, 0.500, 0, 0, 0 },
+ { "PhotopaperPro", N_ ("Professional Photo Paper"), 0x09,0x0d,Q2|Q3|Q4,0.78, 0.25, 0.500, 0, 0, 0 },
+ { "PhotopaperMatte", N_ ("Photo Paper Matte"), 0x0a,0x10,Q2|Q3,0.78, 0.25, 0.500, 0, 0, 0 },
+ { "PhotopaperPlus", N_ ("Glossy Photo Paper Plus"), 0x0b,0x11,Q1|Q2|Q3,0.78, 0.25, 0.500, 0, 0, 0 },
+ { "CD", N_ ("CD"), 0x00,0x12,Q2|Q3|Q4,0.78, 0.25, 0.500, 0, 0, 0 },
+ /* FIXME media code for c) should be 0x0c for CD but this will restrict CD printing to a single, not well supported, resolution */
+ { "PhotopaperOther", N_ ("Other Photo Paper"), 0x0f,0x14,Q2,0.78, 0.25, 0.500, 0, 0, 0 },
+ { "PhotopaperPlusDouble", N_ ("Photoper Plus Double-Sided"), 0x10,0x15,Q2|Q3,0.78, 0.25, 0.500, 0, 0, 0 },
+};
+DECLARE_PAPERS(canon_PIXMA_iP4000);
+
+#endif
+
diff --git a/src/main/canon-modes.h b/src/main/canon-modes.h
new file mode 100644
index 0000000..42e7f8b
--- /dev/null
+++ b/src/main/canon-modes.h
@@ -0,0 +1,285 @@
+/*
+ * Print plug-in CANON BJL driver for the GIMP.
+ *
+ * Copyright 1997-2000 Michael Sweet (mike@easysw.com),
+ * Robert Krawitz (rlk@alum.mit.edu) and
+ * Andy Thaller (thaller@ph.tum.de)
+ * Copyright (c) 2006 - 2007 Sascha Sommer (saschasommer@freenet.de)
+ *
+ * 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.
+ */
+
+/* This file contains definitions for the various printmodes
+*/
+
+#ifndef GUTENPRINT_INTERNAL_CANON_MODES_H
+#define GUTENPRINT_INTERNAL_CANON_MODES_H
+
+/* delay settings
+ sometimes the raster data has to be sent
+ | K |
+ | C |
+ | M |
+ | Y |
+ instead of
+ | K
+ | C
+ | M
+ | Y
+
+ following tables can be used to account for this
+
+*/
+
+typedef struct {
+ unsigned char color;
+ unsigned int delay;
+} canon_delay_t;
+
+/* delay settings for the different printmodes last entry has to be {0,0} */
+static const canon_delay_t delay_1440[] = {{'C',112},{'M',224},{'Y',336},{'c',112},{'m',224},{'y',336},{0,0}};
+static const canon_delay_t delay_S200[] = {{'C',0x30},{'M',0x50},{'Y',0x70},{0,0}};
+
+
+
+/*
+ * A printmode is defined by its resolution (xdpi x ydpi), the inkset
+ * and the installed printhead.
+ *
+ * For a hereby defined printmode we specify the density and gamma multipliers
+ * and the ink definition with optional adjustments for lum, hue and sat
+ *
+ */
+typedef struct {
+ const int xdpi; /* horizontal resolution */
+ const int ydpi; /* vertical resolution */
+ const unsigned int ink_types; /* the used color channels */
+ const char* name; /* internal name do not translate, must not contain spaces */
+ const char* text; /* description */
+ const int num_inks;
+ const canon_inkset_t *inks; /* ink definition */
+ const unsigned int flags;
+#define MODE_FLAG_WEAVE 0x1 /* this mode requires weaving */
+#define MODE_FLAG_EXTENDED_T 0x2 /* this mode requires extended color settings in the esc t) command */
+#define MODE_FLAG_CD 0x4 /* this mode can be used to print to cds */
+ const canon_delay_t* delay; /* delay settings for this printmode */
+ const double density; /* density multiplier */
+ const double gamma; /* gamma multiplier */
+ const char *lum_adjustment; /* optional lum adj. */
+ const char *hue_adjustment; /* optional hue adj. */
+ const char *sat_adjustment; /* optional sat adj. */
+} canon_mode_t;
+
+#define INKSET(a) sizeof(canon_##a##_inkset)/sizeof(canon_inkset_t),canon_##a##_inkset
+
+
+typedef struct {
+ const char *name;
+ const short count;
+ const short default_mode;
+ const canon_mode_t *modes;
+} canon_modelist_t;
+
+#define DECLARE_MODES(name,default_mode) \
+static const canon_modelist_t name##_modelist = { \
+ #name, \
+ sizeof(name##_modes) / sizeof(canon_mode_t), \
+ default_mode, \
+ name##_modes \
+}
+
+
+/* modelist for every printer,modes ordered by ascending resolution ink_type and quality */
+static const canon_mode_t canon_BJC_30_modes[] = {
+ { 180, 180,CANON_INK_K,"180x180dpi",N_("180x180 DPI"),INKSET(1_K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 360, 360,CANON_INK_K,"360x360dpi",N_("360x360 DPI"),INKSET(1_K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 720, 360,CANON_INK_K,"720x360dpi",N_("720x360 DPI"),INKSET(1_K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_30,0);
+
+
+static const canon_mode_t canon_BJC_85_modes[] = {
+ { 360, 360,CANON_INK_K | CANON_INK_CMYK | CANON_INK_CcMmYK,
+ "360x360dpi",N_("360x360 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 360, 360,CANON_INK_K | CANON_INK_CMYK | CANON_INK_CcMmYK,
+ "360x360dmt",N_("360x360 DPI DMT"),INKSET(6_C4M4Y4K4c4m4),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 720, 360,CANON_INK_K | CANON_INK_CMYK | CANON_INK_CcMmYK,
+ "720x360dpi",N_("720x360 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_85,0);
+
+
+/* we treat the printers that can either print in K or CMY as CMYK printers here by assigning a CMYK inkset */
+static const canon_mode_t canon_BJC_210_modes[] = {
+ { 90, 90,CANON_INK_K | CANON_INK_CMY,"90x90dpi",N_("90x90 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 180, 180,CANON_INK_K | CANON_INK_CMY,"180x180dpi",N_("180x180 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 360, 360,CANON_INK_K | CANON_INK_CMY,"360x360dpi",N_("360x360 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 720, 360,CANON_INK_K | CANON_INK_CMY,"720x360dpi",N_("720x360 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_210,0);
+
+
+static const canon_mode_t canon_BJC_240_modes[] = {
+ { 90, 90,CANON_INK_K | CANON_INK_CMY,"90x90dpi",N_("90x90 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 180, 180,CANON_INK_K | CANON_INK_CMY,"180x180dpi",N_("180x180 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 360, 360,CANON_INK_K | CANON_INK_CMY,"360x360dpi",N_("360x360 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 360, 360,CANON_INK_K | CANON_INK_CMY,"360x360dmt",N_("360x360 DMT"),INKSET(4_C4M4Y4K4),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 720, 360,CANON_INK_K | CANON_INK_CMY,"720x360dpi",N_("720x360 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_240,0);
+
+
+static const canon_mode_t canon_BJC_2000_modes[] = {
+ { 180, 180,CANON_INK_CMYK,"180x180dpi",N_("180x180 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 360, 360,CANON_INK_CMYK,"360x360dpi",N_("360x360 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_2000,0);
+
+
+static const canon_mode_t canon_BJC_3000_modes[] = {
+ { 360, 360,CANON_INK_CMYK | CANON_INK_CcMmYK,"360x360dpi",N_("360x360 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 360, 360,CANON_INK_CMYK | CANON_INK_CcMmYK,"360x360dmt",N_("360x360 DPI DMT"),INKSET(6_C4M4Y4K4c4m4),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 720, 720,CANON_INK_CMYK | CANON_INK_CcMmYK,"720x720dpi",N_("720x720 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 1440, 720,CANON_INK_CMYK | CANON_INK_CcMmYK,"1440x720dpi",N_("1440x720 DPI"),INKSET(6_C2M2Y2K2c2m2),0,delay_1440,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_3000,0);
+
+
+static const canon_mode_t canon_BJC_4300_modes[] = {
+ { 360, 360,CANON_INK_CMYK | CANON_INK_CcMmYK,"360x360dpi",N_("360x360 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 360, 360,CANON_INK_CMYK | CANON_INK_CcMmYK,"360x360dmt",N_("360x360 DPI DMT"),INKSET(6_C4M4Y4K4c4m4),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 720, 720,CANON_INK_CMYK | CANON_INK_CcMmYK,"720x720dpi",N_("720x720 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 1440, 720,CANON_INK_CMYK | CANON_INK_CcMmYK,"1440x720dpi",N_("1440x720 DPI"),INKSET(6_C2M2Y2K2c2m2),0,delay_1440,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_4300,0);
+
+
+
+static const canon_mode_t canon_BJC_4400_modes[] = {
+ { 360, 360,CANON_INK_K | CANON_INK_CMYK | CANON_INK_CcMmYK,
+ "360x360dpi",N_("360x360 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 720, 360,CANON_INK_K | CANON_INK_CMYK | CANON_INK_CcMmYK,
+ "720x360dpi",N_("720x360 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_4400,0);
+
+
+static const canon_mode_t canon_BJC_5500_modes[] = {
+ { 180, 180,CANON_INK_CMYK | CANON_INK_CcMmYK,"180x180dpi",N_("180x180 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 360, 360,CANON_INK_CMYK | CANON_INK_CcMmYK,"360x360dpi",N_("360x360 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_5500,0);
+
+
+static const canon_mode_t canon_BJC_6000_modes[] = {
+ { 360, 360,CANON_INK_CMYK | CANON_INK_CcMmYK,"360x360dpi",N_("360x360 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.8,1.0,NULL,NULL,NULL},
+ { 360, 360,CANON_INK_CMYK | CANON_INK_CcMmYK,"360x360dmt",N_("360x360 DPI DMT"),INKSET(6_C4M4Y4K4c4m4),0,NULL,1.8,1.0,NULL,NULL,NULL},
+ { 720, 720,CANON_INK_CMYK | CANON_INK_CcMmYK,"720x720dpi",N_("720x720 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 1440, 720,CANON_INK_CMYK | CANON_INK_CcMmYK,"1440x720dpi",N_("1440x720 DPI"),INKSET(6_C2M2Y2K2c2m2),0,delay_1440,0.5,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_6000,0);
+
+
+static const canon_mode_t canon_BJC_7000_modes[] = {
+ { 300, 300,CANON_INK_CMYK | CANON_INK_CcMmYyK,"300x300dpi",N_("300x300 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,3.5,1.0,NULL,NULL,NULL},
+ { 600, 600,CANON_INK_CMYK | CANON_INK_CcMmYyK,"600x600dpi",N_("600x600 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.8,1.0,NULL,NULL,NULL},
+ { 1200, 600,CANON_INK_CMYK | CANON_INK_CcMmYyK,"1200x600dpi",N_("1200x600 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_7000,0);
+
+
+static const canon_mode_t canon_BJC_7100_modes[] = {
+ { 300, 300,CANON_INK_CMYK | CANON_INK_CcMmYyK,"300x300dpi",N_("300x300 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 600, 600,CANON_INK_CMYK | CANON_INK_CcMmYyK,"600x600dpi",N_("600x600 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 1200, 600,CANON_INK_CMYK | CANON_INK_CcMmYyK,"1200x600dpi",N_("1200x600 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_7100,0);
+
+static const canon_mode_t canon_BJC_8200_modes[] = {
+ { 300, 300,CANON_INK_CMYK,"300x300dpi",N_("300x300 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 600, 600,CANON_INK_CMYK,"600x600dpi",N_("600x600 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 1200,1200,CANON_INK_CMYK,"1200x1200dpi",N_("1200x1200 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_8200,0);
+
+
+static const canon_mode_t canon_BJC_8500_modes[] = {
+ { 300, 300,CANON_INK_CMYK | CANON_INK_CcMmYK,"300x300dpi",N_("300x300 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 600, 600,CANON_INK_CMYK | CANON_INK_CcMmYK,"600x600dpi",N_("600x600 DPI"),INKSET(6_C2M2Y2K2c2m2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_BJC_8500,0);
+
+
+static const canon_mode_t canon_S200_modes[] = {
+ { 360, 360,CANON_INK_CMYK | CANON_INK_CMY | CANON_INK_K,
+ "360x360dpi",N_("360x360 DPI"),INKSET(4_C2M2Y2K2),0,delay_S200,2.0,1.0,NULL,NULL,NULL},
+ { 720, 720,CANON_INK_CMYK | CANON_INK_CMY | CANON_INK_K,
+ "720x720dpi",N_("720x720 DPI"),INKSET(4_C2M2Y2K2),MODE_FLAG_WEAVE,delay_S200,1.0,1.0,NULL,NULL,NULL},
+ { 1440, 720,CANON_INK_CMYK | CANON_INK_CMY | CANON_INK_K,
+ "1440x720dpi",N_("1440x720 DPI"),INKSET(4_C2M2Y2K2),MODE_FLAG_WEAVE,delay_S200,0.5,1.0,NULL,NULL,NULL},
+ { 1440,1440,CANON_INK_CMYK | CANON_INK_CMY | CANON_INK_K,
+ "1440x1440dpi",N_("1440x1440 DPI"),INKSET(4_C2M2Y2K2),MODE_FLAG_WEAVE,delay_S200,0.3,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_S200,0);
+
+
+static const canon_mode_t canon_PIXMA_iP2000_modes[] = {
+ { 600, 600,CANON_INK_CMYK,"600x600dpi",N_("600x600 DPI"),INKSET(9_C3M3Y2K2),MODE_FLAG_EXTENDED_T,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_PIXMA_iP2000,0);
+
+
+static const canon_mode_t canon_PIXMA_iP3000_modes[] = {
+ { 600, 600,CANON_INK_CMYK,"600x600dpi",N_("600x600 DPI"),INKSET(9_C3M3Y2K2_c),MODE_FLAG_EXTENDED_T,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_PIXMA_iP3000,0);
+
+
+static const canon_mode_t canon_PIXMA_iP4000_modes[] = {
+ { 300, 300,CANON_INK_CMYK,"300x300dpi",N_("300x300 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 600, 600,CANON_INK_CMYK,"600x600dpi_draft",N_("600x600 DPI DRAFT"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+ { 600, 600,CANON_INK_CMYK,"600x600dpi",N_("600x600 DPI"),INKSET(9_C3M3Y2K2k3_c),MODE_FLAG_EXTENDED_T,NULL,1.0,1.0,NULL,NULL,NULL},
+/* { 600, 600,CANON_INK_CcMmYyK,"600x600dpi_high",N_("600x600 DPI HIGH"),INKSET(9_C4M4Y4K2c4m4k4),MODE_FLAG_EXTENDED_T|MODE_FLAG_CD,NULL,1.0,1.0,NULL,NULL,NULL},*/ /* this mode is used for CD printing, K is ignored by the printer then, the seperation between the small and large dot inks needs more work */
+/* { 600, 600,CANON_INK_CcMmYyK,"600x600dpi_superphoto",N_("600x600 DPI Superphoto"),INKSET(9_C8M8Y8c16m16k8),MODE_FLAG_EXTENDED_T,NULL,1.0,1.0,NULL,NULL,NULL}, */
+};
+DECLARE_MODES(canon_PIXMA_iP4000,2);
+
+
+static const canon_mode_t canon_PIXMA_iP4200_modes[] = {
+ { 600, 600,CANON_INK_CMYK,"600x600dpi",N_("600x600 DPI"),INKSET(22_C3M3Y2K2k3_c),MODE_FLAG_EXTENDED_T,NULL,1.0,1.0,NULL,NULL,NULL},
+ /* { 600, 600,CANON_INK_CcMmYyK,"600x600dpi_high",N_("600x600 DPI HIGH"),INKSET(22_C4M4Y4K2c4m4k4),MODE_FLAG_EXTENDED_T|MODE_FLAG_CD,NULL,1.0,1.0,NULL,NULL,NULL}, */
+};
+DECLARE_MODES(canon_PIXMA_iP4200,0);
+
+
+static const canon_mode_t canon_PIXMA_iP6700_modes[] = {
+ { 600, 600,CANON_INK_CMYK,"600x600dpi",N_("600x600 DPI"),INKSET(19_C3M3Y3k3),MODE_FLAG_EXTENDED_T,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_PIXMA_iP6700,0);
+
+
+static const canon_mode_t canon_MULTIPASS_MP150_modes[] = {
+ { 600, 600,CANON_INK_CMYK,"600x600dpi",N_("600x600 DPI"),INKSET(13_C3M3Y2K2),MODE_FLAG_EXTENDED_T,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_MULTIPASS_MP150,0);
+
+
+static const canon_mode_t canon_MULTIPASS_MP830_modes[] = {
+ { 600, 600,CANON_INK_CMYK,"600x600dpi",N_("600x600 DPI"),INKSET(4_C2M2Y2K2),0,NULL,1.0,1.0,NULL,NULL,NULL},
+};
+DECLARE_MODES(canon_MULTIPASS_MP830,0);
+
+#endif
+
diff --git a/src/main/canon-printers.h b/src/main/canon-printers.h
new file mode 100644
index 0000000..82a0536
--- /dev/null
+++ b/src/main/canon-printers.h
@@ -0,0 +1,519 @@
+/*
+ * Print plug-in CANON BJL driver for the GIMP.
+ *
+ * Copyright 1997-2000 Michael Sweet (mike@easysw.com),
+ * Robert Krawitz (rlk@alum.mit.edu) and
+ * Andy Thaller (thaller@ph.tum.de)
+ * Copyright (c) 2006 Sascha Sommer (saschasommer@freenet.de)
+ *
+ * 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.
+ */
+
+/* This file contains the capabilities of the various canon printers
+*/
+
+#ifndef GUTENPRINT_INTERNAL_CANON_PRINTERS_H
+#define GUTENPRINT_INTERNAL_CANON_PRINTERS_H
+
+
+typedef struct canon_caps {
+ int model; /* model number as used in printers.xml */
+ int model_id; /* model ID code for use in commands */
+ int max_width; /* maximum printable paper size */
+ int max_height;
+ int border_left; /* left margin, points */
+ int border_right; /* right margin, points */
+ int border_top; /* absolute top margin, points */
+ int border_bottom; /* absolute bottom margin, points */
+ const canon_slotlist_t* slotlist; /*available paperslots */
+ unsigned long features; /* special bjl settings */
+ unsigned char ESC_r_arg; /* argument used for the ESC (r command during init */
+ const char** control_cmdlist;
+ const canon_modelist_t* modelist;
+ const canon_paperlist_t* paperlist;
+ const char *lum_adjustment;
+ const char *hue_adjustment;
+ const char *sat_adjustment;
+} canon_cap_t;
+
+static const char standard_sat_adjustment[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
+/* C */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* B */
+/* B */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* M */
+/* M */ "1.00 0.95 0.90 0.90 0.90 0.90 0.90 0.90 " /* R */
+/* R */ "0.90 0.95 0.95 1.00 1.00 1.00 1.00 1.00 " /* Y */
+/* Y */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* G */
+/* G */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+static const char standard_lum_adjustment[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
+/* C */ "0.65 0.67 0.70 0.72 0.77 0.80 0.82 0.85 " /* B */
+/* B */ "0.87 0.86 0.82 0.79 0.79 0.82 0.85 0.88 " /* M */
+/* M */ "0.92 0.95 0.96 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.97 0.95 0.94 0.93 0.92 0.90 0.86 " /* G */
+/* G */ "0.79 0.76 0.71 0.68 0.68 0.68 0.68 0.66 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+static const char standard_hue_adjustment[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"-6\" upper-bound=\"6\">\n"
+/* C */ "0.00 0.06 0.10 0.10 0.06 -.01 -.09 -.17 " /* B */
+/* B */ "-.25 -.33 -.38 -.38 -.36 -.34 -.34 -.34 " /* M */
+/* M */ "-.34 -.34 -.36 -.40 -.50 -.40 -.30 -.20 " /* R */
+/* R */ "-.12 -.07 -.04 -.02 0.00 0.00 0.00 0.00 " /* Y */
+/* Y */ "0.00 0.00 0.00 -.05 -.10 -.15 -.22 -.24 " /* G */
+/* G */ "-.26 -.30 -.33 -.28 -.25 -.20 -.13 -.06 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+static const char* control_cmd_ackshort[] = {
+ "AckTime=Short",
+ NULL
+};
+
+static const char* control_cmd_PIXMA_iP4000[] = {
+/*"SetTime=20060722092503", */ /*what is this for?*/
+ "SetSilent=OFF",
+ "PEdgeDetection=ON",
+ "SelectParallel=ECP",
+ NULL
+};
+
+
+static const char* control_cmd_MULTIPASS_MP150[] = {
+ "AckTime=Short",
+ "MediaDetection=ON",
+ NULL
+};
+
+static const canon_cap_t canon_model_capabilities[] =
+{
+ /* ******************************** */
+ /* */
+ /* tested and color-adjusted models */
+ /* */
+ /* ******************************** */
+
+
+
+
+ /* ************************************ */
+ /* */
+ /* tested models w/out color-adjustment */
+ /* */
+ /* ************************************ */
+
+ { /* Canon S200x *//* heads: BC-24 */
+ 4202, 3,
+ 618, 936, /* 8.58" x 13 " */
+ 10, 10, 9, 20,
+ &canon_default_slotlist,
+ CANON_CAP_STD1 | CANON_CAP_rr,0x61,NULL,
+ &canon_S200_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+
+ { /* Canon BJC S300 */
+ 8201, 3,
+ 842, 17*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD1 | CANON_CAP_r,0x61,control_cmd_ackshort,
+ &canon_BJC_8500_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+
+ { /* Canon BJ 30 *//* heads: BC-10 */
+ 30, 1,
+ 9.5*72, 14*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0 | CANON_CAP_a,0,NULL,
+ &canon_BJC_30_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 85 *//* heads: BC-20 BC-21 BC-22 */
+ 85, 1,
+ 9.5*72, 14*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0 | CANON_CAP_a,0,NULL,
+ &canon_BJC_85_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+
+ { /* Canon BJC 4300 *//* heads: BC-20 BC-21 BC-22 BC-29 */
+ 4300, 1,
+ 618, 936, /* 8.58" x 13 " */
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0,0,NULL,
+ &canon_BJC_4300_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+
+ { /* Canon BJC 4400 *//* heads: BC-20 BC-21 BC-22 BC-29 */
+ 4400, 1,
+ 9.5*72, 14*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0 | CANON_CAP_a,0,NULL,
+ &canon_BJC_4400_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+
+ { /* Canon BJC 6000 *//* heads: BC-30/BC-31 BC-32/BC-31 */
+ 6000, 3,
+ 618, 936, /* 8.58" x 13 " */
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD1,0,control_cmd_ackshort,
+ &canon_BJC_6000_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+
+ { /* Canon BJC 6200 *//* heads: BC-30/BC-31 BC-32/BC-31 */
+ 6200, 3,
+ 618, 936, /* 8.58" x 13 " */
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD1,0,control_cmd_ackshort,
+ &canon_BJC_6000_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+
+ { /* Canon BJC 6500 *//* heads: BC-30/BC-31 BC-32/BC-31 */
+ 6500, 3,
+ 842, 17*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD1,0,NULL,
+ &canon_BJC_6000_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 8200 *//* heads: BC-50 */
+ 8200, 3,
+ 842, 17*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD1 | CANON_CAP_r,0x61,control_cmd_ackshort,
+ &canon_BJC_8200_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+
+
+ /* *************** */
+ /* */
+ /* untested models */
+ /* */
+ /* *************** */
+
+ { /* Canon BJC 210 *//* heads: BC-02 BC-05 BC-06 */
+ 210, 1,
+ 618, 936, /* 8.58" x 13 " */
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0,0,NULL,
+ &canon_BJC_210_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 240 *//* heads: BC-02 BC-05 BC-06 */
+ 240, 1,
+ 618, 936, /* 8.58" x 13 " */
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0,0,NULL,
+ &canon_BJC_240_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 250 *//* heads: BC-02 BC-05 BC-06 */
+ 250, 1,
+ 618, 936, /* 8.58" x 13 " */
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0,0,NULL,
+ &canon_BJC_240_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 1000 *//* heads: BC-02 BC-05 BC-06 */
+ 1000, 1,
+ 842, 17*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0 | CANON_CAP_a,0,NULL,
+ &canon_BJC_240_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 2000 *//* heads: BC-20 BC-21 BC-22 BC-29 */
+ 2000, 1,
+ 842, 17*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0 | CANON_CAP_a,0,NULL,
+ &canon_BJC_2000_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 3000 *//* heads: BC-30 BC-33 BC-34 */
+ 3000, 3,
+ 842, 17*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0 | CANON_CAP_a,0,NULL, /*FIX? should have _r? */
+ &canon_BJC_3000_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 6100 *//* heads: BC-30/BC-31 BC-32/BC-31 */
+ 6100, 3,
+ 842, 17*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD1 | CANON_CAP_a | CANON_CAP_r,0x61,NULL,
+ &canon_BJC_3000_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 7000 *//* heads: BC-60/BC-61 BC-60/BC-62 ??????? */
+ 7000, 3,
+ 842, 17*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD1,0,NULL,
+ &canon_BJC_7000_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 7100 *//* heads: BC-60/BC-61 BC-60/BC-62 ??????? */
+ 7100, 3,
+ 842, 17*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0,0,NULL,
+ &canon_BJC_7100_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+
+ /*****************************/
+ /* */
+ /* extremely fuzzy models */
+ /* (might never work at all) */
+ /* */
+ /*****************************/
+
+ { /* Canon BJC 5100 *//* heads: BC-20 BC-21 BC-22 BC-23 BC-29 */
+ 5100, 1,
+ 17*72, 22*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0,0,NULL,
+ &canon_BJC_3000_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 5500 *//* heads: BC-20 BC-21 BC-29 */
+ 5500, 1,
+ 22*72, 34*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0 | CANON_CAP_a,0,NULL,
+ &canon_BJC_5500_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 6500 *//* heads: BC-30/BC-31 BC-32/BC-31 */
+ 6500, 3,
+ 17*72, 22*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD1 | CANON_CAP_a,0,NULL,
+ &canon_BJC_3000_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon BJC 8500 *//* heads: BC-80/BC-81 BC-82/BC-81 */
+ 8500, 3,
+ 17*72, 22*72,
+ 11, 9, 10, 18,
+ &canon_default_slotlist,
+ CANON_CAP_STD0,0,NULL,
+ &canon_BJC_8500_modelist,
+ &canon_default_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon PIXMA iP2000 */
+ 9001, 3, /*model, model_id*/
+ 842, 17*72, /* max paper width and height */
+ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
+ &canon_PIXMA_iP4000_slotlist,
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x61,control_cmd_PIXMA_iP4000, /*features */
+ &canon_PIXMA_iP2000_modelist,
+ &canon_PIXMA_iP4000_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon PIXMA iP3000 */
+ 3999, 3, /*model, model_id*/
+ 842, 17*72, /* max paper width and height */
+ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
+ &canon_PIXMA_iP4000_slotlist,
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x61,control_cmd_PIXMA_iP4000, /*features */
+ &canon_PIXMA_iP3000_modelist,
+ &canon_PIXMA_iP4000_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon PIXMA iP4000 */
+ 4000, 3, /*model, model_id*/
+ 842, 17*72, /* max paper width and height */
+ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
+ &canon_PIXMA_iP4000_slotlist,
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px /*,|CANON_CAP_I*/,0x64,control_cmd_PIXMA_iP4000, /*features */
+ &canon_PIXMA_iP4000_modelist,
+ &canon_PIXMA_iP4000_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon PIXMA iP4200 */
+ 4200, 3, /*model, model_id*/
+ 842, 17*72, /* max paper width and height */
+ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
+ &canon_PIXMA_iP4000_slotlist,
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x64,control_cmd_PIXMA_iP4000, /*features */
+ &canon_PIXMA_iP4200_modelist,
+ &canon_PIXMA_iP4000_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon PIXMA iP6700 */
+ 4203, 3, /*model, model_id*/
+ 842, 17*72, /* max paper width and height */
+ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
+ &canon_PIXMA_iP4000_slotlist,
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x64,control_cmd_PIXMA_iP4000, /*features */
+ &canon_PIXMA_iP6700_modelist,
+ &canon_PIXMA_iP4000_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon MULTIPASS MP150 */
+ 4201, 3, /*model, model_id*/
+ 842, 17*72, /* max paper width and height */
+ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
+ &canon_PIXMA_iP4000_slotlist,
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x61,control_cmd_MULTIPASS_MP150, /*features */
+ &canon_MULTIPASS_MP150_modelist,
+ &canon_PIXMA_iP4000_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+ { /* Canon MULTIPASS MP830 */
+ 9000, 3, /*model, model_id*/
+ 842, 17*72, /* max paper width and height */
+ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */
+ &canon_PIXMA_iP4000_slotlist,
+ CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_px,0,control_cmd_MULTIPASS_MP150, /*features */
+ &canon_MULTIPASS_MP830_modelist,
+ &canon_PIXMA_iP4000_paperlist,
+ NULL,
+ NULL,
+ NULL
+ },
+};
+
+#endif
+
diff --git a/src/main/curve.c b/src/main/curve.c
index 03c2ede..3820dea 100644
--- a/src/main/curve.c
+++ b/src/main/curve.c
@@ -1,5 +1,5 @@
/*
- * "$Id: curve.c,v 1.51 2005/04/10 22:57:40 rlk Exp $"
+ * "$Id: curve.c,v 1.52 2006/09/12 19:03:32 easysw Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -538,7 +538,7 @@ int
stp_curve_set_gamma(stp_curve_t *curve, double fgamma)
{
check_curve(curve);
- if (curve->wrap_mode || ! finite(fgamma) || fgamma == 0.0)
+ if (curve->wrap_mode || ! isfinite(fgamma) || fgamma == 0.0)
return 0;
clear_curve_data(curve);
curve->gamma = fgamma;
@@ -570,7 +570,7 @@ stp_curve_set_data(stp_curve_t *curve, size_t count, const double *data)
/* Validate the data before we commit to it. */
stp_sequence_get_bounds(curve->seq, &low, &high);
for (i = 0; i < count; i++)
- if (! finite(data[i]) || data[i] < low || data[i] > high)
+ if (! isfinite(data[i]) || data[i] < low || data[i] > high)
{
stp_deprintf(STP_DBG_CURVE_ERRORS,
"stp_curve_set_data: datum out of bounds: "
@@ -620,7 +620,7 @@ stp_curve_set_data_points(stp_curve_t *curve, size_t count,
stp_sequence_get_bounds(curve->seq, &low, &high);
for (i = 0; i < count; i++)
{
- if (! finite(data[i].y) || data[i].y < low || data[i].y > high)
+ if (! isfinite(data[i].y) || data[i].y < low || data[i].y > high)
{
stp_deprintf(STP_DBG_CURVE_ERRORS,
"stp_curve_set_data_points: datum out of bounds: "
@@ -918,7 +918,7 @@ stp_curve_rescale(stp_curve_t *curve, double scale,
}
}
- if (! finite(nbhi) || ! finite(nblo))
+ if (! isfinite(nbhi) || ! isfinite(nblo))
return 0;
count = get_point_count(curve);
@@ -1302,7 +1302,7 @@ interpolate_points(stp_curve_t *a, stp_curve_t *b,
pa += pb;
else
pa *= pb;
- if (! finite(pa))
+ if (! isfinite(pa))
{
stp_deprintf(STP_DBG_CURVE_ERRORS,
"interpolate_points: interpolated point %lu is invalid\n",
diff --git a/src/main/escp2-channels.c b/src/main/escp2-channels.c
index e12edbf..6b8fbfa 100644
--- a/src/main/escp2-channels.c
+++ b/src/main/escp2-channels.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-channels.c,v 1.62 2006/06/01 23:49:33 rlk Exp $"
+ * "$Id: escp2-channels.c,v 1.62.8.2 2007/05/29 01:47:28 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -768,6 +768,64 @@ static const physical_subchannel_t f360x_photo_magenta_subchannels[] =
DECLARE_INK_CHANNEL(f360x_photo_magenta);
+static const physical_subchannel_t claria_black_subchannels[] =
+{
+ { 0, 0, 0, "BlackDensity", NULL },
+};
+
+DECLARE_INK_CHANNEL(claria_black);
+
+static const physical_subchannel_t claria_yellow_subchannels[] =
+{
+ { 4, 0, 2, "YellowDensity", NULL },
+};
+
+DECLARE_INK_CHANNEL(claria_yellow);
+
+static const physical_subchannel_t claria_cyan_subchannels[] =
+{
+ { 2, 0, 0, "CyanDensity", NULL },
+};
+
+DECLARE_INK_CHANNEL(claria_cyan);
+
+static const physical_subchannel_t claria_photo_cyan_subchannels[] =
+{
+ { 2, 0, 0, "CyanDensity", NULL },
+ { 2, 1, 2, "CyanDensity", "LightCyanTransition" },
+};
+
+DECLARE_INK_CHANNEL(claria_photo_cyan);
+
+static const physical_subchannel_t extended_claria_cyan_subchannels[] =
+{
+ { 2, 1, 2, "CyanDensity", "LightCyanTransition" },
+};
+
+DECLARE_INK_CHANNEL(extended_claria_cyan);
+
+static const physical_subchannel_t claria_magenta_subchannels[] =
+{
+ { 1, 0, 2, "MagentaDensity", NULL },
+};
+
+DECLARE_INK_CHANNEL(claria_magenta);
+
+static const physical_subchannel_t claria_photo_magenta_subchannels[] =
+{
+ { 1, 0, 2, "MagentaDensity", NULL },
+ { 1, 1, 0, "MagentaDensity", "LightMagentaTransition" },
+};
+
+DECLARE_INK_CHANNEL(claria_photo_magenta);
+
+static const physical_subchannel_t extended_claria_magenta_subchannels[] =
+{
+ { 1, 1, 0, "MagentaDensity", "LightMagentaTransition" },
+};
+
+DECLARE_INK_CHANNEL(extended_claria_magenta);
+
#define DECLARE_CHANNEL_SET(name) \
static const channel_set_t name##_channel_set = \
@@ -815,7 +873,7 @@ static const ink_channel_t *const standard_black_channels[] =
DECLARE_CHANNEL_SET(standard_black);
-const escp2_inkname_t stpi_escp2_default_black_inkset =
+static const escp2_inkname_t stpi_escp2_default_black_inkset =
{
"Gray", N_("Grayscale"), INKSET_CMYK,
&standard_black_channel_set
@@ -828,7 +886,7 @@ static const ink_channel_t *const standard_photo_black_channels[] =
DECLARE_CHANNEL_SET(standard_photo_black);
-const escp2_inkname_t stpi_escp2_default_photo_black_inkset =
+static const escp2_inkname_t stpi_escp2_default_photo_black_inkset =
{
"Gray", N_("Grayscale"), INKSET_CMYK,
&standard_photo_black_channel_set
@@ -842,7 +900,7 @@ static const ink_channel_t *const standard_photo_gloss_black_channels[] =
DECLARE_CHANNEL_SET(standard_photo_gloss_black);
DECLARE_AUX_CHANNEL_SET(standard_photo_black, standard_gloss);
-const escp2_inkname_t stpi_escp2_default_photo_gloss_black_inkset =
+static const escp2_inkname_t stpi_escp2_default_photo_gloss_black_inkset =
{
"GrayG", N_("Grayscale"), INKSET_CMYK,
&standard_photo_black_standard_gloss_channel_set
@@ -1130,6 +1188,20 @@ static const escp2_inkname_t three_color_r2400_composite_inkset =
&r2400_cmy_channel_set
};
+static const ink_channel_t *const claria_cmy_channels[] =
+{
+ NULL, &claria_cyan_channel,
+ &claria_magenta_channel, &claria_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(claria_cmy);
+
+static const escp2_inkname_t claria_three_color_composite_inkset =
+{
+ "RGB", N_("Three Color Composite"), INKSET_CMYK,
+ &claria_cmy_channel_set
+};
+
/*
****************************************************************
* *
@@ -1288,6 +1360,20 @@ static const escp2_inkname_t cx3650_four_color_standard_inkset =
&cx3650_cmyk_channel_set
};
+static const ink_channel_t *const claria_cmyk_channels[] =
+{
+ &claria_black_channel, &claria_cyan_channel,
+ &claria_magenta_channel, &claria_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(claria_cmyk);
+
+static const escp2_inkname_t claria_four_color_standard_inkset =
+{
+ "CMYK", N_("Four Color Standard"), INKSET_CMYK,
+ &claria_cmyk_channel_set
+};
+
/*
****************************************************************
@@ -1339,6 +1425,20 @@ static const escp2_inkname_t five_color_photo3_inkset =
&five_color_photo3_channel_set
};
+static const ink_channel_t *const claria_ccmmy_channels[] =
+{
+ NULL, &claria_photo_cyan_channel,
+ &claria_photo_magenta_channel, &claria_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(claria_ccmmy);
+
+static const escp2_inkname_t claria_five_color_photo_composite_inkset =
+{
+ "PhotoCMY", N_("Five Color Photo Composite"), INKSET_CcMmYK,
+ &claria_ccmmy_channel_set
+};
+
/*
****************************************************************
@@ -1390,6 +1490,20 @@ static const escp2_inkname_t six_color_photo3_inkset =
&six_color_photo3_channel_set
};
+static const ink_channel_t *const claria_ccmmyk_channels[] =
+{
+ &claria_black_channel, &claria_photo_cyan_channel,
+ &claria_photo_magenta_channel, &claria_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(claria_ccmmyk);
+
+static const escp2_inkname_t claria_six_color_photo_inkset =
+{
+ "PhotoCMYK", N_("Six Color Photo"), INKSET_CcMmYK,
+ &claria_ccmmyk_channel_set
+};
+
/*
****************************************************************
* *
@@ -1830,6 +1944,19 @@ static const escp2_inkname_t cx3650_three_color_extended_inkset =
&cx3650_three_color_extended_channel_set
};
+static const ink_channel_t *const claria_three_color_extended_channels[] =
+{
+ &claria_cyan_channel, &claria_magenta_channel, &claria_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(claria_three_color_extended);
+
+static const escp2_inkname_t claria_three_color_extended_inkset =
+{
+ "PhysicalCMY", N_("Three Color Raw"), INKSET_EXTENDED,
+ &claria_three_color_extended_channel_set
+};
+
static const escp2_inkname_t four_color_extended_inkset =
{
@@ -1873,6 +2000,12 @@ static const escp2_inkname_t cx3650_four_color_extended_inkset =
&cx3650_cmyk_channel_set
};
+static const escp2_inkname_t claria_four_color_extended_inkset =
+{
+ "PhysicalCMYK", N_("Four Color Raw"), INKSET_EXTENDED,
+ &claria_cmyk_channel_set
+};
+
static const escp2_inkname_t four_color_r800_extended_inkset =
{
"PhysicalCMYKGloss", N_("Four Color Raw"), INKSET_EXTENDED,
@@ -1914,6 +2047,20 @@ static const escp2_inkname_t f360_five_color_extended_inkset =
&f360_five_color_extended_channel_set
};
+static const ink_channel_t *const claria_five_color_extended_channels[] =
+{
+ &claria_cyan_channel, &extended_claria_cyan_channel,
+ &claria_magenta_channel, &extended_claria_magenta_channel,
+ &claria_yellow_channel
+};
+DECLARE_CHANNEL_SET(claria_five_color_extended);
+
+static const escp2_inkname_t claria_five_color_extended_inkset =
+{
+ "PhysicalCcMmYK", N_("Six Color Raw"), INKSET_EXTENDED,
+ &claria_five_color_extended_channel_set
+};
+
static const ink_channel_t *const six_color_extended_channels[] =
{
@@ -1963,6 +2110,22 @@ static const escp2_inkname_t six_color_r800_photo_gloss_extended_inkset =
&six_color_r800_photo_gloss_channel_set
};
+static const ink_channel_t *const claria_six_color_extended_channels[] =
+{
+ &claria_black_channel,
+ &claria_cyan_channel, &extended_claria_cyan_channel,
+ &claria_magenta_channel, &extended_claria_magenta_channel,
+ &claria_yellow_channel
+};
+DECLARE_CHANNEL_SET(claria_six_color_extended);
+
+static const escp2_inkname_t claria_six_color_extended_inkset =
+{
+ "PhysicalCcMmYK", N_("Six Color Raw"), INKSET_EXTENDED,
+ &claria_six_color_extended_channel_set
+};
+
+
static const ink_channel_t *const j_seven_color_extended_channels[] =
{
&photo_black_channel,
@@ -2176,14 +2339,26 @@ static const shade_set_t quadtone_shades = /* Some kind of quadtone ink */
{ 1, { 1.0 }},
};
+static const shade_set_t claria_shades = /* Stylus R260 and newer */
+{
+ { 1, { 1.0 }},
+ { 2, { 1.0, 0.35 }},
+ { 2, { 1.0, 0.33 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+};
+
#define DECLARE_INKLIST(tname, name, inks, text, papers, adjustments, shades) \
static const inklist_t name##_inklist = \
{ \
tname, \
text, \
inks##_ink_types, \
- &stpi_escp2_##papers##_paper_list, \
- &stpi_escp2_##adjustments##_paper_adjustment_list, \
+ #papers, \
+ #adjustments, \
&shades##_shades, \
sizeof(inks##_ink_types) / sizeof(escp2_inkname_t *), \
}
@@ -2209,6 +2384,8 @@ static const escp2_inkname_t *const standard_ink_types[] =
DECLARE_INKLIST("None", standard, standard, N_("EPSON Standard Inks"),
standard, standard, standard);
+DECLARE_INKLIST("None", photo_gen3_4, standard, N_("EPSON Standard Inks"),
+ standard, photo3, standard);
static const escp2_inkname_t *const quadtone_ink_types[] =
{
@@ -2351,6 +2528,22 @@ static const escp2_inkname_t *const f360_photo_ink_types[] =
DECLARE_INKLIST("None", f360_photo, f360_photo, N_("EPSON Standard Inks"),
standard, sp960, esp960);
+static const escp2_inkname_t *const claria_ink_types[] =
+{
+ &claria_six_color_photo_inkset,
+ &claria_five_color_photo_composite_inkset,
+ &claria_four_color_standard_inkset,
+ &claria_three_color_composite_inkset,
+ &one_color_extended_inkset,
+ &claria_three_color_extended_inkset,
+ &claria_four_color_extended_inkset,
+ &claria_five_color_extended_inkset,
+ &claria_six_color_extended_inkset,
+};
+
+DECLARE_INKLIST("None", claria, claria, N_("EPSON Standard Inks"),
+ standard, claria, claria);
+
static const escp2_inkname_t *const f360_photo7_japan_ink_types[] =
{
&f360_j_seven_color_enhanced_inkset,
@@ -2483,7 +2676,7 @@ DECLARE_INKLIST("picturemate", picturemate, picturemate_photo,
#define DECLARE_INKGROUP(name) \
-const inkgroup_t stpi_escp2_##name##_inkgroup = \
+static const inkgroup_t name##_inkgroup = \
{ \
#name, \
name##_group, \
@@ -2576,6 +2769,14 @@ static const inklist_t *const photo_gen3_group[] =
DECLARE_INKGROUP(photo_gen3);
+static const inklist_t *const photo_gen3_4_group[] =
+{
+ &photo_gen3_4_inklist,
+ &quadtone_inklist
+};
+
+DECLARE_INKGROUP(photo_gen3_4);
+
static const inklist_t *const photo_pigment_group[] =
{
&pigment_inklist
@@ -2635,3 +2836,236 @@ static const inklist_t *const picturemate_group[] =
};
DECLARE_INKGROUP(picturemate);
+
+static const inklist_t *const claria_group[] =
+{
+ &claria_inklist,
+};
+
+DECLARE_INKGROUP(claria);
+
+typedef struct
+{
+ const char *name;
+ const inkgroup_t *inkgroup;
+} ink_t;
+
+static const ink_t the_inks[] =
+{
+ { "cmy", &cmy_inkgroup },
+ { "standard", &standard_inkgroup },
+ { "c80", &c80_inkgroup },
+ { "c82", &c82_inkgroup },
+ { "c64", &c64_inkgroup },
+ { "f360", &f360_inkgroup },
+ { "cx3650", &cx3650_inkgroup },
+ { "x80", &x80_inkgroup },
+ { "photo_gen1", &photo_gen1_inkgroup },
+ { "photo_gen2", &photo_gen2_inkgroup },
+ { "photo_gen3", &photo_gen3_inkgroup },
+ { "photo_gen3_4", &photo_gen3_4_inkgroup },
+ { "photo_pigment", &photo_pigment_inkgroup },
+ { "ultrachrome", &ultrachrome_inkgroup },
+ { "f360_photo", &f360_photo_inkgroup },
+ { "f360_photo7_japan", &f360_photo7_japan_inkgroup },
+ { "f360_ultrachrome", &f360_ultrachrome_inkgroup },
+ { "f360_ultrachrome_k3", &f360_ultrachrome_k3_inkgroup },
+ { "cmykrb", &cmykrb_inkgroup },
+ { "picturemate", &picturemate_inkgroup },
+ { "claria", &claria_inkgroup },
+};
+
+const inkgroup_t *
+stpi_escp2_get_inkgroup_named(const char *n)
+{
+ int i;
+ if (n)
+ for (i = 0; i < sizeof(the_inks) / sizeof(ink_t); i++)
+ {
+ if (strcmp(n, the_inks[i].name) == 0)
+ return the_inks[i].inkgroup;
+ }
+ return NULL;
+}
+
+const escp2_inkname_t *
+stpi_escp2_get_default_black_inkset(void)
+{
+ return &stpi_escp2_default_black_inkset;
+}
+
+
+#define DECLARE_CHANNEL_LIST(name) \
+static const channel_name_t name##_channel_name_list = \
+{ \
+ #name, \
+ sizeof(name##_channel_names) / sizeof(const char *), \
+ name##_channel_names \
+}
+
+static const char *standard_channel_names[] =
+{
+ N_("Black"),
+ N_("Cyan"),
+ N_("Magenta"),
+ N_("Yellow")
+};
+
+DECLARE_CHANNEL_LIST(standard);
+
+static const char *cx3800_channel_names[] =
+{
+ N_("Cyan"),
+ N_("Yellow"),
+ N_("Magenta"),
+ N_("Black")
+};
+
+DECLARE_CHANNEL_LIST(cx3800);
+
+static const char *mfp2005_channel_names[] =
+{
+ N_("Cyan"),
+ N_("Magenta"),
+ N_("Yellow"),
+ N_("Black")
+};
+
+DECLARE_CHANNEL_LIST(mfp2005);
+
+static const char *photo_channel_names[] =
+{
+ N_("Black"),
+ N_("Cyan"),
+ N_("Magenta"),
+ N_("Yellow"),
+ N_("Light Cyan"),
+ N_("Light Magenta"),
+};
+
+DECLARE_CHANNEL_LIST(photo);
+
+static const char *rx700_channel_names[] =
+{
+ N_("Black"),
+ N_("Cyan"),
+ N_("Light Cyan"),
+ N_("Magenta"),
+ N_("Light Magenta"),
+ N_("Yellow"),
+};
+
+DECLARE_CHANNEL_LIST(rx700);
+
+static const char *sp2200_channel_names[] =
+{
+ N_("Black"),
+ N_("Cyan"),
+ N_("Magenta"),
+ N_("Yellow"),
+ N_("Light Cyan"),
+ N_("Light Magenta"),
+ N_("Light Black"),
+};
+
+DECLARE_CHANNEL_LIST(sp2200);
+
+static const char *pm_950c_channel_names[] =
+{
+ N_("Black"),
+ N_("Cyan"),
+ N_("Magenta"),
+ N_("Yellow"),
+ N_("Light Cyan"),
+ N_("Light Magenta"),
+ N_("Dark Yellow"),
+};
+
+DECLARE_CHANNEL_LIST(pm_950c);
+
+static const char *sp960_channel_names[] =
+{
+ N_("Black"),
+ N_("Cyan"),
+ N_("Magenta"),
+ N_("Yellow"),
+ N_("Light Cyan"),
+ N_("Light Magenta"),
+ N_("Black"),
+};
+
+DECLARE_CHANNEL_LIST(sp960);
+
+static const char *r800_channel_names[] =
+{
+ N_("Yellow"),
+ N_("Magenta"),
+ N_("Cyan"),
+ N_("Matte Black"),
+ N_("Photo Black"),
+ N_("Red"),
+ N_("Blue"),
+ N_("Gloss Optimizer"),
+};
+
+DECLARE_CHANNEL_LIST(r800);
+
+static const char *picturemate_channel_names[] =
+{
+ N_("Yellow"),
+ N_("Magenta"),
+ N_("Cyan"),
+ N_("Black"),
+ N_("Red"),
+ N_("Blue"),
+};
+
+DECLARE_CHANNEL_LIST(picturemate);
+
+static const char *r2400_channel_names[] =
+{
+ N_("Light Light Black"),
+ N_("Light Magenta"),
+ N_("Light Cyan"),
+ N_("Light Black"),
+ N_("Black"),
+ N_("Cyan"),
+ N_("Magenta"),
+ N_("Yellow"),
+};
+
+DECLARE_CHANNEL_LIST(r2400);
+
+typedef struct
+{
+ const char *name;
+ const channel_name_t *channel_name;
+} channel_t;
+
+static const channel_t the_channels[] =
+{
+ { "cx3800", &cx3800_channel_name_list },
+ { "mfp2005", &mfp2005_channel_name_list },
+ { "photo", &photo_channel_name_list },
+ { "picturemate", &picturemate_channel_name_list },
+ { "pm_950c", &pm_950c_channel_name_list },
+ { "r2400", &r2400_channel_name_list },
+ { "r800", &r800_channel_name_list },
+ { "rx700", &rx700_channel_name_list },
+ { "sp2200", &sp2200_channel_name_list },
+ { "sp960", &sp960_channel_name_list },
+ { "standard", &standard_channel_name_list },
+};
+
+const channel_name_t *
+stpi_escp2_get_channel_names_named(const char *n)
+{
+ int i;
+ if (n)
+ for (i = 0; i < sizeof(the_channels) / sizeof(channel_t); i++)
+ {
+ if (strcmp(n, the_channels[i].name) == 0)
+ return the_channels[i].channel_name;
+ }
+ return NULL;
+}
diff --git a/src/main/escp2-driver.c b/src/main/escp2-driver.c
index 24ef1c1..2141cfc 100644
--- a/src/main/escp2-driver.c
+++ b/src/main/escp2-driver.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-driver.c,v 1.30 2006/07/22 20:28:13 rlk Exp $"
+ * "$Id: escp2-driver.c,v 1.30.6.1 2007/03/02 12:01:25 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -114,6 +114,7 @@ print_debug_params(stp_vars_t *v)
print_remote_int_param(v, "Page_height", pd->page_height);
print_remote_int_param(v, "Page_true_height", pd->page_true_height);
print_remote_int_param(v, "Page_extra_height", pd->page_extra_height);
+ print_remote_int_param(v, "Paper_extra_bottom", pd->paper_extra_bottom);
print_remote_int_param(v, "Image_left", pd->image_left);
print_remote_int_param(v, "Image_top", pd->image_top);
print_remote_int_param(v, "Image_width", pd->image_width);
@@ -240,22 +241,12 @@ escp2_set_remote_sequence(stp_vars_t *v)
stp_send_command(v, "SN", "bccc", 0, 0, feed_sequence);
if (stp_get_boolean_parameter(v, "FullBleed"))
{
- stp_send_command(v, "FP", "bch", 0, 0xffb0);
-#if 0
- /* 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, "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", "bccc", 0, 2, 0);
- stp_send_command(v, "DR", "bcccc", 0, 0, 0, 0);
- stp_send_command(v, "PP", "bccc", 0, 1, 0xff);
-#endif
+ stp_send_command(v, "FP", "bch", 0,
+ (unsigned short) -pd->zero_margin_offset);
+ if (pd->borderless_sequence)
+ stp_zfwrite(pd->borderless_sequence->data,
+ pd->borderless_sequence->bytes,
+ 1, v);
}
}
if (pd->input_slot)
@@ -387,7 +378,8 @@ static void
escp2_set_page_height(stp_vars_t *v)
{
escp2_privdata_t *pd = get_privdata(v);
- int l = pd->page_management_units * pd->page_true_height / 72;
+ int l = (pd->page_true_height + pd->paper_extra_bottom) *
+ pd->page_management_units / 72;
if (pd->use_extended_commands)
stp_send_command(v, "\033(C", "bl", l);
else
@@ -402,6 +394,8 @@ escp2_set_margins(stp_vars_t *v)
int top = pd->page_management_units * pd->page_top / 72;
top += pd->initial_vertical_offset;
+ top -= pd->page_extra_height;
+ bot += pd->page_extra_height;
if (pd->use_extended_commands &&
(pd->command_set == MODEL_COMMAND_2000 ||
pd->command_set == MODEL_COMMAND_PRO))
@@ -411,21 +405,14 @@ escp2_set_margins(stp_vars_t *v)
}
static void
-escp2_set_form_factor(stp_vars_t *v)
+escp2_set_paper_dimensions(stp_vars_t *v)
{
escp2_privdata_t *pd = get_privdata(v);
if (pd->advanced_command_set)
{
- int w = pd->page_width * pd->page_management_units / 72;
- int h = (pd->page_true_height + pd->page_extra_height) *
+ int w = pd->page_true_width * pd->page_management_units / 72;
+ int h = (pd->page_true_height + pd->paper_extra_bottom) *
pd->page_management_units / 72;
-
- if (stp_get_boolean_parameter(v, "FullBleed"))
- /* Make the page 160/360" wider for full bleed printing. */
- /* Per the Epson manual, the margin should be expanded by 80/360" */
- /* so we need to do this on the left and the right */
- w += 320 * pd->page_management_units / 720;
-
stp_send_command(v, "\033(S", "bll", w, h);
}
}
@@ -599,7 +586,7 @@ stpi_escp2_init_printer(stp_vars_t *v)
escp2_set_printhead_resolution(v);
escp2_set_page_height(v);
escp2_set_margins(v);
- escp2_set_form_factor(v);
+ escp2_set_paper_dimensions(v);
}
void
diff --git a/src/main/escp2-inks.c b/src/main/escp2-inks.c
index 6a5ee2e..309a40e 100644
--- a/src/main/escp2-inks.c
+++ b/src/main/escp2-inks.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-inks.c,v 1.46 2006/01/07 02:43:28 rlk Exp $"
+ * "$Id: escp2-inks.c,v 1.46.10.2 2007/05/29 01:47:28 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -135,6 +135,64 @@ static const escp2_dropsize_t escp2_r300_2880_dropsizes =
static const escp2_dropsize_t escp2_r300_2880_1440_dropsizes =
{ "r300_2880_1440", 1, { 1.0 } };
+/* Claria inks */
+
+/*
+ * Tested relative drop sizes:
+ * S M L
+ *
+ * 0x21 3 4 5
+ * 0x23 2 3 4
+ * 0x24 1 3 5
+ * 0x25 1 2 3
+ * 0x26 2 3 5
+ * 0x33 1 3 5
+ *
+ * Therefore, there's no real point to use drop sizes other than 0x24
+ * and 0x25. The economy settings (0x10 and 0x0) don't provide any
+ * bigger drops. We get quite smooth output at 720x360 and 360 DPI, and
+ * even 360x180 is surprisingly smooth.
+ * Roy Harrington estimates the drop sizes are:
+ *
+ * 1 1.5 pl
+ * 2 2.4 pl
+ * 3 6.3 pl
+ * 4 12 pl (rlk estimate)
+ * 5 21 pl
+ */
+
+static const escp2_dropsize_t escp2_claria_720_dropsizes =
+ { "claria_720", 3, { 0.071, 0.3, 1.0 } };
+static const escp2_dropsize_t escp2_claria_1440_dropsizes =
+ { "claria_1440", 3, { 0.23, 0.37, 1.0 } };
+static const escp2_dropsize_t escp2_claria_2880_dropsizes =
+ { "claria_2880", 2, { 0.62, 1.0 } };
+static const escp2_dropsize_t escp2_claria_5760_dropsizes =
+ { "claria_5760", 1, { 1.0 } };
+
+/* Stylus Photo 1400 */
+
+/*
+ * Tested relative drop sizes:
+* S M L
+*
+* 0x21 3 4 5
+* 0x25 1 2 3
+* 0x33 1 3 5
+* 0x34 2 3 5
+*/
+
+static const escp2_dropsize_t escp2_claria_1400_720_dropsizes =
+ { "claria_1400_720", 3, { 0.3, 0.57, 1.0 } };
+static const escp2_dropsize_t escp2_claria_1400_1440_720_dropsizes =
+ { "claria_1400_1440_720", 3, { 0.071, 0.3, 1.0 } };
+static const escp2_dropsize_t escp2_claria_1400_1440_dropsizes =
+ { "claria_1400_1440", 3, { 0.23, 0.37, 1.0 } };
+static const escp2_dropsize_t escp2_claria_1400_2880_dropsizes =
+ { "claria_1400_2880", 2, { 0.62, 1.0 } };
+static const escp2_dropsize_t escp2_claria_1400_5760_dropsizes =
+ { "claria_1400_5760", 1, { 1.0 } };
+
/* Stylus Photo R2400 */
static const escp2_dropsize_t escp2_r2400_360_dropsizes =
{ "r2400_360", 1, { 1 } };
@@ -193,7 +251,7 @@ static const escp2_dropsize_t escp2_ultrachrome_2880_dropsizes =
static const escp2_dropsize_t escp2_spro10000_dropsizes =
{ "spro10000", 2, { 0.661, 1.0 } };
-const escp2_drop_list_t stpi_escp2_simple_drops =
+static const escp2_drop_list_t simple_drops =
{
&escp2_single_dropsizes,
&escp2_single_dropsizes,
@@ -206,7 +264,7 @@ const escp2_drop_list_t stpi_escp2_simple_drops =
&escp2_single_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_6pl_drops =
+static const escp2_drop_list_t variable_6pl_drops =
{
&escp2_6pl_dropsizes,
&escp2_6pl_dropsizes,
@@ -219,7 +277,7 @@ const escp2_drop_list_t stpi_escp2_variable_6pl_drops =
&escp2_6pl_2880_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_x80_6pl_drops =
+static const escp2_drop_list_t variable_x80_6pl_drops =
{
&escp2_x80_low_dropsizes,
&escp2_x80_low_dropsizes,
@@ -232,7 +290,7 @@ const escp2_drop_list_t stpi_escp2_variable_x80_6pl_drops =
&escp2_x80_2880_6pl_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_1440_4pl_drops =
+static const escp2_drop_list_t variable_1440_4pl_drops =
{
&escp2_low_dropsizes,
&escp2_low_dropsizes,
@@ -245,7 +303,7 @@ const escp2_drop_list_t stpi_escp2_variable_1440_4pl_drops =
&escp2_4pl_2880_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_2880_4pl_drops =
+static const escp2_drop_list_t variable_2880_4pl_drops =
{
&escp2_new_low_dropsizes,
&escp2_new_low_dropsizes,
@@ -258,7 +316,7 @@ const escp2_drop_list_t stpi_escp2_variable_2880_4pl_drops =
&escp2_4pl_2880_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_3pl_drops =
+static const escp2_drop_list_t variable_3pl_drops =
{
&escp2_low_dropsizes,
&escp2_low_dropsizes,
@@ -271,7 +329,7 @@ const escp2_drop_list_t stpi_escp2_variable_3pl_drops =
&escp2_3pl_2880_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_2pl_drops =
+static const escp2_drop_list_t variable_2pl_drops =
{
&escp2_2pl_360_dropsizes,
&escp2_2pl_360_dropsizes,
@@ -284,7 +342,7 @@ const escp2_drop_list_t stpi_escp2_variable_2pl_drops =
&escp2_2pl_2880_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_3pl_pmg_drops =
+static const escp2_drop_list_t variable_3pl_pmg_drops =
{
&escp2_r300_360_dropsizes,
&escp2_r300_360_dropsizes,
@@ -297,7 +355,33 @@ const escp2_drop_list_t stpi_escp2_variable_3pl_pmg_drops =
&escp2_r300_2880_1440_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_r2400_drops =
+static const escp2_drop_list_t claria_drops =
+{
+ &escp2_claria_720_dropsizes,
+ &escp2_claria_720_dropsizes,
+ &escp2_claria_720_dropsizes,
+ &escp2_claria_720_dropsizes,
+ &escp2_claria_720_dropsizes,
+ &escp2_claria_1440_dropsizes,
+ &escp2_claria_1440_dropsizes,
+ &escp2_claria_2880_dropsizes,
+ &escp2_claria_5760_dropsizes,
+};
+
+static const escp2_drop_list_t claria_1400_drops =
+{
+ &escp2_claria_1400_1440_720_dropsizes,
+ &escp2_claria_1400_1440_720_dropsizes,
+ &escp2_claria_1400_720_dropsizes,
+ &escp2_claria_1400_720_dropsizes,
+ &escp2_claria_1400_1440_720_dropsizes,
+ &escp2_claria_1400_1440_dropsizes,
+ &escp2_claria_1400_1440_dropsizes,
+ &escp2_claria_1400_2880_dropsizes,
+ &escp2_claria_1400_5760_dropsizes,
+};
+
+static const escp2_drop_list_t variable_r2400_drops =
{
&escp2_r2400_360_dropsizes,
&escp2_r2400_360_dropsizes,
@@ -310,7 +394,7 @@ const escp2_drop_list_t stpi_escp2_variable_r2400_drops =
&escp2_r2400_2880_2880_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_picturemate_drops =
+static const escp2_drop_list_t variable_picturemate_drops =
{
&escp2_picturemate_1440_dropsizes,
&escp2_picturemate_1440_dropsizes,
@@ -323,7 +407,7 @@ const escp2_drop_list_t stpi_escp2_variable_picturemate_drops =
&escp2_picturemate_5760_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_1_5pl_drops =
+static const escp2_drop_list_t variable_1_5pl_drops =
{
&escp2_1_5pl_360_dropsizes,
&escp2_1_5pl_360_dropsizes,
@@ -336,7 +420,7 @@ const escp2_drop_list_t stpi_escp2_variable_1_5pl_drops =
&escp2_1_5pl_5760_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_2000p_drops =
+static const escp2_drop_list_t variable_2000p_drops =
{
&escp2_2000p_dropsizes,
&escp2_2000p_dropsizes,
@@ -349,7 +433,7 @@ const escp2_drop_list_t stpi_escp2_variable_2000p_drops =
&escp2_2000p_dropsizes
};
-const escp2_drop_list_t stpi_escp2_variable_ultrachrome_drops =
+static const escp2_drop_list_t variable_ultrachrome_drops =
{
&escp2_ultrachrome_low_dropsizes,
&escp2_ultrachrome_low_dropsizes,
@@ -362,7 +446,7 @@ const escp2_drop_list_t stpi_escp2_variable_ultrachrome_drops =
&escp2_ultrachrome_2880_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_drops =
+static const escp2_drop_list_t variable_3pl_pigment_drops =
{
&escp2_economy_pigment_dropsizes,
&escp2_low_pigment_dropsizes,
@@ -375,7 +459,7 @@ const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_drops =
&escp2_3pl_pigment_5760_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_c66_drops =
+static const escp2_drop_list_t variable_3pl_pigment_c66_drops =
{
&escp2_economy_pigment_c66_dropsizes,
&escp2_low_pigment_c66_dropsizes,
@@ -388,7 +472,7 @@ const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_c66_drops =
&escp2_3pl_pigment_c66_5760_dropsizes,
};
-const escp2_drop_list_t stpi_escp2_spro10000_drops =
+static const escp2_drop_list_t spro10000_drops =
{
&escp2_spro10000_dropsizes,
&escp2_spro10000_dropsizes,
@@ -400,3 +484,45 @@ const escp2_drop_list_t stpi_escp2_spro10000_drops =
&escp2_spro10000_dropsizes,
&escp2_spro10000_dropsizes
};
+
+
+typedef struct
+{
+ const char *name;
+ const escp2_drop_list_t *const drop_list;
+} drop_list_t;
+
+static const drop_list_t the_drop_lists[] =
+{
+ { "simple", &simple_drops },
+ { "spro10000", &spro10000_drops },
+ { "variable_1_5pl", &variable_1_5pl_drops },
+ { "variable_2pl", &variable_2pl_drops },
+ { "variable_3pl", &variable_3pl_drops },
+ { "variable_3pl_pigment", &variable_3pl_pigment_drops },
+ { "variable_3pl_pigment_c66", &variable_3pl_pigment_c66_drops },
+ { "variable_3pl_pmg", &variable_3pl_pmg_drops },
+ { "variable_claria", &claria_drops },
+ { "variable_claria_1400", &claria_1400_drops },
+ { "variable_r2400", &variable_r2400_drops },
+ { "variable_picturemate", &variable_picturemate_drops },
+ { "variable_1440_4pl", &variable_1440_4pl_drops },
+ { "variable_ultrachrome", &variable_ultrachrome_drops },
+ { "variable_2880_4pl", &variable_2880_4pl_drops },
+ { "variable_6pl", &variable_6pl_drops },
+ { "variable_2000p", &variable_2000p_drops },
+ { "variable_x80_6pl", &variable_x80_6pl_drops },
+};
+
+const escp2_drop_list_t *
+stpi_escp2_get_drop_list_named(const char *n)
+{
+ int i;
+ if (n)
+ for (i = 0; i < sizeof(the_drop_lists) / sizeof(drop_list_t); i++)
+ {
+ if (strcmp(n, the_drop_lists[i].name) == 0)
+ return the_drop_lists[i].drop_list;
+ }
+ return NULL;
+}
diff --git a/src/main/escp2-papers.c b/src/main/escp2-papers.c
index c32e51f..03f9edc 100644
--- a/src/main/escp2-papers.c
+++ b/src/main/escp2-papers.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-papers.c,v 1.99 2006/05/31 23:15:22 rlk Exp $"
+ * "$Id: escp2-papers.c,v 1.99.8.2 2007/05/29 01:47:28 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -167,6 +167,53 @@ static const char photo3_hue_adj[] =
"</gutenprint>\n";
+
+static const char claria_sat_adj[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
+/* C */ "1.00 1.05 1.15 1.25 1.35 1.45 1.50 1.50 " /* B */
+/* B */ "1.50 1.50 1.50 1.50 1.50 1.50 1.50 1.50 " /* M */
+/* M */ "1.50 1.40 1.30 1.20 1.10 1.00 1.00 1.00 " /* R */
+/* R */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* Y */
+/* Y */ "1.00 1.10 1.30 1.55 1.80 1.95 2.00 2.00 " /* G */
+/* G */ "2.00 2.00 2.00 1.95 1.80 1.55 1.30 1.10 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+static const char claria_lum_adj[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
+/* C */ "0.66 0.67 0.69 0.73 0.77 0.83 0.87 0.89 " /* B */
+/* B */ "0.91 0.88 0.84 0.78 0.78 0.80 0.82 0.85 " /* M */
+/* M */ "0.87 0.90 0.94 0.97 1.00 1.00 1.00 1.00 " /* R */
+/* R */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* Y */
+/* Y */ "1.00 1.00 0.99 0.98 0.96 0.94 0.92 0.88 " /* G */
+/* G */ "0.84 0.72 0.69 0.67 0.66 0.66 0.66 0.66 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+static const char claria_hue_adj[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"-6\" upper-bound=\"6\">\n"
+/* C */ "0.00 -.01 -.03 -.06 -.10 -.15 -.20 -.25 " /* B */
+/* B */ "-.30 -.35 -.38 -.40 -.42 -.46 -.49 -.52 " /* M */
+/* M */ "-.55 -.57 -.57 -.55 -.52 -.48 -.40 -.30 " /* R */
+/* R */ "-.12 -.07 -.04 -.02 0.00 0.00 0.00 0.00 " /* Y */
+/* Y */ "0.00 -.00 -.00 -.00 -.02 -.04 -.08 -.13 " /* G */
+/* G */ "-.18 -.18 -.19 -.16 -.13 -.10 -.07 -.03 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+
static const char sp960_sat_adj[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<gutenprint>\n"
@@ -531,20 +578,20 @@ static const char r800_glossy_hue_adj[] =
"</curve>\n"
"</gutenprint>\n";
-#define DECLARE_PAPERS(name) \
-const paperlist_t stpi_escp2_##name##_paper_list = \
-{ \
- #name, \
- sizeof(name##_papers) / sizeof(paper_t), \
- name##_papers \
+#define DECLARE_PAPERS(name) \
+static const paperlist_t name##_paper_list = \
+{ \
+ #name, \
+ sizeof(name##_papers) / sizeof(paper_t), \
+ name##_papers \
}
-#define DECLARE_PAPER_ADJUSTMENTS(name) \
-const paper_adjustment_list_t stpi_escp2_##name##_paper_adjustment_list = \
-{ \
- #name, \
- sizeof(name##_adjustments) / sizeof(paper_adjustment_t), \
- name##_adjustments \
+#define DECLARE_PAPER_ADJUSTMENTS(name) \
+static const paper_adjustment_list_t name##_paper_adjustment_list = \
+{ \
+ #name, \
+ sizeof(name##_adjustments) / sizeof(paper_adjustment_t), \
+ name##_adjustments \
}
static const paper_adjustment_t standard_adjustments[] =
@@ -723,6 +770,50 @@ static const paper_adjustment_t photo3_adjustments[] =
DECLARE_PAPER_ADJUSTMENTS(photo3);
+static const paper_adjustment_t claria_adjustments[] =
+{
+ { "Plain", 0.540, .25, 0.75, .1, .5, 1, .7, .7, 1, 1, 1.0,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "PlainFast", 0.540, .25, 0.75, .1, .5, 1, .7, .7, 1, 1, 1.0,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Postcard", 0.692, .25, 0.5, .1, .5, 1, .7, .7, 1, 1, 1.0,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "GlossyFilm", 0.833, .25, 0.75, .2, .999, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Transparency", 0.833, .25, 0.75, .2, .999, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Envelope", 0.540, .25, 0.75, .1, .5, 1, .7, .7, 1, 1, 1.0,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "BackFilm", 0.833, .25, 0.75, .2, .999, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Matte", 0.833, .25, 0.6, .15, .999, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "MatteHeavy", 0.833, .25, 0.5, .25, .999, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Inkjet", 0.709, .25, 0.75, .15, .75, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Coated", 0.833, .25, 0.5, .25, .999, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Photo", 0.833, .25, 0.5, .25, .999, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "GlossyPhoto", 0.75, .25, 0.3, .25, .999, 1, .7, .7, 1, 1, 0.92,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Semigloss", 0.75, .25, 0.3, .25, .999, 1, .7, .7, 1, 1, 0.92,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Luster", 0.75, .25, 0.3, .25, .999, 1, .7, .7, 1, 1, 0.92,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "GlossyPaper", 0.833, .25, 0.75, .2, .999, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Ilford", 0.833, .25, 0.75, .2, .999, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "ColorLife", 0.833, .25, 0.75, .2, .9, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+ { "Other", 0.540, .25, 0.5, .1, .5, 1, .7, .7, 1, 1, 1,
+ claria_hue_adj, claria_lum_adj, claria_sat_adj },
+};
+
+DECLARE_PAPER_ADJUSTMENTS(claria);
+
static const paper_adjustment_t sp960_adjustments[] =
{
{ "Plain", 0.86, .2, 0.4, .1, .9, .9, 1, 1, 1, 1, 1,
@@ -1440,3 +1531,471 @@ static const paper_t picturemate_papers[] =
};
DECLARE_PAPERS(picturemate);
+
+typedef struct
+{
+ const char *name;
+ const paperlist_t *paper_list;
+} paperl_t;
+
+static const paperl_t the_papers[] =
+{
+ { "standard", &standard_paper_list },
+ { "durabrite", &durabrite_paper_list },
+ { "durabrite2", &durabrite2_paper_list },
+ { "ultrachrome", &ultrachrome_paper_list },
+ { "ultrachrome_k3", &ultrachrome_k3_paper_list },
+ { "r800", &r800_paper_list },
+ { "picturemate", &picturemate_paper_list },
+};
+
+const paperlist_t *
+stpi_escp2_get_paperlist_named(const char *n)
+{
+ int i;
+ if (n)
+ for (i = 0; i < sizeof(the_papers) / sizeof(paperl_t); i++)
+ {
+ if (strcmp(n, the_papers[i].name) == 0)
+ return the_papers[i].paper_list;
+ }
+ return NULL;
+}
+
+typedef struct
+{
+ const char *name;
+ const paper_adjustment_list_t *paper_list;
+} paperadj_t;
+
+static const paperadj_t the_adjustments[] =
+{
+ { "standard", &standard_paper_adjustment_list },
+ { "durabrite", &durabrite_paper_adjustment_list },
+ { "durabrite2", &durabrite2_paper_adjustment_list },
+ { "photo", &photo_paper_adjustment_list },
+ { "photo2", &photo2_paper_adjustment_list },
+ { "photo3", &photo3_paper_adjustment_list },
+ { "sp960", &sp960_paper_adjustment_list },
+ { "ultrachrome_photo", &ultrachrome_photo_paper_adjustment_list },
+ { "ultrachrome_matte", &ultrachrome_matte_paper_adjustment_list },
+ { "ultrachrome_k3_photo", &ultrachrome_k3_photo_paper_adjustment_list },
+ { "ultrachrome_k3_matte", &ultrachrome_k3_matte_paper_adjustment_list },
+ { "r800_photo", &r800_photo_paper_adjustment_list },
+ { "r800_matte", &r800_matte_paper_adjustment_list },
+ { "picturemate", &picturemate_paper_adjustment_list },
+ { "claria", &claria_paper_adjustment_list },
+};
+
+const paper_adjustment_list_t *
+stpi_escp2_get_paper_adjustment_list_named(const char *n)
+{
+ int i;
+ if (n)
+ for (i = 0; i < sizeof(the_adjustments) / sizeof(paperadj_t); i++)
+ {
+ if (strcmp(n, the_adjustments[i].name) == 0)
+ return the_adjustments[i].paper_list;
+ }
+ return NULL;
+}
+
+
+#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[] =
+{
+ {
+ "Standard",
+ N_("Standard"),
+ 0,
+ 0,
+ 0,
+ { 16, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000" },
+ { 6, "IR\002\000\000\000"}
+ },
+ {
+ "Roll",
+ N_("Roll Feed"),
+ 0,
+ 1,
+ ROLL_FEED_DONT_EJECT,
+ { 16, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001" },
+ { 6, "IR\002\000\000\002" }
+ }
+};
+
+DECLARE_INPUT_SLOT(standard_roll_feed);
+
+static const input_slot_t cutter_roll_feed_input_slots[] =
+{
+ {
+ "Standard",
+ N_("Standard"),
+ 0,
+ 0,
+ 0,
+ { 16, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000" },
+ { 6, "IR\002\000\000\000"}
+ },
+ {
+ "RollCutPage",
+ N_("Roll Feed (cut each page)"),
+ 0,
+ 1,
+ ROLL_FEED_CUT_ALL,
+ { 16, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001" },
+ { 6, "IR\002\000\000\002" }
+ },
+ {
+ "RollCutNone",
+ N_("Roll Feed (do not cut)"),
+ 0,
+ 1,
+ ROLL_FEED_DONT_EJECT,
+ { 16, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001" },
+ { 6, "IR\002\000\000\002" }
+ }
+};
+
+DECLARE_INPUT_SLOT(cutter_roll_feed);
+
+static const input_slot_t cd_cutter_roll_feed_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"}
+ },
+ {
+ "Manual",
+ N_("Manual Feed"),
+ 0,
+ 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"}
+ },
+ {
+ "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"}
+ },
+ {
+ "RollCutPage",
+ N_("Roll Feed (cut each page)"),
+ 0,
+ 1,
+ ROLL_FEED_CUT_ALL,
+ { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001PP\003\000\000\001\377" },
+ { 6, "IR\002\000\000\002" }
+ },
+ {
+ "RollCutNone",
+ N_("Roll Feed (do not cut)"),
+ 0,
+ 1,
+ ROLL_FEED_DONT_EJECT,
+ { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001PP\003\000\000\001\377" },
+ { 6, "IR\002\000\000\002" }
+ }
+};
+
+DECLARE_INPUT_SLOT(cd_cutter_roll_feed);
+
+static const input_slot_t cd_roll_feed_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"}
+ },
+ {
+ "Manual",
+ N_("Manual Feed"),
+ 0,
+ 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"}
+ },
+ {
+ "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"}
+ },
+ {
+ "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\001\377" },
+ { 6, "IR\002\000\000\002" }
+ }
+};
+
+DECLARE_INPUT_SLOT(cd_roll_feed);
+
+static const input_slot_t r2400_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" }
+ }
+};
+
+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[] =
+{
+ {
+ "Standard",
+ N_("Standard"),
+ 0,
+ 0,
+ 0,
+ { 7, "PP\003\000\000\002\000" },
+ { 0, "" }
+ },
+ {
+ "Roll",
+ N_("Roll Feed"),
+ 0,
+ 1,
+ 0,
+ { 7, "PP\003\000\000\003\000" },
+ { 0, "" }
+ }
+};
+
+DECLARE_INPUT_SLOT(pro_roll_feed);
+
+static const input_slot_t spro5000_input_slots[] =
+{
+ {
+ "CutSheet1",
+ N_("Cut Sheet Bin 1"),
+ 0,
+ 0,
+ 0,
+ { 7, "PP\003\000\000\001\001" },
+ { 0, "" }
+ },
+ {
+ "CutSheet2",
+ N_("Cut Sheet Bin 2"),
+ 0,
+ 0,
+ 0,
+ { 7, "PP\003\000\000\002\001" },
+ { 0, "" }
+ },
+ {
+ "CutSheetAuto",
+ N_("Cut Sheet Autoselect"),
+ 0,
+ 0,
+ 0,
+ { 7, "PP\003\000\000\001\377" },
+ { 0, "" }
+ },
+ {
+ "ManualSelect",
+ N_("Manual Selection"),
+ 0,
+ 0,
+ 0,
+ { 7, "PP\003\000\000\002\001" },
+ { 0, "" }
+ }
+};
+
+DECLARE_INPUT_SLOT(spro5000);
+
+static const input_slot_list_t default_input_slot_list =
+{
+ "Standard",
+ NULL,
+ 0,
+};
+
+typedef struct
+{
+ const char *name;
+ const input_slot_list_t *input_slots;
+} inslot_t;
+
+static const inslot_t the_slots[] =
+{
+ { "cd_cutter_roll_feed", &cd_cutter_roll_feed_input_slot_list },
+ { "cd_roll_feed", &cd_roll_feed_input_slot_list },
+ { "cutter_roll_feed", &cutter_roll_feed_input_slot_list },
+ { "default", &default_input_slot_list },
+ { "pro_roll_feed", &pro_roll_feed_input_slot_list },
+ { "r1800", &r1800_input_slot_list },
+ { "r2400", &r2400_input_slot_list },
+ { "rx700", &rx700_input_slot_list },
+ { "spro5000", &spro5000_input_slot_list },
+ { "standard_roll_feed", &standard_roll_feed_input_slot_list },
+};
+
+const input_slot_list_t *
+stpi_escp2_get_input_slot_list_named(const char *n)
+{
+ int i;
+ if (n)
+ for (i = 0; i < sizeof(the_slots) / sizeof(inslot_t); i++)
+ {
+ if (strcmp(n, the_slots[i].name) == 0)
+ return the_slots[i].input_slots;
+ }
+ return NULL;
+}
diff --git a/src/main/escp2-resolutions.c b/src/main/escp2-resolutions.c
index 9dfe8e7..22db6c7 100644
--- a/src/main/escp2-resolutions.c
+++ b/src/main/escp2-resolutions.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-resolutions.c,v 1.33 2006/05/06 21:30:59 rlk Exp $"
+ * "$Id: escp2-resolutions.c,v 1.33.8.2 2007/05/29 01:47:28 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -31,163 +31,154 @@
static const res_t r_360x90dpi =
{ "360x90dpi", N_("360 x 90 DPI Fast Economy"),
- 360, 90, 360, 90, 0, 0, 1 };
+ 360, 90, 360, 90, 360, 90, 0, 0, 1 };
static const res_t r_360x90sw =
{ "360x90sw", N_("360 x 90 DPI Fast Economy"),
- 360, 90, 360, 90, 1, 0, 1 };
+ 360, 90, 360, 90, 360, 90, 1, 0, 1 };
static const res_t r_360x120dpi =
{ "360x120dpi", N_("360 x 120 DPI Economy"),
- 360, 120, 360, 120, 0, 0, 1 };
+ 360, 120, 360, 120, 360, 120, 0, 0, 1 };
static const res_t r_360x120sw =
{ "360x120sw", N_("360 x 120 DPI Economy"),
- 360, 120, 360, 120, 1, 0, 1 };
+ 360, 120, 360, 120, 360, 120, 1, 0, 1 };
static const res_t r_180dpi =
{ "180dpi", N_("180 DPI Economy"),
- 180, 180, 180, 180, 0, 0, 1 };
+ 180, 180, 180, 180, 180, 180, 0, 0, 1 };
static const res_t r_180sw =
{ "180sw", N_("180 DPI Economy"),
- 180, 180, 180, 180, 1, 0, 1 };
+ 180, 180, 180, 180, 180, 180, 1, 0, 1 };
static const res_t r_360x180dpi =
{ "360x180dpi", N_("360 x 180 DPI Draft"),
- 360, 180, 360, 180, 0, 0, 1 };
+ 360, 180, 360, 180, 360, 180, 0, 0, 1 };
static const res_t r_360x180sw =
{ "360x180sw", N_("360 x 180 DPI Draft"),
- 360, 180, 360, 180, 1, 0, 1 };
+ 360, 180, 360, 180, 360, 180, 1, 0, 1 };
static const res_t r_360x240dpi =
{ "360x240dpi", N_("360 x 240 DPI Draft"),
- 360, 240, 360, 240, 0, 0, 1 };
+ 360, 240, 360, 240, 360, 240, 0, 0, 1 };
static const res_t r_360x240sw =
{ "360x240sw", N_("360 x 240 DPI Draft"),
- 360, 240, 360, 240, 1, 0, 1 };
+ 360, 240, 360, 240, 360, 240, 1, 0, 1 };
static const res_t r_360mw =
{ "360mw", N_("360 DPI High Quality"),
- 360, 360, 360, 360, 0, 1, 1 };
+ 360, 360, 360, 360, 360, 360, 0, 1, 1 };
static const res_t r_360pro =
{ "360pro", N_("360 DPI"),
- 360, 360, 360, 360, 0, 1, 1 };
+ 360, 360, 360, 360, 360, 360, 0, 1, 1 };
static const res_t r_360 =
{ "360", N_("360 DPI"),
- 360, 360, 360, 360, 0, 0, 1 };
+ 360, 360, 360, 360, 360, 360, 0, 0, 1 };
static const res_t r_360sw =
{ "360sw", N_("360 DPI"),
- 360, 360, 360, 360, 1, 0, 1 };
+ 360, 360, 360, 360, 360, 360, 1, 0, 1 };
static const res_t r_720x360mw =
{ "720x360mw", N_("720 x 360 DPI"),
- 720, 360, 720, 360, 0, 1, 1 };
+ 720, 360, 720, 360, 720, 360, 0, 1, 1 };
static const res_t r_720x360sw =
{ "720x360sw", N_("720 x 360 DPI"),
- 720, 360, 720, 360, 1, 0, 1 };
+ 720, 360, 720, 360, 720, 360, 1, 0, 1 };
+static const res_t r_720x360un =
+{ "720x360un", N_("720 x 360 DPI Enhanced"),
+ 720, 360, 1440, 720, 720, 360, 1, 0, 1 };
static const res_t r_720mw =
{ "720mw", N_("720 DPI"),
- 720, 720, 720, 720, 0, 1, 1 };
+ 720, 720, 720, 720, 720, 720, 0, 1, 1 };
static const res_t r_720sw =
{ "720sw", N_("720 DPI"),
- 720, 720, 720, 720, 1, 0, 1 };
+ 720, 720, 720, 720, 720, 720, 1, 0, 1 };
+static const res_t r_720un =
+{ "720un", N_("720 DPI High Quality"),
+ 720, 720, 1440, 720, 720, 720, 1, 0, 1 };
static const res_t r_720hq =
{ "720hq", N_("720 DPI High Quality"),
- 720, 720, 720, 720, 1, 0, 2 };
+ 720, 720, 720, 720, 720, 720, 1, 0, 2 };
static const res_t r_720hq2 =
{ "720hq2", N_("720 DPI Highest Quality"),
- 720, 720, 720, 720, 1, 0, 4 };
+ 720, 720, 720, 720, 720, 720, 1, 0, 4 };
static const res_t r_720x720oov =
{ "720x720oov", N_("720 x 720 DPI"),
- 2880, 720, 720, 720, 1, 0, 1 };
+ 2880, 720, 2880, 720, 720, 720, 1, 0, 1 };
static const res_t r_1440x720mw =
{ "1440x720mw", N_("1440 x 720 DPI"),
- 1440, 720, 1440, 720, 0, 1, 1 };
+ 1440, 720, 1440, 720, 1440, 720, 0, 1, 1 };
static const res_t r_1440x720sw =
{ "1440x720sw", N_("1440 x 720 DPI"),
- 1440, 720, 1440, 720, 1, 0, 1 };
+ 1440, 720, 1440, 720, 1440, 720, 1, 0, 1 };
static const res_t r_1440x720hq2 =
{ "1440x720hq2", N_("1440 x 720 DPI Highest Quality"),
- 1440, 720, 1440, 720, 1, 0, 2 };
+ 1440, 720, 1440, 720, 1440, 720, 1, 0, 2 };
static const res_t r_720x1440sw =
{ "720x1440sw", N_("1440 x 720 DPI Transposed"),
- 720, 1440, 720, 1440, 1, 0, 1 };
+ 720, 1440, 720, 1440, 720, 1440, 1, 0, 1 };
static const res_t r_720x1440ov =
{ "720x1440ov", N_("1440 x 720 DPI Transposed"),
- 1440, 1440, 720, 1440, 1, 0, 1};
+ 1440, 1440, 1440, 1440, 720, 1440, 1, 0, 1};
static const res_t r_1440x720ov =
{ "1440x720ov", N_("1440 x 720 DPI"),
- 2880, 720, 1440, 720, 1, 0, 1 };
+ 2880, 720, 2880, 720, 1440, 720, 1, 0, 1 };
static const res_t r_2880x720mw =
{ "2880x720mw", N_("2880 x 720 DPI"),
- 2880, 720, 2880, 720, 0, 1, 1};
+ 2880, 720, 2880, 720, 2880, 720, 0, 1, 1};
static const res_t r_2880x720sw =
{ "2880x720sw", N_("2880 x 720 DPI"),
- 2880, 720, 2880, 720, 1, 0, 1};
+ 2880, 720, 2880, 720, 2880, 720, 1, 0, 1};
static const res_t r_2880x720hq2 =
{ "2880x720hq2", N_("2880 x 720 DPI Highest Quality"),
- 2880, 720, 2880, 720, 1, 0, 2 };
+ 2880, 720, 2880, 720, 2880, 720, 1, 0, 2 };
static const res_t r_1440x1440mw =
{ "1440x1440mw", N_("1440 x 1440 DPI"),
- 1440, 1440, 1440, 1440, 0, 1, 1};
+ 1440, 1440, 1440, 1440, 1440, 1440, 0, 1, 1};
static const res_t r_1440x1440sw =
{ "1440x1440sw", N_("1440 x 1440 DPI"),
- 1440, 1440, 1440, 1440, 1, 0, 1};
+ 1440, 1440, 1440, 1440, 1440, 1440, 1, 0, 1};
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};
+ 2880, 1440, 2880, 1440, 1440, 1440, 1, 0, 1};
static const res_t r_2880x1440mw =
{ "2880x1440mw", N_("2880 x 1440 DPI"),
- 2880, 1440, 2880, 1440, 0, 1, 1};
+ 2880, 1440, 2880, 1440, 2880, 1440, 0, 1, 1};
static const res_t r_2880x1440sw =
{ "2880x1440sw", N_("2880 x 1440 DPI"),
- 2880, 1440, 2880, 1440, 1, 0, 1};
+ 2880, 1440, 2880, 1440, 2880, 1440, 1, 0, 1};
static const res_t r_1440x2880sw =
{ "1440x2880sw", N_("2880 x 1440 DPI Transposed"),
- 1440, 2880, 1440, 2880, 1, 0, 1};
+ 1440, 2880, 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};
+ 1440, 2880, 1440, 2880, 1440, 2880, 1, 0, 1};
static const res_t r_5760x1440sw =
{ "5760x1440sw", N_("5760 x 1440 DPI"),
- 5760, 1440, 5760, 1440, 1, 0, 1};
+ 5760, 1440, 5760, 1440, 5760, 1440, 1, 0, 1};
static const res_t r_2880x2880mw =
{ "2880x2880mw", N_("2880 x 2880 DPI"),
- 2880, 2880, 2880, 2880, 0, 1, 1};
+ 2880, 2880, 2880, 2880, 2880, 2880, 0, 1, 1};
static const res_t r_2880x2880sw =
{ "2880x2880sw", N_("2880 x 2880 DPI"),
- 2880, 2880, 2880, 2880, 1, 0, 1};
+ 2880, 2880, 2880, 2880, 2880, 2880, 1, 0, 1};
static const res_t r_5760x2880mw =
{ "5760x2880mw", N_("5760 x 2880 DPI"),
- 5760, 2880, 5760, 2880, 0, 1, 1};
+ 5760, 2880, 5760, 2880, 5760, 2880, 0, 1, 1};
static const res_t r_5760x2880sw =
{ "5760x2880sw", N_("5760 x 2880 DPI"),
- 5760, 2880, 5760, 2880, 1, 0, 1};
+ 5760, 2880, 5760, 2880, 5760, 2880, 1, 0, 1};
-const res_t *const stpi_escp2_720dpi_reslist[] =
+static const res_t *const stpi_escp2_720dpi_reslist[] =
{
&r_360x90dpi,
@@ -209,7 +200,7 @@ const res_t *const stpi_escp2_720dpi_reslist[] =
NULL
};
-const res_t *const stpi_escp2_1440dpi_reslist[] =
+static const res_t *const stpi_escp2_1440dpi_reslist[] =
{
&r_360x90sw,
@@ -234,7 +225,7 @@ const res_t *const stpi_escp2_1440dpi_reslist[] =
NULL
};
-const res_t *const stpi_escp2_2880dpi_reslist[] =
+static const res_t *const stpi_escp2_2880dpi_reslist[] =
{
&r_360x90sw,
@@ -261,7 +252,7 @@ const res_t *const stpi_escp2_2880dpi_reslist[] =
NULL
};
-const res_t *const stpi_escp2_2880_1440dpi_reslist[] =
+static const res_t *const stpi_escp2_2880_1440dpi_reslist[] =
{
&r_360x90sw,
@@ -280,21 +271,19 @@ const res_t *const stpi_escp2_2880_1440dpi_reslist[] =
&r_720sw,
&r_1440x720sw,
- &r_720x1440sw,
&r_2880x720sw,
&r_1440x1440sw,
&r_2880x1440sw,
- &r_1440x2880sw,
&r_2880x2880sw,
NULL
};
-const res_t *const stpi_escp2_g3_reslist[] =
+static const res_t *const stpi_escp2_g3_reslist[] =
{
&r_360x90dpi,
@@ -320,8 +309,10 @@ const res_t *const stpi_escp2_g3_reslist[] =
NULL
};
-const res_t *const stpi_escp2_superfine_reslist[] =
+static const res_t *const stpi_escp2_superfine_reslist[] =
{
+ &r_360x90sw,
+
&r_360x120sw,
&r_360x180sw,
@@ -335,12 +326,12 @@ const res_t *const stpi_escp2_superfine_reslist[] =
&r_720sw,
&r_1440x720sw,
- &r_720x1440sw,
&r_1440x1440ov,
&r_2880x1440sw,
- &r_1440x2880sw,
+
+ &r_5760x1440sw,
&r_2880x2880sw,
@@ -349,9 +340,9 @@ const res_t *const stpi_escp2_superfine_reslist[] =
NULL
};
-const res_t *const stpi_escp2_r2400_reslist[] =
+static const res_t *const stpi_escp2_claria_1400_reslist[] =
{
- &r_360x120sw,
+ &r_360x90sw,
&r_360x180sw,
@@ -361,45 +352,28 @@ const res_t *const stpi_escp2_r2400_reslist[] =
&r_720x360sw,
- &r_720sw,
-
- &r_1440x720sw,
- &r_720x1440sw,
-
- &r_1440x1440sw,
-
- &r_2880x1440sw2400,
- &r_2880x1440sw2400hq,
- &r_2880x1440sw2400hq2,
+ &r_720x360un,
- NULL
-};
+ &r_720sw,
-const res_t *const stpi_escp2_cx3650_reslist[] =
-{
- &r_360x120sw,
+ &r_720un,
- &r_360x180sw,
-
- &r_360x240sw,
+ &r_1440x720sw,
- &r_360sw,
+ &r_1440x1440ov,
- &r_720x360sw,
+ &r_2880x1440sw,
- &r_720sw,
+ &r_5760x1440sw,
- &r_1440x720sw,
- &r_720x1440sw,
+ &r_2880x2880sw,
- &r_1440x1440sw3650,
- &r_1440x1440sw3650hq,
- &r_1440x1440sw3650hq2,
+ &r_5760x2880sw,
NULL
};
-const res_t *const stpi_escp2_picturemate_reslist[] =
+static const res_t *const stpi_escp2_picturemate_reslist[] =
{
&r_720x720oov,
@@ -417,7 +391,7 @@ const res_t *const stpi_escp2_picturemate_reslist[] =
NULL
};
-const res_t *const stpi_escp2_sc500_reslist[] =
+static const res_t *const stpi_escp2_sc500_reslist[] =
{
&r_360x90dpi,
@@ -439,7 +413,7 @@ const res_t *const stpi_escp2_sc500_reslist[] =
NULL
};
-const res_t *const stpi_escp2_g3_720dpi_reslist[] =
+static const res_t *const stpi_escp2_g3_720dpi_reslist[] =
{
&r_360x90dpi,
@@ -463,7 +437,7 @@ const res_t *const stpi_escp2_g3_720dpi_reslist[] =
NULL
};
-const res_t *const stpi_escp2_720dpi_soft_reslist[] =
+static const res_t *const stpi_escp2_720dpi_soft_reslist[] =
{
&r_360x90dpi,
@@ -486,7 +460,7 @@ const res_t *const stpi_escp2_720dpi_soft_reslist[] =
NULL
};
-const res_t *const stpi_escp2_sc640_reslist[] =
+static const res_t *const stpi_escp2_sc640_reslist[] =
{
&r_360x90dpi,
@@ -507,7 +481,7 @@ const res_t *const stpi_escp2_sc640_reslist[] =
NULL
};
-const res_t *const stpi_escp2_pro_reslist[] =
+static const res_t *const stpi_escp2_pro_reslist[] =
{
&r_360x90dpi,
@@ -534,11 +508,47 @@ const res_t *const stpi_escp2_pro_reslist[] =
NULL
};
+typedef struct
+{
+ const char *name;
+ const res_t *const *const res_list;
+} resolution_t;
+
+static const resolution_t the_resolutions[] =
+{
+ { "superfine", stpi_escp2_superfine_reslist },
+ { "claria_1400", stpi_escp2_claria_1400_reslist },
+ { "pro", stpi_escp2_pro_reslist },
+ { "720dpi", stpi_escp2_720dpi_reslist },
+ { "720dpi_soft", stpi_escp2_720dpi_soft_reslist },
+ { "g3_720dpi", stpi_escp2_g3_720dpi_reslist },
+ { "1440dpi", stpi_escp2_1440dpi_reslist },
+ { "2880dpi", stpi_escp2_2880dpi_reslist },
+ { "2880_1440dpi", stpi_escp2_2880_1440dpi_reslist },
+ { "g3", stpi_escp2_g3_reslist },
+ { "sc500", stpi_escp2_sc500_reslist },
+ { "sc640", stpi_escp2_sc640_reslist },
+ { "picturemate", stpi_escp2_picturemate_reslist },
+};
+
+const res_t *const *
+stpi_escp2_get_reslist_named(const char *n)
+{
+ int i;
+ if (n)
+ for (i = 0; i < sizeof(the_resolutions) / sizeof(resolution_t); i++)
+ {
+ if (strcmp(n, the_resolutions[i].name) == 0)
+ return the_resolutions[i].res_list;
+ }
+ return NULL;
+}
+
#define DECLARE_PRINTER_WEAVES(name) \
-const printer_weave_list_t stpi_escp2_##name##_printer_weave_list = \
+static const printer_weave_list_t name##_printer_weave_list = \
{ \
#name, \
- sizeof(name##_printer_weaves) / sizeof(printer_weave_t), \
+ sizeof(name##_printer_weaves) / sizeof(printer_weave_t), \
name##_printer_weaves \
}
@@ -585,3 +595,108 @@ static const printer_weave_t pro7600_printer_weaves[] =
};
DECLARE_PRINTER_WEAVES(pro7600);
+
+typedef struct
+{
+ const char *name;
+ const printer_weave_list_t *weave_list;
+} weave_t;
+
+static const weave_t the_weaves[] =
+{
+ { "standard", &standard_printer_weave_list },
+ { "pro7000", &pro7000_printer_weave_list },
+ { "pro7500", &pro7500_printer_weave_list },
+ { "pro7600", &pro7600_printer_weave_list },
+};
+
+const printer_weave_list_t *
+stpi_escp2_get_printer_weaves_named(const char *n)
+{
+ int i;
+ if (n)
+ for (i = 0; i < sizeof(the_weaves) / sizeof(weave_t); i++)
+ {
+ if (strcmp(n, the_weaves[i].name) == 0)
+ return the_weaves[i].weave_list;
+ }
+ return NULL;
+}
+
+
+#define DECLARE_QUALITY_LIST(name) \
+static const quality_list_t name##_quality_list = \
+{ \
+ #name, \
+ name##_qualities, \
+ sizeof(name##_qualities) / sizeof(const quality_t), \
+}
+
+static const quality_t standard_qualities[] =
+{
+ { "FastEconomy", N_("Fast Economy"), 180, 90, 360, 120, 360, 90 },
+ { "Economy", N_("Economy"), 360, 180, 360, 240, 360, 180 },
+ { "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, 720, 2880, 720, 1440, 720 },
+ { "HighPhoto", N_("Super Photo"), 1440, 1440, 2880, 1440, 1440, 1440 },
+ { "UltraPhoto", N_("Ultra Photo"), 2880, 2880, 2880, 2880, 2880, 2880 },
+ { "Best", N_("Best"), 720, 360, 0, 0, -1, -1 },
+};
+
+DECLARE_QUALITY_LIST(standard);
+
+static const quality_t p1_5_qualities[] =
+{
+ { "FastEconomy", N_("Fast Economy"), 180, 90, 360, 120, 360, 90 },
+ { "Economy", N_("Economy"), 360, 180, 360, 240, 360, 180 },
+ { "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, 720, 1440, 720, 1440, 720 },
+ { "HighPhoto", N_("Super Photo"), 1440, 1440, 2880, 1440, 1440, 1440 },
+ { "UltraPhoto", N_("Ultra Photo"), 2880, 2880, 2880, 2880, 2880, 2880 },
+ { "Best", N_("Best"), 720, 360, 0, 0, -1, -1 },
+};
+
+DECLARE_QUALITY_LIST(p1_5);
+
+static const quality_t picturemate_qualities[] =
+{
+ { "Draft", N_("Draft"), 1440, 720, 1440, 720, 1440, 720 },
+ { "Standard", N_("Standard"), 1440, 1440, 1440, 1440, 1440, 1440 },
+ { "Photo", N_("Photo"), 1440, 1440, 1440, 1440, 1440, 1440 },
+ { "High", N_("High"), 2880, 1440, 2880, 1440, 2880, 1440 },
+ { "HighPhoto", N_("Super Photo"), 2880, 1440, 2880, 1440, 2880, 1440 },
+ { "UltraPhoto", N_("Ultra Photo"), 5760, 1440, 5760, 1440, 5760, 1440 },
+ { "Best", N_("Best"), 5760, 1440, 5760, 1440, 5760, 1440 },
+};
+
+DECLARE_QUALITY_LIST(picturemate);
+
+typedef struct
+{
+ const char *name;
+ const quality_list_t *quality_list;
+} qual_t;
+
+static const qual_t the_qualities[] =
+{
+ { "standard", &standard_quality_list },
+ { "p1_5", &p1_5_quality_list },
+ { "picturemate", &picturemate_quality_list },
+};
+
+const quality_list_t *
+stpi_escp2_get_quality_list_named(const char *n)
+{
+ int i;
+ if (n)
+ for (i = 0; i < sizeof(the_qualities) / sizeof(qual_t); i++)
+ {
+ if (strcmp(n, the_qualities[i].name) == 0)
+ return the_qualities[i].quality_list;
+ }
+ return NULL;
+}
diff --git a/src/main/papers.xml b/src/main/papers.xml
index 4f2bacd..c8a017b 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.21 2006/04/20 00:33:41 rlk Exp $"
+ "$Id: papers.xml,v 1.21.8.1 2007/03/02 12:01:26 rlk Exp $"
-->
<!--
@@ -68,6 +68,13 @@
<height value="184"/>
<unit value="english"/>
</paper>
+ <paper name="CDCustom">
+ <description value="CD - Custom"/>
+ <comment value="CD, custom diameter"/>
+ <width value="337"/>
+ <height value="337"/>
+ <unit value="english"/>
+ </paper>
<paper name="w216h360">
<description value="3x5"/>
<width value="216"/>
@@ -940,11 +947,11 @@
<height value="337"/>
<unit value="metric-extended"/>
</paper>
- <paper name="w244h155">
+ <paper name="w155h244">
<description value="Card"/>
<comment value="86mm x 54mm"/>
- <width value="244"/>
- <height value="155"/>
+ <width value="155"/>
+ <height value="244"/>
<unit value="metric-extended"/>
</paper>
<paper name="w283h566">
diff --git a/src/main/print-canon.c b/src/main/print-canon.c
index 5104c40..06e3b49 100644
--- a/src/main/print-canon.c
+++ b/src/main/print-canon.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-canon.c,v 1.174 2006/05/28 16:59:04 rlk Exp $"
+ * "$Id: print-canon.c,v 1.190.2.3 2007/05/29 01:47:28 rlk Exp $"
*
* Print plug-in CANON BJL driver for the GIMP.
*
@@ -7,6 +7,8 @@
* Robert Krawitz (rlk@alum.mit.edu) and
* Andy Thaller (thaller@ph.tum.de)
*
+ * Copyright (c) 2006 - 2007 Sascha Sommer (saschasommer@freenet.de)
+ *
* 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)
@@ -38,7 +40,6 @@
* * adjust the colors of all supported models
*
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -56,102 +57,22 @@
#include <limits.h>
#endif
#include <math.h>
-/* Solaris with gcc has problems because gcc's limits.h doesn't #define */
-/* this */
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-#if (0)
-#define EXPERIMENTAL_STUFF 0
-#endif
+#include "print-canon.h"
+
+#ifndef MIN
+# define MIN(a,b) (((a)<(b)) ? (a) : (b))
+#endif /* !MIN */
+#ifndef MAX
+# define MAX(a, b) ((a) > (b) ? (a) : (b))
+#endif /* !MAX */
+
+
+
+
+#define RASTER_LINES_PER_BLOCK 8 /* number of raster lines in every F) command */
-#define MAX_CARRIAGE_WIDTH 13 /* This really needs to go away */
-/*
- * We really need to get away from this silly static nonsense...
- */
-#define MAX_PHYSICAL_BPI 1440
-#define MAX_OVERSAMPLED 8
-#define MAX_BPP 4
-#define COMPBUFWIDTH (MAX_PHYSICAL_BPI * MAX_OVERSAMPLED * MAX_BPP * \
- MAX_CARRIAGE_WIDTH / CHAR_BIT)
-
-#define MIN(a,b) (((a)<(b)) ? (a) : (b))
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-
-/* the PIXMA iP4000 and maybe other printers use following table to store
- 5 pixels with 3 levels in 1 byte, All possible pixel combinations are given
- numbers from 0 (=00,00,00,00,00) to 242 (=10,10,10,10,10)
- combinations where the value of one of the pixels would be 3 are skipped
-*/
-static const unsigned char tentoeight[] =
-{
- 0, 1, 2, 0, 3, 4, 5, 0, 6, 7, 8, 0, 0, 0, 0, 0,
- 9, 10, 11, 0, 12, 13, 14, 0, 15, 16, 17, 0, 0, 0, 0, 0,
- 18, 19, 20, 0, 21, 22, 23, 0, 24, 25, 26, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 27, 28, 29, 0, 30, 31, 32, 0, 33, 34, 35, 0, 0, 0, 0, 0,
- 36, 37, 38, 0, 39, 40, 41, 0, 42, 43, 44, 0, 0, 0, 0, 0,
- 45, 46, 47, 0, 48, 49, 50, 0, 51, 52, 53, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 54, 55, 56, 0, 57, 58, 59, 0, 60, 61, 62, 0, 0, 0, 0, 0,
- 63, 64, 65, 0, 66, 67, 68, 0, 69, 70, 71, 0, 0, 0, 0, 0,
- 72, 73, 74, 0, 75, 76, 77, 0, 78, 79, 80, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 81, 82, 83, 0, 84, 85, 86, 0, 87, 88, 89, 0, 0, 0, 0, 0,
- 90, 91, 92, 0, 93, 94, 95, 0, 96, 97, 98, 0, 0, 0, 0, 0,
- 99,100,101, 0,102,103,104, 0,105,106,107, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 108,109,110, 0,111,112,113, 0,114,115,116, 0, 0, 0, 0, 0,
- 117,118,119, 0,120,121,122, 0,123,124,125, 0, 0, 0, 0, 0,
- 126,127,128, 0,129,130,131, 0,132,133,134, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 135,136,137, 0,138,139,140, 0,141,142,143, 0, 0, 0, 0, 0,
- 144,145,146, 0,147,148,149, 0,150,151,152, 0, 0, 0, 0, 0,
- 153,154,155, 0,156,157,158, 0,159,160,161, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 162,163,164, 0,165,166,167, 0,168,169,170, 0, 0, 0, 0, 0,
- 171,172,173, 0,174,175,176, 0,177,178,179, 0, 0, 0, 0, 0,
- 180,181,182, 0,183,184,185, 0,186,187,188, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 189,190,191, 0,192,193,194, 0,195,196,197, 0, 0, 0, 0, 0,
- 198,199,200, 0,201,202,203, 0,204,205,206, 0, 0, 0, 0, 0,
- 207,208,209, 0,210,211,212, 0,213,214,215, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 216,217,218, 0,219,220,221, 0,222,223,224, 0, 0, 0, 0, 0,
- 225,226,227, 0,228,229,230, 0,231,232,233, 0, 0, 0, 0, 0,
- 234,235,236, 0,237,238,239, 0,240,241,242, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
static int
pack_pixels(unsigned char* buf,int len)
@@ -184,641 +105,7 @@ pack_pixels(unsigned char* buf,int len)
return write_pos;
}
-static const int channel_color_map[] =
-{
- STP_ECOLOR_K, STP_ECOLOR_C, STP_ECOLOR_M, STP_ECOLOR_Y, STP_ECOLOR_C, STP_ECOLOR_M, STP_ECOLOR_Y
-};
-
-static const int subchannel_color_map[] =
-{
- 0, 0, 0, 0, 1, 1, 1
-};
-
-/* K,C,M,Y */
-static const double ink_darknesses[] =
-{
- 1.0, 0.31 / .5, 0.61 / .97, 0.08
-};
-
-#define USE_3BIT_FOLD_TYPE 323
-
-/*
- * For each printer, we can select from a variety of dot sizes.
- * For single dot size printers, the available sizes are usually 0,
- * which is the "default", and some subset of 1-4. For simple variable
- * dot size printers (with only one kind of variable dot size), the
- * variable dot size is specified as 0x10. For newer printers, there
- * is a choice of variable dot sizes available, 0x10, 0x11, and 0x12 in
- * order of increasing size.
- *
- * Normally, we want to specify the smallest dot size that lets us achieve
- * a density of less than .8 or thereabouts (above that we start to get
- * some dither artifacts). This needs to be tested for each printer and
- * resolution.
- *
- * An entry of -1 in a slot means that this resolution is not available.
- * 0 standard dot sizes are used.
- * 1 drop modulation is used.
- */
-
-/* We know a per-model base resolution (like 180dpi or 150dpi)
- * and multipliers for the base resolution in the dotsize-, densities-
- * and inklist:
- * for 180dpi base resolution we would have
- * s_r11_4 for 4color ink @180dpi
- * s_r22_4 for 4color ink @360dpi
- * s_r33_4 for 4color ink @720dpi
- * s_r43_4 for 4color ink @1440x720dpi
- */
-
-typedef struct canon_dot_sizes
-{
- int dot_r11; /* 180x180 or 150x150 */
- int dot_r22; /* 360x360 or 300x300 */
- int dot_r33; /* 720x720 or 600x600 */
- int dot_r43; /* 1440x720 or 1200x600 */
- int dot_r44; /* 1440x1440 or 1200x1200 */
- int dot_r55; /* 2880x2880 or 2400x2400 */
-} canon_dot_size_t;
-
-/*
- * Specify the base density for each available resolution.
- *
- */
-
-typedef struct canon_densities
-{
- double d_r11; /* 180x180 or 150x150 */
- double d_r22; /* 360x360 or 300x300 */
- double d_r33; /* 720x720 or 600x600 */
- double d_r43; /* 1440x720 or 1200x600 */
- double d_r44; /* 1440x1440 or 1200x1200 */
- double d_r55; /* 2880x2880 or 2400x2400 */
-} canon_densities_t;
-
-
-
-/*
- * Definition of the multi-level inks available to a given printer.
- * Each printer may use a different kind of ink droplet for variable
- * and single drop size for each supported horizontal resolution and
- * type of ink (4 or 6 color).
- *
- * Recall that 6 color ink is treated as simply another kind of
- * multi-level ink, but the driver offers the user a choice of 4 and
- * 6 color ink, so we need to define appropriate inksets for both
- * kinds of ink.
- *
- * Stuff like the MIS 4 and 6 "color" monochrome inks doesn't fit into
- * this model very nicely, so we'll either have to special case it
- * or find some way of handling it in here.
- */
-
-typedef struct canon_variable_ink
-{
- double density;
- const stp_shade_t *shades;
- int numshades;
-} canon_variable_ink_t;
-
-typedef struct canon_variable_inkset
-{
- const canon_variable_ink_t *c;
- const canon_variable_ink_t *m;
- const canon_variable_ink_t *y;
- const canon_variable_ink_t *k;
-} canon_variable_inkset_t;
-
-/*
- * currenty unaccounted for are the 7color printers and the 3color ones
- * (which use CMY only printheads)
- *
- */
-
-typedef struct canon_variable_inklist
-{
- const int bits;
- const int colors;
- const canon_variable_inkset_t *r11; /* 180x180 or 150x150 */
- const canon_variable_inkset_t *r22; /* 360x360 or 300x300 */
- const canon_variable_inkset_t *r33; /* 720x720 or 600x600 */
- const canon_variable_inkset_t *r43; /* 1440x720 or 1200x600 */
- const canon_variable_inkset_t *r44; /* 1440x1440 or 1200x1200 */
- const canon_variable_inkset_t *r55; /* 2880x2880 or 2400x2400 */
-} canon_variable_inklist_t;
-
-
-#ifdef EXPERIMENTAL_STUFF
-/*
- * A printmode is defined by its resolution (xdpi x ydpi), the bits per pixel
- * and the installed printhead.
- *
- * For a hereby defined printmode we specify the density and gamma multipliers
- * and the ink definition with optional adjustments for lum, hue and sat
- *
- */
-typedef struct canon_variable_printmode
-{
- const int xdpi; /* horizontal resolution */
- const int ydpi; /* vertical resolution */
- const int bits; /* bits per pixel */
- const int printhead; /* installed printhead */
- const int quality; /* maximum init-quality */
- const double density; /* density multiplier */
- const double gamma; /* gamma multiplier */
- const canon_variable_inkset_t *inks; /* ink definition */
- const char *lum_adjustment; /* optional lum adj. */
- const char *hue_adjustment; /* optional hue adj. */
- const char *sat_adjustment; /* optional sat adj. */
-} canon_variable_printmode_t;
-#endif
-
-/* NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
- *
- * The following dither ranges were taken from print-escp2.c and do NOT
- * represent the requirements of canon inks. Feel free to play with them
- * accoring to the escp2 part of doc/README.new-printer and send me a patch
- * if you get better results. Please send mail to thaller@ph.tum.de
- */
-
-#define DECLARE_INK(name, density) \
-static const canon_variable_ink_t name##_ink = \
-{ \
- density, \
- name##_shades, \
- sizeof(name##_shades) / sizeof(stp_shade_t) \
-}
-
-#define SHADE(density, name) \
-{ density, sizeof(name)/sizeof(stp_dotsize_t), name }
-
-/*
- * Dither ranges specifically for Cyan/LightCyan (see NOTE above)
- *
- */
-
-static const stp_dotsize_t single_dotsize[] =
-{
- { 0x1, 1.0 }
-};
-
-static const stp_shade_t canon_Cc_1bit_shades[] =
-{
- SHADE(1.0, single_dotsize),
- SHADE(0.25, single_dotsize),
-};
-
-DECLARE_INK(canon_Cc_1bit, 0.75);
-
-/*
- * Dither ranges specifically for Magenta/LightMagenta (see NOTE above)
- *
- */
-
-static const stp_shade_t canon_Mm_1bit_shades[] =
-{
- SHADE(1.0, single_dotsize),
- SHADE(0.26, single_dotsize),
-};
-
-DECLARE_INK(canon_Mm_1bit, 0.75);
-
-/*
- * Dither ranges specifically for any Color and 2bit/pixel (see NOTE above)
- *
- */
-static const stp_dotsize_t two_bit_dotsize[] =
-{
- { 0x1, 0.45 },
- { 0x2, 0.68 },
- { 0x3, 1.0 }
-};
-
-static const stp_shade_t canon_X_2bit_shades[] =
-{
- SHADE(1.0, two_bit_dotsize)
-};
-
-DECLARE_INK(canon_X_2bit, 1.0);
-
-static const stp_dotsize_t two_bit_3level_dotsize[] =
-{
- { 0x1, 0.5 },
- { 0x2, 1.0 }
-};
-
-static const stp_shade_t canon_X_2bit_3level_shades[] =
-{
- SHADE(1.0, two_bit_3level_dotsize)
-};
-DECLARE_INK(canon_X_2bit_3level,0.75);
-
-/*
- * Dither ranges for black 1bit/pixel (even though photo black
- * is not used parameters for it have to be set in the t) command
- */
-
-static const stp_shade_t canon_K_1bit_pixma_shades[] =
-{
- SHADE(1.0, single_dotsize),
- SHADE(0.0, two_bit_3level_dotsize),
-};
-DECLARE_INK(canon_K_1bit_pixma,1.0);
-
-static const stp_dotsize_t two_bit_4level_dotsize[] =
-{
- { 0x1, 0.25 },
- { 0x2, 0.50 },
- { 0x3, 1.00 }
-};
-
-static const stp_shade_t canon_X_2bit_4level_shades[] =
-{
- SHADE(1.0, two_bit_4level_dotsize)
-};
-DECLARE_INK(canon_X_2bit_4level,0.75);
-
-/*
- * Dither ranges specifically for any Color/LightColor and 2bit/pixel
- * (see NOTE above)
- */
-static const stp_shade_t canon_Xx_2bit_shades[] =
-{
- SHADE(1.0, two_bit_dotsize),
- SHADE(0.33, two_bit_dotsize),
-};
-
-DECLARE_INK(canon_Xx_2bit, 1.0);
-
-/*
- * Dither ranges specifically for any Color and 3bit/pixel
- * (see NOTE above)
- *
- * BIG NOTE: The bjc8200 has this kind of ink. One Byte seems to hold
- * drop sizes for 3 pixels in a 3/2/2 bit fashion.
- * Size values for 3bit-sized pixels range from 1 to 7,
- * size values for 2bit-sized picels from 1 to 3 (kill msb).
- *
- *
- */
-static const stp_dotsize_t three_bit_dotsize[] =
-{
- { 0x1, 0.45 },
- { 0x2, 0.55 },
- { 0x3, 0.66 },
- { 0x4, 0.77 },
- { 0x5, 0.88 },
- { 0x6, 1.0 }
-};
-
-static const stp_shade_t canon_X_3bit_shades[] =
-{
- SHADE(1.0, three_bit_dotsize)
-};
-
-DECLARE_INK(canon_X_3bit, 1.0);
-
-/*
- * Dither ranges specifically for any Color/LightColor and 3bit/pixel
- * (see NOTE above)
- */
-static const stp_shade_t canon_Xx_3bit_shades[] =
-{
- SHADE(1.0, three_bit_dotsize),
- SHADE(0.33, three_bit_dotsize),
-};
-
-DECLARE_INK(canon_Xx_3bit, 1.0);
-
-
-/* Inkset for printing in CMY and 1bit/pixel */
-static const canon_variable_inkset_t ci_CMY_1 =
-{
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-/* Inkset for printing in CMY and 2bit/pixel */
-static const canon_variable_inkset_t ci_CMY_2 =
-{
- &canon_X_2bit_ink,
- &canon_X_2bit_ink,
- &canon_X_2bit_ink,
- NULL
-};
-
-/* Inkset for printing in CMYK and 1bit/pixel */
-static const canon_variable_inkset_t ci_CMYK_1 =
-{
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-/* Inkset for printing in CMYK and 3level 2bit/pixel
- for C and M, 1bit/pixel for K and Y */
-static const canon_variable_inkset_t ci_CMYK_pixma_1 =
-{
- &canon_X_2bit_3level_ink,
- &canon_X_2bit_3level_ink,
- NULL,
- &canon_K_1bit_pixma_ink,
-};
-
-/* Inkset for printing in CcMmYK and 1bit/pixel */
-static const canon_variable_inkset_t ci_CcMmYK_1 =
-{
- &canon_Cc_1bit_ink,
- &canon_Mm_1bit_ink,
- NULL,
- NULL
-};
-
-/* Inkset for printing in CMYK and 2bit/pixel */
-static const canon_variable_inkset_t ci_CMYK_2 =
-{
- &canon_X_2bit_ink,
- &canon_X_2bit_ink,
- &canon_X_2bit_ink,
- &canon_X_2bit_ink
-};
-
-/* Inkset for printing in CcMmYK and 2bit/pixel */
-static const canon_variable_inkset_t ci_CcMmYK_2 =
-{
- &canon_Xx_2bit_ink,
- &canon_Xx_2bit_ink,
- &canon_X_2bit_ink,
- &canon_X_2bit_ink
-};
-
-/* Inkset for printing in CMYK and 3bit/pixel */
-static const canon_variable_inkset_t ci_CMYK_3 =
-{
- &canon_X_3bit_ink,
- &canon_X_3bit_ink,
- &canon_X_3bit_ink,
- &canon_X_3bit_ink
-};
-
-/* Inkset for printing in CcMmYK and 3bit/pixel */
-static const canon_variable_inkset_t ci_CcMmYK_3 =
-{
- &canon_Xx_3bit_ink,
- &canon_Xx_3bit_ink,
- &canon_X_3bit_ink,
- &canon_X_3bit_ink,
-};
-
-
-typedef canon_variable_inklist_t* canon_variable_inklist_p;
-
-/* Ink set should be applicable for any CMYK based model */
-static const canon_variable_inklist_t canon_ink_standard[] =
-{
- {
- 1,4,
- &ci_CMYK_1, &ci_CMYK_1, &ci_CMYK_1,
- &ci_CMYK_1, &ci_CMYK_1, &ci_CMYK_1,
- },
-};
-
-/* Ink set for normal quality on PIXMA iP4000 */
-static const canon_variable_inklist_t canon_ink_standard_pixma[] =
-{
- {
- 1,4, /* FIXME we have different bit depth for different colors!! */
- &ci_CMYK_pixma_1, &ci_CMYK_pixma_1, &ci_CMYK_pixma_1,
- &ci_CMYK_pixma_1, &ci_CMYK_pixma_1, &ci_CMYK_pixma_1,
- },
-};
-
-/* Ink set for printers using CMY and CMY photo printing, 1 or 2bit/pixel */
-static const canon_variable_inklist_t canon_ink_oldphoto[] =
-{
- {
- 1,3,
- &ci_CMY_1, &ci_CMY_1, &ci_CMY_1,
- &ci_CMY_1, &ci_CMY_1, &ci_CMY_1,
- },
- {
- 2,3,
- &ci_CMY_2, &ci_CMY_2,
- &ci_CMY_2, &ci_CMY_2,
- &ci_CMY_2, &ci_CMY_2,
- },
-};
-
-/* Ink set for printers using CMYK and CcMmYK printing, 1 or 2bit/pixel */
-static const canon_variable_inklist_t canon_ink_standardphoto[] =
-{
- {
- 1,4,
- &ci_CMYK_1, &ci_CMYK_1, &ci_CMYK_1,
- &ci_CMYK_1, &ci_CMYK_1, &ci_CMYK_1,
- },
- {
- 2,4,
- &ci_CMYK_2, &ci_CMYK_2,
- &ci_CMYK_2, &ci_CMYK_2,
- &ci_CMYK_2, &ci_CMYK_2,
- },
- {
- 1,6,
- &ci_CcMmYK_1, &ci_CcMmYK_1, &ci_CcMmYK_1,
- &ci_CcMmYK_1, &ci_CcMmYK_1, &ci_CcMmYK_1,
- },
- {
- 2,6,
- &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 */
-static const canon_variable_inklist_t canon_ink_superphoto[] =
-{
- {
- 1,4,
- &ci_CMYK_1, &ci_CMYK_1, &ci_CMYK_1,
- &ci_CMYK_1, &ci_CMYK_1, &ci_CMYK_1,
- },
- {
- 3,4,
- &ci_CMYK_3, &ci_CMYK_3, &ci_CMYK_3,
- &ci_CMYK_3, &ci_CMYK_3, &ci_CMYK_3,
- },
- {
- 3,6,
- &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,
- },
-};
-
-
-static const char standard_sat_adjustment[] =
-"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
-"<gutenprint>\n"
-"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
-"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
-/* C */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* B */
-/* B */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* M */
-/* M */ "1.00 0.95 0.90 0.90 0.90 0.90 0.90 0.90 " /* R */
-/* R */ "0.90 0.95 0.95 1.00 1.00 1.00 1.00 1.00 " /* Y */
-/* Y */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* G */
-/* G */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* C */
-"</sequence>\n"
-"</curve>\n"
-"</gutenprint>\n";
-
-static const char standard_lum_adjustment[] =
-"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
-"<gutenprint>\n"
-"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
-"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
-/* C */ "0.65 0.67 0.70 0.72 0.77 0.80 0.82 0.85 " /* B */
-/* B */ "0.87 0.86 0.82 0.79 0.79 0.82 0.85 0.88 " /* M */
-/* M */ "0.92 0.95 0.96 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.97 0.95 0.94 0.93 0.92 0.90 0.86 " /* G */
-/* G */ "0.79 0.76 0.71 0.68 0.68 0.68 0.68 0.66 " /* C */
-"</sequence>\n"
-"</curve>\n"
-"</gutenprint>\n";
-
-static const char standard_hue_adjustment[] =
-"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
-"<gutenprint>\n"
-"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
-"<sequence count=\"48\" lower-bound=\"-6\" upper-bound=\"6\">\n"
-/* C */ "0.00 0.06 0.10 0.10 0.06 -.01 -.09 -.17 " /* B */
-/* B */ "-.25 -.33 -.38 -.38 -.36 -.34 -.34 -.34 " /* M */
-/* M */ "-.34 -.34 -.36 -.40 -.50 -.40 -.30 -.20 " /* R */
-/* R */ "-.12 -.07 -.04 -.02 0.00 0.00 0.00 0.00 " /* Y */
-/* Y */ "0.00 0.00 0.00 -.05 -.10 -.15 -.22 -.24 " /* G */
-/* G */ "-.26 -.30 -.33 -.28 -.25 -.20 -.13 -.06 " /* C */
-"</sequence>\n"
-"</curve>\n"
-"</gutenprint>\n";
-
-typedef enum {
- COLOR_MONOCHROME = 1,
- COLOR_CMY = 3,
- COLOR_CMYK = 4,
- COLOR_CCMMYK= 6,
- COLOR_CCMMYYK= 7
-} colormode_t;
-
-typedef struct canon_caps {
- int model; /* model number as used in printers.xml */
- int model_id; /* model ID code for use in commands */
- int max_width; /* maximum printable paper size */
- int max_height;
- int base_res; /* base resolution - shall be 150 or 180 */
- int max_xdpi; /* maximum horizontal resolution */
- int max_ydpi; /* maximum vertical resolution */
- int max_quality;
- int border_left; /* left margin, points */
- int border_right; /* right margin, points */
- int border_top; /* absolute top margin, points */
- int border_bottom; /* absolute bottom margin, points */
- int inks; /* installable cartridges (CANON_INK_*) */
- int slots; /* available paperslots */
- unsigned long features; /* special bjl settings */
-#ifdef EXPERIMENTAL_STUFF
- const canon_variable_printmode_t *printmodes;
- int printmodes_cnt;
-#else
- int dummy;
- const canon_dot_size_t dot_sizes; /* Vector of dot sizes for resolutions */
- const canon_densities_t densities; /* List of densities for each printer */
- const canon_variable_inklist_t *inxs; /* Choices of inks for this printer */
- int inxs_cnt; /* number of ink definitions in inxs */
-#endif
- const char *lum_adjustment;
- const char *hue_adjustment;
- const char *sat_adjustment;
-} canon_cap_t;
-
-typedef struct __attribute__((__packed__)) {
- unsigned char info;
- unsigned char dummy;
- unsigned char level;
-} color_info_t;
-
-typedef struct
-{
- const canon_cap_t *caps;
- unsigned char *cols[7];
- int delay[7];
- int delay_max;
- int buf_length;
- int length;
- int out_width;
- int left;
- int emptylines;
- int bits;
- int ydpi;
- color_info_t color_info[9]; /* C,M,Y,K,c,m,y,k,? */
- int ncolors; /* number of colors to print with */
- int physical_xdpi, nozzle_ydpi, stepper_ydpi;
- int nozzles; /* count of inkjets for one pass */
- int nozzle_separation;
- int horizontal_passes;
- int vertical_passes;
- int vertical_oversample;
- int *head_offset;
- int last_pass_offset;
- int bidirectional; /* tells us if we are allowed to print bidirectional */
- int direction; /* stores the last direction of the print head */
-
-} canon_privdata_t;
-
-static void canon_write_line(stp_vars_t *v);
-
-
-/* Codes for possible ink-tank combinations.
- * Each combo is represented by the colors that can be used with
- * the installed ink-tank(s)
- * Combinations of the codes represent the combinations allowed for a model
- * Note that only preferrable combinations should be used
- */
-#define CANON_INK_K 1
-#define CANON_INK_CMY 2
-#define CANON_INK_CMYK 4
-#define CANON_INK_CcMmYK 8
-#define CANON_INK_CcMmYyK 16
-
-#define CANON_INK_BLACK_MASK (CANON_INK_K|CANON_INK_CMYK|CANON_INK_CcMmYK)
-
-#define CANON_INK_PHOTO_MASK (CANON_INK_CcMmYK|CANON_INK_CcMmYyK)
-
-/* document feeding */
-#define CANON_SLOT_ASF1 1
-#define CANON_SLOT_ASF2 2
-#define CANON_SLOT_MAN1 4
-#define CANON_SLOT_MAN2 8
-
/* model peculiarities */
-#define CANON_CAP_DMT 0x01ul /* Drop Modulation Technology */
#define CANON_CAP_MSB_FIRST 0x02ul /* how to send data */
#define CANON_CAP_a 0x04ul
#define CANON_CAP_b 0x08ul
@@ -831,12 +118,9 @@ static void canon_write_line(stp_vars_t *v);
#define CANON_CAP_l 0x400ul
#define CANON_CAP_r 0x800ul
#define CANON_CAP_g 0x1000ul
-#define CANON_CAP_ACKSHORT 0x2000ul
+#define CANON_CAP_px 0x2000ul
#define CANON_CAP_rr 0x4000ul
-#define CANON_CAP_WEAVE 0x8000ul /* S200 has to be fed with weaved data */
- /* for Resolutions above 360dpi */
-#define CANON_CAP_extended_t 0x10000ul /* detailed level and bitdepth settings for every ink*/
-#define CANON_CAP_5pixelin1byte 0x20000ul /* 5 pixel with 3 levels in 1 byte compression */
+#define CANON_CAP_I 0x8000ul
#define CANON_CAP_DUPLEX 0x40000ul
#define CANON_CAP_STD0 (CANON_CAP_b|CANON_CAP_c|CANON_CAP_d|\
@@ -845,623 +129,68 @@ static void canon_write_line(stp_vars_t *v);
#define CANON_CAP_STD1 (CANON_CAP_b|CANON_CAP_c|CANON_CAP_d|CANON_CAP_l|\
CANON_CAP_m|CANON_CAP_p|CANON_CAP_q|CANON_CAP_t)
-#ifdef EXPERIMENTAL_STUFF
-#define CANON_MODES(A) A,sizeof(A)/sizeof(canon_variable_printmode_t*)
-#else
-#define CANON_MODES(A) 0
-#endif
-
-#define CANON_INK(A) A,sizeof(A)/sizeof(canon_variable_inklist_t)
-
-
-#ifdef EXPERIMENTAL_STUFF
-
-#define BC_10 CANON_INK_K /* b/w */
-#define BC_11 CANON_INK_CMYK /* color */
-#define BC_12 CANON_INK_CMYK /* photo */
-#define BC_20 CANON_INK_K /* b/w */
-#define BC_21 CANON_INK_CMYK /* color */
-#define BC_22 CANON_INK_CMYK /* photo */
-#define BC_29 0 /* neon! */
-#define BC_3031 CANON_INK_CMYK /* color */
-#define BC_3231 CANON_INK_CcMmYK /* photo */
-
-
-static const canon_variable_printmode_t canon_nomodes[] =
-{
- {0,0,0,0,0,0,0,0,0,0}
-};
-
-static const canon_variable_printmode_t canon_modes_30[] = {
- { 180, 180, 1, BC_10, 2, 1.0, 1.0, &ci_CMYK_1, 0,0,0 },
- { 360, 360, 1, BC_10, 2, 1.0, 1.0, &ci_CMYK_1, 0,0,0 },
- { 720, 360, 1, BC_10, 2, 1.0, 1.0, &ci_CMYK_1, 0,0,0 },
-};
-
-static const canon_variable_printmode_t canon_modes_85[] = {
- { 360, 360, 1, BC_10, 2, 1.0, 1.0, &ci_CMYK_1, 0,0,0 },
- { 360, 360, 1, BC_11, 2, 1.0, 1.0, &ci_CMYK_1, 0,0,0 },
- { 360, 360, 2, BC_11, 2, 1.0, 1.0, &ci_CMYK_2, 0,0,0 },
- { 360, 360, 1, BC_21, 2, 1.0, 1.0, &ci_CMYK_1, 0,0,0 },
- { 360, 360, 2, BC_21, 2, 1.0, 1.0, &ci_CMYK_2, 0,0,0 },
-};
-
-static const canon_variable_printmode_t canon_modes_2x00[] = {
- { 360, 360, 1, BC_20, 2, 1.0, 1.0, &ci_CMYK_1, 0,0,0 },
- { 360, 360, 1, BC_21, 2, 1.0, 1.0, &ci_CMYK_1, 0,0,0 },
- { 360, 360, 1, BC_22, 2, 1.0, 1.0, &ci_CMYK_1, 0,0,0 },
-};
-
-static const canon_variable_printmode_t canon_modes_6x00[] = {
- { 360, 360, 1, BC_3031, 2, 1.8, 1.0, &ci_CMYK_1, 0,0,0 },
- { 360, 360, 2, BC_3031, 2, 1.8, 1.0, &ci_CMYK_2, 0,0,0 },
- { 720, 720, 1, BC_3031, 2, 1.0, 1.0, &ci_CMYK_1, 0,0,0 },
- { 1440, 720, 1, BC_3031, 2, 0.5, 1.0, &ci_CMYK_1, 0,0,0 },
- { 360, 360, 1, BC_3231, 2, 1.8, 1.0, &ci_CcMmYK_1, 0,0,0 },
- { 360, 360, 2, BC_3231, 2, 1.8, 1.0, &ci_CcMmYK_2, 0,0,0 },
- { 720, 720, 1, BC_3231, 2, 1.0, 1.0, &ci_CcMmYK_1, 0,0,0 },
- { 1440, 720, 1, BC_3231, 2, 0.5, 1.0, &ci_CcMmYK_1, 0,0,0 },
-};
-#endif
-
-static const canon_cap_t canon_model_capabilities[] =
-{
- /* default settings for unknown models */
-
- { -1, 17*72/2,842,180,180,20,20,20,20, CANON_INK_K, CANON_SLOT_ASF1, 0 },
-
- /* ******************************** */
- /* */
- /* tested and color-adjusted models */
- /* */
- /* ******************************** */
-
-
-
-
- /* ************************************ */
- /* */
- /* tested models w/out color-adjustment */
- /* */
- /* ************************************ */
-
- { /* Canon S200x *//* heads: BC-24 */
- 4202, 3,
- 618, 936, /* 8.58" x 13 " */
- 180, 2880, 2880, 4,
- 10, 10, 9, 20,
- CANON_INK_CMYK | CANON_INK_CMY | CANON_INK_K,
- CANON_SLOT_ASF1,
- CANON_CAP_STD1 | CANON_CAP_rr | CANON_CAP_WEAVE,
- CANON_MODES(canon_nomodes),
-#ifndef EXPERIMENTAL_STUFF
-/* 2880dpi Resolutions: TBD */
-/* 180x180 360x360 720x720 1440x720 1440x1440 2880x2880 */
- {-1, 0, 0, 0, 0, -1},
-/*------- 360x360 720x720 1440x720 1440x1440 ---------*/
- { 1, 2, 1, 0.5, 0.3, 0.2},
- CANON_INK(canon_ink_standard),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
-
- { /* Canon BJ 30 *//* heads: BC-10 */
- 30, 1,
- 9.5*72, 14*72,
- 90, 360, 360, 2,
- 11, 9, 10, 18,
- CANON_INK_K,
- CANON_SLOT_ASF1,
- CANON_CAP_STD0 | CANON_CAP_a,
- CANON_MODES(canon_modes_30),
-#ifndef EXPERIMENTAL_STUFF
- {-1,0,0,0,-1,-1}, /*090x090 180x180 360x360 720x360 720x720 1440x1440*/
- {1,1,1,1,1,1}, /*------- 180x180 360x360 720x360 ------- ---------*/
- CANON_INK(canon_ink_standard),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
-
- { /* Canon BJC 85 *//* heads: BC-20 BC-21 BC-22 */
- 85, 1,
- 9.5*72, 14*72,
- 90, 720, 360, 2,
- 11, 9, 10, 18,
- CANON_INK_K | CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD0 | CANON_CAP_a | CANON_CAP_DMT,
- CANON_MODES(canon_modes_85),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
+#include "canon-inks.h"
+#include "canon-modes.h"
+#include "canon-media.h"
+#include "canon-printers.h"
- { /* Canon BJC 4300 *//* heads: BC-20 BC-21 BC-22 BC-29 */
- 4300, 1,
- 618, 936, /* 8.58" x 13 " */
- 180, 1440, 720, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1 | CANON_SLOT_MAN1,
- CANON_CAP_STD0 | CANON_CAP_DMT,
- CANON_MODES(canon_nomodes),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
-
- { /* Canon BJC 4400 *//* heads: BC-20 BC-21 BC-22 BC-29 */
- 4400, 1,
- 9.5*72, 14*72,
- 90, 720, 360, 2,
- 11, 9, 10, 18,
- CANON_INK_K | CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD0 | CANON_CAP_a | CANON_CAP_DMT,
- CANON_MODES(canon_nomodes),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
-
- { /* Canon BJC 6000 *//* heads: BC-30/BC-31 BC-32/BC-31 */
- 6000, 3,
- 618, 936, /* 8.58" x 13 " */
- 180, 1440, 720, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1 | CANON_SLOT_MAN1,
- CANON_CAP_STD1 | CANON_CAP_DMT | CANON_CAP_ACKSHORT,
- CANON_MODES(canon_modes_6x00),
-#ifndef EXPERIMENTAL_STUFF
- {-1,1,0,0,-1,-1}, /*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/
- {1,1.8,1,0.5,1,1},/*------- 360x360 720x720 1440x720 --------- ---------*/
- CANON_INK(canon_ink_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
-
- { /* Canon BJC 6200 *//* heads: BC-30/BC-31 BC-32/BC-31 */
- 6200, 3,
- 618, 936, /* 8.58" x 13 " */
- 180, 1440, 720, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1 | CANON_SLOT_MAN1,
- CANON_CAP_STD1 | CANON_CAP_DMT | CANON_CAP_ACKSHORT,
- CANON_MODES(canon_modes_6x00),
-#ifndef EXPERIMENTAL_STUFF
- {-1,1,0,0,-1,-1}, /*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/
- {0,1.8,1,.5,0,0}, /*------- 360x360 720x720 1440x720 --------- ---------*/
- CANON_INK(canon_ink_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
-
- { /* Canon BJC 6500 *//* heads: BC-30/BC-31 BC-32/BC-31 */
- 6500, 3,
- 842, 17*72,
- 180, 1440, 720, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1 | CANON_SLOT_MAN1,
- CANON_CAP_STD1 | CANON_CAP_DMT,
- CANON_MODES(canon_modes_6x00),
-#ifndef EXPERIMENTAL_STUFF
- {-1,1,0,0,-1,-1}, /*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/
- {0,1.8,1,.5,0,0}, /*------- 360x360 720x720 1440x720 --------- ---------*/
- CANON_INK(canon_ink_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
-
- { /* Canon BJC 8200 *//* heads: BC-50 */
- 8200, 3,
- 842, 17*72,
- 150, 1200,1200, 4,
- 11, 9, 10, 18,
- CANON_INK_CMYK, /* | CANON_INK_CcMmYK */
- CANON_SLOT_ASF1,
- CANON_CAP_STD1 | CANON_CAP_r | CANON_CAP_DMT | CANON_CAP_ACKSHORT,
- CANON_MODES(canon_nomodes),
-#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_superphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
-
-
- /* *************** */
- /* */
- /* untested models */
- /* */
- /* *************** */
-
-
- { /* Canon BJC 210 *//* heads: BC-02 BC-05 BC-06 */
- 210, 1,
- 618, 936, /* 8.58" x 13 " */
- 90, 720, 360, 2,
- 11, 9, 10, 18,
- CANON_INK_K | CANON_INK_CMY,
- CANON_SLOT_ASF1 | CANON_SLOT_MAN1,
- CANON_CAP_STD0,
- CANON_MODES(canon_nomodes),
-#ifndef EXPERIMENTAL_STUFF
- {0,0,0,0,-1,-1},/*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/
- {1,1,1,1,1,1}, /*180x180 360x360 ------- -------- --------- ---------*/
- CANON_INK(canon_ink_standard),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 240 *//* heads: BC-02 BC-05 BC-06 */
- 240, 1,
- 618, 936, /* 8.58" x 13 " */
- 90, 720, 360, 2,
- 11, 9, 10, 18,
- CANON_INK_K | CANON_INK_CMY,
- CANON_SLOT_ASF1 | CANON_SLOT_MAN1,
- CANON_CAP_STD0 | CANON_CAP_DMT,
- CANON_MODES(canon_nomodes),
-#ifndef EXPERIMENTAL_STUFF
- {0,0,1,0,-1,-1},/*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/
- {1,1,1,1,1,1}, /*180x180 360x360 ------- -------- --------- ---------*/
- CANON_INK(canon_ink_oldphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 250 *//* heads: BC-02 BC-05 BC-06 */
- 250, 1,
- 618, 936, /* 8.58" x 13 " */
- 90, 720, 360, 2,
- 11, 9, 10, 18,
- CANON_INK_K | CANON_INK_CMY,
- CANON_SLOT_ASF1 | CANON_SLOT_MAN1,
- CANON_CAP_STD0 | CANON_CAP_DMT,
- CANON_MODES(canon_nomodes),
-#ifndef EXPERIMENTAL_STUFF
- {0,0,1,0,-1,-1},/*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/
- {1,1,1,1,1,1}, /*180x180 360x360 ------- -------- --------- ---------*/
- CANON_INK(canon_ink_oldphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 1000 *//* heads: BC-02 BC-05 BC-06 */
- 1000, 1,
- 842, 17*72,
- 90, 720, 360, 2,
- 11, 9, 10, 18,
- CANON_INK_K | CANON_INK_CMY,
- CANON_SLOT_ASF1,
- CANON_CAP_STD0 | CANON_CAP_DMT | CANON_CAP_a,
- CANON_MODES(canon_nomodes),
-#ifndef EXPERIMENTAL_STUFF
- {0,0,1,0,-1,-1}, /*180x180 360x360 720x720 1440x720 1440x1440 2880x2880*/
- {1,1,1,1,1,1}, /*180x180 360x360 ------- -------- --------- ---------*/
- CANON_INK(canon_ink_oldphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 2000 *//* heads: BC-20 BC-21 BC-22 BC-29 */
- 2000, 1,
- 842, 17*72,
- 180, 720, 360, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD0 | CANON_CAP_a,
- CANON_MODES(canon_nomodes),
-#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),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 3000 *//* heads: BC-30 BC-33 BC-34 */
- 3000, 3,
- 842, 17*72,
- 180, 1440, 720, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD0 | CANON_CAP_a | CANON_CAP_DMT, /*FIX? should have _r? */
- CANON_MODES(canon_nomodes),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 6100 *//* heads: BC-30/BC-31 BC-32/BC-31 */
- 6100, 3,
- 842, 17*72,
- 180, 1440, 720, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD1 | CANON_CAP_a | CANON_CAP_r | CANON_CAP_DMT,
- CANON_MODES(canon_modes_6x00),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 7000 *//* heads: BC-60/BC-61 BC-60/BC-62 ??????? */
- 7000, 3,
- 842, 17*72,
- 150, 1200, 600, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYyK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD1,
- CANON_MODES(canon_nomodes),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 7100 *//* heads: BC-60/BC-61 BC-60/BC-62 ??????? */
- 7100, 3,
- 842, 17*72,
- 150, 1200, 600, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYyK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD0,
- CANON_MODES(canon_nomodes),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
-
- /*****************************/
- /* */
- /* extremely fuzzy models */
- /* (might never work at all) */
- /* */
- /*****************************/
-
- { /* Canon BJC 5100 *//* heads: BC-20 BC-21 BC-22 BC-23 BC-29 */
- 5100, 1,
- 17*72, 22*72,
- 180, 1440, 720, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD0 | CANON_CAP_DMT,
- CANON_MODES(canon_nomodes),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 5500 *//* heads: BC-20 BC-21 BC-29 */
- 5500, 1,
- 22*72, 34*72,
- 180, 720, 360, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD0 | CANON_CAP_a,
- CANON_MODES(canon_nomodes),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 6500 *//* heads: BC-30/BC-31 BC-32/BC-31 */
- 6500, 3,
- 17*72, 22*72,
- 180, 1440, 720, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD1 | CANON_CAP_a | CANON_CAP_DMT,
- CANON_MODES(canon_nomodes),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon BJC 8500 *//* heads: BC-80/BC-81 BC-82/BC-81 */
- 8500, 3,
- 17*72, 22*72,
- 150, 1200,1200, 2,
- 11, 9, 10, 18,
- CANON_INK_CMYK | CANON_INK_CcMmYK,
- CANON_SLOT_ASF1,
- CANON_CAP_STD0,
- CANON_MODES(canon_nomodes),
-#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_standardphoto),
-#endif
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
- { /* Canon PIXMA iP4000 */
- 4000, 3, /*model, model_id*/
- 842, 17*72, /* max paper width and height */
- 150, 600, 600, 2, /*base resolution,max_xdpi,max_ydpi,max_quality */
- 11, 9, 10, 18, /*border_left, border_right, border_top, border_bottom */
- CANON_INK_CMYK /*| CANON_INK_CcMmYyK*/, /*canon inks */
- CANON_SLOT_ASF1, /*paper slot */
- CANON_CAP_STD0|CANON_CAP_extended_t|CANON_CAP_5pixelin1byte|CANON_CAP_DUPLEX, /*features */
- CANON_MODES(canon_nomodes),
-#ifndef EXPERIMENTAL_STUFF
- {-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
- standard_lum_adjustment,
- standard_hue_adjustment,
- standard_sat_adjustment
- },
-};
typedef struct {
- int x;
- int y;
- const char *name;
- const char *text;
- const char *name_dmt;
- const char *text_dmt;
-} canon_res_t;
-
-static const canon_res_t canon_resolutions[] = {
- { 90, 90, "90x90dpi", N_("90x90 DPI"), "90x90dmt", N_("90x90 DPI DMT") },
- { 180, 180, "180x180dpi", N_("180x180 DPI"), "180x180dmt", N_("180x180 DPI DMT") },
- { 360, 360, "360x360dpi", N_("360x360 DPI"), "360x360dmt", N_("360x360 DPI DMT") },
- { 720, 360, "720x360dpi", N_("720x360 DPI"), "720x360dmt", N_("720x360 DPI DMT") },
- { 720, 720, "720x720dpi", N_("720x720 DPI"), "720x720dmt", N_("720x720 DPI DMT") },
- { 1440, 720, "1440x720dpi", N_("1440x720 DPI"), "1440x720dmt", N_("1440x720 DPI DMT") },
- { 1440, 1440, "1440x1440dpi", N_("1440x1440 DPI"), "1440x1440dmt", N_("1440x1440 DPI DMT") },
- { 2880, 2880, "2880x2880dpi", N_("2880x2880 DPI"), "2880x2880dmt", N_("2880x2880 DPI DMT") },
- { 150, 150, "150x150dpi", N_("150x150 DPI"), "150x150dmt", N_("150x150 DPI DMT") },
- { 300, 300, "300x300dpi", N_("300x300 DPI"), "300x300dmt", N_("300x300 DPI DMT") },
- { 600, 300, "600x300dpi", N_("600x300 DPI"), "600x300dmt", N_("600x300 DPI DMT") },
- { 600, 600, "600x600dpi", N_("600x600 DPI"), "600x600dmt", N_("600x600 DPI DMT") },
- { 1200, 600, "1200x600dpi", N_("1200x600 DPI"), "1200x600dmt", N_("1200x600 DPI DMT") },
- { 1200, 1200, "1200x1200dpi", N_("1200x1200 DPI"), "1200x1200dmt", N_("1200x1200 DPI DMT") },
- { 2400, 2400, "2400x2400dpi", N_("2400x2400 DPI"), "2400x2400dmt", N_("2400x2400 DPI DMT") },
- { 0, 0, NULL, NULL, NULL, NULL }
-};
+ char name;
+ const canon_ink_t* props;
+ unsigned char* buf;
+ unsigned char* comp_buf_offset;
+ unsigned int buf_length;
+ unsigned int delay;
+} canon_channel_t;
-static const char plain_paper_lum_adjustment[] =
-"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
-"<gutenprint>\n"
-"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
-"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
-"1.20 1.22 1.28 1.34 1.39 1.42 1.45 1.48 " /* C */
-"1.50 1.40 1.30 1.25 1.20 1.10 1.05 1.05 " /* B */
-"1.05 1.05 1.05 1.05 1.05 1.05 1.05 1.05 " /* M */
-"1.05 1.05 1.05 1.10 1.10 1.10 1.10 1.10 " /* R */
-"1.10 1.15 1.30 1.45 1.60 1.75 1.90 2.00 " /* Y */
-"2.10 2.00 1.80 1.70 1.60 1.50 1.40 1.30 " /* G */
-"</sequence>\n"
-"</curve>\n"
-"</gutenprint>\n";
-typedef struct {
- const char *name;
- const char *text;
- int media_code;
- double base_density;
- double k_lower_scale;
- double k_upper;
- const char *hue_adjustment;
- const char *lum_adjustment;
- const char *sat_adjustment;
-} paper_t;
-typedef struct {
+typedef struct
+{
+ const canon_mode_t* mode;
+ const canon_slot_t* slot;
+ const canon_paper_t *pt;
+ unsigned int used_inks;
+ int num_channels;
+ canon_channel_t* channels;
+ char* channel_order;
const canon_cap_t *caps;
- int printing_color;
- int is_first_page;
- const paper_t *pt;
- int print_head;
- int colormode;
- const char *source_str;
- const char *duplex_str;
- int xdpi;
- int ydpi;
+ unsigned char *comp_buf;
+ unsigned char *fold_buf;
+ int delay_max;
+ int buf_length_max;
+ int length;
+ int out_width;
+ int out_height;
int page_width;
int page_height;
int top;
int left;
- int bits;
- color_info_t color_info[9]; /* C,M,Y,K,c,m,y,k,? */
-} canon_init_t;
-
-static const paper_t canon_paper_list[] = {
- { "Plain", N_ ("Plain Paper"), 0x00, 0.50, 0.25, 0.500, 0, 0, 0 },
- { "PlainPIXMA", N_ ("Plain Paper PIXMA"), 0x00, 0.78, 0.25, 0.500, 0, 0, 0 },
- { "Transparency", N_ ("Transparencies"), 0x02, 1.00, 1.00, 0.900, 0, 0, 0 },
- { "BackPrint", N_ ("Back Print Film"), 0x03, 1.00, 1.00, 0.900, 0, 0, 0 },
- { "Fabric", N_ ("Fabric Sheets"), 0x04, 0.50, 0.25, 0.500, 0, 0, 0 },
- { "Envelope", N_ ("Envelope"), 0x08, 0.50, 0.25, 0.500, 0, 0, 0 },
- { "Coated", N_ ("High Resolution Paper"), 0x07, 0.78, 0.25, 0.500, 0, 0, 0 },
- { "TShirt", N_ ("T-Shirt Transfers"), 0x03, 0.50, 0.25, 0.500, 0, 0, 0 },
- { "GlossyFilm", N_ ("High Gloss Film"), 0x06, 1.00, 1.00, 0.999, 0, 0, 0 },
- { "GlossyPaper", N_ ("Glossy Photo Paper"), 0x05, 1.00, 1.00, 0.999, 0, 0, 0 },
- { "GlossyCard", N_ ("Glossy Photo Cards"), 0x0a, 1.00, 1.00, 0.999, 0, 0, 0 },
- { "GlossyPro", N_ ("Photo Paper Pro"), 0x09, 1.00, 1.00, 0.999, 0, 0, 0 },
- { "Other", N_ ("Other"), 0x00, 0.50, 0.25, .5, 0, 0, 0 },
-};
+ int emptylines;
+ int ncolors; /* number of colors to print with */
+ int physical_xdpi, nozzle_ydpi, stepper_ydpi;
+ int nozzles; /* count of inkjets for one pass */
+ int nozzle_separation;
+ int horizontal_passes;
+ int vertical_passes;
+ int vertical_oversample;
+ int *head_offset;
+ int last_pass_offset;
+ int bidirectional; /* tells us if we are allowed to print bidirectional */
+ int direction; /* stores the last direction of the print head */
+ int weave_bits[4];
+ const char *duplex_str;
+ int is_first_page;
+ double cd_inner_radius;
+ double cd_outer_radius;
+} canon_privdata_t;
+
+static void canon_write_line(stp_vars_t *v);
-static const int paper_type_count = sizeof(canon_paper_list) / sizeof(paper_t);
static void canon_advance_paper(stp_vars_t *, int);
static void canon_flush_pass(stp_vars_t *, int, int);
+static void canon_write_multiraster(stp_vars_t *v,canon_privdata_t* pd,int y);
static const stp_parameter_t the_parameters[] =
{
@@ -1484,6 +213,36 @@ static const stp_parameter_t the_parameters[] =
STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
},
{
+ "CDInnerRadius", N_("CD Hub Size"), N_("Basic Printer Setup"),
+ N_("Print only outside of the hub of the CD, or all the way to the hole"),
+ STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE,
+ STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
+ },
+ {
+ "CDOuterDiameter", N_("CD Size (Custom)"), N_("Basic Printer Setup"),
+ N_("Variable adjustment for the outer diameter of CD"),
+ STP_PARAMETER_TYPE_DIMENSION, STP_PARAMETER_CLASS_FEATURE,
+ STP_PARAMETER_LEVEL_ADVANCED, 1, 1, -1, 1, 0
+ },
+ {
+ "CDInnerDiameter", N_("CD Hub Size (Custom)"), N_("Basic Printer Setup"),
+ N_("Variable adjustment to the inner hub of the CD"),
+ STP_PARAMETER_TYPE_DIMENSION, STP_PARAMETER_CLASS_FEATURE,
+ STP_PARAMETER_LEVEL_ADVANCED, 1, 1, -1, 1, 0
+ },
+ {
+ "CDXAdjustment", N_("CD Horizontal Fine Adjustment"), N_("Advanced Printer Setup"),
+ N_("Fine adjustment to horizontal position for CD printing"),
+ STP_PARAMETER_TYPE_DIMENSION, STP_PARAMETER_CLASS_FEATURE,
+ STP_PARAMETER_LEVEL_ADVANCED, 1, 1, -1, 1, 0
+ },
+ {
+ "CDYAdjustment", N_("CD Vertical Fine Adjustment"), N_("Advanced Printer Setup"),
+ N_("Fine adjustment to horizontal position for CD printing"),
+ STP_PARAMETER_TYPE_DIMENSION, STP_PARAMETER_CLASS_FEATURE,
+ STP_PARAMETER_LEVEL_ADVANCED, 1, 1, -1, 1, 0
+ },
+ {
"Resolution", N_("Resolution"), N_("Basic Printer Setup"),
N_("Resolution and quality of the print"),
STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE,
@@ -1512,7 +271,7 @@ static const stp_parameter_t the_parameters[] =
N_("Duplex/Tumble Setting"),
STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE,
STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- }
+ },
};
static const int the_parameter_count =
@@ -1595,32 +354,30 @@ sizeof(float_parameters) / sizeof(const float_param_t);
* Duplex support - modes available
* Note that the internal names MUST match those in cups/genppd.c else the
* PPD files will not be generated correctly
- *
- * TODO: Support for DuplexNoTumble, the image has to be rotated
*/
static const stp_param_string_t duplex_types[] =
{
{ "None", N_ ("Off") },
-/* { "DuplexNoTumble", N_ ("Long Edge (Standard)") } , */
+ { "DuplexNoTumble", N_ ("Long Edge (Standard)") },
{ "DuplexTumble", N_ ("Short Edge (Flip)") }
};
#define NUM_DUPLEX (sizeof (duplex_types) / sizeof (stp_param_string_t))
-static const paper_t *
-get_media_type(const char *name)
+static const canon_paper_t *
+get_media_type(const canon_cap_t* caps,const char *name)
{
int i;
- if (name)
- for (i = 0; i < paper_type_count; i++)
+ if (name && caps->paperlist)
+ for (i = 0; i < caps->paperlist->count; i++)
{
/* translate paper_t.name */
- if (!strcmp(name, canon_paper_list[i].name))
- return &(canon_paper_list[i]);
+ if (!strcmp(name, caps->paperlist->papers[i].name))
+ return &(caps->paperlist->papers[i]);
}
- return NULL;
+ return &(caps->paperlist->papers[0]);
}
@@ -1637,69 +394,81 @@ static const canon_cap_t * canon_get_model_capabilities(int model)
return &(canon_model_capabilities[0]);
}
-static int
+static const canon_slot_t *
canon_source_type(const char *name, const canon_cap_t * caps)
{
- /* used internally: do not translate */
- if (name)
- {
- if (!strcmp(name,"Auto")) return 4;
- if (!strcmp(name,"Manual")) return 0;
- if (!strcmp(name,"ManualNP")) return 1;
- if (!strcmp(name,"Cassette")) return 8;
- if (!strcmp(name,"CD")) return 10;
+ if(name){
+ int i;
+ for(i=0; i<caps->slotlist->count; i++){
+ if( !strcmp(name,caps->slotlist->slots[i].name))
+ return &(caps->slotlist->slots[i]);
+ }
}
-
- stp_deprintf(STP_DBG_CANON,"canon: Unknown source type '%s' - reverting to auto\n",name);
- return 4;
+ return &(caps->slotlist->slots[0]);
}
-static int
-canon_printhead_type(const char *name, const canon_cap_t * caps)
-{
- /* used internally: do not translate */
- if (name)
- {
- if (!strcmp(name,"Gray")) return 0;
- if (!strcmp(name,"RGB")) return 1;
- if (!strcmp(name,"CMYK")) return 2;
- if (!strcmp(name,"PhotoCMY")) return 3;
- if (!strcmp(name,"Photo")) return 4;
- if (!strcmp(name,"PhotoCMYK")) return 5;
+
+/* function returns the current set printmode (specified by resolution) */
+/* if no mode is set the default mode will be returned */
+static const canon_mode_t* canon_get_current_mode(const stp_vars_t *v){
+ const char* input_slot = stp_get_string_parameter(v, "InputSlot");
+ const char *resolution = stp_get_string_parameter(v, "Resolution");
+ const canon_cap_t * caps = canon_get_model_capabilities(stp_get_model_id(v));
+ const canon_mode_t* mode = NULL;
+ int i;
+ if(resolution){
+ for(i=0;i<caps->modelist->count;i++){
+ if(!strcmp(resolution,caps->modelist->modes[i].name)){
+ mode = &caps->modelist->modes[i];
+ break;
+ }
+ }
}
- if (name && *name == 0) {
- if (caps->inks & CANON_INK_CMYK) return 2;
- if (caps->inks & CANON_INK_CMY) return 1;
- if (caps->inks & CANON_INK_K) return 0;
- }
+ if(!mode)
+ mode = &caps->modelist->modes[caps->modelist->default_mode];
- stp_deprintf(STP_DBG_CANON,"canon: Unknown head combo '%s' - reverting to black\n",name);
- return 0;
+#if 0
+ /* only some modes can print to cd */
+ if(input_slot && !strcmp(input_slot,"CD") && !(mode->flags & MODE_FLAG_CD)){
+ for(i=0;i<caps->modelist->count;i++){
+ if(caps->modelist->modes[i].flags & MODE_FLAG_CD){
+ mode = &caps->modelist->modes[i];
+ break;
+ }
+ }
+ }
+#endif
+
+
+
+
+
+ return mode;
}
-static colormode_t
-canon_printhead_colors(const char *name, const canon_cap_t * caps)
+/* function returns the best ink_type for the current mode */
+static unsigned int
+canon_printhead_colors(const stp_vars_t*v)
{
- /* used internally: do not translate */
- if (name)
- {
- if (!strcmp(name,"Gray")) return COLOR_MONOCHROME;
- if (!strcmp(name,"RGB")) return COLOR_CMY;
- if (!strcmp(name,"CMYK")) return COLOR_CMYK;
- if (!strcmp(name,"PhotoCMY")) return COLOR_CCMMYK;
- if (!strcmp(name,"PhotoCMYK")) return COLOR_CCMMYYK;
- }
+ int i;
+ const canon_mode_t* mode;
+ const char *print_mode = stp_get_string_parameter(v, "PrintingMode");
+ const char *ink_type = stp_get_string_parameter(v, "InkType");
+ if(print_mode && strcmp(print_mode, "BW") == 0)
+ return CANON_INK_K;
- 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;
+ if(ink_type){
+ for(i=0;i<sizeof(canon_inktypes)/sizeof(canon_inktypes[0]);i++){
+ if(ink_type && !strcmp(canon_inktypes[i].name,ink_type))
+ return canon_inktypes[i].ink_type;
+ }
+ }
+ mode = canon_get_current_mode(v);
+ for(i=0;i<sizeof(canon_inktypes)/sizeof(canon_inktypes[0]);i++){
+ if(mode->ink_types & canon_inktypes[i].ink_type)
+ return canon_inktypes[i].ink_type;
+ }
+ return CANON_INK_K;
}
static unsigned char
@@ -1732,199 +501,26 @@ canon_size_type(const stp_vars_t *v, const canon_cap_t * caps)
return 0;
}
-#ifndef EXPERIMENTAL_STUFF
-static int canon_res_code(const canon_cap_t * caps, int xdpi, int ydpi)
-{
- int x, y, res= 0;
-
- for (x=1; x<6; x++) if ((xdpi/caps->base_res) == (1<<(x-1))) res= (x<<4);
- for (y=1; y<6; y++) if ((ydpi/caps->base_res) == (1<<(y-1))) res|= y;
-
- return res;
-}
-#else
-static const canon_variable_printmode_t *canon_printmode(const canon_cap_t * caps,
- int xdpi, int ydpi,
- int bpp, int head)
-{
- const canon_variable_printmode_t *modes;
- int modes_cnt;
- int i;
- if (!caps) return 0;
- modes= caps->printmodes;
- modes_cnt= caps->printmodes_cnt;
- /* search for the right printmode: */
- for (i=0; i<modes_cnt; i++) {
- if ((modes[i].xdpi== xdpi) && (modes[i].ydpi== ydpi) &&
- (modes[i].bits== bpp) && (modes[i].printhead== head))
- {
- return &(modes[i]);
- }
- }
- /* nothing found -> either return 0 or apply some policy to
- * get a fallback printmode
- */
- if (modes[0].xdpi) return modes;
- return 0;
-}
-#endif
-
-static int
-canon_ink_type(const canon_cap_t * caps, int res_code)
-{
-#ifndef EXPERIMENTAL_STUFF
- switch (res_code)
- {
- case 0x11: return caps->dot_sizes.dot_r11;
- case 0x22: return caps->dot_sizes.dot_r22;
- case 0x33: return caps->dot_sizes.dot_r33;
- case 0x43: return caps->dot_sizes.dot_r43;
- case 0x44: return caps->dot_sizes.dot_r44;
- case 0x55: return caps->dot_sizes.dot_r55;
- }
- return -1;
-#else
- return -1;
-#endif
-}
-
-static const char *
-canon_lum_adjustment(int model)
-{
- const canon_cap_t * caps= canon_get_model_capabilities(model);
- return (caps->lum_adjustment);
-}
-
-static const char *
-canon_hue_adjustment(int model)
-{
- const canon_cap_t * caps= canon_get_model_capabilities(model);
- return (caps->hue_adjustment);
-}
-
-static const char *
-canon_sat_adjustment(int model)
-{
- const canon_cap_t * caps= canon_get_model_capabilities(model);
- return (caps->sat_adjustment);
-}
-
-static double
-canon_density(const canon_cap_t * caps, int res_code)
-{
-#ifndef EXPERIMENTAL_STUFF
- switch (res_code)
- {
- case 0x11: return caps->densities.d_r11;
- case 0x22: return caps->densities.d_r22;
- case 0x33: return caps->densities.d_r33;
- case 0x43: return caps->densities.d_r43;
- case 0x44: return caps->densities.d_r44;
- case 0x55: return caps->densities.d_r55;
- default:
- stp_deprintf(STP_DBG_CANON,"no such res_code 0x%x in density of model %d\n",
- res_code,caps->model);
- return 0.2;
- }
-#else
- return 0.2;
-#endif
-}
-
-static const canon_variable_inkset_t *
-canon_inks(const canon_cap_t * caps, int res_code, int colors, int bits)
-{
-#ifndef EXPERIMENTAL_STUFF
- const canon_variable_inklist_t *inks = caps->inxs;
- int i;
-
- if (!inks)
- return NULL;
-
- for (i=0; i<caps->inxs_cnt; i++) {
- stp_deprintf(STP_DBG_CANON,"hmm, trying ink for resolution code "
- "%x, %d bits, %d colors\n",res_code,inks[i].bits,inks[i].colors);
- if ((inks[i].bits==bits) && (inks[i].colors==colors)) {
- stp_deprintf(STP_DBG_CANON,"wow, found ink for resolution code "
- "%x, %d bits, %d colors\n",res_code,bits,colors);
- switch (res_code)
- {
- case 0x11: return inks[i].r11;
- case 0x22: return inks[i].r22;
- case 0x33: return inks[i].r33;
- case 0x43: return inks[i].r43;
- case 0x44: return inks[i].r44;
- case 0x55: return inks[i].r55;
- }
- }
- }
- stp_deprintf(STP_DBG_CANON,"ooo, found no ink for resolution code "
- "%x, %d bits, %d colors in all %d defs!\n",
- res_code,bits,colors,caps->inxs_cnt);
- return NULL;
-#else
- return NULL;
-#endif
-}
-
static void
canon_describe_resolution(const stp_vars_t *v, int *x, int *y)
{
- const char *resolution = stp_get_string_parameter(v, "Resolution");
- const canon_res_t *res = canon_resolutions;
- while (res->x > 0)
- {
- if (strcmp(resolution, res->name) == 0 ||
- strcmp(resolution, res->name_dmt) == 0)
- {
- *x = res->x;
- *y = res->y;
- return;
- }
- res++;
- }
- *x = -1;
- *y = -1;
+ const canon_mode_t* mode = canon_get_current_mode(v);
+ *x = mode->xdpi;
+ *y = mode->ydpi;
}
static const char *
canon_describe_output(const stp_vars_t *v)
{
- int model = stp_get_model_id(v);
- const canon_cap_t *caps = canon_get_model_capabilities(model);
- 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);
+ unsigned int ink_type = canon_printhead_colors(v);
- if ((print_mode && strcmp(print_mode, "BW") == 0) ||
- printhead == 0 || caps->inks == CANON_INK_K)
- colormode = COLOR_MONOCHROME;
-
- switch (colormode)
- {
- case COLOR_CMY:
- return "CMY";
- case COLOR_CMYK:
- case COLOR_CCMMYK:
- case COLOR_CCMMYYK:
- return "CMYK";
- case COLOR_MONOCHROME:
- default:
- return "Grayscale";
- }
+ if(ink_type & CANON_INK_CMYK_MASK)
+ return "CMYK";
+ if(ink_type & CANON_INK_CMY_MASK)
+ return "CMY";
+ return "Grayscale";
}
-static const stp_param_string_t media_sources[] =
- {
- { "Auto", N_ ("Auto Sheet Feeder") },
- { "Manual", N_ ("Manual with Pause") },
- { "ManualNP", N_ ("Manual without Pause") },
- { "Cassette", N_ ("Cassette") },
- { "CD", N_ ("CD tray") }
- };
-
-
/*
* 'canon_parameters()' - Return the parameter values for the given parameter.
*/
@@ -1957,21 +553,14 @@ 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;
+ unsigned int ink_type = canon_printhead_colors(v);
stp_fill_parameter_settings(description,
&(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)
+ if (ink_type != CANON_INK_K || !float_parameters[i].color_only)
description->is_active = 1;
else
description->is_active = 0;
@@ -1985,101 +574,135 @@ canon_parameters(const stp_vars_t *v, const char *name,
break;
}
if (strcmp(name, "PageSize") == 0)
- {
- int height_limit, width_limit;
- int papersizes = stp_known_papersizes();
- description->bounds.str = stp_string_list_create();
-
- width_limit = caps->max_width;
- height_limit = caps->max_height;
-
- for (i = 0; i < papersizes; i++) {
- const stp_papersize_t *pt = stp_get_papersize_by_index(i);
- if (strlen(pt->name) > 0 &&
- pt->width <= width_limit && pt->height <= height_limit)
- {
- if (stp_string_list_count(description->bounds.str) == 0)
- description->deflt.str = pt->name;
- stp_string_list_add_string(description->bounds.str,
+ {
+ const char* input_slot = stp_get_string_parameter(v, "InputSlot");
+ int height_limit, width_limit;
+ int papersizes = stp_known_papersizes();
+ description->bounds.str = stp_string_list_create();
+
+ width_limit = caps->max_width;
+ height_limit = caps->max_height;
+
+ if(input_slot && !strcmp(input_slot,"CD")){
+ stp_string_list_add_string
+ (description->bounds.str, "CD5Inch", _("CD - 5 inch"));
+ stp_string_list_add_string
+ (description->bounds.str, "CD3Inch", _("CD - 3 inch"));
+ stp_string_list_add_string
+ (description->bounds.str, "CDCustom", _("CD - Custom"));
+ }else{
+ for (i = 0; i < papersizes; i++) {
+ const stp_papersize_t *pt = stp_get_papersize_by_index(i);
+ if (strlen(pt->name) > 0 &&
+ pt->width <= width_limit && pt->height <= height_limit){
+ stp_string_list_add_string(description->bounds.str,
pt->name, gettext(pt->text));
+ }
+ }
+ }
+ description->deflt.str =
+ stp_string_list_param(description->bounds.str, 0)->name;
+ }
+ else if (strcmp(name, "CDInnerRadius") == 0 )
+ {
+ const char* input_slot = stp_get_string_parameter(v, "InputSlot");
+ description->bounds.str = stp_string_list_create();
+ if (input_slot && !strcmp(input_slot,"CD") &&
+ (!stp_get_string_parameter(v, "PageSize") ||
+ strcmp(stp_get_string_parameter(v, "PageSize"), "CDCustom") != 0))
+ {
+ stp_string_list_add_string
+ (description->bounds.str, "None", _("Normal"));
+ stp_string_list_add_string
+ (description->bounds.str, "Small", _("Print To Hub"));
+ description->deflt.str =
+ stp_string_list_param(description->bounds.str, 0)->name;
}
+ else
+ description->is_active = 0;
+ }
+ else if (strcmp(name, "CDInnerDiameter") == 0 )
+ {
+ const char* input_slot = stp_get_string_parameter(v, "InputSlot");
+ description->bounds.dimension.lower = 16 * 10 * 72 / 254;
+ description->bounds.dimension.upper = 43 * 10 * 72 / 254;
+ description->deflt.dimension = 43 * 10 * 72 / 254;
+ if (input_slot && !strcmp(input_slot,"CD") &&
+ (!stp_get_string_parameter(v, "PageSize") ||
+ strcmp(stp_get_string_parameter(v, "PageSize"), "CDCustom") == 0))
+ description->is_active = 1;
+ else
+ description->is_active = 0;
+ }
+ else if (strcmp(name, "CDOuterDiameter") == 0 )
+ {
+ const char* input_slot = stp_get_string_parameter(v, "InputSlot");
+ description->bounds.dimension.lower = 65 * 10 * 72 / 254;
+ description->bounds.dimension.upper = 120 * 10 * 72 / 254;
+ description->deflt.dimension = 329;
+ if (input_slot && !strcmp(input_slot,"CD") &&
+ (!stp_get_string_parameter(v, "PageSize") ||
+ strcmp(stp_get_string_parameter(v, "PageSize"), "CDCustom") == 0))
+ description->is_active = 1;
+ else
+ description->is_active = 0;
+ }
+ else if (strcmp(name, "CDXAdjustment") == 0 ||
+ strcmp(name, "CDYAdjustment") == 0)
+ {
+ const char* input_slot = stp_get_string_parameter(v, "InputSlot");
+ description->bounds.dimension.lower = -15;
+ description->bounds.dimension.upper = 15;
+ description->deflt.dimension = 0;
+ if (input_slot && !strcmp(input_slot,"CD"))
+ description->is_active = 1;
+ else
+ description->is_active = 0;
}
- }
else if (strcmp(name, "Resolution") == 0)
{
- int x,y;
- int t;
+ const char* input_slot = stp_get_string_parameter(v, "InputSlot");
description->bounds.str= stp_string_list_create();
description->deflt.str = NULL;
+ for(i=0;i<caps->modelist->count;i++){
+#if 0
+ if(!(input_slot && !strcmp(input_slot,"CD") && !(caps->modelist->modes[i].flags & MODE_FLAG_CD)))
+#endif
+ stp_string_list_add_string(description->bounds.str,
+ caps->modelist->modes[i].name, gettext(caps->modelist->modes[i].text));
+ stp_deprintf(STP_DBG_CANON,"supports mode '%s'\n",
+ caps->modelist->modes[i].name);
+ if(i == caps->modelist->default_mode)
+ description->deflt.str=caps->modelist->modes[i].name;
+
- for (x=1; x<6; x++) {
- for (y=x-1; y<x+1; y++) {
- if ((t= canon_ink_type(caps,(x<<4)|y)) > -1) {
- int xx = (1<<x)/2*caps->base_res;
- int yy = (1<<y)/2*caps->base_res;
- const canon_res_t *res = canon_resolutions;
- while (res->x > 0) {
- if (xx == res->x && yy == res->y) {
- stp_string_list_add_string(description->bounds.str,
- res->name, gettext(res->text));
- stp_deprintf(STP_DBG_CANON,"supports mode '%s'\n",
- res->name);
- if (xx >= 300 && yy >= 300 && description->deflt.str == NULL)
- description->deflt.str = res->name;
- if (t == 1) {
- stp_string_list_add_string(description->bounds.str,
- res->name_dmt, gettext(res->text_dmt));
- stp_deprintf(STP_DBG_CANON,"supports mode '%s'\n",
- res->name_dmt);
- }
- break;
- }
- res++;
- }
- }
- }
}
}
else if (strcmp(name, "InkType") == 0)
{
+ const canon_mode_t* mode = canon_get_current_mode(v);
description->bounds.str= stp_string_list_create();
- /* used internally: do not translate */
- if ((caps->inks & CANON_INK_CcMmYyK))
- stp_string_list_add_string(description->bounds.str,
- "PhotoCMYK", _("Photo CcMmYK Color"));
- if ((caps->inks & CANON_INK_CcMmYK))
- stp_string_list_add_string(description->bounds.str,
- "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_CMY))
- stp_string_list_add_string(description->bounds.str,
- "RGB", _("CMY Color"));
- if ((caps->inks & CANON_INK_K))
- stp_string_list_add_string(description->bounds.str,
- "Gray", _("Black"));
- description->deflt.str =
- stp_string_list_param(description->bounds.str, 0)->name;
+ for(i=0;i<sizeof(canon_inktypes)/sizeof(canon_inktypes[0]);i++){
+ if(mode->ink_types & canon_inktypes[i].ink_type){
+ stp_string_list_add_string(description->bounds.str,canon_inktypes[i].name,_(canon_inktypes[i].text));
+ }
+ }
+ description->deflt.str = stp_string_list_param(description->bounds.str, 0)->name;
}
else if (strcmp(name, "InkChannels") == 0)
{
- if (caps->inks & CANON_INK_CcMmYyK)
- description->deflt.integer = 7;
- else if (caps->inks & CANON_INK_CcMmYK)
- description->deflt.integer = 6;
- else if (caps->inks & CANON_INK_CMYK)
- description->deflt.integer = 4;
- else if (caps->inks & CANON_INK_CMY)
- description->deflt.integer = 3;
- else
- description->deflt.integer = 1;
+ unsigned int ink_type = canon_printhead_colors(v);
+ for(i=0;i<sizeof(canon_inktypes)/sizeof(canon_inktypes[0]);i++){
+ if(ink_type == canon_inktypes[i].ink_type)
+ description->deflt.integer = canon_inktypes[i].num_channels;
+ }
description->bounds.integer.lower = -1;
description->bounds.integer.upper = -1;
}
else if (strcmp(name, "MediaType") == 0)
{
- int count = sizeof(canon_paper_list) / sizeof(canon_paper_list[0]);
+ const canon_paper_t * canon_paper_list = caps->paperlist->papers;
+ int count = caps->paperlist->count;
description->bounds.str= stp_string_list_create();
description->deflt.str= canon_paper_list[0].name;
@@ -2090,18 +713,21 @@ canon_parameters(const stp_vars_t *v, const char *name,
}
else if (strcmp(name, "InputSlot") == 0)
{
- int count = sizeof(media_sources)/sizeof(media_sources[0]);
+ const canon_slot_t * canon_slot_list = caps->slotlist->slots;
+ int count = caps->slotlist->count;
description->bounds.str= stp_string_list_create();
- description->deflt.str= media_sources[0].name;
+ description->deflt.str= canon_slot_list[0].name;
+
for (i = 0; i < count; i ++)
stp_string_list_add_string(description->bounds.str,
- media_sources[i].name,
- gettext(media_sources[i].text));
+ canon_slot_list[i].name,
+ gettext(canon_slot_list[i].text));
}
else if (strcmp(name, "PrintingMode") == 0)
{
+ const canon_mode_t* mode = canon_get_current_mode(v);
description->bounds.str = stp_string_list_create();
- if (caps->inks != CANON_INK_K)
+ if (mode->ink_types != CANON_INK_K)
stp_string_list_add_string
(description->bounds.str, "Color", _("Color"));
stp_string_list_add_string
@@ -2159,10 +785,15 @@ internal_imageable_area(const stp_vars_t *v, /* I */
int right_margin = 0;
int bottom_margin = 0;
int top_margin = 0;
+ int cd = 0;
const canon_cap_t * caps= canon_get_model_capabilities(stp_get_model_id(v));
const char *media_size = stp_get_string_parameter(v, "PageSize");
const stp_papersize_t *pt = NULL;
+ const char* input_slot = stp_get_string_parameter(v, "InputSlot");
+
+ if(input_slot && !strcmp(input_slot,"CD"))
+ cd = 1;
if (media_size && use_paper_margins)
pt = stp_get_papersize_by_name(media_size);
@@ -2175,10 +806,13 @@ internal_imageable_area(const stp_vars_t *v, /* I */
bottom_margin = pt->bottom;
top_margin = pt->top;
}
- left_margin = MAX(left_margin, caps->border_left);
- right_margin = MAX(right_margin, caps->border_right);
- top_margin = MAX(top_margin, caps->border_top);
- bottom_margin = MAX(bottom_margin, caps->border_bottom);
+ /* ignore printer margins for the cd print, margins get adjusted in do_print */
+ if(!cd){
+ left_margin = MAX(left_margin, caps->border_left);
+ right_margin = MAX(right_margin, caps->border_right);
+ top_margin = MAX(top_margin, caps->border_top);
+ bottom_margin = MAX(bottom_margin, caps->border_bottom);
+ }
*left = left_margin;
*right = width - right_margin;
@@ -2252,26 +886,36 @@ canon_cmd(const stp_vars_t *v, /* I - the printer */
#define ESC5b "\033\133"
#define ESC40 "\033\100"
+static void canon_control_cmd(const stp_vars_t*v,const char* cmd){
+ canon_cmd(v,ESC5b,0x4b, 2, 0x00,0x1f);
+ stp_puts("BJLSTART\nControlMode=Common\n",v);
+ stp_puts(cmd,v);
+ stp_putc('\n',v);
+ stp_puts("BJLEND\n",v);
+}
+
+
/* ESC [K -- -- reset printer:
*/
static void
-canon_init_resetPrinter(const stp_vars_t *v, canon_init_t *init)
+canon_init_resetPrinter(const stp_vars_t *v, const canon_privdata_t *init)
{
- unsigned long f=init->caps->features;
- if (f & (CANON_CAP_ACKSHORT))
- {
- canon_cmd(v,ESC5b,0x4b, 2, 0x00,0x1f);
- stp_puts("BJLSTART\nControlMode=Common\n",v);
- if (f & CANON_CAP_ACKSHORT) stp_puts("AckTime=Short\n",v);
- stp_puts("BJLEND\n",v);
+ if ( init->caps->control_cmdlist ){
+ int i=0;
+ while(init->caps->control_cmdlist[i]){
+ canon_control_cmd(v,init->caps->control_cmdlist[i]);
+ ++i;
}
+ }
+ if(!strcmp(init->slot->name,"CD"))
+ canon_control_cmd(v,"MediaDetection=ON");
canon_cmd(v,ESC5b,0x4b, 2, 0x00,0x0f);
}
/* ESC ($ -- 0x24 -- cmdSetDuplex --:
*/
static void
-canon_init_setDuplex(const stp_vars_t *v, canon_init_t *init)
+canon_init_setDuplex(const stp_vars_t *v, const canon_privdata_t *init)
{
if (!(init->caps->features & CANON_CAP_DUPLEX))
return;
@@ -2285,7 +929,7 @@ canon_init_setDuplex(const stp_vars_t *v, canon_init_t *init)
/* ESC (a -- 0x61 -- cmdSetPageMode --:
*/
static void
-canon_init_setPageMode(const stp_vars_t *v, canon_init_t *init)
+canon_init_setPageMode(const stp_vars_t *v, const canon_privdata_t *init)
{
if (!(init->caps->features & CANON_CAP_a))
return;
@@ -2297,7 +941,7 @@ canon_init_setPageMode(const stp_vars_t *v, canon_init_t *init)
/* ESC (b -- 0x62 -- -- set data compression:
*/
static void
-canon_init_setDataCompression(const stp_vars_t *v, canon_init_t *init)
+canon_init_setDataCompression(const stp_vars_t *v, const canon_privdata_t *init)
{
if (!(init->caps->features & CANON_CAP_b))
return;
@@ -2308,7 +952,7 @@ canon_init_setDataCompression(const stp_vars_t *v, canon_init_t *init)
/* ESC (c -- 0x63 -- cmdSetColor --:
*/
static void
-canon_init_setColor(const stp_vars_t *v, canon_init_t *init)
+canon_init_setColor(const stp_vars_t *v, const canon_privdata_t *init)
{
unsigned char
numargs, arg_63[6];
@@ -2325,10 +969,10 @@ canon_init_setColor(const stp_vars_t *v, canon_init_t *init)
break; /* tbd */
case 1: /* 360 dpi series - BJC-4000, BJC-210, BJC-70 and their descendants */
- if (!init->printing_color)
+ if (init->used_inks == CANON_INK_K)
arg_63[0]|= 0x01; /* PRINT_COLOUR */
- arg_63[1] = ((init->pt ? init->pt->media_code : 0) << 4) /* PRINT_MEDIA */
+ arg_63[1] = ((init->pt ? init->pt->media_code_c : 0) << 4) /* PRINT_MEDIA */
+ 1; /* hardcode to High quality for now */ /* PRINT_QUALITY */
canon_cmd(v,ESC28,0x63, 2, arg_63[0], arg_63[1]);
@@ -2338,24 +982,24 @@ canon_init_setColor(const stp_vars_t *v, canon_init_t *init)
break;
case 3: /* 720 dpi series - BJC-3000 and descendants */
- if (!init->printing_color)
+ if (init->used_inks == CANON_INK_K)
arg_63[0]|= 0x01; /* colour mode */
- arg_63[1] = (init->pt) ? init->pt->media_code : 0; /* print media type */
+ arg_63[1] = (init->pt) ? init->pt->media_code_c : 0; /* print media type */
if (init->caps->model == 4202) /* S200 */
{
- if ((init->xdpi == 720) && (init->ydpi == 720 ))
+ if ((init->mode->xdpi == 720) && (init->mode->ydpi == 720 ))
arg_63[2] = 1;
else
arg_63[2] = 4; /* hardcoded: quality 3 (may be 0...4) */
/* bidirectional is controlled via quality: 0..2 is bidi, 3 and 4 uni */
/* not every combination works, no idea about the principle */
- if ( (init->xdpi > 360) || (init->ydpi > 360) )
+ if ( (init->mode->xdpi > 360) || (init->mode->ydpi > 360) )
{
numargs = 6;
arg_63[3] = 0x10; arg_63[4] = 6; arg_63[5] = 8; /* arg5 makes a vert. offset for K */
- if (!init->printing_color)
+ if (init->used_inks == CANON_INK_K)
arg_63[4] = 1;
}
}
@@ -2374,17 +1018,17 @@ canon_init_setColor(const stp_vars_t *v, canon_init_t *init)
/* ESC (d -- 0x64 -- -- set raster resolution:
*/
static void
-canon_init_setResolution(const stp_vars_t *v, canon_init_t *init)
+canon_init_setResolution(const stp_vars_t *v, const canon_privdata_t *init)
{
if (!(init->caps->features & CANON_CAP_d))
return;
- if (init->caps->model != 4202 || (init->xdpi <= 360))
+ if (init->caps->model != 4202 || (init->mode->xdpi <= 360))
canon_cmd(v,ESC28,0x64, 4,
- (init->ydpi >> 8 ), (init->ydpi & 255),
- (init->xdpi >> 8 ), (init->xdpi & 255));
+ (init->mode->ydpi >> 8 ), (init->mode->ydpi & 255),
+ (init->mode->xdpi >> 8 ), (init->mode->xdpi & 255));
else
- if (init->xdpi < 2880)
+ if (init->mode->xdpi < 2880)
canon_cmd(v,ESC28,0x64, 4,
(720 >> 8), (720 & 255),
(720 >> 8), (720 & 255));
@@ -2397,7 +1041,7 @@ canon_init_setResolution(const stp_vars_t *v, canon_init_t *init)
/* ESC (g -- 0x67 -- cmdSetPageMargins --:
*/
static void
-canon_init_setPageMargins(const stp_vars_t *v, canon_init_t *init)
+canon_init_setPageMargins(const stp_vars_t *v, const canon_privdata_t *init)
{
/* TOFIX: what exactly is to be sent?
* Is it the printable length or the bottom border?
@@ -2424,35 +1068,30 @@ canon_init_setPageMargins(const stp_vars_t *v, canon_init_t *init)
/* ESC (l -- 0x6c -- cmdSetTray --:
*/
static void
-canon_init_setTray(const stp_vars_t *v, canon_init_t *init)
+canon_init_setTray(const stp_vars_t *v, const canon_privdata_t *init)
{
unsigned char
arg_6c_1 = 0x00,
arg_6c_2 = 0x00; /* plain paper */
- /* int media= canon_media_type(media_str,caps); */
- int source= canon_source_type(init->source_str,init->caps);
-
if (!(init->caps->features & CANON_CAP_l))
return;
arg_6c_1 = init->caps->model_id << 4;
- arg_6c_1|= (source & 0x0f);
+ arg_6c_1|= (init->slot->code & 0x0f);
- if (init->pt) arg_6c_2= init->pt->media_code;
- if (!strcmp("CD",init->source_str)) {
- stp_deprintf(STP_DBG_CANON,"canon: sending special cd setTray command\n");
- canon_cmd(v,ESC28,0x6c, 3, 0x3a,0x12,0);
- } else {
+ if (init->pt) arg_6c_2= init->pt->media_code_l;
+ if(init->caps->model_id >= 3)
+ canon_cmd(v,ESC28,0x6c, 3, arg_6c_1, arg_6c_2, 0);
+ else
canon_cmd(v,ESC28,0x6c, 2, arg_6c_1, arg_6c_2);
- }
}
/* ESC (m -- 0x6d -- -- :
*/
static void
-canon_init_setPrintMode(const stp_vars_t *v, canon_init_t *init)
+canon_init_setPrintMode(const stp_vars_t *v, const canon_privdata_t *init)
{
unsigned char
arg_6d_1 = 0x03, /* color printhead? */
@@ -2469,13 +1108,17 @@ canon_init_setPrintMode(const stp_vars_t *v, canon_init_t *init)
if (!arg_6d_a)
arg_6d_b= 1;
- if (init->print_head==0)
- arg_6d_1= 0x03;
- else if (init->print_head<=2)
- arg_6d_1= 0x02;
- else if (init->print_head<=4)
arg_6d_1= 0x04;
- if (!init->printing_color)
+ if ((init->caps->model==7000) && (init->used_inks == CANON_INK_K || init->used_inks == CANON_INK_CcMmYK || init->used_inks == CANON_INK_CcMmYyK))
+ arg_6d_1= 0x03;
+
+ if (((init->caps->model==8200 || init->caps->model==4202) && init->used_inks == CANON_INK_K) || init->used_inks == CANON_INK_CMYK)
+ arg_6d_1= 0x02;
+
+ if(init->caps->model == 4202 && init->used_inks == CANON_INK_CMY)
+ arg_6d_1= 0x02;
+
+ if (init->used_inks == CANON_INK_K)
arg_6d_2= 0x02;
if (init->caps->model==8200 || init->caps->model==4202)
@@ -2489,13 +1132,12 @@ canon_init_setPrintMode(const stp_vars_t *v, canon_init_t *init)
/* ESC (p -- 0x70 -- cmdSetPageMargins2 --:
*/
static void
-canon_init_setPageMargins2(const stp_vars_t *v, canon_init_t *init)
+canon_init_setPageMargins2(const stp_vars_t *v, const canon_privdata_t *init)
{
/* TOFIX: what exactly is to be sent?
* Is it the printable length or the bottom border?
* Is is the printable width or the right border?
*/
-
int printable_width= init->page_width*5/6;
int printable_length= init->page_height*5/6;
@@ -2503,24 +1145,44 @@ canon_init_setPageMargins2(const stp_vars_t *v, canon_init_t *init)
unsigned char arg_70_2= (printable_length) & 0xff;
unsigned char arg_70_3= (printable_width >> 8) & 0xff;
unsigned char arg_70_4= (printable_width) & 0xff;
+ const char* input_slot = stp_get_string_parameter(v, "InputSlot");
+
+ if (!(init->caps->features & CANON_CAP_px) && !(init->caps->features & CANON_CAP_p))
+ return;
- if (!(init->caps->features & CANON_CAP_p))
+ if ((init->caps->features & CANON_CAP_px) && !(input_slot && !strcmp(input_slot,"CD")))
+ {
+ unsigned int unit = init->mode->xdpi;
+ stp_zfwrite(ESC28,2,1,v); /* ESC( */
+ stp_putc(0x70,v); /* p */
+ stp_put16_le(46, v); /* len */
+ stp_put16_be(printable_length,v);
+ stp_put16_be(0,v);
+ stp_put16_be(printable_width,v);
+ stp_put16_be(0,v);
+ stp_put32_be(0,v);
+ stp_put16_be(unit,v);
+
+ stp_put32_be(init->caps->border_left * unit / 72,v); /* area_right */
+ stp_put32_be(init->caps->border_top * unit / 72,v); /* area_top */
+ stp_put32_be(init->page_width * unit / 72,v); /* area_width */
+ stp_put32_be(init->page_height * unit / 72,v); /* area_length */
+ stp_put32_be(0,v); /* paper_right */
+ stp_put32_be(0,v); /* paper_top */
+ stp_put32_be((init->page_width + init->caps->border_left + init->caps->border_right) * unit / 72,v); /* paper_width */
+ stp_put32_be((init->page_height + init->caps->border_top + init->caps->border_bottom) * unit / 72,v); /* paper_height */
return;
- if (!strcmp(init->source_str,"CD")) {
- canon_cmd(v,ESC28,0x70, 8, 0x00, 0x2a, 0xb0, 0x00,
- 0x00, 0x01, 0xe0, 0x00);
- stp_deprintf(STP_DBG_CANON,"sending cd margins\n");
- } else {
- canon_cmd(v,ESC28,0x70, 8,
+ }
+
+ canon_cmd(v,ESC28,0x70, 8,
arg_70_1, arg_70_2, 0x00, 0x00,
arg_70_3, arg_70_4, 0x00, 0x00);
- }
}
/* ESC (q -- 0x71 -- setPageID -- :
*/
static void
-canon_init_setPageID(const stp_vars_t *v, canon_init_t *init)
+canon_init_setPageID(const stp_vars_t *v, const canon_privdata_t *init)
{
if (!(init->caps->features & CANON_CAP_q))
return;
@@ -2531,7 +1193,7 @@ canon_init_setPageID(const stp_vars_t *v, canon_init_t *init)
/* ESC (r -- 0x72 -- -- :
*/
static void
-canon_init_setX72(const stp_vars_t *v, canon_init_t *init)
+canon_init_setX72(const stp_vars_t *v, const canon_privdata_t *init)
{
if ( !( (init->caps->features & CANON_CAP_r)
|| (init->caps->features & CANON_CAP_rr) ) )
@@ -2539,7 +1201,7 @@ canon_init_setX72(const stp_vars_t *v, canon_init_t *init)
if ( (init->caps->features & CANON_CAP_r)
|| (init->caps->features & CANON_CAP_rr) )
- canon_cmd(v,ESC28,0x72, 1, 0x61); /* whatever for - 8200/S200 need it */
+ canon_cmd(v,ESC28,0x72, 1, init->caps->ESC_r_arg); /* whatever for - 8200/S200 need it */
if (init->caps->features & CANON_CAP_rr)
canon_cmd(v,ESC28,0x72, 3, 0x63, 1, 0); /* whatever for - S200 needs it */
/* probably to set the print direction of the head */
@@ -2556,7 +1218,7 @@ canon_set_X72(const stp_vars_t *v, int x72arg)
/* ESC (t -- 0x74 -- cmdSetImage --:
*/
static void
-canon_init_setImage(const stp_vars_t *v, canon_init_t *init)
+canon_init_setImage(const stp_vars_t *v, const canon_privdata_t *init)
{
unsigned char
arg_74_1 = 0x01, /* 1 bit per pixel */
@@ -2565,6 +1227,33 @@ canon_init_setImage(const stp_vars_t *v, canon_init_t *init)
if (!(init->caps->features & CANON_CAP_t))
return;
+
+ if(init->mode->flags & MODE_FLAG_EXTENDED_T) /*code requires extended mode settings*/
+ {
+ int i;
+ int length = init->mode->num_inks*3 + 3;
+ unsigned char* buf = stp_zalloc(length);
+ buf[0]=0x80;
+ buf[1]=0x80;
+ buf[2]=0x01;
+ for(i=0;i<init->mode->num_inks;i++){
+ if(init->mode->inks[i].ink){
+ if(init->mode->inks[i].ink->flags & INK_FLAG_5pixel_in_1byte)
+ buf[3+i*3+0]=(1<<5)|init->mode->inks[i].ink->bits; /*info*/
+ else
+ buf[3+i*3+0]=init->mode->inks[i].ink->bits;
+ buf[3+i*3+2]= init->mode->inks[i].ink->numsizes+1;/*level*/
+ }
+ }
+ stp_zfwrite(ESC28,2,1,v);
+ stp_putc(0x74,v);
+ stp_put16_le(length,v);
+ stp_zfwrite((char*)buf,length,1,v);
+ stp_free(buf);
+ return;
+ }
+
+ /* other models mostly hardcoded stuff not really understood ;( */
if (init->caps->model==4202) /* 1 bit per pixel (arg 4,7,10,13); */
/* 2 level per pixel (arg 6,9,12,15) for each color */
/* though we print only 1bit/pixel - but this is how */
@@ -2574,50 +1263,59 @@ canon_init_setImage(const stp_vars_t *v, canon_init_t *init)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
return;
}
- if(init->caps->features & CANON_CAP_extended_t)
- {
- unsigned char buf[30] = {0x80,0x80,0x1,};
- memcpy(buf + 3,init->color_info,sizeof(color_info_t) * 9);
- stp_zfwrite(ESC28,2,1,v);
- stp_putc(0x74,v);
- stp_put16_le(30,v);
- stp_zfwrite((char*)buf,30,1,v);
- return;
- }
- if (init->xdpi==1440) arg_74_2= 0x04;
- if (init->ydpi>=720) arg_74_3= 0x09;
+ if (init->mode->xdpi==1440) arg_74_2= 0x04;
+ if (init->mode->ydpi>=720) arg_74_3= 0x09;
- if (init->bits>1) {
+ if (init->mode->inks[0].ink->bits>1) {
arg_74_1= 0x02;
arg_74_2= 0x80;
arg_74_3= 0x09;
- if (init->colormode == COLOR_CMY) arg_74_3= 0x02; /* for BC-06 cartridge!!! */
+ if (init->used_inks == CANON_INK_CMY) arg_74_3= 0x02; /* for BC-06 cartridge!!! */
}
/* workaround for the bjc8200 in 6color mode - not really understood */
if (init->caps->model==8200) {
- if (init->colormode==COLOR_CCMMYK) {
+ if (init->used_inks == CANON_INK_CcMmYK) {
arg_74_1= 0xff;
arg_74_2= 0x90;
arg_74_3= 0x04;
- init->bits=3;
- if (init->ydpi>600) arg_74_3= 0x09;
+ if (init->mode->ydpi>600) arg_74_3= 0x09;
} else {
arg_74_1= 0x01;
arg_74_2= 0x00;
arg_74_3= 0x01;
- if (init->ydpi>600) arg_74_3= 0x09;
+ if (init->mode->ydpi>600) arg_74_3= 0x09;
}
}
canon_cmd(v,ESC28,0x74, 3, arg_74_1, arg_74_2, arg_74_3);
}
+/* ESC (I (J (L
+ */
static void
-canon_init_printer(const stp_vars_t *v, canon_init_t *init)
+canon_init_setMultiRaster(const stp_vars_t *v, const canon_privdata_t *init){
+
+ if(!(init->caps->features & CANON_CAP_I))
+ return;
+
+ canon_cmd(v,ESC28,0x49, 1, 0x1); /* enable MultiLine Raster? */
+ canon_cmd(v,ESC28,0x4a, 1, RASTER_LINES_PER_BLOCK); /* set number of lines per raster block */
+
+ /* set the color sequence */
+ stp_zfwrite("\033(L", 3, 1, v);
+ stp_put16_le(init->num_channels, v);
+ stp_zfwrite((const char *)init->channel_order,init->num_channels, 1, v);
+}
+
+
+
+
+static void
+canon_init_printer(const stp_vars_t *v, const canon_privdata_t *init)
{
- int mytop;
+ unsigned int mytop;
/* init printer */
if (init->is_first_page) {
canon_init_resetPrinter(v,init); /* ESC [K */
@@ -2634,15 +1332,21 @@ canon_init_printer(const stp_vars_t *v, canon_init_t *init)
canon_init_setPageMargins2(v,init); /* ESC (p */
canon_init_setTray(v,init); /* ESC (l */
canon_init_setX72(v,init); /* ESC (r */
+ canon_init_setMultiRaster(v,init); /* ESC (I (J (L */
/* some linefeeds */
- mytop= (init->top*init->ydpi)/72;
- canon_cmd(v,ESC28,0x65, 2, (mytop >> 8 ),(mytop & 255));
+ mytop= (init->top*init->mode->ydpi)/72;
+
+ if(init->caps->features & CANON_CAP_I)
+ mytop /= RASTER_LINES_PER_BLOCK;
+
+ if(mytop)
+ canon_cmd(v,ESC28,0x65, 2, (mytop >> 8 ),(mytop & 255));
}
static void
-canon_deinit_printer(const stp_vars_t *v, canon_init_t *init)
+canon_deinit_printer(const stp_vars_t *v, const canon_privdata_t *init)
{
/* eject page */
stp_putc(0x0c,v);
@@ -2682,19 +1386,13 @@ canon_advance_buffer(unsigned char *buf, int len, int num)
}
static void
-setup_column(canon_privdata_t *privdata, int col, int buf_length)
-{
- privdata->cols[col] = stp_zalloc(buf_length * (privdata->delay[col] + 1));
-}
-
-static void
canon_printfunc(stp_vars_t *v)
{
int i;
canon_privdata_t *pd = (canon_privdata_t *) stp_get_component_data(v, "Driver");
canon_write_line(v);
- for (i = 0; i < 7; i++)
- canon_advance_buffer(pd->cols[i], pd->buf_length, pd->delay[i]);
+ for (i = 0; i < pd->num_channels ; i++)
+ canon_advance_buffer(pd->channels[i].buf, pd->length, pd->channels[i].delay);
}
@@ -2707,62 +1405,7 @@ get_double_param(stp_vars_t *v, const char *param)
return 1.0;
}
-static void
-set_ink_ranges(stp_vars_t *v, const canon_variable_ink_t *ink, int color,
- const char *channel_param, const char *subchannel_param)
-{
- int num_shades;
- if (!ink)
- return;
-
- /* ignore small dot shades with zero density */
- if(ink->numshades > 1 && ink->shades[1].value == 0.0)
- num_shades = 1;
- else
- num_shades = ink->numshades;
- stp_dither_set_inks_full(v, color, num_shades, ink->shades, 1.0,
- ink_darknesses[color]);
- stp_channel_set_density_adjustment
- (v, color, 1, (get_double_param(v, channel_param) *
- get_double_param(v, subchannel_param) *
- get_double_param(v, "Density")));
-}
-
-/* this function sets the info
- entry in the color_info_t struct */
-static void
-set_bit_info(const canon_cap_t * caps,color_info_t* color)
-{
- unsigned char bit_depth;
- if(color->level < 2)
- bit_depth = 0;
- else if(color->level < 3)
- bit_depth = 1;
- else if(color->level < 5)
- bit_depth = 2;
- else
- bit_depth = 4;
- if((color->level == 3) && (caps->features & CANON_CAP_5pixelin1byte))
- color->info = (1 << 5) | bit_depth;
- else
- color->info = bit_depth;
-}
-/* function sets the level and bit depth in the color_info_t struct according to the ink settings */
-static void
-set_color_info(const canon_cap_t * caps,const canon_variable_ink_t* ink,color_info_t* large,color_info_t* small)
-{
- if(ink)
- {
- large->level = ink->shades[0].numsizes + 1;
- if(ink->numshades > 1)
- small->level = ink->shades[1].numsizes + 1;
- }
- else /* default to 2 level, bit depth 1*/
- large->level = 2;
- set_bit_info(caps,large);
- set_bit_info(caps,small);
-}
static void
set_mask(unsigned char *cd_mask, int x_center, int scaled_x_where,
@@ -2811,10 +1454,193 @@ set_mask(unsigned char *cd_mask, int x_center, int scaled_x_where,
}
-#define CD_X_OFFSET 0
-#define CD_Y_OFFSET 230
-#define CD_OUTER_RADIUS (329/2)
-#define CD_INNER_RADIUS 56
+/* get delay settings for the specified color and mode */
+static int canon_get_delay(canon_privdata_t* privdata,char color){
+ int i=0;
+ int delay = 0;
+ const canon_delay_t* delaylist = privdata->mode->delay;
+
+ while(delaylist && delaylist[i].color){
+ if(delaylist[i].color == color){
+ delay = delaylist[i].delay;
+ break;
+ }
+ ++i;
+ }
+ if(delay > privdata->delay_max)
+ privdata->delay_max = delay;
+ return delay;
+}
+
+
+/* add a single channel to the dither engine */
+static int canon_setup_channel(stp_vars_t *v,canon_privdata_t* privdata,int channel,int subchannel,const canon_inkset_t* ink,stp_shade_t** shades){
+ if(ink->channel && ink->density > 0.0){
+ int delay = canon_get_delay(privdata,ink->channel);
+ canon_channel_t* current;
+ /* create a new channel */
+ privdata->channels = stp_realloc(privdata->channels,sizeof(canon_channel_t) * (privdata->num_channels + 1));
+ privdata->channel_order = stp_realloc(privdata->channel_order,privdata->num_channels + 2);
+ /* update channel order */
+ privdata->channel_order[privdata->num_channels]=ink->channel;
+ privdata->channel_order[privdata->num_channels+1]='\0';
+ current = &(privdata->channels[privdata->num_channels]);
+ ++privdata->num_channels;
+ /* fill ink properties */
+ current->name = ink->channel;
+ current->props = ink->ink;
+ current->delay = delay;
+ /* calculate buffer length */
+ current->buf_length = ((privdata->length * current->props->bits)+1)*(delay + 1);
+ /* update maximum buffer length */
+ if(current->buf_length > privdata->buf_length_max)
+ privdata->buf_length_max = current->buf_length;
+ /* allocate buffer for the raster data */
+ current->buf = stp_zalloc(current->buf_length + 1);
+ /* add channel to the dither engine */
+ stp_dither_add_channel(v, current->buf , channel , subchannel);
+
+ /* add shades to the shades array */
+ *shades = stp_realloc(*shades,(subchannel + 1) * sizeof(stp_shade_t));
+ /* move previous shades up one position as set_inks_full expects the subchannels first */
+ if(subchannel)
+ memcpy(*shades + 1,*shades,sizeof(stp_shade_t) * subchannel);
+ (*shades)[0].value = ink->density;
+ (*shades)[0].numsizes = ink->ink->numsizes;
+ (*shades)[0].dot_sizes = ink->ink->dot_sizes;
+ return 1;
+ }
+ return 0;
+}
+
+
+
+
+
+/* setup the dither channels */
+static void canon_setup_channels(stp_vars_t *v,canon_privdata_t* privdata){
+ /* codes for the primary channels */
+ const char primary[STP_NCOLORS] = {'K','C','M','Y',};
+ /* codes for the subchannels */
+ const char secondary[STP_NCOLORS] = {'k','c','m','y'};
+ /* names of the density adjustment controls */
+ const char *primary_density_control[STP_NCOLORS] = {"BlackDensity","CyanDensity","MagentaDensity","YellowDensity"};
+ const char *secondary_density_control[STP_NCOLORS] = {NULL,"LightCyanTransition","LightMagentaTransition","LightYellowTransition"};
+ /* ink darkness for every channel */
+ const double ink_darkness[] = {1.0, 0.31 / .5, 0.61 / .97, 0.08};
+
+ int channel;
+
+
+ /* loop through the dither channels */
+ for(channel=0; channel < STP_NCOLORS ; channel++){
+ int i;
+ unsigned int subchannel = 0;
+ stp_shade_t* shades = NULL;
+ if(channel == STP_ECOLOR_K && privdata->used_inks & CANON_INK_K_MASK){ /* black channel */
+ /* find K and k inks */
+ for(i=0;i<privdata->mode->num_inks;i++){
+ const canon_inkset_t* ink = &privdata->mode->inks[i];
+ if(ink->channel == primary[channel] || ink->channel == secondary[channel])
+ subchannel += canon_setup_channel(v,privdata,channel,subchannel,ink,&shades);
+ }
+ stp_channel_set_black_channel(v, STP_ECOLOR_K);
+ }else if(channel != STP_ECOLOR_K && privdata->used_inks & CANON_INK_CMY_MASK){ /* color channels */
+ for(i=0;i<privdata->mode->num_inks;i++){
+ const canon_inkset_t* ink = &privdata->mode->inks[i];
+ if(ink->channel == primary[channel] || ((privdata->used_inks & CANON_INK_CcMmYyKk_MASK) && (ink->channel == secondary[channel])))
+ subchannel += canon_setup_channel(v,privdata,channel,subchannel,ink,&shades);
+ }
+ }
+
+ /* set inks and density */
+ if(shades){
+ stp_dither_set_inks_full(v,channel, subchannel, shades, 1.0,ink_darkness[channel]);
+ for(i=0;i<subchannel;i++){
+ double density = get_double_param(v, primary_density_control[channel]) * get_double_param(v, "Density");
+ if(i > 0 && secondary_density_control[channel])
+ density *= get_double_param(v, secondary_density_control[channel]);
+ stp_channel_set_density_adjustment(v,channel,subchannel,density);
+ }
+ stp_free(shades);
+ }
+ }
+
+}
+
+
+
+
+
+
+
+/* FIXME move this to printercaps */
+#define CANON_CD_X 176
+#define CANON_CD_Y 405
+
+static void setup_page(stp_vars_t* v,canon_privdata_t* privdata){
+ const char *media_source = stp_get_string_parameter(v, "InputSlot");
+ const char *cd_type = stp_get_string_parameter(v, "PageSize");
+ int print_cd= (media_source && (!strcmp(media_source, "CD")));
+ int page_left,
+ page_top,
+ page_right,
+ page_bottom;
+ int hub_size = 0;
+
+
+ if (cd_type && (strcmp(cd_type, "CDCustom") == 0 ))
+ {
+ int outer_diameter = stp_get_dimension_parameter(v, "CDOuterDiameter");
+ stp_set_page_width(v, outer_diameter);
+ stp_set_page_height(v, outer_diameter);
+ stp_set_width(v, outer_diameter);
+ stp_set_height(v, outer_diameter);
+ hub_size = stp_get_dimension_parameter(v, "CDInnerDiameter");
+ }
+ else
+ {
+ const char *inner_radius_name = stp_get_string_parameter(v, "CDInnerRadius");
+ hub_size = 43 * 10 * 72 / 254; /* 43 mm standard CD hub */
+
+ if (inner_radius_name && strcmp(inner_radius_name, "Small") == 0)
+ hub_size = 16 * 10 * 72 / 254; /* 15 mm prints to the hole - play it
+ safe and print 16 mm */
+ }
+
+ privdata->top = stp_get_top(v);
+ privdata->left = stp_get_left(v);
+ privdata->out_width = stp_get_width(v);
+ privdata->out_height = stp_get_height(v);
+
+ internal_imageable_area(v, 0, &page_left, &page_right,
+ &page_bottom, &page_top);
+ if (print_cd) {
+ privdata->cd_inner_radius = hub_size / 2;
+ privdata->cd_outer_radius = stp_get_width(v) / 2;
+ privdata->left = CANON_CD_X - privdata->cd_outer_radius + stp_get_dimension_parameter(v, "CDXAdjustment");;
+ privdata->top = CANON_CD_Y - privdata->cd_outer_radius + stp_get_dimension_parameter(v, "CDYAdjustment");
+ privdata->page_width = privdata->left + privdata->out_width;
+ privdata->page_height = privdata->top + privdata->out_height;
+ } else {
+ privdata->left -= page_left;
+ privdata->top -= page_top;
+ privdata->page_width = page_right - page_left;
+ privdata->page_height = page_bottom - page_top;
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+
/*
* 'canon_print()' - Print an image to a CANON printer.
*/
@@ -2824,311 +1650,80 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
int i;
int status = 1;
int model = stp_get_model_id(v);
- const char *resolution = stp_get_string_parameter(v, "Resolution");
const char *media_source = stp_get_string_parameter(v, "InputSlot");
- const char *print_mode = stp_get_string_parameter(v, "PrintingMode");
const char *duplex_mode =stp_get_string_parameter(v, "Duplex");
int page_number = stp_get_int_parameter(v, "PageNumber");
-
- int printing_color = 0;
- const char *ink_type = stp_get_string_parameter(v, "InkType");
- int top = stp_get_top(v);
- int left = stp_get_left(v);
+ const canon_cap_t * caps= canon_get_model_capabilities(model);
int y; /* Looping vars */
- int xdpi, ydpi; /* Resolution */
- int n; /* Output number */
canon_privdata_t privdata;
- int page_width, /* Width of page */
- page_height, /* Length of page */
- page_left,
- page_top,
- page_right,
- page_bottom,
- page_true_height, /* True length of page */
- out_width, /* Width of image on page */
- out_height, /* Length of image on page */
- out_channels, /* Output bytes per pixel */
- length, /* Length of raster data */
- errdiv, /* Error dividend */
+ int errdiv, /* Error dividend */
errmod, /* Error modulus */
errval, /* Current error value */
errline, /* Current raster line */
- errlast; /* Last raster line loaded */
+ errlast, /* Last raster line loaded */
+ out_channels; /* Output bytes per pixel */
unsigned zero_mask;
- int bits= 1;
- int max_bits = 0;
+ int print_cd= (media_source && (!strcmp(media_source, "CD")));
int image_height,
image_width;
- int res_code;
- int use_6color= 0;
- int print_cd= (media_source && (!strcmp(media_source, "CD")));
double k_upper, k_lower;
unsigned char *cd_mask = NULL;
double outer_r_sq = 0;
double inner_r_sq = 0;
-
- stp_curve_t *lum_adjustment = NULL;
- stp_curve_t *hue_adjustment = NULL;
- stp_curve_t *sat_adjustment = NULL;
-
- canon_init_t init;
- const canon_cap_t * caps= canon_get_model_capabilities(model);
- int printhead= canon_printhead_type(ink_type,caps);
- colormode_t colormode = canon_printhead_colors(ink_type,caps);
- const paper_t *pt;
- const canon_variable_inkset_t *inks;
- const canon_res_t *res = canon_resolutions;
+ unsigned char* weave_cols[4] ; /* TODO clean up weaving code to be more generic */
if (!stp_verify(v))
{
stp_eprintf(v, "Print options not verified; cannot print.\n");
return 0;
}
- if (strcmp(print_mode, "Color") == 0)
- printing_color = 1;
-
- PUT("top ",top,72);
- PUT("left ",left,72);
-
/*
* Setup a read-only pixel region for the entire image...
*/
stp_image_init(image);
- /* force grayscale if image is grayscale
- * or single black cartridge installed
- */
- if (printhead == 0 || caps->inks == CANON_INK_K)
- {
- printing_color = 0;
- stp_set_string_parameter(v, "PrintingMode", "BW");
- }
+ /* rotate even pages for DuplexNoTumble */
+ if((page_number & 1) && duplex_mode && !strcmp(duplex_mode,"DuplexNoTumble"))
+ image = stpi_buffer_image(image,BUFFER_FLAG_FLIP_X | BUFFER_FLAG_FLIP_Y);
- if (!printing_color)
- colormode = COLOR_MONOCHROME;
+ memset(&privdata,0,sizeof(canon_privdata_t));
+ privdata.caps = caps;
- /*
- * Figure out the output resolution...
- */
+ /* find the wanted print mode */
+ privdata.mode = canon_get_current_mode(v);
- xdpi = -1;
- ydpi = -1;
- while (res->x > 0) {
- if (strcmp(resolution, res->name) == 0 ||
- strcmp(resolution, res->name_dmt) == 0)
- {
- xdpi = res->x;
- ydpi = res->y;
- break;
- }
- res++;
- }
- stp_deprintf(STP_DBG_CANON,"canon: resolution=%dx%d\n",xdpi,ydpi);
- stp_deprintf(STP_DBG_CANON," rescode =0x%x\n",canon_res_code(caps,xdpi,ydpi));
- res_code= canon_res_code(caps,xdpi,ydpi);
- if (strcmp(resolution, res->name_dmt) == 0 &&
- (caps->features & CANON_CAP_DMT)) {
- bits= 2;
- stp_deprintf(STP_DBG_CANON,"canon: using drop modulation technology\n");
- }
-
- /*
- * Compute the output size...
- */
+ /* force grayscale if image is grayscale
+ * or single black cartridge installed
+ */
+ privdata.used_inks = canon_printhead_colors(v);
+ if (privdata.used_inks == CANON_INK_K)
+ stp_set_string_parameter(v, "PrintingMode", "BW");
- out_width = stp_get_width(v);
- out_height = stp_get_height(v);
+ setup_page(v,&privdata);
- internal_imageable_area(v, 0, &page_left, &page_right,
- &page_bottom, &page_top);
- if (print_cd) {
- left += CD_X_OFFSET;
- top += CD_Y_OFFSET;
- /*page_width = CD_OUTER_RADIUS*2;
- page_height = CD_OUTER_RADIUS*2; */
- stp_default_media_size(v, &page_width, &page_height);
- out_width = page_width;
- out_height = page_height;
- } else {
- left -= page_left;
- top -= page_top;
- page_width = page_right - page_left;
- page_height = page_bottom - page_top;
- }
image_height = stp_image_height(image);
image_width = stp_image_width(image);
- stp_default_media_size(v, &n, &page_true_height);
-
- PUT("top ",top,72);
- PUT("left ",left,72);
- PUT("page_true_height",page_true_height,72);
- PUT("out_width ", out_width,xdpi);
- PUT("out_height", out_height,ydpi);
-
- PUT("top ",top,72);
- PUT("left ",left,72);
-
- pt = get_media_type(stp_get_string_parameter(v, "MediaType"));
-
- init.caps = caps;
- init.printing_color = printing_color;
- init.pt = pt;
- init.print_head = printhead;
- init.colormode = colormode;
- init.source_str = media_source;
- init.duplex_str = duplex_mode;
- init.is_first_page = (page_number == 0);
- init.xdpi = xdpi;
- init.ydpi = ydpi;
- init.page_width = page_width;
- init.page_height = page_height;
- init.top = top;
- init.left = left;
- init.bits = bits;
-
- if ((inks = canon_inks(caps, res_code, colormode, bits)) != 0)
- {
- if(caps->features & CANON_CAP_extended_t)
- {
- memset(init.color_info,0,sizeof(init.color_info));
- set_color_info(caps,inks->c,&(init.color_info[0]),&(init.color_info[4]));
- set_color_info(caps,inks->m,&(init.color_info[1]),&(init.color_info[5]));
- set_color_info(caps,inks->y,&(init.color_info[2]),&(init.color_info[6]));
- set_color_info(caps,inks->k,&(init.color_info[3]),&(init.color_info[7]));
- /* duplicate the info as it is needed later, too */
- memcpy(privdata.color_info,init.color_info,sizeof(init.color_info));
- }
- }
-
- canon_init_printer(v, &init);
-
- /* possibly changed during initialitation
- * to enforce valid modes of operation:
- */
- bits= init.bits;
- xdpi= init.xdpi;
- ydpi= init.ydpi;
+ privdata.pt = get_media_type(caps,stp_get_string_parameter(v, "MediaType"));
+ privdata.slot = canon_source_type(media_source,caps);
+ privdata.duplex_str = duplex_mode;
+ privdata.is_first_page = (page_number == 0);
/*
* Convert image size to printer resolution...
*/
- out_width = xdpi * out_width / 72;
- out_height = ydpi * out_height / 72;
-
- PUT("out_width ", out_width,xdpi);
- PUT("out_height", out_height,ydpi);
-
- left = xdpi * left / 72;
-
- PUT("leftskip",left,xdpi);
-
- for (i = 0; i < 7; i++)
- privdata.cols[i] = NULL;
-
- if((xdpi == 1440) && (model != 4202)){
- privdata.delay[0] = 0;
- privdata.delay[1] = 112;
- privdata.delay[2] = 224;
- privdata.delay[3] = 336;
- privdata.delay[4] = 112;
- privdata.delay[5] = 224;
- privdata.delay[6] = 336;
- privdata.delay_max = 336;
- stp_deprintf(STP_DBG_CANON,"canon: delay on!\n");
- } else if (model ==4202 ){
- privdata.delay[0]= 0;
- privdata.delay[1]= 0x30;
- privdata.delay[2]= 0x50;
- privdata.delay[3]= 0x70;
- privdata.delay[4]= 0;
- privdata.delay[5]= 0;
- privdata.delay[6]= 0;
- privdata.delay_max= 0x70;
- stp_deprintf(STP_DBG_CANON,"canon: delay for S200 on!\n");
- } else {
- for (i = 0; i < 7; i++)
- privdata.delay[i] = 0;
- privdata.delay_max = 0;
- stp_deprintf(STP_DBG_CANON,"canon: delay off!\n");
- }
-
- /*
- * Allocate memory for the raster data...
- */
-
- length = (out_width + 7) / 8;
-
- max_bits=bits;
+ privdata.out_width = privdata.mode->xdpi * privdata.out_width / 72;
+ privdata.out_height = privdata.mode->ydpi * privdata.out_height / 72;
- /* when using the extended settings in the t) command every color might have
- its own bit depth */
- if(caps->features & CANON_CAP_extended_t)
- {
- for(i = 0; i < sizeof(init.color_info) / sizeof(init.color_info[0]);i++)
- {
- if((init.color_info[i].info & 3) > max_bits)
- max_bits = init.color_info[i].info & 3;
- }
- }
-
- /* buffer length + 1 extra byte for offset data that might get added in canon_write */
- privdata.buf_length = length * max_bits + 1;
- privdata.length = length;
- privdata.left = left;
- privdata.bits = bits;
- privdata.out_width = out_width;
- privdata.caps = caps;
- privdata.ydpi = ydpi;
-
- stp_deprintf(STP_DBG_CANON,"canon: buflength is %d!\n",privdata.buf_length);
-
- if (colormode==COLOR_MONOCHROME) {
- setup_column(&privdata, 0, privdata.buf_length);
- } else {
- setup_column(&privdata, 1, privdata.buf_length);
- setup_column(&privdata, 2, privdata.buf_length);
- setup_column(&privdata, 3, privdata.buf_length);
-
- if (colormode!=COLOR_CMY)
- setup_column(&privdata, 0, privdata.buf_length);
-
- if (colormode==COLOR_CCMMYK || colormode==COLOR_CCMMYYK) {
- use_6color= 1;
- setup_column(&privdata, 4, privdata.buf_length);
- setup_column(&privdata, 5, privdata.buf_length);
- if (colormode==CANON_INK_CcMmYyK)
- setup_column(&privdata, 6, privdata.buf_length);
- }
- }
-
- if (privdata.cols[0])
- {
- if (privdata.cols[1])
- stp_set_string_parameter(v, "STPIOutputType", "KCMY");
- else
- stp_set_string_parameter(v, "STPIOutputType", "Grayscale");
- }
- else
- stp_set_string_parameter(v, "STPIOutputType", "CMY");
-
- stp_deprintf(STP_DBG_CANON,
- "canon: driver will use colors %s%s%s%s%s%s%s\n",
- privdata.cols[0] ? "K" : "",
- privdata.cols[1] ? "C" : "",
- privdata.cols[2] ? "M" : "",
- privdata.cols[3] ? "Y" : "",
- privdata.cols[4] ? "c" : "",
- privdata.cols[5] ? "m" : "",
- privdata.cols[6] ? "y" : "");
+ privdata.left = privdata.mode->xdpi * privdata.left / 72;
stp_deprintf(STP_DBG_CANON,"density is %f\n",
- stp_get_float_parameter(v, "Density"));
+ stp_get_float_parameter(v, "Density"));
/*
* Compute the LUT. For now, it's 8 bit, but that may eventually
@@ -3140,116 +1735,108 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
stp_set_float_parameter_active(v, "Density", STP_PARAMETER_ACTIVE);
stp_set_float_parameter(v, "Density", 1.0);
}
- if (pt)
- stp_scale_float_parameter(v, "Density", pt->base_density);
- else /* Can't find paper type? Assume plain */
- stp_scale_float_parameter(v, "Density", .5);
- stp_scale_float_parameter(v, "Density", canon_density(caps, res_code));
+
+ stp_scale_float_parameter(v, "Density", privdata.pt->base_density);
+ stp_scale_float_parameter(v, "Density",privdata.mode->density);
+
if (stp_get_float_parameter(v, "Density") > 1.0)
stp_set_float_parameter(v, "Density", 1.0);
- if (colormode == COLOR_MONOCHROME)
+
+ if (privdata.used_inks == CANON_INK_K)
stp_scale_float_parameter(v, "Gamma", 1.25);
stp_deprintf(STP_DBG_CANON,"density is %f\n",
- stp_get_float_parameter(v, "Density"));
+ stp_get_float_parameter(v, "Density"));
+
+ if(privdata.used_inks & CANON_INK_CMYK_MASK)
+ stp_set_string_parameter(v, "STPIOutputType", "KCMY");
+ else if(privdata.used_inks & CANON_INK_CMY_MASK)
+ stp_set_string_parameter(v, "STPIOutputType", "CMY");
+ else
+ stp_set_string_parameter(v, "STPIOutputType", "Grayscale");
+
+ privdata.length = (privdata.out_width + 7) / 8;
+
+ stp_dither_init(v, image, privdata.out_width, privdata.mode->xdpi, privdata.mode->ydpi);
+
+ canon_setup_channels(v,&privdata);
+
+
+ stp_deprintf(STP_DBG_CANON,
+ "canon: driver will use colors %s\n",privdata.channel_order);
+
+ /* Allocate compression buffer */
+ if(caps->features & CANON_CAP_I)
+ privdata.comp_buf = stp_zalloc(privdata.buf_length_max * 2 * RASTER_LINES_PER_BLOCK * privdata.num_channels); /* for multiraster we need to buffer 8 lines for every color */
+ else
+ privdata.comp_buf = stp_zalloc(privdata.buf_length_max * 2);
+ /* Allocate fold buffer */
+ privdata.fold_buf = stp_zalloc(privdata.buf_length_max);
+
+
/*
* Output the page...
*/
+ /* FIXME this is probably broken, kept for backward compatibility */
+ if(privdata.num_channels > 4){
+ k_lower = 0.4 / privdata.channels[4].props->bits + .1;
+ }else
+ k_lower = 0.25;
+
+ k_lower *= privdata.pt->k_lower_scale;
+ k_upper = privdata.pt->k_upper;
- if (use_6color)
- k_lower = .4 / bits + .1;
- else
- k_lower = .25 / bits;
- if (pt)
- {
- k_lower *= pt->k_lower_scale;
- k_upper = pt->k_upper;
- }
- else
- {
- k_lower *= .5;
- k_upper = .5;
- }
if (!stp_check_float_parameter(v, "GCRLower", STP_PARAMETER_ACTIVE))
stp_set_default_float_parameter(v, "GCRLower", k_lower);
if (!stp_check_float_parameter(v, "GCRUpper", STP_PARAMETER_ACTIVE))
stp_set_default_float_parameter(v, "GCRUpper", k_upper);
- stp_dither_init(v, image, out_width, xdpi, ydpi);
- for (i = 0; i < 7; i++)
- {
- if (privdata.cols[i])
- {
- stp_dither_add_channel(v, privdata.cols[i], channel_color_map[i],
- subchannel_color_map[i]);
- if (channel_color_map[i] == STP_ECOLOR_K)
- stp_channel_set_black_channel(v, STP_ECOLOR_K);
- }
- }
- if ((inks = canon_inks(caps, res_code, colormode, bits))!=0)
- {
- set_ink_ranges(v, inks->c, STP_ECOLOR_C, "CyanDensity",
- "LightCyanTransition");
- set_ink_ranges(v, inks->m, STP_ECOLOR_M, "MagentaDensity",
- "LightMagentaTransition");
- set_ink_ranges(v, inks->y, STP_ECOLOR_Y, "YellowDensity",
- "LightYellowTransition");
- set_ink_ranges(v, inks->k, STP_ECOLOR_K, "BlackDensity", NULL);
- }
- stp_channel_set_density_adjustment
- (v, STP_ECOLOR_C, 0,
- get_double_param(v, "CyanDensity") * get_double_param(v, "Density"));
- stp_channel_set_density_adjustment
- (v, STP_ECOLOR_M, 0,
- get_double_param(v, "MagentaDensity") * get_double_param(v, "Density"));
- stp_channel_set_density_adjustment
- (v, STP_ECOLOR_Y, 0,
- get_double_param(v, "YellowDensity") * get_double_param(v, "Density"));
- stp_channel_set_density_adjustment
- (v, STP_ECOLOR_K, 0,
- get_double_param(v, "BlackDensity") * get_double_param(v, "Density"));
-
- /* initialize weaving for S200 for resolutions > 360dpi */
- if ( (init.caps->features & CANON_CAP_WEAVE) && (xdpi > 360) )
+ /* init the printer */
+ canon_init_printer(v, &privdata);
+
+ /* initialize weaving for S200 for resolutions > 360dpi */
+ if (privdata.mode->flags & MODE_FLAG_WEAVE)
{
+ char weave_color_order[] = "KCMY";
+
privdata.stepper_ydpi = 720;
privdata.nozzle_ydpi = 360;
- if (xdpi == 2880)
+ if (privdata.mode->xdpi == 2880)
privdata.physical_xdpi = 2880;
else
privdata.physical_xdpi = 720;
stp_deprintf(STP_DBG_CANON,"canon: adjust leftskip: old=%d,\n", privdata.left);
- privdata.left = (int)( (float)privdata.left * (float)privdata.physical_xdpi / (float)xdpi ); /* adjust left margin */
+ privdata.left = (int)( (float)privdata.left * (float)privdata.physical_xdpi / (float)privdata.mode->xdpi ); /* adjust left margin */
stp_deprintf(STP_DBG_CANON,"canon: adjust leftskip: new=%d,\n", privdata.left);
privdata.ncolors = 4;
privdata.head_offset = stp_zalloc(sizeof(int) * privdata.ncolors);
memset(privdata.head_offset, 0, sizeof(privdata.head_offset));
- if ( colormode == COLOR_MONOCHROME )
+ if ( privdata.used_inks == CANON_INK_K )
privdata.nozzles = 64; /* black nozzles */
else
privdata.nozzles = 24; /* color nozzles */
- if (colormode == COLOR_MONOCHROME)
+ if ( privdata.used_inks == CANON_INK_K )
{
privdata.ncolors = 1;
privdata.head_offset[0] = 0; /* K starts at 0 */
privdata.head_offset[1] = 0 ;/* how far C starts after K */
privdata.head_offset[2] = 0;/* how far M starts after K */
privdata.head_offset[3] = 0;/* how far Y starts after K */
- top += 11;
+ privdata.top += 11;
}
- else if (colormode == COLOR_CMYK)
+ else if ( privdata.used_inks == CANON_INK_CMYK )
{
privdata.head_offset[0] = 0; /* K starts at 0 */
privdata.head_offset[1] = 144 ;/* how far C starts after K */
privdata.head_offset[2] = 144 + 64;/* how far M starts after K */
privdata.head_offset[3] = 144 + 64 + 64;/* how far Y starts after K */
- top += 5;
+ privdata.top += 5;
}
else /* colormode == CMY */
{
@@ -3257,13 +1844,13 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
privdata.head_offset[1] = 0 ;/* how far C starts after K */
privdata.head_offset[2] = 64;/* how far M starts after K */
privdata.head_offset[3] = 128;/* how far Y starts after K */
- top += 18;
+ privdata.top += 18;
}
privdata.nozzle_separation = privdata.stepper_ydpi / privdata.nozzle_ydpi;
- privdata.horizontal_passes = xdpi / privdata.physical_xdpi;
+ privdata.horizontal_passes = privdata.mode->xdpi / privdata.physical_xdpi;
privdata.vertical_passes = 1;
- privdata.vertical_oversample = privdata.ydpi / privdata.stepper_ydpi;
+ privdata.vertical_oversample = privdata.mode->ydpi / privdata.stepper_ydpi;
privdata.bidirectional = 1; /* 1: bidirectional; 0: unidirectional printing */
privdata.direction = 1;
stp_allocate_component_data(v, "Driver", NULL, NULL, &privdata);
@@ -3275,8 +1862,8 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
privdata.nozzles, privdata.nozzle_separation,
privdata.horizontal_passes, privdata.vertical_passes,
privdata.vertical_oversample, privdata.ncolors,
- out_width, out_height,
- top * privdata.stepper_ydpi / 72, page_height * privdata.stepper_ydpi / 72,
+ privdata.out_width, privdata.out_height,
+ privdata.top * privdata.stepper_ydpi / 72, privdata.page_height * privdata.stepper_ydpi / 72,
privdata.head_offset[0],privdata.head_offset[1],
privdata.head_offset[2],privdata.head_offset[3]);
@@ -3284,9 +1871,9 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
privdata.horizontal_passes, privdata.vertical_passes,
privdata.vertical_oversample, privdata.ncolors,
1,
- out_width, out_height,
- top * privdata.stepper_ydpi / 72,
- page_height * privdata.stepper_ydpi / 72,
+ privdata.out_width, privdata.out_height,
+ privdata.top * privdata.stepper_ydpi / 72,
+ privdata.page_height * privdata.stepper_ydpi / 72,
privdata.head_offset,
STP_WEAVE_ZIGZAG,
canon_flush_pass,
@@ -3294,41 +1881,54 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
stp_pack_uncompressed,
stp_compute_uncompressed_linewidth);
privdata.last_pass_offset = 0;
- }
- errdiv = image_height / out_height;
- errmod = image_height % out_height;
+ for(i=0;i<4;i++){
+ int x;
+ for(x=0;x<privdata.num_channels;x++){
+ if(weave_color_order[i] == privdata.channel_order[x])
+ weave_cols[i] = privdata.channels[x].buf;
+ privdata.weave_bits[i] = privdata.channels[x].props->bits;
+ }
+ }
+ }
+
+
+ errdiv = image_height / privdata.out_height;
+ errmod = image_height % privdata.out_height;
errval = 0;
errlast = -1;
errline = 0;
-
- if (!stp_check_curve_parameter(v, "HueMap", STP_PARAMETER_ACTIVE) &&
- pt->hue_adjustment)
+
+ if (!stp_check_curve_parameter(v, "HueMap", STP_PARAMETER_ACTIVE))
{
- hue_adjustment = stp_read_and_compose_curves
- (canon_hue_adjustment(model),
- pt ? pt->hue_adjustment : NULL, STP_CURVE_COMPOSE_ADD, 384);
- stp_set_curve_parameter(v, "HueMap", hue_adjustment);
- stp_curve_destroy(hue_adjustment);
+ stp_curve_t* hue_adjustment = stp_read_and_compose_curves
+ (caps->hue_adjustment,privdata.pt->hue_adjustment,
+ STP_CURVE_COMPOSE_ADD, 384);
+ if(hue_adjustment){
+ stp_set_curve_parameter(v, "HueMap", hue_adjustment);
+ stp_curve_destroy(hue_adjustment);
+ }
}
- if (!stp_check_curve_parameter(v, "LumMap", STP_PARAMETER_ACTIVE) &&
- pt->lum_adjustment)
+ if (!stp_check_curve_parameter(v, "LumMap", STP_PARAMETER_ACTIVE))
{
- lum_adjustment = stp_read_and_compose_curves
- (canon_lum_adjustment(model),
- pt ? pt->lum_adjustment : NULL, STP_CURVE_COMPOSE_MULTIPLY, 384);
- stp_set_curve_parameter(v, "LumMap", lum_adjustment);
- stp_curve_destroy(lum_adjustment);
+ stp_curve_t* lum_adjustment = stp_read_and_compose_curves
+ (caps->lum_adjustment,privdata.pt->lum_adjustment,
+ STP_CURVE_COMPOSE_MULTIPLY, 384);
+ if(lum_adjustment){
+ stp_set_curve_parameter(v, "LumMap", lum_adjustment);
+ stp_curve_destroy(lum_adjustment);
+ }
}
- if (!stp_check_curve_parameter(v, "SatMap", STP_PARAMETER_ACTIVE) &&
- pt->sat_adjustment)
+ if (!stp_check_curve_parameter(v, "SatMap", STP_PARAMETER_ACTIVE))
{
- sat_adjustment = stp_read_and_compose_curves
- (canon_sat_adjustment(model),
- pt ? pt->sat_adjustment : NULL, STP_CURVE_COMPOSE_MULTIPLY, 384);
- stp_set_curve_parameter(v, "SatMap", sat_adjustment);
- stp_curve_destroy(sat_adjustment);
+ stp_curve_t* sat_adjustment = stp_read_and_compose_curves
+ (caps->sat_adjustment,privdata.pt->sat_adjustment,
+ STP_CURVE_COMPOSE_MULTIPLY, 384);
+ if(sat_adjustment){
+ stp_set_curve_parameter(v, "SatMap", sat_adjustment);
+ stp_curve_destroy(sat_adjustment);
+ }
}
out_channels = stp_color_init(v, image, 65536);
@@ -3336,11 +1936,11 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
privdata.emptylines = 0;
if (print_cd) {
- cd_mask = stp_malloc(1 + (out_width + 7) / 8);
- outer_r_sq = (double)CD_OUTER_RADIUS * (double)CD_OUTER_RADIUS;
- inner_r_sq = (double)CD_INNER_RADIUS * (double)CD_INNER_RADIUS;
+ cd_mask = stp_malloc(1 + (privdata.out_width + 7) / 8);
+ outer_r_sq = (double)privdata.cd_outer_radius * (double)privdata.cd_outer_radius;
+ inner_r_sq = (double)privdata.cd_inner_radius * (double)privdata.cd_inner_radius;
}
- for (y = 0; y < out_height; y ++)
+ for (y = 0; y < privdata.out_height; y ++)
{
int duplicate_line = 1;
@@ -3356,44 +1956,46 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
}
if (print_cd)
{
- int x_center = CD_OUTER_RADIUS * xdpi / 72;
+ int x_center = privdata.cd_outer_radius * privdata.mode->xdpi / 72;
int y_distance_from_center =
- CD_OUTER_RADIUS - (y * 72 / ydpi);
+ privdata.cd_outer_radius - (y * 72 / privdata.mode->ydpi);
if (y_distance_from_center < 0)
y_distance_from_center = -y_distance_from_center;
- memset(cd_mask, 0, (out_width + 7) / 8);
- if (y_distance_from_center < CD_OUTER_RADIUS)
+ memset(cd_mask, 0, (privdata.out_width + 7) / 8);
+ if (y_distance_from_center < privdata.cd_outer_radius)
{
double y_sq = (double) y_distance_from_center *
(double) y_distance_from_center;
int x_where = sqrt(outer_r_sq - y_sq) + .5;
- int scaled_x_where = x_where * xdpi / 72;
+ int scaled_x_where = x_where * privdata.mode->xdpi / 72;
set_mask(cd_mask, x_center, scaled_x_where,
- out_width, 1, 0);
- if (y_distance_from_center < CD_INNER_RADIUS)
+ privdata.out_width, 1, 0);
+ if (y_distance_from_center < privdata.cd_inner_radius)
{
x_where = sqrt(inner_r_sq - y_sq) + .5;
- scaled_x_where = x_where * ydpi / 72;
+ scaled_x_where = x_where * privdata.mode->ydpi / 72;
set_mask(cd_mask, x_center, scaled_x_where,
- out_width, 1, 1);
+ privdata.out_width, 1, 1);
}
}
}
stp_dither(v, y, duplicate_line, zero_mask, cd_mask);
- if ( (init.caps->features & CANON_CAP_WEAVE) && (xdpi > 360) )
- stp_write_weave(v, privdata.cols);
+ if ( privdata.mode->flags & MODE_FLAG_WEAVE )
+ stp_write_weave(v, weave_cols);
+ else if ( caps->features & CANON_CAP_I)
+ canon_write_multiraster(v,&privdata,y);
else
canon_printfunc(v);
errval += errmod;
errline += errdiv;
- if (errval >= out_height)
+ if (errval >= privdata.out_height)
{
- errval -= out_height;
+ errval -= privdata.out_height;
errline ++;
}
}
- if ( (init.caps->features & CANON_CAP_WEAVE) && (xdpi > 360) )
+ if ( privdata.mode->flags & MODE_FLAG_WEAVE )
{
stp_flush_all(v);
canon_advance_paper(v, 5);
@@ -3411,9 +2013,9 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
for (y= 0; y<privdata.delay_max; y++) {
canon_write_line(v);
- for (i = 0; i < 7; i++)
- canon_advance_buffer(privdata.cols[i], privdata.buf_length,
- privdata.delay[i]);
+ for (i = 0; i < privdata.num_channels; i++)
+ canon_advance_buffer(privdata.channels[i].buf, privdata.length,
+ privdata.channels[i].delay);
}
}
}
@@ -3423,14 +2025,26 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
* Cleanup...
*/
- for (i = 0; i < 7; i++)
- if (privdata.cols[i])
- stp_free(privdata.cols[i]);
-
+ stp_free(privdata.fold_buf);
+ stp_free(privdata.comp_buf);
+
if(cd_mask)
stp_free(cd_mask);
- canon_deinit_printer(v, &init);
+
+ canon_deinit_printer(v, &privdata);
+
+ for(i=0;i< privdata.num_channels;i++)
+ if(privdata.channels[i].buf)
+ stp_free(privdata.channels[i].buf);
+ if(privdata.channels)
+ stp_free(privdata.channels);
+
+ stp_free(privdata.channel_order);
+ if (privdata.head_offset)
+ stp_free(privdata.head_offset);
+
+
return status;
}
@@ -3461,155 +2075,6 @@ static const stp_printfuncs_t print_canon_printfuncs =
canon_end_job
};
-#ifndef USE_3BIT_FOLD_TYPE
-#error YOU MUST CHOOSE A VALUE FOR USE_3BIT_FOLD_TYPE
-#endif
-
-#if USE_3BIT_FOLD_TYPE == 333
-
-static void
-canon_fold_3bit(const unsigned char *line,
- int single_length,
- unsigned char *outbuf)
-{
- int i;
- for (i = 0; i < single_length; i++) {
- outbuf[0] =
- ((line[0] & (1 << 7)) >> 2) |
- ((line[0] & (1 << 6)) >> 4) |
- ((line[single_length] & (1 << 7)) >> 1) |
- ((line[single_length] & (1 << 6)) >> 3) |
- ((line[single_length] & (1 << 5)) >> 5) |
- ((line[2*single_length] & (1 << 7)) << 0) |
- ((line[2*single_length] & (1 << 6)) >> 2) |
- ((line[2*single_length] & (1 << 5)) >> 4);
- outbuf[1] =
- ((line[0] & (1 << 5)) << 2) |
- ((line[0] & (1 << 4)) << 0) |
- ((line[0] & (1 << 3)) >> 2) |
- ((line[single_length] & (1 << 4)) << 1) |
- ((line[single_length] & (1 << 3)) >> 1) |
- ((line[2*single_length] & (1 << 4)) << 2) |
- ((line[2*single_length] & (1 << 3)) << 0) |
- ((line[2*single_length] & (1 << 2)) >> 2);
- outbuf[2] =
- ((line[0] & (1 << 2)) << 4) |
- ((line[0] & (1 << 1)) << 2) |
- ((line[0] & (1 << 0)) << 0) |
- ((line[single_length] & (1 << 2)) << 5) |
- ((line[single_length] & (1 << 1)) << 3) |
- ((line[single_length] & (1 << 0)) << 1) |
- ((line[2*single_length] & (1 << 1)) << 4) |
- ((line[2*single_length] & (1 << 0)) << 2);
- line++;
- outbuf += 3;
- }
-}
-
-#elif USE_3BIT_FOLD_TYPE == 323
-
-static void
-canon_fold_3bit(const unsigned char *line,
- int single_length,
- unsigned char *outbuf)
-{
- unsigned char A0,A1,A2,B0,B1,B2,C0,C1,C2;
- const unsigned char *last= line+single_length;
-
- for (; line < last; line+=3, outbuf+=8) {
-
- A0= line[0]; B0= line[single_length]; C0= line[2*single_length];
-
- if (line<last-2) {
- A1= line[1]; B1= line[single_length+1]; C1= line[2*single_length+1];
- } else {
- A1= 0; B1= 0; C1= 0;
- }
- if (line<last-1) {
- A2= line[2]; B2= line[single_length+2]; C2= line[2*single_length+2];
- } else {
- A2= 0; B2= 0; C2= 0;
- }
-
- outbuf[0] =
- ((C0 & 0x80) >> 0) |
- ((B0 & 0x80) >> 1) |
- ((A0 & 0x80) >> 2) |
- ((B0 & 0x40) >> 2) |
- ((A0 & 0x40) >> 3) |
- ((C0 & 0x20) >> 3) |
- ((B0 & 0x20) >> 4) |
- ((A0 & 0x20) >> 5);
- outbuf[1] =
- ((C0 & 0x10) << 3) |
- ((B0 & 0x10) << 2) |
- ((A0 & 0x10) << 1) |
- ((B0 & 0x08) << 1) |
- ((A0 & 0x08) << 0) |
- ((C0 & 0x04) >> 0) |
- ((B0 & 0x04) >> 1) |
- ((A0 & 0x04) >> 2);
- outbuf[2] =
- ((C0 & 0x02) << 6) |
- ((B0 & 0x02) << 5) |
- ((A0 & 0x02) << 4) |
- ((B0 & 0x01) << 4) |
- ((A0 & 0x01) << 3) |
- ((C1 & 0x80) >> 5) |
- ((B1 & 0x80) >> 6) |
- ((A1 & 0x80) >> 7);
- outbuf[3] =
- ((C1 & 0x40) << 1) |
- ((B1 & 0x40) << 0) |
- ((A1 & 0x40) >> 1) |
- ((B1 & 0x20) >> 1) |
- ((A1 & 0x20) >> 2) |
- ((C1 & 0x10) >> 2) |
- ((B1 & 0x10) >> 3) |
- ((A1 & 0x10) >> 4);
- outbuf[4] =
- ((C1 & 0x08) << 4) |
- ((B1 & 0x08) << 3) |
- ((A1 & 0x08) << 2) |
- ((B1 & 0x04) << 2) |
- ((A1 & 0x04) << 1) |
- ((C1 & 0x02) << 1) |
- ((B1 & 0x02) >> 0) |
- ((A1 & 0x02) >> 1);
- outbuf[5] =
- ((C1 & 0x01) << 7) |
- ((B1 & 0x01) << 6) |
- ((A1 & 0x01) << 5) |
- ((B2 & 0x80) >> 3) |
- ((A2 & 0x80) >> 4) |
- ((C2 & 0x40) >> 4) |
- ((B2 & 0x40) >> 5) |
- ((A2 & 0x40) >> 6);
- outbuf[6] =
- ((C2 & 0x20) << 2) |
- ((B2 & 0x20) << 1) |
- ((A2 & 0x20) << 0) |
- ((B2 & 0x10) >> 0) |
- ((A2 & 0x10) >> 1) |
- ((C2 & 0x08) >> 1) |
- ((B2 & 0x08) >> 2) |
- ((A2 & 0x08) >> 3);
- outbuf[7] =
- ((C2 & 0x04) << 5) |
- ((B2 & 0x04) << 4) |
- ((A2 & 0x04) << 3) |
- ((B2 & 0x02) << 3) |
- ((A2 & 0x02) << 2) |
- ((C2 & 0x01) << 2) |
- ((B2 & 0x01) << 1) |
- ((A2 & 0x01) << 0);
- }
-}
-
-#else
-#error 3BIT FOLD TYPE NOT IMPLEMENTED
-#endif
-
static void
canon_shift_buffer(unsigned char *line,int length,int bits)
{
@@ -3622,46 +2087,16 @@ canon_shift_buffer(unsigned char *line,int length,int bits)
}
}
-#if 0
-static void
-canon_shift_buffer2(unsigned char *line,int length,int bits)
-{
- int i;
- for (i=length-1; i>0; i--) {
- line[i]= (line[i] >> bits) | (line[i-1] << (8-bits));
- }
- line[0] = line[0] >> bits;
-}
-#endif
-/*
- * 'canon_write()' - Send graphics using TIFF packbits compression.
- */
-
-static int
-canon_write(stp_vars_t *v, /* I - Print file or command */
- const canon_cap_t * caps, /* I - Printer model */
- unsigned char *line, /* I - Output bitmap data */
- int length, /* I - Length of bitmap data */
- int coloridx, /* I - Which color */
- int ydpi, /* I - Vertical resolution */
- int *empty, /* IO- Preceeding empty lines */
- int width, /* I - Printed width */
- int offset, /* I - Offset from left side */
- int bits)
+/* fold, apply 5 pixel in 1 byte compression, pack tiff and return the compressed length */
+static int canon_compress(stp_vars_t *v, canon_privdata_t *pd, unsigned char* line,int length,int offset,unsigned char* comp_buf,int bits, int ink_flags)
{
unsigned char
- comp_buf[COMPBUFWIDTH + COMPBUFWIDTH / 4], /* Compression buffer */
- in_fold[COMPBUFWIDTH],
*in_ptr= line,
*comp_ptr, *comp_data;
- int newlength;
int offset2,bitoffset;
- unsigned char color;
- canon_privdata_t *pd =
- (canon_privdata_t *) stp_get_component_data(v, "Driver");
- /* Don't send blank lines... */
+ /* Don't send blank lines... */
if (line[0] == 0 && memcmp(line, line + 1, length - 1) == 0)
return 0;
@@ -3672,23 +2107,22 @@ canon_write(stp_vars_t *v, /* I - Print file or command */
/* fold lsb/msb pairs if drop modulation is active */
-
if (bits==2) {
int pixels_per_byte = 4;
- if((caps->features & CANON_CAP_5pixelin1byte) && (pd->color_info[coloridx].level == 3))
+ if(ink_flags & INK_FLAG_5pixel_in_1byte)
pixels_per_byte = 5;
- stp_fold(line,length,in_fold);
- in_ptr= in_fold;
+
+ stp_fold(line,length,pd->fold_buf);
+ in_ptr= pd->fold_buf;
length= (length*8/4); /* 4 pixels in 8bit */
/* calculate the number of compressed bytes that can be sent directly */
offset2 = offset / pixels_per_byte;
/* calculate the number of (uncompressed) bits that have to be added to the raster data */
bitoffset = (offset % pixels_per_byte) * 2;
}
- if (bits==3) {
- memset(in_fold,0,length);
- canon_fold_3bit(line,length,in_fold);
- in_ptr= in_fold;
+ else if (bits==3) {
+ stp_fold_3bit_323(line,length,pd->fold_buf);
+ in_ptr= pd->fold_buf;
length= (length*8)/3;
offset2 = offset/3;
#if 0
@@ -3700,11 +2134,19 @@ canon_write(stp_vars_t *v, /* I - Print file or command */
#endif
bitoffset= 0;
}
+ else if (bits==4) {
+ stp_fold_4bit(line,length,pd->fold_buf);
+ in_ptr= pd->fold_buf;
+ length= (length*8)/2;
+ offset2 = offset / 2;
+ bitoffset= offset % 2;
+ }
+
/* pack left border rounded to multiples of 8 dots */
comp_data= comp_buf;
while (offset2>0) {
- unsigned char toffset = offset2 > 128 ? 128 : offset2;
+ unsigned char toffset = offset2 > 127 ? 127 : offset2;
comp_data[0] = 1 - toffset;
comp_data[1] = 0;
comp_data += 2;
@@ -3726,13 +2168,37 @@ canon_write(stp_vars_t *v, /* I - Print file or command */
"bitoffset=%d!!\n",bitoffset);
}
-
- if((caps->features & CANON_CAP_5pixelin1byte) && (pd->color_info[coloridx].level == 3))
- length = pack_pixels(in_ptr,length);
+ if(ink_flags & INK_FLAG_5pixel_in_1byte)
+ length = pack_pixels(in_ptr,length);
stp_pack_tiff(v, in_ptr, length, comp_data, &comp_ptr, NULL, NULL);
- newlength= comp_ptr - comp_buf;
+ return comp_ptr - comp_buf;
+}
+
+/*
+ * 'canon_write()' - Send graphics using TIFF packbits compression.
+ */
+
+static int
+canon_write(stp_vars_t *v, /* I - Print file or command */
+ canon_privdata_t *pd, /* privdata */
+ const canon_cap_t * caps, /* I - Printer model */
+ unsigned char *line, /* I - Output bitmap data */
+ int length, /* I - Length of bitmap data */
+ int coloridx, /* I - Which color */
+ int ydpi, /* I - Vertical resolution */
+ int *empty, /* IO- Preceeding empty lines */
+ int width, /* I - Printed width */
+ int offset, /* I - Offset from left side */
+ int bits,
+ int ink_flags)
+{
+
+ unsigned char color;
+ int newlength = canon_compress(v,pd,line,length,offset,pd->comp_buf,bits,ink_flags);
+ if(!newlength)
+ return 0;
/* send packed empty lines if any */
if (*empty) {
@@ -3745,10 +2211,10 @@ canon_write(stp_vars_t *v, /* I - Print file or command */
stp_zfwrite("\033\050\101", 3, 1, v);
stp_put16_le(newlength + 1, v);
- color= "CMYKcmy"[coloridx];
+ color= "CMYKcmyk"[coloridx];
if (!color) color= 'K';
stp_putc(color,v);
- stp_zfwrite((const char *)comp_buf, newlength, 1, v);
+ stp_zfwrite((const char *)pd->comp_buf, newlength, 1, v);
stp_putc('\015', v);
return 1;
}
@@ -3759,24 +2225,30 @@ canon_write_line(stp_vars_t *v)
{
canon_privdata_t *pd =
(canon_privdata_t *) stp_get_component_data(v, "Driver");
- static const int write_sequence[] = { 0, 3, 2, 1, 6, 5, 4 };
- static const int write_number[] = { 3, 2, 1, 0, 6, 5, 4 };
+ char write_sequence[] = "KYMCymck";
+ static const int write_number[] = { 3, 2, 1, 0, 6, 5, 4, 7 }; /* KYMCymc */
int i;
int written= 0;
-
- for (i = 0; i < 7; i++)
+ for (i = 0; i < strlen(write_sequence) ; i++)
{
- int col = write_sequence[i];
+ int x;
+ const canon_channel_t* channel=NULL;
int num = write_number[i];
- int bits=pd->bits;
- if(pd->caps->features & CANON_CAP_extended_t)
- bits = pd->color_info[num].info & 3;
- if (pd->cols[col])
- written += canon_write(v, pd->caps,
- pd->cols[col] + pd->delay[col] * pd->buf_length,
- pd->length, num, pd->ydpi,
- &(pd->emptylines), pd->out_width,
- pd->left, bits);
+
+ /* TODO optimize => move reorder code to do_print */
+ for(x=0;x < pd->num_channels; x++){
+ if(pd->channels[x].name == write_sequence[i]){
+ channel = &(pd->channels[x]);
+ break;
+ }
+ }
+ if(channel){
+ written += canon_write(v, pd, pd->caps,
+ channel->buf + channel->delay * pd->length /*buf_length[i]*/,
+ pd->length, num, pd->mode->ydpi,
+ &(pd->emptylines), pd->out_width,
+ pd->left, channel->props->bits, channel->props->flags);
+ }
}
if (written)
stp_zfwrite("\033\050\145\002\000\000\001", 7, 1, v);
@@ -3784,6 +2256,57 @@ canon_write_line(stp_vars_t *v)
pd->emptylines += 1;
}
+
+/* write one multiraster block */
+static void canon_write_block(stp_vars_t* v,canon_privdata_t* pd,unsigned char* start, unsigned char* end){
+ unsigned int length = end - start;
+ if(!length)
+ return;
+ stp_zfwrite("\033(F", 3, 1, v);
+ stp_put16_le(length, v);
+ stp_zfwrite((const char *)start, length, 1, v);
+}
+
+
+static void canon_write_multiraster(stp_vars_t *v,canon_privdata_t* pd,int y){
+ int i;
+ unsigned int max_length = 2*pd->buf_length_max * RASTER_LINES_PER_BLOCK;
+ /* a new raster block begins */
+ if(!(y % RASTER_LINES_PER_BLOCK)){
+ if(y != 0){
+ /* write finished blocks */
+ for(i=0;i<pd->num_channels;i++)
+ canon_write_block(v,pd,pd->comp_buf + i * max_length,pd->channels[i].comp_buf_offset);
+ }
+ /* reset start offsets */
+ for(i=0;i<pd->num_channels;i++)
+ pd->channels[i].comp_buf_offset = pd->comp_buf + i * max_length;
+ }
+ /* compress lines and add them to the buffer */
+ for(i=0;i<pd->num_channels;i++){
+ pd->channels[i].comp_buf_offset += canon_compress(v,pd, pd->channels[i].buf,pd->length,pd->left,pd->channels[i].comp_buf_offset,pd->channels[i].props->bits, pd->channels[i].props->flags);
+ *(pd->channels[i].comp_buf_offset) = 0x80; /* terminate the line */
+ ++pd->channels[i].comp_buf_offset;
+ }
+ if(y == pd->out_height - 1){
+ /* we just compressed our last line */
+ if(pd->out_height % RASTER_LINES_PER_BLOCK){
+ /* but our raster block is not finished yet */
+ int missing = RASTER_LINES_PER_BLOCK - (pd->out_height % RASTER_LINES_PER_BLOCK); /* calculate missing lines */
+ for(i=0;i<pd->num_channels;i++){
+ /* add missing empty lines and write blocks */
+ int x;
+ for(x=0;x < missing ; x++){
+ *(pd->channels[i].comp_buf_offset) = 0x80; /* terminate the line */
+ ++pd->channels[i].comp_buf_offset;
+ }
+ canon_write_block(v,pd,pd->comp_buf + i * max_length,pd->channels[i].comp_buf_offset);
+ }
+ }
+ }
+}
+
+
static void
canon_advance_paper(stp_vars_t *v, int advance)
{
@@ -3854,11 +2377,11 @@ canon_flush_pass(stp_vars_t *v, int passno, int vertical_subpass)
}
}
- written += canon_write(v, pd->caps,
+ written += canon_write(v, pd, pd->caps,
(unsigned char *)(bufs[0].v[color] + line * linelength),
- linelength, idx[color], pd->ydpi,
+ linelength, idx[color], pd->mode->ydpi,
&(pd->emptylines), pd->out_width,
- pd->left, pd->bits);
+ pd->left, pd->weave_bits[color],0);
if (written) stp_deprintf(STP_DBG_CANON," --written color %d,\n", color);
}
diff --git a/src/main/print-canon.h b/src/main/print-canon.h
new file mode 100644
index 0000000..812d3c1
--- /dev/null
+++ b/src/main/print-canon.h
@@ -0,0 +1,138 @@
+/*
+ * Print plug-in CANON BJL driver for the GIMP.
+ *
+ * Copyright 1997-2000 Michael Sweet (mike@easysw.com),
+ * Robert Krawitz (rlk@alum.mit.edu) and
+ * Andy Thaller (thaller@ph.tum.de)
+ * Copyright (c) 2006 Sascha Sommer
+ *
+ * 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.
+ */
+
+#ifndef GUTENPRINT_INTERNAL_CANON_H
+#define GUTENPRINT_INTERNAL_CANON_H
+
+
+
+/* Codes for possible ink-tank combinations.
+ * Each combo is represented by the colors that can be used with
+ * the installed ink-tank(s)
+ * Combinations of the codes represent the combinations allowed for a model
+ * Note that only preferrable combinations should be used
+ */
+#define CANON_INK_K 1
+#define CANON_INK_CMY 2
+#define CANON_INK_CMYK 4
+#define CANON_INK_CcMmYK 8
+#define CANON_INK_CcMmYyK 16
+
+#define CANON_INK_CcMmYyKk_MASK (CANON_INK_CcMmYK|CANON_INK_CcMmYyK) /* Ink is CcMmYyKk */
+#define CANON_INK_CMYK_MASK (CANON_INK_CMYK|CANON_INK_CcMmYyKk_MASK) /* Ink is CMYK */
+#define CANON_INK_CMY_MASK (CANON_INK_CMY|CANON_INK_CMYK_MASK) /* Ink is CMY */
+#define CANON_INK_K_MASK (CANON_INK_K|CANON_INK_CMYK_MASK) /* Ink is K */
+
+
+
+/* FIXME someday we will have to fix the internal names (will break the ppds ;(
+* List of possible ink settings ordered by descending ink count
+*the driver will check if the current print mode supports the ink combination before offering it
+*/
+static struct canon_inktype_s {
+ const unsigned int ink_type;
+ const unsigned int num_channels;
+ const char* name;
+ const char* text;
+} canon_inktypes[] = {
+ {CANON_INK_CcMmYyK,7,"PhotoCMYK","Photo CcMmYyK Color"},
+ {CANON_INK_CcMmYK,6,"PhotoCMY", "Photo CcMmYK Color"},
+ {CANON_INK_CMYK,4,"CMYK","CMYK Color"},
+ {CANON_INK_CMY,3,"RGB","CMY Color"},
+ {CANON_INK_K,1,"Gray","Black"}
+};
+
+/* the PIXMA iP4000 and maybe other printers use following table to store
+ 5 pixels with 3 levels in 1 byte, All possible pixel combinations are given
+ numbers from 0 (=00,00,00,00,00) to 242 (=10,10,10,10,10)
+ combinations where the value of one of the pixels would be 3 are skipped
+*/
+static const unsigned char tentoeight[] =
+{
+ 0, 1, 2, 0, 3, 4, 5, 0, 6, 7, 8, 0, 0, 0, 0, 0,
+ 9, 10, 11, 0, 12, 13, 14, 0, 15, 16, 17, 0, 0, 0, 0, 0,
+ 18, 19, 20, 0, 21, 22, 23, 0, 24, 25, 26, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 27, 28, 29, 0, 30, 31, 32, 0, 33, 34, 35, 0, 0, 0, 0, 0,
+ 36, 37, 38, 0, 39, 40, 41, 0, 42, 43, 44, 0, 0, 0, 0, 0,
+ 45, 46, 47, 0, 48, 49, 50, 0, 51, 52, 53, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 54, 55, 56, 0, 57, 58, 59, 0, 60, 61, 62, 0, 0, 0, 0, 0,
+ 63, 64, 65, 0, 66, 67, 68, 0, 69, 70, 71, 0, 0, 0, 0, 0,
+ 72, 73, 74, 0, 75, 76, 77, 0, 78, 79, 80, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 81, 82, 83, 0, 84, 85, 86, 0, 87, 88, 89, 0, 0, 0, 0, 0,
+ 90, 91, 92, 0, 93, 94, 95, 0, 96, 97, 98, 0, 0, 0, 0, 0,
+ 99,100,101, 0,102,103,104, 0,105,106,107, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 108,109,110, 0,111,112,113, 0,114,115,116, 0, 0, 0, 0, 0,
+ 117,118,119, 0,120,121,122, 0,123,124,125, 0, 0, 0, 0, 0,
+ 126,127,128, 0,129,130,131, 0,132,133,134, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 135,136,137, 0,138,139,140, 0,141,142,143, 0, 0, 0, 0, 0,
+ 144,145,146, 0,147,148,149, 0,150,151,152, 0, 0, 0, 0, 0,
+ 153,154,155, 0,156,157,158, 0,159,160,161, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 162,163,164, 0,165,166,167, 0,168,169,170, 0, 0, 0, 0, 0,
+ 171,172,173, 0,174,175,176, 0,177,178,179, 0, 0, 0, 0, 0,
+ 180,181,182, 0,183,184,185, 0,186,187,188, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 189,190,191, 0,192,193,194, 0,195,196,197, 0, 0, 0, 0, 0,
+ 198,199,200, 0,201,202,203, 0,204,205,206, 0, 0, 0, 0, 0,
+ 207,208,209, 0,210,211,212, 0,213,214,215, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 216,217,218, 0,219,220,221, 0,222,223,224, 0, 0, 0, 0, 0,
+ 225,226,227, 0,228,229,230, 0,231,232,233, 0, 0, 0, 0, 0,
+ 234,235,236, 0,237,238,239, 0,240,241,242, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+#endif
diff --git a/src/main/print-color.c b/src/main/print-color.c
index 733789b..592c90c 100644
--- a/src/main/print-color.c
+++ b/src/main/print-color.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-color.c,v 1.135 2006/05/28 16:59:04 rlk Exp $"
+ * "$Id: print-color.c,v 1.135.8.1 2007/05/29 01:47:29 rlk Exp $"
*
* Gutenprint color management module - traditional Gutenprint algorithm.
*
@@ -785,6 +785,8 @@ compute_gcr_curve(const stp_vars_t *vars)
k_trans = stp_get_float_parameter(vars, "BlackTrans");
k_upper *= lut->steps;
k_lower *= lut->steps;
+ stp_dprintf(STP_DBG_LUT, vars, " k_lower %.3f\n", k_lower);
+ stp_dprintf(STP_DBG_LUT, vars, " k_upper %.3f\n", k_upper);
if (k_lower > lut->steps)
k_lower = lut->steps;
diff --git a/src/main/print-escp2-data.c b/src/main/print-escp2-data.c
index 43f496b..1327e7f 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.202 2006/07/22 20:28:13 rlk Exp $"
+ * "$Id: print-escp2-data.c,v 1.202.6.2 2007/05/29 01:47:29 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -76,6 +76,12 @@ static const escp2_dot_size_t p3pl_dotsizes =
static const escp2_dot_size_t p1_5pl_dotsizes =
{ 0x10, 0x10, 0x10, 0x11, 0x12, 0x13, 0x13, 0x13, 0x13 };
+static const escp2_dot_size_t claria_dotsizes =
+{ 0x33, 0x33, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25 };
+
+static const escp2_dot_size_t claria_1400_dotsizes =
+{ 0x33, 0x33, 0x21, 0x21, 0x33, 0x25, 0x25, 0x25, 0x25 };
+
static const escp2_dot_size_t c2pl_dotsizes =
{ 0x12, 0x12, 0x12, 0x11, 0x13, -1, 0x10, 0x10, 0x10 };
@@ -198,6 +204,9 @@ static const escp2_base_resolutions_t c1_8_base_res =
static const escp2_base_resolutions_t c1_5_base_res =
{ 360, 360, 720, 720, 720, 720, 720, 720, 720 };
+static const escp2_base_resolutions_t claria_1400_base_res =
+{ 360, 360, 720, 720, 360, 720, 720, 720, 720 };
+
static const escp2_base_resolutions_t stc900_base_res =
{ 360, 360, 360, 360, 180, 180, 360, 360, 360 };
@@ -253,6 +262,12 @@ static const escp2_densities_t p3pl_densities =
static const escp2_densities_t p1_5pl_densities =
{ 2.8, 1.4, 1.00, 1.000, 0.869, 0.942, 0.471, 0.500, 0.530 };
+static const escp2_densities_t claria_densities =
+{ 2.8, 1.4, 2.00, 1.000, 0.500, 0.812, 0.406, 0.546, 0.440 };
+
+static const escp2_densities_t claria_1400_densities =
+{ 2.8, 1.4, 2.00, 1.000, 0.500, 0.812, 0.406, 0.546, 0.440 };
+
static const escp2_densities_t p3_5pl_densities =
{ 2.8, 1.4, 1.77, 0.886, 0.443, 0.221, 0.240, 0.293, 0.146 };
@@ -296,575 +311,68 @@ 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[] =
-{
- {
- "Standard",
- N_("Standard"),
- 0,
- 0,
- 0,
- { 16, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000" },
- { 6, "IR\002\000\000\000"}
- },
- {
- "Roll",
- N_("Roll Feed"),
- 0,
- 1,
- ROLL_FEED_DONT_EJECT,
- { 16, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001" },
- { 6, "IR\002\000\000\002" }
- }
-};
-
-DECLARE_INPUT_SLOT(standard_roll_feed);
-
-static const input_slot_t cutter_roll_feed_input_slots[] =
-{
- {
- "Standard",
- N_("Standard"),
- 0,
- 0,
- 0,
- { 16, "IR\002\000\000\001EX\006\000\000\000\000\000\005\000" },
- { 6, "IR\002\000\000\000"}
- },
- {
- "RollCutPage",
- N_("Roll Feed (cut each page)"),
- 0,
- 1,
- ROLL_FEED_CUT_ALL,
- { 16, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001" },
- { 6, "IR\002\000\000\002" }
- },
- {
- "RollCutNone",
- N_("Roll Feed (do not cut)"),
- 0,
- 1,
- ROLL_FEED_DONT_EJECT,
- { 16, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001" },
- { 6, "IR\002\000\000\002" }
- }
-};
-
-DECLARE_INPUT_SLOT(cutter_roll_feed);
-
-static const input_slot_t cd_cutter_roll_feed_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"}
- },
- {
- "Manual",
- N_("Manual Feed"),
- 0,
- 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"}
- },
- {
- "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"}
- },
- {
- "RollCutPage",
- N_("Roll Feed (cut each page)"),
- 0,
- 1,
- ROLL_FEED_CUT_ALL,
- { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001PP\003\000\000\001\377" },
- { 6, "IR\002\000\000\002" }
- },
- {
- "RollCutNone",
- N_("Roll Feed (do not cut)"),
- 0,
- 1,
- ROLL_FEED_DONT_EJECT,
- { 23, "IR\002\000\000\001EX\006\000\000\000\000\000\005\001PP\003\000\000\001\377" },
- { 6, "IR\002\000\000\002" }
- }
-};
-
-DECLARE_INPUT_SLOT(cd_cutter_roll_feed);
-
-static const input_slot_t cd_roll_feed_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"}
- },
- {
- "Manual",
- N_("Manual Feed"),
- 0,
- 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"}
- },
- {
- "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"}
- },
- {
- "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\001\377" },
- { 6, "IR\002\000\000\002" }
- }
-};
-
-DECLARE_INPUT_SLOT(cd_roll_feed);
-
-static const input_slot_t r2400_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" }
- }
-};
-
-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[] =
-{
- {
- "Standard",
- N_("Standard"),
- 0,
- 0,
- 0,
- { 7, "PP\003\000\000\002\000" },
- { 0, "" }
- },
- {
- "Roll",
- N_("Roll Feed"),
- 0,
- 1,
- 0,
- { 7, "PP\003\000\000\003\000" },
- { 0, "" }
- }
-};
-
-DECLARE_INPUT_SLOT(pro_roll_feed);
-
-static const input_slot_t spro5000_input_slots[] =
-{
- {
- "CutSheet1",
- N_("Cut Sheet Bin 1"),
- 0,
- 0,
- 0,
- { 7, "PP\003\000\000\001\001" },
- { 0, "" }
- },
- {
- "CutSheet2",
- N_("Cut Sheet Bin 2"),
- 0,
- 0,
- 0,
- { 7, "PP\003\000\000\002\001" },
- { 0, "" }
- },
- {
- "CutSheetAuto",
- N_("Cut Sheet Autoselect"),
- 0,
- 0,
- 0,
- { 7, "PP\003\000\000\001\377" },
- { 0, "" }
- },
- {
- "ManualSelect",
- N_("Manual Selection"),
- 0,
- 0,
- 0,
- { 7, "PP\003\000\000\002\001" },
- { 0, "" }
- }
-};
-
-DECLARE_INPUT_SLOT(spro5000);
-
-static const input_slot_list_t default_input_slot_list =
-{
- "Standard",
- NULL,
- 0,
-};
-
-static const stp_raw_t new_init_sequence =
-{
- 29, "\0\0\0\033\001@EJL 1284.4\n@EJL \n\033@"
-};
-
-static const stp_raw_t je_deinit_sequence =
-{
- 5, "JE\001\000\000"
-};
-
-#define INCH(x) (72 * x)
+static const stp_raw_t new_init_sequence = STP_RAW_STRING("\0\0\0\033\001@EJL 1284.4\n@EJL \n\033@");
-#define DECLARE_QUALITY_LIST(name) \
-static const quality_list_t name##_quality_list = \
-{ \
- #name, \
- name##_qualities, \
- sizeof(name##_qualities) / sizeof(const quality_t), \
-}
+static const stp_raw_t je_deinit_sequence = STP_RAW_STRING("JE\001\000\000");
-static const quality_t standard_qualities[] =
-{
- { "FastEconomy", N_("Fast Economy"), 180, 90, 360, 120, 360, 90 },
- { "Economy", N_("Economy"), 360, 180, 360, 240, 360, 180 },
- { "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, 720, 2880, 720, 1440, 720 },
- { "HighPhoto", N_("Super Photo"), 1440, 1440, 2880, 1440, 1440, 1440 },
- { "UltraPhoto", N_("Ultra Photo"), 2880, 2880, 2880, 2880, 2880, 2880 },
- { "Best", N_("Best"), 720, 360, 0, 0, -1, -1 },
-};
+/* These sequences provided by Epson. No, I don't know what
+ most of them mean. */
-DECLARE_QUALITY_LIST(standard);
+static const stp_raw_t bsc64_borderless_sequence = STP_RAW_STRING("SN\114\000\000\011\026\000\000\000\000\000\000\000\003\000\000\000\260\004\352\004\064\001\016\002\000\000\000\000\064\010\150\020\030\025\310\031\340\075\314\020\214\012\024\005\214\000\012\001\054\001\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\000\001\001\001\000\000\020\010");
-static const quality_t p1_5_qualities[] =
-{
- { "FastEconomy", N_("Fast Economy"), 180, 90, 360, 120, 360, 90 },
- { "Economy", N_("Economy"), 360, 180, 360, 240, 360, 180 },
- { "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, 720, 1440, 720, 1440, 720 },
- { "HighPhoto", N_("Super Photo"), 1440, 1440, 2880, 1440, 1440, 1440 },
- { "UltraPhoto", N_("Ultra Photo"), 2880, 2880, 2880, 2880, 2880, 2880 },
- { "Best", N_("Best"), 720, 360, 0, 0, -1, -1 },
-};
+static const stp_raw_t bsc66_borderless_sequence = STP_RAW_STRING("SN\114\000\000\011\026\000\000\000\000\000\000\000\003\000\000\000\260\004\352\004\064\001\016\002\000\000\000\000\064\010\150\020\030\025\310\031\340\075\314\020\214\012\024\005\214\000\012\001\054\001\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\000\001\001\001\000\000\020\010");
-DECLARE_QUALITY_LIST(p1_5);
+static const stp_raw_t bsc68_borderless_sequence = STP_RAW_STRING("SN\114\000\000\011\026\000\000\000\000\000\000\000\003\000\000\000\260\004\352\004\064\001\016\002\000\000\000\000\064\010\150\020\030\025\310\031\340\075\314\020\214\012\024\005\214\000\012\001\054\001\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\000\001\001\001\000\000\020\010");
-static const quality_t picturemate_qualities[] =
-{
- { "Draft", N_("Draft"), 1440, 720, 1440, 720, 1440, 720 },
- { "Standard", N_("Standard"), 1440, 1440, 1440, 1440, 1440, 1440 },
- { "Photo", N_("Photo"), 1440, 1440, 1440, 1440, 1440, 1440 },
- { "High", N_("High"), 2880, 1440, 2880, 1440, 2880, 1440 },
- { "HighPhoto", N_("Super Photo"), 2880, 1440, 2880, 1440, 2880, 1440 },
- { "UltraPhoto", N_("Ultra Photo"), 5760, 1440, 5760, 1440, 5760, 1440 },
- { "Best", N_("Best"), 5760, 1440, 5760, 1440, 5760, 1440 },
-};
+static const stp_raw_t bsc82_borderless_sequence = STP_RAW_STRING("SN\062\000\000\006\013\000\000\000\000\000\000\000\001\002\026\003\276\000\064\007\000\000\154\007\352\011\352\011\226\000\000\000\226\000\064\007\023\020\025\031\001\021\004\021\021\021\001\001\000\000\174\005");
-DECLARE_QUALITY_LIST(picturemate);
+static const stp_raw_t bsc84_borderless_sequence = STP_RAW_STRING("SN\114\000\000\011\027\000\000\000\000\000\000\000\003\000\000\001\260\004\336\004\064\001\000\002\000\000\000\000\064\010\150\020\030\025\310\031\340\075\314\020\214\012\024\005\214\000\012\001\054\001\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\000\001\001\001\000\000\370\007");
-#define DECLARE_CHANNEL_LIST(name) \
-static const channel_name_t name##_channel_name_list = \
-{ \
- #name, \
- sizeof(name##_channel_names) / sizeof(const char *), \
- name##_channel_names \
-}
+static const stp_raw_t bsc86_borderless_sequence = STP_RAW_STRING("SN\114\000\000\011\027\000\000\000\000\000\000\000\003\000\000\001\260\004\336\004\064\001\000\002\000\000\000\000\064\010\150\020\030\025\310\031\340\075\314\020\214\012\024\005\214\000\012\001\054\001\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\000\001\001\001\000\000\370\007");
-static const char *standard_channel_names[] =
-{
- N_("Black"),
- N_("Cyan"),
- N_("Magenta"),
- N_("Yellow")
-};
+static const stp_raw_t bsc88_borderless_sequence = STP_RAW_STRING("SN\114\000\000\011\027\000\000\000\000\000\000\000\003\000\000\001\260\004\336\004\064\001\000\002\000\000\000\000\064\010\150\020\030\025\310\031\340\075\314\020\214\012\024\005\214\000\012\001\054\001\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\000\001\001\001\000\000\370\007");
-DECLARE_CHANNEL_LIST(standard);
+static const stp_raw_t cx6400_borderless_sequence = STP_RAW_STRING("SN\062\000\000\006\026\000\000\000\000\000\000\001\000\000\027\003\276\000\077\007\000\000\334\005\366\011\366\011\226\000\000\000\226\000\077\007\031\030\031\031\004\031\004\031\031\031\004\004\000\000\135\006");
-static const char *cx3800_channel_names[] =
-{
- N_("Cyan"),
- N_("Yellow"),
- N_("Magenta"),
- N_("Black")
-};
+static const stp_raw_t cx6600_borderless_sequence = STP_RAW_STRING("SN\062\000\000\006\026\000\000\000\000\000\000\001\000\000\027\003\276\000\077\007\000\000\334\005\366\011\366\011\226\000\000\000\226\000\077\007\031\030\031\031\004\031\004\031\031\031\004\004\000\000\135\006");
-DECLARE_CHANNEL_LIST(cx3800);
+static const stp_raw_t pm830c_borderless_sequence = STP_RAW_STRING("SN\054\000\000\001\027\000\000\000\000\000\000\001\003\000\243\156\000\223\170\220\065\002\000\000\005\277\001\270\006\144\000\164\016\032\004\042\005\310\031\000\100\000\022\143\102\007");
-static const char *mfp2005_channel_names[] =
-{
- N_("Cyan"),
- N_("Magenta"),
- N_("Yellow"),
- N_("Black")
-};
+static const stp_raw_t pm930c_borderless_sequence = STP_RAW_STRING("SN\070\000\000\007\027\000\000\000\000\000\000\001\003\000\330\006\124\001\264\015\042\013\110\007\060\011\316\022\054\001\251\013\054\001\002\003\363\027\031\030\031\031\031\031\004\031\031\031\001\004\103\000\000\001\001\001\360\006");
-DECLARE_CHANNEL_LIST(mfp2005);
+static const stp_raw_t pm970c_borderless_sequence = STP_RAW_STRING("SN\070\000\000\007\033\000\000\000\000\000\000\001\003\000\330\006\124\001\264\015\054\013\110\007\060\011\316\022\054\001\251\013\054\001\002\003\363\027\031\030\031\031\031\031\004\031\031\031\001\004\103\000\000\001\001\001\364\006");
-static const char *photo_channel_names[] =
-{
- N_("Black"),
- N_("Cyan"),
- N_("Magenta"),
- N_("Yellow"),
- N_("Light Cyan"),
- N_("Light Magenta"),
-};
+static const stp_raw_t sp1280_borderless_sequence = STP_RAW_STRING("SN\003\000\000\011\001");
-DECLARE_CHANNEL_LIST(photo);
+static const stp_raw_t sp780_borderless_sequence = STP_RAW_STRING("SN\003\000\000\000\002SN\003\000\000\001\001SN\003\000\000\011\001");
-static const char *rx700_channel_names[] =
-{
- N_("Black"),
- N_("Cyan"),
- N_("Light Cyan"),
- N_("Magenta"),
- N_("Light Magenta"),
- N_("Yellow"),
-};
+static const stp_raw_t sp820_borderless_sequence = STP_RAW_STRING("SN\003\000\000\011\001");
-DECLARE_CHANNEL_LIST(rx700);
+static const stp_raw_t sp820u_borderless_sequence = STP_RAW_STRING("SN\003\000\000\011\001");
-static const char *sp2200_channel_names[] =
-{
- N_("Black"),
- N_("Cyan"),
- N_("Magenta"),
- N_("Yellow"),
- N_("Light Cyan"),
- N_("Light Magenta"),
- N_("Light Black"),
-};
+static const stp_raw_t sp825_borderless_sequence = STP_RAW_STRING("SN\003\000\000\011\001");
-DECLARE_CHANNEL_LIST(sp2200);
+static const stp_raw_t sp890_borderless_sequence = STP_RAW_STRING("SN\003\000\000\000\010SN\003\000\000\001\001SN\003\000\000\002\000SN\003\000\000\007\000SN\003\000\000\011\001");
-static const char *pm_950c_channel_names[] =
-{
- N_("Black"),
- N_("Cyan"),
- N_("Magenta"),
- N_("Yellow"),
- N_("Light Cyan"),
- N_("Light Magenta"),
- N_("Dark Yellow"),
-};
+static const stp_raw_t sp900_borderless_sequence = STP_RAW_STRING("SN\064\000\000\003\026\000\000\000\000\000\000\001\003\000\007\144\050\002\152\215\000\063\344\000\040\120\000\207\150\020\212\003\070\002\360\001\324\100\000\001\010\001\142\141\141\140\141\024\002\025\027\061\132\011");
-DECLARE_CHANNEL_LIST(pm_950c);
+static const stp_raw_t sp925_borderless_sequence = STP_RAW_STRING("SN\054\000\000\001\027\000\000\000\000\000\000\001\003\000\243\156\000\223\170\220\065\002\000\000\005\277\001\270\006\144\000\024\036\032\004\042\005\310\031\000\100\000\022\143\362\006");
-static const char *sp960_channel_names[] =
-{
- N_("Black"),
- N_("Cyan"),
- N_("Magenta"),
- N_("Yellow"),
- N_("Light Cyan"),
- N_("Light Magenta"),
- N_("Black"),
-};
+static const stp_raw_t sp960_borderless_sequence = STP_RAW_STRING("SN\064\000\000\002\027\000\000\000\000\000\000\001\003\000\204\003\252\000\204\006\270\004\364\006\166\005\230\011\226\000\304\004\226\000\206\002\270\012\031\030\031\031\031\031\004\064\064\064\004\001\000\000\040\011");
-DECLARE_CHANNEL_LIST(sp960);
+static const stp_raw_t spr300_borderless_sequence = STP_RAW_STRING("SN\120\000\000\014\027\000\000\000\000\000\000\000\003\000\001\001\130\002\320\004\107\001\107\002\000\000\000\000\120\010\204\020\030\025\310\031\340\075\240\017\214\012\060\005\214\000\012\001\054\001\000\000\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\017\017\000\000\001\001\000\001\060\010");
-static const char *r800_channel_names[] =
-{
- N_("Yellow"),
- N_("Magenta"),
- N_("Cyan"),
- N_("Matte Black"),
- N_("Photo Black"),
- N_("Red"),
- N_("Blue"),
- N_("Gloss Optimizer"),
-};
+static const stp_raw_t spr320_borderless_sequence = STP_RAW_STRING("SN\120\000\000\014\027\000\000\000\000\000\000\000\003\000\001\001\130\002\320\004\107\001\107\002\000\000\000\000\120\010\204\020\030\025\310\031\340\075\240\017\214\012\060\005\214\000\012\001\054\001\000\000\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\017\017\000\000\001\001\000\001\060\010");
-DECLARE_CHANNEL_LIST(r800);
+static const stp_raw_t spr800_borderless_sequence = STP_RAW_STRING("SN\124\000\000\012\033\000\000\000\000\000\000\001\003\000\001\001\235\007\124\001\120\012\252\000\363\006\077\002\120\012\277\007\050\002\045\013\054\001\253\000\037\001\041\000\040\001\322\000\241\000\000\000\017\000\036\000\030\031\031\031\031\031\031\031\003\033\033\143\143\143\143\143\143\143\143\143\143\143\002\000\001\000\001\001\362\014");
-static const char *picturemate_channel_names[] =
-{
- N_("Yellow"),
- N_("Magenta"),
- N_("Cyan"),
- N_("Black"),
- N_("Red"),
- N_("Blue"),
-};
+static const stp_raw_t sprx500_borderless_sequence = STP_RAW_STRING("SN\114\000\000\011\026\000\000\000\000\000\000\000\003\000\000\001\260\004\336\004\064\001\000\002\000\000\000\000\064\010\150\020\030\025\310\031\340\075\314\020\214\012\024\005\214\000\012\001\054\001\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\000\001\001\001\000\000\367\007");
-DECLARE_CHANNEL_LIST(picturemate);
+static const stp_raw_t sprx600_borderless_sequence = STP_RAW_STRING("SN\114\000\000\011\026\000\000\000\000\000\000\000\003\000\000\001\260\004\336\004\064\001\000\002\000\000\000\000\064\010\150\020\030\025\310\031\340\075\314\020\214\012\024\005\214\000\012\001\054\001\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\000\001\001\001\000\000\367\007");
-static const char *r2400_channel_names[] =
-{
- N_("Light Light Black"),
- N_("Light Magenta"),
- N_("Light Cyan"),
- N_("Light Black"),
- N_("Black"),
- N_("Cyan"),
- N_("Magenta"),
- N_("Yellow"),
-};
+static const stp_raw_t sprx620_borderless_sequence = STP_RAW_STRING("SN\114\000\000\011\026\000\000\000\000\000\000\000\003\000\000\001\260\004\336\004\064\001\000\002\000\000\000\000\064\010\150\020\030\025\310\031\340\075\314\020\214\012\024\005\214\000\012\001\054\001\000\000\017\017\017\017\017\017\017\017\004\012\004\017\017\017\017\017\006\004\000\001\001\001\000\000\367\007");
-DECLARE_CHANNEL_LIST(r2400);
+#define INCH(x) (72 * x)
const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
{
@@ -872,1332 +380,1536 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
/* 0: Stylus Color */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 720, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- g1_dotsizes, g1_densities, &stpi_escp2_simple_drops,
- stpi_escp2_720dpi_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, standard_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ g1_dotsizes, g1_densities, "simple",
+ "720dpi", "standard",
+ standard_bits, standard_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 1: Stylus Color 400/500 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 720, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- g2_dotsizes, g1_densities, &stpi_escp2_simple_drops,
- stpi_escp2_sc500_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, standard_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ g2_dotsizes, g1_densities, "simple",
+ "sc500", "standard",
+ standard_bits, standard_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 2: Stylus Color 1500 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 720, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- g1_dotsizes, sc1500_densities, &stpi_escp2_simple_drops,
- stpi_escp2_sc500_reslist, &stpi_escp2_cmy_inkgroup,
- standard_bits, standard_base_res, &standard_roll_feed_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ g1_dotsizes, sc1500_densities, "simple",
+ "sc500", "cmy",
+ standard_bits, standard_base_res, "standard_roll_feed",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 3: Stylus Color 600 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- sc600_dotsizes, g3_densities, &stpi_escp2_simple_drops,
- stpi_escp2_g3_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, g3_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ sc600_dotsizes, g3_densities, "simple",
+ "g3", "standard",
+ standard_bits, g3_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 4: Stylus Color 800 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 180, 180,
+ 0, 1, 4, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- g3_dotsizes, g3_densities, &stpi_escp2_simple_drops,
- stpi_escp2_g3_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, g3_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ g3_dotsizes, g3_densities, "simple",
+ "g3", "standard",
+ standard_bits, g3_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 5: Stylus Color 850 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 180, 180,
+ 0, 1, 4, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- g3_dotsizes, g3_densities, &stpi_escp2_simple_drops,
- stpi_escp2_g3_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, g3_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ g3_dotsizes, g3_densities, "simple",
+ "g3", "standard",
+ standard_bits, g3_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 6: Stylus Color 1520 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 180, 180,
+ 0, 1, 4, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- g3_dotsizes, g3_densities, &stpi_escp2_simple_drops,
- stpi_escp2_g3_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, g3_base_res, &standard_roll_feed_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ g3_dotsizes, g3_densities, "simple",
+ "g3", "standard",
+ standard_bits, g3_base_res, "standard_roll_feed",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* SECOND GENERATION PRINTERS */
/* 7: Stylus Photo 700 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
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, 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,
- &standard_quality_list, NULL, NULL,
- NULL, &photo_channel_name_list
+ sp700_dotsizes, sp700_densities, "simple",
+ "g3", "photo_gen1",
+ standard_bits, g3_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "photo"
},
/* 8: Stylus Photo EX */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- 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,
- &standard_quality_list, NULL, NULL,
- NULL, &photo_channel_name_list
+ sp700_dotsizes, sp700_densities, "simple",
+ "g3", "photo_gen1",
+ standard_bits, g3_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "photo"
},
/* 9: Stylus Photo */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 720, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- sp700_dotsizes, sp700_densities, &stpi_escp2_simple_drops,
- stpi_escp2_g3_720dpi_reslist, &stpi_escp2_photo_gen1_inkgroup,
- standard_bits, g3_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &photo_channel_name_list
+ sp700_dotsizes, sp700_densities, "simple",
+ "g3_720dpi", "photo_gen1",
+ standard_bits, g3_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "photo"
},
/* THIRD GENERATION PRINTERS */
/* 10: Stylus Color 440/460 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 720, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
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, 0,
1, 15, 0, 0,
- sc440_dotsizes, sc440_densities, &stpi_escp2_simple_drops,
- stpi_escp2_g3_720dpi_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, standard_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ sc440_dotsizes, sc440_densities, "simple",
+ "g3_720dpi", "standard",
+ standard_bits, standard_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 11: Stylus Color 640 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
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, 0,
1, 15, 0, 0,
- sc640_dotsizes, sc440_densities, &stpi_escp2_simple_drops,
- stpi_escp2_sc640_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, standard_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ sc640_dotsizes, sc440_densities, "simple",
+ "sc640", "standard",
+ standard_bits, standard_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 12: Stylus Color 740/Stylus Scan 2000/Stylus Scan 2500 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c6pl_dotsizes, c6pl_densities, &stpi_escp2_variable_6pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_standard_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ c6pl_dotsizes, c6pl_densities, "variable_6pl",
+ "1440dpi", "standard",
+ variable_bits, variable_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 13: Stylus Color 900 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 180, 180,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c3pl_dotsizes, c3pl_densities, &stpi_escp2_variable_3pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_standard_inkgroup,
- variable_bits, stc900_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c3pl_dotsizes, c3pl_densities, "variable_3pl",
+ "1440dpi", "standard",
+ variable_bits, stc900_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 14: Stylus Photo 750 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c6pl_dotsizes, c6pl_densities, &stpi_escp2_variable_6pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_photo_gen1_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ c6pl_dotsizes, c6pl_densities, "variable_6pl",
+ "1440dpi", "photo_gen1",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "photo"
},
/* 15: Stylus Photo 1200 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c6pl_dotsizes, c6pl_densities, &stpi_escp2_variable_6pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_photo_gen1_inkgroup,
- variable_bits, variable_base_res, &standard_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ c6pl_dotsizes, c6pl_densities, "variable_6pl",
+ "1440dpi", "photo_gen1",
+ variable_bits, variable_base_res, "standard_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "photo"
},
/* 16: Stylus Color 860 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_densities, &stpi_escp2_variable_1440_4pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_standard_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c4pl_dotsizes, c4pl_densities, "variable_1440_4pl",
+ "1440dpi", "standard",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 17: Stylus Color 1160 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_densities, &stpi_escp2_variable_1440_4pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_standard_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c4pl_dotsizes, c4pl_densities, "variable_1440_4pl",
+ "1440dpi", "standard",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 18: Stylus Color 660 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 8, 1, 28800, 720 * 720,
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, 0,
1, 15, 0, 0,
- sc660_dotsizes, sc660_densities, &stpi_escp2_simple_drops,
- stpi_escp2_sc640_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, standard_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ sc660_dotsizes, sc660_densities, "simple",
+ "sc640", "standard",
+ standard_bits, standard_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 19: Stylus Color 760 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_densities, &stpi_escp2_variable_1440_4pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_standard_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c4pl_dotsizes, c4pl_densities, "variable_1440_4pl",
+ "1440dpi", "standard",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 20: Stylus Photo 720 (Australia) */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- sp720_dotsizes, c6pl_densities, &stpi_escp2_variable_6pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_photo_gen1_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ sp720_dotsizes, c6pl_densities, "variable_6pl",
+ "1440dpi", "photo_gen1",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "photo"
},
/* 21: Stylus Color 480 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, 360, 720, 720, 90, 90,
+ 0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- sc480_dotsizes, sc480_densities, &stpi_escp2_variable_x80_6pl_drops,
- stpi_escp2_720dpi_soft_reslist, &stpi_escp2_x80_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ sc480_dotsizes, sc480_densities, "variable_x80_6pl",
+ "720dpi_soft", "x80",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 22: Stylus Photo 870/875 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_densities, &stpi_escp2_variable_1440_4pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_photo_gen2_inkgroup,
- variable_bits, variable_base_res, &standard_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ c4pl_dotsizes, c4pl_densities, "variable_1440_4pl",
+ "1440dpi", "photo_gen2",
+ variable_bits, variable_base_res, "standard_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "photo"
},
/* 23: Stylus Photo 1270 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_densities, &stpi_escp2_variable_1440_4pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_photo_gen2_inkgroup,
- variable_bits, variable_base_res, &standard_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ c4pl_dotsizes, c4pl_densities, "variable_1440_4pl",
+ "1440dpi", "photo_gen2",
+ variable_bits, variable_base_res, "standard_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "photo"
},
/* 24: Stylus Color 3000 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 180, 180,
+ 0, 1, 4, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- g3_dotsizes, g3_densities, &stpi_escp2_simple_drops,
- stpi_escp2_g3_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, g3_base_res, &standard_roll_feed_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ g3_dotsizes, g3_densities, "simple",
+ "g3", "standard",
+ standard_bits, g3_base_res, "standard_roll_feed",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 25: Stylus Color 670 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- sc670_dotsizes, c6pl_densities, &stpi_escp2_variable_6pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_standard_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ sc670_dotsizes, c6pl_densities, "variable_6pl",
+ "1440dpi", "standard",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 26: Stylus Photo 2000P */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
2, 15, 0, 0,
- sp2000_dotsizes, sp2000_densities, &stpi_escp2_variable_2000p_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_photo_pigment_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ sp2000_dotsizes, sp2000_densities, "variable_2000p",
+ "1440dpi", "photo_pigment",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "photo"
},
/* 27: Stylus Pro 5000 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 180, 180,
+ 0, 1, 0, 0, 0, 0, 0, 4, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- spro5000_dotsizes, sp700_densities, &stpi_escp2_simple_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_photo_gen1_inkgroup,
- standard_bits, g3_base_res, &spro5000_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &photo_channel_name_list
+ spro5000_dotsizes, sp700_densities, "simple",
+ "1440dpi", "photo_gen1",
+ standard_bits, g3_base_res, "spro5000",
+ "standard", NULL, NULL,
+ NULL, NULL, "photo"
},
/* 28: Stylus Pro 7000 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- spro_dye_dotsizes, spro_dye_densities, &stpi_escp2_simple_drops,
- stpi_escp2_pro_reslist, &stpi_escp2_photo_gen1_inkgroup,
- standard_bits, pro_base_res, &pro_roll_feed_input_slot_list,
- &standard_quality_list, NULL, NULL,
- &stpi_escp2_pro7000_printer_weave_list, &photo_channel_name_list
+ spro_dye_dotsizes, spro_dye_densities, "simple",
+ "pro", "photo_gen1",
+ standard_bits, pro_base_res, "pro_roll_feed",
+ "standard", NULL, NULL,
+ NULL, "pro7000", "photo"
},
/* 29: Stylus Pro 7500 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- spro_pigment_dotsizes, spro_pigment_densities, &stpi_escp2_simple_drops,
- stpi_escp2_pro_reslist, &stpi_escp2_photo_pigment_inkgroup,
- standard_bits, pro_base_res, &pro_roll_feed_input_slot_list,
- &standard_quality_list, NULL, NULL,
- &stpi_escp2_pro7500_printer_weave_list, &photo_channel_name_list
+ spro_pigment_dotsizes, spro_pigment_densities, "simple",
+ "pro", "photo_pigment",
+ standard_bits, pro_base_res, "pro_roll_feed",
+ "standard", NULL, NULL,
+ NULL, "pro7500", "photo"
},
/* 30: Stylus Pro 9000 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- spro_dye_dotsizes, spro_dye_densities, &stpi_escp2_simple_drops,
- stpi_escp2_pro_reslist, &stpi_escp2_photo_gen1_inkgroup,
- standard_bits, pro_base_res, &pro_roll_feed_input_slot_list,
- &standard_quality_list, NULL, NULL,
- &stpi_escp2_pro7000_printer_weave_list, &photo_channel_name_list
+ spro_dye_dotsizes, spro_dye_densities, "simple",
+ "pro", "photo_gen1",
+ standard_bits, pro_base_res, "pro_roll_feed",
+ "standard", NULL, NULL,
+ NULL, "pro7000", "photo"
},
/* 31: Stylus Pro 9500 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- spro_pigment_dotsizes, spro_pigment_densities, &stpi_escp2_simple_drops,
- stpi_escp2_pro_reslist, &stpi_escp2_photo_pigment_inkgroup,
- standard_bits, pro_base_res, &pro_roll_feed_input_slot_list,
- &standard_quality_list, NULL, NULL,
- &stpi_escp2_pro7500_printer_weave_list, &photo_channel_name_list
+ spro_pigment_dotsizes, spro_pigment_densities, "simple",
+ "pro", "photo_pigment",
+ standard_bits, pro_base_res, "pro_roll_feed",
+ "standard", NULL, NULL,
+ NULL, "pro7500", "photo"
},
/* 32: Stylus Color 777/680 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_2880_densities, &stpi_escp2_variable_2880_4pl_drops,
- stpi_escp2_2880dpi_reslist, &stpi_escp2_standard_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
+ "2880dpi", "standard",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 33: Stylus Color 880/83/C60 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_2880_densities, &stpi_escp2_variable_2880_4pl_drops,
- stpi_escp2_2880dpi_reslist, &stpi_escp2_standard_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
+ "2880dpi", "standard",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 34: Stylus Color 980 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 720, 180, 180,
+ 38, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c3pl_dotsizes, sc980_densities, &stpi_escp2_variable_3pl_drops,
- stpi_escp2_2880dpi_reslist, &stpi_escp2_standard_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c3pl_dotsizes, sc980_densities, "variable_3pl",
+ "2880dpi", "standard",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
- /* 35: Stylus Photo 780/790/810/820 */
+ /* 35: Stylus Photo 780/790 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 720, 90, 90,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_2880_densities, &stpi_escp2_variable_2880_4pl_drops,
- stpi_escp2_2880dpi_reslist, &stpi_escp2_photo_gen2_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
+ "2880dpi", "photo_gen2",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &sp780_borderless_sequence, NULL, "photo"
},
/* 36: Stylus Photo 785/890/895/915/935 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 720, 90, 90,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_2880_densities, &stpi_escp2_variable_2880_4pl_drops,
- stpi_escp2_2880dpi_reslist, &stpi_escp2_photo_gen2_inkgroup,
- variable_bits, variable_base_res, &standard_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
+ "2880dpi", "photo_gen2",
+ variable_bits, variable_base_res, "standard_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &sp890_borderless_sequence, NULL, "photo"
},
/* 37: Stylus Photo 1280/1290 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 720, 90, 90,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_2880_densities, &stpi_escp2_variable_2880_4pl_drops,
- stpi_escp2_2880dpi_reslist, &stpi_escp2_photo_gen2_inkgroup,
- variable_bits, variable_base_res, &standard_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
+ "2880dpi", "photo_gen2",
+ variable_bits, variable_base_res, "standard_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &sp1280_borderless_sequence, NULL, "photo"
},
/* 38: Stylus Color 580 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, 360, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- sc480_dotsizes, sc480_densities, &stpi_escp2_variable_x80_6pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_x80_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ sc480_dotsizes, sc480_densities, "variable_x80_6pl",
+ "1440dpi", "x80",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 39: Stylus Color Pro XL */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 720, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- g1_dotsizes, g1_densities, &stpi_escp2_simple_drops,
- stpi_escp2_720dpi_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, standard_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ g1_dotsizes, g1_densities, "simple",
+ "720dpi", "standard",
+ standard_bits, standard_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 40: Stylus Pro 5500 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- spro_pigment_dotsizes, spro_pigment_densities, &stpi_escp2_simple_drops,
- stpi_escp2_pro_reslist, &stpi_escp2_photo_pigment_inkgroup,
- standard_bits, pro_base_res, &spro5000_input_slot_list,
- &standard_quality_list, NULL, NULL,
- &stpi_escp2_pro7500_printer_weave_list, &photo_channel_name_list
+ spro_pigment_dotsizes, spro_pigment_densities, "simple",
+ "pro", "photo_pigment",
+ standard_bits, pro_base_res, "spro5000",
+ "standard", NULL, NULL,
+ NULL, "pro7500", "photo"
},
/* 41: Stylus Pro 10000 */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_PRO | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- spro10000_dotsizes, spro10000_densities, &stpi_escp2_spro10000_drops,
- stpi_escp2_pro_reslist, &stpi_escp2_photo_gen2_inkgroup,
- variable_bits, pro_base_res, &pro_roll_feed_input_slot_list,
- &standard_quality_list, NULL, NULL,
- &stpi_escp2_pro7000_printer_weave_list, &photo_channel_name_list
+ spro10000_dotsizes, spro10000_densities, "spro10000",
+ "pro", "photo_gen2",
+ variable_bits, pro_base_res, "pro_roll_feed",
+ "standard", NULL, NULL,
+ NULL, "pro7000", "photo"
},
/* 42: Stylus C20SX/C20UX */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 720, 720, 90, 90,
+ 0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- sc480_dotsizes, sc480_densities, &stpi_escp2_variable_x80_6pl_drops,
- stpi_escp2_720dpi_soft_reslist, &stpi_escp2_x80_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ sc480_dotsizes, sc480_densities, "variable_x80_6pl",
+ "720dpi_soft", "x80",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 43: Stylus C40SX/C40UX/C41SX/C41UX/C42SX/C42UX */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- sc480_dotsizes, sc480_densities, &stpi_escp2_variable_x80_6pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_x80_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ sc480_dotsizes, sc480_densities, "variable_x80_6pl",
+ "1440dpi", "x80",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 44: Stylus C70/C80 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 1440, 360, 180,
+ 0, 1, 0, 0, 0, -240, 0, 0, 1, 28800, 720 * 720,
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, 0,
4, 15, 0, 0,
- c3pl_pigment_dotsizes, c3pl_pigment_densities, &stpi_escp2_variable_3pl_pigment_drops,
- stpi_escp2_2880_1440dpi_reslist, &stpi_escp2_c80_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
+ "2880_1440dpi", "c80",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 45: Stylus Color Pro */
{
(MODEL_VARIABLE_NO | MODEL_COMMAND_1998 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 720, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
1, 7, 0, 0,
- g1_dotsizes, g1_densities, &stpi_escp2_simple_drops,
- stpi_escp2_720dpi_reslist, &stpi_escp2_standard_inkgroup,
- standard_bits, standard_base_res, &default_input_slot_list,
- &standard_quality_list, NULL, NULL,
- NULL, &standard_channel_name_list
+ g1_dotsizes, g1_densities, "simple",
+ "720dpi", "standard",
+ standard_bits, standard_base_res, "default",
+ "standard", NULL, NULL,
+ NULL, NULL, "standard"
},
/* 46: Stylus Photo 950/960 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
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, 1, 1440 * 1440,
+ 360, 14400, -1, 2880, 1440, 360, 180,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, 24,
4, 15, 0, 0,
- c2pl_dotsizes, c2pl_densities, &stpi_escp2_variable_2pl_drops,
- stpi_escp2_superfine_reslist, &stpi_escp2_f360_photo_inkgroup,
- stp950_bits, stp950_base_res, &cd_cutter_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &sp960_channel_name_list
+ c2pl_dotsizes, c2pl_densities, "variable_2pl",
+ "superfine", "f360_photo",
+ stp950_bits, stp950_base_res, "cd_cutter_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &sp960_borderless_sequence, NULL, "sp960"
},
/* 47: Stylus Photo 2100/2200 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
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, 1, 1440 * 1440,
+ 360, 14400, -1, 2880, 1440, 360, 180,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
4, 15, 0, 0,
- c4pl_pigment_dotsizes, c4pl_pigment_densities, &stpi_escp2_variable_ultrachrome_drops,
- stpi_escp2_superfine_reslist, &stpi_escp2_f360_ultrachrome_inkgroup,
- ultrachrome_bits, ultrachrome_base_res, &cd_cutter_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &sp2200_channel_name_list
+ c4pl_pigment_dotsizes, c4pl_pigment_densities, "variable_ultrachrome",
+ "superfine", "f360_ultrachrome",
+ ultrachrome_bits, ultrachrome_base_res, "cd_cutter_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "sp2200"
},
/* 48: Stylus Pro 7600 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_PRO | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
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, 1, 1440 * 1440,
+ 360, 14400, -1, 2880, 1440, 360, 180,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
3, 15, 0, 0,
- spro_c4pl_pigment_dotsizes, c4pl_pigment_densities, &stpi_escp2_variable_ultrachrome_drops,
- stpi_escp2_pro_reslist, &stpi_escp2_ultrachrome_inkgroup,
- ultrachrome_bits, pro_base_res, &pro_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- &stpi_escp2_pro7600_printer_weave_list, &photo_channel_name_list
+ spro_c4pl_pigment_dotsizes, c4pl_pigment_densities, "variable_ultrachrome",
+ "pro", "ultrachrome",
+ ultrachrome_bits, pro_base_res, "pro_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, "pro7600", "photo"
},
/* 49: Stylus Pro 9600 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_PRO | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_YES | MODEL_FAST_360_NO |
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, 1, 1440 * 1440,
+ 360, 14400, -1, 2880, 1440, 360, 180,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
3, 15, 0, 0,
- spro_c4pl_pigment_dotsizes, c4pl_pigment_densities, &stpi_escp2_variable_ultrachrome_drops,
- stpi_escp2_pro_reslist, &stpi_escp2_ultrachrome_inkgroup,
- ultrachrome_bits, pro_base_res, &pro_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- &stpi_escp2_pro7600_printer_weave_list, &photo_channel_name_list
+ spro_c4pl_pigment_dotsizes, c4pl_pigment_densities, "variable_ultrachrome",
+ "pro", "ultrachrome",
+ ultrachrome_bits, pro_base_res, "pro_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, "pro7600", "photo"
},
/* 50: Stylus Photo 825/830 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 1440, 90, 90,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_2880_densities, &stpi_escp2_variable_2880_4pl_drops,
- stpi_escp2_2880_1440dpi_reslist, &stpi_escp2_photo_gen2_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
+ "2880_1440dpi", "photo_gen2",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &sp1280_borderless_sequence, NULL, "photo"
},
/* 51: Stylus Photo 925 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 1440, 90, 90,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_2880_densities, &stpi_escp2_variable_2880_4pl_drops,
- stpi_escp2_2880_1440dpi_reslist, &stpi_escp2_photo_gen2_inkgroup,
- variable_bits, variable_base_res, &cutter_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
+ "2880_1440dpi", "photo_gen2",
+ variable_bits, variable_base_res, "cutter_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &sp925_borderless_sequence, NULL, "photo"
},
/* 52: Stylus Color C62 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 1440, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_2880_densities, &stpi_escp2_variable_2880_4pl_drops,
- stpi_escp2_2880_1440dpi_reslist, &stpi_escp2_standard_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
+ "2880_1440dpi", "standard",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 53: Japanese PM-950C */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
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, 1, 1440 * 1440,
+ 360, 14400, -1, 2880, 1440, 360, 180,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 0, 0, 24,
4, 15, 0, 0,
- c2pl_dotsizes, c2pl_densities, &stpi_escp2_variable_2pl_drops,
- stpi_escp2_superfine_reslist, &stpi_escp2_f360_photo7_japan_inkgroup,
- stp950_bits, stp950_base_res, &cd_cutter_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &pm_950c_channel_name_list
+ c2pl_dotsizes, c2pl_densities, "variable_2pl",
+ "superfine", "f360_photo7_japan",
+ stp950_bits, stp950_base_res, "cd_cutter_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &sp960_borderless_sequence, NULL, "pm_950c"
},
/* 54: Stylus Photo EX3 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_1999 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- sp720_dotsizes, c6pl_densities, &stpi_escp2_variable_6pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_photo_gen1_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ sp720_dotsizes, c6pl_densities, "variable_6pl",
+ "1440dpi", "photo_gen1",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "photo"
},
/* 55: Stylus C82/CX-5200 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 1440, 360, 180,
+ 0, 1, 0, 0, 0, -240, 0, 0, 1, 28800, 720 * 720,
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, 0,
4, 15, 0, 0,
- c3pl_pigment_dotsizes, c3pl_pigment_densities, &stpi_escp2_variable_3pl_pigment_drops,
- stpi_escp2_2880_1440dpi_reslist, &stpi_escp2_c82_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
+ "2880_1440dpi", "c82",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 56: Stylus C50 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 1440, 720, 90, 90,
+ 0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_densities, &stpi_escp2_variable_x80_6pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_x80_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c4pl_dotsizes, c4pl_densities, "variable_x80_6pl",
+ "1440dpi", "x80",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 57: Japanese PM-970C */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
+ MODEL_ZEROMARGIN_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, 7,
- 360, 14400, -1, 2880, 2880, 720, 360, 0, 1, 0, 190, 0, 0, 0, 1, 1440 * 1440,
+ 360, 14400, -1, 2880, 2880, 720, 360,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
- c1_8pl_dotsizes, c1_8pl_densities, &stpi_escp2_variable_2pl_drops,
- stpi_escp2_superfine_reslist, &stpi_escp2_f360_photo7_japan_inkgroup,
- c1_8_bits, c1_8_base_res, &cutter_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &pm_950c_channel_name_list
+ c1_8pl_dotsizes, c1_8pl_densities, "variable_2pl",
+ "superfine", "f360_photo7_japan",
+ c1_8_bits, c1_8_base_res, "cutter_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &pm970c_borderless_sequence, NULL, "pm_950c"
},
/* 58: Japanese PM-930C */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 1440 * 1440,
+ 360, 14400, -1, 2880, 2880, 720, 360,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
- c1_8pl_dotsizes, c1_8pl_densities, &stpi_escp2_variable_2pl_drops,
- stpi_escp2_superfine_reslist, &stpi_escp2_photo_gen2_inkgroup,
- c1_8_bits, c1_8_base_res, &cutter_roll_feed_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &photo_channel_name_list
+ c1_8pl_dotsizes, c1_8pl_densities, "variable_2pl",
+ "superfine", "photo_gen2",
+ c1_8_bits, c1_8_base_res, "cutter_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &pm930c_borderless_sequence, NULL, "photo"
},
/* 59: Stylus C43SX/C43UX/C44SX/C44UX (WRONG -- see 43!) */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_NO | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 720, 90, 90,
+ 0, 1, 0, 0, 0, -99, 0, 0, 1, 28800, 720 * 720,
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, 0,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_densities, &stpi_escp2_variable_x80_6pl_drops,
- stpi_escp2_1440dpi_reslist, &stpi_escp2_x80_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c4pl_dotsizes, c4pl_densities, "variable_x80_6pl",
+ "1440dpi", "x80",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 60: Stylus C84 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 1440, 360, 180,
+ 0, 1, 0, 80, 42, -240, 0, 0, 1, 28800, 720 * 720,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
- c3pl_pigment_dotsizes, c3pl_pigment_densities, &stpi_escp2_variable_3pl_pigment_drops,
- stpi_escp2_2880_1440dpi_reslist, &stpi_escp2_c82_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
+ "2880_1440dpi", "c82",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &bsc84_borderless_sequence, NULL, "standard"
},
/* 61: Stylus Color C63/C64 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 1440 * 720,
+ 360, 14400, -1, 2880, 1440, 360, 120,
+ 0, 1, 0, 80, 42, -180, 0, 0, 1, 28800, 1440 * 720,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
- c3pl_pigment_dotsizes, c3pl_pigment_densities, &stpi_escp2_variable_3pl_pigment_drops,
- stpi_escp2_2880_1440dpi_reslist, &stpi_escp2_c64_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
+ "2880_1440dpi", "c64",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &bsc64_borderless_sequence, NULL, "standard"
},
/* 62: Stylus Photo 900 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 720 * 720,
+ 360, 14400, -1, 2880, 720, 90, 90,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 399, 394, 595, 842, 24,
3, 15, 0, 0,
- c4pl_dotsizes, c4pl_2880_densities, &stpi_escp2_variable_2880_4pl_drops,
- stpi_escp2_2880dpi_reslist, &stpi_escp2_photo_gen2_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
+ c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
+ "2880dpi", "photo_gen2",
+ variable_bits, variable_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &sp900_borderless_sequence, NULL, "photo"
},
/* 63: Stylus Photo R300 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_FULL | 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, 1, 1440 * 1440,
+ 360, 14400, -1, 2880, 1440, 360, 120,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 24,
4, 15, 0, 0,
- p3pl_dotsizes, p3pl_densities, &stpi_escp2_variable_3pl_pmg_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, &photo_channel_name_list
+ p3pl_dotsizes, p3pl_densities, "variable_3pl_pmg",
+ "superfine", "photo_gen3",
+ variable_bits, variable_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &spr300_borderless_sequence, NULL, "photo"
},
/* 64: PM-G800/Stylus Photo R800 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1440, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, 8, 2880 * 1440,
+ 360, 28800, -1, 5760, 2880, 360, 180,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 180, 5760 * 2880,
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, 11,
+ 9, 9, 0, 11, 9, 9, 0, 11, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 24,
4, 15, 0, 0,
- p1_5pl_dotsizes, p1_5pl_densities, &stpi_escp2_variable_1_5pl_drops,
- 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
+ p1_5pl_dotsizes, p1_5pl_densities, "variable_1_5pl",
+ "superfine", "cmykrb",
+ variable_bits, c1_5_base_res, "r1800",
+ "p1_5", &new_init_sequence, &je_deinit_sequence,
+ &spr800_borderless_sequence, NULL, "r800"
},
/* 65: Stylus Photo CX4600 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_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, 1440, 1440, 360, 120, 0, 1, 0, 190, 0, 0, 0, 8, 1440 * 1440,
+ 360, 14400, -1, 5760, 1440, 360, 120,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 180, 1440 * 1440,
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, 0,
4, 15, 0, 0,
- p3pl_dotsizes, p3pl_densities, &stpi_escp2_variable_3pl_pmg_drops,
- 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
+ p3pl_dotsizes, p3pl_densities, "variable_3pl_pmg",
+ "superfine", "cx3650",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "mfp2005"
},
/* 66: Stylus Color C65/C66 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 1440 * 720,
+ 360, 14400, -1, 2880, 1440, 360, 120,
+ 0, 1, 0, 80, 42, -180, 0, 0, 1, 28800, 1440 * 720,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
- c3pl_pigment_dotsizes, c3pl_pigment_c66_densities, &stpi_escp2_variable_3pl_pigment_c66_drops,
- stpi_escp2_2880_1440dpi_reslist, &stpi_escp2_c64_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c3pl_pigment_dotsizes, c3pl_pigment_c66_densities, "variable_3pl_pigment_c66",
+ "2880_1440dpi", "c64",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &bsc66_borderless_sequence, NULL, "standard"
},
/* 67: Stylus Photo R1800 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1440, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, 8, 2880 * 1440,
+ 360, 28800, -1, 5760, 2880, 360, 180,
+ 0, 1, 0, 96, 42, 0, 0, 0, 1, 180, 5760 * 2880,
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, 11,
+ 9, 9, 0, 11, 9, 9, 0, 11, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 24,
4, 15, 0, 0,
- p1_5pl_dotsizes, p1_5pl_densities, &stpi_escp2_variable_1_5pl_drops,
- 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
+ p1_5pl_dotsizes, p1_5pl_densities, "variable_1_5pl",
+ "superfine", "cmykrb",
+ variable_bits, c1_5_base_res, "r1800",
+ "p1_5", &new_init_sequence, &je_deinit_sequence,
+ &spr800_borderless_sequence, NULL, "r800"
},
/* 68: PM-G820 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1440, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, 8, 2880 * 1440,
+ 360, 14400, -1, 5760, 2880, 360, 180,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 180, 5760 * 2880,
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, 11,
+ 9, 9, 0, 11, 9, 9, 0, 11, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842, 24,
4, 15, 0, 0,
- p1_5pl_dotsizes, p1_5pl_densities, &stpi_escp2_variable_1_5pl_drops,
- 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
+ p1_5pl_dotsizes, p1_5pl_densities, "variable_1_5pl",
+ "superfine", "photo_gen3",
+ variable_bits, c1_5_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &spr800_borderless_sequence, NULL, "r800"
},
/* 69: Stylus C86 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 1440 * 720,
+ 360, 14400, -1, 2880, 2880, 360, 180,
+ 0, 1, 0, 80, 42, -240, 0, 0, 1, 28800, 1440 * 720,
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, 0,
+ 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 0, 9, 9, 0, 0, -1, -1, 0, 0, 24,
4, 15, 0, 0,
- c3pl_pigment_dotsizes, c3pl_pigment_densities, &stpi_escp2_variable_3pl_pigment_drops,
- stpi_escp2_2880_1440dpi_reslist, &stpi_escp2_c82_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &standard_channel_name_list
+ c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
+ "2880_1440dpi", "c82",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &bsc86_borderless_sequence, NULL, "standard"
},
/* 70: Stylus Photo RX700 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 1440 * 1440,
+ 360, 28800, -1, 5760, 2880, 360, 180,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
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, &rx700_input_slot_list,
- &p1_5_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &rx700_channel_name_list
+ p1_5pl_dotsizes, p1_5pl_densities, "variable_1_5pl",
+ "superfine", "photo_gen3",
+ variable_bits, c1_5_base_res, "rx700",
+ "p1_5", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "rx700"
},
/* 71: Stylus Photo R2400 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_FULL | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1440, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0, 8, 1440 * 1440,
+ 360, 14400, -1, 5760, 2880, 360, 180,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 180, 1440 * 1440,
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, 0,
4, 15, 0, 0,
- p3_5pl_dotsizes, p3_5pl_densities, &stpi_escp2_variable_r2400_drops,
- 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
+ p3_5pl_dotsizes, p3_5pl_densities, "variable_r2400",
+ "superfine", "f360_ultrachrome_k3",
+ variable_bits, c1_5_base_res, "r2400",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "r2400"
},
/* 72: Stylus CX3700/3800/3810 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
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, 1, 1440 * 720,
+ 360, 14400, -1, 2880, 1440, 360, 120,
+ 0, 1, 0, 80, 42, -180, 0, 0, 1, 28800, 1440 * 720,
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, 0,
4, 15, 0, 0,
- c3pl_pigment_dotsizes, c3pl_pigment_c66_densities, &stpi_escp2_variable_3pl_pigment_c66_drops,
- stpi_escp2_2880_1440dpi_reslist, &stpi_escp2_c64_inkgroup,
- variable_bits, variable_base_res, &default_input_slot_list,
- &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &cx3800_channel_name_list
+ c3pl_pigment_dotsizes, c3pl_pigment_c66_densities, "variable_3pl_pigment_c66",
+ "2880_1440dpi", "c64",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "cx3800"
},
/* 73: E-100/PictureMate */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_FULL | 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, 28800, -1, 5760, 1440, 1440, 720, 0, 1, 0, 0, 0, 0, 0, 1, 1440 * 1440,
+ 360, 28800, -1, 5760, 1440, 1440, 720,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
4, 15, 0, 0,
- picturemate_dotsizes, picturemate_densities, &stpi_escp2_variable_picturemate_drops,
- stpi_escp2_picturemate_reslist, &stpi_escp2_picturemate_inkgroup,
- variable_bits, c1_5_base_res, &default_input_slot_list,
- &picturemate_quality_list, &new_init_sequence, &je_deinit_sequence,
- NULL, &picturemate_channel_name_list
+ picturemate_dotsizes, picturemate_densities, "variable_picturemate",
+ "picturemate", "picturemate",
+ variable_bits, c1_5_base_res, "default",
+ "picturemate", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "picturemate"
},
/* 74: PM-A650 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_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, 1440 * 1440,
+ 360, 14400, -1, 5760, 1440, 360, 120,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 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
+ c3pl_pigment_dotsizes, c3pl_pigment_c66_densities, "variable_3pl_pigment_c66",
+ "superfine", "c64",
+ variable_bits, variable_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 75: Japanese PM-A750 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
+ MODEL_ZEROMARGIN_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, 1440 * 1440,
+ 360, 14400, -1, 5760, 1440, 360, 120,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 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
+ c2pl_dotsizes, c2pl_densities, "variable_2pl",
+ "superfine", "c64",
+ variable_bits, variable_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 76: Japanese PM-A890 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_NO |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_YES |
+ MODEL_ZEROMARGIN_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, 1440 * 1440,
+ 360, 14400, -1, 5760, 1440, 360, 120,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 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
+ c2pl_dotsizes, c2pl_densities, "variable_2pl",
+ "superfine", "photo_gen3",
+ variable_bits, variable_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "standard"
},
/* 77: Japanese PM-D600 */
{
(MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
- MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_ZEROMARGIN_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, 1440 * 1440,
+ 360, 14400, -1, 2880, 1440, 360, 120,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
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, 0,
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
+ p3pl_dotsizes, p3pl_densities, "variable_3pl_pmg",
+ "superfine", "c64",
+ variable_bits, variable_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "photo"
+ },
+ /* 78: Stylus Photo 810/820 */
+ {
+ (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ 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, 80, 42, 0, 0, 0, 1, 28800, 720 * 720,
+ 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, 24,
+ 3, 15, 0, 0,
+ c4pl_dotsizes, c4pl_2880_densities, "variable_2880_4pl",
+ "2880dpi", "photo_gen2",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &sp1280_borderless_sequence, NULL, "photo"
+ },
+ /* 79: Stylus CX6400 */
+ {
+ (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ 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, 80, 42, -240, 0, 0, 1, 28800, 720 * 720,
+ 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, 24,
+ 4, 15, 0, 0,
+ c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
+ "2880_1440dpi", "c82",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &cx6400_borderless_sequence, NULL, "standard"
+ },
+ /* 80: Stylus CX6600 */
+ {
+ (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ 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, 80, 42, -240, 0, 0, 1, 28800, 1440 * 720,
+ 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, 24,
+ 4, 15, 0, 0,
+ c3pl_pigment_dotsizes, c3pl_pigment_densities, "variable_3pl_pigment",
+ "2880_1440dpi", "c82",
+ variable_bits, variable_base_res, "default",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &cx6600_borderless_sequence, NULL, "standard"
+ },
+ /* 81: Stylus Photo R260 */
+ {
+ (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
+ MODEL_PACKET_MODE_YES),
+ 90, 1, 4, 90, 1, 4, 90, 1, 4, 6,
+ 360, 14400, -1, 5760, 2880, 360, 90,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 5760 * 2880,
+ 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, 204, 189, 595, 842, 24,
+ 4, 15, 0, 0,
+ claria_dotsizes, claria_densities, "variable_claria",
+ "superfine", "claria",
+ variable_bits, c1_5_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "photo"
+ },
+ /* 82: Stylus Photo 1400 */
+ {
+ (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
+ MODEL_ZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
+ MODEL_PACKET_MODE_YES),
+ 90, 1, 4, 90, 1, 4, 90, 1, 4, 6,
+ 360, 14400, -1, 5760, 2880, 360, 90,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 5760 * 2880,
+ 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, 263, 595, 842, 24,
+ 4, 15, 0, 0,
+ claria_1400_dotsizes, claria_1400_densities, "variable_claria_1400",
+ "claria_1400", "claria",
+ variable_bits, claria_1400_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ NULL, NULL, "photo"
+ },
+ /* 83: Stylus Photo R240 */
+ {
+ (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
+ MODEL_ZEROMARGIN_FULL | 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, 5760, 1440, 360, 120,
+ 0, 1, 0, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
+ 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, 204, 191, 595, 842, 24,
+ 4, 15, 0, 0,
+ p3pl_dotsizes, p3pl_densities, "variable_3pl_pmg",
+ "superfine", "photo_gen3_4",
+ variable_bits, variable_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &spr300_borderless_sequence, NULL, "standard"
+ },
+ /* 84: Stylus Photo RX500 */
+ {
+ (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
+ MODEL_ZEROMARGIN_FULL | 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, 80, 42, 0, 0, 0, 1, 28800, 1440 * 1440,
+ 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, 204, 191, 595, 842, 24,
+ 4, 15, 0, 0,
+ p3pl_dotsizes, p3pl_densities, "variable_3pl_pmg",
+ "superfine", "photo_gen3",
+ variable_bits, variable_base_res, "cd_roll_feed",
+ "standard", &new_init_sequence, &je_deinit_sequence,
+ &sprx500_borderless_sequence, NULL, "photo"
},
};
diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c
index d97634b..191fa34 100644
--- a/src/main/print-escp2.c
+++ b/src/main/print-escp2.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2.c,v 1.354 2006/07/22 20:28:14 rlk Exp $"
+ * "$Id: print-escp2.c,v 1.355.2.2 2007/05/29 01:47:29 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -45,7 +45,9 @@
#define OP_JOB_PRINT 2
#define OP_JOB_END 4
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#ifndef MAX
+# define MAX(a, b) ((a) > (b) ? (a) : (b))
+#endif /* !MAX */
typedef struct
{
@@ -57,14 +59,14 @@ typedef struct
static const escp2_printer_attr_t escp2_printer_attrs[] =
{
{ "command_mode", 0, 4 },
- { "horizontal_zero_margin", 4, 1 },
- { "variable_mode", 5, 1 },
- { "graymode", 6, 1 },
- { "vacuum", 7, 1 },
- { "fast_360", 8, 1 },
- { "send_zero_advance", 9, 1 },
- { "supports_ink_change", 10, 1 },
- { "packet_mode", 11, 1 },
+ { "zero_margin", 4, 2 },
+ { "variable_mode", 6, 1 },
+ { "graymode", 7, 1 },
+ { "vacuum", 8, 1 },
+ { "fast_360", 9, 1 },
+ { "send_zero_advance", 10, 1 },
+ { "supports_ink_change", 11, 1 },
+ { "packet_mode", 12, 1 },
};
typedef struct
@@ -198,6 +200,18 @@ static const stp_parameter_t the_parameters[] =
STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
},
{
+ "CDOuterDiameter", N_("CD Size (Custom)"), N_("Basic Printer Setup"),
+ N_("Variable adjustment for the outer diameter of CD"),
+ STP_PARAMETER_TYPE_DIMENSION, STP_PARAMETER_CLASS_FEATURE,
+ STP_PARAMETER_LEVEL_ADVANCED, 1, 1, -1, 1, 0
+ },
+ {
+ "CDInnerDiameter", N_("CD Hub Size (Custom)"), N_("Basic Printer Setup"),
+ N_("Variable adjustment to the inner hub of the CD"),
+ STP_PARAMETER_TYPE_DIMENSION, STP_PARAMETER_CLASS_FEATURE,
+ STP_PARAMETER_LEVEL_ADVANCED, 1, 1, -1, 1, 0
+ },
+ {
"CDXAdjustment", N_("CD Horizontal Fine Adjustment"), N_("Advanced Printer Setup"),
N_("Fine adjustment to horizontal position for CD printing"),
STP_PARAMETER_TYPE_DIMENSION, STP_PARAMETER_CLASS_FEATURE,
@@ -385,7 +399,9 @@ 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(micro_left_margin),
+ PARAMETER_INT(min_horizontal_position_alignment),
+ PARAMETER_INT(base_horizontal_position_alignment),
PARAMETER_INT(bidirectional_upper_limit),
PARAMETER_INT(physical_channels),
PARAMETER_INT(left_margin),
@@ -400,9 +416,10 @@ static const stp_parameter_t the_parameters[] =
PARAMETER_INT(cd_y_offset),
PARAMETER_INT(cd_page_width),
PARAMETER_INT(cd_page_height),
- PARAMETER_INT(page_extra_height),
+ PARAMETER_INT(paper_extra_bottom),
PARAMETER_RAW(preinit_sequence),
- PARAMETER_RAW(postinit_remote_sequence)
+ PARAMETER_RAW(postinit_remote_sequence),
+ PARAMETER_RAW(vertical_borderless_sequence)
};
static const int the_parameter_count =
@@ -610,14 +627,6 @@ escp2_##f(const stp_vars_t *v) \
} \
}
-#define DEF_COMPOSITE_ACCESSOR(f, t) \
-static inline t \
-escp2_##f(const stp_vars_t *v) \
-{ \
- int model = stp_get_model_id(v); \
- return (stpi_escp2_model_capabilities[model].f); \
-}
-
#define DEF_ROLL_ACCESSOR(f, t) \
static inline t \
escp2_##f(const stp_vars_t *v, int rollfeed) \
@@ -667,7 +676,7 @@ DEF_SIMPLE_ACCESSOR(cd_x_offset, int)
DEF_SIMPLE_ACCESSOR(cd_y_offset, int)
DEF_SIMPLE_ACCESSOR(cd_page_width, int)
DEF_SIMPLE_ACCESSOR(cd_page_height, int)
-DEF_SIMPLE_ACCESSOR(page_extra_height, int)
+DEF_SIMPLE_ACCESSOR(paper_extra_bottom, int)
DEF_SIMPLE_ACCESSOR(extra_feed, unsigned)
DEF_SIMPLE_ACCESSOR(pseudo_separation_rows, int)
DEF_SIMPLE_ACCESSOR(base_separation, int)
@@ -677,14 +686,15 @@ 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(micro_left_margin, int)
+DEF_SIMPLE_ACCESSOR(min_horizontal_position_alignment, unsigned)
+DEF_SIMPLE_ACCESSOR(base_horizontal_position_alignment, unsigned)
DEF_SIMPLE_ACCESSOR(bidirectional_upper_limit, int)
DEF_SIMPLE_ACCESSOR(physical_channels, int)
DEF_SIMPLE_ACCESSOR(alignment_passes, int)
DEF_SIMPLE_ACCESSOR(alignment_choices, int)
DEF_SIMPLE_ACCESSOR(alternate_alignment_passes, int)
DEF_SIMPLE_ACCESSOR(alternate_alignment_choices, int)
-DEF_COMPOSITE_ACCESSOR(printer_weaves, const printer_weave_list_t *)
DEF_ROLL_ACCESSOR(left_margin, unsigned)
DEF_ROLL_ACCESSOR(right_margin, unsigned)
@@ -694,11 +704,55 @@ DEF_ROLL_ACCESSOR(bottom_margin, unsigned)
DEF_RAW_ACCESSOR(preinit_sequence, const stp_raw_t *)
DEF_RAW_ACCESSOR(postinit_remote_sequence, const stp_raw_t *)
-DEF_COMPOSITE_ACCESSOR(reslist, const res_t *const *)
-DEF_COMPOSITE_ACCESSOR(inkgroup, const inkgroup_t *)
-DEF_COMPOSITE_ACCESSOR(input_slots, const input_slot_list_t *)
-DEF_COMPOSITE_ACCESSOR(quality_list, const quality_list_t *)
-DEF_COMPOSITE_ACCESSOR(channel_names, const channel_name_t *)
+DEF_RAW_ACCESSOR(vertical_borderless_sequence, const stp_raw_t *)
+
+static inline const res_t *const *
+escp2_reslist(const stp_vars_t *v)
+{
+ int model = stp_get_model_id(v);
+ return (stpi_escp2_get_reslist_named
+ (stpi_escp2_model_capabilities[model].reslist));
+}
+
+static inline const printer_weave_list_t *
+escp2_printer_weaves(const stp_vars_t *v)
+{
+ int model = stp_get_model_id(v);
+ return (stpi_escp2_get_printer_weaves_named
+ (stpi_escp2_model_capabilities[model].printer_weaves));
+}
+
+static inline const channel_name_t *
+escp2_channel_names(const stp_vars_t *v)
+{
+ int model = stp_get_model_id(v);
+ return (stpi_escp2_get_channel_names_named
+ (stpi_escp2_model_capabilities[model].channel_names));
+}
+
+static inline const inkgroup_t *
+escp2_inkgroup(const stp_vars_t *v)
+{
+ int model = stp_get_model_id(v);
+ return (stpi_escp2_get_inkgroup_named
+ (stpi_escp2_model_capabilities[model].inkgroup));
+}
+
+static inline const quality_list_t *
+escp2_quality_list(const stp_vars_t *v)
+{
+ int model = stp_get_model_id(v);
+ return (stpi_escp2_get_quality_list_named
+ (stpi_escp2_model_capabilities[model].quality_list));
+}
+
+static inline const input_slot_list_t *
+escp2_input_slots(const stp_vars_t *v)
+{
+ int model = stp_get_model_id(v);
+ return (stpi_escp2_get_input_slot_list_named
+ (stpi_escp2_model_capabilities[model].input_slots));
+}
static const channel_count_t *
get_channel_count_by_name(const char *name)
@@ -772,17 +826,17 @@ static const escp2_dropsize_t *
escp2_dropsizes(const stp_vars_t *v, int resid)
{
int model = stp_get_model_id(v);
- const escp2_drop_list_t *drops = stpi_escp2_model_capabilities[model].drops;
+ const escp2_drop_list_t *drops =
+ stpi_escp2_get_drop_list_named(stpi_escp2_model_capabilities[model].drops);
return (*drops)[resid];
}
static const inklist_t *
escp2_inklist(const stp_vars_t *v)
{
- int model = stp_get_model_id(v);
int i;
const char *ink_list_name = NULL;
- const inkgroup_t *inkgroup = stpi_escp2_model_capabilities[model].inkgroup;
+ const inkgroup_t *inkgroup = escp2_inkgroup(v);
if (stp_check_string_parameter(v, "InkSet", STP_PARAMETER_ACTIVE))
ink_list_name = stp_get_string_parameter(v, "InkSet");
@@ -809,12 +863,19 @@ escp2_paperlist(const stp_vars_t *v)
{
const inklist_t *inklist = escp2_inklist(v);
if (inklist)
- return inklist->papers;
+ return stpi_escp2_get_paperlist_named(inklist->papers);
else
return NULL;
}
static int
+supports_borderless(const stp_vars_t *v)
+{
+ return (escp2_has_cap(v, MODEL_ZEROMARGIN, MODEL_ZEROMARGIN_YES) ||
+ escp2_has_cap(v, MODEL_ZEROMARGIN, MODEL_ZEROMARGIN_FULL));
+}
+
+static int
compute_internal_resid(int hres, int vres)
{
static const int resolutions[RES_N] =
@@ -851,6 +912,31 @@ compute_printed_resid(const res_t *res)
return compute_internal_resid(res->printed_hres, res->printed_vres);
}
+static int
+compute_virtual_resid(const res_t *res)
+{
+ int virtual = compute_internal_resid(res->virtual_hres, res->virtual_vres);
+ int normal = compute_internal_resid(res->hres, res->vres);
+ if (normal == virtual)
+ return compute_internal_resid(res->printed_hres, res->printed_vres);
+ else
+ return virtual;
+}
+
+static int
+max_nozzle_span(const stp_vars_t *v)
+{
+ int nozzle_count = escp2_nozzles(v);
+ int nozzle_separation = escp2_nozzle_separation(v);
+ int black_nozzle_count = escp2_black_nozzles(v);
+ int black_nozzle_separation = escp2_black_nozzle_separation(v);
+ int nozzle_span = nozzle_count * nozzle_separation;
+ int black_nozzle_span = black_nozzle_count * black_nozzle_separation;
+ if (black_nozzle_span > nozzle_span)
+ return black_nozzle_span;
+ else
+ return nozzle_span;
+}
static const input_slot_t *
get_input_slot(const stp_vars_t *v)
@@ -1033,7 +1119,7 @@ verify_resolution(const stp_vars_t *v, const res_t *res)
((res->vres / nozzle_width) * nozzle_width) == res->vres))
{
int xdpi = res->hres;
- int physical_xdpi = escp2_base_res(v, compute_resid(res));
+ int physical_xdpi = escp2_base_res(v, compute_virtual_resid(res));
int horizontal_passes, oversample;
if (physical_xdpi > xdpi)
physical_xdpi = xdpi;
@@ -1209,13 +1295,17 @@ get_media_adjustment(const stp_vars_t *v)
const inklist_t *ink_list = escp2_inklist(v);
if (pt && ink_list && ink_list->paper_adjustments)
{
- const paper_adjustment_list_t *adjlist = ink_list->paper_adjustments;
- const char *paper_name = pt->name;
- int i;
- for (i = 0; i < adjlist->paper_count; i++)
+ const paper_adjustment_list_t *adjlist =
+ stpi_escp2_get_paper_adjustment_list_named(ink_list->paper_adjustments);
+ if (adjlist)
{
- if (strcmp(paper_name, adjlist->papers[i].name) == 0)
- return &(adjlist->papers[i]);
+ const char *paper_name = pt->name;
+ int i;
+ for (i = 0; i < adjlist->paper_count; i++)
+ {
+ if (strcmp(paper_name, adjlist->papers[i].name) == 0)
+ return &(adjlist->papers[i]);
+ }
}
}
return NULL;
@@ -1260,7 +1350,12 @@ set_density_parameter(const stp_vars_t *v,
if (ink_name &&
ink_name->channel_set->channel_count > color &&
ink_name->channel_set->channels[color])
- description->is_active = 1;
+ {
+ description->is_active = 1;
+ description->bounds.dbl.lower = 0;
+ description->bounds.dbl.upper = 2.0;
+ description->deflt.dbl = 1.0;
+ }
}
}
@@ -1538,6 +1633,8 @@ escp2_parameters(const stp_vars_t *v, const char *name,
(description->bounds.str, "CD5Inch", _("CD - 5 inch"));
stp_string_list_add_string
(description->bounds.str, "CD3Inch", _("CD - 3 inch"));
+ stp_string_list_add_string
+ (description->bounds.str, "CDCustom", _("CD - Custom"));
}
else
{
@@ -1552,11 +1649,14 @@ escp2_parameters(const stp_vars_t *v, const char *name,
description->deflt.str =
stp_string_list_param(description->bounds.str, 0)->name;
}
- else if (strcmp(name, "CDInnerRadius") == 0)
+ else if (strcmp(name, "CDInnerRadius") == 0 )
{
const input_slot_t *slot = get_input_slot(v);
description->bounds.str = stp_string_list_create();
- if (printer_supports_print_to_cd(v) && (!slot || (slot && slot->is_cd)))
+ if (printer_supports_print_to_cd(v) &&
+ (!slot || slot->is_cd) &&
+ (!stp_get_string_parameter(v, "PageSize") ||
+ strcmp(stp_get_string_parameter(v, "PageSize"), "CDCustom") != 0))
{
stp_string_list_add_string
(description->bounds.str, "None", _("Normal"));
@@ -1568,6 +1668,34 @@ escp2_parameters(const stp_vars_t *v, const char *name,
else
description->is_active = 0;
}
+ else if (strcmp(name, "CDInnerDiameter") == 0 )
+ {
+ const input_slot_t *slot = get_input_slot(v);
+ description->bounds.dimension.lower = 16 * 10 * 72 / 254;
+ description->bounds.dimension.upper = 43 * 10 * 72 / 254;
+ description->deflt.dimension = 43 * 10 * 72 / 254;
+ if (printer_supports_print_to_cd(v) &&
+ (!slot || slot->is_cd) &&
+ (!stp_get_string_parameter(v, "PageSize") ||
+ strcmp(stp_get_string_parameter(v, "PageSize"), "CDCustom") == 0))
+ description->is_active = 1;
+ else
+ description->is_active = 0;
+ }
+ else if (strcmp(name, "CDOuterDiameter") == 0 )
+ {
+ const input_slot_t *slot = get_input_slot(v);
+ description->bounds.dimension.lower = 65 * 10 * 72 / 254;
+ description->bounds.dimension.upper = 120 * 10 * 72 / 254;
+ description->deflt.dimension = 329;
+ if (printer_supports_print_to_cd(v) &&
+ (!slot || slot->is_cd) &&
+ (!stp_get_string_parameter(v, "PageSize") ||
+ strcmp(stp_get_string_parameter(v, "PageSize"), "CDCustom") == 0))
+ description->is_active = 1;
+ else
+ description->is_active = 0;
+ }
else if (strcmp(name, "CDXAdjustment") == 0 ||
strcmp(name, "CDYAdjustment") == 0)
{
@@ -1575,7 +1703,7 @@ escp2_parameters(const stp_vars_t *v, const char *name,
description->bounds.dimension.lower = -15;
description->bounds.dimension.upper = 15;
description->deflt.dimension = 0;
- if (printer_supports_print_to_cd(v) && (!slot || (slot && slot->is_cd)))
+ if (printer_supports_print_to_cd(v) && (!slot || slot->is_cd))
description->is_active = 1;
else
description->is_active = 0;
@@ -1755,7 +1883,7 @@ escp2_parameters(const stp_vars_t *v, const char *name,
const input_slot_t *slot = get_input_slot(v);
if (slot && slot->is_cd)
description->is_active = 0;
- else if (escp2_has_cap(v, MODEL_XZEROMARGIN, MODEL_XZEROMARGIN_YES))
+ else if (supports_borderless(v))
description->deflt.boolean = 0;
else
description->is_active = 0;
@@ -2012,11 +2140,7 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins,
bottom_margin = imax(bottom_margin, escp2_bottom_margin(v, rollfeed));
top_margin = imax(top_margin, escp2_top_margin(v, rollfeed));
}
- *left = left_margin;
- *right = width - right_margin;
- *top = top_margin;
- *bottom = height - bottom_margin;
- if (escp2_has_cap(v, MODEL_XZEROMARGIN, MODEL_XZEROMARGIN_YES) &&
+ if (supports_borderless(v) &&
(use_maximum_area ||
(!cd && stp_get_boolean_parameter(v, "FullBleed"))))
{
@@ -2025,13 +2149,34 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins,
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);
+ if (use_paper_margins)
+ {
+ unsigned width_limit = escp2_max_paper_width(v);
+ int offset = escp2_zero_margin_offset(v);
+ int margin = escp2_micro_left_margin(v);
+ int sep = escp2_base_separation(v);
+ int delta = -((offset - margin) * 72 / sep);
+ left_margin = delta; /* Allow some overlap if paper isn't */
+ right_margin = delta; /* positioned correctly */
+ if (width - right_margin - 3 > width_limit)
+ right_margin = width - width_limit - 3;
+ top_margin = -7;
+ bottom_margin = -7;
+ }
+ else
+ {
+ left_margin = 0;
+ right_margin = 0;
+ top_margin = 0;
+ bottom_margin = 0;
+ }
}
}
}
+ *left = left_margin;
+ *right = width - right_margin;
+ *top = top_margin;
+ *bottom = height - bottom_margin;
}
/*
@@ -2176,7 +2321,9 @@ adjust_density_and_ink_type(stp_vars_t *v, stp_image_t *image)
escp2_privdata_t *pd = get_privdata(v);
const paper_adjustment_t *pt = pd->paper_adjustment;
double paper_density = .8;
- int o_resid = compute_printed_resid(pd->res);
+ int o_resid = compute_virtual_resid(pd->res);
+ int n_resid = compute_printed_resid(pd->res);
+ double virtual_scale = 1;
if (pt)
paper_density = pt->base_density;
@@ -2187,8 +2334,18 @@ adjust_density_and_ink_type(stp_vars_t *v, stp_image_t *image)
stp_set_float_parameter(v, "Density", 1.0);
}
+ while (n_resid > o_resid)
+ {
+ virtual_scale /= 2.0;
+ n_resid--;
+ }
+ while (n_resid < o_resid)
+ {
+ virtual_scale *= 2.0;
+ n_resid++;
+ }
stp_scale_float_parameter
- (v, "Density", paper_density * escp2_density(v, o_resid));
+ (v, "Density", virtual_scale * paper_density * escp2_density(v, o_resid));
pd->drop_size = escp2_ink_type(v, o_resid);
pd->ink_resid = o_resid;
@@ -2202,6 +2359,7 @@ adjust_density_and_ink_type(stp_vars_t *v, stp_image_t *image)
if (stp_check_int_parameter(v, "escp2_ink_type", STP_PARAMETER_ACTIVE) ||
stp_check_int_parameter(v, "escp2_density", STP_PARAMETER_ACTIVE) ||
stp_check_int_parameter(v, "escp2_bits", STP_PARAMETER_ACTIVE) ||
+ virtual_scale != 1.0 ||
(stp_check_boolean_parameter(v, "AdjustDotsize",
STP_PARAMETER_ACTIVE) &&
! stp_get_boolean_parameter(v, "AdjustDotsize")))
@@ -2217,8 +2375,10 @@ adjust_density_and_ink_type(stp_vars_t *v, stp_image_t *image)
while (density > 1.0 && resid >= RES_360)
{
int tresid = xresid - 1;
+ int base_res_now = escp2_base_res(v, resid);
int bits_now = escp2_bits(v, resid);
double density_now = escp2_density(v, resid);
+ int base_res_then = escp2_base_res(v, tresid);
int bits_then = escp2_bits(v, tresid);
double density_then = escp2_density(v, tresid);
int drop_size_then = escp2_ink_type(v, tresid);
@@ -2230,7 +2390,7 @@ adjust_density_and_ink_type(stp_vars_t *v, stp_image_t *image)
*/
if (bits_now != bits_then || density_then <= 0.0 ||
- drop_size_then == -1)
+ base_res_now != base_res_then || drop_size_then == -1)
break;
xdensity = density * density_then / density_now / 2;
xresid = tresid;
@@ -2564,24 +2724,29 @@ setup_head_offset(stp_vars_t *v)
}
static void
-setup_misc(stp_vars_t *v)
+setup_basic(stp_vars_t *v)
{
escp2_privdata_t *pd = get_privdata(v);
- pd->input_slot = get_input_slot(v);
- pd->paper_type = get_media_type(v);
- pd->paper_adjustment = get_media_adjustment(v);
- pd->ink_group = escp2_inkgroup(v);
- pd->init_sequence = escp2_preinit_sequence(v);
- pd->deinit_sequence = escp2_postinit_remote_sequence(v);
pd->advanced_command_set = escp2_has_advanced_command_set(v);
pd->command_set = escp2_get_cap(v, MODEL_COMMAND);
pd->variable_dots = escp2_has_cap(v, MODEL_VARIABLE_DOT, MODEL_VARIABLE_YES);
pd->has_vacuum = escp2_has_cap(v, MODEL_VACUUM, MODEL_VACUUM_YES);
pd->has_graymode = escp2_has_cap(v, MODEL_GRAYMODE, MODEL_GRAYMODE_YES);
+ pd->init_sequence = escp2_preinit_sequence(v);
+ pd->deinit_sequence = escp2_postinit_remote_sequence(v);
+ pd->borderless_sequence = escp2_vertical_borderless_sequence(v);
pd->base_separation = escp2_base_separation(v);
pd->resolution_scale = escp2_resolution_scale(v);
- pd->use_extended_commands =
- escp2_use_extended_commands(v, pd->res->softweave);
+}
+
+static void
+setup_misc(stp_vars_t *v)
+{
+ escp2_privdata_t *pd = get_privdata(v);
+ pd->input_slot = get_input_slot(v);
+ pd->paper_type = get_media_type(v);
+ pd->paper_adjustment = get_media_adjustment(v);
+ pd->ink_group = escp2_inkgroup(v);
}
static void
@@ -2692,7 +2857,9 @@ setup_resolution(stp_vars_t *v)
int horizontal = adjusted_horizontal_resolution(res);
pd->res = res;
- pd->physical_xdpi = escp2_base_res(v, resid);
+ pd->use_extended_commands =
+ escp2_use_extended_commands(v, pd->res->softweave);
+ pd->physical_xdpi = escp2_base_res(v, compute_virtual_resid(res));
if (pd->physical_xdpi > pd->res->hres)
pd->physical_xdpi = pd->res->hres;
@@ -2782,7 +2949,7 @@ setup_head_parameters(stp_vars_t *v)
pd->use_aux_channels);
if (pd->physical_channels == 0)
{
- pd->inkname = &stpi_escp2_default_black_inkset;
+ pd->inkname = stpi_escp2_get_default_black_inkset();
pd->physical_channels =
compute_channel_count(pd->inkname, pd->logical_channels,
pd->use_aux_channels);
@@ -2845,31 +3012,68 @@ setup_head_parameters(stp_vars_t *v)
static void
setup_page(stp_vars_t *v)
{
- int n;
escp2_privdata_t *pd = get_privdata(v);
const input_slot_t *input_slot = get_input_slot(v);
int extra_left = 0;
int extra_top = 0;
- const char *inner_radius_name = stp_get_string_parameter(v, "CDInnerRadius");
- int hub_size = 43; /* 43 mm standard CD hub */
-
- if (inner_radius_name && strcmp(inner_radius_name, "Small") == 0)
- hub_size = 16; /* 15 mm prints to the hole - play it
+ int hub_size = 0;
+ int min_horizontal_alignment = escp2_min_horizontal_position_alignment(v);
+ int base_horizontal_alignment =
+ pd->res->hres / escp2_base_horizontal_position_alignment(v);
+ int required_horizontal_alignment =
+ MAX(min_horizontal_alignment, base_horizontal_alignment);
+
+ const char *cd_type = stp_get_string_parameter(v, "PageSize");
+ if (cd_type && (strcmp(cd_type, "CDCustom") == 0 ))
+ {
+ int outer_diameter = stp_get_dimension_parameter(v, "CDOuterDiameter");
+ stp_set_page_width(v, outer_diameter);
+ stp_set_page_height(v, outer_diameter);
+ stp_set_width(v, outer_diameter);
+ stp_set_height(v, outer_diameter);
+ hub_size = stp_get_dimension_parameter(v, "CDInnerDiameter");
+ }
+ else
+ {
+ const char *inner_radius_name = stp_get_string_parameter(v, "CDInnerRadius");
+ hub_size = 43 * 10 * 72 / 254; /* 43 mm standard CD hub */
+
+ if (inner_radius_name && strcmp(inner_radius_name, "Small") == 0)
+ hub_size = 16 * 10 * 72 / 254; /* 15 mm prints to the hole - play it
safe and print 16 mm */
+ }
- stp_default_media_size(v, &n, &(pd->page_true_height));
- pd->page_extra_height = escp2_page_extra_height(v);
- if (pd->page_extra_height > 0 &&
- escp2_has_cap(v, MODEL_XZEROMARGIN, MODEL_XZEROMARGIN_YES) &&
- (!(input_slot->is_cd) && stp_get_boolean_parameter(v, "FullBleed")))
- pd->page_extra_height +=
- escp2_nozzles(v) * escp2_nozzle_separation(v) * 72 /
- escp2_base_separation(v);
- internal_imageable_area(v, 0, 0, &pd->page_left, &pd->page_right,
- &pd->page_bottom, &pd->page_top);
+ stp_default_media_size(v, &(pd->page_true_width), &(pd->page_true_height));
/* 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 (escp2_has_cap(v, MODEL_ZEROMARGIN, MODEL_ZEROMARGIN_FULL) &&
+ ((!input_slot || !(input_slot->is_cd))))
+ {
+ pd->page_extra_height =
+ max_nozzle_span(v) * pd->page_management_units /
+ escp2_base_separation(v);
+ if (stp_get_boolean_parameter(v, "FullBleed"))
+ pd->paper_extra_bottom = 0;
+ else
+ pd->paper_extra_bottom = escp2_paper_extra_bottom(v);
+ }
+ else if (escp2_has_cap(v, MODEL_ZEROMARGIN, MODEL_ZEROMARGIN_YES) &&
+ (stp_get_boolean_parameter(v, "FullBleed")) &&
+ ((!input_slot || !(input_slot->is_cd))))
+ {
+ pd->paper_extra_bottom = 0;
+ pd->page_extra_height =
+ escp2_zero_margin_offset(v) * pd->page_management_units /
+ escp2_base_separation(v);
+ }
+ else
+ {
+ pd->page_extra_height = 0;
+ pd->paper_extra_bottom = escp2_paper_extra_bottom(v);
+ }
+ internal_imageable_area(v, 0, 0, &pd->page_left, &pd->page_right,
+ &pd->page_bottom, &pd->page_top);
if (input_slot && input_slot->is_cd && escp2_cd_x_offset(v) > 0)
{
@@ -2878,6 +3082,8 @@ setup_page(stp_vars_t *v)
int top_center = escp2_cd_y_offset(v) +
stp_get_dimension_parameter(v, "CDYAdjustment");
pd->page_true_height = pd->page_bottom - pd->page_top;
+ pd->page_true_width = pd->page_right - pd->page_left;
+ pd->paper_extra_bottom = 0;
pd->page_extra_height = 0;
stp_set_left(v, stp_get_left(v) - pd->page_left);
stp_set_top(v, stp_get_top(v) - pd->page_top);
@@ -2887,17 +3093,17 @@ setup_page(stp_vars_t *v)
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;
+ pd->cd_inner_radius = hub_size * pd->micro_units / 72 / 2;
pd->cd_outer_radius = pd->page_right * pd->micro_units / 72 / 2;
pd->cd_x_offset =
((pd->page_right / 2) - stp_get_left(v)) * pd->micro_units / 72;
- pd->cd_y_offset =
- ((pd->page_bottom / 2) - stp_get_top(v)) * pd->micro_units / 72;
+ pd->cd_y_offset = stp_get_top(v) * pd->res->printed_vres / 72;
if (escp2_cd_page_height(v))
{
pd->page_right = escp2_cd_page_width(v);
pd->page_bottom = escp2_cd_page_height(v);
pd->page_true_height = escp2_cd_page_height(v);
+ pd->page_true_width = escp2_cd_page_width(v);
}
}
@@ -2908,18 +3114,28 @@ 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;
+ pd->zero_margin_offset = escp2_zero_margin_offset(v);
+ if (supports_borderless(v) &&
+ pd->advanced_command_set && pd->command_set != MODEL_COMMAND_PRO &&
+ ((!input_slot || !(input_slot->is_cd)) &&
+ stp_get_boolean_parameter(v, "FullBleed")))
+ {
+ int margin = escp2_micro_left_margin(v);
+ int sep = escp2_base_separation(v);
+ pd->image_left_position +=
+ (pd->zero_margin_offset - margin) * pd->micro_units / sep;
+ }
/*
* Many printers print extremely slowly if the starting position
- * is not a multiple of 8
+ * is not aligned to 1/180"
*/
- if (escp2_horizontal_position_alignment(v) > 1)
+ if (required_horizontal_alignment > 1)
pd->image_left_position =
- (pd->image_left_position / escp2_horizontal_position_alignment(v)) *
- escp2_horizontal_position_alignment(v);
+ (pd->image_left_position / required_horizontal_alignment) *
+ required_horizontal_alignment;
pd->page_bottom += extra_top + 1;
- pd->page_true_height += extra_top + 1;
pd->page_height = pd->page_bottom - pd->page_top;
pd->image_top = stp_get_top(v) - pd->page_top + extra_top;
pd->image_height = stp_get_height(v);
@@ -3018,7 +3234,8 @@ escp2_print_data(stp_vars_t *v, stp_image_t *image)
if (cd_mask)
{
int y_distance_from_center =
- pd->cd_outer_radius - (y * pd->micro_units / pd->res->printed_vres);
+ pd->cd_outer_radius -
+ ((y + pd->cd_y_offset) * pd->micro_units / pd->res->printed_vres);
if (y_distance_from_center < 0)
y_distance_from_center = -y_distance_from_center;
memset(cd_mask, 0, (pd->image_printed_width + 7) / 8);
@@ -3091,8 +3308,10 @@ escp2_print_page(stp_vars_t *v, stp_image_t *image)
pd->bitwidth,
pd->image_printed_width,
pd->image_printed_height,
- pd->image_top * pd->res->vres / 72,
- (pd->page_height + escp2_extra_feed(v)) * pd->res->vres / 72,
+ ((pd->page_extra_height * pd->res->vres / pd->vertical_units) +
+ (pd->image_top * pd->res->vres / 72)),
+ (pd->page_extra_height +
+ (pd->page_height + escp2_extra_feed(v)) * pd->res->vres / 72),
pd->head_offset,
weave_pattern,
stpi_escp2_flush_pass,
@@ -3165,6 +3384,7 @@ escp2_do_print(stp_vars_t *v, stp_image_t *image, int print_op)
pd->use_aux_channels = 0;
pd->channels_in_use = count_channels(pd->inkname, pd->use_aux_channels);
+ setup_basic(v);
setup_resolution(v);
setup_head_parameters(v);
setup_page(v);
diff --git a/src/main/print-escp2.h b/src/main/print-escp2.h
index 1fd76b3..f75354a 100644
--- a/src/main/print-escp2.h
+++ b/src/main/print-escp2.h
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2.h,v 1.105 2006/07/22 20:28:14 rlk Exp $"
+ * "$Id: print-escp2.h,v 1.105.6.2 2007/05/29 01:47:29 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -152,6 +152,8 @@ typedef struct
const char *text;
short hres;
short vres;
+ short virtual_hres;
+ short virtual_vres;
short printed_hres;
short printed_vres;
short softweave;
@@ -233,8 +235,8 @@ typedef struct
const char *name;
const char *text;
const escp2_inkname_t *const *inknames;
- const paperlist_t *papers;
- const paper_adjustment_list_t *paper_adjustments;
+ const char *papers;
+ const char *paper_adjustments;
const shade_set_t *shades;
short n_inks;
} inklist_t;
@@ -367,42 +369,43 @@ typedef struct
#define MODEL_COMMAND_2000 0x2ul /* The 2000 series printers */
#define MODEL_COMMAND_PRO 0x3ul /* Stylus Pro printers */
-#define MODEL_XZEROMARGIN_MASK 0x10ul /* Does this printer support */
-#define MODEL_XZEROMARGIN_NO 0x00ul /* zero margin mode? */
-#define MODEL_XZEROMARGIN_YES 0x10ul /* (print to edge of the paper) */
+#define MODEL_ZEROMARGIN_MASK 0x30ul /* Does this printer support */
+#define MODEL_ZEROMARGIN_NO 0x00ul /* zero margin mode? */
+#define MODEL_ZEROMARGIN_YES 0x10ul /* (print to edge of the paper) */
+#define MODEL_ZEROMARGIN_FULL 0x20ul /* (print to edge of the paper) */
-#define MODEL_VARIABLE_DOT_MASK 0x20ul /* Does this printer support var */
+#define MODEL_VARIABLE_DOT_MASK 0x40ul /* Does this printer support var */
#define MODEL_VARIABLE_NO 0x00ul /* dot size printing? The newest */
-#define MODEL_VARIABLE_YES 0x20ul /* printers support multiple modes */
+#define MODEL_VARIABLE_YES 0x40ul /* printers support multiple modes */
-#define MODEL_GRAYMODE_MASK 0x40ul /* Does this printer support special */
+#define MODEL_GRAYMODE_MASK 0x80ul /* Does this printer support special */
#define MODEL_GRAYMODE_NO 0x00ul /* fast black printing? */
-#define MODEL_GRAYMODE_YES 0x40ul
+#define MODEL_GRAYMODE_YES 0x80ul
-#define MODEL_VACUUM_MASK 0x80ul
-#define MODEL_VACUUM_NO 0x00ul
-#define MODEL_VACUUM_YES 0x80ul
+#define MODEL_VACUUM_MASK 0x100ul
+#define MODEL_VACUUM_NO 0x000ul
+#define MODEL_VACUUM_YES 0x100ul
-#define MODEL_FAST_360_MASK 0x100ul
+#define MODEL_FAST_360_MASK 0x200ul
#define MODEL_FAST_360_NO 0x000ul
-#define MODEL_FAST_360_YES 0x100ul
+#define MODEL_FAST_360_YES 0x200ul
-#define MODEL_SEND_ZERO_ADVANCE_MASK 0x200ul
+#define MODEL_SEND_ZERO_ADVANCE_MASK 0x400ul
#define MODEL_SEND_ZERO_ADVANCE_NO 0x000ul
-#define MODEL_SEND_ZERO_ADVANCE_YES 0x200ul
+#define MODEL_SEND_ZERO_ADVANCE_YES 0x400ul
-#define MODEL_SUPPORTS_INK_CHANGE_MASK 0x400ul
+#define MODEL_SUPPORTS_INK_CHANGE_MASK 0x800ul
#define MODEL_SUPPORTS_INK_CHANGE_NO 0x000ul
-#define MODEL_SUPPORTS_INK_CHANGE_YES 0x400ul
+#define MODEL_SUPPORTS_INK_CHANGE_YES 0x800ul
-#define MODEL_PACKET_MODE_MASK 0x800ul
-#define MODEL_PACKET_MODE_NO 0x000ul
-#define MODEL_PACKET_MODE_YES 0x800ul
+#define MODEL_PACKET_MODE_MASK 0x1000ul
+#define MODEL_PACKET_MODE_NO 0x0000ul
+#define MODEL_PACKET_MODE_YES 0x1000ul
typedef enum
{
MODEL_COMMAND,
- MODEL_XZEROMARGIN,
+ MODEL_ZEROMARGIN,
MODEL_VARIABLE_DOT,
MODEL_GRAYMODE,
MODEL_VACUUM,
@@ -440,6 +443,7 @@ typedef struct escp2_printer
short max_vres;
short min_hres;
short min_vres;
+/*****************************************************************************/
/* Miscellaneous printer-specific data */
short extra_feed; /* Extra distance the paper can be spaced */
/* beyond the bottom margin, in 1/360". */
@@ -452,10 +456,13 @@ typedef struct escp2_printer
short zero_margin_offset; /* Offset to use to achieve */
/* zero-margin printing */
+ short micro_left_margin; /* Precise left margin (base separation) */
short initial_vertical_offset;
short black_initial_vertical_offset;
short extra_720dpi_separation;
- short horizontal_position_alignment; /* Horizontal alignment */
+ short min_horizontal_position_alignment; /* Horizontal alignment */
+ /* for good performance */
+ short base_horizontal_position_alignment; /* Horizontal alignment */
/* for good performance */
int bidirectional_upper_limit; /* Highest total resolution */
/* for bidirectional printing */
@@ -496,7 +503,7 @@ typedef struct escp2_printer
short cd_page_width; /* Width of "page" when printing to CD */
short cd_page_height; /* Height of "page" when printing to CD */
/* Extra height for form factor command */
- short page_extra_height; /* Extra height (lie to set form factor) */
+ short paper_extra_bottom; /* Extra space on the bottom of the page */
/*****************************************************************************/
/* Parameters for escputil */
short alignment_passes;
@@ -506,111 +513,37 @@ typedef struct escp2_printer
/*****************************************************************************/
const short *dot_sizes; /* Vector of dot sizes for resolutions */
const float *densities; /* List of densities for each printer */
- const escp2_drop_list_t *drops; /* Drop sizes */
+ const char *drops; /* Drop sizes */
/*****************************************************************************/
- const res_t *const *reslist;
- const inkgroup_t *inkgroup;
+ const char *reslist;
+ const char *inkgroup;
/*****************************************************************************/
const short *bits;
const short *base_resolutions;
- const input_slot_list_t *input_slots;
+ const char *input_slots;
/*****************************************************************************/
- const quality_list_t *quality_list;
+ const char *quality_list;
const stp_raw_t *preinit_sequence;
const stp_raw_t *postinit_remote_sequence;
/*****************************************************************************/
- const printer_weave_list_t *const printer_weaves;
- const channel_name_t *channel_names;
+ const stp_raw_t *vertical_borderless_sequence;
+ const char *const printer_weaves;
+ const char *channel_names;
} stpi_escp2_printer_t;
extern const stpi_escp2_printer_t stpi_escp2_model_capabilities[];
extern const int stpi_escp2_model_limit;
-extern const escp2_drop_list_t stpi_escp2_simple_drops;
-extern const escp2_drop_list_t stpi_escp2_spro10000_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_1_5pl_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_2pl_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_3pl_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_c66_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_3pl_pmg_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_r2400_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_picturemate_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_1440_4pl_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_ultrachrome_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_2880_4pl_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_6pl_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_2000p_drops;
-extern const escp2_drop_list_t stpi_escp2_variable_x80_6pl_drops;
-
-extern const paperlist_t stpi_escp2_standard_paper_list;
-extern const paperlist_t stpi_escp2_durabrite_paper_list;
-extern const paperlist_t stpi_escp2_durabrite2_paper_list;
-extern const paperlist_t stpi_escp2_ultrachrome_paper_list;
-extern const paperlist_t stpi_escp2_ultrachrome_k3_paper_list;
-extern const paperlist_t stpi_escp2_r800_paper_list;
-extern const paperlist_t stpi_escp2_picturemate_paper_list;
-
-extern const paper_adjustment_list_t stpi_escp2_standard_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_durabrite_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_durabrite2_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_photo_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_photo2_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_photo3_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_sp960_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_ultrachrome_photo_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_ultrachrome_matte_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_ultrachrome_k3_photo_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_ultrachrome_k3_matte_paper_adjustment_list;
-extern const paper_adjustment_list_t stpi_escp2_r800_photo_paper_adjustment_list;
-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[];
-extern const res_t *const stpi_escp2_720dpi_reslist[];
-extern const res_t *const stpi_escp2_720dpi_soft_reslist[];
-extern const res_t *const stpi_escp2_g3_720dpi_reslist[];
-extern const res_t *const stpi_escp2_1440dpi_reslist[];
-extern const res_t *const stpi_escp2_2880dpi_reslist[];
-extern const res_t *const stpi_escp2_2880_1440dpi_reslist[];
-extern const res_t *const stpi_escp2_g3_reslist[];
-extern const res_t *const stpi_escp2_sc500_reslist[];
-extern const res_t *const stpi_escp2_sc640_reslist[];
-extern const res_t *const stpi_escp2_picturemate_reslist[];
-
-extern const inkgroup_t stpi_escp2_cmy_inkgroup;
-extern const inkgroup_t stpi_escp2_standard_inkgroup;
-extern const inkgroup_t stpi_escp2_c80_inkgroup;
-extern const inkgroup_t stpi_escp2_c82_inkgroup;
-extern const inkgroup_t stpi_escp2_c64_inkgroup;
-extern const inkgroup_t stpi_escp2_f360_inkgroup;
-extern const inkgroup_t stpi_escp2_cx3650_inkgroup;
-extern const inkgroup_t stpi_escp2_x80_inkgroup;
-extern const inkgroup_t stpi_escp2_photo_gen1_inkgroup;
-extern const inkgroup_t stpi_escp2_photo_gen2_inkgroup;
-extern const inkgroup_t stpi_escp2_photo_gen3_inkgroup;
-extern const inkgroup_t stpi_escp2_photo_pigment_inkgroup;
-extern const inkgroup_t stpi_escp2_photo7_japan_inkgroup;
-extern const inkgroup_t stpi_escp2_ultrachrome_inkgroup;
-extern const inkgroup_t stpi_escp2_f360_photo_inkgroup;
-extern const inkgroup_t stpi_escp2_f360_photo7_japan_inkgroup;
-extern const inkgroup_t stpi_escp2_f360_ultrachrome_inkgroup;
-extern const inkgroup_t stpi_escp2_f360_ultrachrome_k3_inkgroup;
-extern const inkgroup_t stpi_escp2_cmykrb_inkgroup;
-extern const inkgroup_t stpi_escp2_picturemate_inkgroup;
-
-extern const escp2_inkname_t stpi_escp2_default_black_inkset;
-
-extern const printer_weave_list_t stpi_escp2_standard_printer_weave_list;
-extern const printer_weave_list_t stpi_escp2_sp2200_printer_weave_list;
-extern const printer_weave_list_t stpi_escp2_pro7000_printer_weave_list;
-extern const printer_weave_list_t stpi_escp2_pro7500_printer_weave_list;
-extern const printer_weave_list_t stpi_escp2_pro7600_printer_weave_list;
+extern const paper_adjustment_list_t *stpi_escp2_get_paper_adjustment_list_named(const char *);
+extern const paperlist_t *stpi_escp2_get_paperlist_named(const char *);
+extern const quality_list_t *stpi_escp2_get_quality_list_named(const char *);
+extern const escp2_inkname_t *stpi_escp2_get_default_black_inkset(void);
+extern const inkgroup_t *stpi_escp2_get_inkgroup_named(const char *);
+extern const input_slot_list_t *stpi_escp2_get_input_slot_list_named(const char *);
+extern const res_t *const *stpi_escp2_get_reslist_named(const char *);
+extern const escp2_drop_list_t *stpi_escp2_get_drop_list_named(const char *);
+extern const printer_weave_list_t *stpi_escp2_get_printer_weaves_named(const char *);
+extern const channel_name_t *stpi_escp2_get_channel_names_named(const char *);
typedef struct
{
@@ -626,6 +559,7 @@ typedef struct
int micro_units; /* Micro-units for horizontal positioning */
int unit_scale; /* Scale factor for units */
int send_zero_pass_advance; /* Send explicit command for zero advance */
+ int zero_margin_offset; /* Zero margin offset */
/* Ink parameters */
int bitwidth; /* Number of bits per ink drop */
@@ -653,6 +587,7 @@ typedef struct
const inkgroup_t *ink_group; /* Which set of inks */
const stp_raw_t *init_sequence; /* Initialization sequence */
const stp_raw_t *deinit_sequence; /* De-initialization sequence */
+ const stp_raw_t *borderless_sequence; /* Vertical borderless sequence */
model_featureset_t command_set; /* Which command set this printer supports */
int variable_dots; /* Print supports variable dot sizes */
int has_vacuum; /* Printer supports vacuum command */
@@ -681,7 +616,9 @@ typedef struct
int page_width; /* Page width (points) */
int page_height; /* Page height (points) */
int page_true_height; /* Physical page height (points) */
- int page_extra_height; /* Extra height for set_form_factor */
+ int page_extra_height; /* Extra height for set_form_factor (rows) */
+ int paper_extra_bottom; /* Extra bottom for set_page_size (rows) */
+ int page_true_width; /* Physical page height (points) */
int cd_x_offset; /* CD X offset (micro units) */
int cd_y_offset; /* CD Y offset (micro units) */
int cd_outer_radius; /* CD radius (micro units) */
@@ -728,5 +665,5 @@ extern void stpi_escp2_terminate_page(stp_vars_t *v);
#endif /* GUTENPRINT_INTERNAL_ESCP2_H */
/*
- * End of "$Id: print-escp2.h,v 1.105 2006/07/22 20:28:14 rlk Exp $".
+ * End of "$Id: print-escp2.h,v 1.105.6.2 2007/05/29 01:47:29 rlk Exp $".
*/
diff --git a/src/main/print-olympus.c b/src/main/print-olympus.c
index c5ad531..7c02b15 100644
--- a/src/main/print-olympus.c
+++ b/src/main/print-olympus.c
@@ -1,9 +1,9 @@
/*
- * "$Id: print-olympus.c,v 1.59 2006/05/28 16:59:05 rlk Exp $"
+ * "$Id: print-olympus.c,v 1.61.2.1 2007/03/02 12:01:30 rlk Exp $"
*
- * Print plug-in Olympus driver for the GIMP.
+ * Print plug-in DyeSub driver (formerly Olympus driver) for the GIMP.
*
- * Copyright 2003 - 2005
+ * Copyright 2003 - 2006
* Michael Mraka (Michael.Mraka@linux.cz)
*
* The plug-in is based on the code of the RAW plugin for the GIMP of
@@ -37,26 +37,42 @@
#include <gutenprint/gutenprint-intl-internal.h>
#include <string.h>
#include <stdio.h>
+#include <limits.h>
+
+#define STP_DBG_DYESUB STP_DBG_OLYMPUS
#ifdef __GNUC__
#define inline __inline__
#endif
-#define OLYMPUS_INTERLACE_NONE 0
-#define OLYMPUS_INTERLACE_LINE 1
-#define OLYMPUS_INTERLACE_PLANE 2
-
-#define OLYMPUS_FEATURE_NONE 0x00000000
-#define OLYMPUS_FEATURE_FULL_WIDTH 0x00000001
-#define OLYMPUS_FEATURE_FULL_HEIGHT 0x00000002
-#define OLYMPUS_FEATURE_BLOCK_ALIGN 0x00000004
-#define OLYMPUS_FEATURE_BORDERLESS 0x00000008
-#define OLYMPUS_FEATURE_WHITE_BORDER 0x00000010
-
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-#define MAX(a,b) (((a) > (b)) ? (a) : (b))
+#define DYESUB_FEATURE_NONE 0x00000000
+#define DYESUB_FEATURE_FULL_WIDTH 0x00000001
+#define DYESUB_FEATURE_FULL_HEIGHT 0x00000002
+#define DYESUB_FEATURE_BLOCK_ALIGN 0x00000004
+#define DYESUB_FEATURE_BORDERLESS 0x00000008
+#define DYESUB_FEATURE_WHITE_BORDER 0x00000010
+#define DYESUB_FEATURE_PLANE_INTERLACE 0x00000020
+
+#define DYESUB_PORTRAIT 0
+#define DYESUB_LANDSCAPE 1
+
+#ifndef MIN
+# define MIN(a,b) (((a) < (b)) ? (a) : (b))
+#endif /* !MIN */
+#ifndef MAX
+# define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#endif /* !MAX */
+#define PX(pt,dpi) ((pt) * (dpi) / 72)
+#define PT(px,dpi) ((px) * 72 / (dpi))
+#define LIST(list_t, list_name, items_t, items_name) \
+ static const list_t list_name = \
+ { \
+ items_name, sizeof(items_name) / sizeof(items_t) \
+ }
-static const char *zero = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
+#define MAX_INK_CHANNELS 3
+#define MAX_BYTES_PER_CHANNEL 2
+#define SIZE_THRESHOLD 6
typedef struct
{
@@ -75,12 +91,12 @@ typedef struct {
const char* name;
int xdpi;
int ydpi;
-} olymp_resolution_t;
+} dyesub_resolution_t;
typedef struct {
- const olymp_resolution_t *item;
+ const dyesub_resolution_t *item;
size_t n_items;
-} olymp_resolution_list_t;
+} dyesub_resolution_list_t;
typedef struct {
const char* name;
@@ -91,24 +107,25 @@ typedef struct {
int border_pt_right;
int border_pt_top;
int border_pt_bottom;
-} olymp_pagesize_t;
+ int print_mode;
+} dyesub_pagesize_t;
typedef struct {
- const olymp_pagesize_t *item;
+ const dyesub_pagesize_t *item;
size_t n_items;
-} olymp_pagesize_list_t;
+} dyesub_pagesize_list_t;
typedef struct {
const char* res_name;
const char* pagesize_name;
int width_px;
int height_px;
-} olymp_printsize_t;
+} dyesub_printsize_t;
typedef struct {
- const olymp_printsize_t *item;
+ const dyesub_printsize_t *item;
size_t n_items;
-} olymp_printsize_list_t;
+} dyesub_printsize_list_t;
typedef struct {
@@ -131,18 +148,32 @@ typedef struct
int block_max_x, block_max_y;
const char* pagesize;
const laminate_t* laminate;
-} olympus_privdata_t;
+} dyesub_privdata_t;
-static olympus_privdata_t privdata;
+static dyesub_privdata_t privdata;
+
+typedef struct {
+ int out_channels;
+ int ink_channels;
+ const char *ink_order;
+ int bytes_per_out_channel;
+ int bytes_per_ink_channel;
+ int plane_interlacing;
+ char empty_byte;
+ unsigned short **image_data;
+ int outh_px, outw_px, outt_px, outb_px, outl_px, outr_px;
+ int imgh_px, imgw_px;
+ int prnh_px, prnw_px, prnt_px, prnb_px, prnl_px, prnr_px;
+ int print_mode; /* portrait or landscape */
+} dyesub_print_vars_t;
typedef struct /* printer specific parameters */
{
int model; /* printer model number from printers.xml*/
const ink_list_t *inks;
- const olymp_resolution_list_t *resolution;
- const olymp_pagesize_list_t *pages;
- const olymp_printsize_list_t *printsize;
- int interlacing; /* color interlacing scheme */
+ const dyesub_resolution_list_t *resolution;
+ const dyesub_pagesize_list_t *pages;
+ const dyesub_printsize_list_t *printsize;
int block_size;
int features;
void (*printer_init_func)(stp_vars_t *);
@@ -155,11 +186,12 @@ typedef struct /* printer specific parameters */
const char *adj_magenta;
const char *adj_yellow;
const laminate_list_t *laminate;
-} olympus_cap_t;
+} dyesub_cap_t;
-static const olympus_cap_t* olympus_get_model_capabilities(int model);
-static const laminate_t* olympus_get_laminate_pattern(stp_vars_t *v);
+static const dyesub_cap_t* dyesub_get_model_capabilities(int model);
+static const laminate_t* dyesub_get_laminate_pattern(stp_vars_t *v);
+static void dyesub_nputc(stp_vars_t *v, char byte, int count);
static const ink_t cmy_inks[] =
@@ -167,76 +199,55 @@ static const ink_t cmy_inks[] =
{ "CMY", 3, "CMY", "\1\2\3" },
};
-static const ink_list_t cmy_ink_list =
-{
- cmy_inks, sizeof(cmy_inks) / sizeof(ink_t)
-};
+LIST(ink_list_t, cmy_ink_list, ink_t, cmy_inks);
static const ink_t ymc_inks[] =
{
{ "CMY", 3, "CMY", "\3\2\1" },
};
-static const ink_list_t ymc_ink_list =
-{
- ymc_inks, sizeof(ymc_inks) / sizeof(ink_t)
-};
+LIST(ink_list_t, ymc_ink_list, ink_t, ymc_inks);
static const ink_t rgb_inks[] =
{
{ "RGB", 3, "RGB", "\1\2\3" },
};
-static const ink_list_t rgb_ink_list =
-{
- rgb_inks, sizeof(rgb_inks) / sizeof(ink_t)
-};
+LIST(ink_list_t, rgb_ink_list, ink_t, rgb_inks);
static const ink_t bgr_inks[] =
{
{ "RGB", 3, "RGB", "\3\2\1" },
};
-static const ink_list_t bgr_ink_list =
-{
- bgr_inks, sizeof(bgr_inks) / sizeof(ink_t)
-};
+LIST(ink_list_t, bgr_ink_list, ink_t, bgr_inks);
/* Olympus P-10 */
-static const olymp_resolution_t res_320dpi[] =
+static const dyesub_resolution_t res_310dpi[] =
{
- { "320x320", 320, 320},
+ { "310x310", 310, 310},
};
-static const olymp_resolution_list_t res_320dpi_list =
-{
- res_320dpi, sizeof(res_320dpi) / sizeof(olymp_resolution_t)
-};
+LIST(dyesub_resolution_list_t, res_310dpi_list, dyesub_resolution_t, res_310dpi);
-static const olymp_pagesize_t p10_page[] =
+static const dyesub_pagesize_t p10_page[] =
{
- { "w288h432", "4 x 6", -1, -1, 0, 0, 16, 0}, /* 4x6" */
- { "B7", "3.5 x 5", -1, -1, 0, 0, 4, 0}, /* 3.5x5" */
- { "Custom", NULL, -1, -1, 28, 28, 48, 48},
+ { "w288h432", "4 x 6", 298, 430, 0, 0, 0, 0, DYESUB_PORTRAIT}, /* 4x6" */
+ { "B7", "3.5 x 5", 266, 370, 0, 0, 0, 0, DYESUB_PORTRAIT}, /* 3.5x5" */
+ { "Custom", NULL, 298, 430, 28, 28, 48, 48, DYESUB_PORTRAIT},
};
-static const olymp_pagesize_list_t p10_page_list =
-{
- p10_page, sizeof(p10_page) / sizeof(olymp_pagesize_t)
-};
+LIST(dyesub_pagesize_list_t, p10_page_list, dyesub_pagesize_t, p10_page);
-static const olymp_printsize_t p10_printsize[] =
+static const dyesub_printsize_t p10_printsize[] =
{
- { "320x320", "w288h432", 1280, 1848},
- { "320x320", "B7", 1144, 1591},
- { "320x320", "Custom", 1280, 1848},
+ { "310x310", "w288h432", 1280, 1848},
+ { "310x310", "B7", 1144, 1591},
+ { "310x310", "Custom", 1280, 1848},
};
-static const olymp_printsize_list_t p10_printsize_list =
-{
- p10_printsize, sizeof(p10_printsize) / sizeof(olymp_printsize_t)
-};
+LIST(dyesub_printsize_list_t, p10_printsize_list, dyesub_printsize_t, p10_printsize);
static void p10_printer_init_func(stp_vars_t *v)
{
@@ -266,34 +277,32 @@ static const laminate_t p10_laminate[] =
{"None", N_("None"), {1, "\x02"}},
};
-static const laminate_list_t p10_laminate_list =
-{
- p10_laminate, sizeof(p10_laminate) / sizeof(laminate_t)
-};
+LIST(laminate_list_t, p10_laminate_list, laminate_t, p10_laminate);
/* Olympus P-200 series */
-static const olymp_pagesize_t p200_page[] =
+static const dyesub_resolution_t res_320dpi[] =
{
- { "ISOB7", "80x125mm", -1, -1, 16, 17, 33, 33},
- { "Custom", NULL, -1, -1, 16, 17, 33, 33},
+ { "320x320", 320, 320},
};
-static const olymp_pagesize_list_t p200_page_list =
+LIST(dyesub_resolution_list_t, res_320dpi_list, dyesub_resolution_t, res_320dpi);
+
+static const dyesub_pagesize_t p200_page[] =
{
- p200_page, sizeof(p200_page) / sizeof(olymp_pagesize_t)
+ { "ISOB7", "80x125mm", -1, -1, 16, 17, 33, 33, DYESUB_PORTRAIT},
+ { "Custom", NULL, -1, -1, 16, 17, 33, 33, DYESUB_PORTRAIT},
};
-static const olymp_printsize_t p200_printsize[] =
+LIST(dyesub_pagesize_list_t, p200_page_list, dyesub_pagesize_t, p200_page);
+
+static const dyesub_printsize_t p200_printsize[] =
{
{ "320x320", "ISOB7", 960, 1280},
{ "320x320", "Custom", 960, 1280},
};
-static const olymp_printsize_list_t p200_printsize_list =
-{
- p200_printsize, sizeof(p200_printsize) / sizeof(olymp_printsize_t)
-};
+LIST(dyesub_printsize_list_t, p200_printsize_list, dyesub_printsize_t, p200_printsize);
static void p200_printer_init_func(stp_vars_t *v)
{
@@ -327,40 +336,31 @@ static const char p200_adj_any[] =
/* Olympus P-300 series */
-static const olymp_resolution_t p300_res[] =
+static const dyesub_resolution_t p300_res[] =
{
{ "306x306", 306, 306},
{ "153x153", 153, 153},
};
-static const olymp_resolution_list_t p300_res_list =
-{
- p300_res, sizeof(p300_res) / sizeof(olymp_resolution_t)
-};
+LIST(dyesub_resolution_list_t, p300_res_list, dyesub_resolution_t, p300_res);
-static const olymp_pagesize_t p300_page[] =
+static const dyesub_pagesize_t p300_page[] =
{
- { "A6", NULL, -1, -1, 28, 28, 48, 48},
- { "Custom", NULL, -1, -1, 28, 28, 48, 48},
+ { "A6", NULL, -1, -1, 28, 28, 48, 48, DYESUB_PORTRAIT},
+ { "Custom", NULL, -1, -1, 28, 28, 48, 48, DYESUB_PORTRAIT},
};
-static const olymp_pagesize_list_t p300_page_list =
-{
- p300_page, sizeof(p300_page) / sizeof(olymp_pagesize_t)
-};
+LIST(dyesub_pagesize_list_t, p300_page_list, dyesub_pagesize_t, p300_page);
-static const olymp_printsize_t p300_printsize[] =
+static const dyesub_printsize_t p300_printsize[] =
{
{ "306x306", "A6", 1024, 1376},
{ "153x153", "A6", 512, 688},
{ "306x306", "Custom", 1024, 1376},
- { "153x153", "Custom", 1024, 1376},
+ { "153x153", "Custom", 512, 688},
};
-static const olymp_printsize_list_t p300_printsize_list =
-{
- p300_printsize, sizeof(p300_printsize) / sizeof(olymp_printsize_t)
-};
+LIST(dyesub_printsize_list_t, p300_printsize_list, dyesub_printsize_t, p300_printsize);
static void p300_printer_init_func(stp_vars_t *v)
{
@@ -374,7 +374,7 @@ static void p300_plane_end_func(stp_vars_t *v)
{
const char *c = "CMY";
stp_zprintf(v, "\033\033\033P%cS", c[privdata.plane-1]);
- stp_deprintf(STP_DBG_OLYMPUS, "olympus: p300_plane_end_func: %c\n",
+ stp_deprintf(STP_DBG_DYESUB, "dyesub: p300_plane_end_func: %c\n",
c[privdata.plane-1]);
}
@@ -387,7 +387,7 @@ static void p300_block_init_func(stp_vars_t *v)
stp_put16_be(privdata.block_max_y, v);
stp_put16_be(privdata.block_max_x, v);
- stp_deprintf(STP_DBG_OLYMPUS, "olympus: p300_block_init_func: %d-%dx%d-%d\n",
+ stp_deprintf(STP_DBG_DYESUB, "dyesub: p300_block_init_func: %d-%dx%d-%d\n",
privdata.block_min_x, privdata.block_max_x,
privdata.block_min_y, privdata.block_max_y);
}
@@ -433,30 +433,24 @@ static const char p300_adj_yellow[] =
/* Olympus P-400 series */
-static const olymp_resolution_t res_314dpi[] =
+static const dyesub_resolution_t res_314dpi[] =
{
{ "314x314", 314, 314},
};
-static const olymp_resolution_list_t res_314dpi_list =
-{
- res_314dpi, sizeof(res_314dpi) / sizeof(olymp_resolution_t)
-};
+LIST(dyesub_resolution_list_t, res_314dpi_list, dyesub_resolution_t, res_314dpi);
-static const olymp_pagesize_t p400_page[] =
+static const dyesub_pagesize_t p400_page[] =
{
- { "A4", NULL, -1, -1, 22, 22, 54, 54},
- { "c8x10", "A5 wide", -1, -1, 58, 59, 84, 85},
- { "C6", "2 Postcards (A4)", -1, -1, 9, 9, 9, 9},
- { "Custom", NULL, -1, -1, 22, 22, 54, 54},
+ { "A4", NULL, -1, -1, 22, 22, 54, 54, DYESUB_PORTRAIT},
+ { "c8x10", "A5 wide", -1, -1, 58, 59, 84, 85, DYESUB_PORTRAIT},
+ { "C6", "2 Postcards (A4)", -1, -1, 9, 9, 9, 9, DYESUB_PORTRAIT},
+ { "Custom", NULL, -1, -1, 22, 22, 54, 54, DYESUB_PORTRAIT},
};
-static const olymp_pagesize_list_t p400_page_list =
-{
- p400_page, sizeof(p400_page) / sizeof(olymp_pagesize_t)
-};
+LIST(dyesub_pagesize_list_t, p400_page_list, dyesub_pagesize_t, p400_page);
-static const olymp_printsize_t p400_printsize[] =
+static const dyesub_printsize_t p400_printsize[] =
{
{ "314x314", "A4", 2400, 3200},
{ "314x314", "c8x10", 2000, 2400},
@@ -464,20 +458,17 @@ static const olymp_printsize_t p400_printsize[] =
{ "314x314", "Custom", 2400, 3200},
};
-static const olymp_printsize_list_t p400_printsize_list =
-{
- p400_printsize, sizeof(p400_printsize) / sizeof(olymp_printsize_t)
-};
+LIST(dyesub_printsize_list_t, p400_printsize_list, dyesub_printsize_t, p400_printsize);
static void p400_printer_init_func(stp_vars_t *v)
{
int wide = (strcmp(privdata.pagesize, "c8x10") == 0
|| strcmp(privdata.pagesize, "C6") == 0);
- stp_zprintf(v, "\033ZQ"); stp_zfwrite(zero, 1, 61, v);
- stp_zprintf(v, "\033FP"); stp_zfwrite(zero, 1, 61, v);
+ stp_zprintf(v, "\033ZQ"); dyesub_nputc(v, '\0', 61);
+ stp_zprintf(v, "\033FP"); dyesub_nputc(v, '\0', 61);
stp_zprintf(v, "\033ZF");
- stp_putc((wide ? '\x40' : '\x00'), v); stp_zfwrite(zero, 1, 60, v);
+ stp_putc((wide ? '\x40' : '\x00'), v); dyesub_nputc(v, '\0', 60);
stp_zprintf(v, "\033ZS");
if (wide)
{
@@ -489,18 +480,18 @@ static void p400_printer_init_func(stp_vars_t *v)
stp_put16_be(privdata.xsize, v);
stp_put16_be(privdata.ysize, v);
}
- stp_zfwrite(zero, 1, 57, v);
- stp_zprintf(v, "\033ZP"); stp_zfwrite(zero, 1, 61, v);
+ dyesub_nputc(v, '\0', 57);
+ stp_zprintf(v, "\033ZP"); dyesub_nputc(v, '\0', 61);
}
static void p400_plane_init_func(stp_vars_t *v)
{
- stp_zprintf(v, "\033ZC"); stp_zfwrite(zero, 1, 61, v);
+ stp_zprintf(v, "\033ZC"); dyesub_nputc(v, '\0', 61);
}
static void p400_plane_end_func(stp_vars_t *v)
{
- stp_zprintf(v, "\033P"); stp_zfwrite(zero, 1, 62, v);
+ stp_zprintf(v, "\033P"); dyesub_nputc(v, '\0', 62);
}
static void p400_block_init_func(stp_vars_t *v)
@@ -523,7 +514,7 @@ static void p400_block_init_func(stp_vars_t *v)
stp_put16_be(privdata.block_max_x - privdata.block_min_x + 1, v);
stp_put16_be(privdata.block_max_y - privdata.block_min_y + 1, v);
}
- stp_zfwrite(zero, 1, 53, v);
+ dyesub_nputc(v, '\0', 53);
}
static const char p400_adj_cyan[] =
@@ -567,21 +558,19 @@ static const char p400_adj_yellow[] =
/* Olympus P-440 series */
-static const olymp_pagesize_t p440_page[] =
+/* FIXME: colors - BGR instead of RGB ?!? */
+static const dyesub_pagesize_t p440_page[] =
{
- { "A4", NULL, -1, -1, 10, 9, 54, 54},
- { "c8x10", "A5 wide", -1, -1, 58, 59, 72, 72},
- { "C6", "2 Postcards (A4)", -1, -1, 9, 9, 9, 9},
- { "w255h581", "A6 wide", -1, -1, 25, 25, 25, 24},
- { "Custom", NULL, -1, -1, 22, 22, 54, 54},
+ { "A4", NULL, -1, -1, 10, 9, 54, 54, DYESUB_PORTRAIT},
+ { "c8x10", "A5 wide", -1, -1, 58, 59, 72, 72, DYESUB_PORTRAIT},
+ { "C6", "2 Postcards (A4)", -1, -1, 9, 9, 9, 9, DYESUB_PORTRAIT},
+ { "w255h581", "A6 wide", -1, -1, 25, 25, 25, 24, DYESUB_PORTRAIT},
+ { "Custom", NULL, -1, -1, 22, 22, 54, 54, DYESUB_PORTRAIT},
};
-static const olymp_pagesize_list_t p440_page_list =
-{
- p440_page, sizeof(p440_page) / sizeof(olymp_pagesize_t)
-};
+LIST(dyesub_pagesize_list_t, p440_page_list, dyesub_pagesize_t, p440_page);
-static const olymp_printsize_t p440_printsize[] =
+static const dyesub_printsize_t p440_printsize[] =
{
{ "314x314", "A4", 2508, 3200},
{ "314x314", "c8x10", 2000, 2508},
@@ -590,25 +579,22 @@ static const olymp_printsize_t p440_printsize[] =
{ "314x314", "Custom", 2508, 3200},
};
-static const olymp_printsize_list_t p440_printsize_list =
-{
- p440_printsize, sizeof(p440_printsize) / sizeof(olymp_printsize_t)
-};
+LIST(dyesub_printsize_list_t, p440_printsize_list, dyesub_printsize_t, p440_printsize);
static void p440_printer_init_func(stp_vars_t *v)
{
int wide = ! (strcmp(privdata.pagesize, "A4") == 0
|| strcmp(privdata.pagesize, "Custom") == 0);
- stp_zprintf(v, "\033FP"); stp_zfwrite(zero, 1, 61, v);
+ stp_zprintf(v, "\033FP"); dyesub_nputc(v, '\0', 61);
stp_zprintf(v, "\033Y");
stp_zfwrite((privdata.laminate->seq).data, 1,
(privdata.laminate->seq).bytes, v); /* laminate */
- stp_zfwrite(zero, 1, 61, v);
- stp_zprintf(v, "\033FC"); stp_zfwrite(zero, 1, 61, v);
+ dyesub_nputc(v, '\0', 61);
+ stp_zprintf(v, "\033FC"); dyesub_nputc(v, '\0', 61);
stp_zprintf(v, "\033ZF");
- stp_putc((wide ? '\x40' : '\x00'), v); stp_zfwrite(zero, 1, 60, v);
- stp_zprintf(v, "\033N\1"); stp_zfwrite(zero, 1, 61, v);
+ stp_putc((wide ? '\x40' : '\x00'), v); dyesub_nputc(v, '\0', 60);
+ stp_zprintf(v, "\033N\1"); dyesub_nputc(v, '\0', 61);
stp_zprintf(v, "\033ZS");
if (wide)
{
@@ -620,16 +606,16 @@ static void p440_printer_init_func(stp_vars_t *v)
stp_put16_be(privdata.xsize, v);
stp_put16_be(privdata.ysize, v);
}
- stp_zfwrite(zero, 1, 57, v);
+ dyesub_nputc(v, '\0', 57);
if (strcmp(privdata.pagesize, "C6") == 0)
{
- stp_zprintf(v, "\033ZC"); stp_zfwrite(zero, 1, 61, v);
+ stp_zprintf(v, "\033ZC"); dyesub_nputc(v, '\0', 61);
}
}
static void p440_printer_end_func(stp_vars_t *v)
{
- stp_zprintf(v, "\033P"); stp_zfwrite(zero, 1, 62, v);
+ stp_zprintf(v, "\033P"); dyesub_nputc(v, '\0', 62);
}
static void p440_block_init_func(stp_vars_t *v)
@@ -652,61 +638,145 @@ static void p440_block_init_func(stp_vars_t *v)
stp_put16_be(privdata.block_max_x - privdata.block_min_x + 1, v);
stp_put16_be(privdata.block_max_y - privdata.block_min_y + 1, v);
}
- stp_zfwrite(zero, 1, 53, v);
+ dyesub_nputc(v, '\0', 53);
}
static void p440_block_end_func(stp_vars_t *v)
{
int pad = (64 - (((privdata.block_max_x - privdata.block_min_x + 1)
* (privdata.block_max_y - privdata.block_min_y + 1) * 3) % 64)) % 64;
- stp_deprintf(STP_DBG_OLYMPUS,
- "olympus: max_x %d min_x %d max_y %d min_y %d\n",
+ stp_deprintf(STP_DBG_DYESUB,
+ "dyesub: max_x %d min_x %d max_y %d min_y %d\n",
privdata.block_max_x, privdata.block_min_x,
privdata.block_max_y, privdata.block_min_y);
- stp_deprintf(STP_DBG_OLYMPUS, "olympus: olympus-p440 padding=%d\n", pad);
- stp_zfwrite(zero, 1, pad, v);
+ stp_deprintf(STP_DBG_DYESUB, "dyesub: olympus-p440 padding=%d\n", pad);
+ dyesub_nputc(v, '\0', pad);
}
-/* Canon CP-100 series */
-static const olymp_pagesize_t cpx00_page[] =
+/* Olympus P-S100 */
+/* FIXME: colors - BGR instead of RGB ?!? */
+static const dyesub_pagesize_t ps100_page[] =
{
- { "Postcard", "Postcard 148x100mm", -1, -1, 13, 13, 16, 18},
- { "w253h337", "CP_L 89x119mm", -1, -1, 13, 13, 15, 15},
- { "w244h155", "Card 54x86mm", -1, -1, 15, 15, 13, 13},
- { "Custom", NULL, -1, -1, 13, 13, 16, 18},
+ { "w288h432", "4 x 6", 296, 426, 0, 0, 0, 0, DYESUB_PORTRAIT},/* 4x6" */
+ { "B7", "3.5 x 5", 264, 366, 0, 0, 0, 0, DYESUB_PORTRAIT}, /* 3.5x5" */
+ { "Custom", NULL, 296, 426, 0, 0, 0, 0, DYESUB_PORTRAIT},
};
-static const olymp_pagesize_list_t cpx00_page_list =
+LIST(dyesub_pagesize_list_t, ps100_page_list, dyesub_pagesize_t, ps100_page);
+
+static const dyesub_printsize_t ps100_printsize[] =
{
- cpx00_page, sizeof(cpx00_page) / sizeof(olymp_pagesize_t)
+ { "306x306", "w288h432", 1254, 1808},
+ { "306x306", "B7", 1120, 1554},
+ { "306x306", "Custom", 1254, 1808},
};
-static const olymp_printsize_t cpx00_printsize[] =
+LIST(dyesub_printsize_list_t, ps100_printsize_list, dyesub_printsize_t, ps100_printsize);
+
+static void ps100_printer_init_func(stp_vars_t *v)
{
- { "314x314", "Postcard", 1232, 1808},
- { "314x314", "w253h337", 1100, 1456},
- { "314x314", "w244h155", 1040, 672},
- { "314x314", "Custom", 1232, 1808},
+ stp_zprintf(v, "\033U"); dyesub_nputc(v, '\0', 62);
+
+ /* stp_zprintf(v, "\033ZC"); dyesub_nputc(v, '\0', 61); */
+
+ stp_zprintf(v, "\033W"); dyesub_nputc(v, '\0', 62);
+
+ stp_zfwrite("\x30\x2e\x00\xa2\x00\xa0\x00\xa0", 1, 8, v);
+ stp_put16_be(privdata.ysize, v); /* paper height (px) */
+ stp_put16_be(privdata.xsize, v); /* paper width (px) */
+ dyesub_nputc(v, '\0', 3);
+ stp_putc('\1', v); /* number of copies */
+ dyesub_nputc(v, '\0', 8);
+ stp_putc('\1', v);
+ dyesub_nputc(v, '\0', 15);
+ stp_putc('\6', v);
+ dyesub_nputc(v, '\0', 23);
+
+ stp_zfwrite("\033ZT\0", 1, 4, v);
+ stp_put16_be(0, v); /* image width offset (px) */
+ stp_put16_be(0, v); /* image height offset (px) */
+ stp_put16_be(privdata.xsize, v); /* image width (px) */
+ stp_put16_be(privdata.ysize, v); /* image height (px) */
+ dyesub_nputc(v, '\0', 52);
+}
+
+static void ps100_printer_end_func(stp_vars_t *v)
+{
+ int pad = (64 - (((privdata.block_max_x - privdata.block_min_x + 1)
+ * (privdata.block_max_y - privdata.block_min_y + 1) * 3) % 64)) % 64;
+ stp_deprintf(STP_DBG_DYESUB,
+ "dyesub: max_x %d min_x %d max_y %d min_y %d\n",
+ privdata.block_max_x, privdata.block_min_x,
+ privdata.block_max_y, privdata.block_min_y);
+ stp_deprintf(STP_DBG_DYESUB, "dyesub: olympus-ps100 padding=%d\n", pad);
+ dyesub_nputc(v, '\0', pad); /* padding to 64B blocks */
+
+ stp_zprintf(v, "\033PY"); dyesub_nputc(v, '\0', 61);
+ stp_zprintf(v, "\033u"); dyesub_nputc(v, '\0', 62);
+}
+
+
+/* Canon CP-10 */
+static const dyesub_resolution_t res_300dpi[] =
+{
+ { "300x300", 300, 300},
+};
+
+LIST(dyesub_resolution_list_t, res_300dpi_list, dyesub_resolution_t, res_300dpi);
+
+static const dyesub_pagesize_t cp10_page[] =
+{
+ { "w155h244", "Card 54x86mm", 159, 250, 6, 6, 29, 29, DYESUB_PORTRAIT},
+ { "Custom", NULL, -1, -1, 6, 6, 29, 29, DYESUB_PORTRAIT},
};
-static const olymp_printsize_list_t cpx00_printsize_list =
+LIST(dyesub_pagesize_list_t, cp10_page_list, dyesub_pagesize_t, cp10_page);
+
+static const dyesub_printsize_t cp10_printsize[] =
+{
+ { "300x300", "w155h244", 662, 1040},
+ { "300x300", "Custom", 662, 1040},
+};
+
+LIST(dyesub_printsize_list_t, cp10_printsize_list, dyesub_printsize_t, cp10_printsize);
+
+
+/* Canon CP-100 series */
+static const dyesub_pagesize_t cpx00_page[] =
+{
+ { "Postcard", "Postcard 100x148mm", 296, 434, 13, 13, 16, 19, DYESUB_PORTRAIT},
+ { "w253h337", "CP_L 89x119mm", 264, 350, 13, 13, 15, 15, DYESUB_PORTRAIT},
+ { "w155h244", "Card 54x86mm", 162, 250, 13, 13, 15, 15, DYESUB_LANDSCAPE},
+ { "Custom", NULL, 296, 434, 13, 13, 16, 19, DYESUB_PORTRAIT},
+};
+
+LIST(dyesub_pagesize_list_t, cpx00_page_list, dyesub_pagesize_t, cpx00_page);
+
+static const dyesub_printsize_t cpx00_printsize[] =
{
- cpx00_printsize, sizeof(cpx00_printsize) / sizeof(olymp_printsize_t)
+ { "300x300", "Postcard", 1232, 1808},
+ { "300x300", "w253h337", 1100, 1456},
+ { "300x300", "w155h244", 672, 1040},
+ { "300x300", "Custom", 1232, 1808},
};
+LIST(dyesub_printsize_list_t, cpx00_printsize_list, dyesub_printsize_t, cpx00_printsize);
+
static void cpx00_printer_init_func(stp_vars_t *v)
{
char pg = (strcmp(privdata.pagesize, "Postcard") == 0 ? '\1' :
(strcmp(privdata.pagesize, "w253h337") == 0 ? '\2' :
- (strcmp(privdata.pagesize, "w244h155") == 0 ? '\3' :
+ (strcmp(privdata.pagesize, "w155h244") == 0 ?
+ (strcmp(stp_get_driver(v),"canon-cp10") == 0 ?
+ '\0' : '\3' ) :
(strcmp(privdata.pagesize, "w283h566") == 0 ? '\4' :
'\1' ))));
stp_put16_be(0x4000, v);
stp_putc('\0', v);
stp_putc(pg, v);
- stp_zfwrite(zero, 1, 8, v);
+ dyesub_nputc(v, '\0', 8);
}
static void cpx00_plane_init_func(stp_vars_t *v)
@@ -714,7 +784,7 @@ static void cpx00_plane_init_func(stp_vars_t *v)
stp_put16_be(0x4001, v);
stp_put16_le(3 - privdata.plane, v);
stp_put32_le(privdata.xsize * privdata.ysize, v);
- stp_zfwrite(zero, 1, 4, v);
+ dyesub_nputc(v, '\0', 4);
}
static const char cpx00_adj_cyan[] =
@@ -758,79 +828,139 @@ static const char cpx00_adj_yellow[] =
/* Canon CP-220 series */
-static const olymp_pagesize_t cp220_page[] =
+static const dyesub_pagesize_t cp220_page[] =
{
- { "Postcard", "Postcard 148x100mm", -1, -1, 13, 13, 16, 18},
- { "w253h337", "CP_L 89x119mm", -1, -1, 13, 13, 15, 15},
- { "w244h155", "Card 54x86mm", -1, -1, 15, 15, 13, 13},
- { "w283h566", "Wide 200x100mm", -1, -1, 13, 13, 20, 20},
- { "Custom", NULL, -1, -1, 13, 13, 16, 18},
+ { "Postcard", "Postcard 100x148mm", 296, 434, 13, 13, 16, 19, DYESUB_PORTRAIT},
+ { "w253h337", "CP_L 89x119mm", 264, 350, 13, 13, 15, 15, DYESUB_PORTRAIT},
+ { "w155h244", "Card 54x86mm", 162, 250, 13, 13, 15, 15, DYESUB_LANDSCAPE},
+ { "w283h566", "Wide 100x200mm", 296, 580, 13, 13, 20, 20, DYESUB_PORTRAIT},
+ { "Custom", NULL, 296, 434, 13, 13, 16, 19, DYESUB_PORTRAIT},
};
-static const olymp_pagesize_list_t cp220_page_list =
+LIST(dyesub_pagesize_list_t, cp220_page_list, dyesub_pagesize_t, cp220_page);
+
+static const dyesub_printsize_t cp220_printsize[] =
{
- cp220_page, sizeof(cp220_page) / sizeof(olymp_pagesize_t)
+ { "300x300", "Postcard", 1232, 1808},
+ { "300x300", "w253h337", 1100, 1456},
+ { "300x300", "w155h244", 672, 1040},
+ { "300x300", "w283h566", 1232, 2416},
+ { "300x300", "Custom", 1232, 1808},
};
-static const olymp_printsize_t cp220_printsize[] =
+LIST(dyesub_printsize_list_t, cp220_printsize_list, dyesub_printsize_t, cp220_printsize);
+
+
+/* Sony DPP-EX5, DPP-EX7 */
+static const dyesub_resolution_t res_403dpi[] =
{
- { "314x314", "Postcard", 1232, 1808},
- { "314x314", "w253h337", 1100, 1456},
- { "314x314", "w244h155", 1040, 672},
- { "314x314", "w283h566", 1232, 2416},
- { "314x314", "Custom", 1232, 1808},
+ { "403x403", 403, 403},
};
-static const olymp_printsize_list_t cp220_printsize_list =
+LIST(dyesub_resolution_list_t, res_403dpi_list, dyesub_resolution_t, res_403dpi);
+
+/* only Postcard pagesize is supported */
+static const dyesub_pagesize_t dppex5_page[] =
{
- cp220_printsize, sizeof(cp220_printsize) / sizeof(olymp_printsize_t)
+ { "w288h432", "Postcard", PT(1664,403)+1, PT(2466,403)+1, 13, 14, 18, 17,
+ DYESUB_PORTRAIT},
+ { "Custom", NULL, PT(1664,403)+1, PT(2466,403)+1, 13, 14, 18, 17,
+ DYESUB_PORTRAIT},
};
+LIST(dyesub_pagesize_list_t, dppex5_page_list, dyesub_pagesize_t, dppex5_page);
-/* Sony UP-DP10 */
-static const olymp_resolution_t updp10_res[] =
+static const dyesub_printsize_t dppex5_printsize[] =
{
- { "300x300", 300, 300},
+ { "403x403", "w288h432", 1664, 2466},
+ { "403x403", "Custom", 1664, 2466},
};
-static const olymp_resolution_list_t updp10_res_list =
+LIST(dyesub_printsize_list_t, dppex5_printsize_list, dyesub_printsize_t, dppex5_printsize);
+
+static void dppex5_printer_init(stp_vars_t *v)
{
- updp10_res, sizeof(updp10_res) / sizeof(olymp_resolution_t)
-};
+ stp_zfwrite("DPEX\0\0\0\x80", 1, 8, v);
+ stp_zfwrite("DPEX\0\0\0\x82", 1, 8, v);
+ stp_zfwrite("DPEX\0\0\0\x84", 1, 8, v);
+ stp_put32_be(privdata.xsize, v);
+ stp_put32_be(privdata.ysize, v);
+ stp_zfwrite("S\0o\0n\0y\0 \0D\0P\0P\0-\0E\0X\0\x35\0", 1, 24, v);
+ dyesub_nputc(v, '\0', 40);
+ stp_zfwrite("\1\4\0\4\xdc\0\x24\0\3\3\1\0\1\0\x82\0", 1, 16, v);
+ stp_zfwrite("\xf4\5\xf8\3\x64\0\1\0\x0e\0\x93\1\2\0\1\0", 1, 16, v);
+ stp_zfwrite("\x93\1\1\0\0\0", 1, 6, v);
+ stp_zfwrite("P\0o\0s\0t\0 \0c\0a\0r\0d\0", 1, 18, v);
+ dyesub_nputc(v, '\0', 46);
+ stp_zfwrite("\x93\1\x18", 1, 3, v);
+ dyesub_nputc(v, '\0', 19);
+ stp_zfwrite("\2\0\0\0\3\0\0\0\1\0\0\0\1", 1, 13, v);
+ dyesub_nputc(v, '\0', 19);
+ stp_zprintf(v, "5EPD");
+ dyesub_nputc(v, '\0', 4);
+ stp_zfwrite((privdata.laminate->seq).data, 1,
+ (privdata.laminate->seq).bytes, v); /*laminate pattern*/
+ stp_zfwrite("\0d\0d\0d", 1, 6, v);
+ dyesub_nputc(v, '\0', 21);
+}
+
+static void dppex5_block_init(stp_vars_t *v)
+{
+ stp_zfwrite("DPEX\0\0\0\x85", 1, 8, v);
+ stp_put32_be((privdata.block_max_x - privdata.block_min_x + 1)
+ * (privdata.block_max_y - privdata.block_min_y + 1) * 3, v);
+}
-static const olymp_pagesize_t updp10_page[] =
+static void dppex5_printer_end(stp_vars_t *v)
{
- { "w288h432", "UPC-10P23 (2:3)", -1, -1, 12, 12, 18, 18},
- { "w288h387", "UPC-10P34 (3:4)", -1, -1, 12, 12, 16, 16},
- { "w288h432", "UPC-10S01 (Sticker)", -1, -1, 12, 12, 18, 18},
- { "Custom", NULL, -1, -1, 12, 12, 0, 0},
+ stp_zfwrite("DPEX\0\0\0\x83", 1, 8, v);
+ stp_zfwrite("DPEX\0\0\0\x81", 1, 8, v);
+}
+
+static const laminate_t dppex5_laminate[] =
+{
+ {"Glossy", N_("Glossy"), {1, "\x00"}},
+ {"Texture", N_("Texture"), {1, "\x01"}},
};
-static const olymp_pagesize_list_t updp10_page_list =
+LIST(laminate_list_t, dppex5_laminate_list, laminate_t, dppex5_laminate);
+
+
+/* Sony UP-DP10 */
+static const dyesub_pagesize_t updp10_page[] =
{
- updp10_page, sizeof(updp10_page) / sizeof(olymp_pagesize_t)
+ { "w288h432", "UPC-10P23 (2:3)", -1, -1, 12, 12, 18, 18, DYESUB_LANDSCAPE},
+ { "w288h387", "UPC-10P34 (3:4)", -1, 384, 12, 12, 16, 16, DYESUB_LANDSCAPE},
+ { "w288h432", "UPC-10S01 (Sticker)", -1, -1, 12, 12, 18, 18, DYESUB_LANDSCAPE},
+ { "Custom", NULL, -1, -1, 12, 12, 0, 0, DYESUB_LANDSCAPE},
};
-static const olymp_printsize_t updp10_printsize[] =
+LIST(dyesub_pagesize_list_t, updp10_page_list, dyesub_pagesize_t, updp10_page);
+
+static const dyesub_printsize_t updp10_printsize[] =
{
{ "300x300", "w288h432", 1200, 1800},
{ "300x300", "w288h387", 1200, 1600},
{ "300x300", "Custom", 1200, 1800},
};
-static const olymp_printsize_list_t updp10_printsize_list =
-{
- updp10_printsize, sizeof(updp10_printsize) / sizeof(olymp_printsize_t)
-};
+LIST(dyesub_printsize_list_t, updp10_printsize_list, dyesub_printsize_t, updp10_printsize);
static void updp10_printer_init_func(stp_vars_t *v)
{
stp_zfwrite("\x98\xff\xff\xff\xff\xff\xff\xff"
- "\x14\x00\x00\x00\x1b\x15\x00\x00"
- "\x00\x0d\x00\x00\x00\x00\x00\xc7"
- "\x00\x00\x00\x00", 1, 28, v);
+ "\x09\x00\x00\x00\x1b\xee\x00\x00"
+ "\x00\x04", 1, 34, v);
+ stp_zfwrite((privdata.laminate->seq).data, 1,
+ (privdata.laminate->seq).bytes, v); /*laminate pattern*/
+ stp_zfwrite("\x00\x00\x00\x00", 1, 4, v);
+ stp_put16_be(privdata.ysize, v);
stp_put16_be(privdata.xsize, v);
+ stp_zfwrite("\x14\x00\x00\x00\x1b\x15\x00\x00"
+ "\x00\x0d\x00\x00\x00\x00\x00\x07"
+ "\x00\x00\x00\x00", 1, 20, v);
stp_put16_be(privdata.ysize, v);
+ stp_put16_be(privdata.xsize, v);
stp_put32_le(privdata.xsize*privdata.ysize*3+11, v);
stp_zfwrite("\x1b\xea\x00\x00\x00\x00", 1, 6, v);
stp_put32_be(privdata.xsize*privdata.ysize*3, v);
@@ -839,19 +969,10 @@ static void updp10_printer_init_func(stp_vars_t *v)
static void updp10_printer_end_func(stp_vars_t *v)
{
- stp_zfwrite("\x12\x00\x00\x00\x1b\xe1\x00\x00"
- "\x00\xb0\x00\x00\04", 1, 13, v);
- stp_zfwrite((privdata.laminate->seq).data, 1,
- (privdata.laminate->seq).bytes, v); /*laminate pattern*/
- stp_zfwrite("\x00\x00\x00\x00" , 1, 4, v);
- stp_put16_be(privdata.ysize, v);
- stp_put16_be(privdata.xsize, v);
- stp_zfwrite("\xff\xff\xff\xff\x09\x00\x00\x00"
- "\x1b\xee\x00\x00\x00\x02\x00\x00"
- "\x01\x07\x00\x00\x00\x1b\x0a\x00"
- "\x00\x00\x00\x00\xfd\xff\xff\xff"
- "\xff\xff\xff\xff\xf8\xff\xff\xff"
- , 1, 40, v);
+ stp_zfwrite("\xff\xff\xff\xff\x07\x00\x00\x00"
+ "\x1b\x0a\x00\x00\x00\x00\x00\xfd"
+ "\xff\xff\xff\xff\xff\xff\xff"
+ , 1, 23, v);
}
static const laminate_t updp10_laminate[] =
@@ -861,10 +982,7 @@ static const laminate_t updp10_laminate[] =
{"Matte", N_("Matte"), {1, "\x0c"}},
};
-static const laminate_list_t updp10_laminate_list =
-{
- updp10_laminate, sizeof(updp10_laminate) / sizeof(laminate_t)
-};
+LIST(laminate_list_t, updp10_laminate_list, laminate_t, updp10_laminate);
static const char updp10_adj_cyan[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@@ -909,45 +1027,94 @@ static const char updp10_adj_yellow[] =
"</gutenprint>\n";
-/* Sony UP-DR150 */
-static const olymp_resolution_t updr150_res[] =
+/* Sony UP-DR100 */
+static const dyesub_pagesize_t updr100_page[] =
{
- { "346x346", 346, 346},
+ { "w288h432", "4x6", 298, 442, 0, 0, 0, 0, DYESUB_LANDSCAPE},
+ { "B7", "3.5x5", 261, 369, 0, 0, 0, 0, DYESUB_LANDSCAPE},
+ { "w360h504", "5x7", 369, 514, 0, 0, 0, 0, DYESUB_PORTRAIT},
+ { "w432h576", "6x8", 442, 588, 0, 0, 0, 0, DYESUB_PORTRAIT},
+ { "Custom", NULL, 298, 442, 0, 0, 0, 0, DYESUB_LANDSCAPE},
};
-static const olymp_resolution_list_t updr150_res_list =
+LIST(dyesub_pagesize_list_t, updr100_page_list, dyesub_pagesize_t, updr100_page);
+
+static const dyesub_printsize_t updr100_printsize[] =
{
- updr150_res, sizeof(updr150_res) / sizeof(olymp_resolution_t)
+ { "334x334", "w288h432", 1382, 2048},
+ { "334x334", "B7", 1210, 1710},
+ { "334x334", "w360h504", 1710, 2380},
+ { "334x334", "w432h576", 2048, 2724},
+ { "334x334", "Custom", 1382, 2048},
};
-static const olymp_pagesize_t updr150_page[] =
+LIST(dyesub_printsize_list_t, updr100_printsize_list, dyesub_printsize_t, updr100_printsize);
+
+static void updr100_printer_init_func(stp_vars_t *v)
+{
+
+ stp_zfwrite("UPD8D\x00\x00\x00\x10\x03\x00\x00", 1, 12, v);
+ stp_put32_le(privdata.xsize, v);
+ stp_put32_le(privdata.ysize, v);
+ stp_zfwrite("\x1e\x00\x03\x00\x01\x00\x4e\x01\x00\x00", 1, 10, v);
+ stp_zfwrite((privdata.laminate->seq).data, 1,
+ (privdata.laminate->seq).bytes, v); /* laminate pattern */
+ dyesub_nputc(v, '\0', 13);
+ stp_zfwrite("\x01\x00\x01\x00\x03", 1, 5, v);
+ dyesub_nputc(v, '\0', 19);
+}
+
+static void updr100_printer_end_func(stp_vars_t *v)
+{
+ stp_zfwrite("UPD8D\x00\x00\x00\x02", 1, 9, v);
+ dyesub_nputc(v, '\0', 25);
+ stp_zfwrite("\x9d\x02\x00\x04\x00\x00\xc0\xe7"
+ "\x9d\x02\x54\xe9\x9d\x02\x9d\x71"
+ "\x00\x73\xfa\x71\x00\x73\xf4\xea"
+ "\x9d\x02\xa8\x3e\x00\x73\x9c\xeb\x9d\x02"
+ , 1, 34, v);
+}
+
+static const laminate_t updr100_laminate[] =
{
- { "w288h432", "2UPC-153 (4x6)", -1, -1, 0, 0, 3, 2},
- { "B7", "2UPC-154 (3.5x5)", -1, -1, 3, 2, 0, 0},
- { "w360h504", "2UPC-155 (5x7)", -1, -1, 0, 0, 4, 4},
- { "w432h576", "2UPC-156 (6x8)", -1, -1, 3, 2, 5, 4},
- { "Custom", NULL, -1, -1, 0, 0, 3, 2},
+ {"Glossy", N_("Glossy"), {1, "\x01"}},
+ {"Texture", N_("Texture"), {1, "\x03"}},
+ {"Matte", N_("Matte"), {1, "\x04"}},
};
-static const olymp_pagesize_list_t updr150_page_list =
+LIST(laminate_list_t, updr100_laminate_list, laminate_t, updr100_laminate);
+
+
+/* Sony UP-DR150 */
+static const dyesub_resolution_t res_334dpi[] =
{
- updr150_page, sizeof(updr150_page) / sizeof(olymp_pagesize_t)
+ { "334x334", 334, 334},
};
-static const olymp_printsize_t updr150_printsize[] =
+LIST(dyesub_resolution_list_t, res_334dpi_list, dyesub_resolution_t, res_334dpi);
+
+static const dyesub_pagesize_t updr150_page[] =
{
- { "346x346", "w288h432", 1382, 2048},
- { "346x346", "B7", 1210, 1728},
- { "346x346", "w360h504", 1728, 2380},
- { "346x346", "w432h576", 2048, 2724},
- { "346x346", "Custom", 1382, 2048},
+ { "w288h432", "2UPC-153 (4x6)", 298, 442, 0, 0, 0, 0, DYESUB_LANDSCAPE},
+ { "B7", "2UPC-154 (3.5x5)", 261, 373, 0, 0, 0, 0, DYESUB_LANDSCAPE},
+ { "w360h504", "2UPC-155 (5x7)", 373, 514, 0, 0, 0, 0, DYESUB_PORTRAIT},
+ { "w432h576", "2UPC-156 (6x8)", 442, 588, 0, 0, 0, 0, DYESUB_PORTRAIT},
+ { "Custom", NULL, 298, 442, 0, 0, 0, 0, DYESUB_LANDSCAPE},
};
-static const olymp_printsize_list_t updr150_printsize_list =
+LIST(dyesub_pagesize_list_t, updr150_page_list, dyesub_pagesize_t, updr150_page);
+
+static const dyesub_printsize_t updr150_printsize[] =
{
- updr150_printsize, sizeof(updr150_printsize) / sizeof(olymp_printsize_t)
+ { "334x334", "w288h432", 1382, 2048},
+ { "334x334", "B7", 1210, 1728},
+ { "334x334", "w360h504", 1728, 2380},
+ { "334x334", "w432h576", 2048, 2724},
+ { "334x334", "Custom", 1382, 2048},
};
+LIST(dyesub_printsize_list_t, updr150_printsize_list, dyesub_printsize_t, updr150_printsize);
+
static void updr150_printer_init_func(stp_vars_t *v)
{
char pg = '\0';
@@ -975,14 +1142,14 @@ static void updr150_printer_init_func(stp_vars_t *v)
"\x1b\x15\x00\x00\x00\x0d\x00\x0d"
"\x00\x00\x00\x00\x00\x00\x00\x07"
"\x00\x00\x00\x00", 1, 91, v);
- stp_put16_be(privdata.xsize, v);
stp_put16_be(privdata.ysize, v);
+ stp_put16_be(privdata.xsize, v);
stp_zfwrite("\xf9\xff\xff\xff\x07\x00\x00\x00"
"\x1b\xe1\x00\x00\x00\x0b\x00\x0b"
"\x00\x00\x00\x00\x80\x00\x00\x00"
"\x00\x00", 1, 26, v);
- stp_put16_be(privdata.xsize, v);
stp_put16_be(privdata.ysize, v);
+ stp_put16_be(privdata.xsize, v);
stp_zfwrite("\xf8\xff\xff\xff\x0b\x00\x00\x00\x1b\xea"
"\x00\x00\x00\x00", 1, 14, v);
stp_put32_be(privdata.xsize*privdata.ysize*3, v);
@@ -1000,50 +1167,35 @@ static void updr150_printer_end_func(stp_vars_t *v)
, 1, 34, v);
}
-/* Fujifilm CX-400 */
-static const olymp_resolution_t cx400_res[] =
-{
- { "317x316", 317, 316},
-};
-
-static const olymp_resolution_list_t cx400_res_list =
-{
- cx400_res, sizeof(cx400_res) / sizeof(olymp_resolution_t)
-};
-static const olymp_pagesize_t cx400_page[] =
+/* Fujifilm CX-400 */
+static const dyesub_pagesize_t cx400_page[] =
{
- { "w288h432", NULL, -1, -1, 23, 23, 28, 28},
- { "w288h387", "4x5 3/8 (Digital Camera 3:4)", -1, -1, 23, 23, 27, 26},
- { "w288h504", NULL, -1, -1, 23, 23, 23, 22},
- { "Custom", NULL, -1, -1, 0, 0, 0, 0},
+ { "w288h432", NULL, 295, 428, 24, 24, 23, 22, DYESUB_PORTRAIT},
+ { "w288h387", "4x5 3/8 (Digital Camera 3:4)", 295, 386, 24, 24, 23, 23, DYESUB_PORTRAIT},
+ { "w288h504", NULL, 295, 513, 24, 24, 23, 22, DYESUB_PORTRAIT},
+ { "Custom", NULL, 295, 428, 0, 0, 0, 0, DYESUB_PORTRAIT},
};
-static const olymp_pagesize_list_t cx400_page_list =
-{
- cx400_page, sizeof(cx400_page) / sizeof(olymp_pagesize_t)
-};
+LIST(dyesub_pagesize_list_t, cx400_page_list, dyesub_pagesize_t, cx400_page);
-static const olymp_printsize_t cx400_printsize[] =
+static const dyesub_printsize_t cx400_printsize[] =
{
- { "317x316", "w288h387", 1268, 1658},
- { "317x316", "w288h432", 1268, 1842},
- { "317x316", "w288h504", 1268, 2208},
- { "317x316", "Custom", 1268, 1842},
+ { "310x310", "w288h387", 1268, 1658},
+ { "310x310", "w288h432", 1268, 1842},
+ { "310x310", "w288h504", 1268, 2208},
+ { "310x310", "Custom", 1268, 1842},
};
-static const olymp_printsize_list_t cx400_printsize_list =
-{
- cx400_printsize, sizeof(cx400_printsize) / sizeof(olymp_printsize_t)
-};
+LIST(dyesub_printsize_list_t, cx400_printsize_list, dyesub_printsize_t, cx400_printsize);
static void cx400_printer_init_func(stp_vars_t *v)
{
char pg = '\0';
const char *pname = "XXXXXX";
- stp_deprintf(STP_DBG_OLYMPUS,
- "olympus: fuji driver %s\n", stp_get_driver(v));
+ stp_deprintf(STP_DBG_DYESUB,
+ "dyesub: fuji driver %s\n", stp_get_driver(v));
if (strcmp(stp_get_driver(v),"fujifilm-cx400") == 0)
pname = "NX1000";
else if (strcmp(stp_get_driver(v),"fujifilm-cx550") == 0)
@@ -1068,33 +1220,94 @@ static void cx400_printer_init_func(stp_vars_t *v)
stp_putc('\1', v);
}
-static const olymp_resolution_t all_resolutions[] =
+
+/* Fujifilm NX-500 */
+static const dyesub_resolution_t res_306dpi[] =
{
{ "306x306", 306, 306},
- { "153x153", 153, 153},
- { "314x314", 314, 314},
- { "300x300", 300, 300},
- { "317x316", 317, 316},
- { "320x320", 320, 320},
- { "346x346", 346, 346},
};
-static const olymp_resolution_list_t all_res_list =
+LIST(dyesub_resolution_list_t, res_306dpi_list, dyesub_resolution_t, res_306dpi);
+
+static const dyesub_pagesize_t nx500_page[] =
+{
+ { "Postcard", NULL, -1, -1, 21, 21, 29, 29, DYESUB_PORTRAIT},
+ { "Custom", NULL, -1, -1, 21, 21, 29, 29, DYESUB_PORTRAIT},
+};
+
+LIST(dyesub_pagesize_list_t, nx500_page_list, dyesub_pagesize_t, nx500_page);
+
+static const dyesub_printsize_t nx500_printsize[] =
+{
+ { "306x306", "Postcard", 1024, 1518},
+ { "306x306", "Custom", 1024, 1518},
+};
+
+LIST(dyesub_printsize_list_t, nx500_printsize_list, dyesub_printsize_t, nx500_printsize);
+
+static void nx500_printer_init_func(stp_vars_t *v)
+{
+ stp_zfwrite("INFO-QX-20--MKS\x00\x00\x00M\x00W\00A\x00R\00E", 1, 27, v);
+ dyesub_nputc(v, '\0', 21);
+ stp_zfwrite("\x80\x00\x02", 1, 3, v);
+ dyesub_nputc(v, '\0', 20);
+ stp_zfwrite("\x02\x01\x01", 1, 3, v);
+ dyesub_nputc(v, '\0', 2);
+ stp_put16_le(privdata.ysize, v);
+ stp_put16_le(privdata.xsize, v);
+ stp_zfwrite("\x00\x02\x00\x70\x2f", 1, 5, v);
+ dyesub_nputc(v, '\0', 43);
+}
+
+
+/* Kodak Easyshare Dock family */
+static const dyesub_pagesize_t kodak_dock_page[] =
+{
+ { "w288h432", NULL, PT(1248,300)+1, PT(1856,300)+1, 0, 0, 0, 0,
+ DYESUB_PORTRAIT}, /* 4x6 */
+ { "Custom", NULL, PT(1248,300)+1, PT(1856,300)+1, 0, 0, 0, 0,
+ DYESUB_PORTRAIT}, /* 4x6 */
+};
+
+LIST(dyesub_pagesize_list_t, kodak_dock_page_list, dyesub_pagesize_t, kodak_dock_page);
+
+static const dyesub_printsize_t kodak_dock_printsize[] =
{
- all_resolutions, sizeof(all_resolutions) / sizeof(olymp_resolution_t)
+ { "300x300", "w288h432", 1248, 1856},
+ { "300x300", "Custom", 1248, 1856},
};
-static const olympus_cap_t olympus_model_capabilities[] =
+LIST(dyesub_printsize_list_t, kodak_dock_printsize_list, dyesub_printsize_t, kodak_dock_printsize);
+
+static void kodak_dock_printer_init(stp_vars_t *v)
+{
+ stp_put16_be(0x3000, v);
+ dyesub_nputc(v, '\0', 10);
+}
+
+static void kodak_dock_plane_init(stp_vars_t *v)
+{
+ stp_put16_be(0x3001, v);
+ stp_put16_le(3 - privdata.plane, v);
+ stp_put32_le(privdata.xsize*privdata.ysize, v);
+ dyesub_nputc(v, '\0', 4);
+}
+
+
+
+/* Model capabilities */
+
+static const dyesub_cap_t dyesub_model_capabilities[] =
{
{ /* Olympus P-10, P-11 */
2,
&rgb_ink_list,
- &res_320dpi_list,
+ &res_310dpi_list,
&p10_page_list,
&p10_printsize_list,
- OLYMPUS_INTERLACE_PLANE,
- 1848,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_FULL_HEIGHT,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_PLANE_INTERLACE,
&p10_printer_init_func, &p10_printer_end_func,
NULL, NULL,
&p10_block_init_func, NULL,
@@ -1107,9 +1320,9 @@ static const olympus_cap_t olympus_model_capabilities[] =
&res_320dpi_list,
&p200_page_list,
&p200_printsize_list,
- OLYMPUS_INTERLACE_PLANE,
- 1280,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_BLOCK_ALIGN,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_BLOCK_ALIGN
+ | DYESUB_FEATURE_PLANE_INTERLACE,
&p200_printer_init_func, &p200_printer_end_func,
&p200_plane_init_func, NULL,
NULL, NULL,
@@ -1122,9 +1335,9 @@ static const olympus_cap_t olympus_model_capabilities[] =
&p300_res_list,
&p300_page_list,
&p300_printsize_list,
- OLYMPUS_INTERLACE_PLANE,
16,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_BLOCK_ALIGN,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_BLOCK_ALIGN
+ | DYESUB_FEATURE_PLANE_INTERLACE,
&p300_printer_init_func, NULL,
NULL, &p300_plane_end_func,
&p300_block_init_func, NULL,
@@ -1137,9 +1350,9 @@ static const olympus_cap_t olympus_model_capabilities[] =
&res_314dpi_list,
&p400_page_list,
&p400_printsize_list,
- OLYMPUS_INTERLACE_PLANE,
180,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_FULL_HEIGHT,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_PLANE_INTERLACE,
&p400_printer_init_func, NULL,
&p400_plane_init_func, &p400_plane_end_func,
&p400_block_init_func, NULL,
@@ -1152,25 +1365,54 @@ static const olympus_cap_t olympus_model_capabilities[] =
&res_314dpi_list,
&p440_page_list,
&p440_printsize_list,
- OLYMPUS_INTERLACE_NONE,
128,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_FULL_HEIGHT,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT,
&p440_printer_init_func, &p440_printer_end_func,
NULL, NULL,
&p440_block_init_func, &p440_block_end_func,
NULL, NULL, NULL, /* color profile/adjustment is built into printer */
&p10_laminate_list,
},
+ { /* Olympus P-S100 */
+ 20,
+ &rgb_ink_list,
+ &res_306dpi_list,
+ &ps100_page_list,
+ &ps100_printsize_list,
+ 1808,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT,
+ &ps100_printer_init_func, &ps100_printer_end_func,
+ NULL, NULL,
+ NULL, NULL,
+ NULL, NULL, NULL, /* color profile/adjustment is built into printer */
+ NULL,
+ },
+ { /* Canon CP-10 */
+ 1002,
+ &ymc_ink_list,
+ &res_300dpi_list,
+ &cp10_page_list,
+ &cp10_printsize_list,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_BORDERLESS | DYESUB_FEATURE_WHITE_BORDER
+ | DYESUB_FEATURE_PLANE_INTERLACE,
+ &cpx00_printer_init_func, NULL,
+ &cpx00_plane_init_func, NULL,
+ NULL, NULL,
+ cpx00_adj_cyan, cpx00_adj_magenta, cpx00_adj_yellow,
+ NULL,
+ },
{ /* Canon CP-100, CP-200, CP-300 */
1000,
&ymc_ink_list,
- &res_314dpi_list,
+ &res_300dpi_list,
&cpx00_page_list,
&cpx00_printsize_list,
- OLYMPUS_INTERLACE_PLANE,
- 1808,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_FULL_HEIGHT
- | OLYMPUS_FEATURE_BORDERLESS | OLYMPUS_FEATURE_WHITE_BORDER,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_BORDERLESS | DYESUB_FEATURE_WHITE_BORDER
+ | DYESUB_FEATURE_PLANE_INTERLACE,
&cpx00_printer_init_func, NULL,
&cpx00_plane_init_func, NULL,
NULL, NULL,
@@ -1181,44 +1423,71 @@ static const olympus_cap_t olympus_model_capabilities[] =
SELPHY CP-600, SELPHY CP-710 */
1001,
&ymc_ink_list,
- &res_314dpi_list,
+ &res_300dpi_list,
&cp220_page_list,
&cp220_printsize_list,
- OLYMPUS_INTERLACE_PLANE,
- 1808,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_FULL_HEIGHT
- | OLYMPUS_FEATURE_BORDERLESS | OLYMPUS_FEATURE_WHITE_BORDER,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_BORDERLESS | DYESUB_FEATURE_WHITE_BORDER
+ | DYESUB_FEATURE_PLANE_INTERLACE,
&cpx00_printer_init_func, NULL,
&cpx00_plane_init_func, NULL,
NULL, NULL,
cpx00_adj_cyan, cpx00_adj_magenta, cpx00_adj_yellow,
NULL,
},
+ { /* Sony DPP-EX5, DPP-EX7 */
+ 2002,
+ &rgb_ink_list,
+ &res_403dpi_list,
+ &dppex5_page_list,
+ &dppex5_printsize_list,
+ 100,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_BORDERLESS,
+ &dppex5_printer_init, &dppex5_printer_end,
+ NULL, NULL,
+ &dppex5_block_init, NULL,
+ NULL, NULL, NULL,
+ &dppex5_laminate_list,
+ },
{ /* Sony UP-DP10 */
2000,
&cmy_ink_list,
- &updp10_res_list,
+ &res_300dpi_list,
&updp10_page_list,
&updp10_printsize_list,
- OLYMPUS_INTERLACE_NONE,
- 1800,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_FULL_HEIGHT
- | OLYMPUS_FEATURE_BORDERLESS,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_BORDERLESS,
&updp10_printer_init_func, &updp10_printer_end_func,
NULL, NULL,
NULL, NULL,
updp10_adj_cyan, updp10_adj_magenta, updp10_adj_yellow,
&updp10_laminate_list,
},
+ { /* Sony UP-DR100 */
+ 2003,
+ &rgb_ink_list,
+ &res_334dpi_list,
+ &updr100_page_list,
+ &updr100_printsize_list,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT,
+ &updr100_printer_init_func, &updr100_printer_end_func,
+ NULL, NULL,
+ NULL, NULL,
+ NULL, NULL, NULL,
+ &updr100_laminate_list,
+ },
{ /* Sony UP-DR150 */
2001,
&rgb_ink_list,
- &updr150_res_list,
+ &res_334dpi_list,
&updr150_page_list,
&updr150_printsize_list,
- OLYMPUS_INTERLACE_NONE,
- 1800,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_FULL_HEIGHT,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT,
&updr150_printer_init_func, &updr150_printer_end_func,
NULL, NULL,
NULL, NULL,
@@ -1228,13 +1497,12 @@ static const olympus_cap_t olympus_model_capabilities[] =
{ /* Fujifilm Printpix CX-400 */
3000,
&rgb_ink_list,
- &cx400_res_list,
+ &res_310dpi_list,
&cx400_page_list,
&cx400_printsize_list,
- OLYMPUS_INTERLACE_NONE,
- 2208,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_FULL_HEIGHT
- | OLYMPUS_FEATURE_BORDERLESS,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_BORDERLESS,
&cx400_printer_init_func, NULL,
NULL, NULL,
NULL, NULL,
@@ -1244,19 +1512,47 @@ static const olympus_cap_t olympus_model_capabilities[] =
{ /* Fujifilm Printpix CX-550 */
3001,
&rgb_ink_list,
- &cx400_res_list,
+ &res_310dpi_list,
&cx400_page_list,
&cx400_printsize_list,
- OLYMPUS_INTERLACE_NONE,
- 2208,
- OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_FULL_HEIGHT
- | OLYMPUS_FEATURE_BORDERLESS,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_BORDERLESS,
&cx400_printer_init_func, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL, NULL, /* color profile/adjustment is built into printer */
NULL,
},
+ { /* Fujifilm FinePix NX-500 */
+ 3002,
+ &rgb_ink_list,
+ &res_306dpi_list,
+ &nx500_page_list,
+ &nx500_printsize_list,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT,
+ &nx500_printer_init_func, NULL,
+ NULL, NULL,
+ NULL, NULL,
+ NULL, NULL, NULL, /* color profile/adjustment is built into printer */
+ NULL,
+ },
+ { /* Kodak Easyshare Dock family */
+ 4000,
+ &ymc_ink_list,
+ &res_300dpi_list,
+ &kodak_dock_page_list,
+ &kodak_dock_printsize_list,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_PLANE_INTERLACE,
+ &kodak_dock_printer_init, NULL,
+ &kodak_dock_plane_init, NULL,
+ NULL, NULL,
+ NULL, NULL, NULL,
+ NULL,
+ },
};
static const stp_parameter_t the_parameters[] =
@@ -1362,25 +1658,25 @@ static const float_param_t float_parameters[] =
static const int float_parameter_count =
sizeof(float_parameters) / sizeof(const float_param_t);
-static const olympus_cap_t* olympus_get_model_capabilities(int model)
+static const dyesub_cap_t* dyesub_get_model_capabilities(int model)
{
int i;
- int models = sizeof(olympus_model_capabilities) / sizeof(olympus_cap_t);
+ int models = sizeof(dyesub_model_capabilities) / sizeof(dyesub_cap_t);
for (i=0; i<models; i++)
{
- if (olympus_model_capabilities[i].model == model)
- return &(olympus_model_capabilities[i]);
+ if (dyesub_model_capabilities[i].model == model)
+ return &(dyesub_model_capabilities[i]);
}
- stp_deprintf(STP_DBG_OLYMPUS,
- "olympus: model %d not found in capabilities list.\n", model);
- return &(olympus_model_capabilities[0]);
+ stp_deprintf(STP_DBG_DYESUB,
+ "dyesub: model %d not found in capabilities list.\n", model);
+ return &(dyesub_model_capabilities[0]);
}
-static const laminate_t* olympus_get_laminate_pattern(stp_vars_t *v)
+static const laminate_t* dyesub_get_laminate_pattern(stp_vars_t *v)
{
const char *lpar = stp_get_string_parameter(v, "Laminate");
- const olympus_cap_t *caps = olympus_get_model_capabilities(
+ const dyesub_cap_t *caps = dyesub_get_model_capabilities(
stp_get_model_id(v));
const laminate_list_t *llist = caps->laminate;
const laminate_t *l = NULL;
@@ -1396,16 +1692,16 @@ static const laminate_t* olympus_get_laminate_pattern(stp_vars_t *v)
}
static void
-olympus_printsize(const stp_vars_t *v,
+dyesub_printsize(const stp_vars_t *v,
int *width,
int *height)
{
int i;
const char *page = stp_get_string_parameter(v, "PageSize");
const char *resolution = stp_get_string_parameter(v, "Resolution");
- const olympus_cap_t *caps = olympus_get_model_capabilities(
+ const dyesub_cap_t *caps = dyesub_get_model_capabilities(
stp_get_model_id(v));
- const olymp_printsize_list_t *p = caps->printsize;
+ const dyesub_printsize_list_t *p = caps->printsize;
for (i = 0; i < p->n_items; i++)
{
@@ -1417,18 +1713,18 @@ olympus_printsize(const stp_vars_t *v,
return;
}
}
- stp_erprintf("olympus_printsize: printsize not found (%s, %s)\n",
+ stp_erprintf("dyesub_printsize: printsize not found (%s, %s)\n",
page, resolution);
}
static int
-olympus_feature(const olympus_cap_t *caps, int feature)
+dyesub_feature(const dyesub_cap_t *caps, int feature)
{
return ((caps->features & feature) == feature);
}
static stp_parameter_list_t
-olympus_list_parameters(const stp_vars_t *v)
+dyesub_list_parameters(const stp_vars_t *v)
{
stp_parameter_list_t *ret = stp_parameter_list_create();
int i;
@@ -1441,11 +1737,11 @@ olympus_list_parameters(const stp_vars_t *v)
}
static void
-olympus_parameters(const stp_vars_t *v, const char *name,
+dyesub_parameters(const stp_vars_t *v, const char *name,
stp_parameter_t *description)
{
int i;
- const olympus_cap_t *caps = olympus_get_model_capabilities(
+ const dyesub_cap_t *caps = dyesub_get_model_capabilities(
stp_get_model_id(v));
description->p_type = STP_PARAMETER_TYPE_INVALID;
@@ -1472,7 +1768,7 @@ olympus_parameters(const stp_vars_t *v, const char *name,
if (strcmp(name, "PageSize") == 0)
{
int default_specified = 0;
- const olymp_pagesize_list_t *p = caps->pages;
+ const dyesub_pagesize_list_t *p = caps->pages;
const char* text;
description->bounds.str = stp_string_list_create();
@@ -1507,7 +1803,7 @@ olympus_parameters(const stp_vars_t *v, const char *name,
else if (strcmp(name, "Resolution") == 0)
{
char res_text[24];
- const olymp_resolution_list_t *r = caps->resolution;
+ const dyesub_resolution_list_t *r = caps->resolution;
description->bounds.str = stp_string_list_create();
for (i = 0; i < r->n_items; i++)
@@ -1552,7 +1848,7 @@ olympus_parameters(const stp_vars_t *v, const char *name,
}
else if (strcmp(name, "Borderless") == 0)
{
- if (olympus_feature(caps, OLYMPUS_FEATURE_BORDERLESS))
+ if (dyesub_feature(caps, DYESUB_FEATURE_BORDERLESS))
description->is_active = 1;
}
else if (strcmp(name, "PrintingMode") == 0)
@@ -1568,104 +1864,129 @@ olympus_parameters(const stp_vars_t *v, const char *name,
}
+static const dyesub_pagesize_t*
+dyesub_current_pagesize(const stp_vars_t *v)
+{
+ const char *page = stp_get_string_parameter(v, "PageSize");
+ const stp_papersize_t *pt = stp_get_papersize_by_name(page);
+ const dyesub_cap_t *caps = dyesub_get_model_capabilities(
+ stp_get_model_id(v));
+ const dyesub_pagesize_list_t *p = caps->pages;
+ int i;
+
+ for (i = 0; i < p->n_items; i++)
+ {
+ if (strcmp(p->item[i].name,pt->name) == 0)
+ return &(p->item[i]);
+ }
+ return NULL;
+}
+
static void
-olympus_imageable_area_internal(const stp_vars_t *v,
+dyesub_media_size(const stp_vars_t *v,
+ int *width,
+ int *height)
+{
+ const dyesub_pagesize_t *p = dyesub_current_pagesize(v);
+ stp_default_media_size(v, width, height);
+
+ if (p && p->width_pt > 0)
+ *width = p->width_pt;
+ if (p && p->height_pt > 0)
+ *height = p->height_pt;
+}
+
+static void
+dyesub_imageable_area_internal(const stp_vars_t *v,
int use_maximum_area,
int *left,
int *right,
int *bottom,
- int *top)
+ int *top,
+ int *print_mode)
{
int width, height;
- int i;
- const char *page = stp_get_string_parameter(v, "PageSize");
- const stp_papersize_t *pt = stp_get_papersize_by_name(page);
- const olympus_cap_t *caps = olympus_get_model_capabilities(
+ const dyesub_pagesize_t *p = dyesub_current_pagesize(v);
+ const dyesub_cap_t *caps = dyesub_get_model_capabilities(
stp_get_model_id(v));
- const olymp_pagesize_list_t *p = caps->pages;
- for (i = 0; i < p->n_items; i++)
+ dyesub_media_size(v, &width, &height);
+ if (use_maximum_area
+ || (dyesub_feature(caps, DYESUB_FEATURE_BORDERLESS) &&
+ stp_get_boolean_parameter(v, "Borderless"))
+ || !p)
{
- if (strcmp(p->item[i].name,pt->name) == 0)
- {
-/*
- if (p->item[i].width_pt >= 0)
- stp_set_page_width(v, p->item[i].width_pt);
- if (p->item[i].height_pt >= 0)
- stp_set_page_height(v, p->item[i].height_pt);
-*/
-
- stp_default_media_size(v, &width, &height);
-
-
- if (use_maximum_area ||
- (olympus_feature(caps, OLYMPUS_FEATURE_BORDERLESS) &&
- stp_get_boolean_parameter(v, "Borderless")))
- {
- *left = 0;
- *top = 0;
- *right = width;
- *bottom = height;
- }
- else
- {
- *left = p->item[i].border_pt_left;
- *top = p->item[i].border_pt_top;
- *right = width - p->item[i].border_pt_right;
- *bottom = height - p->item[i].border_pt_bottom;
- }
- break;
- }
+ *left = 0;
+ *top = 0;
+ *right = width;
+ *bottom = height;
}
+ else
+ {
+ *left = p->border_pt_left;
+ *top = p->border_pt_top;
+ *right = width - p->border_pt_right;
+ *bottom = height - p->border_pt_bottom;
+ }
+ if (p)
+ *print_mode = p->print_mode;
+ else
+ *print_mode = DYESUB_PORTRAIT;
}
static void
-olympus_imageable_area(const stp_vars_t *v,
+dyesub_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);
+ int not_used;
+ dyesub_imageable_area_internal(v, 0, left, right, bottom, top, &not_used);
}
static void
-olympus_maximum_imageable_area(const stp_vars_t *v,
+dyesub_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);
+ int not_used;
+ dyesub_imageable_area_internal(v, 1, left, right, bottom, top, &not_used);
}
static void
-olympus_limit(const stp_vars_t *v, /* I */
+dyesub_limit(const stp_vars_t *v, /* I */
int *width, int *height,
int *min_width, int *min_height)
{
- *width = 65535;
- *height = 65535;
- *min_width = 1;
+ *width = SHRT_MAX;
+ *height = SHRT_MAX;
+ *min_width = 1;
*min_height = 1;
}
static void
-olympus_describe_resolution(const stp_vars_t *v, int *x, int *y)
+dyesub_describe_resolution(const stp_vars_t *v, int *x, int *y)
{
const char *resolution = stp_get_string_parameter(v, "Resolution");
+ const dyesub_cap_t *caps = dyesub_get_model_capabilities(
+ stp_get_model_id(v));
+ const dyesub_resolution_list_t *r = caps->resolution;
int i;
*x = -1;
*y = -1;
if (resolution)
{
- for (i = 0; i < all_res_list.n_items; i++)
+ for (i = 0; i < r->n_items; i++)
{
- if (strcmp(resolution, all_res_list.item[i].name) == 0)
+ if (strcmp(resolution, r->item[i].name) == 0)
{
- *x = all_res_list.item[i].xdpi;
- *y = all_res_list.item[i].ydpi;
+ *x = r->item[i].xdpi;
+ *y = r->item[i].ydpi;
+ break;
}
}
}
@@ -1673,87 +1994,304 @@ olympus_describe_resolution(const stp_vars_t *v, int *x, int *y)
}
static const char *
-olympus_describe_output(const stp_vars_t *v)
+dyesub_describe_output_internal(const stp_vars_t *v, dyesub_print_vars_t *pv)
{
- return "CMY";
+ const char *ink_type = stp_get_string_parameter(v, "InkType");
+ const dyesub_cap_t *caps = dyesub_get_model_capabilities(
+ stp_get_model_id(v));
+ const char *output_type;
+ int i;
+
+ pv->ink_channels = 1;
+ pv->ink_order = NULL;
+ output_type = "CMY";
+
+ if (ink_type)
+ {
+ for (i = 0; i < caps->inks->n_items; i++)
+ if (strcmp(ink_type, caps->inks->item[i].name) == 0)
+ {
+ output_type = caps->inks->item[i].output_type;
+ pv->ink_channels = caps->inks->item[i].output_channels;
+ pv->ink_order = caps->inks->item[i].channel_order;
+ break;
+ }
+ }
+
+ return output_type;
}
-static unsigned short *
-olympus_get_cached_output(stp_vars_t *v,
- stp_image_t *image,
- unsigned short **cache,
- int line, int size)
+static const char *
+dyesub_describe_output(const stp_vars_t *v)
+{
+ dyesub_print_vars_t ipv;
+ return dyesub_describe_output_internal(v, &ipv);
+}
+
+static void
+dyesub_nputc(stp_vars_t *v, char byte, int count)
+{
+ int i;
+ for (i = 0; i < count; i++)
+ stp_putc(byte, v);
+}
+
+static void
+dyesub_swap_ints(int *a, int *b)
+{
+ int t = *a;
+ *a = *b;
+ *b = t;
+}
+
+static void
+dyesub_adjust_curve(stp_vars_t *v,
+ const char *color_adj,
+ const char *color_curve)
+{
+ stp_curve_t *adjustment = NULL;
+
+ if (color_adj &&
+ !stp_check_curve_parameter(v, color_curve, STP_PARAMETER_ACTIVE))
+ {
+ adjustment = stp_curve_create_from_string(color_adj);
+ stp_set_curve_parameter(v, color_curve, adjustment);
+ stp_set_curve_parameter_active(v, color_curve, STP_PARAMETER_ACTIVE);
+ stp_curve_destroy(adjustment);
+ }
+}
+
+static void
+dyesub_exec(stp_vars_t *v,
+ void (*func)(stp_vars_t *),
+ const char *debug_string)
+{
+ if (func)
+ {
+ stp_deprintf(STP_DBG_DYESUB, "dyesub: %s\n", debug_string);
+ (*func)(v);
+ }
+}
+
+static int
+dyesub_interpolate(int oldval, int oldsize, int newsize)
+{
+ /*
+ * This is simple linear interpolation algorithm.
+ * When imagesize <> printsize I need rescale image somehow... :-/
+ */
+ return (int)(oldval * newsize / oldsize);
+}
+
+static void
+dyesub_free_image(unsigned short** image_data, stp_image_t *image)
{
- unsigned zero_mask;
+ int image_px_height = stp_image_height(image);
+ int i;
+
+ for (i = 0; i< image_px_height; i++)
+ if (image_data[i])
+ stp_free(image_data[i]);
+ if (image_data)
+ stp_free(image_data);
+}
+
+static unsigned short **
+dyesub_read_image(stp_vars_t *v,
+ dyesub_print_vars_t *pv,
+ stp_image_t *image)
+{
+ int image_px_width = stp_image_width(image);
+ int image_px_height = stp_image_height(image);
+ int row_size = image_px_width * pv->ink_channels * pv->bytes_per_out_channel;
+ unsigned short **image_data;
+ unsigned int zero_mask;
+ int i;
- stp_deprintf(STP_DBG_OLYMPUS, "olympus: get row %d", line);
- if (cache[line] == NULL)
+ image_data = stp_zalloc(image_px_height * sizeof(unsigned short *));
+ if (!image_data)
+ return NULL; /* ? out of memory ? */
+
+ for (i = 0; i < image_px_height; i++)
{
- stp_deprintf(STP_DBG_OLYMPUS, " (calling stp_color_get_row())\n");
- if (!stp_color_get_row(v, image, line, &zero_mask))
+ if (stp_color_get_row(v, image, i, &zero_mask))
+ {
+ stp_deprintf(STP_DBG_DYESUB,
+ "dyesub_read_image: "
+ "stp_color_get_row(..., %d, ...) == 0\n", i);
+ dyesub_free_image(image_data, image);
+ return NULL;
+ }
+ image_data[i] = stp_malloc(row_size);
+ if (!image_data[i])
{
- cache[line] = stp_malloc(size);
- memcpy(cache[line], stp_channel_get_output(v), size);
+ stp_deprintf(STP_DBG_DYESUB,
+ "dyesub_read_image: "
+ "(image_data[%d] = stp_malloc()) == NULL\n", i);
+ dyesub_free_image(image_data, image);
+ return NULL;
+ }
+ memcpy(image_data[i], stp_channel_get_output(v), row_size);
+ }
+ stp_image_conclude(image);
+
+ return image_data;
+}
+
+static int
+dyesub_print_pixel(stp_vars_t *v,
+ dyesub_print_vars_t *pv,
+ int row,
+ int col,
+ int plane)
+{
+ unsigned short ink[MAX_INK_CHANNELS * MAX_BYTES_PER_CHANNEL], *out;
+ unsigned char *ink_u8;
+ int i, j;
+
+ if (pv->print_mode == DYESUB_LANDSCAPE)
+ { /* "rotate" image */
+ dyesub_swap_ints(&col, &row);
+ row = (pv->imgw_px - 1) - row;
+ }
+
+ out = &(pv->image_data[row][col * pv->out_channels]);
+
+ for (i = 0; i < pv->ink_channels; i++)
+ {
+ if (pv->out_channels == pv->ink_channels)
+ { /* copy out_channel (image) to equiv ink_channel (printer) */
+ ink[i] = out[i];
+ }
+ else if (pv->out_channels < pv->ink_channels)
+ { /* several ink_channels (printer) "share" same out_channel (image) */
+ ink[i] = out[i * pv->out_channels / pv->ink_channels];
}
+ else /* (pv->out_channels > pv->ink_channels) */
+ { /* merge several out_channels (image) into ink_channel (printer) */
+ int avg = 0;
+ for (j = 0; j < pv->out_channels / pv->ink_channels; j++)
+ avg += out[j + i * pv->out_channels / pv->ink_channels];
+ ink[i] = avg * pv->ink_channels / pv->out_channels;
+ }
}
+
+ if (pv->bytes_per_ink_channel == 1) /* convert 16bits to 8bit */
+ {
+ ink_u8 = (unsigned char *) ink;
+ for (i = 0; i < pv->ink_channels; i++)
+ ink_u8[i] = ink[i] / 257;
+ }
+
+ if (pv->plane_interlacing)
+ stp_zfwrite((char *) ink + plane, pv->bytes_per_ink_channel, 1, v);
else
+ stp_zfwrite((char *) ink, pv->bytes_per_ink_channel, pv->ink_channels, v);
+
+ return 1;
+}
+
+static int
+dyesub_print_row(stp_vars_t *v,
+ dyesub_print_vars_t *pv,
+ int row,
+ int plane)
+{
+ int ret = 0;
+ int w, col;
+
+ for (w = 0; w < pv->outw_px; w++)
+ {
+ col = dyesub_interpolate(w, pv->outw_px, pv->imgw_px);
+ ret = dyesub_print_pixel(v, pv, row, col, plane);
+ if (ret > 1)
+ break;
+ }
+ return ret;
+}
+
+static int
+dyesub_print_plane(stp_vars_t *v,
+ dyesub_print_vars_t *pv,
+ const dyesub_cap_t *caps,
+ int plane)
+{
+ int ret = 0;
+ int h, row;
+ int out_bytes = (pv->plane_interlacing ? 1 : pv->ink_channels)
+ * pv->bytes_per_ink_channel;
+
+
+ for (h = 0; h <= pv->prnb_px - pv->prnt_px; h++)
{
- stp_deprintf(STP_DBG_OLYMPUS, " (cached)\n");
+ if (h % caps->block_size == 0)
+ { /* block init */
+ privdata.block_min_y = h + pv->prnt_px;
+ privdata.block_min_x = pv->prnl_px;
+ privdata.block_max_y = MIN(h + pv->prnt_px + caps->block_size - 1,
+ pv->prnb_px);
+ privdata.block_max_x = pv->prnr_px;
+
+ dyesub_exec(v, caps->block_init_func, "caps->block_init");
+ }
+
+ if (h + pv->prnt_px < pv->outt_px || h + pv->prnt_px >= pv->outb_px)
+ { /* empty part above or below image area */
+ dyesub_nputc(v, pv->empty_byte, out_bytes * pv->prnw_px);
+ }
+ else
+ {
+ if (dyesub_feature(caps, DYESUB_FEATURE_FULL_WIDTH)
+ && pv->outl_px > 0)
+ { /* empty part left of image area */
+ dyesub_nputc(v, pv->empty_byte, out_bytes * pv->outl_px);
+ }
+
+ row = dyesub_interpolate(h + pv->prnt_px - pv->outt_px,
+ pv->outh_px, pv->imgh_px);
+ stp_deprintf(STP_DBG_DYESUB,
+ "dyesub_print_plane: h = %d, row = %d\n", h, row);
+ ret = dyesub_print_row(v, pv, row, plane);
+
+ if (dyesub_feature(caps, DYESUB_FEATURE_FULL_WIDTH)
+ && pv->outr_px < pv->prnw_px)
+ { /* empty part right of image area */
+ dyesub_nputc(v, pv->empty_byte, out_bytes
+ * (pv->prnw_px - pv->outr_px));
+ }
+ }
+
+ if (h + pv->prnt_px == privdata.block_max_y)
+ { /* block end */
+ dyesub_exec(v, caps->block_end_func, "caps->block_end");
+ }
}
- return cache[line];
+ return ret;
}
/*
- * olympus_print()
+ * dyesub_print()
*/
static int
-olympus_do_print(stp_vars_t *v, stp_image_t *image)
+dyesub_do_print(stp_vars_t *v, stp_image_t *image)
{
- int i, j;
- int y, min_y, max_y; /* Looping vars */
- int min_x, max_x;
- int out_channels, out_bytes;
- unsigned short *final_out = NULL;
- unsigned char *char_out = NULL;
- unsigned short *real_out = NULL;
- unsigned short *err_out = NULL;
- unsigned short **rows = NULL; /* "cache" of rows read from image */
- int char_out_width;
+ int i;
+ dyesub_print_vars_t pv;
int status = 1;
- int ink_channels = 1;
- const char *ink_order = NULL;
- stp_curve_t *adjustment = NULL;
-
- int r_errdiv, r_errmod;
- int r_errval = 0;
- int r_errlast = -1;
- int r_errline = 0;
- int c_errdiv, c_errmod;
- int c_errval = 0;
- int c_errlast = -1;
- int c_errcol = 0;
const int model = stp_get_model_id(v);
- const char *ink_type = stp_get_string_parameter(v, "InkType");
- const olympus_cap_t *caps = olympus_get_model_capabilities(model);
+ const char *ink_type;
+ const dyesub_cap_t *caps = dyesub_get_model_capabilities(model);
int max_print_px_width = 0;
int max_print_px_height = 0;
int xdpi, ydpi; /* Resolution */
- /* image in pixels */
- int image_px_width;
- int image_px_height;
-
/* output in 1/72" */
int out_pt_width = stp_get_width(v);
int out_pt_height = stp_get_height(v);
int out_pt_left = stp_get_left(v);
int out_pt_top = stp_get_top(v);
- /* output in pixels */
- int out_px_width, out_px_height;
- int out_px_left, out_px_right, out_px_top, out_px_bottom;
-
/* page in 1/72" */
int page_pt_width = stp_get_page_width(v);
int page_pt_height = stp_get_page_height(v);
@@ -1761,13 +2299,11 @@ olympus_do_print(stp_vars_t *v, stp_image_t *image)
int page_pt_right = 0;
int page_pt_top = 0;
int page_pt_bottom = 0;
+ int page_mode;
- /* page w/out borders in pixels (according to selected dpi) */
- int print_px_width;
- int print_px_height;
-
int pl;
- unsigned char *zeros = NULL;
+
+
if (!stp_verify(v))
{
@@ -1776,51 +2312,46 @@ olympus_do_print(stp_vars_t *v, stp_image_t *image)
}
stp_image_init(image);
- image_px_width = stp_image_width(image);
- image_px_height = stp_image_height(image);
+ pv.imgw_px = stp_image_width(image);
+ pv.imgh_px = stp_image_height(image);
stp_describe_resolution(v, &xdpi, &ydpi);
- olympus_printsize(v, &max_print_px_width, &max_print_px_height);
+ dyesub_printsize(v, &max_print_px_width, &max_print_px_height);
privdata.pagesize = stp_get_string_parameter(v, "PageSize");
if (caps->laminate)
- privdata.laminate = olympus_get_laminate_pattern(v);
+ privdata.laminate = dyesub_get_laminate_pattern(v);
- if (olympus_feature(caps, OLYMPUS_FEATURE_WHITE_BORDER))
- stp_default_media_size(v, &page_pt_right, &page_pt_bottom);
- else
- olympus_imageable_area(v, &page_pt_left, &page_pt_right,
- &page_pt_bottom, &page_pt_top);
+ dyesub_imageable_area_internal(v,
+ (dyesub_feature(caps, DYESUB_FEATURE_WHITE_BORDER) ? 1 : 0),
+ &page_pt_left, &page_pt_right, &page_pt_bottom, &page_pt_top,
+ &page_mode);
- print_px_width = MIN(max_print_px_width,
- (page_pt_right - page_pt_left) * xdpi / 72);
- print_px_height = MIN(max_print_px_height,
- (page_pt_bottom - page_pt_top) * ydpi / 72);
- out_px_width = out_pt_width * xdpi / 72;
- out_px_height = out_pt_height * ydpi / 72;
+ pv.prnw_px = MIN(max_print_px_width,
+ PX(page_pt_right - page_pt_left, xdpi));
+ pv.prnh_px = MIN(max_print_px_height,
+ PX(page_pt_bottom - page_pt_top, ydpi));
+ pv.outw_px = PX(out_pt_width, xdpi);
+ pv.outh_px = PX(out_pt_height, ydpi);
/* if image size is close enough to output size send out original size */
- if (out_px_width - image_px_width > -5
- && out_px_width - image_px_width < 5
- && out_px_height - image_px_height > -5
- && out_px_height - image_px_height < 5)
- {
- out_px_width = image_px_width;
- out_px_height = image_px_height;
- }
-
- out_px_width = MIN(out_px_width, print_px_width);
- out_px_height = MIN(out_px_height, print_px_height);
- out_px_left = MIN(((out_pt_left - page_pt_left) * xdpi / 72),
- print_px_width - out_px_width);
- out_px_top = MIN(((out_pt_top - page_pt_top) * ydpi / 72),
- print_px_height - out_px_height);
- out_px_right = out_px_left + out_px_width;
- out_px_bottom = out_px_top + out_px_height;
+ if (abs(pv.outw_px - pv.imgw_px) < SIZE_THRESHOLD)
+ pv.outw_px = pv.imgw_px;
+ if (abs(pv.outh_px - pv.imgh_px) < SIZE_THRESHOLD)
+ pv.outh_px = pv.imgh_px;
+
+ pv.outw_px = MIN(pv.outw_px, pv.prnw_px);
+ pv.outh_px = MIN(pv.outh_px, pv.prnh_px);
+ pv.outl_px = MIN(PX(out_pt_left - page_pt_left, xdpi),
+ pv.prnw_px - pv.outw_px);
+ pv.outt_px = MIN(PX(out_pt_top - page_pt_top, ydpi),
+ pv.prnh_px - pv.outh_px);
+ pv.outr_px = pv.outl_px + pv.outw_px;
+ pv.outb_px = pv.outt_px + pv.outh_px;
- stp_deprintf(STP_DBG_OLYMPUS,
+ stp_deprintf(STP_DBG_DYESUB,
"paper (pt) %d x %d\n"
"image (px) %d x %d\n"
"image (pt) %d x %d\n"
@@ -1832,357 +2363,139 @@ olympus_do_print(stp_vars_t *v, stp_image_t *image)
"printable pixels (px) %d x %d\n"
"res (dpi) %d x %d\n",
page_pt_width, page_pt_height,
- image_px_width, image_px_height,
- image_px_width * 72 / xdpi, image_px_height * 72 / ydpi,
+ pv.imgw_px, pv.imgh_px,
+ PT(pv.imgw_px, xdpi), PT(pv.imgh_px, ydpi),
out_pt_width, out_pt_height,
- out_px_width, out_px_height,
+ pv.outw_px, pv.outh_px,
out_pt_left, out_pt_top,
- out_px_left, out_px_top,
+ pv.outl_px, pv.outt_px,
page_pt_right, page_pt_left, page_pt_right - page_pt_left,
page_pt_bottom, page_pt_top, page_pt_bottom - page_pt_top,
- print_px_width, print_px_height,
+ pv.prnw_px, pv.prnh_px,
xdpi, ydpi
);
privdata.xdpi = xdpi;
privdata.ydpi = ydpi;
- privdata.xsize = print_px_width;
- privdata.ysize = print_px_height;
-
- stp_set_string_parameter(v, "STPIOutputType", "CMY");
-
- if (caps->adj_cyan &&
- !stp_check_curve_parameter(v, "CyanCurve", STP_PARAMETER_ACTIVE))
- {
- adjustment = stp_curve_create_from_string(caps->adj_cyan);
- stp_set_curve_parameter(v, "CyanCurve", adjustment);
- stp_set_curve_parameter_active(v, "CyanCurve", STP_PARAMETER_ACTIVE);
- stp_curve_destroy(adjustment);
- }
- if (caps->adj_magenta &&
- !stp_check_curve_parameter(v, "MagentaCurve", STP_PARAMETER_ACTIVE))
- {
- adjustment = stp_curve_create_from_string(caps->adj_magenta);
- stp_set_curve_parameter(v, "MagentaCurve", adjustment);
- stp_set_curve_parameter_active(v, "MagentaCurve", STP_PARAMETER_ACTIVE);
- stp_curve_destroy(adjustment);
- }
- if (caps->adj_yellow &&
- !stp_check_curve_parameter(v, "YellowCurve", STP_PARAMETER_ACTIVE))
- {
- adjustment = stp_curve_create_from_string(caps->adj_yellow);
- stp_set_curve_parameter(v, "YellowCurve", adjustment);
- stp_set_curve_parameter_active(v, "YellowCurve", STP_PARAMETER_ACTIVE);
- stp_curve_destroy(adjustment);
- }
+ privdata.xsize = pv.prnw_px;
+ privdata.ysize = pv.prnh_px;
- if (ink_type)
- {
- for (i = 0; i < caps->inks->n_items; i++)
- if (strcmp(ink_type, caps->inks->item[i].name) == 0)
- {
- stp_set_string_parameter(v, "STPIOutputType",
- caps->inks->item[i].output_type);
- ink_channels = caps->inks->item[i].output_channels;
- ink_order = caps->inks->item[i].channel_order;
- break;
- }
- }
+ /* FIXME: move this into print_init_drv */
+ ink_type = dyesub_describe_output_internal(v, &pv);
+ stp_set_string_parameter(v, "STPIOutputType", ink_type);
stp_channel_reset(v);
- for (i = 0; i < ink_channels; i++)
+ for (i = 0; i < pv.ink_channels; i++)
stp_channel_add(v, i, 0, 1.0);
-
- out_channels = stp_color_init(v, image, 65536);
-
-#if 0
- if (out_channels != ink_channels && out_channels != 1 && ink_channels != 1)
- {
- stp_eprintf(v, "Internal error! Output channels or input channels must be 1\n");
- return 0;
- }
-#endif
-
- rows = stp_zalloc(image_px_height * sizeof(unsigned short *));
- err_out = stp_malloc(print_px_width * ink_channels * 2);
- if (out_channels != ink_channels)
- final_out = stp_malloc(print_px_width * ink_channels * 2);
-
+ pv.out_channels = stp_color_init(v, image, 65536);
+ pv.bytes_per_ink_channel = 1; /* FIXME: this is printer dependent */
+ pv.bytes_per_out_channel = 2; /* FIXME: this is ??? */
+ pv.image_data = dyesub_read_image(v, &pv, image);
+ pv.empty_byte = (ink_type &&
+ (strcmp(ink_type, "RGB") == 0 || strcmp(ink_type, "BGR") == 0)
+ ? '\xff' : '\0');
+ pv.plane_interlacing = dyesub_feature(caps, DYESUB_FEATURE_PLANE_INTERLACE);
+ pv.print_mode = page_mode;
+ if (!pv.image_data)
+ return 2;
+ /* /FIXME */
+
+
+ dyesub_adjust_curve(v, caps->adj_cyan, "CyanCurve");
+ dyesub_adjust_curve(v, caps->adj_magenta, "MagentaCurve");
+ dyesub_adjust_curve(v, caps->adj_yellow, "YellowCurve");
stp_set_float_parameter(v, "Density", 1.0);
- if (ink_type &&
- (strcmp(ink_type, "RGB") == 0 || strcmp(ink_type, "BGR") == 0))
- {
- zeros = stp_malloc(ink_channels * print_px_width + 1);
- (void) memset(zeros, '\xff', ink_channels * print_px_width + 1);
- }
- else
- zeros = stp_zalloc(ink_channels * print_px_width + 1);
-
- out_bytes = (caps->interlacing == OLYMPUS_INTERLACE_PLANE ? 1 : ink_channels);
-
- /* printer init */
- if (caps->printer_init_func)
- {
- stp_deprintf(STP_DBG_OLYMPUS, "olympus: caps->printer_init\n");
- (*(caps->printer_init_func))(v);
- }
- if (olympus_feature(caps, OLYMPUS_FEATURE_FULL_HEIGHT))
+ if (dyesub_feature(caps, DYESUB_FEATURE_FULL_HEIGHT))
{
- min_y = 0;
- max_y = print_px_height - 1;
+ pv.prnt_px = 0;
+ pv.prnb_px = pv.prnh_px - 1;
}
- else if (olympus_feature(caps, OLYMPUS_FEATURE_BLOCK_ALIGN))
+ else if (dyesub_feature(caps, DYESUB_FEATURE_BLOCK_ALIGN))
{
- min_y = out_px_top - (out_px_top % caps->block_size);
+ pv.prnt_px = pv.outt_px - (pv.outt_px % caps->block_size);
/* floor to multiple of block_size */
- max_y = (out_px_bottom - 1) + (caps->block_size - 1)
- - ((out_px_bottom - 1) % caps->block_size);
+ pv.prnb_px = (pv.outb_px - 1) + (caps->block_size - 1)
+ - ((pv.outb_px - 1) % caps->block_size);
/* ceil to multiple of block_size */
}
else
{
- min_y = out_px_top;
- max_y = out_px_bottom - 1;
+ pv.prnt_px = pv.outt_px;
+ pv.prnb_px = pv.outb_px - 1;
}
- if (olympus_feature(caps, OLYMPUS_FEATURE_FULL_WIDTH))
+ if (dyesub_feature(caps, DYESUB_FEATURE_FULL_WIDTH))
{
- min_x = 0;
- max_x = print_px_width - 1;
+ pv.prnl_px = 0;
+ pv.prnr_px = pv.prnw_px - 1;
}
else
{
- min_x = out_px_left;
- max_x = out_px_right;
+ pv.prnl_px = pv.outl_px;
+ pv.prnr_px = pv.outr_px;
}
- r_errdiv = image_px_height / out_px_height;
- r_errmod = image_px_height % out_px_height;
- c_errdiv = image_px_width / out_px_width;
- c_errmod = image_px_width % out_px_width;
-
- for (pl = 0; pl < (caps->interlacing == OLYMPUS_INTERLACE_PLANE
- ? ink_channels : 1); pl++)
+ if (pv.print_mode == DYESUB_LANDSCAPE)
{
- r_errval = 0;
- r_errlast = -1;
- r_errline = 0;
+ dyesub_swap_ints(&pv.outh_px, &pv.outw_px);
+ dyesub_swap_ints(&pv.outt_px, &pv.outl_px);
+ dyesub_swap_ints(&pv.outb_px, &pv.outr_px);
+
+ dyesub_swap_ints(&pv.prnh_px, &pv.prnw_px);
+ dyesub_swap_ints(&pv.prnt_px, &pv.prnl_px);
+ dyesub_swap_ints(&pv.prnb_px, &pv.prnr_px);
+
+ dyesub_swap_ints(&pv.imgh_px, &pv.imgw_px);
+ }
- privdata.plane = ink_order[pl];
- stp_deprintf(STP_DBG_OLYMPUS, "olympus: plane %d\n", privdata.plane);
+ /* printer init */
+ dyesub_exec(v, caps->printer_init_func, "caps->printer_init");
+
+ for (pl = 0; pl < (pv.plane_interlacing ? pv.ink_channels : 1); pl++)
+ {
+ privdata.plane = pv.ink_order[pl];
+ stp_deprintf(STP_DBG_DYESUB, "dyesub: plane %d\n", privdata.plane);
/* plane init */
- if (caps->plane_init_func)
- {
- stp_deprintf(STP_DBG_OLYMPUS, "olympus: caps->plane_init\n");
- (*(caps->plane_init_func))(v);
- }
-
- for (y = min_y; y <= max_y; y++)
- {
- unsigned short *out;
- int duplicate_line = 1;
-/* unsigned zero_mask; */
-
- if (((y - min_y) % caps->block_size) == 0)
- {
- /* block init */
- privdata.block_min_y = y;
- privdata.block_min_x = min_x;
- privdata.block_max_y = MIN(y + caps->block_size - 1, max_y);
- privdata.block_max_x = max_x;
-
- if (caps->block_init_func)
- {
- stp_deprintf(STP_DBG_OLYMPUS,
- "olympus: caps->block_init\n");
- (*(caps->block_init_func))(v);
- }
- }
-
- if (y < out_px_top || y >= out_px_bottom)
- stp_zfwrite((char *) zeros, out_bytes, print_px_width, v);
- else
- {
- if (olympus_feature(caps, OLYMPUS_FEATURE_FULL_WIDTH)
- && out_px_left > 0)
- {
- stp_zfwrite((char *) zeros, out_bytes, out_px_left, v);
- /* stp_erprintf("left %d ", out_px_left); */
- }
-
-#if 0
- if (r_errline != r_errlast)
- {
- r_errlast = r_errline;
- duplicate_line = 0;
-
- /* stp_erprintf("r_errline %d, ", r_errline); */
- if (stp_color_get_row(v, image, r_errline, &zero_mask))
- {
- status = 2;
- break;
- }
- }
-
- out = stp_channel_get_output(v);
-#endif
- if (r_errline != r_errlast)
- {
- r_errlast = r_errline;
- duplicate_line = 0;
- }
-
- out = olympus_get_cached_output(v, image, rows, r_errline,
- image_px_width * ink_channels * 2);
- if (out == NULL)
- {
- status = 2;
- break;
- }
-
- c_errval = 0;
- c_errlast = -1;
- c_errcol = 0;
- for (i = 0; i < out_px_width; i++)
- {
- if (c_errcol != c_errlast)
- c_errlast = c_errcol;
- for (j = 0; j < ink_channels; j++)
- err_out[i * ink_channels + j] =
- out[c_errcol * ink_channels + ink_order[j]-1];
-
- c_errval += c_errmod;
- c_errcol += c_errdiv;
- if (c_errval >= out_px_width)
- {
- c_errval -= out_px_width;
- c_errcol ++;
- }
- }
-
- real_out = err_out;
- if (out_channels != ink_channels)
- {
- real_out = final_out;
- if (out_channels < ink_channels)
- {
- for (i = 0; i < out_px_width; i++)
- {
- for (j = 0; j < ink_channels; j++)
- final_out[i * ink_channels + j] = err_out[i];
- }
- }
- else
- {
- for (i = 0; i < out_px_width; i++)
- {
- int avg = 0;
- for (j = 0; j < out_channels; j++)
- avg += err_out[i * out_channels + j];
- final_out[i] = avg / out_channels;
- }
- }
- }
- char_out = (unsigned char *) real_out;
- char_out_width = (caps->interlacing == OLYMPUS_INTERLACE_PLANE ?
- out_px_width : out_px_width * out_channels);
- for (i = 0; i < char_out_width; i++)
- {
- if (caps->interlacing == OLYMPUS_INTERLACE_PLANE)
- j = i * ink_channels + pl;
- else if (caps->interlacing == OLYMPUS_INTERLACE_LINE)
- j = (i % out_px_width) + (i / out_px_width);
- else /* OLYMPUS_INTERLACE_NONE */
- j = i;
-
- char_out[i] = real_out[j] / 257;
- }
-
- stp_zfwrite((char *) real_out, 1, char_out_width, v);
- /* stp_erprintf("data %d ", out_px_width); */
- if (olympus_feature(caps, OLYMPUS_FEATURE_FULL_WIDTH)
- && out_px_right < print_px_width)
- {
- stp_zfwrite((char *) zeros, out_bytes,
- print_px_width - out_px_right, v);
- /* stp_erprintf("right %d ", print_px_width-out_px_right); */
- }
- /* stp_erprintf("\n"); */
+ dyesub_exec(v, caps->plane_init_func, "caps->plane_init");
- r_errval += r_errmod;
- r_errline += r_errdiv;
- if (r_errval >= out_px_height)
- {
- r_errval -= out_px_height;
- r_errline ++;
- }
- }
-
- if (y == privdata.block_max_y)
- {
- /* block end */
- if (caps->block_end_func)
- {
- stp_deprintf(STP_DBG_OLYMPUS, "olympus: caps->block_end\n");
- (*(caps->block_end_func))(v);
- }
- }
- }
+ dyesub_print_plane(v, &pv, caps, (int) pv.ink_order[pl] - 1);
/* plane end */
- if (caps->plane_end_func) {
- stp_deprintf(STP_DBG_OLYMPUS, "olympus: caps->plane_end\n");
- (*(caps->plane_end_func))(v);
- }
+ dyesub_exec(v, caps->plane_end_func, "caps->plane_end");
}
/* printer end */
- if (caps->printer_end_func)
- {
- stp_deprintf(STP_DBG_OLYMPUS, "olympus: caps->printer_end\n");
- (*(caps->printer_end_func))(v);
- }
- stp_image_conclude(image);
- if (final_out)
- stp_free(final_out);
- if (err_out)
- stp_free(err_out);
- if (zeros)
- stp_free(zeros);
- if (rows)
- {
- for (i = 0; i <image_px_height; i++)
- stp_free(rows[i]);
- stp_free(rows);
- }
+ dyesub_exec(v, caps->printer_end_func, "caps->printer_end");
+
+ dyesub_free_image(pv.image_data, image);
return status;
}
static int
-olympus_print(const stp_vars_t *v, stp_image_t *image)
+dyesub_print(const stp_vars_t *v, stp_image_t *image)
{
int status;
stp_vars_t *nv = stp_vars_create_copy(v);
stp_prune_inactive_options(nv);
- status = olympus_do_print(nv, image);
+ status = dyesub_do_print(nv, image);
stp_vars_destroy(nv);
return status;
}
-static const stp_printfuncs_t print_olympus_printfuncs =
-{
- olympus_list_parameters,
- olympus_parameters,
- stp_default_media_size,
- olympus_imageable_area,
- olympus_maximum_imageable_area,
- olympus_limit,
- olympus_print,
- olympus_describe_resolution,
- olympus_describe_output,
+static const stp_printfuncs_t print_dyesub_printfuncs =
+{
+ dyesub_list_parameters,
+ dyesub_parameters,
+ dyesub_media_size,
+ dyesub_imageable_area,
+ dyesub_maximum_imageable_area,
+ dyesub_limit,
+ dyesub_print,
+ dyesub_describe_resolution,
+ dyesub_describe_output,
stp_verify_printer_params,
NULL,
NULL
@@ -2191,24 +2504,24 @@ static const stp_printfuncs_t print_olympus_printfuncs =
-static stp_family_t print_olympus_module_data =
+static stp_family_t print_dyesub_module_data =
{
- &print_olympus_printfuncs,
+ &print_dyesub_printfuncs,
NULL
};
static int
-print_olympus_module_init(void)
+print_dyesub_module_init(void)
{
- return stp_family_register(print_olympus_module_data.printer_list);
+ return stp_family_register(print_dyesub_module_data.printer_list);
}
static int
-print_olympus_module_exit(void)
+print_dyesub_module_exit(void)
{
- return stp_family_unregister(print_olympus_module_data.printer_list);
+ return stp_family_unregister(print_dyesub_module_data.printer_list);
}
@@ -2225,8 +2538,8 @@ stp_module_t stp_module_data =
"Olympus family driver",
STP_MODULE_CLASS_FAMILY,
NULL,
- print_olympus_module_init,
- print_olympus_module_exit,
- (void *) &print_olympus_module_data
+ print_dyesub_module_init,
+ print_dyesub_module_exit,
+ (void *) &print_dyesub_module_data
};
diff --git a/src/main/print-pcl.c b/src/main/print-pcl.c
index f1afc25..c428310 100644
--- a/src/main/print-pcl.c
+++ b/src/main/print-pcl.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-pcl.c,v 1.144 2006/07/07 13:11:42 rlk Exp $"
+ * "$Id: print-pcl.c,v 1.145 2006/09/12 19:03:33 easysw Exp $"
*
* Print plug-in HP PCL driver for the GIMP.
*
@@ -45,7 +45,10 @@
*/
static void pcl_mode0(stp_vars_t *, unsigned char *, int, int);
static void pcl_mode2(stp_vars_t *, unsigned char *, int, int);
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
+
+#ifndef MAX
+# define MAX(a, b) ((a) > (b) ? (a) : (b))
+#endif /* !MAX */
typedef struct
{
diff --git a/src/main/print-ps.c b/src/main/print-ps.c
index 702d2d7..62b5437 100644
--- a/src/main/print-ps.c
+++ b/src/main/print-ps.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-ps.c,v 1.87 2006/06/04 18:06:34 rleigh Exp $"
+ * "$Id: print-ps.c,v 1.87.8.1 2007/05/29 01:47:29 rlk Exp $"
*
* Print plug-in Adobe PostScript driver for the GIMP.
*
@@ -233,9 +233,15 @@ static void
ps_parameters(const stp_vars_t *v, const char *name,
stp_parameter_t *description)
{
- char *locale = setlocale(LC_ALL, "C");
+#ifdef HAVE_LOCALE_H
+ char *locale = stp_strdup(setlocale(LC_ALL, NULL));
+ setlocale(LC_ALL, "C");
+#endif
ps_parameters_internal(v, name, description);
+#ifdef HAVE_LOCALE_H
setlocale(LC_ALL, locale);
+ stp_free(locale);
+#endif
}
/*
@@ -275,9 +281,15 @@ ps_media_size_internal(const stp_vars_t *v, /* I */
static void
ps_media_size(const stp_vars_t *v, int *width, int *height)
{
- char *locale = setlocale(LC_ALL, "C");
+#ifdef HAVE_LOCALE_H
+ char *locale = stp_strdup(setlocale(LC_ALL, NULL));
+ setlocale(LC_ALL, "C");
+#endif
ps_media_size_internal(v, width, height);
+#ifdef HAVE_LOCALE_H
setlocale(LC_ALL, locale);
+ stp_free(locale);
+#endif
}
/*
@@ -350,9 +362,15 @@ ps_imageable_area(const stp_vars_t *v, /* I */
int *bottom, /* O - Bottom position in points */
int *top) /* O - Top position in points */
{
- char *locale = setlocale(LC_ALL, "C");
+#ifdef HAVE_LOCALE_H
+ char *locale = stp_strdup(setlocale(LC_ALL, NULL));
+ setlocale(LC_ALL, "C");
+#endif
ps_imageable_area_internal(v, 0, left, right, bottom, top);
+#ifdef HAVE_LOCALE_H
setlocale(LC_ALL, locale);
+ stp_free(locale);
+#endif
}
static void
@@ -362,9 +380,15 @@ ps_maximum_imageable_area(const stp_vars_t *v, /* I */
int *bottom, /* O - Bottom position in points */
int *top) /* O - Top position in points */
{
- char *locale = setlocale(LC_ALL, "C");
+#ifdef HAVE_LOCALE_H
+ char *locale = stp_strdup(setlocale(LC_ALL, NULL));
+ setlocale(LC_ALL, "C");
+#endif
ps_imageable_area_internal(v, 1, left, right, bottom, top);
+#ifdef HAVE_LOCALE_H
setlocale(LC_ALL, locale);
+ stp_free(locale);
+#endif
}
static void
@@ -397,17 +421,30 @@ ps_describe_resolution_internal(const stp_vars_t *v, int *x, int *y)
static void
ps_describe_resolution(const stp_vars_t *v, int *x, int *y)
{
- char *locale = setlocale(LC_ALL, "C");
+#ifdef HAVE_LOCALE_H
+ char *locale = stp_strdup(setlocale(LC_ALL, NULL));
+ setlocale(LC_ALL, "C");
+#endif
ps_describe_resolution_internal(v, x, y);
+#ifdef HAVE_LOCALE_H
setlocale(LC_ALL, locale);
+ stp_free(locale);
+#endif
}
static const char *
ps_describe_output(const stp_vars_t *v)
{
const char *print_mode = stp_get_string_parameter(v, "PrintingMode");
+ const char *input_image_type = stp_get_string_parameter(v, "InputImageType");
if (print_mode && strcmp(print_mode, "Color") == 0)
- return "RGB";
+ {
+ if (input_image_type && (strcmp(input_image_type, "CMYK") == 0 ||
+ strcmp(input_image_type, "KCMY") == 0))
+ return "CMYK";
+ else
+ return "RGB";
+ }
else
return "Whitescale";
}
@@ -417,7 +454,7 @@ ps_describe_output(const stp_vars_t *v)
*/
static int
-ps_print_internal(const stp_vars_t *v, stp_image_t *image)
+ps_print_internal(stp_vars_t *v, stp_image_t *image)
{
int status = 1;
int model = stp_get_model_id(v);
@@ -427,6 +464,7 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
const char *media_type = stp_get_string_parameter(v, "MediaType");
const char *media_source = stp_get_string_parameter(v, "InputSlot");
const char *print_mode = stp_get_string_parameter(v, "PrintingMode");
+ const char *input_image_type = stp_get_string_parameter(v, "InputImageType");
unsigned short *out = NULL;
int top = stp_get_top(v);
int left = stp_get_left(v);
@@ -459,8 +497,9 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
} commands[4];
int image_height,
image_width;
- stp_vars_t *nv = stp_vars_create_copy(v);
- char *locale;
+ int color_out = 0;
+ int cmyk_out = 0;
+
if (!resolution)
resolution = "";
if (!media_size)
@@ -470,12 +509,12 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
if (!media_source)
media_source = "";
- stp_prune_inactive_options(nv);
- if (!stp_verify(nv))
- {
- stp_eprintf(nv, "Print options not verified; cannot print.\n");
- return 0;
- }
+ if (print_mode && strcmp(print_mode, "Color") == 0)
+ color_out = 1;
+ if (color_out &&
+ input_image_type && (strcmp(input_image_type, "CMYK") == 0 ||
+ strcmp(input_image_type, "KCMY") == 0))
+ cmyk_out = 1;
stp_image_init(image);
@@ -486,8 +525,8 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
out_width = stp_get_width(v);
out_height = stp_get_height(v);
- ps_imageable_area(nv, &page_left, &page_right, &page_bottom, &page_top);
- ps_media_size(v, &paper_width, &paper_height);
+ ps_imageable_area_internal(v, 0, &page_left, &page_right, &page_bottom, &page_top);
+ ps_media_size_internal(v, &paper_width, &paper_height);
page_width = page_right - page_left;
page_height = page_bottom - page_top;
@@ -523,7 +562,6 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
stp_zprintf(v, "%%%%Creator: %s/Gutenprint\n", stp_image_get_appname(image));
#endif
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",
page_left, paper_height - page_bottom,
page_right, paper_height - page_top);
@@ -645,26 +683,30 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
always be printed with a decimal point rather than the
locale-specific setting. */
- locale = setlocale(LC_ALL, "C");
stp_zprintf(v, "%.3f %.3f scale\n",
(double)out_width / ((double)image_width),
(double)out_height / ((double)image_height));
- setlocale(LC_ALL, locale);
- stp_channel_reset(nv);
- stp_channel_add(nv, 0, 0, 1.0);
- if (strcmp(print_mode, "Color") == 0)
+ stp_channel_reset(v);
+ stp_channel_add(v, 0, 0, 1.0);
+ if (color_out)
{
- stp_channel_add(nv, 1, 0, 1.0);
- stp_channel_add(nv, 2, 0, 1.0);
- stp_set_string_parameter(nv, "STPIOutputType", "RGB");
+ stp_channel_add(v, 1, 0, 1.0);
+ stp_channel_add(v, 2, 0, 1.0);
+ if (cmyk_out)
+ {
+ stp_channel_add(v, 3, 0, 1.0);
+ stp_set_string_parameter(v, "STPIOutputType", "CMYK");
+ }
+ else
+ stp_set_string_parameter(v, "STPIOutputType", "RGB");
}
else
- stp_set_string_parameter(nv, "STPIOutputType", "Whitescale");
+ stp_set_string_parameter(v, "STPIOutputType", "Whitescale");
- stp_set_boolean_parameter(nv, "SimpleGamma", 1);
+ stp_set_boolean_parameter(v, "SimpleGamma", 1);
- out_channels = stp_color_init(nv, image, 256);
+ out_channels = stp_color_init(v, image, 256);
if (model == 0)
{
@@ -674,28 +716,47 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
stp_puts("[ 1 0 0 -1 0 1 ]\n", v);
- if (strcmp(print_mode, "Color") == 0)
+ if (cmyk_out)
+ stp_puts("{currentfile picture readhexstring pop} false 4 colorimage\n", v);
+ else if (color_out)
stp_puts("{currentfile picture readhexstring pop} false 3 colorimage\n", v);
else
stp_puts("{currentfile picture readhexstring pop} image\n", v);
for (y = 0; y < image_height; y ++)
{
- if (stp_color_get_row(nv, image, y, &zero_mask))
+ if (stp_color_get_row(v, image, y, &zero_mask))
{
status = 2;
break;
}
- out = stp_channel_get_input(nv);
+ out = stp_channel_get_input(v);
+
+ /* Convert from KCMY to CMYK */
+ if (cmyk_out)
+ {
+ int x;
+ unsigned short *pos = out;
+ for (x = 0; x < image_width; x++, pos += 4)
+ {
+ unsigned short p0 = pos[0];
+ pos[0] = pos[1];
+ pos[1] = pos[2];
+ pos[2] = pos[3];
+ pos[3] = p0;
+ }
+ }
ps_hex(v, out, image_width * out_channels);
}
}
else
{
unsigned short *tmp_buf =
- stp_malloc(sizeof(unsigned short) * (image_width * out_channels + 3));
- if (strcmp(print_mode, "Color") == 0)
+ stp_malloc(sizeof(unsigned short) * (image_width * out_channels + 4));
+ if (cmyk_out)
+ stp_puts("/DeviceCMYK setcolorspace\n", v);
+ else if (color_out)
stp_puts("/DeviceRGB setcolorspace\n", v);
else
stp_puts("/DeviceGray setcolorspace\n", v);
@@ -707,7 +768,9 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
stp_zprintf(v, "\t/Height %d\n", image_height);
stp_puts("\t/BitsPerComponent 8\n", v);
- if (strcmp(print_mode, "Color") == 0)
+ if (cmyk_out)
+ stp_puts("\t/Decode [ 0 1 0 1 0 1 0 1 ]\n", v);
+ else if (color_out)
stp_puts("\t/Decode [ 0 1 0 1 0 1 ]\n", v);
else
stp_puts("\t/Decode [ 0 1 ]\n", v);
@@ -726,12 +789,12 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
{
unsigned short *where;
/* FIXME!!! */
- if (stp_color_get_row(nv, image, y /*, out + out_offset */ , &zero_mask))
+ if (stp_color_get_row(v, image, y /*, out + out_offset */ , &zero_mask))
{
status = 2;
break;
}
- out = stp_channel_get_input(nv);
+ out = stp_channel_get_input(v);
if (out_offset > 0)
{
memcpy(tmp_buf + out_offset, out,
@@ -741,6 +804,21 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
else
where = out;
+ /* Convert from KCMY to CMYK */
+ if (cmyk_out)
+ {
+ int x;
+ unsigned short *pos = where;
+ for (x = 0; x < image_width; x++, pos += 4)
+ {
+ unsigned short p0 = pos[0];
+ pos[0] = pos[1];
+ pos[1] = pos[2];
+ pos[2] = pos[3];
+ pos[3] = p0;
+ }
+ }
+
out_ps_height = out_offset + image_width * out_channels;
if (y < (image_height - 1))
@@ -766,16 +844,33 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
stp_puts("showpage\n", v);
stp_puts("%%Trailer\n", v);
stp_puts("%%EOF\n", v);
- stp_vars_destroy(nv);
return status;
}
static int
ps_print(const stp_vars_t *v, stp_image_t *image)
{
- char *locale = setlocale(LC_ALL, "C");
- int status = ps_print_internal(v, image);
+ int status;
+#ifdef HAVE_LOCALE_H
+ char *locale;
+#endif
+ stp_vars_t *nv = stp_vars_create_copy(v);
+ stp_prune_inactive_options(nv);
+ if (!stp_verify(nv))
+ {
+ stp_eprintf(nv, "Print options not verified; cannot print.\n");
+ return 0;
+ }
+#ifdef HAVE_LOCALE_H
+ locale = stp_strdup(setlocale(LC_ALL, NULL));
+ setlocale(LC_ALL, "C");
+#endif
+ status = ps_print_internal(nv, image);
+#ifdef HAVE_LOCALE_H
setlocale(LC_ALL, locale);
+ stp_free(locale);
+#endif
+ stp_vars_destroy(nv);
return status;
}
diff --git a/src/main/print-util.c b/src/main/print-util.c
index 1138781..975ec65 100644
--- a/src/main/print-util.c
+++ b/src/main/print-util.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-util.c,v 1.108 2004/09/17 18:38:26 rleigh Exp $"
+ * "$Id: print-util.c,v 1.109.4.3 2007/06/04 00:25:16 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -172,12 +172,19 @@ stp_puts(const char *s, const stp_vars_t *v)
}
void
+stp_putraw(const stp_raw_t *r, const stp_vars_t *v)
+{
+ (stp_get_outfunc(v))((void *)(stp_get_outdata(v)), r->data, r->bytes);
+}
+
+void
stp_send_command(const stp_vars_t *v, const char *command,
const char *format, ...)
{
int i = 0;
char fchar;
const char *out_str;
+ const stp_raw_t *out_raw;
unsigned short byte_count = 0;
va_list args;
@@ -208,6 +215,10 @@ stp_send_command(const stp_vars_t *v, const char *command,
(void) va_arg(args, unsigned int);
byte_count += 4;
break;
+ case 'r':
+ out_raw = va_arg(args, const stp_raw_t *);
+ byte_count += out_raw->bytes;
+ break;
case 's':
out_str = va_arg(args, const char *);
byte_count += strlen(out_str);
@@ -257,6 +268,9 @@ stp_send_command(const stp_vars_t *v, const char *command,
case 's':
stp_puts(va_arg(args, const char *), v);
break;
+ case 'r':
+ stp_putraw(va_arg(args, const stp_raw_t *), v);
+ break;
}
format++;
}
@@ -445,10 +459,16 @@ stp_init(void)
{
/* Things that are only initialised once */
/* Set up gettext */
+#ifdef HAVE_LOCALE_H
+ char *locale = stp_strdup(setlocale (LC_ALL, ""));
+#endif
#ifdef ENABLE_NLS
- setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
#endif
+#ifdef HAVE_LOCALE_H
+ setlocale(LC_ALL, locale);
+ stp_free(locale);
+#endif
stpi_init_debug();
stp_xml_preinit();
stpi_init_printer();
@@ -549,7 +569,8 @@ stp_read_and_compose_curves(const char *s1, const char *s2,
}
else if (t1)
{
- stp_curve_destroy(t2);
+ if(t2)
+ stp_curve_destroy(t2);
return t1;
}
else
@@ -562,6 +583,8 @@ stp_merge_printvars(stp_vars_t *user, const stp_vars_t *print)
int i;
stp_parameter_list_t params = stp_get_parameter_list(print);
int count = stp_parameter_list_count(params);
+ stp_deprintf(STP_DBG_VARS, "Merging printvars from %s\n",
+ stp_get_driver(print));
for (i = 0; i < count; i++)
{
const stp_parameter_t *p = stp_parameter_list_param(params, i);
@@ -595,6 +618,7 @@ stp_merge_printvars(stp_vars_t *user, const stp_vars_t *print)
stp_parameter_description_destroy(&desc);
}
}
+ stp_deprintf(STP_DBG_VARS, "Exiting merge printvars\n");
stp_parameter_list_destroy(params);
}
diff --git a/src/main/print-vars.c b/src/main/print-vars.c
index c2b1d27..e3d4195 100644
--- a/src/main/print-vars.c
+++ b/src/main/print-vars.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-vars.c,v 1.75 2006/06/25 00:25:14 rlk Exp $"
+ * "$Id: print-vars.c,v 1.75.8.1 2007/05/29 01:47:29 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -86,18 +86,14 @@ static int standard_vars_initialized = 0;
static stp_vars_t default_vars;
-static void
-null_vars(void)
-{
- stp_erprintf("Null stp_vars_t! Please report this bug.\n");
- stp_abort();
-}
-
static inline void
check_vars(const stp_vars_t *v)
{
if (v == NULL)
- null_vars();
+ {
+ stp_erprintf("Null stp_vars_t! Please report this bug.\n");
+ stp_abort();
+ }
}
static const char *
@@ -345,38 +341,40 @@ stp_vars_destroy(stp_vars_t *v)
stp_free(v);
}
-#define DEF_STRING_FUNCS(s, pre) \
-void \
-pre##_set_##s(stp_vars_t *v, const char *val) \
-{ \
- check_vars(v); \
- if (val) \
- stp_dprintf(STP_DBG_VARS, v, "set %s to %s\n", #s, val); \
- else \
- stp_dprintf(STP_DBG_VARS, v, "clear %s\n", #s); \
- if (v->s == val) \
- return; \
- STP_SAFE_FREE(v->s); \
- v->s = stp_strdup(val); \
- v->verified = 0; \
-} \
- \
-void \
-pre##_set_##s##_n(stp_vars_t *v, const char *val, int n) \
-{ \
- check_vars(v); \
- if (v->s == val) \
- return; \
- STP_SAFE_FREE(v->s); \
- v->s = stp_strndup(val, n); \
- v->verified = 0; \
-} \
- \
-const char * \
-pre##_get_##s(const stp_vars_t *v) \
-{ \
- check_vars(v); \
- return v->s; \
+#define DEF_STRING_FUNCS(s, pre) \
+void \
+pre##_set_##s(stp_vars_t *v, const char *val) \
+{ \
+ check_vars(v); \
+ if (val) \
+ stp_deprintf(STP_DBG_VARS, "set %s to %s (0x%p)\n", #s, val, \
+ (const void *) v); \
+ else \
+ stp_deprintf(STP_DBG_VARS, "clear %s (0x%p)\n", #s, \
+ (const void *) v); \
+ if (v->s == val) \
+ return; \
+ STP_SAFE_FREE(v->s); \
+ v->s = stp_strdup(val); \
+ v->verified = 0; \
+} \
+ \
+void \
+pre##_set_##s##_n(stp_vars_t *v, const char *val, int n) \
+{ \
+ check_vars(v); \
+ if (v->s == val) \
+ return; \
+ STP_SAFE_FREE(v->s); \
+ v->s = stp_strndup(val, n); \
+ v->verified = 0; \
+} \
+ \
+const char * \
+pre##_get_##s(const stp_vars_t *v) \
+{ \
+ check_vars(v); \
+ return v->s; \
}
#define DEF_FUNCS(s, t, pre) \
@@ -473,11 +471,11 @@ stp_set_string_parameter_n(stp_vars_t *v, const char *parameter,
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_STRING_LIST];
if (value)
- stp_dprintf(STP_DBG_VARS, v, "stp_set_string_parameter(%s, %s)\n",
- parameter, value);
+ stp_deprintf(STP_DBG_VARS, "stp_set_string_parameter(0x%p, %s, %s)\n",
+ (const void *) v, parameter, value);
else
- stp_dprintf(STP_DBG_VARS, v, "stp_set_string_parameter(%s)\n",
- parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_string_parameter(0x%p, %s)\n",
+ (const void *) v, parameter);
set_raw_parameter(list, parameter, value, bytes,
STP_PARAMETER_TYPE_STRING_LIST);
stp_set_verified(v, 0);
@@ -489,14 +487,9 @@ stp_set_string_parameter(stp_vars_t *v, const char *parameter,
{
int byte_count = 0;
if (value)
- {
byte_count = strlen(value);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_string_parameter(%s, %s)\n",
- parameter, value);
- }
- else
- stp_dprintf(STP_DBG_VARS, v, "stp_set_string_parameter(%s)\n",
- parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_string_parameter(0x%p, %s, %s)\n",
+ (const void *) v, parameter, value ? value : "NULL");
stp_set_string_parameter_n(v, parameter, value, byte_count);
stp_set_verified(v, 0);
}
@@ -506,12 +499,8 @@ stp_set_default_string_parameter_n(stp_vars_t *v, const char *parameter,
const char *value, size_t bytes)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_STRING_LIST];
- if (value)
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_string_parameter(%s, %s)\n",
- parameter, value);
- else
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_string_parameter(%s)\n",
- parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_default_string_parameter(0x%p, %s, %s)\n",
+ (const void *) v, parameter, value ? value : "NULL");
set_default_raw_parameter(list, parameter, value, bytes,
STP_PARAMETER_TYPE_STRING_LIST);
stp_set_verified(v, 0);
@@ -597,12 +586,8 @@ stp_set_file_parameter(stp_vars_t *v, const char *parameter,
size_t byte_count = 0;
if (value)
byte_count = strlen(value);
- if (value)
- stp_dprintf(STP_DBG_VARS, v, "stp_set_file_parameter(%s, %s)\n",
- parameter, value);
- else
- stp_dprintf(STP_DBG_VARS, v, "stp_set_file_parameter(%s)\n",
- parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_file_parameter(0x%p, %s, %s)\n",
+ (const void *) v, parameter, value ? value : "NULL");
set_raw_parameter(list, parameter, value, byte_count,
STP_PARAMETER_TYPE_FILE);
stp_set_verified(v, 0);
@@ -613,12 +598,8 @@ stp_set_file_parameter_n(stp_vars_t *v, const char *parameter,
const char *value, size_t byte_count)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_FILE];
- if (value)
- stp_dprintf(STP_DBG_VARS, v, "stp_set_file_parameter(%s, %s)\n",
- parameter, value);
- else
- stp_dprintf(STP_DBG_VARS, v, "stp_set_file_parameter(%s)\n",
- parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_file_parameter(0x%p, %s, %s)\n",
+ (const void *) v, parameter, value ? value : "NULL");
set_raw_parameter(list, parameter, value, byte_count,
STP_PARAMETER_TYPE_FILE);
stp_set_verified(v, 0);
@@ -632,12 +613,8 @@ stp_set_default_file_parameter(stp_vars_t *v, const char *parameter,
size_t byte_count = 0;
if (value)
byte_count = strlen(value);
- if (value)
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_file_parameter(%s, %s)\n",
- parameter, value);
- else
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_file_parameter(%s)\n",
- parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_default_file_parameter(0x%p, %s, %s)\n",
+ (const void *) v, parameter, value ? value : "NULL");
set_default_raw_parameter(list, parameter, value, byte_count,
STP_PARAMETER_TYPE_FILE);
stp_set_verified(v, 0);
@@ -648,12 +625,8 @@ stp_set_default_file_parameter_n(stp_vars_t *v, const char *parameter,
const char *value, size_t byte_count)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_FILE];
- if (value)
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_file_parameter(%s, %s)\n",
- parameter, value);
- else
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_file_parameter(%s)\n",
- parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_default_file_parameter(0x%p, %s, %s)\n",
+ (const void *) v, parameter, value ? value : "NULL");
set_default_raw_parameter(list, parameter, value, byte_count,
STP_PARAMETER_TYPE_FILE);
stp_set_verified(v, 0);
@@ -686,7 +659,8 @@ stp_set_curve_parameter(stp_vars_t *v, const char *parameter,
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_CURVE];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_curve_parameter(%s)\n", parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_curve_parameter(0x%p, %s)\n",
+ (const void *) v, parameter);
if (curve)
{
value_t *val;
@@ -719,8 +693,8 @@ stp_set_default_curve_parameter(stp_vars_t *v, const char *parameter,
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_CURVE];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_curve_parameter(%s)\n",
- parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_default_curve_parameter(0x%p, %s)\n",
+ (const void *) v, parameter);
if (!item)
{
if (curve)
@@ -764,6 +738,8 @@ stp_set_array_parameter(stp_vars_t *v, const char *parameter,
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_ARRAY];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_array_parameter(0x%p, %s)\n",
+ (const void *) v, parameter);
if (array)
{
value_t *val;
@@ -795,7 +771,8 @@ stp_set_default_array_parameter(stp_vars_t *v, const char *parameter,
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_ARRAY];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_array_parameter(%s)\n", parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_set_default_array_parameter(0x%p, %s)\n",
+ (const void *) v, parameter);
if (!item)
{
if (array)
@@ -824,8 +801,6 @@ stp_get_array_parameter(const stp_vars_t *v, const char *parameter)
const stp_list_t *list = v->params[STP_PARAMETER_TYPE_ARRAY];
const value_t *val;
const stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_array_parameter(%s)\n",
- parameter);
if (item)
{
val = (const value_t *) stp_list_item_get_data(item);
@@ -841,8 +816,8 @@ stp_set_int_parameter(stp_vars_t *v, const char *parameter, int ival)
stp_list_t *list = v->params[STP_PARAMETER_TYPE_INT];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_int_parameter(%s, %d)\n",
- parameter, ival);
+ stp_deprintf(STP_DBG_VARS, "stp_set_int_parameter(0x%p, %s, %d)\n",
+ (const void *) v, parameter, ival);
if (item)
{
val = (value_t *) stp_list_item_get_data(item);
@@ -867,8 +842,8 @@ stp_set_default_int_parameter(stp_vars_t *v, const char *parameter, int ival)
stp_list_t *list = v->params[STP_PARAMETER_TYPE_INT];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_int_parameter(%s, %d)\n",
- parameter, ival);
+ stp_deprintf(STP_DBG_VARS, "stp_set_default_int_parameter(0x%p, %s, %d)\n",
+ (const void *) v, parameter, ival);
if (!item)
{
val = stp_malloc(sizeof(value_t));
@@ -886,7 +861,8 @@ stp_clear_int_parameter(stp_vars_t *v, const char *parameter)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_INT];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_clear_int_parameter(%s)\n", parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_clear_int_parameter(0x%p, %s)\n",
+ (const void *) v, parameter);
if (item)
stp_list_item_destroy(list, item);
stp_set_verified(v, 0);
@@ -929,8 +905,8 @@ stp_set_boolean_parameter(stp_vars_t *v, const char *parameter, int ival)
stp_list_t *list = v->params[STP_PARAMETER_TYPE_BOOLEAN];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_boolean_parameter(%s, %d)\n",
- parameter, ival);
+ stp_deprintf(STP_DBG_VARS, "stp_set_boolean_parameter(0x%p, %s, %d)\n",
+ (const void *) v, parameter, ival);
if (item)
{
val = (value_t *) stp_list_item_get_data(item);
@@ -959,8 +935,8 @@ stp_set_default_boolean_parameter(stp_vars_t *v, const char *parameter,
stp_list_t *list = v->params[STP_PARAMETER_TYPE_BOOLEAN];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_boolean_parameter(%s, %d)\n",
- parameter, ival);
+ stp_deprintf(STP_DBG_VARS, "stp_set_default_boolean_parameter(0x%p, %s, %d)\n",
+ (const void *) v, parameter, ival);
if (!item)
{
val = stp_malloc(sizeof(value_t));
@@ -981,7 +957,8 @@ stp_clear_boolean_parameter(stp_vars_t *v, const char *parameter)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_BOOLEAN];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_clear_boolean_parameter(%s)\n", parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_clear_boolean_parameter(0x%p, %s)\n",
+ (const void *) v, parameter);
if (item)
stp_list_item_destroy(list, item);
stp_set_verified(v, 0);
@@ -1024,8 +1001,8 @@ stp_set_dimension_parameter(stp_vars_t *v, const char *parameter, int ival)
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DIMENSION];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_dimension_parameter(%s, %d)\n",
- parameter, ival);
+ stp_deprintf(STP_DBG_VARS, "stp_set_dimension_parameter(0x%p, %s, %d)\n",
+ (const void *) v, parameter, ival);
if (item)
{
val = (value_t *) stp_list_item_get_data(item);
@@ -1050,8 +1027,8 @@ stp_set_default_dimension_parameter(stp_vars_t *v, const char *parameter, int iv
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DIMENSION];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_dimension_parameter(%s, %d)\n",
- parameter, ival);
+ stp_deprintf(STP_DBG_VARS, "stp_set_default_dimension_parameter(0x%p, %s, %d)\n",
+ (const void *) v, parameter, ival);
if (!item)
{
val = stp_malloc(sizeof(value_t));
@@ -1069,7 +1046,8 @@ stp_clear_dimension_parameter(stp_vars_t *v, const char *parameter)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DIMENSION];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_clear_dimension_parameter(%s)\n", parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_clear_dimension_parameter(0x%p, %s)\n",
+ (const void *) v, parameter);
if (item)
stp_list_item_destroy(list, item);
stp_set_verified(v, 0);
@@ -1112,8 +1090,8 @@ stp_set_float_parameter(stp_vars_t *v, const char *parameter, double dval)
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DOUBLE];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_float_parameter(%s, %f)\n",
- parameter, dval);
+ stp_deprintf(STP_DBG_VARS, "stp_set_float_parameter(0x%p, %s, %f)\n",
+ (const void *) v, parameter, dval);
if (item)
{
val = (value_t *) stp_list_item_get_data(item);
@@ -1139,8 +1117,8 @@ stp_set_default_float_parameter(stp_vars_t *v, const char *parameter,
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DOUBLE];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_float_parameter(%s, %f)\n",
- parameter, dval);
+ stp_deprintf(STP_DBG_VARS, "stp_set_default_float_parameter(0x%p, %s, %f)\n",
+ (const void *) v, parameter, dval);
if (!item)
{
val = stp_malloc(sizeof(value_t));
@@ -1158,7 +1136,8 @@ stp_clear_float_parameter(stp_vars_t *v, const char *parameter)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DOUBLE];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
- stp_dprintf(STP_DBG_VARS, v, "stp_clear_float_parameter(%s)\n", parameter);
+ stp_deprintf(STP_DBG_VARS, "stp_clear_float_parameter(0x%p, %s)\n",
+ (const void *) v, parameter);
if (item)
stp_list_item_destroy(list, item);
stp_set_verified(v, 0);
@@ -1214,6 +1193,8 @@ stp_scale_float_parameter(stp_vars_t *v, const char *parameter,
val = desc.deflt.dbl;
stp_parameter_description_destroy(&desc);
}
+ stp_deprintf(STP_DBG_VARS, "stp_scale_float_parameter(%p, %s, %f*%f)\n",
+ (const void *) v, parameter, val, scale);
stp_set_float_parameter(v, parameter, val * scale);
}
@@ -1289,12 +1270,15 @@ set_parameter_active_generic(const stp_vars_t *v, stp_parameter_type_t p_type,
((value_t *) stp_list_item_get_data(item))->active = active;
}
-#define SET_PARAMETER_ACTIVE_FUNCTION(type, index) \
-void \
+#define SET_PARAMETER_ACTIVE_FUNCTION(type, index) \
+void \
stp_set_##type##_parameter_active(const stp_vars_t *v, const char *parameter, \
- stp_parameter_activity_t active) \
-{ \
- set_parameter_active_generic(v, index, parameter, active); \
+ stp_parameter_activity_t active) \
+{ \
+ stp_deprintf(STP_DBG_VARS, \
+ "stp_set_%s_parameter_active(0x%p, %s, %d)\n", \
+ #type, (const void *) v, parameter, active); \
+ set_parameter_active_generic(v, index, parameter, active); \
}
SET_PARAMETER_ACTIVE_FUNCTION(string, STP_PARAMETER_TYPE_STRING_LIST)
@@ -1322,9 +1306,9 @@ stp_fill_parameter_settings(stp_parameter_t *desc,
desc->verify_this_parameter = param->verify_this_parameter;
desc->read_only = param->read_only;
desc->name = param->name;
- desc->text = param->text;
- desc->category = param->category;
- desc->help = param->help;
+ desc->text = _(param->text);
+ desc->category = _(param->category);
+ desc->help = _(param->help);
return;
}
}
@@ -1419,6 +1403,86 @@ stp_parameter_list_add_param(stp_parameter_list_t list,
stp_list_item_create(ilist, NULL, item);
}
+static void
+debug_print_parameter_description(const stp_parameter_t *desc, const char *who,
+ const stp_vars_t *v)
+{
+ int i;
+ char *curve;
+ if (! (stp_get_debug_level() & STP_DBG_VARS))
+ return;
+ stp_deprintf(STP_DBG_VARS, "Describe %s: vars 0x%p from %s type %d class %d level %d\n",
+ desc->name, (const void *) v, who,
+ desc->p_type, desc->p_class, desc->p_level);
+ stp_deprintf(STP_DBG_VARS, " driver %s mandatory %d active %d channel %d verify %d ro %d\n",
+ stp_get_driver(v), desc->is_mandatory, desc->is_active,
+ desc->channel, desc->verify_this_parameter, desc->read_only);
+ switch (desc->p_type)
+ {
+ case STP_PARAMETER_TYPE_STRING_LIST:
+ stp_deprintf(STP_DBG_VARS,
+ " String default: %s\n",
+ desc->deflt.str ? desc->deflt.str : "(null)");
+ if (desc->bounds.str)
+ for (i = 0; i < stp_string_list_count(desc->bounds.str); i++)
+ {
+ if (i == 0)
+ stp_deprintf(STP_DBG_VARS, " Choices: %s\n",
+ stp_string_list_param(desc->bounds.str, i)->name);
+ else
+ stp_deprintf(STP_DBG_VARS, " : %s\n",
+ stp_string_list_param(desc->bounds.str, i)->name);
+ }
+ break;
+ case STP_PARAMETER_TYPE_INT:
+ stp_deprintf(STP_DBG_VARS,
+ " Integer default: %d Bounds: %d %d\n",
+ desc->deflt.integer,
+ desc->bounds.integer.lower, desc->bounds.integer.upper);
+ break;
+ case STP_PARAMETER_TYPE_DIMENSION:
+ stp_deprintf(STP_DBG_VARS,
+ " Dimension default: %d Bounds: %d %d\n",
+ desc->deflt.dimension,
+ desc->bounds.dimension.lower, desc->bounds.dimension.upper);
+ break;
+ case STP_PARAMETER_TYPE_BOOLEAN:
+ stp_deprintf(STP_DBG_VARS,
+ " Boolean default: %d\n", desc->deflt.boolean);
+ break;
+ case STP_PARAMETER_TYPE_DOUBLE:
+ stp_deprintf(STP_DBG_VARS,
+ " Double default: %f Bounds: %f %f\n",
+ desc->deflt.dbl,
+ desc->bounds.dbl.lower, desc->bounds.dbl.upper);
+ break;
+ case STP_PARAMETER_TYPE_FILE:
+ stp_deprintf(STP_DBG_VARS, " File (no default)\n");
+ break;
+ case STP_PARAMETER_TYPE_RAW:
+ stp_deprintf(STP_DBG_VARS, " Raw (no default)\n");
+ break;
+ case STP_PARAMETER_TYPE_CURVE:
+ curve = stp_curve_write_string(desc->deflt.curve);
+ stp_deprintf(STP_DBG_VARS,
+ " Curve default: %s\n", curve);
+ stp_free(curve);
+ curve = stp_curve_write_string(desc->bounds.curve);
+ stp_deprintf(STP_DBG_VARS,
+ " bounds: %s\n", curve);
+ stp_free(curve);
+ break;
+ case STP_PARAMETER_TYPE_ARRAY:
+ stp_deprintf(STP_DBG_VARS, " Array\n");
+ break;
+ case STP_PARAMETER_TYPE_INVALID:
+ stp_deprintf(STP_DBG_VARS, " *** Invalid ***\n");
+ break;
+ default:
+ stp_deprintf(STP_DBG_VARS, " Unknown type!\n");
+ }
+}
+
void
stp_describe_parameter(const stp_vars_t *v, const char *name,
stp_parameter_t *description)
@@ -1429,14 +1493,27 @@ stp_describe_parameter(const stp_vars_t *v, const char *name,
description->deflt.str = NULL;
stp_printer_describe_parameter(v, name, description);
if (description->p_type != STP_PARAMETER_TYPE_INVALID)
- return;
+ {
+ debug_print_parameter_description(description, "driver", v);
+ return;
+ }
stp_color_describe_parameter(v, name, description);
if (description->p_type != STP_PARAMETER_TYPE_INVALID)
- return;
+ {
+ debug_print_parameter_description(description, "color", v);
+ return;
+ }
stp_dither_describe_parameter(v, name, description);
if (description->p_type != STP_PARAMETER_TYPE_INVALID)
- return;
+ {
+ debug_print_parameter_description(description, "dither", v);
+ return;
+ }
stpi_describe_generic_parameter(v, name, description);
+ if (description->p_type != STP_PARAMETER_TYPE_INVALID)
+ debug_print_parameter_description(description, "generic", v);
+ else
+ stp_deprintf(STP_DBG_VARS, "Describing invalid parameter %s\n", name);
}
void
diff --git a/src/main/print-weave.c b/src/main/print-weave.c
index ba008b0..d440ef1 100644
--- a/src/main/print-weave.c
+++ b/src/main/print-weave.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-weave.c,v 1.65 2006/07/07 22:34:43 rleigh Exp $"
+ * "$Id: print-weave.c,v 1.65.8.1 2007/03/02 12:01:32 rlk Exp $"
*
* Softweave calculator for Gutenprint.
*
@@ -1151,9 +1151,9 @@ stp_initialize_weave(stp_vars_t *v,
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",
+ " ncolors %d bpp %d width %d (%d) line_count %d first %d last %d max_offset %d\n",
sw->ncolors, sw->bitwidth, linewidth, sw->horizontal_width,
- sw->vertical_height, first_line, last_line);
+ sw->vertical_height, first_line, last_line, maxHeadOffset);
stp_dprintf(STP_DBG_WEAVE_PARAMS, v,
" oversample %d line buffer count %d total buffer %d\n",
sw->oversample, sw->vmod,
diff --git a/src/main/printers.c b/src/main/printers.c
index d182637..9d56976 100644
--- a/src/main/printers.c
+++ b/src/main/printers.c
@@ -1,5 +1,5 @@
/*
- * "$Id: printers.c,v 1.78 2006/04/17 23:33:56 rlk Exp $"
+ * "$Id: printers.c,v 1.79.2.1 2007/05/29 01:47:30 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -368,6 +368,9 @@ stp_initialize_printer_defaults(void)
printer_item = stp_list_get_start(printer_list);
while (printer_item)
{
+ stp_deprintf
+ (STP_DBG_PRINTERS, " ==>init %s\n",
+ ((stp_printer_t *)(stp_list_item_get_data(printer_item)))->driver);
set_printer_defaults
(((stp_printer_t *)(stp_list_item_get_data(printer_item)))->printvars, 1);
printer_item = stp_list_item_next(printer_item);
@@ -725,6 +728,9 @@ stp_verify_printer_params(stp_vars_t *v)
stp_outfunc_t ofunc = stp_get_errfunc(v);
void *odata = stp_get_errdata(v);
+ stp_dprintf(STP_DBG_VARS, v, "** Entering stp_verify_printer_params(0x%p)\n",
+ v);
+
stp_parameter_list_t params;
int nparams;
int i;
@@ -830,6 +836,8 @@ stp_verify_printer_params(stp_vars_t *v)
stp_eprintf(v, "%s", errbuf.data);
stp_free(errbuf.data);
}
+ stp_dprintf(STP_DBG_VARS, v, "** Exiting stp_verify_printer_params(0x%p) => %d\n",
+ v, answer);
return answer;
}
@@ -945,49 +953,79 @@ stp_fill_printvars_from_xmltree(stp_mxml_node_t *prop,
else if (strcmp(p_type, "float") == 0)
{
if (child->type == STP_MXML_TEXT)
- stp_set_float_parameter
- (v, p_name, stp_xmlstrtod(child->value.text.string));
+ {
+ stp_set_float_parameter
+ (v, p_name, stp_xmlstrtod(child->value.text.string));
+ stp_deprintf(STP_DBG_XML, " Set float '%s' to '%s' (%f)\n",
+ p_name, child->value.text.string,
+ stp_get_float_parameter(v, p_name));
+ }
}
else if (strcmp(p_type, "integer") == 0)
{
if (child->type == STP_MXML_TEXT)
- stp_set_int_parameter
- (v, p_name, (int) stp_xmlstrtol(child->value.text.string));
+ {
+ stp_set_int_parameter
+ (v, p_name, (int) stp_xmlstrtol(child->value.text.string));
+ stp_deprintf(STP_DBG_XML, " Set int '%s' to '%s' (%d)\n",
+ p_name, child->value.text.string,
+ stp_get_int_parameter(v, p_name));
+ }
}
else if (strcmp(p_type, "boolean") == 0)
{
if (child->type == STP_MXML_TEXT)
- stp_set_boolean_parameter
- (v, p_name, (int) stp_xmlstrtol(child->value.text.string));
+ {
+ stp_set_boolean_parameter
+ (v, p_name, (int) stp_xmlstrtol(child->value.text.string));
+ stp_deprintf(STP_DBG_XML, " Set bool '%s' to '%s' (%d)\n",
+ p_name, child->value.text.string,
+ stp_get_boolean_parameter(v, p_name));
+ }
}
else if (strcmp(p_type, "string") == 0)
{
if (child->type == STP_MXML_TEXT)
- stp_set_string_parameter
- (v, p_name, child->value.text.string);
+ {
+ stp_set_string_parameter
+ (v, p_name, child->value.text.string);
+ stp_deprintf(STP_DBG_XML, " Set string '%s' to '%s' (%s)\n",
+ p_name, child->value.text.string,
+ stp_get_string_parameter(v, p_name));
+ }
}
else if (strcmp(p_type, "curve") == 0)
{
- stp_curve_t *curve = stp_curve_create_from_xmltree(child);
+ stp_curve_t *curve;
+ while (child->type == STP_MXML_TEXT && child->next)
+ child = child->next;
+ curve = stp_curve_create_from_xmltree(child);
if (curve)
{
stp_set_curve_parameter(v, p_name, curve);
+ stp_deprintf(STP_DBG_XML, " Set curve '%s' to '%s' (%s)\n",
+ p_name, child->value.text.string,
+ stp_curve_write_string(curve));
stp_curve_destroy(curve);
}
}
else if (strcmp(p_type, "array") == 0)
{
- stp_array_t *array = stp_array_create_from_xmltree(child);
+ stp_array_t *array;
+ while (child->type == STP_MXML_TEXT && child->next)
+ child = child->next;
+ array = stp_array_create_from_xmltree(child);
if (array)
{
stp_set_array_parameter(v, p_name, array);
+ stp_deprintf(STP_DBG_XML, " Set array '%s' to '%s'\n",
+ p_name, child->value.text.string);
stp_array_destroy(array);
}
}
else
{
stp_erprintf("Bad property %s type %s\n", p_name, p_type);
- continue;
}
}
}
@@ -1025,10 +1063,11 @@ stp_printvars_create_from_xmltree(stp_mxml_node_t *printer,
strcat(sbuf, stmp);
outprintvars->name = sbuf;
prop = printer->child;
+ stp_deprintf(STP_DBG_XML, ">>stp_printvars_create_from_xmltree: %p, %s\n",
+ outprintvars->printvars, outprintvars->name);
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);
+ stp_deprintf(STP_DBG_XML, "<<stp_printvars_create_from_xmltree: %p, %s\n",
+ outprintvars->printvars, outprintvars->name);
return outprintvars;
}
diff --git a/src/main/printers.xml b/src/main/printers.xml
index c9e444e..b080e60 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.146 2006/07/07 13:11:42 rlk Exp $"
+ "$Id: printers.xml,v 1.157.4.6 2007/06/17 12:37:13 faust3 Exp $"
-->
<gutenprint xmlns="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0"
@@ -38,6 +38,16 @@
<parameters name="gamma_750_params">
<parameter type="float" name="Gamma">0.75</parameter>
</parameters>
+ <parameters name="PIXMA_iP4000_params">
+ <parameter type="float" name="Gamma">0.4</parameter>
+ </parameters>
+ <parameters name="PIXMA_iP4300_params">
+ <parameter type="float" name="Brightness">0.7</parameter>
+ <parameter type="float" name="Density">0.6</parameter>
+ <parameter type="float" name="Contrast">1.7</parameter>
+ <parameter type="float" name="Gamma">0.9</parameter>
+ <parameter type="float" name="BlackGamma">0.6</parameter>
+ </parameters>
<printer name="Canon BJ-30" driver="bjc-30" manufacturer="Canon" model="30" parameters="gamma_2_density_800_params" />
<printer name="Canon BJC-50" driver="bjc-50" manufacturer="Canon" model="4400" parameters="gamma_5_density_800_params" />
<printer name="Canon BJC-55" driver="bjc-55" manufacturer="Canon" model="4400" parameters="gamma_5_density_800_params" />
@@ -64,7 +74,7 @@
<printer name="Canon BJC-8200" driver="bjc-8200" manufacturer="Canon" model="8200" parameters="density_800_params" />
<printer name="Canon S100" driver="bjc-s100" manufacturer="Canon" model="4300" parameters="gamma_750_params" />
<printer name="Canon S200" driver="bjc-s200" manufacturer="Canon" model="4202" parameters="gamma_8_density_900_params" />
- <printer name="Canon S300" driver="bjc-s300" manufacturer="Canon" model="4202" parameters="gamma_8_density_900_params" />
+ <printer name="Canon S300" driver="bjc-s300" manufacturer="Canon" model="8201" parameters="density_800_params" />
<printer name="Canon S400" driver="bjc-s400" manufacturer="Canon" model="3000" parameters="density_800_params" />
<printer name="Canon S450" driver="bjc-s450" manufacturer="Canon" model="6200" parameters="gamma_750_params" />
<printer name="Canon S500" driver="bjc-s500" manufacturer="Canon" model="8200" parameters="density_800_params" />
@@ -72,7 +82,32 @@
<printer name="Canon S630" driver="bjc-s630" manufacturer="Canon" model="8200" parameters="density_800_params" />
<printer name="Canon S800" driver="bjc-s800" manufacturer="Canon" model="8200" parameters="density_800_params" />
<printer name="Canon S4500" driver="bjc-s4500" manufacturer="Canon" model="6500" parameters="gamma_750_params" />
- <printer name="Canon iP4000" driver="bjc-iP4000" manufacturer="Canon" model="4000" />
+ <printer name="Canon PIXMA iP2000" driver="bjc-PIXMA-iP2000" manufacturer="Canon" model="9001" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA iP3000" driver="bjc-PIXMA-iP3000" manufacturer="Canon" model="3999" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA iP3100" driver="bjc-PIXMA-iP3100" manufacturer="Canon" model="3999" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA iP4000" driver="bjc-iP4000" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA iP4100" driver="bjc-PIXMA-iP4100" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA iP4200" driver="bjc-PIXMA-iP4200" manufacturer="Canon" model="4200" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA iP4300" driver="bjc-PIXMA-iP4300" manufacturer="Canon" model="4200" parameters="PIXMA_iP4300_params" />
+ <printer name="Canon PIXMA iP5000" driver="bjc-PIXMA-iP5000" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA iP5200" driver="bjc-PIXMA-iP5200" manufacturer="Canon" model="4200" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA iP6700" driver="bjc-PIXMA-iP6700" manufacturer="Canon" model="4203" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP150" driver="bjc-MULTIPASS-MP150" manufacturer="Canon" model="4201" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP500" driver="bjc-MULTIPASS-MP500" manufacturer="Canon" model="4200" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP700" driver="bjc-MULTIPASS-MP700" manufacturer="Canon" model="3999" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP730" driver="bjc-MULTIPASS-MP730" manufacturer="Canon" model="3999" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP750" driver="bjc-MULTIPASS-MP750" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP760" driver="bjc-MULTIPASS-MP760" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP770" driver="bjc-MULTIPASS-MP770" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP780" driver="bjc-MULTIPASS-MP780" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP790" driver="bjc-MULTIPASS-MP790" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXMA MP830" driver="bjc-MULTIPASS-MP830" manufacturer="Canon" model="9000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXUS iP3100" driver="bjc-PIXUS-iP3100" manufacturer="Canon" model="3999" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon PIXUS iP4100" driver="bjc-PIXUS-iP4100" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon i560" driver="bjc-i560" manufacturer="Canon" model="3999" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon i850" driver="bjc-i850" manufacturer="Canon" model="3999" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon i860" driver="bjc-i860" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
+ <printer name="Canon i865" driver="bjc-i865" manufacturer="Canon" model="4000" parameters="PIXMA_iP4000_params" />
</family>
<family name="escp2">
<parameters name="standard_params">
@@ -93,6 +128,10 @@
<parameter type="float" name="YellowGamma">1.02</parameter>
<parameter type="float" name="Gamma">0.500</parameter>
</parameters>
+ <parameters name="claria_params">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="BlackDensity">0.8</parameter>
+ </parameters>
<printer name="Epson Stylus C20" driver="escp2-c20" manufacturer="Epson" model="42" parameters="480_params" />
<printer name="Epson Stylus C20SX" driver="escp2-c20sx" manufacturer="Epson" model="42" parameters="480_params" />
<printer name="Epson Stylus C20UX" driver="escp2-c20ux" manufacturer="Epson" model="42" parameters="480_params" />
@@ -124,12 +163,14 @@
<printer name="Epson Stylus C66" driver="escp2-c66" manufacturer="Epson" model="66" parameters="standard_params" />
<printer name="Epson Stylus C68" driver="escp2-c68" manufacturer="Epson" model="66" parameters="standard_params" />
<printer name="Epson Stylus C70" driver="escp2-c70" manufacturer="Epson" model="44" parameters="standard_params" />
+ <printer name="Epson Stylus C79" driver="escp2-c79" manufacturer="Epson" model="66" parameters="standard_params" />
<printer name="Epson Stylus C80" driver="escp2-c80" manufacturer="Epson" model="44" parameters="standard_params" />
<printer name="Epson Stylus C82" driver="escp2-c82" manufacturer="Epson" model="55" parameters="standard_params" />
<printer name="Epson Stylus C83" driver="escp2-c83" manufacturer="Epson" model="60" parameters="standard_params" />
<printer name="Epson Stylus C84" driver="escp2-c84" manufacturer="Epson" model="60" parameters="standard_params" />
<printer name="Epson Stylus C85" driver="escp2-c85" manufacturer="Epson" model="69" parameters="standard_params" />
<printer name="Epson Stylus C86" driver="escp2-c86" manufacturer="Epson" model="69" parameters="standard_params" />
+ <printer name="Epson Stylus C87" driver="escp2-c87" manufacturer="Epson" model="69" parameters="standard_params" />
<printer name="Epson Stylus C88" driver="escp2-c88" manufacturer="Epson" model="69" parameters="standard_params" />
<printer name="Epson Stylus Color" driver="escp2" manufacturer="Epson" model="0" parameters="standard_params" />
<printer name="Epson Stylus Color I" driver="escp2-i" manufacturer="Epson" model="0" parameters="standard_params" />
@@ -175,8 +216,8 @@
-->
<printer name="Epson Stylus Photo 785" driver="escp2-785" manufacturer="Epson" model="36" parameters="standard_params" />
<printer name="Epson Stylus Photo 790" driver="escp2-790" manufacturer="Epson" model="35" parameters="standard_params" />
- <printer name="Epson Stylus Photo 810" driver="escp2-810" manufacturer="Epson" model="35" parameters="standard_params" />
- <printer name="Epson Stylus Photo 820" driver="escp2-820" manufacturer="Epson" model="35" parameters="standard_params" />
+ <printer name="Epson Stylus Photo 810" driver="escp2-810" manufacturer="Epson" model="78" parameters="standard_params" />
+ <printer name="Epson Stylus Photo 820" driver="escp2-820" manufacturer="Epson" model="78" parameters="standard_params" />
<printer name="Epson Stylus Photo 825" driver="escp2-825" manufacturer="Epson" model="50" parameters="standard_params" />
<printer name="Epson Stylus Photo 830" driver="escp2-830" manufacturer="Epson" model="50" parameters="standard_params" />
<printer name="Epson Stylus Photo 830U" driver="escp2-830u" manufacturer="Epson" model="50" parameters="standard_params" />
@@ -194,25 +235,41 @@
<printer name="Epson Stylus Photo 1270" driver="escp2-1270" manufacturer="Epson" model="23" parameters="standard_params" />
<printer name="Epson Stylus Photo 1280" driver="escp2-1280" manufacturer="Epson" model="37" parameters="standard_params" />
<printer name="Epson Stylus Photo 1290" driver="escp2-1290" manufacturer="Epson" model="37" parameters="standard_params" />
+ <printer name="Epson Stylus Photo 1400" driver="escp2-1400" manufacturer="Epson" model="82" parameters="claria_params" />
+ <printer name="Epson Stylus Photo 1410" driver="escp2-1410" manufacturer="Epson" model="82" parameters="claria_params" />
<printer name="Epson Stylus Photo 2000P" driver="escp2-2000" manufacturer="Epson" model="26" parameters="standard_params" />
<printer name="Epson Stylus Photo 2100" driver="escp2-2100" manufacturer="Epson" model="47" parameters="standard_params" />
<printer name="Epson Stylus Photo 2200" driver="escp2-2200" manufacturer="Epson" model="47" parameters="standard_params" />
<printer name="Epson Stylus Photo R200" driver="escp2-r200" manufacturer="Epson" model="63" parameters="standard_params" />
<printer name="Epson Stylus Photo R210" driver="escp2-r210" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo R220" driver="escp2-r220" manufacturer="Epson" model="63" parameters="standard_params" />
+ <printer name="Epson Stylus Photo R220" driver="escp2-r220" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo R230" driver="escp2-r230" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo R240" driver="escp2-r240" manufacturer="Epson" model="83" parameters="standard_params" />
+ <printer name="Epson Stylus Photo R245" driver="escp2-r245" manufacturer="Epson" model="83" parameters="standard_params" />
+ <printer name="Epson Stylus Photo R260" driver="escp2-r260" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo R265" driver="escp2-r265" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo R270" driver="escp2-r270" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson Stylus Photo R300" driver="escp2-r300" manufacturer="Epson" model="63" parameters="standard_params" />
<printer name="Epson Stylus Photo R310" driver="escp2-r310" manufacturer="Epson" model="63" parameters="standard_params" />
<printer name="Epson Stylus Photo R320" driver="escp2-r320" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo R340" driver="escp2-r340" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo RX400" driver="escp2-rx400" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo RX420" driver="escp2-rx420" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo RX425" driver="escp2-rx425" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo RX430" driver="escp2-rx430" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo RX500" driver="escp2-rx500" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo RX510" driver="escp2-rx510" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo RX600" driver="escp2-rx600" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo RX620" driver="escp2-rx620" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson Stylus Photo RX630" driver="escp2-rx630" manufacturer="Epson" model="63" parameters="standard_params" />
+ <printer name="Epson Stylus Photo R340" driver="escp2-r340" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo R350" driver="escp2-r350" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo R360" driver="escp2-r360" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo R380" driver="escp2-r380" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo R390" driver="escp2-r390" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo RX400" driver="escp2-rx400" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo RX420" driver="escp2-rx420" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo RX425" driver="escp2-rx425" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo RX430" driver="escp2-rx430" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo RX500" driver="escp2-rx500" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo RX510" driver="escp2-rx510" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo RX560" driver="escp2-rx560" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo RX580" driver="escp2-rx580" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo RX590" driver="escp2-rx590" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson Stylus Photo RX600" driver="escp2-rx600" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo RX620" driver="escp2-rx620" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo RX630" driver="escp2-rx630" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson Stylus Photo RX640" driver="escp2-rx640" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson Stylus Photo RX700" driver="escp2-rx700" manufacturer="Epson" model="70" parameters="standard_params" />
<printer name="Epson Stylus Photo R800" driver="escp2-r800" manufacturer="Epson" model="64" parameters="standard_params" />
<printer name="Epson Stylus Photo R1800" driver="escp2-r1800" manufacturer="Epson" model="67" parameters="standard_params" />
@@ -244,20 +301,24 @@
<printer name="Epson Stylus CX4600" driver="escp2-cx4600" manufacturer="Epson" model="65" parameters="cx3500_params" />
<printer name="Epson Stylus CX4700" driver="escp2-cx4700" manufacturer="Epson" model="65" parameters="cx3500_params" />
<printer name="Epson Stylus CX4800" driver="escp2-cx4800" manufacturer="Epson" model="65" parameters="cx3500_params" />
+ <printer name="Epson Stylus CX5000" driver="escp2-cx5000" manufacturer="Epson" model="65" parameters="cx3500_params" />
+ <printer name="Epson Stylus CX5000F" driver="escp2-cx5000f" manufacturer="Epson" model="65" parameters="cx3500_params" />
<printer name="Epson Stylus CX5100" driver="escp2-cx5100" manufacturer="Epson" model="55" parameters="cx3500_params" />
<printer name="Epson Stylus CX5200" driver="escp2-cx5200" manufacturer="Epson" model="55" parameters="cx3500_params" />
<printer name="Epson Stylus CX5300" driver="escp2-cx5300" manufacturer="Epson" model="55" parameters="cx3500_params" />
<printer name="Epson Stylus CX5400" driver="escp2-cx5400" manufacturer="Epson" model="55" parameters="cx3500_params" />
<printer name="Epson Stylus CX5700" driver="escp2-cx5700" manufacturer="Epson" model="65" parameters="cx3500_params" />
<printer name="Epson Stylus CX5800" driver="escp2-cx5800" manufacturer="Epson" model="65" parameters="cx3500_params" />
+ <printer name="Epson Stylus CX6000" driver="escp2-cx6000" manufacturer="Epson" model="65" parameters="cx3500_params" />
<printer name="Epson Stylus CX6300" driver="escp2-cx6300" manufacturer="Epson" model="60" parameters="cx3500_params" />
- <printer name="Epson Stylus CX6400" driver="escp2-cx6400" manufacturer="Epson" model="60" parameters="cx3500_params" />
- <printer name="Epson Stylus CX6500" driver="escp2-cx6500" manufacturer="Epson" model="69" parameters="cx3500_params" />
- <printer name="Epson Stylus CX6600" driver="escp2-cx6600" manufacturer="Epson" model="69" parameters="cx3500_params" />
- <printer name="Epson Stylus CX7700" driver="escp2-cx7700" manufacturer="Epson" model="65" parameters="cx3500_params" />
+ <printer name="Epson Stylus CX6400" driver="escp2-cx6400" manufacturer="Epson" model="79" parameters="cx3500_params" />
+ <printer name="Epson Stylus CX6500" driver="escp2-cx6500" manufacturer="Epson" model="80" parameters="cx3500_params" />
+ <printer name="Epson Stylus CX6600" driver="escp2-cx6600" manufacturer="Epson" model="80" parameters="cx3500_params" />
+ <printer name="Epson Stylus CX7000F" driver="escp2-cx7000f" manufacturer="Epson" model="65" parameters="cx3500_params" />
+ <printer name="Epson Stylus CX7700" driver="escp2-cx7700" manufacturer="Epson" model="80" parameters="cx3500_params" />
<printer name="Epson Stylus CX7800" driver="escp2-cx7800" manufacturer="Epson" model="65" parameters="cx3500_params" />
- <printer name="Epson Stylus CX8300" driver="escp2-cx8300" manufacturer="Epson" model="60" parameters="cx3500_params" />
- <printer name="Epson Stylus CX8400" driver="escp2-cx8400" manufacturer="Epson" model="60" parameters="cx3500_params" />
+ <printer name="Epson Stylus CX8300" driver="escp2-cx8300" manufacturer="Epson" model="79" parameters="cx3500_params" />
+ <printer name="Epson Stylus CX8400" driver="escp2-cx8400" manufacturer="Epson" model="79" parameters="cx3500_params" />
<printer name="Epson Stylus D68" driver="escp2-d68" manufacturer="Epson" model="66" parameters="standard_params" />
<printer name="Epson Stylus D88" driver="escp2-d88" manufacturer="Epson" model="69" parameters="standard_params" />
<printer name="Epson Stylus DX3800" driver="escp2-dx3800" manufacturer="Epson" model="72" parameters="standard_params" />
@@ -267,6 +328,14 @@
<printer name="Epson Stylus DX4800" driver="escp2-dx4800" manufacturer="Epson" model="65" parameters="standard_params" />
<printer name="Epson PictureMate" driver="escp2-picmate" manufacturer="Epson" model="73" parameters="standard_params" />
<printer name="Epson PictureMate Deluxe" driver="escp2-picmated" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate Flash" driver="escp2-picmateflash" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate Pal" driver="escp2-picmatepal" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate Snap" driver="escp2-picmatesnap" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate 200" driver="escp2-picmate200" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate 210" driver="escp2-picmate210" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate 240" driver="escp2-picmate240" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate 250" driver="escp2-picmate250" manufacturer="Epson" model="73" parameters="standard_params" />
+ <printer name="Epson PictureMate 280" driver="escp2-picmate280" manufacturer="Epson" model="73" parameters="standard_params" />
<printer name="Epson CL 700" driver="escp2-cl700" manufacturer="Epson" model="38" parameters="480_params" />
<printer name="Epson CL 750" driver="escp2-cl750" manufacturer="Epson" model="43" parameters="480_params" />
<printer name="Epson CL 760" driver="escp2-cl760" manufacturer="Epson" model="56" parameters="480_params" />
@@ -314,19 +383,23 @@
<printer name="Epson PM 10000" driver="escp2-pm10000" manufacturer="Epson" model="41" parameters="standard_params" />
<printer name="Epson PM A650" driver="escp2-pma650" manufacturer="Epson" model="74" parameters="standard_params" />
<printer name="Epson PM A750" driver="escp2-pma750" manufacturer="Epson" model="75" parameters="standard_params" />
+ <printer name="Epson PM A820" driver="escp2-pma820" manufacturer="Epson" model="81" parameters="claria_params" />
<printer name="Epson PM A890" driver="escp2-pma890" manufacturer="Epson" model="76" parameters="standard_params" />
<printer name="Epson PM A900" driver="escp2-pma900" manufacturer="Epson" model="70" parameters="standard_params" />
<printer name="Epson PM A950" driver="escp2-pma950" manufacturer="Epson" model="70" parameters="standard_params" />
<printer name="Epson PM D600" driver="escp2-pmd600" manufacturer="Epson" model="77" parameters="standard_params" />
<printer name="Epson PM D750" driver="escp2-pmd750" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson PM D770" driver="escp2-pmd770" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson PM D800" driver="escp2-pmd800" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson PM D1000" driver="escp2-pmd1000" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson PM G700" driver="escp2-pmg700" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson PM G720" driver="escp2-pmg720" manufacturer="Epson" model="63" parameters="standard_params" />
- <printer name="Epson PM G730" driver="escp2-pmg730" manufacturer="Epson" model="63" parameters="standard_params" />
+ <printer name="Epson PM D770" driver="escp2-pmd770" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson PM D800" driver="escp2-pmd800" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson PM D870" driver="escp2-pmd870" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson PM D1000" driver="escp2-pmd1000" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson PM G700" driver="escp2-pmg700" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson PM G720" driver="escp2-pmg720" manufacturer="Epson" model="84" parameters="standard_params" />
+ <printer name="Epson PM G730" driver="escp2-pmg730" manufacturer="Epson" model="84" parameters="standard_params" />
<printer name="Epson PM G800" driver="escp2-pmg800" manufacturer="Epson" model="68" parameters="standard_params" />
<printer name="Epson PM G820" driver="escp2-pmg820" manufacturer="Epson" model="68" parameters="standard_params" />
+ <printer name="Epson PM G850" driver="escp2-pmg850" manufacturer="Epson" model="81" parameters="claria_params" />
+ <printer name="Epson PM G4500" driver="escp2-pmg4500" manufacturer="Epson" model="82" parameters="standard_params" />
<printer name="Epson PX A650" driver="escp2-pxa650" manufacturer="Epson" model="65" parameters="cx3500_params" />
<printer name="Epson PX G900" driver="escp2-pxg900" manufacturer="Epson" model="64" parameters="standard_params" />
<printer name="Epson PX G920" driver="escp2-pxg920" manufacturer="Epson" model="64" parameters="standard_params" />
@@ -724,6 +797,7 @@
<printer name="Lexmark 4076" driver="lexmark-4076" manufacturer="Lexmark" model="500" parameters="pcl_inkjet_params" />
<printer name="Lexmark Optra E" driver="lexmark-optra_e" manufacturer="Lexmark" model="6" parameters="pcl_laser_params" />
<printer name="Lexmark Optra E+" driver="lexmark-optra_eplus" manufacturer="Lexmark" model="6" parameters="pcl_laser_params" />
+ <printer name="Lexmark Optra E220" driver="lexmark-optra_e220" manufacturer="Lexmark" model="6" parameters="pcl_laser_params" />
<printer name="Lexmark Valuewriter 300" driver="lexmark-vw_300" manufacturer="Lexmark" model="2" parameters="pcl_laser_params" />
<printer name="Minolta PagePro 6" driver="minolta-pp_6" manufacturer="Minolta" model="6" parameters="pcl_laser_params" />
<printer name="Minolta PagePro 6e" driver="minolta-pp_6e" manufacturer="Minolta" model="6" parameters="pcl_laser_params" />
@@ -789,6 +863,7 @@
<printer name="Xerox DocuPrint P1202" driver="xerox-dp_p1202" manufacturer="Xerox" model="6" parameters="pcl_laser_params" />
<printer name="Xerox DocuPrint P8e" driver="xerox-dp_p8e" manufacturer="Xerox" model="6" parameters="pcl_laser_params" />
<printer name="Xerox Document Centre 400" driver="xerox-dc_400" manufacturer="Xerox" model="6" parameters="pcl_laser_params" />
+ <printer name="Xerox WorkCentre M118" driver="xerox-wc_m118" manufacturer="Xerox" model="6" parameters="pcl_laser_params" />
</family>
<family name="lexmark">
<parameters name="standard_params">
@@ -796,6 +871,8 @@
<parameter type="float" name="Gamma">0.5</parameter>
<parameter type="float" name="Density">2.0</parameter>
</parameters>
+ <printer name="Compaq IJ1200" driver="compaq-ij1200" manufacturer="Compaq" model="10042" parameters="standard_params" />
+ <printer name="Lexmark X73" driver="lexmark-x73" manufacturer="Lexmark" model="10042" parameters="standard_params" />
<printer name="Lexmark Z42" driver="lexmark-z42" manufacturer="Lexmark" model="10042" parameters="standard_params" />
<printer name="Lexmark Z43" driver="lexmark-z43" manufacturer="Lexmark" model="10042" parameters="standard_params" />
<printer name="Lexmark Z52" driver="lexmark-z52" manufacturer="Lexmark" model="10052" parameters="standard_params" />
@@ -812,6 +889,8 @@
<printer name="Olympus P-330NE" driver="olympus-p330ne" manufacturer="Olympus" model="0" />
<printer name="Olympus P-400" driver="olympus-p400" manufacturer="Olympus" model="1" />
<printer name="Olympus P-440" driver="olympus-p440" manufacturer="Olympus" model="3" />
+ <printer name="Olympus P-S100" driver="olympus-ps100" manufacturer="Olympus" model="20" />
+ <printer name="Canon CP-10" driver="canon-cp10" manufacturer="Canon" model="1002" />
<printer name="Canon CP-100" driver="canon-cp100" manufacturer="Canon" model="1000" />
<printer name="Canon CP-200" driver="canon-cp200" manufacturer="Canon" model="1000" />
<printer name="Canon CP-220" driver="canon-cp220" manufacturer="Canon" model="1001" />
@@ -822,10 +901,15 @@
<printer name="Canon SELPHY-CP-510" driver="canon-cp510" manufacturer="Canon" model="1001" />
<printer name="Canon SELPHY-CP-600" driver="canon-cp600" manufacturer="Canon" model="1001" />
<printer name="Canon SELPHY-CP-710" driver="canon-cp710" manufacturer="Canon" model="1001" />
+ <printer name="Sony DPP-EX5" driver="sony-dppex5" manufacturer="Sony" model="2002" />
+ <printer name="Sony DPP-EX7" driver="sony-dppex5" manufacturer="Sony" model="2002" />
<printer name="Sony UP-DP10" driver="sony-updp10" manufacturer="Sony" model="2000" />
+ <printer name="Sony UP-DR100" driver="sony-updr100" manufacturer="Sony" model="2003" />
<printer name="Sony UP-DR150" driver="sony-updr150" manufacturer="Sony" model="2001" />
<printer name="Fujifilm Printpix-CX-400" driver="fujifilm-cx400" manufacturer="Fujifilm" model="3000" />
<printer name="Fujifilm Printpix-CX-550" driver="fujifilm-cx550" manufacturer="Fujifilm" model="3001" />
+ <printer name="Fujifilm FinePix-NX-500" driver="fujifilm-nx500" manufacturer="Fujifilm" model="3002" />
+ <printer name="Kodak Easyshare-Printer-Dock" driver="kodak-dock" manufacturer="Kodak" model="4000"/>
</family>
<family name="raw">
<printer name="RAW DATA 16 bit" driver="raw-data-16" manufacturer="" model="0" />
diff --git a/src/main/sequence.c b/src/main/sequence.c
index ef69990..83f2b69 100644
--- a/src/main/sequence.c
+++ b/src/main/sequence.c
@@ -1,5 +1,5 @@
/*
- * "$Id: sequence.c,v 1.22 2006/07/07 21:31:02 rleigh Exp $"
+ * "$Id: sequence.c,v 1.23 2006/09/12 19:03:33 easysw Exp $"
*
* Sequence data type. This type is designed to be derived from by
* the curve and dither matrix types.
@@ -277,7 +277,7 @@ stp_sequence_set_point(stp_sequence_t *sequence, size_t where,
{
check_sequence(sequence);
- if (where >= sequence->size || ! finite(data) ||
+ if (where >= sequence->size || ! isfinite(data) ||
data < sequence->blo || data > sequence->bhi)
return 0;
@@ -378,7 +378,7 @@ stp_sequence_create_from_xmltree(stp_mxml_node_t *da)
child->value.text.string);
goto error;
}
- if (! finite(tmpval)
+ if (! isfinite(tmpval)
|| ( tmpval == 0 && errno == ERANGE )
|| tmpval < low
|| tmpval > high)
@@ -484,7 +484,7 @@ stp_sequence_set_##name##_data(stp_sequence_t *sequence, \
\
/* Validate the data before we commit to it. */ \
for (i = 0; i < count; i++) \
- if (! finite(data[i]) || \
+ if (! isfinite(data[i]) || \
data[i] < sequence->blo || \
data[i] > sequence->bhi) \
return 0; \
diff --git a/src/main/util.h b/src/main/util.h
index 701a8eb..7a3fe61 100644
--- a/src/main/util.h
+++ b/src/main/util.h
@@ -1,5 +1,5 @@
/*
- * "$Id: util.h,v 1.33 2006/01/13 16:09:14 rleigh Exp $"
+ * "$Id: util.h,v 1.33.10.1 2007/03/02 12:01:33 rlk Exp $"
*
* Gutenprint header.
*
@@ -58,6 +58,9 @@ extern "C" {
extern void stpi_init_paper(void);
extern void stpi_init_dither(void);
extern void stpi_init_printer(void);
+#define BUFFER_FLAG_FLIP_X 0x1
+#define BUFFER_FLAG_FLIP_Y 0x2
+extern stp_image_t* stpi_buffer_image(stp_image_t* image, unsigned int flags);
/** @} */
@@ -67,5 +70,5 @@ extern void stpi_init_printer(void);
#endif /* GUTENPRINT_INTERNAL_UTIL_H */
/*
- * End of "$Id: util.h,v 1.33 2006/01/13 16:09:14 rleigh Exp $".
+ * End of "$Id: util.h,v 1.33.10.1 2007/03/02 12:01:33 rlk Exp $".
*/
diff --git a/src/main/xml.c b/src/main/xml.c
index ac64537..c43b13b 100644
--- a/src/main/xml.c
+++ b/src/main/xml.c
@@ -1,5 +1,5 @@
/*
- * "$Id: xml.c,v 1.33 2004/09/17 18:38:27 rleigh Exp $"
+ * "$Id: xml.c,v 1.33.18.1 2007/05/29 01:47:30 rlk Exp $"
*
* XML parser - process Gutenprint XML data with mxml.
*
@@ -126,9 +126,7 @@ stp_unregister_xml_preload(const char *name)
static void stpi_xml_process_gutenprint(stp_mxml_node_t *gutenprint, const char *file);
-static char *saved_lc_collate; /* Saved LC_COLLATE */
-static char *saved_lc_ctype; /* Saved LC_CTYPE */
-static char *saved_lc_numeric; /* Saved LC_NUMERIC */
+static char *saved_locale; /* Saved LC_ALL */
static int xml_is_initialised; /* Flag for init */
void
@@ -154,6 +152,8 @@ stp_xml_preinit(void)
void
stp_xml_init(void)
{
+ stp_deprintf(STP_DBG_XML, "stp_xml_init: entering at level %d\n",
+ xml_is_initialised);
if (xml_is_initialised >= 1)
{
xml_is_initialised++;
@@ -161,9 +161,11 @@ stp_xml_init(void)
}
/* Set some locale facets to "C" */
- saved_lc_collate = setlocale(LC_COLLATE, "C");
- saved_lc_ctype = setlocale(LC_CTYPE, "C");
- saved_lc_numeric = setlocale(LC_NUMERIC, "C");
+#ifdef HAVE_LOCALE_H
+ saved_locale = stp_strdup(setlocale(LC_ALL, NULL));
+ stp_deprintf(STP_DBG_XML, "stp_xml_init: saving locale %s\n", saved_locale);
+ setlocale(LC_ALL, "C");
+#endif
xml_is_initialised = 1;
}
@@ -175,6 +177,8 @@ stp_xml_init(void)
void
stp_xml_exit(void)
{
+ stp_deprintf(STP_DBG_XML, "stp_xml_exit: entering at level %d\n",
+ xml_is_initialised);
if (xml_is_initialised > 1) /* don't restore original state */
{
xml_is_initialised--;
@@ -184,9 +188,12 @@ stp_xml_exit(void)
return;
/* Restore locale */
- setlocale(LC_COLLATE, saved_lc_collate);
- setlocale(LC_CTYPE, saved_lc_ctype);
- setlocale(LC_NUMERIC, saved_lc_numeric);
+#ifdef HAVE_LOCALE_H
+ stp_deprintf(STP_DBG_XML, "stp_xml_init: restoring locale %s\n", saved_locale);
+ setlocale(LC_ALL, saved_locale);
+ stp_free(saved_locale);
+ saved_locale = NULL;
+#endif
xml_is_initialised = 0;
}
diff --git a/src/testpattern/Makefile.in b/src/testpattern/Makefile.in
index c5833f9..a58e6a2 100644
--- a/src/testpattern/Makefile.in
+++ b/src/testpattern/Makefile.in
@@ -52,11 +52,12 @@ subdir = src/testpattern
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/gimp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -78,8 +79,8 @@ testpattern_OBJECTS = $(am_testpattern_OBJECTS)
testpattern_DEPENDENCIES = $(am__DEPENDENCIES_1)
SCRIPTS = $(noinst_SCRIPTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp =
-am__depfiles_maybe =
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -109,13 +110,18 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkgdatadir = $(datadir)/$(PACKAGE)/samples
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_CUPS_1_2_FALSE = @BUILD_CUPS_1_2_FALSE@
+BUILD_CUPS_1_2_TRUE = @BUILD_CUPS_1_2_TRUE@
BUILD_CUPS_FALSE = @BUILD_CUPS_FALSE@
+BUILD_CUPS_PPDS = @BUILD_CUPS_PPDS@
BUILD_CUPS_PPDS_FALSE = @BUILD_CUPS_PPDS_FALSE@
BUILD_CUPS_PPDS_TRUE = @BUILD_CUPS_PPDS_TRUE@
BUILD_CUPS_TRUE = @BUILD_CUPS_TRUE@
@@ -141,6 +147,8 @@ BUILD_LIBGUTENPRINTUI_FALSE = @BUILD_LIBGUTENPRINTUI_FALSE@
BUILD_LIBGUTENPRINTUI_TRUE = @BUILD_LIBGUTENPRINTUI_TRUE@
BUILD_MODULES_FALSE = @BUILD_MODULES_FALSE@
BUILD_MODULES_TRUE = @BUILD_MODULES_TRUE@
+BUILD_SIMPLIFIED_CUPS_PPDS_FALSE = @BUILD_SIMPLIFIED_CUPS_PPDS_FALSE@
+BUILD_SIMPLIFIED_CUPS_PPDS_TRUE = @BUILD_SIMPLIFIED_CUPS_PPDS_TRUE@
BUILD_TESTPATTERN_FALSE = @BUILD_TESTPATTERN_FALSE@
BUILD_TESTPATTERN_TRUE = @BUILD_TESTPATTERN_TRUE@
BUILD_TEST_FALSE = @BUILD_TEST_FALSE@
@@ -148,6 +156,7 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
+CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -160,12 +169,14 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
+DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -200,6 +211,7 @@ GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMSGFMT = @GMSGFMT@
GNUCFLAGS = @GNUCFLAGS@
+GREP = @GREP@
GTK2_CFLAGS = @GTK2_CFLAGS@
GTK2_LIBS = @GTK2_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -295,14 +307,17 @@ VERSION = @VERSION@
WHICH_PPDS = @WHICH_PPDS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
-ac_ct_AR = @ac_ct_AR@
+YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -319,6 +334,9 @@ cups_exec_prefix = @cups_exec_prefix@
cups_prefix = @cups_prefix@
cups_sbindir = @cups_sbindir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
gimp2_plug_indir = @gimp2_plug_indir@
gimp_plug_indir = @gimp_plug_indir@
@@ -336,17 +354,21 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -376,9 +398,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/testpattern/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/testpattern/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu --ignore-deps src/testpattern/Makefile
+ $(AUTOMAKE) --gnu src/testpattern/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -454,14 +476,32 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printer_options.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printers.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testpattern.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testpatternl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testpatterny.Po@am__quote@
+
.c.o:
- $(COMPILE) -c $<
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
- $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
.l.c:
$(LEXCOMPILE) $<
@@ -707,6 +747,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool \
clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -732,6 +773,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/testpattern/printer_options.c b/src/testpattern/printer_options.c
index 388e920..444e4b5 100644
--- a/src/testpattern/printer_options.c
+++ b/src/testpattern/printer_options.c
@@ -1,7 +1,7 @@
/*
- * "$Id: printer_options.c,v 1.2 2006/05/28 16:59:05 rlk Exp $"
+ * "$Id: printer_options.c,v 1.2.8.2 2007/03/04 23:57:48 tillkamppeter Exp $"
*
- * Dump the per-printer options for Grant Taylor's *-omatic database
+ * Dump the per-printer options for the OpenPrinting database
*
* Copyright 2000 Robert Krawitz (rlk@alum.mit.edu)
*
@@ -32,11 +32,23 @@ int
main(int argc, char **argv)
{
int i, j, k;
+ int first_arg = 1;
+ stp_string_list_t *printer_list = NULL;
stp_parameter_level_t max_level = STP_PARAMETER_LEVEL_ADVANCED4;
if (argc > 1 && !strcmp(argv[1], "-s"))
- max_level = STP_PARAMETER_LEVEL_BASIC;
+ {
+ max_level = STP_PARAMETER_LEVEL_BASIC;
+ first_arg++;
+ }
stp_init();
+
+ if (argc > first_arg)
+ {
+ printer_list = stp_string_list_create();
+ for (i = 1; i < argc; i++)
+ stp_string_list_add_string(printer_list, argv[i], argv[i]);
+ }
for (i = 0; i < stp_printer_model_count(); i++)
{
stp_parameter_list_t params;
@@ -51,6 +63,8 @@ main(int argc, char **argv)
int printer_is_color = 0;
if (strcmp(family, "ps") == 0 || strcmp(family, "raw") == 0)
continue;
+ if (printer_list && !stp_string_list_is_present(printer_list, driver))
+ continue;
/* Set Job Mode to "Job" as this enables the Duplex option */
stp_set_string_parameter(pv, "JobMode", "Job");
diff --git a/src/testpattern/printers.c b/src/testpattern/printers.c
index d9c5286..21ffd1e 100644
--- a/src/testpattern/printers.c
+++ b/src/testpattern/printers.c
@@ -1,7 +1,7 @@
/*
- * "$Id: printers.c,v 1.6 2004/09/17 18:38:27 rleigh Exp $"
+ * "$Id: printers.c,v 1.6.18.1 2007/03/04 23:57:49 tillkamppeter Exp $"
*
- * Dump the per-printer options for Grant Taylor's *-omatic database
+ * Dump the per-printer options for the OpenPrinting database
*
* Copyright 2000 Robert Krawitz (rlk@alum.mit.edu)
*
diff --git a/src/testpattern/run-testpattern-2.in b/src/testpattern/run-testpattern-2.in
index daba8db..9f0fd5c 100644
--- a/src/testpattern/run-testpattern-2.in
+++ b/src/testpattern/run-testpattern-2.in
@@ -8,9 +8,14 @@ use strict;
my $valgrind = 0;
my $cachegrind = 0;
my $gdb_attach = 0;
+my $calc_md5 = 0;
my $dontrun = 0;
my $retval = 0;
+my $testpattern_command;
my @printer_list = ();
+my @special_options = ();
+my @standard_options = qw(InkType);
+my $global_status = 1;
my @extras = ();
my @messages = ();
@@ -24,7 +29,13 @@ GetOptions("v+" => \$valgrind,
"c" => \$cachegrind,
"g" => \$gdb_attach,
"n" => \$dontrun,
- "s!" => \$skip_duplicate_printers);
+ "s!" => \$skip_duplicate_printers,
+ "o=s" => \@special_options,
+ "m" => \$calc_md5);
+
+if (! @special_options) {
+ @special_options = @standard_options;
+}
my $pwd = `pwd`;
chomp $pwd;
@@ -110,15 +121,10 @@ EOF
return $stuff;
}
-open PIPE, "./printer_options|" or die "Cannot run printer_options: $!\n";
-while(<PIPE>) {
- next if m!^#!;
- eval $_;
-}
-close PIPE or die "Cannot run printer_options: $!\n";
-
+my $extra_arg = "";
if ($#ARGV >= 0) {
@printer_list = @ARGV;
+ $extra_arg = join " ", @printer_list;
} else {
open PIPE, "./printers|" or die "Cannot run printers: $!\n";
while(<PIPE>) {
@@ -129,24 +135,55 @@ if ($#ARGV >= 0) {
close PIPE;
}
-sub do_printer($$) {
+open PIPE, "./printer_options $extra_arg|" or die "Cannot run printer_options: $!\n";
+while(<PIPE>) {
+ next if m!^#!;
+ eval $_;
+}
+close PIPE or die "Cannot run printer_options: $!\n";
+
+sub do_print {
+ my ($output, $fh) = @_;
+ if ($dontrun) {
+ print $output;
+ } elsif ($calc_md5) {
+ open TESTPATTERN, "|$testpattern_command" or
+ die "Can't run $testpattern_command: $!\n";
+ print TESTPATTERN $output;
+ my $status = close TESTPATTERN;
+ if (! $status) {
+ $global_status = 0;
+ }
+ } else {
+ print $fh $output;
+ }
+}
+
+
+sub do_printer {
my ($printer, $fh) = @_;
- my $tmp = $stpdata{$printer}{'Resolution'};
+ my $tmp;
my $min_res_name;
my $min_res_value = 0;
my $first_time = 1;
my $model_id = $models{$printer};
my $family_id = $families{$printer};
+ my $key;
+ my %opt_vals = {};
if ($skip_duplicate_printers && $models_found{$family_id}{$model_id}) {
return;
} else {
$models_found{$family_id}{$model_id} = 1;
}
+ $tmp = $stpdata{$printer}{'Resolution'};
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 $key (@special_options) {
+ $tmp = $stpdata{$printer}{$key};
+ my (@tmp) = grep {$_ ne 'None' } keys %$tmp;
+ $opt_vals{$key} = \@tmp;
+ }
foreach $tmp (sort @resolutions) {
my $res_value = ($stpdata{$printer}{'x_resolution'}{$tmp} *
$stpdata{$printer}{'y_resolution'}{$tmp});
@@ -159,7 +196,7 @@ sub do_printer($$) {
# We don't need to do both resolutions and ink types.
my $pmode;
foreach $pmode (@printing_modes) {
- my ($resolution, $ink_type);
+ my ($resolution);
foreach $resolution (@resolutions) {
@extras = ();
@messages = ();
@@ -173,24 +210,29 @@ sub do_printer($$) {
set_opt("ColorCorrection", "Raw");
set_message(" ${pmode}+${resolution}");
my $output = print_one_testpattern($printer);
- print $fh $output;
+ do_print( $output, $fh );
}
- if ($#ink_types >= 1) {
- foreach $ink_type (@ink_types) {
- @extras = ();
- @messages = ();
- if ($first_time) {
- set_message("$printer\n");
- $first_time = 0;
+ foreach $key (@special_options) {
+ $tmp = $opt_vals{$key};
+ my (@opts) = @$tmp;
+ if ($#opts >= 1) {
+ my $opt;
+ foreach $opt (@opts) {
+ @extras = ();
+ @messages = ();
+ if ($first_time) {
+ set_message("$printer\n");
+ $first_time = 0;
+ }
+ set_opt("PrintingMode", $pmode);
+ set_opt("Resolution", $min_res_name);
+ set_opt($key, $opt);
+ set_opt("DitherAlgorithm", "Fast");
+ set_opt("ColorCorrection", "Raw");
+ set_message(" ${key}=${opt}+${pmode}+${min_res_name}");
+ my $output = print_one_testpattern($printer);
+ do_print( $output, $fh );
}
- 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;
}
}
}
@@ -200,7 +242,6 @@ if ($dontrun) {
map { do_printer($_, \*STDOUT) } @printer_list;
exit 0;
} else {
- my $testpattern_command;
my $valgrind_command;
my $valopts;
if ($cachegrind) {
@@ -215,19 +256,26 @@ if ($dontrun) {
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";
+ $valgrind_command = "valgrind $valopts --num-callers=100 --error-limit=no --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;
+ my $status = 1;
+ if ($calc_md5) {
+ $testpattern_command = "./testpattern > out.prn; a=\$? ; md5sum out.prn; exit \$a";
+ map { do_printer($_) } @printer_list;
+ $status = $global_status;
+ } else {
+ $testpattern_command = "$valgrind_command ./testpattern -n";
+ open TESTPATTERN, "|$testpattern_command" or
+ die "Can't run $testpattern_command: $!\n";
+ $testpattern_command = "$valgrind_command ./testpattern -n";
+ map { do_printer($_, \*TESTPATTERN) } @printer_list;
+ $status = close TESTPATTERN;
+ }
if ($status) {
exit 0;
} else {
diff --git a/src/testpattern/testpatterny.c b/src/testpattern/testpatterny.c
index ede6285..25a082c 100644
--- a/src/testpattern/testpatterny.c
+++ b/src/testpattern/testpatterny.c
@@ -1,7 +1,9 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
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
@@ -15,16 +17,24 @@
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. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
-/* Written by Richard Stallman by simplifying the original so called
- ``semantic'' parser. */
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
@@ -36,6 +46,9 @@
/* Identify Bison output. */
#define YYBISON 1
+/* Bison version. */
+#define YYBISON_VERSION "2.3"
+
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -99,6 +112,7 @@
END = 301
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tSTRING 260
@@ -228,7 +242,12 @@ find_color(const char *name)
# define YYERROR_VERBOSE 0
#endif
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -240,49 +259,171 @@ typedef int YYSTYPE;
/* Copy the second part of user declarations. */
-/* Line 214 of yacc.c. */
-#line 244 "testpatterny.c"
+/* Line 216 of yacc.c. */
+#line 264 "testpatterny.c"
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
+#ifdef short
+# undef short
+#endif
-/* The parser invokes alloca or malloc; define the necessary symbols. */
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
# else
-# ifndef YYSTACK_USE_ALLOCA
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+ int i;
+#endif
+{
+ return i;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
# else
-# if defined (__STDC__) || defined (__cplusplus)
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
# endif
-# define YYSTACK_ALLOC malloc
-# define YYSTACK_FREE free
# endif
-#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-#if (! defined (yyoverflow) \
- && (! defined (__cplusplus) \
- || (YYSTYPE_IS_TRIVIAL)))
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short yyss;
+ yytype_int16 yyss;
YYSTYPE yyvs;
};
@@ -292,24 +433,24 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if 1 < __GNUC__
+# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
- while (0)
+ while (YYID (0))
# endif
# endif
@@ -327,39 +468,33 @@ union yyalloc
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
- while (0)
+ while (YYID (0))
#endif
-#if defined (__STDC__) || defined (__cplusplus)
- typedef signed char yysigned_char;
-#else
- typedef short yysigned_char;
-#endif
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 52
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 54
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 131
+#define YYLAST 134
-/* YYNTOKENS -- Number of terminals. */
+/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 47
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 65
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 115
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 170
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 66
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 117
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 174
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 301
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const unsigned char yytranslate[] =
+static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -397,26 +532,26 @@ static const unsigned char yytranslate[] =
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
-static const unsigned short yyprhs[] =
+static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
19, 22, 25, 28, 31, 34, 37, 41, 43, 45,
47, 49, 51, 53, 55, 58, 62, 66, 70, 74,
77, 80, 83, 86, 89, 93, 95, 97, 101, 105,
- 109, 111, 113, 115, 118, 121, 124, 127, 130, 133,
- 137, 139, 142, 143, 145, 148, 153, 159, 161, 163,
- 165, 168, 169, 171, 173, 175, 181, 185, 188, 191,
- 195, 198, 202, 207, 213, 220, 222, 224, 226, 228,
- 230, 232, 234, 236, 238, 240, 242, 244, 246, 248,
- 250, 252, 254, 256, 258, 260, 262, 264, 266, 268,
- 271, 273, 275, 277, 279, 282, 283, 286, 288, 289,
- 292, 294, 296, 297, 300, 301
+ 109, 113, 115, 117, 119, 121, 124, 127, 130, 133,
+ 136, 139, 143, 145, 148, 149, 151, 154, 159, 165,
+ 167, 169, 171, 174, 175, 177, 179, 181, 187, 191,
+ 194, 197, 201, 204, 208, 213, 219, 226, 228, 230,
+ 232, 234, 236, 238, 240, 242, 244, 246, 248, 250,
+ 252, 254, 256, 258, 260, 262, 264, 266, 268, 270,
+ 272, 274, 277, 279, 281, 283, 285, 288, 289, 292,
+ 294, 295, 298, 300, 302, 303, 306, 307
};
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yysigned_char yyrhs[] =
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int8 yyrhs[] =
{
- 110, 0, -1, 6, -1, 7, -1, 8, -1, 9,
+ 111, 0, -1, 6, -1, 7, -1, 8, -1, 9,
-1, 10, -1, 11, -1, 12, -1, 13, -1, 36,
3, -1, 37, 3, -1, 38, 3, -1, 39, 3,
-1, 40, 3, -1, 41, 3, -1, 31, 3, 3,
@@ -426,71 +561,72 @@ static const yysigned_char yyrhs[] =
14, 3, 4, -1, 14, 4, -1, 16, 3, -1,
17, 4, -1, 18, 5, -1, 44, 5, -1, 44,
3, 3, -1, 66, -1, 67, -1, 19, 5, 5,
- -1, 20, 5, 3, -1, 21, 5, 4, -1, 69,
- -1, 70, -1, 71, -1, 23, 4, -1, 24, 4,
- -1, 25, 4, -1, 26, 4, -1, 27, 4, -1,
- 28, 3, -1, 4, 4, 4, -1, 79, -1, 80,
- 79, -1, -1, 80, -1, 79, 81, -1, 48, 4,
- 4, 4, -1, 35, 3, 4, 4, 4, -1, 83,
- -1, 84, -1, 85, -1, 86, 85, -1, -1, 86,
- -1, 82, -1, 87, -1, 4, 4, 4, 4, 4,
- -1, 29, 89, 88, -1, 30, 88, -1, 33, 3,
- -1, 32, 3, 3, -1, 45, 5, -1, 45, 5,
- 5, -1, 45, 5, 5, 5, -1, 45, 5, 5,
- 5, 5, -1, 45, 5, 5, 5, 5, 5, -1,
- 94, -1, 95, -1, 96, -1, 97, -1, 98, -1,
- 99, -1, 60, -1, 61, -1, 58, -1, 59, -1,
- 62, -1, 63, -1, 64, -1, 65, -1, 72, -1,
- 73, -1, 74, -1, 75, -1, 76, -1, 77, -1,
- 78, -1, 57, -1, 68, -1, 100, -1, 101, 34,
- -1, 90, -1, 91, -1, 92, -1, 100, -1, 103,
- 34, -1, -1, 105, 104, -1, 93, -1, -1, 107,
- 102, -1, 105, -1, 106, -1, -1, 46, 34, -1,
- -1, 107, 111, 108, 109, -1
+ -1, 20, 5, 3, -1, 21, 5, 4, -1, 22,
+ 5, 5, -1, 69, -1, 70, -1, 71, -1, 72,
+ -1, 23, 4, -1, 24, 4, -1, 25, 4, -1,
+ 26, 4, -1, 27, 4, -1, 28, 3, -1, 4,
+ 4, 4, -1, 80, -1, 81, 80, -1, -1, 81,
+ -1, 80, 82, -1, 48, 4, 4, 4, -1, 35,
+ 3, 4, 4, 4, -1, 84, -1, 85, -1, 86,
+ -1, 87, 86, -1, -1, 87, -1, 83, -1, 88,
+ -1, 4, 4, 4, 4, 4, -1, 29, 90, 89,
+ -1, 30, 89, -1, 33, 3, -1, 32, 3, 3,
+ -1, 45, 5, -1, 45, 5, 5, -1, 45, 5,
+ 5, 5, -1, 45, 5, 5, 5, 5, -1, 45,
+ 5, 5, 5, 5, 5, -1, 95, -1, 96, -1,
+ 97, -1, 98, -1, 99, -1, 100, -1, 60, -1,
+ 61, -1, 58, -1, 59, -1, 62, -1, 63, -1,
+ 64, -1, 65, -1, 73, -1, 74, -1, 75, -1,
+ 76, -1, 77, -1, 78, -1, 79, -1, 57, -1,
+ 68, -1, 101, -1, 102, 34, -1, 91, -1, 92,
+ -1, 93, -1, 101, -1, 104, 34, -1, -1, 106,
+ 105, -1, 94, -1, -1, 108, 103, -1, 106, -1,
+ 107, -1, -1, 46, 34, -1, -1, 108, 112, 109,
+ 110, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short yyrline[] =
+static const yytype_uint16 yyrline[] =
{
0, 139, 139, 139, 139, 139, 140, 140, 140, 140,
143, 155, 167, 179, 191, 203, 215, 227, 227, 227,
227, 227, 227, 227, 230, 233, 243, 252, 262, 271,
278, 285, 292, 301, 310, 319, 319, 322, 332, 341,
- 364, 364, 364, 366, 373, 380, 387, 394, 401, 409,
- 424, 424, 427, 427, 430, 433, 447, 460, 460, 463,
- 463, 466, 466, 469, 469, 472, 487, 490, 505, 516,
- 533, 539, 546, 554, 563, 574, 574, 574, 574, 574,
- 577, 580, 580, 580, 580, 580, 580, 581, 581, 581,
- 581, 581, 581, 581, 582, 582, 582, 582, 582, 585,
- 589, 589, 589, 589, 592, 596, 596, 599, 603, 603,
- 606, 606, 609, 609, 614, 613
+ 350, 364, 364, 364, 364, 366, 373, 380, 387, 394,
+ 401, 409, 424, 424, 427, 427, 430, 433, 447, 460,
+ 460, 463, 463, 466, 466, 469, 469, 472, 487, 490,
+ 505, 516, 533, 539, 546, 554, 563, 574, 574, 574,
+ 574, 574, 577, 580, 580, 580, 580, 580, 580, 581,
+ 581, 581, 581, 581, 581, 581, 582, 582, 582, 582,
+ 582, 585, 589, 589, 589, 589, 592, 596, 596, 599,
+ 603, 603, 606, 606, 609, 609, 614, 613
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "tINT", "tDOUBLE", "tSTRING", "CYAN",
- "L_CYAN", "MAGENTA", "L_MAGENTA", "YELLOW", "D_YELLOW", "BLACK",
- "L_BLACK", "GAMMA", "LEVEL", "STEPS", "INK_LIMIT", "PRINTER",
- "PARAMETER", "PARAMETER_INT", "PARAMETER_FLOAT", "PARAMETER_CURVE",
- "DENSITY", "TOP", "LEFT", "HSIZE", "VSIZE", "BLACKLINE", "PATTERN",
- "XPATTERN", "EXTENDED", "IMAGE", "GRID", "SEMI", "CHANNEL", "CMYK",
- "KCMY", "RGB", "CMY", "GRAY", "WHITE", "RAW", "MODE", "PAGESIZE",
- "MESSAGE", "END", "$accept", "COLOR", "cmykspec", "kcmyspec", "rgbspec",
- "cmyspec", "grayspec", "whitespec", "extendedspec", "modespec",
- "inputspec", "level", "channel_level", "gamma", "channel_gamma",
- "global_gamma", "steps", "ink_limit", "printer", "page_size_name",
- "page_size_custom", "page_size", "parameter_string", "parameter_int",
- "parameter_float", "parameter", "density", "top", "left", "hsize",
- "vsize", "blackline", "color_block1", "color_blocks1a",
- "color_blocks1b", "color_blocks1", "color_block2a", "color_block2b",
- "color_block2", "color_blocks2a", "color_blocks2", "color_blocks",
- "patvars", "pattern", "xpattern", "grid", "image", "Message0",
- "Message1", "Message2", "Message3", "Message4", "A_Message", "message",
- "A_Rule", "Rule", "A_Pattern", "Pattern", "Patterns", "Image", "Rules",
+ "$end", "error", "$undefined", "tINT", "tDOUBLE", "tSTRING", "CYAN",
+ "L_CYAN", "MAGENTA", "L_MAGENTA", "YELLOW", "D_YELLOW", "BLACK",
+ "L_BLACK", "GAMMA", "LEVEL", "STEPS", "INK_LIMIT", "PRINTER",
+ "PARAMETER", "PARAMETER_INT", "PARAMETER_FLOAT", "PARAMETER_CURVE",
+ "DENSITY", "TOP", "LEFT", "HSIZE", "VSIZE", "BLACKLINE", "PATTERN",
+ "XPATTERN", "EXTENDED", "IMAGE", "GRID", "SEMI", "CHANNEL", "CMYK",
+ "KCMY", "RGB", "CMY", "GRAY", "WHITE", "RAW", "MODE", "PAGESIZE",
+ "MESSAGE", "END", "$accept", "COLOR", "cmykspec", "kcmyspec", "rgbspec",
+ "cmyspec", "grayspec", "whitespec", "extendedspec", "modespec",
+ "inputspec", "level", "channel_level", "gamma", "channel_gamma",
+ "global_gamma", "steps", "ink_limit", "printer", "page_size_name",
+ "page_size_custom", "page_size", "parameter_string", "parameter_int",
+ "parameter_float", "parameter_curve", "parameter", "density", "top",
+ "left", "hsize", "vsize", "blackline", "color_block1", "color_blocks1a",
+ "color_blocks1b", "color_blocks1", "color_block2a", "color_block2b",
+ "color_block2", "color_blocks2a", "color_blocks2", "color_blocks",
+ "patvars", "pattern", "xpattern", "grid", "image", "Message0",
+ "Message1", "Message2", "Message3", "Message4", "A_Message", "message",
+ "A_Rule", "Rule", "A_Pattern", "Pattern", "Patterns", "Image", "Rules",
"Output", "EOF", "Thing", "@1", 0
};
#endif
@@ -498,7 +634,7 @@ static const char *const yytname[] =
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const unsigned short yytoknum[] =
+static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -509,109 +645,111 @@ static const unsigned short yytoknum[] =
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const unsigned char yyr1[] =
+static const yytype_uint8 yyr1[] =
{
0, 47, 48, 48, 48, 48, 48, 48, 48, 48,
49, 50, 51, 52, 53, 54, 55, 56, 56, 56,
56, 56, 56, 56, 57, 58, 59, 60, 61, 62,
63, 64, 65, 66, 67, 68, 68, 69, 70, 71,
- 72, 72, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 80, 81, 81, 82, 83, 84, 85, 85, 86,
- 86, 87, 87, 88, 88, 89, 90, 91, 92, 93,
- 94, 95, 96, 97, 98, 99, 99, 99, 99, 99,
- 100, 101, 101, 101, 101, 101, 101, 101, 101, 101,
- 101, 101, 101, 101, 101, 101, 101, 101, 101, 102,
- 103, 103, 103, 103, 104, 105, 105, 106, 107, 107,
- 108, 108, 109, 109, 111, 110
+ 72, 73, 73, 73, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 81, 82, 82, 83, 84, 85, 86,
+ 86, 87, 87, 88, 88, 89, 89, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 100, 100,
+ 100, 100, 101, 102, 102, 102, 102, 102, 102, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
+ 102, 103, 104, 104, 104, 104, 105, 106, 106, 107,
+ 108, 108, 109, 109, 110, 110, 112, 111
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const unsigned char yyr2[] =
+static const yytype_uint8 yyr2[] =
{
0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 3, 1, 1, 1,
1, 1, 1, 1, 2, 3, 3, 3, 3, 2,
2, 2, 2, 2, 3, 1, 1, 3, 3, 3,
- 1, 1, 1, 2, 2, 2, 2, 2, 2, 3,
- 1, 2, 0, 1, 2, 4, 5, 1, 1, 1,
- 2, 0, 1, 1, 1, 5, 3, 2, 2, 3,
- 2, 3, 4, 5, 6, 1, 1, 1, 1, 1,
+ 3, 1, 1, 1, 1, 2, 2, 2, 2, 2,
+ 2, 3, 1, 2, 0, 1, 2, 4, 5, 1,
+ 1, 1, 2, 0, 1, 1, 1, 5, 3, 2,
+ 2, 3, 2, 3, 4, 5, 6, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 1, 1, 1, 1, 2, 0, 2, 1, 0, 2,
- 1, 1, 0, 2, 0, 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 1, 1, 1, 2, 0, 2, 1,
+ 0, 2, 1, 1, 0, 2, 0, 4
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
-static const unsigned char yydefact[] =
+static const yytype_uint8 yydefact[] =
{
- 108, 114, 0, 0, 0, 0, 0, 0, 0, 0,
+ 110, 116, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 96, 83, 84, 81, 82, 85, 86, 87, 88, 35,
- 36, 97, 40, 41, 42, 89, 90, 91, 92, 93,
- 94, 95, 75, 76, 77, 78, 79, 80, 98, 0,
- 109, 105, 1, 0, 29, 2, 3, 4, 5, 6,
- 7, 8, 9, 0, 0, 0, 30, 31, 32, 0,
- 0, 0, 43, 44, 45, 46, 47, 48, 0, 0,
- 0, 0, 0, 0, 0, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 33, 70, 99, 0, 107, 110,
- 111, 112, 28, 27, 26, 25, 37, 38, 39, 0,
- 10, 11, 12, 13, 14, 15, 34, 71, 0, 0,
- 61, 0, 100, 101, 102, 103, 0, 106, 0, 115,
- 16, 72, 69, 0, 61, 0, 0, 0, 52, 63,
- 57, 58, 59, 62, 64, 67, 68, 104, 113, 73,
- 0, 66, 0, 0, 0, 50, 53, 54, 60, 74,
- 0, 49, 0, 0, 51, 0, 0, 55, 65, 56
+ 0, 98, 85, 86, 83, 84, 87, 88, 89, 90,
+ 35, 36, 99, 41, 42, 43, 44, 91, 92, 93,
+ 94, 95, 96, 97, 77, 78, 79, 80, 81, 82,
+ 100, 0, 111, 107, 1, 0, 29, 2, 3, 4,
+ 5, 6, 7, 8, 9, 0, 0, 0, 30, 31,
+ 32, 0, 0, 0, 0, 45, 46, 47, 48, 49,
+ 50, 0, 0, 0, 0, 0, 0, 0, 17, 18,
+ 19, 20, 21, 22, 23, 24, 0, 33, 72, 101,
+ 0, 109, 112, 113, 114, 28, 27, 26, 25, 37,
+ 38, 39, 40, 0, 10, 11, 12, 13, 14, 15,
+ 34, 73, 0, 0, 63, 0, 102, 103, 104, 105,
+ 0, 108, 0, 117, 16, 74, 71, 0, 63, 0,
+ 0, 0, 54, 65, 59, 60, 61, 64, 66, 69,
+ 70, 106, 115, 75, 0, 68, 0, 0, 0, 52,
+ 55, 56, 62, 76, 0, 51, 0, 0, 53, 0,
+ 0, 57, 67, 58
};
-/* YYDEFGOTO[NTERM-NUM]. */
-static const short yydefgoto[] =
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
{
- -1, 137, 85, 86, 87, 88, 89, 90, 91, 92,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 138, 156, 157, 139, 140, 141, 142, 143,
- 144, 145, 134, 122, 123, 124, 98, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 126, 127, 99, 100,
- 1, 101, 129, 2, 51
+ -1, 141, 88, 89, 90, 91, 92, 93, 94, 95,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 142, 160, 161, 143, 144, 145, 146,
+ 147, 148, 149, 138, 126, 127, 128, 101, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 130, 131, 102,
+ 103, 1, 104, 133, 2, 53
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -131
-static const short yypact[] =
+#define YYPACT_NINF -118
+static const yytype_int16 yypact[] =
{
- -131, -14, 16, 56, 41, 25, 36, 38, 53, 66,
- 67, 69, 70, 77, 78, 79, 81, 39, 22, 80,
- -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
- -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
- -131, -131, -131, -131, -131, -131, -131, -131, -131, 54,
- -131, 55, -131, 82, -131, -131, -131, -131, -131, -131,
- -131, -131, -131, 85, 86, 87, -131, -131, -131, 88,
- 89, 90, -131, -131, -131, -131, -131, -131, 92, 93,
- 94, 95, 96, 97, 98, -131, -131, -131, -131, -131,
- -131, -131, -131, 99, -131, 100, -131, 101, -131, 12,
- -131, 57, -131, -131, -131, -131, -131, -131, -131, 103,
- -131, -131, -131, -131, -131, -131, -131, 102, 105, 106,
- 11, 108, -131, -131, -131, -131, 75, -131, 83, -131,
- -131, 107, -131, 109, 11, 110, 112, 114, 115, -131,
- -131, -131, -131, 26, -131, -131, -131, -131, -131, 111,
- 116, -131, 117, 118, 119, -131, 115, -131, -131, -131,
- 120, -131, 121, 122, -131, 123, 124, -131, -131, -131
+ -118, -14, 16, 56, 41, 24, 36, 53, 66, 67,
+ 68, 69, 77, 78, 79, 80, 81, 83, 39, 23,
+ 82, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, 54, -118, 57, -118, 86, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, 87, 88, 89, -118, -118,
+ -118, 90, 91, 92, 93, -118, -118, -118, -118, -118,
+ -118, 94, 96, 97, 98, 99, 100, 101, -118, -118,
+ -118, -118, -118, -118, -118, -118, 102, -118, 103, -118,
+ 104, -118, 12, -118, 60, -118, -118, -118, -118, -118,
+ -118, -118, -118, 106, -118, -118, -118, -118, -118, -118,
+ -118, 105, 108, 109, 11, 111, -118, -118, -118, -118,
+ 84, -118, 85, -118, -118, 107, -118, 112, 11, 113,
+ 117, 118, 119, -118, -118, -118, -118, 26, -118, -118,
+ -118, -118, -118, 110, 120, -118, 121, 122, 123, -118,
+ 119, -118, -118, -118, 124, -118, 125, 126, -118, 127,
+ 128, -118, -118, -118
};
/* YYPGOTO[NTERM-NUM]. */
-static const short yypgoto[] =
+static const yytype_int8 yypgoto[] =
{
- -131, 52, -131, -131, -131, -131, -131, -131, -131, -131,
- -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
- -131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
- -131, -131, -130, -131, -131, -131, -131, -131, -13, -131,
- -131, -5, -131, -131, -131, -131, -131, -131, -131, -131,
- -131, -131, -131, 32, -131, -131, -131, -131, -131, -131,
- -131, -131, -131, -131, -131
+ -118, 52, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -117, -118, -118, -118, -118, -118, -26,
+ -118, -118, -5, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, 32, -118, -118, -118, -118, -118,
+ -118, -118, -118, -118, -118, -118
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -619,81 +757,66 @@ static const short yypgoto[] =
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -1
-static const unsigned char yytable[] =
+static const yytype_uint8 yytable[] =
{
- 3, 4, 5, 6, 7, 8, 9, 10, 155, 11,
- 12, 13, 14, 15, 16, 135, 52, 55, 56, 57,
- 58, 59, 60, 61, 62, 93, 164, 94, 66, 17,
- 18, 19, 55, 56, 57, 58, 59, 60, 61, 62,
- 67, 119, 120, 68, 64, 121, 136, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 65, 19, 69, 53,
- 54, 136, 55, 56, 57, 58, 59, 60, 61, 62,
- 78, 70, 71, 72, 73, 79, 80, 81, 82, 83,
- 84, 74, 75, 76, 77, 95, 102, 97, 96, 103,
- 104, 105, 107, 106, 108, 109, 110, 111, 112, 113,
- 114, 115, 116, 128, 118, 117, 130, 131, 132, 147,
- 133, 146, 149, 150, 152, 153, 159, 148, 154, 135,
- 160, 161, 162, 163, 165, 166, 167, 168, 169, 151,
- 158, 125
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 139, 54, 57, 58, 59,
+ 60, 61, 62, 63, 64, 159, 96, 68, 97, 18,
+ 19, 20, 57, 58, 59, 60, 61, 62, 63, 64,
+ 69, 123, 124, 168, 66, 125, 140, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 67, 20, 70, 55,
+ 56, 140, 57, 58, 59, 60, 61, 62, 63, 64,
+ 81, 71, 72, 73, 74, 82, 83, 84, 85, 86,
+ 87, 75, 76, 77, 78, 79, 80, 98, 99, 100,
+ 105, 106, 107, 108, 110, 109, 111, 113, 112, 114,
+ 115, 116, 117, 118, 119, 120, 132, 122, 121, 134,
+ 135, 136, 153, 137, 150, 163, 154, 156, 151, 152,
+ 157, 162, 158, 139, 164, 165, 166, 167, 169, 170,
+ 171, 172, 173, 155, 129
};
-static const unsigned char yycheck[] =
+static const yytype_uint8 yycheck[] =
{
- 14, 15, 16, 17, 18, 19, 20, 21, 138, 23,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 4, 0, 6, 7, 8,
- 9, 10, 11, 12, 13, 3, 156, 5, 3, 43,
+ 9, 10, 11, 12, 13, 142, 3, 3, 5, 43,
44, 45, 6, 7, 8, 9, 10, 11, 12, 13,
- 4, 29, 30, 5, 3, 33, 35, 6, 7, 8,
+ 4, 29, 30, 160, 3, 33, 35, 6, 7, 8,
9, 10, 11, 12, 13, 3, 4, 45, 5, 3,
4, 35, 6, 7, 8, 9, 10, 11, 12, 13,
- 31, 5, 5, 4, 4, 36, 37, 38, 39, 40,
- 41, 4, 4, 4, 3, 5, 4, 32, 34, 4,
- 4, 4, 3, 5, 4, 3, 3, 3, 3, 3,
- 3, 3, 3, 46, 3, 5, 3, 5, 3, 34,
- 4, 3, 5, 4, 4, 3, 5, 34, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 134,
- 143, 99
+ 31, 5, 5, 5, 5, 36, 37, 38, 39, 40,
+ 41, 4, 4, 4, 4, 4, 3, 5, 34, 32,
+ 4, 4, 4, 4, 3, 5, 4, 3, 5, 3,
+ 3, 3, 3, 3, 3, 3, 46, 3, 5, 3,
+ 5, 3, 5, 4, 3, 5, 4, 4, 34, 34,
+ 3, 147, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 138, 102
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
-static const unsigned char yystos[] =
+static const yytype_uint8 yystos[] =
{
- 0, 107, 110, 14, 15, 16, 17, 18, 19, 20,
- 21, 23, 24, 25, 26, 27, 28, 43, 44, 45,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 111, 0, 3, 4, 6, 7, 8, 9, 10,
- 11, 12, 13, 48, 3, 48, 3, 4, 5, 5,
- 5, 5, 4, 4, 4, 4, 4, 3, 31, 36,
- 37, 38, 39, 40, 41, 49, 50, 51, 52, 53,
- 54, 55, 56, 3, 5, 5, 34, 32, 93, 105,
- 106, 108, 4, 4, 4, 4, 5, 3, 4, 3,
- 3, 3, 3, 3, 3, 3, 3, 5, 3, 29,
- 30, 33, 90, 91, 92, 100, 103, 104, 46, 109,
- 3, 5, 3, 4, 89, 4, 35, 48, 79, 82,
- 83, 84, 85, 86, 87, 88, 3, 34, 34, 5,
- 4, 88, 4, 3, 4, 79, 80, 81, 85, 5,
- 4, 4, 4, 4, 79, 4, 4, 4, 4, 4
+ 0, 108, 111, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 43, 44,
+ 45, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 112, 0, 3, 4, 6, 7, 8,
+ 9, 10, 11, 12, 13, 48, 3, 48, 3, 4,
+ 5, 5, 5, 5, 5, 4, 4, 4, 4, 4,
+ 3, 31, 36, 37, 38, 39, 40, 41, 49, 50,
+ 51, 52, 53, 54, 55, 56, 3, 5, 5, 34,
+ 32, 94, 106, 107, 109, 4, 4, 4, 4, 5,
+ 3, 4, 5, 3, 3, 3, 3, 3, 3, 3,
+ 3, 5, 3, 29, 30, 33, 91, 92, 93, 101,
+ 104, 105, 46, 110, 3, 5, 3, 4, 90, 4,
+ 35, 48, 80, 83, 84, 85, 86, 87, 88, 89,
+ 3, 34, 34, 5, 4, 89, 4, 3, 4, 80,
+ 81, 82, 86, 5, 4, 4, 4, 4, 80, 4,
+ 4, 4, 4, 4
};
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
@@ -701,7 +824,8 @@ static const unsigned char yystos[] =
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
+#define YYERROR goto yyerrorlab
+
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
@@ -718,30 +842,63 @@ do \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
+ YYPOPSTACK (1); \
goto yybackup; \
} \
else \
- { \
- yyerror ("syntax error: cannot back up");\
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
-while (0)
+while (YYID (0))
+
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
- are run). */
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- Current.first_line = Rhs[1].first_line; \
- Current.first_column = Rhs[1].first_column; \
- Current.last_line = Rhs[N].last_line; \
- Current.last_column = Rhs[N].last_column;
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
#endif
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
@@ -762,42 +919,96 @@ while (0)
do { \
if (yydebug) \
YYFPRINTF Args; \
-} while (0)
+} while (YYID (0))
-# define YYDSYMPRINT(Args) \
-do { \
- if (yydebug) \
- yysymprint Args; \
-} while (0)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
-# define YYDSYMPRINTF(Title, Token, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yysymprint (stderr, \
- Token, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (0)
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded). |
+| TOP (included). |
`------------------------------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (short *bottom, short *top)
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
yy_stack_print (bottom, top)
- short *bottom;
- short *top;
+ yytype_int16 *bottom;
+ yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (/* Nothing. */; bottom <= top; ++bottom)
+ for (; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
@@ -806,45 +1017,52 @@ yy_stack_print (bottom, top)
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
-} while (0)
+} while (YYID (0))
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_reduce_print (int yyrule)
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
#else
static void
-yy_reduce_print (yyrule)
+yy_reduce_print (yyvsp, yyrule)
+ YYSTYPE *yyvsp;
int yyrule;
#endif
{
+ int yynrhs = yyr2[yyrule];
int yyi;
- unsigned int yylineno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylineno);
- /* Print the symbols being reduced, and their result. */
- for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ fprintf (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ fprintf (stderr, "\n");
+ }
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
- yy_reduce_print (Rule); \
-} while (0)
+ yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
@@ -859,13 +1077,9 @@ int yydebug;
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
@@ -875,45 +1089,47 @@ int yydebug;
#if YYERROR_VERBOSE
# ifndef yystrlen
-# if defined (__GLIBC__) && defined (_STRING_H)
+# if defined __GLIBC__ && defined _STRING_H
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
-# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
-# else
+#else
+static YYSIZE_T
yystrlen (yystr)
- const char *yystr;
-# endif
+ const char *yystr;
+#endif
{
- register const char *yys = yystr;
-
- while (*yys++ != '\0')
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
continue;
-
- return yys - yystr - 1;
+ return yylen;
}
# endif
# endif
# ifndef yystpcpy
-# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static char *
-# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
-# else
+#else
+static char *
yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-# endif
+ char *yydest;
+ const char *yysrc;
+#endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -923,70 +1139,192 @@ yystpcpy (yydest, yysrc)
# endif
# endif
-#endif /* !YYERROR_VERBOSE */
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
-
+ if (! yyres)
+ return yystrlen (yystr);
-#if YYDEBUG
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yysymprint (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
{
- /* Pacify ``unused variable'' warnings. */
- (void) yyvaluep;
+ int yyn = yypact[yystate];
- if (yytype < YYNTOKENS)
- {
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
- }
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- switch (yytype)
{
- default:
- break;
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
}
- YYFPRINTF (yyoutput, ")");
}
+#endif /* YYERROR_VERBOSE */
+
-#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-#if defined (__STDC__) || defined (__cplusplus)
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
-yydestruct (yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
#endif
{
- /* Pacify ``unused variable'' warnings. */
- (void) yyvaluep;
+ YYUSE (yyvaluep);
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
default:
- break;
+ break;
}
}
@@ -994,13 +1332,13 @@ yydestruct (yytype, yyvaluep)
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
+#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
-# else
+#else
int yyparse ();
-# endif
+#endif
#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
+#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
@@ -1009,10 +1347,10 @@ int yyparse ();
-/* The lookahead symbol. */
+/* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
@@ -1025,14 +1363,18 @@ int yynerrs;
`----------*/
#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM)
-# else
-int yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-# endif
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
#else
@@ -1043,13 +1385,19 @@ yyparse ()
#endif
{
- register int yystate;
- register int yyn;
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Lookahead token as an internal (translated) token number. */
+ /* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
/* Three stacks and their tools:
`yyss': related to states,
@@ -1060,18 +1408,18 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- short yyssa[YYINITDEPTH];
- short *yyss = yyssa;
- register short *yyssp;
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
-#define YYPOPSTACK (yyvsp--, yyssp--)
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
YYSIZE_T yystacksize = YYINITDEPTH;
@@ -1080,9 +1428,9 @@ yyparse ()
YYSTYPE yyval;
- /* When reducing, the number of symbols on the RHS of the reduced
- rule. */
- int yylen;
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1106,8 +1454,7 @@ yyparse ()
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks.
- */
+ have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
yysetstate:
@@ -1120,18 +1467,18 @@ yyparse ()
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
+ /* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
- yyoverflow ("parser stack overflow",
+ yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
@@ -1142,21 +1489,21 @@ yyparse ()
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
- short *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
@@ -1187,19 +1534,17 @@ yyparse ()
`-----------*/
yybackup:
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to lookahead token. */
+ /* Do appropriate processing given the current state. Read a
+ look-ahead token if we need one and don't already have one. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1214,7 +1559,7 @@ yybackup:
else
{
yytoken = YYTRANSLATE (yychar);
- YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
@@ -1234,22 +1579,21 @@ yybackup:
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
- YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
yystate = yyn;
+ *++yyvsp = yylval;
+
goto yynewstate;
@@ -1288,12 +1632,12 @@ yyreduce:
#line 144 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>cmykspec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>cmykspec %d\n", (yyvsp[(2) - (2)].ival));
global_image_type = "CMYK";
global_channel_depth = 4;
global_invert_data = 0;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[(2) - (2)].ival) == 8 || (yyvsp[(2) - (2)].ival) == 16)
+ global_bit_depth = (yyvsp[(2) - (2)].ival);
}
break;
@@ -1301,12 +1645,12 @@ yyreduce:
#line 156 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>kcmyspec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>kcmyspec %d\n", (yyvsp[(2) - (2)].ival));
global_image_type = "KCMY";
global_channel_depth = 4;
global_invert_data = 0;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[(2) - (2)].ival) == 8 || (yyvsp[(2) - (2)].ival) == 16)
+ global_bit_depth = (yyvsp[(2) - (2)].ival);
}
break;
@@ -1314,12 +1658,12 @@ yyreduce:
#line 168 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>rgbspec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>rgbspec %d\n", (yyvsp[(2) - (2)].ival));
global_image_type = "RGB";
global_channel_depth = 3;
global_invert_data = 1;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[(2) - (2)].ival) == 8 || (yyvsp[(2) - (2)].ival) == 16)
+ global_bit_depth = (yyvsp[(2) - (2)].ival);
}
break;
@@ -1327,12 +1671,12 @@ yyreduce:
#line 180 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>cmyspec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>cmyspec %d\n", (yyvsp[(2) - (2)].ival));
global_image_type = "CMY";
global_channel_depth = 3;
global_invert_data = 0;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[(2) - (2)].ival) == 8 || (yyvsp[(2) - (2)].ival) == 16)
+ global_bit_depth = (yyvsp[(2) - (2)].ival);
}
break;
@@ -1340,12 +1684,12 @@ yyreduce:
#line 192 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>grayspec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>grayspec %d\n", (yyvsp[(2) - (2)].ival));
global_image_type = "Grayscale";
global_channel_depth = 1;
global_invert_data = 0;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[(2) - (2)].ival) == 8 || (yyvsp[(2) - (2)].ival) == 16)
+ global_bit_depth = (yyvsp[(2) - (2)].ival);
}
break;
@@ -1353,12 +1697,12 @@ yyreduce:
#line 204 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>whitespec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>whitespec %d\n", (yyvsp[(2) - (2)].ival));
global_image_type = "Whitescale";
global_channel_depth = 1;
global_invert_data = 1;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[(2) - (2)].ival) == 8 || (yyvsp[(2) - (2)].ival) == 16)
+ global_bit_depth = (yyvsp[(2) - (2)].ival);
}
break;
@@ -1366,23 +1710,23 @@ yyreduce:
#line 216 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>extendedspec %d\n", yyvsp[-1].ival);
+ fprintf(stderr, ">>>extendedspec %d\n", (yyvsp[(2) - (3)].ival));
global_image_type = "Raw";
global_invert_data = 0;
- global_channel_depth = yyvsp[-1].ival;
- if (yyvsp[-1].ival == 8 || yyvsp[-1].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ global_channel_depth = (yyvsp[(2) - (3)].ival);
+ if ((yyvsp[(2) - (3)].ival) == 8 || (yyvsp[(2) - (3)].ival) == 16)
+ global_bit_depth = (yyvsp[(3) - (3)].ival);
}
break;
case 25:
#line 234 "testpatterny.y"
{
- int channel = find_color(yyvsp[-1].sval);
+ int channel = find_color((yyvsp[(2) - (3)]).sval);
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>level %s %f\n", yyvsp[-1].sval, yyvsp[0].dval);
+ fprintf(stderr, ">>>level %s %f\n", (yyvsp[(2) - (3)]).sval, (yyvsp[(3) - (3)].dval));
if (channel >= 0)
- global_levels[channel] = yyvsp[0].dval;
+ global_levels[channel] = (yyvsp[(3) - (3)].dval);
}
break;
@@ -1390,20 +1734,20 @@ yyreduce:
#line 244 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>channel_level %d %f\n", yyvsp[-1].ival, yyvsp[0].dval);
- if (yyvsp[-1].ival >= 0 && yyvsp[-1].ival <= STP_CHANNEL_LIMIT)
- global_levels[yyvsp[-1].ival] = yyvsp[0].dval;
+ fprintf(stderr, ">>>channel_level %d %f\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].dval));
+ if ((yyvsp[(2) - (3)].ival) >= 0 && (yyvsp[(2) - (3)].ival) <= STP_CHANNEL_LIMIT)
+ global_levels[(yyvsp[(2) - (3)].ival)] = (yyvsp[(3) - (3)].dval);
}
break;
case 27:
#line 253 "testpatterny.y"
{
- int channel = find_color(yyvsp[-1].sval);
+ int channel = find_color((yyvsp[(2) - (3)]).sval);
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>gamma %s %f\n", yyvsp[-1].sval, yyvsp[0].dval);
+ fprintf(stderr, ">>>gamma %s %f\n", (yyvsp[(2) - (3)]).sval, (yyvsp[(3) - (3)].dval));
if (channel >= 0)
- global_gammas[channel] = yyvsp[0].dval;
+ global_gammas[channel] = (yyvsp[(3) - (3)].dval);
}
break;
@@ -1411,9 +1755,9 @@ yyreduce:
#line 263 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>channel_gamma %d %f\n", yyvsp[-1].ival, yyvsp[0].dval);
- if (yyvsp[-1].ival >= 0 && yyvsp[-1].ival <= STP_CHANNEL_LIMIT)
- global_gammas[yyvsp[-1].ival] = yyvsp[0].dval;
+ fprintf(stderr, ">>>channel_gamma %d %f\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].dval));
+ if ((yyvsp[(2) - (3)].ival) >= 0 && (yyvsp[(2) - (3)].ival) <= STP_CHANNEL_LIMIT)
+ global_gammas[(yyvsp[(2) - (3)].ival)] = (yyvsp[(3) - (3)].dval);
}
break;
@@ -1421,8 +1765,8 @@ yyreduce:
#line 272 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>global_gamma %f\n", yyvsp[0].dval);
- global_gamma = yyvsp[0].dval;
+ fprintf(stderr, ">>>global_gamma %f\n", (yyvsp[(2) - (2)].dval));
+ global_gamma = (yyvsp[(2) - (2)].dval);
}
break;
@@ -1430,8 +1774,8 @@ yyreduce:
#line 279 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>steps %d\n", yyvsp[0].ival);
- global_steps = yyvsp[0].ival;
+ fprintf(stderr, ">>>steps %d\n", (yyvsp[(2) - (2)].ival));
+ global_steps = (yyvsp[(2) - (2)].ival);
}
break;
@@ -1439,8 +1783,8 @@ yyreduce:
#line 286 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>ink_limit %f\n", yyvsp[0].dval);
- global_ink_limit = yyvsp[0].dval;
+ fprintf(stderr, ">>>ink_limit %f\n", (yyvsp[(2) - (2)].dval));
+ global_ink_limit = (yyvsp[(2) - (2)].dval);
}
break;
@@ -1448,9 +1792,9 @@ yyreduce:
#line 293 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>printer %s\n", yyvsp[0].sval);
- global_printer = strdup(yyvsp[0].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, ">>>printer %s\n", (yyvsp[(2) - (2)].sval));
+ global_printer = strdup((yyvsp[(2) - (2)].sval));
+ free((yyvsp[(2) - (2)].sval));
}
break;
@@ -1458,9 +1802,9 @@ yyreduce:
#line 302 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>page_size_name %s\n", yyvsp[0].sval);
- stp_set_string_parameter(global_vars, "PageSize", yyvsp[0].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, ">>>page_size_name %s\n", (yyvsp[(2) - (2)].sval));
+ stp_set_string_parameter(global_vars, "PageSize", (yyvsp[(2) - (2)].sval));
+ free((yyvsp[(2) - (2)].sval));
}
break;
@@ -1468,9 +1812,9 @@ yyreduce:
#line 311 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>page_size_custom %d %d\n", yyvsp[-1].ival, yyvsp[0].ival);
- stp_set_page_width(global_vars, yyvsp[-1].ival);
- stp_set_page_height(global_vars, yyvsp[0].ival);
+ fprintf(stderr, ">>>page_size_custom %d %d\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival));
+ stp_set_page_width(global_vars, (yyvsp[(2) - (3)].ival));
+ stp_set_page_height(global_vars, (yyvsp[(3) - (3)].ival));
}
break;
@@ -1478,10 +1822,10 @@ yyreduce:
#line 323 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>parameter_string %s %s\n", yyvsp[-1].sval, yyvsp[0].sval);
- stp_set_string_parameter(global_vars, yyvsp[-1].sval, yyvsp[0].sval);
- free(yyvsp[-1].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, ">>>parameter_string %s %s\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval));
+ stp_set_string_parameter(global_vars, (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval));
+ free((yyvsp[(2) - (3)].sval));
+ free((yyvsp[(3) - (3)].sval));
}
break;
@@ -1489,9 +1833,9 @@ yyreduce:
#line 333 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>parameter_int %s %d\n", yyvsp[-1].sval, yyvsp[0].ival);
- stp_set_int_parameter(global_vars, yyvsp[-1].sval, yyvsp[0].ival);
- free(yyvsp[-1].sval);
+ fprintf(stderr, ">>>parameter_int %s %d\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].ival));
+ stp_set_int_parameter(global_vars, (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].ival));
+ free((yyvsp[(2) - (3)].sval));
}
break;
@@ -1499,128 +1843,143 @@ yyreduce:
#line 342 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>parameter_float %s %f\n", yyvsp[-1].sval, yyvsp[0].dval);
- stp_set_float_parameter(global_vars, yyvsp[-1].sval, yyvsp[0].dval);
- free(yyvsp[-1].sval);
+ fprintf(stderr, ">>>parameter_float %s %f\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].dval));
+ stp_set_float_parameter(global_vars, (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].dval));
+ free((yyvsp[(2) - (3)].sval));
+ }
+ break;
+
+ case 40:
+#line 351 "testpatterny.y"
+ {
+ stp_curve_t *curve = stp_curve_create_from_string((yyvsp[(3) - (3)].sval));
+ if (getenv("STP_TESTPATTERN_DEBUG"))
+ fprintf(stderr, ">>>parameter_curve %s %s\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval));
+ if (curve)
+ {
+ stp_set_curve_parameter(global_vars, (yyvsp[(2) - (3)].sval), curve);
+ stp_curve_destroy(curve);
+ }
+ free((yyvsp[(2) - (3)].sval));
}
break;
- case 43:
+ case 45:
#line 367 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>density %f\n", yyvsp[0].dval);
- global_density = yyvsp[0].dval;
+ fprintf(stderr, ">>>density %f\n", (yyvsp[(2) - (2)].dval));
+ global_density = (yyvsp[(2) - (2)].dval);
}
break;
- case 44:
+ case 46:
#line 374 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>top %f\n", yyvsp[0].dval);
- global_xtop = yyvsp[0].dval;
+ fprintf(stderr, ">>>top %f\n", (yyvsp[(2) - (2)].dval));
+ global_xtop = (yyvsp[(2) - (2)].dval);
}
break;
- case 45:
+ case 47:
#line 381 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>left %f\n", yyvsp[0].dval);
- global_xleft = yyvsp[0].dval;
+ fprintf(stderr, ">>>left %f\n", (yyvsp[(2) - (2)].dval));
+ global_xleft = (yyvsp[(2) - (2)].dval);
}
break;
- case 46:
+ case 48:
#line 388 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>hsize %f\n", yyvsp[0].dval);
- global_hsize = yyvsp[0].dval;
+ fprintf(stderr, ">>>hsize %f\n", (yyvsp[(2) - (2)].dval));
+ global_hsize = (yyvsp[(2) - (2)].dval);
}
break;
- case 47:
+ case 49:
#line 395 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>vsize %f\n", yyvsp[0].dval);
- global_vsize = yyvsp[0].dval;
+ fprintf(stderr, ">>>vsize %f\n", (yyvsp[(2) - (2)].dval));
+ global_vsize = (yyvsp[(2) - (2)].dval);
}
break;
- case 48:
+ case 50:
#line 402 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>blackline %d\n", yyvsp[0].ival);
- global_noblackline = !(yyvsp[0].ival);
+ fprintf(stderr, ">>>blackline %d\n", (yyvsp[(2) - (2)].ival));
+ global_noblackline = !((yyvsp[(2) - (2)].ival));
}
break;
- case 49:
+ case 51:
#line 410 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>color_block1 %f %f %f (%d)\n", yyvsp[-2].dval, yyvsp[-1].dval, yyvsp[0].dval,
+ fprintf(stderr, ">>>color_block1 %f %f %f (%d)\n", (yyvsp[(1) - (3)].dval), (yyvsp[(2) - (3)].dval), (yyvsp[(3) - (3)].dval),
current_index);
if (current_index < STP_CHANNEL_LIMIT)
{
- current_testpattern->d.p.mins[current_index] = yyvsp[-2].dval;
- current_testpattern->d.p.vals[current_index] = yyvsp[-1].dval;
- current_testpattern->d.p.gammas[current_index] = yyvsp[0].dval;
+ current_testpattern->d.p.mins[current_index] = (yyvsp[(1) - (3)].dval);
+ current_testpattern->d.p.vals[current_index] = (yyvsp[(2) - (3)].dval);
+ current_testpattern->d.p.gammas[current_index] = (yyvsp[(3) - (3)].dval);
current_index++;
}
}
break;
- case 55:
+ case 57:
#line 434 "testpatterny.y"
{
- int channel = find_color(yyvsp[-3].sval);
+ int channel = find_color((yyvsp[(1) - (4)]).sval);
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>color_block2a %s %f %f %f\n", yyvsp[-3].sval, yyvsp[-2].dval, yyvsp[-1].dval, yyvsp[0].dval);
+ fprintf(stderr, ">>>color_block2a %s %f %f %f\n", (yyvsp[(1) - (4)]).sval, (yyvsp[(2) - (4)].dval), (yyvsp[(3) - (4)].dval), (yyvsp[(4) - (4)].dval));
if (channel >= 0 && channel < STP_CHANNEL_LIMIT)
{
- current_testpattern->d.p.mins[channel] = yyvsp[-2].dval;
- current_testpattern->d.p.vals[channel] = yyvsp[-1].dval;
- current_testpattern->d.p.gammas[channel] = yyvsp[0].dval;
+ current_testpattern->d.p.mins[channel] = (yyvsp[(2) - (4)].dval);
+ current_testpattern->d.p.vals[channel] = (yyvsp[(3) - (4)].dval);
+ current_testpattern->d.p.gammas[channel] = (yyvsp[(4) - (4)].dval);
}
}
break;
- case 56:
+ case 58:
#line 448 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>color_block2b %d %f %f %f\n", yyvsp[-3].ival, yyvsp[-2].dval, yyvsp[-1].dval, yyvsp[0].dval);
- if (yyvsp[-3].ival >= 0 && yyvsp[-3].ival < STP_CHANNEL_LIMIT)
+ fprintf(stderr, ">>>color_block2b %d %f %f %f\n", (yyvsp[(2) - (5)].ival), (yyvsp[(3) - (5)].dval), (yyvsp[(4) - (5)].dval), (yyvsp[(5) - (5)].dval));
+ if ((yyvsp[(2) - (5)].ival) >= 0 && (yyvsp[(2) - (5)].ival) < STP_CHANNEL_LIMIT)
{
- current_testpattern->d.p.mins[yyvsp[-3].ival] = yyvsp[-2].dval;
- current_testpattern->d.p.vals[yyvsp[-3].ival] = yyvsp[-1].dval;
- current_testpattern->d.p.gammas[yyvsp[-3].ival] = yyvsp[0].dval;
+ current_testpattern->d.p.mins[(yyvsp[(2) - (5)].ival)] = (yyvsp[(3) - (5)].dval);
+ current_testpattern->d.p.vals[(yyvsp[(2) - (5)].ival)] = (yyvsp[(4) - (5)].dval);
+ current_testpattern->d.p.gammas[(yyvsp[(2) - (5)].ival)] = (yyvsp[(5) - (5)].dval);
}
}
break;
- case 65:
+ case 67:
#line 473 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>patvars %f %f %f %f %f\n", yyvsp[-4].dval, yyvsp[-3].dval, yyvsp[-2].dval, yyvsp[-1].dval, yyvsp[0].dval);
+ fprintf(stderr, ">>>patvars %f %f %f %f %f\n", (yyvsp[(1) - (5)].dval), (yyvsp[(2) - (5)].dval), (yyvsp[(3) - (5)].dval), (yyvsp[(4) - (5)].dval), (yyvsp[(5) - (5)].dval));
current_testpattern->t = E_PATTERN;
- current_testpattern->d.p.lower = yyvsp[-4].dval;
- current_testpattern->d.p.upper = yyvsp[-3].dval;
- current_testpattern->d.p.levels[1] = yyvsp[-2].dval;
- current_testpattern->d.p.levels[2] = yyvsp[-1].dval;
- current_testpattern->d.p.levels[3] = yyvsp[0].dval;
+ current_testpattern->d.p.lower = (yyvsp[(1) - (5)].dval);
+ current_testpattern->d.p.upper = (yyvsp[(2) - (5)].dval);
+ current_testpattern->d.p.levels[1] = (yyvsp[(3) - (5)].dval);
+ current_testpattern->d.p.levels[2] = (yyvsp[(4) - (5)].dval);
+ current_testpattern->d.p.levels[3] = (yyvsp[(5) - (5)].dval);
current_testpattern = get_next_testpattern();
current_index = 0;
}
break;
- case 67:
+ case 69:
#line 491 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
@@ -1636,26 +1995,26 @@ yyreduce:
}
break;
- case 68:
+ case 70:
#line 506 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>grid %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>grid %d\n", (yyvsp[(2) - (2)].ival));
current_testpattern->t = E_GRID;
- current_testpattern->d.g.ticks = yyvsp[0].ival;
+ current_testpattern->d.g.ticks = (yyvsp[(2) - (2)].ival);
current_testpattern = get_next_testpattern();
current_index = 0;
}
break;
- case 69:
+ case 71:
#line 517 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>image %d %d\n", yyvsp[-1].ival, yyvsp[0].ival);
+ fprintf(stderr, ">>>image %d %d\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival));
current_testpattern->t = E_IMAGE;
- current_testpattern->d.i.x = yyvsp[-1].ival;
- current_testpattern->d.i.y = yyvsp[0].ival;
+ current_testpattern->d.i.x = (yyvsp[(2) - (3)].ival);
+ current_testpattern->d.i.y = (yyvsp[(3) - (3)].ival);
if (current_testpattern->d.i.x <= 0 ||
current_testpattern->d.i.y <= 0)
{
@@ -1666,77 +2025,77 @@ yyreduce:
}
break;
- case 70:
+ case 72:
#line 534 "testpatterny.y"
{
- fprintf(stderr, yyvsp[0].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr,"%s",(yyvsp[(2) - (2)].sval));
+ free((yyvsp[(2) - (2)].sval));
}
break;
- case 71:
+ case 73:
#line 540 "testpatterny.y"
{
- fprintf(stderr, yyvsp[-1].sval, yyvsp[0].sval);
- free(yyvsp[-1].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr,"%s%s", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval));
+ free((yyvsp[(2) - (3)].sval));
+ free((yyvsp[(3) - (3)].sval));
}
break;
- case 72:
+ case 74:
#line 547 "testpatterny.y"
{
- fprintf(stderr, yyvsp[-2].sval, yyvsp[-1].sval, yyvsp[0].sval);
- free(yyvsp[-2].sval);
- free(yyvsp[-1].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr,"%s%s%s", (yyvsp[(2) - (4)].sval), (yyvsp[(3) - (4)].sval), (yyvsp[(4) - (4)].sval));
+ free((yyvsp[(2) - (4)].sval));
+ free((yyvsp[(3) - (4)].sval));
+ free((yyvsp[(4) - (4)].sval));
}
break;
- case 73:
+ case 75:
#line 555 "testpatterny.y"
{
- fprintf(stderr, yyvsp[-3].sval, yyvsp[-2].sval, yyvsp[-1].sval, yyvsp[0].sval);
- free(yyvsp[-3].sval);
- free(yyvsp[-2].sval);
- free(yyvsp[-1].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, "%s%s%s%s", (yyvsp[(2) - (5)].sval), (yyvsp[(3) - (5)].sval), (yyvsp[(4) - (5)].sval), (yyvsp[(5) - (5)].sval));
+ free((yyvsp[(2) - (5)].sval));
+ free((yyvsp[(3) - (5)].sval));
+ free((yyvsp[(4) - (5)].sval));
+ free((yyvsp[(5) - (5)].sval));
}
break;
- case 74:
+ case 76:
#line 564 "testpatterny.y"
{
- fprintf(stderr, yyvsp[-4].sval, yyvsp[-3].sval, yyvsp[-2].sval, yyvsp[-1].sval, yyvsp[0].sval);
- free(yyvsp[-4].sval);
- free(yyvsp[-3].sval);
- free(yyvsp[-2].sval);
- free(yyvsp[-1].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, "%s%s%s%s%s", (yyvsp[(2) - (6)].sval), (yyvsp[(3) - (6)].sval), (yyvsp[(4) - (6)].sval), (yyvsp[(5) - (6)].sval), (yyvsp[(6) - (6)].sval));
+ free((yyvsp[(2) - (6)].sval));
+ free((yyvsp[(3) - (6)].sval));
+ free((yyvsp[(4) - (6)].sval));
+ free((yyvsp[(5) - (6)].sval));
+ free((yyvsp[(6) - (6)].sval));
}
break;
- case 99:
+ case 101:
#line 586 "testpatterny.y"
{ global_did_something = 1; }
break;
- case 104:
+ case 106:
#line 593 "testpatterny.y"
{ global_did_something = 1; }
break;
- case 107:
+ case 109:
#line 600 "testpatterny.y"
{ global_did_something = 1; }
break;
- case 113:
+ case 115:
#line 610 "testpatterny.y"
{ return 0; }
break;
- case 114:
+ case 116:
#line 614 "testpatterny.y"
{
current_testpattern = get_next_testpattern();
@@ -1744,15 +2103,14 @@ yyreduce:
break;
+/* Line 1267 of yacc.c. */
+#line 2108 "testpatterny.c"
+ default: break;
}
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-/* Line 991 of yacc.c. */
-#line 1750 "testpatterny.c"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-
-
+ YYPOPSTACK (yylen);
+ yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
@@ -1781,109 +2139,93 @@ yyerrlab:
if (!yyerrstatus)
{
++yynerrs;
-#if YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (YYPACT_NINF < yyn && yyn < YYLAST)
- {
- YYSIZE_T yysize = 0;
- int yytype = YYTRANSLATE (yychar);
- char *yymsg;
- int yyx, yycount;
-
- yycount = 0;
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- yysize += yystrlen (yytname[yyx]) + 15, yycount++;
- yysize += yystrlen ("syntax error, unexpected ") + 1;
- yysize += yystrlen (yytname[yytype]);
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg != 0)
- {
- char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
- yyp = yystpcpy (yyp, yytname[yytype]);
-
- if (yycount < 5)
- {
- yycount = 0;
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *));
- yyx++)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- const char *yyq = ! yycount ? ", expecting " : " or ";
- yyp = yystpcpy (yyp, yyq);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yycount++;
- }
- }
- yyerror (yymsg);
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+ {
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
- }
- else
- yyerror ("syntax error; also virtual memory exhausted");
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror ("syntax error");
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
+ }
+#endif
}
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- {
- /* Pop the error token. */
- YYPOPSTACK;
- /* Pop the rest of the stack. */
- while (yyss < yyssp)
- {
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[*yyssp], yyvsp);
- YYPOPSTACK;
- }
- YYABORT;
- }
-
- YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
- yydestruct (yytoken, &yylval);
- yychar = YYEMPTY;
-
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
- goto yyerrlab2;
+ goto yyerrlab1;
-/*----------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action. |
-`----------------------------------------------------*/
-yyerrlab1:
-
- /* Suppress GCC warning that yyerrlab1 is unused when no action
- invokes YYERROR. */
-#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
- && !defined __cplusplus
- __attribute__ ((__unused__))
-#endif
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
- goto yyerrlab2;
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
-/*---------------------------------------------------------------.
-| yyerrlab2 -- pop states until the error token can be shifted. |
-`---------------------------------------------------------------*/
-yyerrlab2:
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
@@ -1904,22 +2246,23 @@ yyerrlab2:
if (yyssp == yyss)
YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[yystate], yyvsp);
- yyvsp--;
- yystate = *--yyssp;
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
if (yyn == YYFINAL)
YYACCEPT;
- YYDPRINTF ((stderr, "Shifting error token, "));
-
*++yyvsp = yylval;
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
yystate = yyn;
goto yynewstate;
@@ -1939,21 +2282,39 @@ yyabortlab:
goto yyreturn;
#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here. |
-`----------------------------------------------*/
-yyoverflowlab:
- yyerror ("parser stack overflow");
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
- return yyresult;
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
}
diff --git a/src/testpattern/testpatterny.h b/src/testpattern/testpatterny.h
index 2567b82..69e3127 100644
--- a/src/testpattern/testpatterny.h
+++ b/src/testpattern/testpatterny.h
@@ -1,7 +1,9 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
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
@@ -15,13 +17,21 @@
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. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
@@ -75,6 +85,7 @@
END = 301
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tSTRING 260
@@ -123,7 +134,7 @@
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -132,5 +143,3 @@ typedef int YYSTYPE;
extern YYSTYPE yylval;
-
-
diff --git a/src/testpattern/testpatterny.y b/src/testpattern/testpatterny.y
index 6d92bad..bb2073f 100644
--- a/src/testpattern/testpatterny.y
+++ b/src/testpattern/testpatterny.y
@@ -1,5 +1,5 @@
/*
- * "$Id: testpatterny.y,v 1.26 2004/08/21 22:35:18 rlk Exp $"
+ * "$Id: testpatterny.y,v 1.26.18.2 2007/05/29 01:47:30 rlk Exp $"
*
* Test pattern generator for Gimp-Print
*
@@ -361,7 +361,7 @@ parameter_curve: PARAMETER_CURVE tSTRING tSTRING
}
;
-parameter: parameter_string | parameter_int | parameter_float
+parameter: parameter_string | parameter_int | parameter_float | parameter_curve
;
density: DENSITY tDOUBLE
{
@@ -532,20 +532,20 @@ image: IMAGE tINT tINT
Message0: MESSAGE tSTRING
{
- fprintf(stderr, $2);
+ fprintf(stderr,"%s",$2);
free($2);
}
;
Message1: MESSAGE tSTRING tSTRING
{
- fprintf(stderr, $2, $3);
+ fprintf(stderr,"%s%s", $2, $3);
free($2);
free($3);
}
;
Message2: MESSAGE tSTRING tSTRING tSTRING
{
- fprintf(stderr, $2, $3, $4);
+ fprintf(stderr,"%s%s%s", $2, $3, $4);
free($2);
free($3);
free($4);
@@ -553,7 +553,7 @@ Message2: MESSAGE tSTRING tSTRING tSTRING
;
Message3: MESSAGE tSTRING tSTRING tSTRING tSTRING
{
- fprintf(stderr, $2, $3, $4, $5);
+ fprintf(stderr, "%s%s%s%s", $2, $3, $4, $5);
free($2);
free($3);
free($4);
@@ -562,7 +562,7 @@ Message3: MESSAGE tSTRING tSTRING tSTRING tSTRING
;
Message4: MESSAGE tSTRING tSTRING tSTRING tSTRING tSTRING
{
- fprintf(stderr, $2, $3, $4, $5, $6);
+ fprintf(stderr, "%s%s%s%s%s", $2, $3, $4, $5, $6);
free($2);
free($3);
free($4);