diff options
author | Roger Leigh <rleigh@debian.org> | 2010-02-18 18:43:37 +0000 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2010-02-18 18:43:37 +0000 |
commit | b7a746079a87b24dc0e64362e83463029e26c98f (patch) | |
tree | 4cd968e10cb18bdcd7ed21489f6fdb3e9dc1e0ff /src/cups | |
parent | 0f09a5be038c93c1bd5ca2988e152345bbf74c00 (diff) |
Imported Upstream version 5.2.5
Diffstat (limited to 'src/cups')
-rw-r--r-- | src/cups/cups-genppdupdate.in | 4 | ||||
-rw-r--r-- | src/cups/genppd.c | 20 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/cups/cups-genppdupdate.in b/src/cups/cups-genppdupdate.in index 1286c45..adf27e9 100644 --- a/src/cups/cups-genppdupdate.in +++ b/src/cups/cups-genppdupdate.in @@ -1,5 +1,5 @@ #! @PERL@ -w -# $Id: cups-genppdupdate.in,v 1.57 2009/06/07 02:34:55 rlk Exp $ +# $Id: cups-genppdupdate.in,v 1.58 2010/01/01 19:22:18 rlk Exp $ # Update CUPS PPDs for Gutenprint queues. # Copyright (C) 2002-2003 Roger Leigh (rleigh@debian.org) # @@ -177,7 +177,7 @@ if (!$quiet || $verbose) { my $plural = $updated_ppd_count == 1 ? "" : "s"; print STDOUT "Updated $updated_ppd_count PPD file${plural}."; if (!defined $opt_o || $opt_o ne "") { - print STDOUT "Restart cupsd for the changes to take effect."; + print STDOUT " Restart cupsd for the changes to take effect."; } print STDOUT "\n"; } else { diff --git a/src/cups/genppd.c b/src/cups/genppd.c index 2af44a6..7568abf 100644 --- a/src/cups/genppd.c +++ b/src/cups/genppd.c @@ -1,5 +1,5 @@ /* - * "$Id: genppd.c,v 1.178 2009/07/18 00:55:45 rlk Exp $" + * "$Id: genppd.c,v 1.179 2009/10/05 12:37:30 rlk Exp $" * * PPD file generation program for the CUPS drivers. * @@ -358,30 +358,34 @@ list_ppds(const char *argv0) /* I - Name of program */ for (i = 0; i < stp_printer_model_count(); i++) if ((printer = stp_get_printer_by_index(i)) != NULL) { + const char *device_id; if (!strcmp(stp_printer_get_family(printer), "ps") || !strcmp(stp_printer_get_family(printer), "raw")) continue; + device_id = stp_printer_get_device_id(printer); printf("\"%s://%s/expert\" " "%s " "\"%s\" " "\"%s" CUPS_PPD_NICKNAME_STRING VERSION "\" " - "\"\"\n", /* No IEEE-1284 Device ID yet */ + "\"%s\"\n", scheme, stp_printer_get_driver(printer), "en", stp_printer_get_manufacturer(printer), - stp_printer_get_long_name(printer)); + stp_printer_get_long_name(printer), + device_id ? device_id : ""); #ifdef GENERATE_SIMPLIFIED_PPDS printf("\"%s://%s/simple\" " "%s " "\"%s\" " "\"%s" CUPS_PPD_NICKNAME_STRING VERSION " Simplified\" " - "\"\"\n", /* No IEEE-1284 Device ID yet */ + "\"%s\"\n", scheme, stp_printer_get_driver(printer), "en", stp_printer_get_manufacturer(printer), - stp_printer_get_long_name(printer)); + stp_printer_get_long_name(printer), + device_id ? device_id : ""); #endif } @@ -925,6 +929,7 @@ write_ppd( int model; /* Internal model ID */ const char *long_name; /* Driver long name */ const char *manufacturer; /* Manufacturer of printer */ + const char *device_id; /* IEEE1284 device ID */ const stp_vars_t *printvars; /* Printer option names */ paper_t *the_papers; /* Media sizes */ int cur_opt; /* Current option */ @@ -957,6 +962,7 @@ write_ppd( model = stp_printer_get_model(p); long_name = stp_printer_get_long_name(p); manufacturer = stp_printer_get_manufacturer(p); + device_id = stp_printer_get_device_id(p); printvars = stp_printer_get_defaults(p); the_papers = NULL; cur_opt = 0; @@ -1079,6 +1085,8 @@ write_ppd( gzprintf(fp, "*cupsFilter: \"application/vnd.cups-raster 100 rastertogutenprint.%s\"\n", GUTENPRINT_RELEASE_VERSION); if (strcasecmp(manufacturer, "EPSON") == 0) gzputs(fp, "*cupsFilter: \"application/vnd.cups-command 33 commandtoepson\"\n"); + if (device_id) + gzprintf(fp, "*1284DeviceID: \"%s\"\n", device_id); if (!language) { /* @@ -2353,5 +2361,5 @@ write_ppd( /* - * End of "$Id: genppd.c,v 1.178 2009/07/18 00:55:45 rlk Exp $". + * End of "$Id: genppd.c,v 1.179 2009/10/05 12:37:30 rlk Exp $". */ |