diff options
author | Roger Leigh <rleigh@debian.org> | 2008-10-26 16:17:32 +0000 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2008-10-26 16:17:32 +0000 |
commit | cda0fb3b8a7cb56045b24fd0af0ed36591b5d7eb (patch) | |
tree | 31ef197ec5c98ac9ac08714a2440a787c065d8c7 /src/foomatic | |
parent | 92b02ddce00dec2787514568fa9d644d4f0350e9 (diff) |
Imported Upstream version 5.0.1
Diffstat (limited to 'src/foomatic')
-rw-r--r-- | src/foomatic/Makefile.in | 74 | ||||
-rw-r--r-- | src/foomatic/foomatic-generator.in | 58 | ||||
-rw-r--r-- | src/foomatic/foomatic-printermap | 71 | ||||
-rw-r--r-- | src/foomatic/gutenprint-version.c | 4 | ||||
-rw-r--r-- | src/foomatic/mk_printerlist.in | 2 | ||||
-rw-r--r-- | src/foomatic/paper_sizes.c | 4 | ||||
-rw-r--r-- | src/foomatic/printer_margins.c | 22 | ||||
-rw-r--r-- | src/foomatic/printer_options.c | 225 | ||||
-rw-r--r-- | src/foomatic/printers.c | 4 |
9 files changed, 313 insertions, 151 deletions
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) * |