diff options
author | Didier Raboud <odyx@debian.org> | 2016-09-20 11:56:08 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2016-09-20 11:56:08 +0200 |
commit | 7f5731038556e5b03d2a886163ca2c873c77333d (patch) | |
tree | 8f4194af3949a73accf44b2b0bd8ebfa990ac577 /src/main | |
parent | a313257bdec71bc92a56598e74d9097c16cb6e48 (diff) |
New upstream version 5.2.12~pre2
Diffstat (limited to 'src/main')
56 files changed, 1531 insertions, 195 deletions
diff --git a/src/main/Makefile.am b/src/main/Makefile.am index 23f3d26..6b41313 100644 --- a/src/main/Makefile.am +++ b/src/main/Makefile.am @@ -1,4 +1,3 @@ -## $Id: Makefile.am,v 1.107 2015/06/24 23:15:13 speachy Exp $ ## Copyright (C) 2000 Roger Leigh ## ## This program is free software; you can redistribute it and/or modify @@ -37,6 +36,7 @@ pkgmodule_LTLIBRARIES = \ print-escp2.la \ print-lexmark.la \ print-pcl.la \ + print-dpl.la \ print-ps.la \ print-dyesub.la \ print-raw.la @@ -76,6 +76,9 @@ print_lexmark_la_LDFLAGS = -module -avoid-version print_pcl_la_SOURCES = print-pcl.c print_pcl_la_LDFLAGS = -module -avoid-version +print_dpl_la_SOURCES = print-dpl.c +print_dpl_la_LDFLAGS = -module -avoid-version + print_ps_la_SOURCES = print-ps.c xmlppd.c xmlppd.h print_ps_la_LDFLAGS = -module -avoid-version @@ -93,6 +96,7 @@ module_SOURCES = \ $(print_escp2_la_SOURCES) \ $(print_lexmark_la_SOURCES) \ $(print_pcl_la_SOURCES) \ + $(print_dpl_la_SOURCES) \ $(print_ps_la_SOURCES) \ $(print_dyesub_la_SOURCES) \ $(print_raw_la_SOURCES) diff --git a/src/main/Makefile.in b/src/main/Makefile.in index a91f253..47a0c41 100644 --- a/src/main/Makefile.in +++ b/src/main/Makefile.in @@ -85,24 +85,23 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/scripts/global.mk $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/scripts/mkinstalldirs \ - $(srcdir)/gutenprint.pc.in $(top_srcdir)/scripts/depcomp + $(srcdir)/Makefile.am $(srcdir)/gutenprint.pc.in \ + $(top_srcdir)/scripts/depcomp subdir = src/main ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(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/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.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/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.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 +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gutenprint.pc CONFIG_CLEAN_VPATH_FILES = @@ -166,8 +165,8 @@ am__libgutenprint_la_SOURCES_DIST = array.c bit-ops.c channel.c \ canon-printers.h canon-media-mode.h print-escp2.c \ escp2-driver.c print-escp2.h print-escp2-data.c \ escp2-channels.c escp2-papers.c escp2-resolutions.c \ - print-lexmark.c print-pcl.c print-ps.c xmlppd.c xmlppd.h \ - print-olympus.c print-raw.c + print-lexmark.c print-pcl.c print-dpl.c print-ps.c xmlppd.c \ + xmlppd.h print-olympus.c print-raw.c am__objects_1 = mxml-attr.lo mxml-file.lo mxml-node.lo mxml-search.lo am__objects_2 = am__objects_3 = print-color.lo color-conversions.lo @@ -176,13 +175,14 @@ am__objects_5 = print-escp2.lo escp2-driver.lo print-escp2-data.lo \ escp2-channels.lo escp2-papers.lo escp2-resolutions.lo am__objects_6 = print-lexmark.lo am__objects_7 = print-pcl.lo -am__objects_8 = print-ps.lo xmlppd.lo -am__objects_9 = print-olympus.lo -am__objects_10 = print-raw.lo -am__objects_11 = $(am__objects_3) $(am__objects_4) $(am__objects_5) \ +am__objects_8 = print-dpl.lo +am__objects_9 = print-ps.lo xmlppd.lo +am__objects_10 = print-olympus.lo +am__objects_11 = print-raw.lo +am__objects_12 = $(am__objects_3) $(am__objects_4) $(am__objects_5) \ $(am__objects_6) $(am__objects_7) $(am__objects_8) \ - $(am__objects_9) $(am__objects_10) -@BUILD_MODULES_FALSE@am__objects_12 = $(am__objects_11) + $(am__objects_9) $(am__objects_10) $(am__objects_11) +@BUILD_MODULES_FALSE@am__objects_13 = $(am__objects_12) 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 \ @@ -191,7 +191,7 @@ am_libgutenprint_la_OBJECTS = array.lo bit-ops.lo channel.lo color.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) + $(am__objects_2) $(am__objects_13) libgutenprint_la_OBJECTS = $(am_libgutenprint_la_OBJECTS) libgutenprint_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ @@ -205,6 +205,13 @@ print_canon_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_CFLAGS) $(CFLAGS) $(print_canon_la_LDFLAGS) $(LDFLAGS) -o \ $@ @BUILD_MODULES_TRUE@am_print_canon_la_rpath = -rpath $(pkgmoduledir) +print_dpl_la_LIBADD = +am_print_dpl_la_OBJECTS = print-dpl.lo +print_dpl_la_OBJECTS = $(am_print_dpl_la_OBJECTS) +print_dpl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(print_dpl_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_MODULES_TRUE@am_print_dpl_la_rpath = -rpath $(pkgmoduledir) print_dyesub_la_LIBADD = am_print_dyesub_la_OBJECTS = print-olympus.lo print_dyesub_la_OBJECTS = $(am_print_dyesub_la_OBJECTS) @@ -287,15 +294,16 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(color_traditional_la_SOURCES) $(libgutenprint_la_SOURCES) \ - $(print_canon_la_SOURCES) $(print_dyesub_la_SOURCES) \ - $(print_escp2_la_SOURCES) $(print_lexmark_la_SOURCES) \ - $(print_pcl_la_SOURCES) $(print_ps_la_SOURCES) \ - $(print_raw_la_SOURCES) -DIST_SOURCES = $(color_traditional_la_SOURCES) \ - $(am__libgutenprint_la_SOURCES_DIST) $(print_canon_la_SOURCES) \ + $(print_canon_la_SOURCES) $(print_dpl_la_SOURCES) \ $(print_dyesub_la_SOURCES) $(print_escp2_la_SOURCES) \ $(print_lexmark_la_SOURCES) $(print_pcl_la_SOURCES) \ $(print_ps_la_SOURCES) $(print_raw_la_SOURCES) +DIST_SOURCES = $(color_traditional_la_SOURCES) \ + $(am__libgutenprint_la_SOURCES_DIST) $(print_canon_la_SOURCES) \ + $(print_dpl_la_SOURCES) $(print_dyesub_la_SOURCES) \ + $(print_escp2_la_SOURCES) $(print_lexmark_la_SOURCES) \ + $(print_pcl_la_SOURCES) $(print_ps_la_SOURCES) \ + $(print_raw_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -364,9 +372,6 @@ ENABLE_STATIC = @ENABLE_STATIC@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FIND = @FIND@ -FOOMATIC_CONFIGURE = @FOOMATIC_CONFIGURE@ -FOOMATIC_KITLOAD = @FOOMATIC_KITLOAD@ -FOOMATIC_PPDFILE = @FOOMATIC_PPDFILE@ GENPPD_LIBS = @GENPPD_LIBS@ GIMP2_CFLAGS = @GIMP2_CFLAGS@ GIMP2_LIBS = @GIMP2_LIBS@ @@ -399,9 +404,6 @@ GUTENPRINT_MICRO_VERSION = @GUTENPRINT_MICRO_VERSION@ GUTENPRINT_MINOR_VERSION = @GUTENPRINT_MINOR_VERSION@ GUTENPRINT_RELEASE_VERSION = @GUTENPRINT_RELEASE_VERSION@ GUTENPRINT_VERSION = @GUTENPRINT_VERSION@ -IJS_CFLAGS = @IJS_CFLAGS@ -IJS_CONFIG = @IJS_CONFIG@ -IJS_LIBS = @IJS_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -422,6 +424,7 @@ LIBREADLINE_DEPS = @LIBREADLINE_DEPS@ LIBS = $(INTLLIBS) @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBUSB_BACKEND_LIBDEPS = @LIBUSB_BACKEND_LIBDEPS@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ LIBUSB_LIBS = @LIBUSB_LIBS@ LIPO = @LIPO@ @@ -551,6 +554,7 @@ pkgmoduledir = $(pkglibdir)/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION @BUILD_MODULES_TRUE@ print-escp2.la \ @BUILD_MODULES_TRUE@ print-lexmark.la \ @BUILD_MODULES_TRUE@ print-pcl.la \ +@BUILD_MODULES_TRUE@ print-dpl.la \ @BUILD_MODULES_TRUE@ print-ps.la \ @BUILD_MODULES_TRUE@ print-dyesub.la \ @BUILD_MODULES_TRUE@ print-raw.la @@ -585,6 +589,8 @@ print_lexmark_la_SOURCES = print-lexmark.c print_lexmark_la_LDFLAGS = -module -avoid-version print_pcl_la_SOURCES = print-pcl.c print_pcl_la_LDFLAGS = -module -avoid-version +print_dpl_la_SOURCES = print-dpl.c +print_dpl_la_LDFLAGS = -module -avoid-version print_ps_la_SOURCES = print-ps.c xmlppd.c xmlppd.h print_ps_la_LDFLAGS = -module -avoid-version print_dyesub_la_SOURCES = print-olympus.c @@ -598,6 +604,7 @@ module_SOURCES = \ $(print_escp2_la_SOURCES) \ $(print_lexmark_la_SOURCES) \ $(print_pcl_la_SOURCES) \ + $(print_dpl_la_SOURCES) \ $(print_ps_la_SOURCES) \ $(print_dyesub_la_SOURCES) \ $(print_raw_la_SOURCES) @@ -780,6 +787,9 @@ libgutenprint.la: $(libgutenprint_la_OBJECTS) $(libgutenprint_la_DEPENDENCIES) $ print-canon.la: $(print_canon_la_OBJECTS) $(print_canon_la_DEPENDENCIES) $(EXTRA_print_canon_la_DEPENDENCIES) $(AM_V_CCLD)$(print_canon_la_LINK) $(am_print_canon_la_rpath) $(print_canon_la_OBJECTS) $(print_canon_la_LIBADD) $(LIBS) +print-dpl.la: $(print_dpl_la_OBJECTS) $(print_dpl_la_DEPENDENCIES) $(EXTRA_print_dpl_la_DEPENDENCIES) + $(AM_V_CCLD)$(print_dpl_la_LINK) $(am_print_dpl_la_rpath) $(print_dpl_la_OBJECTS) $(print_dpl_la_LIBADD) $(LIBS) + print-dyesub.la: $(print_dyesub_la_OBJECTS) $(print_dyesub_la_DEPENDENCIES) $(EXTRA_print_dyesub_la_DEPENDENCIES) $(AM_V_CCLD)$(print_dyesub_la_LINK) $(am_print_dyesub_la_rpath) $(print_dyesub_la_OBJECTS) $(print_dyesub_la_LIBADD) $(LIBS) @@ -834,6 +844,7 @@ distclean-compile: @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-dpl.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@ diff --git a/src/main/array.c b/src/main/array.c index ee494d8..c6545bd 100644 --- a/src/main/array.c +++ b/src/main/array.c @@ -1,5 +1,4 @@ /* - * "$Id: array.c,v 1.17 2010/08/04 00:33:55 rlk Exp $" * * Array data type. This type is designed to be derived from by * the curve and dither matrix types. diff --git a/src/main/bit-ops.c b/src/main/bit-ops.c index 3a5e746..965a481 100644 --- a/src/main/bit-ops.c +++ b/src/main/bit-ops.c @@ -1,5 +1,4 @@ /* - * "$Id: bit-ops.c,v 1.15 2012/04/19 14:41:03 gernot2270 Exp $" * * Softweave calculator for Gutenprint. * diff --git a/src/main/channel.c b/src/main/channel.c index eb50825..26ec20e 100644 --- a/src/main/channel.c +++ b/src/main/channel.c @@ -1,5 +1,4 @@ /* - * "$Id: channel.c,v 1.35 2011/12/30 00:36:10 rlk Exp $" * * Dither routine entrypoints * diff --git a/src/main/color-conversion.h b/src/main/color-conversion.h index 5e4f1c3..5d60cdc 100644 --- a/src/main/color-conversion.h +++ b/src/main/color-conversion.h @@ -1,5 +1,4 @@ /* - * "$Id: color-conversion.h,v 1.12 2008/01/21 23:19:39 rlk Exp $" * * Gutenprint color management module - traditional Gimp-Print algorithm. * diff --git a/src/main/color-conversions.c b/src/main/color-conversions.c index 1959613..e2a15e9 100644 --- a/src/main/color-conversions.c +++ b/src/main/color-conversions.c @@ -1,5 +1,4 @@ /* - * "$Id: color-conversions.c,v 1.20 2005/07/04 00:23:54 rlk Exp $" * * Gimp-Print color management module - traditional Gimp-Print algorithm. * diff --git a/src/main/color.c b/src/main/color.c index 33bd7b3..e6f16c3 100644 --- a/src/main/color.c +++ b/src/main/color.c @@ -1,5 +1,4 @@ /* - * "$Id: color.c,v 1.11 2010/08/04 00:33:56 rlk Exp $" * * Gimp-Print color module interface. * diff --git a/src/main/curve-cache.c b/src/main/curve-cache.c index 1ae7d0e..ca1374e 100644 --- a/src/main/curve-cache.c +++ b/src/main/curve-cache.c @@ -1,5 +1,4 @@ /* - * "$Id: curve-cache.c,v 1.6 2005/10/18 02:08:17 rlk Exp $" * * Gimp-Print color management module - traditional Gimp-Print algorithm. * diff --git a/src/main/curve.c b/src/main/curve.c index 7e4d02b..8425c05 100644 --- a/src/main/curve.c +++ b/src/main/curve.c @@ -1,5 +1,4 @@ /* - * "$Id: curve.c,v 1.56 2014/01/04 00:31:37 rlk Exp $" * * Print plug-in driver utility functions for the GIMP. * diff --git a/src/main/dither-ed.c b/src/main/dither-ed.c index 76820a0..7b8ce89 100644 --- a/src/main/dither-ed.c +++ b/src/main/dither-ed.c @@ -1,5 +1,4 @@ /* - * "$Id: dither-ed.c,v 1.18 2004/09/17 18:38:17 rleigh Exp $" * * Error diffusion and closely related adaptive hybrid dither algorithm * diff --git a/src/main/dither-eventone.c b/src/main/dither-eventone.c index 2b983e0..aa767d2 100644 --- a/src/main/dither-eventone.c +++ b/src/main/dither-eventone.c @@ -1,5 +1,4 @@ /* - * "$Id: dither-eventone.c,v 1.42 2008/02/19 01:13:46 rlk Exp $" * * EvenTone dither implementation for Gimp-Print * diff --git a/src/main/dither-impl.h b/src/main/dither-impl.h index 28f9832..a2a26f2 100644 --- a/src/main/dither-impl.h +++ b/src/main/dither-impl.h @@ -1,6 +1,4 @@ /* - * "$Id: dither-impl.h,v 1.32 2008/02/18 14:20:17 rlk Exp $" - * * Internal implementation of dither algorithms * * Copyright 1997-2003 Michael Sweet (mike@easysw.com) and @@ -259,6 +257,3 @@ do \ #endif #endif /* GUTENPRINT_INTERNAL_DITHER_IMPL_H */ -/* - * End of "$Id: dither-impl.h,v 1.32 2008/02/18 14:20:17 rlk Exp $". - */ diff --git a/src/main/dither-inks.c b/src/main/dither-inks.c index 722e407..ff5edbc 100644 --- a/src/main/dither-inks.c +++ b/src/main/dither-inks.c @@ -1,5 +1,4 @@ /* - * "$Id: dither-inks.c,v 1.28 2014/01/04 00:31:37 rlk Exp $" * * Print plug-in driver utility functions for the GIMP. * diff --git a/src/main/dither-inlined-functions.h b/src/main/dither-inlined-functions.h index 5cd09d4..ac93a02 100644 --- a/src/main/dither-inlined-functions.h +++ b/src/main/dither-inlined-functions.h @@ -1,5 +1,4 @@ /* - * "$Id: dither-inlined-functions.h,v 1.6 2004/09/17 18:38:18 rleigh Exp $" * * Performance-critical functions that should be inlined, based on * measurements. diff --git a/src/main/dither-main.c b/src/main/dither-main.c index cd614d6..0aa86c3 100644 --- a/src/main/dither-main.c +++ b/src/main/dither-main.c @@ -1,5 +1,4 @@ /* - * "$Id: dither-main.c,v 1.63 2010/12/05 21:38:14 rlk Exp $" * * Dither routine entrypoints * diff --git a/src/main/dither-ordered.c b/src/main/dither-ordered.c index b488bbe..2516362 100644 --- a/src/main/dither-ordered.c +++ b/src/main/dither-ordered.c @@ -1,5 +1,4 @@ /* - * "$Id: dither-ordered.c,v 1.31 2010/08/04 00:33:56 rlk Exp $" * * Ordered dither algorithm * diff --git a/src/main/dither-predithered.c b/src/main/dither-predithered.c index d58e6bf..ed5bdcd 100644 --- a/src/main/dither-predithered.c +++ b/src/main/dither-predithered.c @@ -1,5 +1,4 @@ /* - * "$Id: dither-predithered.c,v 1.3 2005/07/28 01:00:51 rlk Exp $" * * Very fast dither algorithm * diff --git a/src/main/dither-very-fast.c b/src/main/dither-very-fast.c index 7b83aa8..db89ce2 100644 --- a/src/main/dither-very-fast.c +++ b/src/main/dither-very-fast.c @@ -1,5 +1,4 @@ /* - * "$Id: dither-very-fast.c,v 1.15 2004/09/17 18:38:20 rleigh Exp $" * * Very fast dither algorithm * diff --git a/src/main/escp2-channels.c b/src/main/escp2-channels.c index b110b10..1fcfb37 100644 --- a/src/main/escp2-channels.c +++ b/src/main/escp2-channels.c @@ -1,5 +1,4 @@ /* - * "$Id: escp2-channels.c,v 1.92 2013/12/14 19:36:29 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * diff --git a/src/main/escp2-driver.c b/src/main/escp2-driver.c index 7819510..fa63cb3 100644 --- a/src/main/escp2-driver.c +++ b/src/main/escp2-driver.c @@ -1,5 +1,4 @@ /* - * "$Id: escp2-driver.c,v 1.58 2012/01/19 13:25:40 m0m Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * diff --git a/src/main/escp2-papers.c b/src/main/escp2-papers.c index f1c44b4..c96d42f 100644 --- a/src/main/escp2-papers.c +++ b/src/main/escp2-papers.c @@ -1,5 +1,4 @@ /* - * "$Id: escp2-papers.c,v 1.120 2013/12/14 19:36:29 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * diff --git a/src/main/escp2-resolutions.c b/src/main/escp2-resolutions.c index 9966f79..01b9745 100644 --- a/src/main/escp2-resolutions.c +++ b/src/main/escp2-resolutions.c @@ -1,5 +1,4 @@ /* - * "$Id: escp2-resolutions.c,v 1.53 2013/12/14 19:36:29 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * diff --git a/src/main/generic-options.c b/src/main/generic-options.c index 1c7b674..c91e41c 100644 --- a/src/main/generic-options.c +++ b/src/main/generic-options.c @@ -1,5 +1,4 @@ /* - * "$Id: generic-options.c,v 1.12 2010/12/05 21:38:14 rlk Exp $" * * Copyright 2003 Robert Krawitz (rlk@alum.mit.edu) * diff --git a/src/main/generic-options.h b/src/main/generic-options.h index 446f349..7782b7f 100644 --- a/src/main/generic-options.h +++ b/src/main/generic-options.h @@ -1,5 +1,4 @@ /* - * "$Id: generic-options.h,v 1.5 2004/09/17 18:38:20 rleigh Exp $" * * Copyright 2003 Robert Krawitz (rlk@alum.mit.edu) * diff --git a/src/main/gutenprint-internal.h b/src/main/gutenprint-internal.h index 9de8214..5460213 100644 --- a/src/main/gutenprint-internal.h +++ b/src/main/gutenprint-internal.h @@ -1,6 +1,4 @@ /* - * "$Id: gutenprint-internal.h,v 1.6 2014/01/04 00:31:38 rlk Exp $" - * * Print plug-in header file for the GIMP. * * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and @@ -94,6 +92,3 @@ stpi_cast_safe(const void *ptr) #endif #endif /* GUTENPRINT_INTERNAL_INTERNAL_H */ -/* - * End of "$Id: gutenprint-internal.h,v 1.6 2014/01/04 00:31:38 rlk Exp $". - */ diff --git a/src/main/image.c b/src/main/image.c index 9149319..3033da9 100644 --- a/src/main/image.c +++ b/src/main/image.c @@ -1,5 +1,4 @@ /* - * "$Id: image.c,v 1.6 2004/09/17 18:38:21 rleigh Exp $" * * Print plug-in driver utility functions for the GIMP. * diff --git a/src/main/module.c b/src/main/module.c index 5d078a2..c21d320 100644 --- a/src/main/module.c +++ b/src/main/module.c @@ -1,5 +1,4 @@ /* - * "$Id: module.c,v 1.27 2012/01/19 13:25:40 m0m Exp $" * * Gutenprint module loader - load modules with libltdl/libdl. * @@ -43,7 +42,7 @@ typedef struct stpi_internal_module_class static void module_list_freefunc(void *item); static int stp_module_register(stp_module_t *module); -#ifdef USE_DLOPEN +#if defined(MODULE) && defined(USE_DLOPEN) static void *stp_dlsym(void *handle, const char *symbol, const char *modulename); #endif @@ -56,11 +55,12 @@ static const stpi_internal_module_class_t module_classes[] = {STP_MODULE_CLASS_INVALID, NULL} /* Must be last */ }; -#if !defined(USE_LTDL) && !defined(USE_DLOPEN) +#if !defined(MODULE) extern stp_module_t print_canon_LTX_stp_module_data; extern stp_module_t print_escp2_LTX_stp_module_data; extern stp_module_t print_lexmark_LTX_stp_module_data; extern stp_module_t print_pcl_LTX_stp_module_data; +extern stp_module_t print_dpl_LTX_stp_module_data; extern stp_module_t print_ps_LTX_stp_module_data; extern stp_module_t print_dyesub_LTX_stp_module_data; extern stp_module_t print_raw_LTX_stp_module_data; @@ -75,6 +75,7 @@ static stp_module_t *static_modules[] = &print_canon_LTX_stp_module_data, &print_escp2_LTX_stp_module_data, &print_pcl_LTX_stp_module_data, + &print_dpl_LTX_stp_module_data, &print_lexmark_LTX_stp_module_data, &print_dyesub_LTX_stp_module_data, &print_raw_LTX_stp_module_data, @@ -95,7 +96,7 @@ module_list_freefunc(void *item /* module to remove */) stp_module_t *module = (stp_module_t *) item; if (module && module->fini) /* Call the module exit function */ module->fini(); -#if defined(USE_LTDL) || defined(USE_DLOPEN) +#if defined(MODULE) if (module && module->handle) DLCLOSE(module->handle); /* Close the module if it's not static */ #endif @@ -112,7 +113,7 @@ int stp_module_load(void) static int ltdl_is_initialised = 0; /* Is libltdl initialised? */ #endif static int module_list_is_initialised = 0; /* Is the module list initialised? */ -#if defined(USE_LTDL) || defined(USE_DLOPEN) +#if defined(MODULE) stp_list_t *dir_list; /* List of directories to scan */ stp_list_t *file_list; /* List of modules to open */ stp_list_item_t *file; /* Pointer to current module */ @@ -142,7 +143,7 @@ int stp_module_load(void) } /* search for available modules */ -#if defined (USE_LTDL) || defined (USE_DLOPEN) +#if defined(MODULE) if (!(dir_list = stp_list_create())) return 1; stp_list_set_freefunc(dir_list, stp_list_node_free_data); @@ -239,7 +240,7 @@ stp_module_get_class(stp_module_class_t class /* Module class */) int stp_module_open(const char *modulename /* Module filename */) { -#if defined(USE_LTDL) || defined(USE_DLOPEN) +#if defined(MODULE) #ifdef USE_LTDL lt_dlhandle module; /* Handle for module */ #else @@ -360,7 +361,7 @@ stp_module_close(stp_list_item_t *module /* Module to close */) /* * If using dlopen, add modulename_LTX_ to symbol name */ -#ifdef USE_DLOPEN +#if defined(MODULE) && defined(USE_DLOPEN) static void *stp_dlsym(void *handle, /* Module */ const char *symbol, /* Symbol name */ const char *modulename) /* Module name */ diff --git a/src/main/mxml-attr.c b/src/main/mxml-attr.c index 2087d85..95d09ae 100644 --- a/src/main/mxml-attr.c +++ b/src/main/mxml-attr.c @@ -1,6 +1,4 @@ /* - * "$Id: mxml-attr.c,v 1.7 2004/09/17 18:38:21 rleigh Exp $" - * * Attribute support code for mini-XML, a small XML-like file parsing library. * * Copyright 2003 by Michael Sweet. @@ -153,8 +151,3 @@ stp_mxmlElementSetAttr(stp_mxml_node_t *node, /* I - Element node */ node->value.element.num_attrs ++; } - - -/* - * End of "$Id: mxml-attr.c,v 1.7 2004/09/17 18:38:21 rleigh Exp $". - */ diff --git a/src/main/mxml-file.c b/src/main/mxml-file.c index a5d4025..a6b73fe 100644 --- a/src/main/mxml-file.c +++ b/src/main/mxml-file.c @@ -1,6 +1,4 @@ /* - * "$Id: mxml-file.c,v 1.13 2012/01/19 13:26:48 m0m Exp $" - * * File loading code for mini-XML, a small XML-like file parsing library. * * Copyright 2003 by Michael Sweet. @@ -1460,8 +1458,3 @@ mxml_write_ws(stp_mxml_node_t *node, /* I - Current node */ return (col); } - - -/* - * End of "$Id: mxml-file.c,v 1.13 2012/01/19 13:26:48 m0m Exp $". - */ diff --git a/src/main/mxml-node.c b/src/main/mxml-node.c index e21f60f..b489d98 100644 --- a/src/main/mxml-node.c +++ b/src/main/mxml-node.c @@ -1,6 +1,4 @@ /* - * "$Id: mxml-node.c,v 1.7 2004/09/17 18:38:21 rleigh Exp $" - * * Node support code for mini-XML, a small XML-like file parsing library. * * Copyright 2003 by Michael Sweet. @@ -487,8 +485,3 @@ mxml_new(stp_mxml_node_t *parent, /* I - Parent node */ return (node); } - - -/* - * End of "$Id: mxml-node.c,v 1.7 2004/09/17 18:38:21 rleigh Exp $". - */ diff --git a/src/main/mxml-search.c b/src/main/mxml-search.c index 02bf125..dd4612b 100644 --- a/src/main/mxml-search.c +++ b/src/main/mxml-search.c @@ -1,6 +1,4 @@ /* - * "$Id: mxml-search.c,v 1.7 2004/09/17 18:38:21 rleigh Exp $" - * * Search/navigation functions for mini-XML, a small XML-like file * parsing library. * @@ -192,8 +190,3 @@ stp_mxmlWalkPrev(stp_mxml_node_t *node, /* I - Current node */ else return (NULL); } - - -/* - * End of "$Id: mxml-search.c,v 1.7 2004/09/17 18:38:21 rleigh Exp $". - */ diff --git a/src/main/path.c b/src/main/path.c index 12a9ec8..2f06a1b 100644 --- a/src/main/path.c +++ b/src/main/path.c @@ -1,5 +1,4 @@ /* - * "$Id: path.c,v 1.20 2008/06/01 14:41:18 rlk Exp $" * * Gutenprint path functions - split and search paths. * diff --git a/src/main/print-canon.c b/src/main/print-canon.c index 0b13445..6d27060 100644 --- a/src/main/print-canon.c +++ b/src/main/print-canon.c @@ -1,5 +1,4 @@ /* - * "$Id: print-canon.c,v 1.586 2015/10/01 15:22:29 gernot2270 Exp $" * * Print plug-in CANON BJL driver for the GIMP. * diff --git a/src/main/print-color.c b/src/main/print-color.c index 8318187..cf9c51b 100644 --- a/src/main/print-color.c +++ b/src/main/print-color.c @@ -1,5 +1,4 @@ /* - * "$Id: print-color.c,v 1.148 2014/01/24 01:55:56 rlk Exp $" * * Gutenprint color management module - traditional Gutenprint algorithm. * diff --git a/src/main/print-dither-matrices.c b/src/main/print-dither-matrices.c index 45ee656..b70ab22 100644 --- a/src/main/print-dither-matrices.c +++ b/src/main/print-dither-matrices.c @@ -1,5 +1,4 @@ /* - * "$Id: print-dither-matrices.c,v 1.39 2014/01/04 00:31:38 rlk Exp $" * * Print plug-in driver utility functions for the GIMP. * diff --git a/src/main/print-dpl.c b/src/main/print-dpl.c new file mode 100644 index 0000000..0802838 --- /dev/null +++ b/src/main/print-dpl.c @@ -0,0 +1,1284 @@ +/* + * + * Print plug-in Datamax-O'Neil DPL driver for Gutenprint. + * + * Copyright 1997-2000 Michael Sweet (mike@easysw.com), + * Robert Krawitz (rlk@alum.mit.edu) and + * Dave Hill (dave@minnie.demon.co.uk) + * + * Copyright 2016 FIXME + * + * 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 must include only standard C header files. The core code must + * compile on generic platforms that don't support glib, gimp, gtk, etc. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif +#include <gutenprint/gutenprint.h> +#include <gutenprint/gutenprint-intl-internal.h> +#include "gutenprint-internal.h" +#include "dither-impl.h" +#include <stdio.h> +#include <string.h> + +#define DEBUG +#define DPL_DEBUG_DISABLE_BLANKLINE_REMOVAL + +/* + * Local functions... + */ +static void dpl_pcx (stp_vars_t *, unsigned char *, int, int); +static int dpl_get_multiplier (const stp_vars_t * v); + +#ifndef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif /* !MAX */ + +typedef struct +{ + int height; + int orientation; + int label_separator; + unsigned int h_offset; + unsigned int v_offset; + int darkness; + int speed; + int present; +} dpl_privdata_t; + +/* + * Generic define for a name/value set + */ + +typedef struct +{ + const char *dpl_name; + const char *dpl_text; + int dpl_code; + int p0; + int p1; +} dpl_t; + + +#define DPL_RES_150_150 1 +#define DPL_RES_203_203 2 +#define DPL_RES_300_300 4 +#define DPL_RES_400_400 8 +#define DPL_RES_600_600 16 + +static const dpl_t dpl_resolutions[] = { + {"600dpi", N_("600x600 DPI"), DPL_RES_600_600, 600, 600}, + {"400dpi", N_("400x400 DPI"), DPL_RES_400_400, 400, 400}, + {"300dpi", N_("300x300 DPI"), DPL_RES_300_300, 300, 300}, + {"203dpi", N_("203x203 DPI"), DPL_RES_203_203, 203, 203}, + {"150dpi", N_("150x150 DPI"), DPL_RES_150_150, 150, 150}, +}; + +#define NUM_RESOLUTIONS (sizeof(dpl_resolutions) / sizeof (dpl_t)) + +static const dpl_t dpl_speeds[] = { + {"A", N_("1.0 IPS"), 'A'}, + {"B", N_("1.5 IPS"), 'B'}, + {"C", N_("2.0 IPS"), 'C'}, + {"D", N_("2.5 IPS"), 'D'}, + {"E", N_("3.0 IPS"), 'E'}, + {"F", N_("3.5 IPS"), 'F'}, + {"G", N_("4.0 IPS"), 'G'}, + {"H", N_("4.5 IPS"), 'H'}, + {"I", N_("5.0 IPS"), 'I'}, + {"J", N_("5.5 IPS"), 'J'}, + {"K", N_("6.0 IPS"), 'K'}, + {"L", N_("6.5 IPS"), 'L'}, + {"M", N_("7.0 IPS"), 'M'}, + {"N", N_("7.5 IPS"), 'N'}, + {"O", N_("8.0 IPS"), 'O'}, + {"P", N_("8.5 IPS"), 'P'}, + {"Q", N_("9.0 IPS"), 'Q'}, + {"R", N_("9.5 IPS"), 'R'}, + {"S", N_("10.0 IPS"), 'S'}, + {"T", N_("10.5 IPS"), 'T'}, + {"U", N_("11.0 IPS"), 'U'}, + {"V", N_("11.5 IPS"), 'V'}, + {"W", N_("12.0 IPS"), 'W'}, +}; + +#define NUM_SPEEDS (sizeof(dpl_speeds) / sizeof (dpl_t)) + +/* + * Printer capability data + */ + +typedef struct +{ + int model; + int custom_max_width; + int custom_max_height; + int custom_min_width; + int custom_min_height; + int resolutions; + int max_resolution; + int resolution_adjust; + char max_speed; + char min_speed; + char default_speed; +} dpl_cap_t; + +static const dpl_cap_t dpl_model_capabilities[] = { +/* Datamax-O'Neil Thermal DPL printers */ + {10017, /* I Class Mark II 203 DPI */ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_203_203, + DPL_RES_203_203, + DPL_RES_203_203, + 'W', + 'C', + 'O', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10018, /* I Class Mark II 300 DPI */ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_150_150 | DPL_RES_300_300, /* Resolutions */ + DPL_RES_300_300, + DPL_RES_203_203, + 'S', + 'C', + 'O', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10020, /* I Class Mark II 600 DPI */ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + /* for future use + DPL_RES_150_150 | DPL_RES_203_203 | DPL_RES_300_300 | DPL_RES_600_600, */ + DPL_RES_300_300 | DPL_RES_600_600, /* Resolutions */ + DPL_RES_600_600, + DPL_RES_300_300, + 'K', + 'C', + 'G', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10021, /* E Class Mark III Basic 203 DPI*/ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_203_203, /* Resolutions */ + DPL_RES_203_203, + DPL_RES_203_203, + 'G', + 'C', + 'E', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10022, /* E Class Mark III Basic 300 DPI*/ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_300_300, /* Resolutions */ + DPL_RES_300_300, + DPL_RES_300_300, + 'G', + 'C', + 'E', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10023, /* E Class Mark III Advanced 203 DPI*/ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_203_203, /* Resolutions */ + DPL_RES_203_203, + DPL_RES_203_203, + 'I', + 'C', + 'E', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10024, /* E Class Mark III Advanced 300 DPI*/ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_300_300, /* Resolutions */ + DPL_RES_300_300, + DPL_RES_300_300, + 'I', + 'C', + 'G', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10025, /* E Class Mark III Pro 203 DPI*/ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_203_203, /* Resolutions */ + DPL_RES_203_203, + DPL_RES_203_203, + 'K', + 'C', + 'G', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10026, /* E Class Mark III Pro 300 DPI*/ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_300_300, /* Resolutions */ + DPL_RES_300_300, + DPL_RES_300_300, + 'I', + 'C', + 'G', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10027, /* E Class Mark III ProPlus 203 DPI*/ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_203_203, /* Resolutions */ + DPL_RES_203_203, + DPL_RES_203_203, + 'K', + 'C', + 'G', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10028, /* E Class Mark III ProPlus 300 DPI*/ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_300_300, /* Resolutions */ + DPL_RES_300_300, + DPL_RES_300_300, + 'I', + 'C', + 'G', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10029, /* RL3e */ + 3 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_203_203, /* Resolutions */ + DPL_RES_203_203, + DPL_RES_203_203, + 'G', + 'A', + 'E', + }, +/* Datamax-O'Neil Thermal DPL printers */ + {10030, /* RL4e */ + 4 * 72, 99 * 72, /* Max paper size */ + 1, 1, /* Min paper size */ + DPL_RES_203_203, /* Resolutions */ + DPL_RES_203_203, + DPL_RES_203_203, + 'G', + 'A', + 'E', + }, +}; + +static const stp_parameter_t the_parameters[] = { + { + "PageSize", N_("Page Size"), "Color=No,Category=Basic Printer Setup", + N_("Size of the paper being printed to"), + STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_CORE, + STP_PARAMETER_LEVEL_BASIC, 1, 1, STP_CHANNEL_NONE, 1, 0}, + { + "Resolution", N_("Resolution"), "Color=No,Category=Basic Printer Setup", + N_("Resolution of the print"), + STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE, + STP_PARAMETER_LEVEL_BASIC, 1, 1, STP_CHANNEL_NONE, 1, 0}, + { + "PrintingMode", N_("Printing Mode"), "Color=Yes,Category=Core Parameter", + N_("Printing Output Mode"), + STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_CORE, + STP_PARAMETER_LEVEL_BASIC, 1, 1, STP_CHANNEL_NONE, 1, 0 + }, +#ifdef FIXME + { + "Orientation", N_("Orientation"), "Color=No,Category=Basic Printer Setup", + N_("Orientation, Portrait, Landscape, Upside Down, Seascape"), + STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE, + STP_PARAMETER_LEVEL_BASIC, 1, 1, STP_CHANNEL_NONE, 1, 0, + }, +#endif + { + "LabelSeparator", N_("Media Index Type"), + "Color=No,Category=Basic Printer Setup", + N_("Gap, Notch, Hole, Black Mark, Continuous"), + STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE, + STP_PARAMETER_LEVEL_BASIC, 1, 1, STP_CHANNEL_NONE, 1, 0, + }, + { + "Darkness", N_("Darkness"), "Color=No,Category=Basic Printer Setup", + N_("Darkness Adjust, from 0 to 30"), + STP_PARAMETER_TYPE_INT, STP_PARAMETER_CLASS_FEATURE, + STP_PARAMETER_LEVEL_BASIC, 0, 1, STP_CHANNEL_NONE, 1, 0}, + { + "Speed", N_("Print Speed"), "Color=No,Category=Basic Printer Setup", + N_("Speed Adjust"), + STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE, + STP_PARAMETER_LEVEL_BASIC, 1, 1, STP_CHANNEL_NONE, 0, 0}, +}; + +static const int the_parameter_count = + sizeof (the_parameters) / sizeof (const stp_parameter_t); + +typedef struct +{ + const stp_parameter_t param; + double min; + double max; + double defval; + int color_only; +} float_param_t; + +static const float_param_t float_parameters[] = { + { + { + "HorizOffset", N_("Horizontal Offset"), + "Color=No,Category=Basic Output Adjustment", + N_("Adjust horizontal position"), + STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, + STP_PARAMETER_LEVEL_ADVANCED3, 1, 1, STP_CHANNEL_NONE, 1, 0, + }, 0.0, 4.0, 0.0, 0}, + { + { + "VertOffset", N_("Vertical Offset"), + "Color=No,Category=Basic Output Adjustment", + N_("Adjust vertical position"), + STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, + STP_PARAMETER_LEVEL_ADVANCED3, 1, 1, STP_CHANNEL_NONE, 1, 0, + }, 0.0, 10.0, 0.0, 0}, + { + { + "Present", N_("Present Distance"), + "Color=No,Category=Basic Output Adjustment", + N_("Presnt Distance, 0.0 advances the default."), + STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_FEATURE, + STP_PARAMETER_LEVEL_BASIC, 1, 1, STP_CHANNEL_NONE, 1, 0, + }, 0.0, 10.0, 0.0, 0}, +}; + +static const int float_parameter_count = + sizeof (float_parameters) / sizeof (const float_param_t); + +/* + * Convert a value into it's option name + */ + +static const char * +dpl_val_to_string (int code, /* I: Code */ + const dpl_t * options, /* I: Options */ + int num_options) /* I: Num options */ +{ + + int i; + const char *string = NULL; + + /* + * Look up the code in the table and convert to the string. + */ + + for (i = 0; i < num_options; i++) + { + if (code == options[i].dpl_code) + { + string = options[i].dpl_name; + break; + } + } + + stp_deprintf (STP_DBG_DPL, "Code: %d, String: %s\n", code, string); + + return (string); +} + +static const char * +dpl_val_to_text (int code, /* I: Code */ + const dpl_t * options, /* I: Options */ + int num_options) /* I: Num options */ +{ + + int i; + const char *string = NULL; + + /* + * Look up the code in the table and convert to the string. + */ + + for (i = 0; i < num_options; i++) + { + if (code == options[i].dpl_code) + { + string = gettext (options[i].dpl_text); + break; + } + } + + stp_deprintf (STP_DBG_DPL, "Code: %d, String: %s\n", code, string); + + return (string); +} + +/* + * dpl_get_model_capabilities() - Return struct of model capabilities + */ + +static const dpl_cap_t * /* O: Capabilities */ +dpl_get_model_capabilities (int model) /* I: Model */ +{ + int i; + int models = sizeof (dpl_model_capabilities) / sizeof (dpl_cap_t); + for (i = 0; i < models; i++) + { + if (dpl_model_capabilities[i].model == model) + { + return &(dpl_model_capabilities[i]); + } + } + stp_erprintf ("dpl: model %d not found in capabilities list.\n", model); + return &(dpl_model_capabilities[0]); +} + +/* + * Determine the current resolution + */ + +static void +dpl_describe_resolution (const stp_vars_t * v, int *x, int *y) +{ + int i; + const char *resolution = stp_get_string_parameter (v, "Resolution"); + + *x = -1; + *y = -1; + if (resolution) + { + for (i = 0; i < NUM_RESOLUTIONS; i++) + { + if (!strcmp (resolution, dpl_resolutions[i].dpl_name)) + { + *x = dpl_resolutions[i].p0; + *y = dpl_resolutions[i].p1; + } + } + } + if (*x != *y) { + if (*x > *y) { + *y = *x; + } else { + *x = *y; + } + } +} + +int +dpl_get_multiplier (const stp_vars_t * v) +{ + int x, y, multiplier; + int i; + int max_dpi; + int model = stp_get_model_id (v); + const dpl_cap_t *caps = dpl_get_model_capabilities (model); + + for (i = 0; i < NUM_RESOLUTIONS; i++) + { + if (caps->max_resolution == dpl_resolutions[i].dpl_code) + { + max_dpi = dpl_resolutions[i].p0; + } + } + + dpl_describe_resolution (v, &x, &y); + + if (x == max_dpi) + multiplier = 1; + else + multiplier = 2; + + return multiplier; +} + +#ifdef FIXME +/* + * Orientation support - modes available + * Note that the internal names MUST match those in cups/genppd.c else the + * PPD files will not be generated correctly + */ + +static const stp_param_string_t orientation_types[] = { + {"Portrait", N_("Portrait")}, + {"Landscape", N_("Landscape")}, + {"UpsideDown", N_("Reverse Portrait")}, + {"Seascape", N_("Reverse Landscape")}, +}; + +#define NUM_ORIENTATION (sizeof (orientation_types) / sizeof (stp_param_string_t)) +#endif + +/* + * Label Separator Support for D-O printers, modes available + */ + +static const stp_param_string_t label_separator_types[] = { + {"IGNORE", N_("Printer Setting")}, + {"GAP", N_("Gap")}, + {"NOTCH", N_("Notch")}, + {"HOLE", N_("Hole")}, + {"MARK", N_("Black Mark")}, + {"CONTINUOUS", N_("Continuous")}, +}; + +#define NUM_LABEL_SEPARATOR (sizeof (label_separator_types) / sizeof (stp_param_string_t)) + +/* + * 'dpl_papersize_valid()' - Is the paper size valid for this printer. + */ + +static int +dpl_papersize_valid (const stp_papersize_t * pt, int model) +{ + const dpl_cap_t *caps = dpl_get_model_capabilities (model); + unsigned int pwidth = pt->width; + unsigned int pheight = pt->height; + +/* + * Is it a valid name? + */ + + if (strlen (pt->name) <= 0) + return (0); + +/* + * We are allowed custom paper sizes. Check that the size is within + * limits. Check that the name contains d-o if this is the + * Datamax O'Neil label printer and not custom paper + */ + + if (pwidth <= caps->custom_max_width && + pheight <= caps->custom_max_height && + (pheight >= caps->custom_min_height || pheight == 0) && + (pwidth >= caps->custom_min_width || pwidth == 0)) + { + if (strcmp (pt->name, "Custom")) + { + if (NULL != strstr (pt->name, "d-o")) + { + return (1); + } + else + { + return (0); + } + } + } + + return (0); +} + +/* + * 'dpl_parameters()' - Return the parameter values for the given parameter. + */ + +static stp_parameter_list_t +dpl_list_parameters (const stp_vars_t * v) +{ + stp_parameter_list_t *ret; + int i; + + ret = stp_parameter_list_create (); + for (i = 0; i < the_parameter_count; i++) + stp_parameter_list_add_param (ret, &(the_parameters[i])); + for (i = 0; i < float_parameter_count; i++) + stp_parameter_list_add_param (ret, &(float_parameters[i].param)); + return ret; +} + +static void +dpl_parameters (const stp_vars_t * v, const char *name, + stp_parameter_t * description) +{ + int model = stp_get_model_id (v); + int i; + const dpl_cap_t *caps; + description->p_type = STP_PARAMETER_TYPE_INVALID; + + if (name == NULL) + return; + + stp_deprintf (STP_DBG_DPL, "dpl_parameters(): Name = %s\n", name); + + caps = dpl_get_model_capabilities (model); + + stp_deprintf (STP_DBG_DPL, "Printer model = %d\n", model); + stp_deprintf (STP_DBG_DPL, "PageWidth = %d, PageHeight = %d\n", + caps->custom_max_width, caps->custom_max_height); + stp_deprintf (STP_DBG_DPL, "MinPageWidth = %d, MinPageHeight = %d\n", + caps->custom_min_width, caps->custom_min_height); + stp_deprintf (STP_DBG_DPL, "Resolutions: %d\n", caps->resolutions); + + for (i = 0; i < the_parameter_count; i++) + if (strcmp (name, the_parameters[i].name) == 0) + { + stp_fill_parameter_settings (description, &(the_parameters[i])); + break; + } + description->deflt.str = NULL; + + for (i = 0; i < float_parameter_count; i++) + if (strcmp (name, float_parameters[i].param.name) == 0) + { + 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; + break; + } + + if (strcmp (name, "PageSize") == 0) + { + int papersizes = stp_known_papersizes (); + description->bounds.str = stp_string_list_create (); + for (i = 0; i < papersizes; i++) + { + const stp_papersize_t *pt = stp_get_papersize_by_index (i); + if (strlen (pt->name) > 0 && dpl_papersize_valid (pt, model)) + 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, "Resolution") == 0) + { + description->bounds.str = stp_string_list_create (); + stp_string_list_add_string (description->bounds.str, "None", + _("Default")); + description->deflt.str = + dpl_val_to_string (caps->max_resolution, dpl_resolutions, + NUM_RESOLUTIONS); + for (i = 0; i < NUM_RESOLUTIONS; i++) + if (caps->resolutions & dpl_resolutions[i].dpl_code) + { + stp_string_list_add_string + (description->bounds.str, + dpl_val_to_string (dpl_resolutions[i].dpl_code, + dpl_resolutions, NUM_RESOLUTIONS), + dpl_val_to_text (dpl_resolutions[i].dpl_code, + dpl_resolutions, NUM_RESOLUTIONS)); + } + } + else if (strcmp(name, "PrintingMode") == 0) + { + description->bounds.str = stp_string_list_create(); + stp_string_list_add_string + (description->bounds.str, "BW", _("Black and White")); + description->deflt.str = + stp_string_list_param(description->bounds.str, 0)->name; + } +#ifdef FIXME + else if (strcmp (name, "Orientation") == 0) + { + description->bounds.str = stp_string_list_create (); + description->deflt.str = orientation_types[0].name; + for (i = 0; i < NUM_ORIENTATION; i++) + { + stp_string_list_add_string (description->bounds.str, + orientation_types[i].name, + gettext (orientation_types[i].text)); + } + } +#endif + else if (strcmp (name, "LabelSeparator") == 0) + { + description->bounds.str = stp_string_list_create (); + description->deflt.str = label_separator_types[0].name; + for (i = 0; i < NUM_LABEL_SEPARATOR; i++) + { + stp_string_list_add_string (description->bounds.str, + label_separator_types[i].name, + gettext (label_separator_types[i]. + text)); + } + } + else if (strcmp (name, "Darkness") == 0) + { + description->deflt.integer = -1; + description->bounds.integer.lower = 0; + description->bounds.integer.upper = 30; + } + else if (strcmp (name, "Speed") == 0) + { + description->bounds.str = stp_string_list_create (); + stp_string_list_add_string (description->bounds.str, "None", + _("Use Current Setting")); + stp_string_list_add_string (description->bounds.str, "Default", + _("Use Default Setting")); + description->deflt.str = "None"; + for (i = 0; i < NUM_SPEEDS; i++) + { + stp_string_list_add_string (description->bounds.str, + dpl_speeds[i].dpl_name, + gettext (dpl_speeds[i]. + dpl_text)); + } + } + else if (strcmp (name, "HorizOffset") == 0 || + strcmp (name, "VertOffset") == 0 || strcmp (name, "Present") == 0) + { + description->is_active = 1; + } +} + + +/* + * 'dpl_imageable_area()' - Return the imageable area of the page. + */ +static void +internal_imageable_area (const stp_vars_t * v, /* I */ + int *left, /* O - Left position in points */ + int *right, /* O - Right position in points */ + int *bottom, /* O - Bottom position in points */ + int *top) /* O - Top position in points */ +{ + int width, height; /* Size of page */ + + stp_default_media_size (v, &width, &height); + + *left = 0; + *right = width; + *top = 0; + *bottom = height; +} + +static void +dpl_imageable_area (const stp_vars_t * v, /* I */ + int *left, /* O - Left position in points */ + int *right, /* O - Right position in points */ + int *bottom, /* O - Bottom position in points */ + int *top) /* O - Top position in points */ +{ + internal_imageable_area (v, left, right, bottom, top); +} + +static void +dpl_limit (const stp_vars_t * v, /* I */ + int *width, int *height, int *min_width, int *min_height) +{ + const dpl_cap_t *caps = dpl_get_model_capabilities (stp_get_model_id (v)); + *width = caps->custom_max_width; + *height = caps->custom_max_height; + *min_width = caps->custom_min_width; + *min_height = caps->custom_min_height; +} + +static const char * +dpl_describe_output (const stp_vars_t * v) +{ + return "Grayscale"; +} + +static void +pcx_header (stp_vars_t * v, stp_image_t * image) +{ + unsigned short height; + unsigned short right; + unsigned short top; /* y = 0 is at bottom */ + unsigned short bytes; + short xdpi; + int *xdpi_p = (int *) (&xdpi); + short ydpi; + int *ydpi_p = (int *) (&ydpi); + int n; + const short zero = 0; + + stp_putc (10, v); /* Signature */ + stp_putc (5, v); /* Version */ + stp_putc (1, v); /* RLE encoding */ + stp_putc (1, v); /* bits per pixel */ + + /* Get resolutions */ + dpl_describe_resolution (v, xdpi_p, ydpi_p); + + bytes = (xdpi * 4 + 7 ) / 8; /* must be an even number */ + if (bytes != (bytes & 0xfffe)) + bytes++; + + height = stp_image_height (image); + + /* + * Convert image size to printer resolution and setup the page for printing... + */ + + right = 4 * xdpi - 1; + top = height - 1; + + /* send image start and end positions */ + stp_zfwrite ((const char *) &zero, 2, 1, v); + stp_zfwrite ((const char *) &zero, 2, 1, v); + stp_zfwrite ((const char *) &right, 2, 1, v); + stp_zfwrite ((const char *) &top, 2, 1, v); + + /* send resolutions */ + stp_zfwrite ((const char *) &xdpi, 2, 1, v); + stp_zfwrite ((const char *) &ydpi, 2, 1, v); + + /* send palette and reserved byte */ + for (n = 0; n < 3; n++) + stp_putc (0, v); + for (n = 0; n < 45; n++) + stp_putc (0xff, v); + stp_putc (0, v); + + stp_putc (1, v); /* number of planes, monochrome */ + + stp_zfwrite ((const char *) &bytes, 2, 1, v); + + stp_putc (1, v); /* monochrome */ + stp_putc (0, v); + + stp_putc (0, v); /* imagee size */ + stp_putc (0, v); + stp_putc (0, v); + stp_putc (0, v); + + for (n = 0; n < 54; n++) + stp_putc (0, v); /* padding */ +} + +/* + * 'dpl_print()' - Print an image to an HP printer. + */ + +static void +dpl_printfunc (stp_vars_t * v, int height) +{ + unsigned char *black = stp_dither_get_channel (v, STP_ECOLOR_K, 0); + + dpl_pcx (v, black, (height + 7) / 8, 1); +} + +static double +get_double_param (stp_vars_t * v, const char *param) +{ + if (param && stp_check_float_parameter (v, param, STP_PARAMETER_ACTIVE)) + return stp_get_float_parameter (v, param); + else + return 1.0; +} + +static int +dpl_do_print (stp_vars_t * v, stp_image_t * image) +{ + dpl_privdata_t privdata; + int status = 1; +#ifdef FIXME + const char *orientation_mode = stp_get_string_parameter (v, "Orientation"); +#endif + const char *label_separator_mode = + stp_get_string_parameter (v, "LabelSeparator"); + double h_offset = get_double_param (v, "HorizOffset"); + double v_offset = get_double_param (v, "VertOffset"); + double present = get_double_param (v, "Present"); + int y; /* Looping vars */ + int xdpi, ydpi; /* Resolution */ + int multiplier; + unsigned char *black; /* Black bitmap data */ + unsigned zero_mask; + int image_height; + int image_width; + int model = stp_get_model_id (v); + const dpl_cap_t *caps = dpl_get_model_capabilities (model); + const char *speed = stp_get_string_parameter(v, "Speed"); + + if (!stp_verify (v)) + { + stp_eprintf (v, "Print options not verified; cannot print.\n"); + return 0; + } + + /* + * Setup a read-only pixel region for the entire image... + */ + + stp_image_init (image); + + stp_set_string_parameter (v, "ColorCorrection", "None"); +#ifdef TESTING + stp_set_float_parameter (v, "Brightness", 1.0); + stp_set_float_parameter (v, "Contrast", 1.0); + stp_set_float_parameter (v, "Gamma", 1.0); +#endif + /* + * Figure out the output resolution... + */ + + dpl_describe_resolution (v, &xdpi, &ydpi); + + stp_deprintf (STP_DBG_DPL, "dpl: resolution=%dx%d\n", xdpi, ydpi); + if (xdpi <= 0 || ydpi <= 0) + { + stp_eprintf (v, "No resolution found; cannot print.\n"); + return 0; + } + + image_height = stp_image_height (image); + image_width = stp_image_width (image); + +#ifdef FIXME + privdata.orientation = 0; + if ((strncmp (orientation_mode, "Landscape", 9) == 0)) + privdata.orientation = 1; + else if ((strncmp (orientation_mode, "UpsideDown", 10) == 0)) + privdata.orientation = 2; + else if ((strncmp (orientation_mode, "Seascape", 8) == 0)) + privdata.orientation = 3; +#endif + + /* + * Label Separator mode + */ + privdata.label_separator = 0; + if ((strncmp (label_separator_mode, "GAP", 3) == 0)) + privdata.label_separator = 1; + else if ((strncmp (label_separator_mode, "NOTCH", 5) == 0)) + privdata.label_separator = 1; + else if ((strncmp (label_separator_mode, "HOLE", 4) == 0)) + privdata.label_separator = 1; + else if ((strncmp (label_separator_mode, "MARK", 4) == 0)) + privdata.label_separator = 2; + else if ((strncmp (label_separator_mode, "CONTINUOUS", 10) == 0)) + privdata.label_separator = 3; + + /* + * Print Offsets + */ + privdata.h_offset = (int) (h_offset * 100); /* in 0.01 of an inch */ + privdata.v_offset = (int) (v_offset * 100); /* in 0.01 of an inch */ + + privdata.present = (int) (present * 100.0); /* in 0.01 of an inch */ + + /* + * Darkness Mode + */ + if (-1 != (privdata.darkness = stp_get_int_parameter (v, "Darkness"))) + { + if (0 == privdata.darkness) + { + privdata.darkness = 10; /* default */ + } + } + + /* + * Speed Mode + */ + privdata.speed = 0; + if (0 != strcmp("None", speed)) + { + if (0 == strcmp("Default", speed)) + { + privdata.speed = (int) caps->default_speed; + } + else + { + int i; + for (i = 0; i < NUM_SPEEDS; i++) + { + if (0 == strcmp(dpl_speeds[i].dpl_name, speed)) + { + privdata.speed = dpl_speeds[i].dpl_code; + break; + } + } + if (caps->min_speed > (char) (privdata.speed)) + { + privdata.speed = caps->min_speed; + } + else + { + if (caps->max_speed < (char) (privdata.speed)) + { + privdata.speed = caps->max_speed; + } + } + } + } + + /* workaround for printer bug */ + for (y=0; y<64; y++) + stp_putc (0, v); + + /* + * Send DPL initialization commands... + */ + stp_puts ("\002n\r", v); /* set Imperial units */ + + /* Max page length */ + if (image_height / ydpi > 4) + { + stp_zprintf (v, "\002M%04i\r", + 300 * image_height / ydpi + (3 * privdata.v_offset)); + } + else + { + stp_zprintf (v, "\002M%04i\r", 1200 + (3 * privdata.v_offset)); + } + /* set Label Width */ + stp_zprintf (v, "\002KcLW%04i\r", + 100 * image_width / xdpi + privdata.h_offset); + if (0 != privdata.label_separator) + { + if (1 == privdata.label_separator) + { + stp_puts ("\002e\r", v); /* edge mode */ + } + else if (2 == privdata.label_separator) + { + stp_puts ("\002r\r", v); /* Mark mode */ + } + else + { + stp_zprintf (v, "\002c%04i\r", 100 * /* Continuous mode */ + image_height / ydpi + privdata.v_offset); + } + } + if (privdata.darkness > -1) + { + stp_zprintf (v, "\002KZH%02i\r", privdata.darkness); + } + if (privdata.speed > 0) + { + stp_zprintf (v, "\002KZP%c\r", privdata.speed); + } + stp_zprintf (v, "\002Kf%04i\r", privdata.present); + stp_puts ("\002IDPcups0\r", v); /* Save PCX file */ + pcx_header (v, image); + + + stp_deprintf (STP_DBG_DPL, "Normal init\n"); + + /* + * Allocate memory for the raster data... + */ + + black = stp_malloc ((image_width + 7) / 8); + + stp_set_string_parameter (v, "STPIOutputType", "Grayscale"); + + /* set up for very fast dithering as default */ + stp_set_string_parameter (v, "DitherAlgorithm", "VeryFast"); + + stp_dither_init (v, image, image_width, xdpi, ydpi); + + stp_dither_add_channel (v, black, STP_ECOLOR_K, 0); + stp_channel_set_black_channel (v, STP_ECOLOR_K); + + stp_channel_set_density_adjustment (v, STP_ECOLOR_K, 0, + get_double_param (v, "BlackDensity") * + 1); + + (void) stp_color_init (v, image, 65536); + + stp_allocate_component_data (v, "Driver", NULL, NULL, &privdata); + + for (y = 0; y < image_height; y++) + { + if (stp_color_get_row (v, image, y, &zero_mask)) + { + status = 2; + break; + } + stp_dither (v, y, 0, 0, NULL); + dpl_printfunc (v, image_width); + } + + stp_puts ("\r\002L\r", v); /* enter Label Formatting mode */ + multiplier = dpl_get_multiplier (v); /* dot multiplyer */ + stp_zprintf (v, "D%1i%1i\r", multiplier, multiplier); + stp_puts ("R0000\r", v); /* 0 offset, offset handled below */ + stp_puts ("A2\r", v); /* transparent mode */ + /* load graphic */ + stp_zprintf (v, "1Y11000%04i%04icups0\r", privdata.v_offset, + privdata.h_offset); + stp_puts ("Q0001\r", v); /* one label */ + stp_puts ("E\r", v); /* print now */ + stp_puts ("\002xDGcups0\r", v); /* delete graphic */ +#if 0 + stp_puts ("\002zD\r", v); /* reclaim space */ +#endif + + stp_image_conclude (image); + + /* + * Cleanup... + */ + + if (black != NULL) + stp_free (black); + + return status; +} + +static int +dpl_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 = dpl_do_print (nv, image); + stp_vars_destroy (nv); + return status; +} + +static const stp_printfuncs_t print_dpl_printfuncs = { + dpl_list_parameters, + dpl_parameters, + stp_default_media_size, + dpl_imageable_area, + dpl_imageable_area, + dpl_limit, + dpl_print, + dpl_describe_resolution, + dpl_describe_output, + stp_verify_printer_params, + NULL, + NULL, + NULL +}; + + +static void +dpl_pcx (stp_vars_t * v, /* I - Print file or command */ + unsigned char *short_line, /* I - Output bitmap data */ + int height, /* I - Height of bitmap data */ + int last_plane) /* I - True if this is the last plane */ +{ + unsigned char *line; + unsigned char *data; + unsigned char stored; + int add_bytes = 0; + int count = 0; + int in = 0; + int out = 0; + int xdpi, ydpi; + int model = stp_get_model_id (v); + const dpl_cap_t *caps = dpl_get_model_capabilities (model); + int i; + int max_dpi; + int dpi_adjust; + + /* Each line has to be 4 inches long */ + dpl_describe_resolution (v, &xdpi, &ydpi); + + for (i = 0; i < NUM_RESOLUTIONS; i++) + { + if (caps->max_resolution == dpl_resolutions[i].dpl_code) + { + max_dpi = dpl_resolutions[i].p0; + } + if (caps->resolution_adjust == dpl_resolutions[i].dpl_code) + { + dpi_adjust = dpl_resolutions[i].p0; + } + } + + if (xdpi == max_dpi) + { + add_bytes = ((xdpi * 4) + 7) / 8 - height; + } + else + { + add_bytes = ((dpi_adjust * 4) + 7) / 8 - height; + } + + /* allocate 4 inch input buffer */ + line = (unsigned char *) stp_malloc (height + add_bytes); + /* allocate output buffer, worst case */ + data = (unsigned char *) stp_malloc ((height + add_bytes) * 2); + + /* invert data, cups makes white 1 and black 0, printer wants the opposite */ + for (in = 0; in < height; in++) + { + line[in] = 0xff ^ short_line[in]; + } + + /* pad to 4 inches */ + for (in = height; in < (height + add_bytes); in++) + { + line[in] = 0xff; + } + + in = 0; + while (in < (height + add_bytes)) + { + stored = line[in]; /* save the value */ + for (count = 1; in + count < (height + add_bytes) && line[in + count] == stored && count < 63; count++); /* count the run */ + + /* test to see if we need to make a run of one because the data value + has the two top bits set and see if we actually have a run */ + if (stored > 191 || count > 1) + { + data[out++] = count | 0xc0; /* mask to indicate a run */ + data[out++] = stored; /* output the value */ + } + else /* not a run */ + { + data[out++] = stored; /* output the value */ + } + in += count; + } + stp_zfwrite ((const char *) data, out, 1, v); + stp_free (line); + stp_free (data); +} + + +static stp_family_t print_dpl_module_data = { + &print_dpl_printfuncs, + NULL +}; + + +static int +print_dpl_module_init (void) +{ + return stp_family_register (print_dpl_module_data.printer_list); +} + + +static int +print_dpl_module_exit (void) +{ + return stp_family_unregister (print_dpl_module_data.printer_list); +} + + +/* Module header */ +#define stp_module_version print_dpl_LTX_stp_module_version +#define stp_module_data print_dpl_LTX_stp_module_data + +stp_module_version_t stp_module_version = { 0, 0 }; + +stp_module_t stp_module_data = { + "dpl", + VERSION, + "DPL family driver", + STP_MODULE_CLASS_FAMILY, + NULL, + print_dpl_module_init, + print_dpl_module_exit, + (void *) &print_dpl_module_data +}; diff --git a/src/main/print-escp2-data.c b/src/main/print-escp2-data.c index 8e7d6e3..87a21fc 100644 --- a/src/main/print-escp2-data.c +++ b/src/main/print-escp2-data.c @@ -1,5 +1,4 @@ /* - * "$Id: print-escp2-data.c,v 1.275 2013/12/14 19:36:29 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c index 4619722..6b00c6f 100644 --- a/src/main/print-escp2.c +++ b/src/main/print-escp2.c @@ -1,5 +1,4 @@ /* - * "$Id: print-escp2.c,v 1.444 2015/09/09 23:57:32 speachy Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -2249,7 +2248,7 @@ escp2_parameters(const stp_vars_t *v, const char *name, _("Full Manual Control")); stp_string_list_add_string(description->bounds.str, "Auto", _("Automatic Setting Control")); - description->deflt.str = "None"; /* so CUPS and Foomatic don't break */ + description->deflt.str = "None"; /* so CUPS doesn't break */ } else if (strcmp(name, "PageSize") == 0) { @@ -3431,6 +3430,7 @@ setup_inks(stp_vars_t *v) if (drops->dropsizes[2] > 0 && drops->numdropsizes < 3) drops->numdropsizes = 3; } + STPI_ASSERT(drops->numdropsizes < (1 << escp2_bits(v)), v); for (i = drops->numdropsizes - 1; i >= 0; i--) { if (drops->dropsizes[i] > 0) diff --git a/src/main/print-escp2.h b/src/main/print-escp2.h index 976ffd6..0cb848f 100644 --- a/src/main/print-escp2.h +++ b/src/main/print-escp2.h @@ -1,6 +1,4 @@ /* - * "$Id: print-escp2.h,v 1.140 2014/01/23 13:22:41 rlk Exp $" - * * Print plug-in EPSON ESC/P2 driver for the GIMP. * * Copyright 1997-2000 Michael Sweet (mike@easysw.com) and @@ -623,6 +621,3 @@ extern void stpi_escp2_terminate_page(stp_vars_t *v); #endif #endif /* GUTENPRINT_INTERNAL_ESCP2_H */ -/* - * End of "$Id: print-escp2.h,v 1.140 2014/01/23 13:22:41 rlk Exp $". - */ diff --git a/src/main/print-lexmark.c b/src/main/print-lexmark.c index d8d3dcd..dcf9cbf 100644 --- a/src/main/print-lexmark.c +++ b/src/main/print-lexmark.c @@ -1,6 +1,5 @@ /* - * "$Id: print-lexmark.c,v 1.165 2015/09/09 23:57:32 speachy Exp $" * * Print plug-in Lexmark driver for the GIMP. * diff --git a/src/main/print-list.c b/src/main/print-list.c index 75b5b08..8ea2c0f 100644 --- a/src/main/print-list.c +++ b/src/main/print-list.c @@ -1,5 +1,4 @@ /* - * "$Id: print-list.c,v 1.27 2014/01/04 00:31:38 rlk Exp $" * * Gutenprint list functions. A doubly-linked list implementation, * with callbacks for freeing, sorting, and retrieving nodes by name diff --git a/src/main/print-olympus.c b/src/main/print-olympus.c index bfc4890..5af9d28 100644 --- a/src/main/print-olympus.c +++ b/src/main/print-olympus.c @@ -1,5 +1,4 @@ /* - * "$Id: print-olympus.c,v 1.227 2016/01/14 04:56:58 speachy Exp $" * * Print plug-in DyeSub driver (formerly Olympus driver) for the GIMP. * @@ -1327,10 +1326,10 @@ LIST(dyesub_resolution_list_t, res_334dpi_list, dyesub_resolution_t, res_334dpi) static const dyesub_pagesize_t updr150_page[] = { - { "w288h432", "2UPC-153 (4x6)", PT(1382,334)+1, PT(2048,334)+1, 0, 0, 0, 0, DYESUB_LANDSCAPE}, - { "B7", "2UPC-154 (3.5x5)", PT(1210,334)+1, PT(1728,334)+1, 0, 0, 0, 0, DYESUB_LANDSCAPE}, - { "w360h504", "2UPC-155 (5x7)", PT(1728,334)+1, PT(2380,334)+1, 0, 0, 0, 0, DYESUB_PORTRAIT}, - { "w432h576", "2UPC-156 (6x8)", PT(2048,334)+1, PT(2724,334)+1, 0, 0, 0, DYESUB_PORTRAIT}, + { "w288h432", "4x6", PT(1382,334)+1, PT(2048,334)+1, 0, 0, 0, 0, DYESUB_LANDSCAPE}, + { "B7", "3.5x5", PT(1210,334)+1, PT(1728,334)+1, 0, 0, 0, 0, DYESUB_LANDSCAPE}, + { "w360h504", "5x7", PT(1728,334)+1, PT(2380,334)+1, 0, 0, 0, 0, DYESUB_PORTRAIT}, + { "w432h576", "6x8", PT(2048,334)+1, PT(2724,334)+1, 0, 0, 0, DYESUB_PORTRAIT}, }; LIST(dyesub_pagesize_list_t, updr150_page_list, dyesub_pagesize_t, updr150_page); @@ -1474,13 +1473,13 @@ static void updr150_printer_end_func(stp_vars_t *v) /* Sony UP-DR200 */ static const dyesub_pagesize_t updr200_page[] = { - { "w288h432", "2UPC-R204 (4x6)", PT(1382,334)+1, PT(2048,334)+1, 0, 0, 0, 0, DYESUB_LANDSCAPE}, - { "w288h432-div2", "2UPC-R204 (2*2x6)", PT(1382,334)+1, PT(2048,334)+1, 0, 0, 0, 0, DYESUB_LANDSCAPE}, - { "B7", "2UPC-R203 (3.5x5)", PT(1210,334)+1, PT(1728,334)+1, 0, 0, 0, 0, DYESUB_LANDSCAPE}, - { "w360h504", "2UPC-R205 (5x7)", PT(1728,334)+1, PT(2380,334)+1, 0, 0, 0, 0, DYESUB_PORTRAIT}, - { "w360h504-div2", "2UPC-R205 (2*3.5x5)", PT(1728,334)+1, PT(2420,334)+1, 0, 0, 0, 0, DYESUB_PORTRAIT}, - { "w432h576", "2UPC-R206 (6x8)", PT(2048,334)+1, PT(2724,334)+1, 0, 0, 0, DYESUB_PORTRAIT}, - { "w432h576-div2", "2UPC-R206 (2*4x6)", PT(2048,334)+1, PT(2764,334)+1, 0, 0, 0, DYESUB_PORTRAIT}, + { "w288h432", "4x6", PT(1382,334)+1, PT(2048,334)+1, 0, 0, 0, 0, DYESUB_LANDSCAPE}, + { "w288h432-div2", "2x6*2", PT(1382,334)+1, PT(2048,334)+1, 0, 0, 0, 0, DYESUB_LANDSCAPE}, + { "B7", "3.5x5", PT(1210,334)+1, PT(1728,334)+1, 0, 0, 0, 0, DYESUB_LANDSCAPE}, + { "w360h504", "5x7", PT(1728,334)+1, PT(2380,334)+1, 0, 0, 0, 0, DYESUB_PORTRAIT}, + { "w360h504-div2", "3.5x5*2", PT(1728,334)+1, PT(2420,334)+1, 0, 0, 0, 0, DYESUB_PORTRAIT}, + { "w432h576", "6x8", PT(2048,334)+1, PT(2724,334)+1, 0, 0, 0, DYESUB_PORTRAIT}, + { "w432h576-div2", "4x6*2", PT(2048,334)+1, PT(2764,334)+1, 0, 0, 0, DYESUB_PORTRAIT}, }; LIST(dyesub_pagesize_list_t, updr200_page_list, dyesub_pagesize_t, updr200_page); @@ -2828,8 +2827,8 @@ static void mitsu_cpd70k60_printer_init(stp_vars_t *v, unsigned char model) /* Laminate a slightly larger boundary in Matte mode */ stp_put16_be(privdata.w_size, v); stp_put16_be(privdata.h_size + 12, v); - if (model == 0x02) { - stp_putc(0x04, v); /* Matte Lamination forces UltraFine on K60 */ + if (model == 0x02 || model == 0x90) { + stp_putc(0x04, v); /* Matte Lamination forces UltraFine on K60 or K305 */ } else { stp_putc(0x03, v); /* Matte Lamination forces Superfine (or UltraFine) */ } @@ -3036,6 +3035,127 @@ static void kodak305_printer_init(stp_vars_t *v) mitsu_cpd70k60_printer_init(v, 0x90); } +/* Mitsubishi CP-D90D */ +static const dyesub_pagesize_t mitsu_cpd90_page[] = +{ + { "w144h432", "2x6", PT(625,300)+1, PT(1852,300)+1, 0, 0, 0, 0, + DYESUB_LANDSCAPE}, + { "B7", "3.5x5", PT(1076,300)+1, PT(1550,300)+1, 0, 0, 0, 0, + DYESUB_LANDSCAPE}, + { "w288h432", "4x6", PT(1226,300)+1, PT(1852,300)+1, 0, 0, 0, 0, + DYESUB_LANDSCAPE}, + { "w288h432-div2", "2x6*2", PT(1226,300)+1, PT(1852,300)+1, 0, 0, 0, 0, + DYESUB_LANDSCAPE}, + { "w360h504", "5x7", PT(1550,300)+1, PT(2128,300)+1, 0, 0, 0, 0, + DYESUB_PORTRAIT}, + { "w360h360", "5x5", PT(1527,300)+1, PT(1550,300)+1, 0, 0, 0, 0, + DYESUB_LANDSCAPE}, + { "w432h432", "6x6", PT(1827,300)+1, PT(1852,300)+1, 0, 0, 0, 0, + DYESUB_LANDSCAPE}, + { "w432h576", "6x8", PT(1852,300)+1, PT(2428,300)+1, 0, 0, 0, 0, + DYESUB_PORTRAIT}, + { "w432h576-div2", "4x6*2", PT(1852,300)+1, PT(2488,300)+1, 0, 0, 0, 0, + DYESUB_PORTRAIT}, + { "w432h612", "6x8.5", PT(1852,300)+1, PT(2568,300)+1, 0, 0, 0, 0, + DYESUB_PORTRAIT}, + { "w432h648", "6x9", PT(1852,300)+1, PT(2729,300)+1, 0, 0, 0, 0, + DYESUB_PORTRAIT}, +}; + +LIST(dyesub_pagesize_list_t, mitsu_cpd90_page_list, dyesub_pagesize_t, mitsu_cpd90_page); + +static const dyesub_printsize_t mitsu_cpd90_printsize[] = +{ + { "300x300", "w144h432", 625, 1852}, + { "300x300", "B7", 1076, 1550}, + { "300x300", "w288h432", 1226, 1852}, + { "300x300", "w288h432-div2", 1226, 1852}, + { "300x300", "w360h360", 1527, 1550}, + { "300x300", "w360h504", 1550, 2128}, + { "300x300", "w432h432", 1827, 1852}, + { "300x300", "w432h576", 1852, 2428}, + { "300x300", "w432h576-div2", 1852, 2488}, + { "300x300", "w432h612", 1852, 2568}, + { "300x300", "w432h648", 1852, 2729}, +}; + +LIST(dyesub_printsize_list_t, mitsu_cpd90_printsize_list, dyesub_printsize_t, mitsu_cpd90_printsize); + +static void mitsu_cpd90_printer_init(stp_vars_t *v) +{ + /* Start things going */ + stp_putc(0x1b, v); + stp_putc(0x53, v); + stp_putc(0x50, v); + stp_putc(0x30, v); + stp_putc(0x00, v); + stp_putc(0x33, v); + stp_put16_be(privdata.w_size, v); /* Columns */ + stp_put16_be(privdata.h_size, v); /* Rows */ + stp_putc(0x64, v); + stp_putc(0x00, v); + stp_putc(0x00, v); + stp_putc(0x01, v); + stp_putc(0x00, v); + if (strcmp(privdata.pagesize,"w432h576-div2") == 0) + stp_putc(0x01, v); + else + stp_putc(0x00, v); + + if (strcmp(privdata.pagesize,"w432h576-div2") == 0) { + stp_putc(0x04, v); + stp_putc(0xbe, v); + dyesub_nputc(v, 0x00, 14); + } else if (strcmp(privdata.pagesize,"w288h432-div2") == 0) { + stp_putc(0x02, v); + stp_putc(0x65, v); + stp_putc(0x01, v); + stp_putc(0x00, v); + stp_putc(0x00, v); + stp_putc(0x01, v); + dyesub_nputc(v, 0x00, 10); + } else { + dyesub_nputc(v, 0x00, 16); + } + + dyesub_nputc(v, 0x00, 16); + + stp_zfwrite((privdata.laminate->seq).data, 1, + (privdata.laminate->seq).bytes, v); /* Lamination mode */ + stp_putc(0x00, v); /* XXX 0x02 = fine, 0x03 = ultrafine, 0x00 = auto */ + stp_putc(0x00, v); /* XXX 0x01 = no color correction, 0x00 = on */ + stp_putc(0x04, v); + stp_putc(0x04, v); + dyesub_nputc(v, 0x00, 11); + + dyesub_nputc(v, 0x00, 512 - 64); + + /* Second header block */ + stp_putc(0x1b, v); + stp_putc(0x5a, v); + stp_putc(0x54, v); + stp_putc(0x01, v); + stp_putc(0x00, v); + stp_putc(0x09, v); + dyesub_nputc(v, 0x00, 4); + stp_put16_be(privdata.w_size, v); /* Columns */ + stp_put16_be(privdata.h_size, v); /* Rows */ + dyesub_nputc(v, 0x00, 2); + + dyesub_nputc(v, 0x00, 512 - 32); +} + +static void mitsu_cpd90_printer_end(stp_vars_t *v) +{ + /* Wrap it up */ + stp_putc(0x1b, v); + stp_putc(0x42, v); + stp_putc(0x51, v); + stp_putc(0x31, v); + stp_putc(0x00, v); + stp_putc(0x05, v); +} + /* Shinko CHC-S9045 (experimental) */ static const dyesub_pagesize_t shinko_chcs9045_page[] = { @@ -3254,7 +3374,7 @@ LIST(dyesub_printsize_list_t, shinko_chcs1245_printsize_list, dyesub_printsize_t static const laminate_t shinko_chcs1245_laminate[] = { {"PrinterDefault", N_("Printer Default"), {1, "\x01"}}, - {"Glossy", N_("Glossy"), {1, "\x02\0\0\0"}}, + {"Glossy", N_("Glossy"), {1, "\x02"}}, {"GlossyFine", N_("Glossy Fine"), {1, "\x03"}}, {"Matte", N_("Matte"), {1, "\x04"}}, {"MatteFine", N_("Matte Fine"), {1, "\x05"}}, @@ -3650,8 +3770,8 @@ LIST(dyesub_printsize_list_t, dnpds40_printsize_list, dyesub_printsize_t, dnpds4 static const laminate_t dnpds40_laminate[] = { - {"Glossy", N_("Glossy"), {2, "00"}}, - {"Matte", N_("Matte"), {2, "01"}}, + {"Glossy", N_("Glossy"), {3, "000"}}, + {"Matte", N_("Matte"), {3, "001"}}, }; LIST(laminate_list_t, dnpds40_laminate_list, laminate_t, dnpds40_laminate); @@ -3660,7 +3780,7 @@ LIST(laminate_list_t, dnpds40_laminate_list, laminate_t, dnpds40_laminate); static void dnp_printer_start_common(stp_vars_t *v) { /* Configure Lamination */ - stp_zprintf(v, "\033PCNTRL OVERCOAT 00000008000000"); + stp_zprintf(v, "\033PCNTRL OVERCOAT 0000000800000"); stp_zfwrite((privdata.laminate->seq).data, 1, (privdata.laminate->seq).bytes, v); /* Lamination mode */ @@ -4025,6 +4145,7 @@ static const dyesub_pagesize_t dnpsrx1_page[] = { "w288h432", "4x6", PT(1240,300)+1, PT(1920,300)+1, 0, 0, PT(38,300), PT(38,300), DYESUB_LANDSCAPE}, { "w288h432-div2", "2x6*2", PT(1240,300)+1, PT(1920,300)+1, 0, 0, PT(38,300), PT(38,300), DYESUB_LANDSCAPE}, { "w360h504", "5x7", PT(1920,300)+1, PT(2138,300)+1, PT(186,300), PT(186,300), 0, 0, DYESUB_PORTRAIT}, + { "w360h504-div2", "3.5x5*2", PT(1920,300)+1, PT(2176,300)+1, PT(186,300), PT(186,300), 0, 0, DYESUB_PORTRAIT}, { "w432h576", "6x8", PT(1920,300)+1, PT(2436,300)+1, PT(38,300), PT(38,300), 0, 0, DYESUB_PORTRAIT}, { "w432h576-div4", "2x6*4", PT(1920,300)+1, PT(2436,300)+1, PT(38,300), PT(38,300), 0, 0, DYESUB_PORTRAIT}, { "w432h576-div2", "4x6*2", PT(1920,300)+1, PT(2498,300)+1, PT(38,300), PT(38,300), 0, 0, DYESUB_PORTRAIT}, @@ -4042,6 +4163,8 @@ static const dyesub_printsize_t dnpsrx1_printsize[] = { "300x600", "w288h432-div2", 2480, 1920}, { "300x300", "w360h504", 1920, 2138}, { "300x600", "w360h504", 1920, 4276}, + { "300x300", "w360h504-div2", 1920, 2176}, + { "300x600", "w360h504-div2", 1920, 4352}, { "300x300", "w432h576", 1920, 2436}, { "300x600", "w432h576", 1920, 4872}, { "300x300", "w432h576-div4", 1920, 2436}, @@ -4076,6 +4199,8 @@ static void dnpdsrx1_printer_start(stp_vars_t *v) stp_zprintf(v, "02"); } else if (!strcmp(privdata.pagesize, "w360h504")) { stp_zprintf(v, "03"); + } else if (!strcmp(privdata.pagesize, "w360h504-div2")) { + stp_zprintf(v, "22"); } else if (!strcmp(privdata.pagesize, "w432h576")) { stp_zprintf(v, "04"); } else if (!strcmp(privdata.pagesize, "w432h576-div2")) { @@ -4090,6 +4215,15 @@ static void dnpdsrx1_printer_start(stp_vars_t *v) } /* Dai Nippon Printing DS620 */ +static const laminate_t dnpds620_laminate[] = +{ + {"Glossy", N_("Glossy"), {3, "000"}}, + {"Matte", N_("Matte"), {3, "001"}}, + {"MatteLuster", N_("Matte Luster"), {3, "022"}}, +}; + +LIST(laminate_list_t, dnpds620_laminate_list, laminate_t, dnpds620_laminate); + /* Imaging area is wider than print size, we always must supply the printer with the full imaging width. */ static const dyesub_pagesize_t dnpds620_page[] = @@ -4942,7 +5076,7 @@ static const dyesub_cap_t dyesub_model_capabilities[] = }, { /* Mitsubishi CP9550D */ 4103, - &rgb_ink_list, + &bgr_ink_list, &res_346dpi_list, &mitsu_cp9550_page_list, &mitsu_cp9550_printsize_list, @@ -5041,6 +5175,21 @@ static const dyesub_cap_t dyesub_model_capabilities[] = &mitsu_cpd70x_laminate_list, NULL, NULL, NULL, NULL, }, + { /* Mitsubishi CPD90D */ + 4109, + &bgr_ink_list, + &res_300dpi_list, + &mitsu_cpd90_page_list, + &mitsu_cpd90_printsize_list, + SHRT_MAX, + DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT, + &mitsu_cpd90_printer_init, &mitsu_cpd90_printer_end, + NULL, NULL, + NULL, NULL, /* No block funcs */ + NULL, NULL, NULL, /* color profile/adjustment is built into printer */ + &mitsu_cpd70x_laminate_list, NULL, NULL, + NULL, NULL, + }, { /* Shinko CHC-S9045 (experimental) */ 5000, &rgb_ink_list, @@ -5191,7 +5340,7 @@ static const dyesub_cap_t dyesub_model_capabilities[] = &dnpds40_plane_init, NULL, NULL, NULL, NULL, NULL, NULL, - &dnpds40_laminate_list, NULL, NULL, + &dnpds620_laminate_list, NULL, NULL, NULL, NULL, }, { /* Citizen CW-01 */ @@ -5977,22 +6126,20 @@ dyesub_print_pixel(stp_vars_t *v, if (dyesub_feature(caps, DYESUB_FEATURE_RGBtoYCBCR)) { /* Convert RGB -> YCbCr (JPEG YCbCr444 coefficients) */ double R, G, B; - double Y, Cr, Cb; R = out[0]; G = out[1]; B = out[2]; - - Y = R * 0.29900 + G * 0.58700 + B * 0.11400; - Cb = R * -0.16874 + G * -0.33126 + B * 0.50000 + 32768; - Cr = R * 0.50000 + G * -0.41869 + B * -0.08131 + 32768; - - ink[0] = Y; - ink[1] = Cb; - ink[2] = Cr; - - /* XXX this is sub-optimal; we compute the full YCbCr - values and throw away 2/3 for each pixel printed - if we are plane or row interleaved */ + + if (i == 0) /* Y */ + ink[i] = R * 0.299 + G * 0.587 + B * 0.114; + else if (i == 1) /* Cb */ + ink[i] = R * -0.168736 + G * -0.331264 + B * 0.5 + 32768; + else if (i == 2) /* Cr */ + ink[i] = R * 0.5 + G * -0.418688 + B * -0.081312 + 32768; + + /* FIXME: Natively support YCbCr "inks" in the + Gutenprint core and allow that as an input + into the dyesub driver. */ } else { ink[i] = out[i]; } @@ -6273,9 +6420,9 @@ dyesub_do_print(stp_vars_t *v, stp_image_t *image) } if (pv.bytes_per_ink_channel > 1) { -#if defined(__LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__) - pv.byteswap = dyesub_feature(caps, DYESUB_FEATURE_BIGENDIAN); -#elif defined (__BIG_ENDIAN) || defined(__BIG_ENDIAN__) +#if (__BYTE_ORDER == __LITTLE_ENDIAN) + pv.byteswap = dyesub_feature(caps, DYESUB_FEATURE_BIGENDIAN); +#elif (__BYTE_ORDER == __BIG_ENDIAN) pv.byteswap = !dyesub_feature(caps, DYESUB_FEATURE_BIGENDIAN); #else #error "Unable to determine endianness, aborting compilation!" diff --git a/src/main/print-papers.c b/src/main/print-papers.c index fa84f96..b38f103 100644 --- a/src/main/print-papers.c +++ b/src/main/print-papers.c @@ -1,5 +1,4 @@ /* - * "$Id: print-papers.c,v 1.44 2015/09/07 21:57:37 speachy Exp $" * * Print plug-in driver utility functions for the GIMP. * diff --git a/src/main/print-pcl.c b/src/main/print-pcl.c index 7954b9a..0169c8b 100644 --- a/src/main/print-pcl.c +++ b/src/main/print-pcl.c @@ -1,5 +1,4 @@ /* - * "$Id: print-pcl.c,v 1.166 2015/10/26 00:43:07 sletter1 Exp $" * * Print plug-in HP PCL driver for the GIMP. * diff --git a/src/main/print-ps.c b/src/main/print-ps.c index d969596..3596e01 100644 --- a/src/main/print-ps.c +++ b/src/main/print-ps.c @@ -1,5 +1,4 @@ /* - * "$Id: print-ps.c,v 1.105 2012/01/19 13:25:40 m0m Exp $" * * Print plug-in Adobe PostScript driver for the GIMP. * diff --git a/src/main/print-raw.c b/src/main/print-raw.c index 6f4b57d..9af9629 100644 --- a/src/main/print-raw.c +++ b/src/main/print-raw.c @@ -1,5 +1,4 @@ /* - * "$Id: print-raw.c,v 1.47 2015/09/09 23:57:32 speachy Exp $" * * Print plug-in RAW driver for the GIMP. * diff --git a/src/main/print-util.c b/src/main/print-util.c index ca7cef9..400f7b7 100644 --- a/src/main/print-util.c +++ b/src/main/print-util.c @@ -1,5 +1,4 @@ /* - * "$Id: print-util.c,v 1.122 2015/09/09 23:57:32 speachy Exp $" * * Print plug-in driver utility functions for the GIMP. * diff --git a/src/main/print-vars.c b/src/main/print-vars.c index 27d9545..515cb76 100644 --- a/src/main/print-vars.c +++ b/src/main/print-vars.c @@ -1,5 +1,4 @@ /* - * "$Id: print-vars.c,v 1.95 2014/01/04 00:31:38 rlk Exp $" * * Print plug-in driver utility functions for the GIMP. * diff --git a/src/main/print-version.c b/src/main/print-version.c index 1137d34..ca8ac3c 100644 --- a/src/main/print-version.c +++ b/src/main/print-version.c @@ -1,5 +1,4 @@ /* - * "$Id: print-version.c,v 1.8 2005/04/10 23:15:16 rlk Exp $" * * Print plug-in driver utility functions for the GIMP. * diff --git a/src/main/print-weave.c b/src/main/print-weave.c index c17a367..c9f36ff 100644 --- a/src/main/print-weave.c +++ b/src/main/print-weave.c @@ -1,5 +1,4 @@ /* - * "$Id: print-weave.c,v 1.81 2012/05/26 16:03:19 rlk Exp $" * * Softweave calculator for Gutenprint. * diff --git a/src/main/printers.c b/src/main/printers.c index 7effdfb..9722bd4 100644 --- a/src/main/printers.c +++ b/src/main/printers.c @@ -1,5 +1,4 @@ /* - * "$Id: printers.c,v 1.94 2015/07/13 02:18:20 speachy Exp $" * * Print plug-in driver utility functions for the GIMP. * @@ -66,7 +65,6 @@ struct stp_printer char *family; /* Printer family */ char *manufacturer; /* Printer manufacturer */ char *device_id; /* IEEE 1284 device ID */ - char *foomatic_id; /* Foomatic printer ID */ char *comment; /* Comment string, if any */ int model; /* Model number */ int vars_initialized; @@ -136,11 +134,6 @@ stpi_printer_freefunc(void *item) stp_free(printer->comment); printer->comment = NULL; } - if (printer->foomatic_id) - { - stp_free(printer->foomatic_id); - printer->comment = NULL; - } stp_free(printer->long_name); stp_free(printer->family); stp_free(printer); @@ -206,7 +199,8 @@ stp_printer_get_manufacturer(const stp_printer_t *printer) const char * stp_printer_get_foomatic_id(const stp_printer_t *printer) { - return printer->foomatic_id; + stp_erprintf("stp_printer_get_foomatic_id is DEPRECATED\n"); + return NULL; } const char * @@ -287,24 +281,7 @@ stp_get_printer_by_device_id(const char *device_id) const stp_printer_t * stp_get_printer_by_foomatic_id(const char *foomatic_id) { - stp_list_item_t *printer_item; - if (printer_list == NULL) - { - stp_erprintf("No printer drivers found: " - "are STP_DATA_PATH and STP_MODULE_PATH correct?\n"); - stpi_init_printer_list(); - } - if (! foomatic_id || strcmp(foomatic_id, "") == 0) - return NULL; - - printer_item = stp_list_get_start(printer_list); - while (printer_item) - { - if (strcmp(((const stp_printer_t *) stp_list_item_get_data(printer_item))->foomatic_id, - foomatic_id) == 0) - return ((const stp_printer_t *) stp_list_item_get_data(printer_item)); - printer_item = stp_list_item_next(printer_item); - } + stp_erprintf("stp_get_printer_by_foomatic_id is DEPRECATED\n"); return NULL; } @@ -1127,9 +1104,6 @@ stp_printer_create_from_xmltree(stp_mxml_node_t *printer, /* The printer node */ stmp = stp_mxmlElementGetAttr(printer, "deviceid"); if (stmp) outprinter->device_id = stp_strdup(stmp); - stmp = stp_mxmlElementGetAttr(printer, "foomaticid"); - if (stmp) - outprinter->foomatic_id = stp_strdup(stmp); child = printer->child; while (child) diff --git a/src/main/sequence.c b/src/main/sequence.c index 096c0b2..9792181 100644 --- a/src/main/sequence.c +++ b/src/main/sequence.c @@ -1,5 +1,4 @@ /* - * "$Id: sequence.c,v 1.30 2014/01/04 00:31:38 rlk Exp $" * * Sequence data type. This type is designed to be derived from by * the curve and dither matrix types. diff --git a/src/main/string-list.c b/src/main/string-list.c index 337a717..3d39822 100644 --- a/src/main/string-list.c +++ b/src/main/string-list.c @@ -1,5 +1,4 @@ /* - * "$Id: string-list.c,v 1.21 2014/01/04 00:31:38 rlk Exp $" * * Print plug-in driver utility functions for the GIMP. * diff --git a/src/main/xml.c b/src/main/xml.c index fdbeff1..10677c7 100644 --- a/src/main/xml.c +++ b/src/main/xml.c @@ -1,5 +1,4 @@ /* - * "$Id: xml.c,v 1.43 2010/08/04 00:33:57 rlk Exp $" * * XML parser - process Gutenprint XML data with mxml. * diff --git a/src/main/xmlppd.h b/src/main/xmlppd.h index a348d70..a0ca355 100644 --- a/src/main/xmlppd.h +++ b/src/main/xmlppd.h @@ -1,5 +1,4 @@ /* - * "$Id: xmlppd.h,v 1.2 2007/12/24 03:05:52 rlk Exp $" * * Copyright 2007 by Michael R Sweet and Robert Krawitz * |