From: msweet Date: Fri, 9 Jan 2009 23:33:14 +0000 (+0000) Subject: Merge changes from CUPS 1.4svn-r8227. X-Git-Tag: release-1.6.3~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c168a833caab4209bdb0035d8918207d40013591;p=thirdparty%2Fcups.git Merge changes from CUPS 1.4svn-r8227. git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1113 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES-1.3.txt b/CHANGES-1.3.txt index b9d317c255..42e447283e 100644 --- a/CHANGES-1.3.txt +++ b/CHANGES-1.3.txt @@ -3,7 +3,15 @@ CHANGES-1.3.txt CHANGES IN CUPS V1.3.10 - - Documentation fixes (STR #2994, STR #2995, STR #3008) + - Documentation fixes (STR #2994, STR #2995, STR #3008, STR #3056) + - The web interface sometimes incorrectly redirected users to + 127.0.0.1 (STR #3022) + - cupsPrintFile*() did not send the document filename for single + file submissions (STR #3055) + - The scheduler did not update the member-names attribute when + removing the last printer from a class. + - The scheduler did not report PPD Products with parenthesis + in them properly (STR #3046) - The wrong italic fonts were listed in the UTF-8 charset file for the text filter. - The backends did not return an OK status for the diff --git a/CHANGES.txt b/CHANGES.txt index 6bed905348..4c35ec79d2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,26 @@ -CHANGES.txt - 2008-12-15 +CHANGES.txt - 2009-01-09 ------------------------ +CHANGES IN CUPS V1.4b3 + + - CUPS now conforms to the draft IPP/2.0 and IPP/2.1 specification. + - Fixed build problems (STR #3040, STR #3047) + - cupsResolveConflicts() did not resolve using the default option + choice in some cases due to the mirror UIConstraints that are + present in most PPD files. + - The scheduler did not honor MIME type priorities. + - The commandtops filter incorrectly used the JCLBegin code to end + its jobs. + - The default BrowseLocalProtocols value was not set properly. + - Since the commandtops filter does not actually support ReportLevels + all on its own, don't list that printer command by default for PS + printers. + - The scheduler did not give filters a chance to log errors or update + printer attributes when a job was canceled. + - The scheduler did not clear the "connecting-to-device" reason keyword + when a job finished. + + CHANGES IN CUPS V1.4b2 - Documentation updates (STR #2983, STR #2998, STR #3021) diff --git a/Makedefs.in b/Makedefs.in index 8753db79fc..1c182ed0b7 100644 --- a/Makedefs.in +++ b/Makedefs.in @@ -3,7 +3,7 @@ # # Common makefile definitions for the Common UNIX Printing System (CUPS). # -# Copyright 2007-2008 by Apple Inc. +# Copyright 2007-2009 by Apple Inc. # Copyright 1997-2007 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -144,7 +144,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \ LEGACY_BACKENDS = @LEGACY_BACKENDS@ LIBCUPSORDER = @LIBCUPSORDER@ LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@ -LINKCUPS = @LINKCUPS@ $(SSLLIBS) +LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(DNSSDLIBS) LINKCUPSIMAGE = @LINKCUPSIMAGE@ LIBS = $(LINKCUPS) $(COMMONLIBS) OPTIM = @OPTIM@ diff --git a/README.txt b/README.txt index 784a7087e5..2535148646 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -README - CUPS v1.4b2 - 2008-12-15 +README - CUPS v1.4b2 - 2009-01-07 --------------------------------- ********************************************************************** @@ -163,7 +163,7 @@ PRINTING FILES LEGAL STUFF - CUPS is Copyright 2007-2008 by Apple Inc. CUPS, the CUPS logo, and the + CUPS is Copyright 2007-2009 by Apple Inc. CUPS, the CUPS logo, and the Common UNIX Printing System are trademarks of Apple Inc. The MD5 Digest code is Copyright 1999 Aladdin Enterprises. diff --git a/backend/Makefile b/backend/Makefile index 4622733391..6ea05fdb2d 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -3,7 +3,7 @@ # # Backend makefile for the Common UNIX Printing System (CUPS). # -# Copyright 2007-2008 by Apple Inc. +# Copyright 2007-2009 by Apple Inc. # Copyright 1997-2007 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -137,7 +137,7 @@ uninstall: test1284: test1284.o ../cups/libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) # @@ -147,7 +147,7 @@ test1284: test1284.o ../cups/libcups.a testbackend: testbackend.o ../cups/libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) # @@ -157,7 +157,8 @@ testbackend: testbackend.o ../cups/libcups.a testsupplies: testsupplies.o libbackend.a ../cups/libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \ - ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) # diff --git a/backend/ipp.c b/backend/ipp.c index 78b3ddb3bb..d2f1d570e1 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -3,7 +3,7 @@ * * IPP backend for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -258,7 +258,7 @@ main(int argc, /* I - Number of command-line args */ */ compression = 0; - version = 1; + version = 11; waitjob = 1; waitprinter = 1; contimeout = 7 * 24 * 60 * 60; @@ -355,9 +355,13 @@ main(int argc, /* I - Number of command-line args */ else if (!strcasecmp(name, "version")) { if (!strcmp(value, "1.0")) - version = 0; + version = 10; else if (!strcmp(value, "1.1")) - version = 1; + version = 11; + else if (!strcmp(value, "2.0")) + version = 20; + else if (!strcmp(value, "2.1")) + version = 21; else { _cupsLangPrintf(stderr, @@ -667,7 +671,8 @@ main(int argc, /* I - Number of command-line args */ */ request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES); - request->request.op.version[1] = version; + request->request.op.version[0] = version / 10; + request->request.op.version[1] = version % 10; ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); @@ -713,16 +718,16 @@ main(int argc, /* I - Number of command-line args */ delay += 5; } else if ((ipp_status == IPP_BAD_REQUEST || - ipp_status == IPP_VERSION_NOT_SUPPORTED) && version == 1) + ipp_status == IPP_VERSION_NOT_SUPPORTED) && version > 10) { /* * Switch to IPP/1.0... */ - _cupsLangPuts(stderr, - _("INFO: Printer does not support IPP/1.1, trying " - "IPP/1.0...\n")); - version = 0; + _cupsLangPrintf(stderr, + _("INFO: Printer does not support IPP/%d.%d, trying " + "IPP/1.0...\n"), version / 10, version % 10); + version = 10; httpReconnect(http); } else if (ipp_status == IPP_NOT_FOUND) @@ -874,7 +879,8 @@ main(int argc, /* I - Number of command-line args */ else request = ippNewRequest(IPP_PRINT_JOB); - request->request.op.version[1] = version; + request->request.op.version[0] = version / 10; + request->request.op.version[1] = version % 10; ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); @@ -967,7 +973,7 @@ main(int argc, /* I - Number of command-line args */ "document-format", NULL, final_content_type); } - if (copies_sup && version > 0 && send_options) + if (copies_sup && version > 10 && send_options) { /* * Only send options if the destination printer supports the copies @@ -1022,16 +1028,16 @@ main(int argc, /* I - Number of command-line args */ sleep(10); } else if ((ipp_status == IPP_BAD_REQUEST || - ipp_status == IPP_VERSION_NOT_SUPPORTED) && version == 1) + ipp_status == IPP_VERSION_NOT_SUPPORTED) && version > 10) { /* * Switch to IPP/1.0... */ - _cupsLangPuts(stderr, - _("INFO: Printer does not support IPP/1.1, trying " - "IPP/1.0...\n")); - version = 0; + _cupsLangPrintf(stderr, + _("INFO: Printer does not support IPP/%d.%d, trying " + "IPP/1.0...\n"), version / 10, version % 10); + version = 10; httpReconnect(http); } else @@ -1072,8 +1078,8 @@ main(int argc, /* I - Number of command-line args */ */ request = ippNewRequest(IPP_SEND_DOCUMENT); - - request->request.op.version[1] = version; + request->request.op.version[0] = version / 10; + request->request.op.version[1] = version % 10; ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); @@ -1138,7 +1144,8 @@ main(int argc, /* I - Number of command-line args */ */ request = ippNewRequest(IPP_GET_JOB_ATTRIBUTES); - request->request.op.version[1] = version; + request->request.op.version[0] = version / 10; + request->request.op.version[1] = version % 10; ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); @@ -1322,7 +1329,8 @@ cancel_job(http_t *http, /* I - HTTP connection */ _cupsLangPuts(stderr, _("INFO: Canceling print job...\n")); request = ippNewRequest(IPP_CANCEL_JOB); - request->request.op.version[1] = version; + request->request.op.version[0] = version / 10; + request->request.op.version[1] = version % 10; ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); @@ -1377,7 +1385,8 @@ check_printer_state( */ request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES); - request->request.op.version[1] = version; + request->request.op.version[0] = version / 10; + request->request.op.version[1] = version % 10; ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); diff --git a/cgi-bin/Makefile b/cgi-bin/Makefile index b94cf08404..3e1a59aaab 100644 --- a/cgi-bin/Makefile +++ b/cgi-bin/Makefile @@ -3,7 +3,7 @@ # # CGI makefile for the Common UNIX Printing System (CUPS). # -# Copyright 2007-2008 by Apple Inc. +# Copyright 2007-2009 by Apple Inc. # Copyright 1997-2006 by Easy Software Products. # # These coded instructions, statements, and computer programs are the @@ -315,7 +315,8 @@ printers.cgi: printers.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI) testcgi: testcgi.o ../Makedefs libcupscgi.a ../cups/libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcgi.o libcupscgi.a \ - ../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI) + ../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \ + $(LIBZ) $(LIBGSSAPI) echo Testing CGI API... ./testcgi @@ -327,7 +328,8 @@ testcgi: testcgi.o ../Makedefs libcupscgi.a ../cups/libcups.a testhi: testhi.o ../Makedefs libcupscgi.a ../cups/libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhi.o libcupscgi.a \ - ../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI) + ../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \ + $(LIBZ) $(LIBGSSAPI) echo Testing help index API... ./testhi @@ -339,7 +341,7 @@ testhi: testhi.o ../Makedefs libcupscgi.a ../cups/libcups.a testtemplate: testtemplate.o ../Makedefs libcupscgi.a ../cups/libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o $@ testtemplate.o libcupscgi.a ../cups/libcups.a \ - $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI) + $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) $(LIBGSSAPI) # @@ -349,7 +351,8 @@ testtemplate: testtemplate.o ../Makedefs libcupscgi.a ../cups/libcups.a websearch: websearch.o ../Makedefs libcupscgi.a ../cups/libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ websearch.o libcupscgi.a \ - ../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI) + ../cups/libcups.a $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \ + $(LIBZ) $(LIBGSSAPI) # diff --git a/cgi-bin/ipp-var.c b/cgi-bin/ipp-var.c index 604b864696..90c90cf74a 100644 --- a/cgi-bin/ipp-var.c +++ b/cgi-bin/ipp-var.c @@ -778,7 +778,7 @@ cgiRewriteURL(const char *uri, /* I - Current URI */ int urlsize, /* I - Size of URL buffer */ const char *newresource) /* I - Replacement resource */ { - char method[HTTP_MAX_URI], + char scheme[HTTP_MAX_URI], userpass[HTTP_MAX_URI], hostname[HTTP_MAX_URI], rawresource[HTTP_MAX_URI], @@ -825,13 +825,13 @@ cgiRewriteURL(const char *uri, /* I - Current URI */ * Convert the URI to a URL... */ - httpSeparateURI(HTTP_URI_CODING_ALL, uri, method, sizeof(method), userpass, + httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme), userpass, sizeof(userpass), hostname, sizeof(hostname), &port, rawresource, sizeof(rawresource)); - if (!strcmp(method, "ipp") || - !strcmp(method, "http") || - !strcmp(method, "https")) + if (!strcmp(scheme, "ipp") || + !strcmp(scheme, "http") || + !strcmp(scheme, "https")) { if (newresource) { @@ -870,7 +870,9 @@ cgiRewriteURL(const char *uri, /* I - Current URI */ * Map local access to a local URI... */ - if (!strcasecmp(hostname, "localhost") || + if (!strcasecmp(hostname, "127.0.0.1") || + !strcasecmp(hostname, "[::1]") || + !strcasecmp(hostname, "localhost") || !strncasecmp(hostname, "localhost.", 10) || !strcasecmp(hostname, server) || !strcasecmp(hostname, servername)) diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in index a716cdec70..3e17f3f435 100644 --- a/conf/cupsd.conf.in +++ b/conf/cupsd.conf.in @@ -22,7 +22,7 @@ Listen localhost:@DEFAULT_IPP_PORT@ Browsing On BrowseOrder allow,deny BrowseAllow all -BrowseLocalProtocols @CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS@ +BrowseLocalProtocols @CUPS_BROWSE_LOCAL_PROTOCOLS@ # Default authentication type, when authentication is required... DefaultAuthType Basic diff --git a/cups/Dependencies b/cups/Dependencies index b1336d501f..8b8c25c8b2 100644 --- a/cups/Dependencies +++ b/cups/Dependencies @@ -24,7 +24,7 @@ debug.o: md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h debug.o: i18n.h transcode.h debug.h dest.o: debug.h globals.h string.h ../config.h http-private.h http.h dest.o: versioning.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h -dest.o: language.h i18n.h transcode.h +dest.o: language.h i18n.h transcode.h pwgmedia.h dir.o: dir.h versioning.h string.h ../config.h debug.h emit.o: ppd.h array.h versioning.h file.h string.h ../config.h debug.h encode.o: cups.h ipp.h http.h versioning.h ppd.h array.h file.h language.h @@ -71,7 +71,7 @@ localize.o: globals.h string.h ../config.h http-private.h http.h versioning.h localize.o: md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h localize.o: i18n.h transcode.h ppd-private.h debug.h mark.o: cups.h ipp.h http.h versioning.h ppd.h array.h file.h language.h -mark.o: string.h ../config.h debug.h +mark.o: string.h ../config.h debug.h pwgmedia.h md5.o: md5.h string.h ../config.h md5passwd.o: http-private.h ../config.h http.h versioning.h md5.h md5passwd.o: ipp-private.h ipp.h string.h @@ -84,6 +84,9 @@ page.o: ppd.h array.h versioning.h file.h string.h ../config.h ppd.o: ppd-private.h cups.h ipp.h http.h versioning.h ppd.h array.h file.h ppd.o: language.h globals.h string.h ../config.h http-private.h md5.h ppd.o: ipp-private.h i18n.h transcode.h debug.h +pwgmedia.o: pwgmedia.h globals.h string.h ../config.h http-private.h http.h +pwgmedia.o: versioning.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h +pwgmedia.o: file.h language.h i18n.h transcode.h debug.h request.o: globals.h string.h ../config.h http-private.h http.h versioning.h request.o: md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h request.o: i18n.h transcode.h debug.h @@ -124,7 +127,7 @@ testoptions.o: array.h file.h language.h testlang.o: i18n.h transcode.h language.h array.h versioning.h string.h testlang.o: ../config.h testppd.o: ../cups/string.h ../config.h string.h cups.h ipp.h http.h -testppd.o: versioning.h ppd.h array.h file.h language.h +testppd.o: versioning.h ppd.h array.h file.h language.h pwgmedia.h testsnmp.o: string.h ../config.h snmp-private.h http.h versioning.h # DO NOT DELETE @@ -152,7 +155,7 @@ debug.32.o: debug.c md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h langu debug.32.o: debug.c i18n.h transcode.h debug.h dest.32.o: dest.c debug.h globals.h string.h ../config.h http-private.h http.h dest.32.o: dest.c versioning.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h -dest.32.o: dest.c language.h i18n.h transcode.h +dest.32.o: dest.c language.h i18n.h transcode.h pwgmedia.h dir.32.o: dir.c dir.h versioning.h string.h ../config.h debug.h emit.32.o: emit.c ppd.h array.h versioning.h file.h string.h ../config.h debug.h encode.32.o: encode.c cups.h ipp.h http.h versioning.h ppd.h array.h file.h language.h @@ -199,7 +202,7 @@ localize.32.o: localize.c globals.h string.h ../config.h http-private.h http.h localize.32.o: localize.c md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h localize.32.o: localize.c i18n.h transcode.h ppd-private.h debug.h mark.32.o: mark.c cups.h ipp.h http.h versioning.h ppd.h array.h file.h language.h -mark.32.o: mark.c string.h ../config.h debug.h +mark.32.o: mark.c string.h ../config.h debug.h pwgmedia.h md5.32.o: md5.c md5.h string.h ../config.h md5passwd.32.o: md5passwd.c http-private.h ../config.h http.h versioning.h md5.h md5passwd.32.o: md5passwd.c ipp-private.h ipp.h string.h @@ -212,6 +215,9 @@ page.32.o: page.c ppd.h array.h versioning.h file.h string.h ../config.h ppd.32.o: ppd.c ppd-private.h cups.h ipp.h http.h versioning.h ppd.h array.h file.h ppd.32.o: ppd.c language.h globals.h string.h ../config.h http-private.h md5.h ppd.32.o: ppd.c ipp-private.h i18n.h transcode.h debug.h +pwgmedia.32.o: pwgmedia.c pwgmedia.h globals.h string.h ../config.h http-private.h http.h +pwgmedia.32.o: pwgmedia.c versioning.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h +pwgmedia.32.o: pwgmedia.c file.h language.h i18n.h transcode.h debug.h request.32.o: request.c globals.h string.h ../config.h http-private.h http.h versioning.h request.32.o: request.c md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h request.32.o: request.c i18n.h transcode.h debug.h @@ -252,7 +258,7 @@ testoptions.32.o: testoptions.c array.h file.h language.h testlang.32.o: testlang.c i18n.h transcode.h language.h array.h versioning.h string.h testlang.32.o: testlang.c ../config.h testppd.32.o: testppd.c ../cups/string.h ../config.h string.h cups.h ipp.h http.h -testppd.32.o: testppd.c versioning.h ppd.h array.h file.h language.h +testppd.32.o: testppd.c versioning.h ppd.h array.h file.h language.h pwgmedia.h testsnmp.32.o: testsnmp.c string.h ../config.h snmp-private.h http.h versioning.h # DO NOT DELETE @@ -280,7 +286,7 @@ debug.64.o: debug.c md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h langu debug.64.o: debug.c i18n.h transcode.h debug.h dest.64.o: dest.c debug.h globals.h string.h ../config.h http-private.h http.h dest.64.o: dest.c versioning.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h -dest.64.o: dest.c language.h i18n.h transcode.h +dest.64.o: dest.c language.h i18n.h transcode.h pwgmedia.h dir.64.o: dir.c dir.h versioning.h string.h ../config.h debug.h emit.64.o: emit.c ppd.h array.h versioning.h file.h string.h ../config.h debug.h encode.64.o: encode.c cups.h ipp.h http.h versioning.h ppd.h array.h file.h language.h @@ -327,7 +333,7 @@ localize.64.o: localize.c globals.h string.h ../config.h http-private.h http.h localize.64.o: localize.c md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h localize.64.o: localize.c i18n.h transcode.h ppd-private.h debug.h mark.64.o: mark.c cups.h ipp.h http.h versioning.h ppd.h array.h file.h language.h -mark.64.o: mark.c string.h ../config.h debug.h +mark.64.o: mark.c string.h ../config.h debug.h pwgmedia.h md5.64.o: md5.c md5.h string.h ../config.h md5passwd.64.o: md5passwd.c http-private.h ../config.h http.h versioning.h md5.h md5passwd.64.o: md5passwd.c ipp-private.h ipp.h string.h @@ -340,6 +346,9 @@ page.64.o: page.c ppd.h array.h versioning.h file.h string.h ../config.h ppd.64.o: ppd.c ppd-private.h cups.h ipp.h http.h versioning.h ppd.h array.h file.h ppd.64.o: ppd.c language.h globals.h string.h ../config.h http-private.h md5.h ppd.64.o: ppd.c ipp-private.h i18n.h transcode.h debug.h +pwgmedia.64.o: pwgmedia.c pwgmedia.h globals.h string.h ../config.h http-private.h http.h +pwgmedia.64.o: pwgmedia.c versioning.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h +pwgmedia.64.o: pwgmedia.c file.h language.h i18n.h transcode.h debug.h request.64.o: request.c globals.h string.h ../config.h http-private.h http.h versioning.h request.64.o: request.c md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h request.64.o: request.c i18n.h transcode.h debug.h @@ -380,5 +389,5 @@ testoptions.64.o: testoptions.c array.h file.h language.h testlang.64.o: testlang.c i18n.h transcode.h language.h array.h versioning.h string.h testlang.64.o: testlang.c ../config.h testppd.64.o: testppd.c ../cups/string.h ../config.h string.h cups.h ipp.h http.h -testppd.64.o: testppd.c versioning.h ppd.h array.h file.h language.h +testppd.64.o: testppd.c versioning.h ppd.h array.h file.h language.h pwgmedia.h testsnmp.64.o: testsnmp.c string.h ../config.h snmp-private.h http.h versioning.h diff --git a/cups/Makefile b/cups/Makefile index 8674389640..bec16188f8 100644 --- a/cups/Makefile +++ b/cups/Makefile @@ -3,7 +3,7 @@ # # API library Makefile for the Common UNIX Printing System (CUPS). # -# Copyright 2007-2008 by Apple Inc. +# Copyright 2007-2009 by Apple Inc. # Copyright 1997-2006 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -56,6 +56,7 @@ LIBOBJS = \ options.o \ page.o \ ppd.o \ + pwgmedia.o \ request.o \ sidechannel.o \ snmp.o \ @@ -288,7 +289,8 @@ uninstall64bit: libcups.so.2 libcups.sl.2: $(LIBOBJS) echo Linking $@... - $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBGSSAPI) \ + $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) $(RM) `basename $@ .2` $(LN) $@ `basename $@ .2` @@ -300,7 +302,8 @@ libcups.so.2 libcups.sl.2: $(LIBOBJS) 32bit/libcups.so.2: $(LIB32OBJS) echo Linking 32-bit $@... -mkdir 32bit - $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(LIB32OBJS) $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(LIB32OBJS) $(LIBGSSAPI) \ + $(DNSSDLIBS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(RM) 32bit/libcups.so $(LN) libcups.so.2 32bit/libcups.so @@ -312,7 +315,8 @@ libcups.so.2 libcups.sl.2: $(LIBOBJS) 64bit/libcups.so.2: $(LIB64OBJS) echo Linking 64-bit $@... -mkdir 64bit - $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(LIB64OBJS) $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(LIB64OBJS) $(LIBGSSAPI) \ + $(DNSSDLIBS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(RM) 64bit/libcups.so $(LN) libcups.so.2 64bit/libcups.so @@ -329,7 +333,8 @@ libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER) libcups.exp -compatibility_version 2.0.0 \ -exported_symbols_list libcups.exp \ -sectorder __TEXT __text $(LIBCUPSORDER) \ - $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) $(RM) libcups.dylib $(LN) $@ libcups.dylib @@ -340,7 +345,9 @@ libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER) libcups.exp libcups_s.a: $(LIBOBJS) libcups_s.exp echo Creating $@... - $(DSO) $(DSOFLAGS) -Wl,-bexport:libcups_s.exp -o libcups_s.o $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) -lm + $(DSO) $(DSOFLAGS) -Wl,-bexport:libcups_s.exp -o libcups_s.o \ + $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) -lm $(RM) $@ $(AR) $(ARFLAGS) $@ libcups_s.o @@ -351,8 +358,9 @@ libcups_s.a: $(LIBOBJS) libcups_s.exp libcups.la: $(LIBOBJS) echo Linking $@... - $(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) -rpath $(LIBDIR) \ - -version-info 2:8 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \ + -rpath $(LIBDIR) -version-info 2:8 $(LIBGSSAPI) $(SSLLIBS) \ + $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) # @@ -397,7 +405,7 @@ php_cups_wrap.c: cups.h testadmin: testadmin.o libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o $@ testadmin.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) # @@ -407,7 +415,7 @@ testadmin: testadmin.o libcups.a testarray: testarray.o libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testarray.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) echo Running array API tests... ./testarray @@ -419,7 +427,7 @@ testarray: testarray.o libcups.a testconflicts: testconflicts.o libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o $@ testconflicts.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) # @@ -429,7 +437,7 @@ testconflicts: testconflicts.o libcups.a testcups: testcups.o libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o $@ testcups.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) # @@ -439,7 +447,7 @@ testcups: testcups.o libcups.a testfile: testfile.o libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testfile.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) echo Running file API tests... ./testfile @@ -451,7 +459,7 @@ testfile: testfile.o libcups.a testhttp: testhttp.o libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhttp.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) echo Running HTTP API tests... ./testhttp @@ -463,7 +471,7 @@ testhttp: testhttp.o libcups.a testipp: testipp.o libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testipp.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) echo Running IPP API tests... ./testipp @@ -475,7 +483,7 @@ testipp: testipp.o libcups.a testi18n: testi18n.o libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testi18n.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) echo Running internationalization API tests... ./testi18n @@ -487,7 +495,7 @@ testi18n: testi18n.o libcups.a testlang: testlang.o libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testlang.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) echo Running language API tests... ./testlang @@ -499,7 +507,7 @@ testlang: testlang.o libcups.a testoptions: testoptions.o libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testoptions.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) echo Running option API tests... ./testoptions @@ -511,7 +519,7 @@ testoptions: testoptions.o libcups.a testppd: testppd.o libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testppd.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) echo Running PPD API tests... ./testppd @@ -523,7 +531,7 @@ testppd: testppd.o libcups.a testsnmp: testsnmp.o libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o $@ testsnmp.o libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) # diff --git a/cups/conflicts.c b/cups/conflicts.c index b05ecd57db..a99810cd90 100644 --- a/cups/conflicts.c +++ b/cups/conflicts.c @@ -3,7 +3,7 @@ * * Option marking routines for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -240,17 +240,27 @@ cupsResolveConflicts( for (i = consts->num_constraints, constptr = consts->constraints; - i > 0; + i > 0 && !changed; i --, constptr ++) { - if (constptr->installable || - !strcasecmp(constptr->option->keyword, "PageSize") || - !strcasecmp(constptr->option->keyword, "PageRegion")) + /* + * Can't resolve by changing an installable option... + */ + + if (constptr->installable) continue; + /* + * Is this the option we are changing? + */ + if (option && !strcasecmp(constptr->option->keyword, option)) continue; + /* + * Get the current option choice... + */ + if ((value = cupsGetOption(constptr->option->keyword, num_newopts, newopts)) == NULL) { @@ -285,13 +295,12 @@ cupsResolveConflicts( * Try each choice instead... */ - cupsArrayDelete(test); - for (j = constptr->option->num_choices, cptr = constptr->option->choices; j > 0; j --, cptr ++) { + cupsArrayDelete(test); test = NULL; if (strcasecmp(value, cptr->choice) && @@ -311,9 +320,9 @@ cupsResolveConflicts( changed = 1; break; } - - cupsArrayDelete(test); } + + cupsArrayDelete(test); } } } diff --git a/cups/dest.c b/cups/dest.c index 3530075735..eab2eb5872 100644 --- a/cups/dest.c +++ b/cups/dest.c @@ -54,6 +54,7 @@ #include "debug.h" #include "globals.h" +#include "pwgmedia.h" #include #include #include @@ -1074,7 +1075,8 @@ static char * /* O - Default paper size */ appleGetPaperSize(char *name, /* I - Paper size name buffer */ int namesize) /* I - Size of buffer */ { - CFStringRef defaultPaperID; /* Default paper ID */ + CFStringRef defaultPaperID; /* Default paper ID */ + _cups_pwg_media_t *pwgmedia; /* PWG media size */ defaultPaperID = CFPreferencesCopyAppValue(kDefaultPaperIDKey, @@ -1084,10 +1086,8 @@ appleGetPaperSize(char *name, /* I - Paper size name buffer */ !CFStringGetCString(defaultPaperID, name, namesize, kCFStringEncodingUTF8)) name[0] = '\0'; - else if (!strncmp(name, "na-", 3)) - _cups_strcpy(name, name + 3); - else if (!strncmp(name, "iso-", 4)) - _cups_strcpy(name, name + 4); + else if ((pwgmedia = _cupsPWGMediaByLegacy(name)) != NULL) + strlcpy(name, pwgmedia->pwg, namesize); if (defaultPaperID) CFRelease(defaultPaperID); diff --git a/cups/file.c b/cups/file.c index 0fb212d1f8..722a8323b6 100644 --- a/cups/file.c +++ b/cups/file.c @@ -1565,6 +1565,8 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */ { bytes = (ssize_t)(fp->end - fp->buf); + DEBUG_printf(("cupsFileSeek: bytes=" CUPS_LLFMT "\n", CUPS_LLCAST bytes)); + if (pos >= fp->bufpos && pos < (fp->bufpos + bytes)) { /* @@ -1597,8 +1599,6 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */ fp->eof = 0; - DEBUG_printf(("cupsFileSeek: bytes=" CUPS_LLFMT "\n", CUPS_LLCAST bytes)); - if (pos < fp->bufpos) { /* diff --git a/cups/globals.c b/cups/globals.c index c66261e127..fc7d6807b5 100644 --- a/cups/globals.c +++ b/cups/globals.c @@ -3,7 +3,7 @@ * * Global variable access routines for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -167,6 +167,9 @@ globals_destructor(void *value) /* I - Data to free */ free(buffer); } + cupsArrayDelete(cg->pwg_size_lut); + cupsArrayDelete(cg->leg_size_lut); + free(value); } diff --git a/cups/globals.h b/cups/globals.h index 6ba518e8cf..9a0a998423 100644 --- a/cups/globals.h +++ b/cups/globals.h @@ -3,7 +3,7 @@ * * Global variable definitions for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -103,6 +103,10 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/ int ppd_line; /* Current line number */ ppd_conform_t ppd_conform; /* Level of conformance required */ + /* pwgmedia.c */ + cups_array_t *pwg_size_lut, /* Lookup table for PWG names */ + *leg_size_lut; /* Lookup table for legacy names */ + /* snmp.c */ char snmp_community[255]; /* Default SNMP community name */ diff --git a/cups/ipp.c b/cups/ipp.c index 1f932403d4..de0f12c400 100644 --- a/cups/ipp.c +++ b/cups/ipp.c @@ -4,7 +4,7 @@ * Internet Printing Protocol support functions for the Common UNIX * Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -1112,7 +1112,7 @@ ippReadIO(void *src, /* I - Data source */ * Verify the major version number... */ - if (buffer[0] != 1) + if (buffer[0] != 1 && buffer[0] != 2) { DEBUG_printf(("ippReadIO: version number (%d.%d) is bad.\n", buffer[0], buffer[1])); @@ -1440,6 +1440,9 @@ ippReadIO(void *src, /* I - Data source */ break; case IPP_TAG_NOVALUE : + case IPP_TAG_NOTSETTABLE : + case IPP_TAG_DELETEATTR : + case IPP_TAG_ADMINDEFINE : if (attr->value_tag == IPP_TAG_NOVALUE) { if (n == 0) diff --git a/cups/libcups.exp b/cups/libcups.exp index c67afed84a..32803d6b6f 100644 --- a/cups/libcups.exp +++ b/cups/libcups.exp @@ -21,6 +21,9 @@ __cupsMD5Init __cupsMessageFree __cupsMessageLoad __cupsMessageLookup +__cupsPWGMediaByName +__cupsPWGMediaByLegacy +__cupsPWGMediaBySize __cupsSetError __cupsSetLocale __cupsSNMPClose @@ -189,6 +192,8 @@ _cupsSetUser _cupsSideChannelDoRequest _cupsSideChannelRead _cupsSideChannelWrite +_cupsSideChannelSNMPGet +_cupsSideChannelSNMPWalk _cupsStartDocument _cupsTempFd _cupsTempFile diff --git a/cups/libcups_s.exp b/cups/libcups_s.exp index d46e979119..1b45a396ac 100644 --- a/cups/libcups_s.exp +++ b/cups/libcups_s.exp @@ -16,6 +16,9 @@ _cupsMD5Init _cupsMessageFree _cupsMessageLoad _cupsMessageLookup +_cupsPWGMediaByName +_cupsPWGMediaByLegacy +_cupsPWGMediaBySize _cupsSetError _cupsSetLocale _cupsSNMPClose diff --git a/cups/mark.c b/cups/mark.c index ffbc436ecf..4466ec1ce9 100644 --- a/cups/mark.c +++ b/cups/mark.c @@ -1,9 +1,9 @@ /* - * "$Id: mark.c 7819 2008-08-01 00:27:24Z mike $" + * "$Id: mark.c 8210 2009-01-09 02:30:26Z mike $" * * Option marking routines for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -32,7 +32,9 @@ * debug_marked() - Output the marked array to stdout... * ppd_defaults() - Set the defaults for this group and all sub-groups. * ppd_mark_choices() - Mark one or more option choices from a string. - * ppd_mark_option() - Quick mark an option without checking for + * ppd_mark_option() - Quickly mark an option without checking for + * conflicts. + * ppd_mark_size() - Quickly mark a page size without checking for * conflicts. */ @@ -43,6 +45,7 @@ #include "cups.h" #include "string.h" #include "debug.h" +#include "pwgmedia.h" /* @@ -58,6 +61,7 @@ static void ppd_defaults(ppd_file_t *ppd, ppd_group_t *g); static void ppd_mark_choices(ppd_file_t *ppd, const char *s); static void ppd_mark_option(ppd_file_t *ppd, const char *option, const char *choice); +static void ppd_mark_size(ppd_file_t *ppd, const char *size); /* @@ -155,7 +159,7 @@ cupsMarkOptions( */ if (!page_size || !page_size[0]) - ppd_mark_option(ppd, "PageSize", s); + ppd_mark_size(ppd, s); if (cupsGetOption("InputSlot", num_options, options) == NULL) ppd_mark_option(ppd, "InputSlot", s); @@ -1047,5 +1051,106 @@ ppd_mark_option(ppd_file_t *ppd, /* I - PPD file */ /* - * End of "$Id: mark.c 7819 2008-08-01 00:27:24Z mike $". + * 'ppd_mark_size()' - Quickly mark a page size without checking for conflicts. + * + * This function is also responsible for mapping PWG/ISO/IPP size names to the + * PPD file... + */ + +static void +ppd_mark_size(ppd_file_t *ppd, /* I - PPD file */ + const char *size) /* I - Size name */ +{ + int i; /* Looping var */ + _cups_pwg_media_t *pwgmedia; /* PWG media information */ + ppd_size_t *ppdsize; /* Current PPD size */ + double dw, dl; /* Difference in width and height */ + double width, /* Width to find */ + length; /* Length to find */ + char width_str[256], /* Width in size name */ + length_str[256],/* Length in size name */ + units[256], /* Units in size name */ + custom[256]; /* Custom size */ + struct lconv *loc; /* Localization data */ + + + /* + * See if this is a PPD size... + */ + + if (!strncasecmp(size, "Custom.", 7) || ppdPageSize(ppd, size)) + { + ppd_mark_option(ppd, "PageSize", size); + return; + } + + /* + * Nope, try looking up the PWG or legacy (IPP/ISO) size name... + */ + + if ((pwgmedia = _cupsPWGMediaByName(size)) == NULL) + pwgmedia = _cupsPWGMediaByLegacy(size); + + if (pwgmedia) + { + width = pwgmedia->width; + length = pwgmedia->length; + } + else if (sscanf(size, "%*[^_]_%*[^_]_%255[0-9.]x%255[0-9.]%s", width_str, + length_str, units) == 3) + { + /* + * Got a "self-describing" name that isn't in our table... + */ + + loc = localeconv(); + width = _cupsStrScand(width_str, NULL, loc); + length = _cupsStrScand(length_str, NULL, loc); + + if (!strcmp(units, "in")) + { + width *= 72.0; + length *= 72.0; + } + else if (!strcmp(units, "mm")) + { + width *= 25.4 / 72.0; + length *= 25.4 / 72.0; + } + else + return; + } + else + return; + + /* + * Search the PPD file for a matching size... + */ + + for (i = ppd->num_sizes, ppdsize = ppd->sizes; i > 0; i --, ppdsize ++) + { + dw = ppdsize->width - width; + dl = ppdsize->length - length; + + if (dw > -5.0 && dw < 5.0 && dl > -5.0 && dl < 5.0) + { + ppd_mark_option(ppd, "PageSize", ppdsize->name); + return; + } + } + + /* + * No match found; if custom sizes are supported, set a custom size... + */ + + if (ppd->variable_sizes) + { + snprintf(custom, sizeof(custom), "Custom.%dx%d", (int)width, (int)length); + ppd_mark_option(ppd, "PageSize", custom); + } +} + + +/* + * End of "$Id: mark.c 8210 2009-01-09 02:30:26Z mike $". */ diff --git a/cups/pwgmedia.c b/cups/pwgmedia.c new file mode 100644 index 0000000000..c2d10f0d4a --- /dev/null +++ b/cups/pwgmedia.c @@ -0,0 +1,376 @@ +/* + * "$Id$" + * + * PWG media name API implementation for the Common UNIX Printing System + * (CUPS). + * + * Copyright 2009 by Apple Inc. + * + * These coded instructions, statements, and computer programs are the + * property of Apple Inc. and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "LICENSE.txt" + * which should have been included with this file. If this file is + * file is missing or damaged, see the license at "http://www.cups.org/". + * + * Contents: + * + * _cupsPWGMediaByLegacy() - Find a PWG media size by ISO/IPP legacy name. + * _cupsPWGMediaByName() - Find a PWG media size by 5101.1 self-describing + * name. + * _cupsPWGMediaBySize() - Find a PWG media size by size in points. + * compare_legacy() - Compare two sizes using the legacy names. + * compare_pwg() - Compare two sizes using the PWG names. + */ + +/* + * Include necessary headers... + */ + +#include "pwgmedia.h" +#include "globals.h" +#include "string.h" +#include "debug.h" +#include + + +/* + * Local macros... + */ + +#define _CUPS_SIZE_IN(p,l,x,y) {p, l, x * 72.0, y * 72.0} +#define _CUPS_SIZE_MM(p,l,x,y) {p, l, x / 25.4 * 72.0, y / 25.4 * 72.0} + + +/* + * Local functions... + */ + +static int compare_legacy(_cups_pwg_media_t *a, _cups_pwg_media_t *b); +static int compare_pwg(_cups_pwg_media_t *a, _cups_pwg_media_t *b); + + +/* + * Local globals... + */ + +static _cups_pwg_media_t const cups_pwg_media[] = +{ /* Media size lookup table */ + /* North American Standard Sheet Media Sizes */ + _CUPS_SIZE_IN("na_index-3x5_3x5in", NULL, 3, 5), + _CUPS_SIZE_IN("na_personal_3.625x6.5in", NULL, 3.625, 6.5), + _CUPS_SIZE_IN("na_monarch_3.875x7.5in", "monarch-envelope", 3.875, 7.5), + _CUPS_SIZE_IN("na_number-9_3.875x8.875in", "na-number-9-envelope", 3.875, 8.875), + _CUPS_SIZE_IN("na_index-4x6_4x6in", NULL, 4, 6), + _CUPS_SIZE_IN("na_number-10_4.125x9.5in", "na-number-10-envelope", 4.125, 9.5), + _CUPS_SIZE_IN("na_a2_4.375x5.75in", NULL, 4.375, 5.75), + _CUPS_SIZE_IN("na_number-11_4.5x10.375in", NULL, 4.5, 10.375), + _CUPS_SIZE_IN("na_number-12_4.75x11in", NULL, 4.75, 11), + _CUPS_SIZE_IN("na_5x7_5x7in", NULL, 5, 7), + _CUPS_SIZE_IN("na_index-5x8_5x8in", NULL, 5, 8), + _CUPS_SIZE_IN("na_number-14_5x11.5in", NULL, 5, 11.5), + _CUPS_SIZE_IN("na_invoice_5.5x8.5in", "invoice", 5.5, 8.5), + _CUPS_SIZE_IN("na_index-4x6-ext_6x8in", NULL, 6, 8), + _CUPS_SIZE_IN("na_6x9_6x9in", "na-6x9-envelope", 6, 9), + _CUPS_SIZE_IN("na_c5_6.5x9.5in", NULL, 6.5, 9.5), + _CUPS_SIZE_IN("na_7x9_7x9in", "na-7x9-envelope", 7, 9), + _CUPS_SIZE_IN("na_executive_7.25x10.5in", "executive", 7.25, 10.5), + _CUPS_SIZE_IN("na_govt-letter_8x10in", "na-8x10", 8, 10), + _CUPS_SIZE_IN("na_govt-legal_8x13in", NULL, 8, 13), + _CUPS_SIZE_IN("na_quarto_8.5x10.83in", "quarto", 8.5, 10.83), + _CUPS_SIZE_IN("na_letter_8.5x11in", "na-letter", 8.5, 11), + _CUPS_SIZE_IN("na_fanfold-eur_8.5x12in", NULL, 8.5, 12), + _CUPS_SIZE_IN("na_letter-plus_8.5x12.69in", NULL, 8.5, 12.69), + _CUPS_SIZE_IN("na_foolscap_8.5x13in", NULL, 8.5, 13), + _CUPS_SIZE_IN("na_legal_8.5x14in", "na-legal", 8.5, 14), + _CUPS_SIZE_IN("na_super-a_8.94x14in", NULL, 8.94, 14), + _CUPS_SIZE_IN("na_9x11_9x11in", "na-9x11-envelope", 9, 11), + _CUPS_SIZE_IN("na_arch-a_9x12in", "arch-a", 9, 12), + _CUPS_SIZE_IN("na_letter-extra_9.5x12in", NULL, 9.5, 12), + _CUPS_SIZE_IN("na_legal-extra_9.5x15in", NULL, 9.5, 15), + _CUPS_SIZE_IN("na_10x11_10x11in", NULL, 10, 11), + _CUPS_SIZE_IN("na_10x13_10x13in", "na-10x13-envelope", 10, 13), + _CUPS_SIZE_IN("na_10x14_10x14in", "na-10x14-envelope", 10, 14), + _CUPS_SIZE_IN("na_10x15_10x15in", "na-10x15-envelope", 10, 15), + _CUPS_SIZE_IN("na_11x12_11x12in", NULL, 11, 12), + _CUPS_SIZE_IN("na_edp_11x14in", NULL, 11, 14), + _CUPS_SIZE_IN("na_fanfold-us_11x14.875in", NULL, 11, 14.875), + _CUPS_SIZE_IN("na_11x15_11x15in", NULL, 11, 15), + _CUPS_SIZE_IN("na_ledger_11x17in", "tabloid", 11, 17), + _CUPS_SIZE_IN("na_eur-edp_12x14in", NULL, 12, 14), + _CUPS_SIZE_IN("na_arch-b_12x18in", "arch-b", 12, 18), + _CUPS_SIZE_IN("na_12x19_12x19in", NULL, 12, 19), + _CUPS_SIZE_IN("na_b-plus_12x19.17in", NULL, 12, 19.17), + _CUPS_SIZE_IN("na_super-b_13x19in", NULL, 13, 19), + _CUPS_SIZE_IN("na_c_17x22in", "c", 17, 22), + _CUPS_SIZE_IN("na_arch-c_18x24in", "arch-c", 18, 24), + _CUPS_SIZE_IN("na_d_22x34in", "d", 22, 34), + _CUPS_SIZE_IN("na_arch-d_24x36in", "arch-d", 24, 36), + _CUPS_SIZE_IN("asme_f_28x40in", "f", 28, 40), + _CUPS_SIZE_IN("na_wide-format_30x42in", NULL, 30, 42), + _CUPS_SIZE_IN("na_e_34x44in", "e", 34, 44), + _CUPS_SIZE_IN("na_arch-e_36x48in", "arch-e", 36, 48), + _CUPS_SIZE_IN("na_f_44x68in", NULL, 44, 68), + + /* Chinese Standard Sheet Media Inch Sizes */ + _CUPS_SIZE_IN("roc_16k_7.75x10.75in", NULL, 7.75, 10.75), + _CUPS_SIZE_IN("roc_8k_10.75x15.5in", NULL, 10.75, 15.5), + + /* ISO Standard Sheet Media Sizes */ + _CUPS_SIZE_MM("iso_a10_26x37mm", "iso-a10", 26, 37), + _CUPS_SIZE_MM("iso_a9_37x52mm", "iso-a9", 37, 52), + _CUPS_SIZE_MM("iso_a8_52x74mm", "iso-a8", 52, 74), + _CUPS_SIZE_MM("iso_a7_74x105mm", "iso-a7", 74, 105), + _CUPS_SIZE_MM("iso_a6_105x148mm", "iso-a6", 105, 148), + _CUPS_SIZE_MM("iso_a5_148x210mm", "iso-a5", 148, 210), + _CUPS_SIZE_MM("iso_a5-extra_174x235mm", NULL, 174, 235), + _CUPS_SIZE_MM("iso_a4_210x297mm", "iso-a4", 210, 297), + _CUPS_SIZE_MM("iso_a4-tab_225x297mm", NULL, 225, 297), + _CUPS_SIZE_MM("iso_a4-extra_235.5x322.3mm", NULL, 235.5, 322.3), + _CUPS_SIZE_MM("iso_a3_297x420mm", "iso-a3", 297, 420), + _CUPS_SIZE_MM("iso_a4x3_297x630mm", "iso-a4x3", 297, 630), + _CUPS_SIZE_MM("iso_a4x4_297x841mm", "iso-a4x4", 297, 841), + _CUPS_SIZE_MM("iso_a4x5_297x1051mm", "iso-a4x5", 297, 1051), + _CUPS_SIZE_MM("iso_a4x6_297x1261mm", "iso-a4x6", 297, 1261), + _CUPS_SIZE_MM("iso_a4x7_297x1471mm", "iso-a4x7", 297, 1471), + _CUPS_SIZE_MM("iso_a4x8_297x1682mm", "iso-a4x8", 297, 1682), + _CUPS_SIZE_MM("iso_a4x9_297x1892mm", "iso-a4x9", 297, 1892), + _CUPS_SIZE_MM("iso_a3-extra_322x445mm", "iso-a3-extra", 322, 445), + _CUPS_SIZE_MM("iso_a2_420x594mm", "iso-a2", 420, 594), + _CUPS_SIZE_MM("iso_a3x3_420x891mm", "iso-a3x3", 420, 891), + _CUPS_SIZE_MM("iso_a3x4_420x1189mm", "iso-a3x4", 420, 1189), + _CUPS_SIZE_MM("iso_a3x5_420x1486mm", "iso-a3x5", 420, 1486), + _CUPS_SIZE_MM("iso_a3x6_420x1783mm", "iso-a3x6", 420, 1783), + _CUPS_SIZE_MM("iso_a3x7_420x2080mm", "iso-a3x7", 420, 2080), + _CUPS_SIZE_MM("iso_a1_594x841mm", "iso-a1", 594, 841), + _CUPS_SIZE_MM("iso_a2x3_594x1261mm", "iso-a2x3", 594, 1261), + _CUPS_SIZE_MM("iso_a2x4_594x1682mm", "iso-a2x4", 594, 1682), + _CUPS_SIZE_MM("iso_a2x5_594x2102mm", "iso-a2x5", 594, 2102), + _CUPS_SIZE_MM("iso_a0_841x1189mm", "iso-a0", 841, 1189), + _CUPS_SIZE_MM("iso_a1x3_841x1783mm", "iso-a1x3", 841, 1783), + _CUPS_SIZE_MM("iso_a1x4_841x2378mm", "iso-a1x4", 841, 2378), + _CUPS_SIZE_MM("iso_2a0_1189x1682mm", NULL, 1189, 1682), + _CUPS_SIZE_MM("iso_a0x3_1189x2523mm", NULL, 1189, 2523), + _CUPS_SIZE_MM("iso_b10_31x44mm", "iso-b10", 31, 44), + _CUPS_SIZE_MM("iso_b9_44x62mm", "iso-b9", 44, 62), + _CUPS_SIZE_MM("iso_b8_62x88mm", "iso-b8", 62, 88), + _CUPS_SIZE_MM("iso_b7_88x125mm", "iso-b7", 88, 125), + _CUPS_SIZE_MM("iso_b6_125x176mm", "iso-b6", 125, 176), + _CUPS_SIZE_MM("iso_b6c4_125x324mm", NULL, 125, 324), + _CUPS_SIZE_MM("iso_b5_176x250mm", "iso-b5", 176, 250), + _CUPS_SIZE_MM("iso_b5-extra_201x276mm", NULL, 201, 276), + _CUPS_SIZE_MM("iso_b4_250x353mm", "iso-b4", 250, 353), + _CUPS_SIZE_MM("iso_b3_353x500mm", "iso-b3", 353, 500), + _CUPS_SIZE_MM("iso_b2_500x707mm", "iso-b2", 500, 707), + _CUPS_SIZE_MM("iso_b1_707x1000mm", "iso-b1", 707, 1000), + _CUPS_SIZE_MM("iso_b0_1000x1414mm", "iso-b0", 1000, 1414), + _CUPS_SIZE_MM("iso_c10_28x40mm", "iso-c10", 28, 40), + _CUPS_SIZE_MM("iso_c9_40x57mm", "iso-c9", 40, 57), + _CUPS_SIZE_MM("iso_c8_57x81mm", "iso-c8", 57, 81), + _CUPS_SIZE_MM("iso_c7_81x114mm", "iso-c7", 81, 114), + _CUPS_SIZE_MM("iso_c7c6_81x162mm", NULL, 81, 162), + _CUPS_SIZE_MM("iso_c6_114x162mm", "iso-c6", 114, 162), + _CUPS_SIZE_MM("iso_c6c5_114x229mm", NULL, 114, 229), + _CUPS_SIZE_MM("iso_c5_162x229mm", "iso-c5", 162, 229), + _CUPS_SIZE_MM("iso_c4_229x324mm", "iso-c4", 229, 324), + _CUPS_SIZE_MM("iso_c3_324x458mm", "iso-c3", 324, 458), + _CUPS_SIZE_MM("iso_c2_458x648mm", "iso-c2", 458, 648), + _CUPS_SIZE_MM("iso_c1_648x917mm", "iso-c1", 648, 917), + _CUPS_SIZE_MM("iso_c0_917x1297mm", "iso-c0", 917, 1297), + _CUPS_SIZE_MM("iso_dl_110x220mm", "iso-designated", 110, 220), + _CUPS_SIZE_MM("iso_ra2_430x610mm", "iso-ra2", 430, 610), + _CUPS_SIZE_MM("iso_sra2_450x640mm", "iso-sra2", 450, 640), + _CUPS_SIZE_MM("iso_ra1_610x860mm", "iso-ra1", 610, 860), + _CUPS_SIZE_MM("iso_sra1_640x900mm", "iso-sra1", 640, 900), + _CUPS_SIZE_MM("iso_ra0_860x1220mm", "iso-ra0", 860, 1220), + _CUPS_SIZE_MM("iso_sra0_900x1280mm", "iso-sra0", 900, 1280), + + /* Japanese Standard Sheet Media Sizes */ + _CUPS_SIZE_MM("jis_b10_32x45mm", "jis-b10", 32, 45), + _CUPS_SIZE_MM("jis_b9_45x64mm", "jis-b9", 45, 64), + _CUPS_SIZE_MM("jis_b8_64x91mm", "jis-b8", 64, 91), + _CUPS_SIZE_MM("jis_b7_91x128mm", "jis-b7", 91, 128), + _CUPS_SIZE_MM("jis_b6_128x182mm", "jis-b6", 128, 182), + _CUPS_SIZE_MM("jis_b5_182x257mm", "jis-b5", 182, 257), + _CUPS_SIZE_MM("jis_b4_257x364mm", "jis-b4", 257, 364), + _CUPS_SIZE_MM("jis_b3_364x515mm", "jis-b3", 364, 515), + _CUPS_SIZE_MM("jis_b2_515x728mm", "jis-b2", 515, 728), + _CUPS_SIZE_MM("jis_b1_728x1030mm", "jis-b1", 728, 1030), + _CUPS_SIZE_MM("jis_b0_1030x1456mm", "jis-b0", 1030, 1456), + _CUPS_SIZE_MM("jis_exec_216x330mm", NULL, 216, 330), + _CUPS_SIZE_MM("jpn_chou4_90x205mm", NULL, 90, 205), + _CUPS_SIZE_MM("jpn_hagaki_100x148mm", NULL, 100, 148), + _CUPS_SIZE_MM("jpn_you4_105x235mm", NULL, 105, 235), + _CUPS_SIZE_MM("jpn_chou2_111.1x146mm", NULL, 111.1, 146), + _CUPS_SIZE_MM("jpn_chou3_120x235mm", NULL, 120, 235), + _CUPS_SIZE_MM("jpn_oufuku_148x200mm", NULL, 148, 200), + _CUPS_SIZE_MM("jpn_kahu_240x322.1mm", NULL, 240, 322.1), + _CUPS_SIZE_MM("jpn_kaku2_240x332mm", NULL, 240, 332), + + /* Chinese Standard Sheet Media Sizes */ + _CUPS_SIZE_MM("prc_32k_97x151mm", NULL, 97, 151), + _CUPS_SIZE_MM("prc_1_102x165mm", NULL, 102, 165), + _CUPS_SIZE_MM("prc_2_102x176mm", NULL, 102, 176), + _CUPS_SIZE_MM("prc_4_110x208mm", NULL, 110, 208), + _CUPS_SIZE_MM("prc_5_110x220mm", NULL, 110, 220), + _CUPS_SIZE_MM("prc_8_120x309mm", NULL, 120, 309), + _CUPS_SIZE_MM("prc_6_120x320mm", NULL, 120, 320), + _CUPS_SIZE_MM("prc_3_125x176mm", NULL, 125, 176), + _CUPS_SIZE_MM("prc_16k_146x215mm", NULL, 146, 215), + _CUPS_SIZE_MM("prc_7_160x230mm", NULL, 160, 230), + _CUPS_SIZE_MM("om_juuro-ku-kai_198x275mm", NULL, 198, 275), + _CUPS_SIZE_MM("om_pa-kai_267x389mm", NULL, 267, 389), + _CUPS_SIZE_MM("om_dai-pa-kai_275x395mm", NULL, 275, 395), + _CUPS_SIZE_MM("prc_10_324x458mm", NULL, 324, 458), + + /* Other Metric Standard Sheet Media Sizes */ + _CUPS_SIZE_MM("om_small-photo_100x150mm", NULL, 100, 150), + _CUPS_SIZE_MM("om_italian_110x230mm", NULL, 110, 230), + _CUPS_SIZE_MM("om_postfix_114x229mm", NULL, 114, 229), + _CUPS_SIZE_MM("om_large-photo_200x300", NULL, 200, 300), + _CUPS_SIZE_MM("om_folio_210x330mm", "folio", 210, 330), + _CUPS_SIZE_MM("om_folio-sp_215x315mm", NULL, 215, 315), + _CUPS_SIZE_MM("om_invite_220x220mm", NULL, 220, 220) +}; + + +/* + * '_cupsPWGMediaByLegacy()' - Find a PWG media size by ISO/IPP legacy name. + */ + +_cups_pwg_media_t * /* O - Matching size or NULL */ +_cupsPWGMediaByLegacy( + const char *legacy) /* I - Legacy size name */ +{ + _cups_pwg_media_t key; /* Search key */ + _cups_globals_t *cg = _cupsGlobals(); + /* Global data */ + + + /* + * Build the lookup table for PWG names as needed... + */ + + if (!cg->leg_size_lut) + { + int i; /* Looping var */ + _cups_pwg_media_t *size; /* Current size */ + + cg->leg_size_lut = cupsArrayNew((cups_array_func_t)compare_legacy, NULL); + + for (i = (int)(sizeof(cups_pwg_media) / sizeof(cups_pwg_media[0])), + size = (_cups_pwg_media_t *)cups_pwg_media; + i > 0; + i --, size ++) + if (size->legacy) + cupsArrayAdd(cg->leg_size_lut, size); + } + + /* + * Lookup the name... + */ + + key.legacy = legacy; + return ((_cups_pwg_media_t *)cupsArrayFind(cg->leg_size_lut, &key)); +} + + +/* + * '_cupsPWGMediaByName()' - Find a PWG media size by 5101.1 self-describing + * name. + */ + +_cups_pwg_media_t * /* O - Matching size or NULL */ +_cupsPWGMediaByName(const char *pwg) /* I - PWG size name */ +{ + _cups_pwg_media_t key; /* Search key */ + _cups_globals_t *cg = _cupsGlobals(); + /* Global data */ + + + /* + * Build the lookup table for PWG names as needed... + */ + + if (!cg->pwg_size_lut) + { + int i; /* Looping var */ + _cups_pwg_media_t *size; /* Current size */ + + cg->pwg_size_lut = cupsArrayNew((cups_array_func_t)compare_pwg, NULL); + + for (i = (int)(sizeof(cups_pwg_media) / sizeof(cups_pwg_media[0])), + size = (_cups_pwg_media_t *)cups_pwg_media; + i > 0; + i --, size ++) + cupsArrayAdd(cg->pwg_size_lut, size); + } + + /* + * Lookup the name... + */ + + key.pwg = pwg; + return ((_cups_pwg_media_t *)cupsArrayFind(cg->pwg_size_lut, &key)); +} + + +/* + * '_cupsPWGMediaBySize()' - Find a PWG media size by size in points. + */ + +_cups_pwg_media_t * /* O - Matching size or NULL */ +_cupsPWGMediaBySize(double width, /* I - Width in points */ + double length) /* I - Length in points */ +{ + int i; /* Looping var */ + _cups_pwg_media_t *size; /* Current size */ + double dw, dl; /* Difference in width and length */ + + + for (i = (int)(sizeof(cups_pwg_media) / sizeof(cups_pwg_media[0])), + size = (_cups_pwg_media_t *)cups_pwg_media; + i > 0; + i --, size ++) + { + /* + * Adobe uses a size matching algorithm with an epsilon of 5 points... + */ + + dw = size->width - width; + dl = size->length - length; + + if (dw > -5.0 && dw < 5.0 && dl > -5.0 && dl < 5.0) + return (size); + } + + return (NULL); +} + + +/* + * 'compare_legacy()' - Compare two sizes using the legacy names. + */ + +static int /* O - Result of comparison */ +compare_legacy(_cups_pwg_media_t *a, /* I - First size */ + _cups_pwg_media_t *b) /* I - Second size */ +{ + return (strcmp(a->legacy, b->legacy)); +} + + +/* + * 'compare_pwg()' - Compare two sizes using the PWG names. + */ + +static int /* O - Result of comparison */ +compare_pwg(_cups_pwg_media_t *a, /* I - First size */ + _cups_pwg_media_t *b) /* I - Second size */ +{ + return (strcmp(a->pwg, b->pwg)); +} + + +/* + * End of "$Id$". + */ diff --git a/cups/pwgmedia.h b/cups/pwgmedia.h new file mode 100644 index 0000000000..a07ca0c98c --- /dev/null +++ b/cups/pwgmedia.h @@ -0,0 +1,59 @@ +/* + * "$Id$" + * + * PWG media name API definitions for the Common UNIX Printing System (CUPS). + * + * Copyright 2009 by Apple Inc. + * + * These coded instructions, statements, and computer programs are the + * property of Apple Inc. and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "LICENSE.txt" + * which should have been included with this file. If this file is + * file is missing or damaged, see the license at "http://www.cups.org/". + */ + +#ifndef _CUPS_PWGMEDIA_H_ +# define _CUPS_PWGMEDIA_H_ + + +/* + * C++ magic... + */ + +# ifdef __cplusplus +extern "C" { +# endif /* __cplusplus */ + + +/* + * Types and structures... + */ + +typedef struct _cups_pwg_media_s /**** Common media size data ****/ +{ + const char *pwg, /* PWG 5101.1 "self describing" name */ + *legacy; /* IPP/ISO legacy name */ + double width, /* Width in points */ + length; /* Length in points */ +} _cups_pwg_media_t; + + +/* + * Functions... + */ + +extern _cups_pwg_media_t *_cupsPWGMediaByLegacy(const char *legacy); +extern _cups_pwg_media_t *_cupsPWGMediaByName(const char *pwg); +extern _cups_pwg_media_t *_cupsPWGMediaBySize(double width, + double length); + + +# ifdef __cplusplus +} +# endif /* __cplusplus */ + +#endif /* !_CUPS_PWGMEDIA_H_ */ + +/* + * End of "$Id$". + */ diff --git a/cups/testconflicts.c b/cups/testconflicts.c index 6d526493ba..291739a268 100644 --- a/cups/testconflicts.c +++ b/cups/testconflicts.c @@ -3,7 +3,7 @@ * * PPD constraint test program for the Common UNIX Printing System (CUPS). * - * Copyright 2008 by Apple Inc. + * Copyright 2008-2009 by Apple Inc. * * These coded instructions, statements, and computer programs are the * property of Apple Inc. and are protected by Federal copyright @@ -39,6 +39,8 @@ main(int argc, /* I - Number of command-line arguments */ char line[256]; /* Input buffer */ int num_options; /* Number of options */ cups_option_t *options; /* Options */ + char *option, /* Current option */ + *choice; /* Current choice */ if (argc != 2) @@ -61,12 +63,15 @@ main(int argc, /* I - Number of command-line arguments */ ppdMarkDefaults(ppd); + option = NULL; + choice = NULL; + for (;;) { num_options = 0; options = NULL; - if (!cupsResolveConflicts(ppd, NULL, NULL, &num_options, &options)) + if (!cupsResolveConflicts(ppd, option, choice, &num_options, &options)) puts("Unable to resolve conflicts!"); else if (num_options > 0) { @@ -78,12 +83,24 @@ main(int argc, /* I - Number of command-line arguments */ cupsFreeOptions(num_options, options); } + if (option) + { + free(option); + free(choice); + } + printf("\nNew Option(s): "); fflush(stdout); if (!fgets(line, sizeof(line), stdin) || line[0] == '\n') break; num_options = cupsParseOptions(line, 0, &options); + if (num_options > 0) + { + option = strdup(options[0].name); + choice = strdup(options[0].value); + } + if (cupsMarkOptions(ppd, num_options, options)) puts("Options Conflict!"); cupsFreeOptions(num_options, options); diff --git a/cups/testppd.c b/cups/testppd.c index 2583f3fd91..97337ccac5 100644 --- a/cups/testppd.c +++ b/cups/testppd.c @@ -3,7 +3,7 @@ * * PPD test program for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -29,6 +29,7 @@ #include #include #include "cups.h" +#include "pwgmedia.h" #ifdef WIN32 # include #else @@ -116,8 +117,10 @@ main(int argc, /* I - Number of command-line arguments */ int num_options; /* Number of options */ cups_option_t *options; /* Options */ ppd_size_t minsize, /* Minimum size */ - maxsize; /* Maximum size */ + maxsize, /* Maximum size */ + *size; /* Current size */ ppd_attr_t *attr; /* Current attribute */ + _cups_pwg_media_t *pwgmedia; /* PWG media size */ status = 0; @@ -277,14 +280,24 @@ main(int argc, /* I - Number of command-line arguments */ fputs("cupsResolveConflicts(InputSlot=Envelope): ", stdout); num_options = 0; options = NULL; - if (cupsResolveConflicts(ppd, "InputSlot", "Envelope", &num_options, + if (!cupsResolveConflicts(ppd, "InputSlot", "Envelope", &num_options, &options)) { - puts("FAIL (Resolved but shouldn't be able to!)"); + puts("FAIL (Unable to resolve)"); + status ++; + } + else if (num_options != 2 || + !cupsGetOption("PageSize", num_options, options)) + { + printf("FAIL (%d options:", num_options); + for (i = 0; i < num_options; i ++) + printf(" %s=%s", options[i].name, options[i].value); + puts(")"); status ++; } else - puts("PASS (Unable to resolve)"); + puts("PASS (Resolved by changing PageSize)"); + cupsFreeOptions(num_options, options); fputs("cupsResolveConflicts(No option/choice): ", stdout); @@ -292,8 +305,8 @@ main(int argc, /* I - Number of command-line arguments */ options = NULL; if (cupsResolveConflicts(ppd, NULL, NULL, &num_options, &options) && num_options == 1 && !strcasecmp(options[0].name, "InputSlot") && - !strcasecmp(options[0].value, "Manual")) - puts("PASS (Resolved)"); + !strcasecmp(options[0].value, "Tray")) + puts("PASS (Resolved by changing InputSlot)"); else if (num_options > 0) { printf("FAIL (%d options:", num_options); @@ -348,6 +361,52 @@ main(int argc, /* I - Number of command-line arguments */ status ++; } + /* + * cupsMarkOptions with PWG and IPP size names. + */ + + fputs("cupsMarkOptions(media=iso-a4): ", stdout); + num_options = cupsAddOption("media", "iso-a4", 0, &options); + cupsMarkOptions(ppd, num_options, options); + cupsFreeOptions(num_options, options); + + size = ppdPageSize(ppd, NULL); + if (!size || strcmp(size->name, "A4")) + { + printf("FAIL (%s)\n", size ? size->name : "unknown"); + status ++; + } + else + puts("PASS"); + + fputs("cupsMarkOptions(media=na_letter_8.5x11in): ", stdout); + num_options = cupsAddOption("media", "na_letter_8.5x11in", 0, &options); + cupsMarkOptions(ppd, num_options, options); + cupsFreeOptions(num_options, options); + + size = ppdPageSize(ppd, NULL); + if (!size || strcmp(size->name, "Letter")) + { + printf("FAIL (%s)\n", size ? size->name : "unknown"); + status ++; + } + else + puts("PASS"); + + fputs("_cupsPWGMediaBySize(842, 1191): ", stdout); + if ((pwgmedia = _cupsPWGMediaBySize(842, 1191)) == NULL) + { + puts("FAIL (not found)"); + status ++; + } + else if (strcmp(pwgmedia->pwg, "iso_a3_297x420mm")) + { + printf("FAIL (%s)\n", pwgmedia->pwg); + status ++; + } + else + puts("PASS"); + /* * Test localization... */ diff --git a/doc/Makefile b/doc/Makefile index 879cb59113..bf8bca0d1b 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -165,7 +165,7 @@ install: all install-data install-headers install-libs install-exec # Install data files... # -install-data: +install-data: $(INSTALL_LANGUAGES) $(INSTALL_DIR) -m 755 $(DOCDIR) for file in $(WEBPAGES); do \ $(INSTALL_MAN) $$file $(DOCDIR); \ @@ -182,13 +182,9 @@ install-data: install-languages: for lang in $(LANGUAGES); do \ if test -d $$lang; then \ - $(INSTALL_DIR) -m 755 $(DOCDIR)/$$lang/images; \ + $(INSTALL_DIR) -m 755 $(DOCDIR)/$$lang; \ $(INSTALL_MAN) $$lang/index.html $(DOCDIR)/$$lang; \ $(INSTALL_MAN) $$lang/cups.css $(DOCDIR)/$$lang 2>/dev/null || true; \ - $(INSTALL_DIR) -m 755 $(DOCDIR)/$$lang/images; \ - for file in $(WEBIMAGES); do \ - $(INSTALL_MAN) $$lang/$$file $(DOCDIR)/$$lang/images 2>/dev/null || true; \ - done; \ fi; \ done @@ -215,7 +211,7 @@ install-libs: # -# Unnstall all documentation files... +# Uninstall all documentation files... # uninstall: $(UNINSTALL_LANGUAGES) @@ -236,10 +232,6 @@ uninstall-languages: -for lang in $(LANGUAGES); do \ $(RM) $(DOCDIR)/$$lang/index.html; \ $(RM) $(DOCDIR)/$$lang/cups.css; \ - for file in $(WEBIMAGES); do \ - $(RM) $(DOCDIR)/$$lang/$$file; \ - done; \ - $(RMDIR) $(DOCDIR)/$$lang/images; \ $(RMDIR) $(DOCDIR)/$$lang; \ done diff --git a/doc/es/index.html.in b/doc/es/index.html.in index 7ccc1197a2..8695f1d68f 100644 --- a/doc/es/index.html.in +++ b/doc/es/index.html.in @@ -101,7 +101,7 @@ HEIGHT="128" ALT="CUPS">   Common UNIX Printing System, CUPS, y el logo de CUPS son marcas registradas de Apple Inc. Los derechos -de copia de CUPS 2007-2008 son de Apple Inc. Todos los derechos reservados. +de copia de CUPS 2007-2009 son de Apple Inc. Todos los derechos reservados. diff --git a/doc/help/network.html b/doc/help/network.html index e14771acc9..58c0784113 100644 --- a/doc/help/network.html +++ b/doc/help/network.html @@ -148,6 +148,14 @@ ipp://ip-address-or-hostname:port-number/resource?option version=1.0 Specifies that version 1.0 of the IPP protocol should be used instead of the default version 1.1. + + version=2.0 + Specifies that version 2.0 of the IPP protocol should be used instead of the default version 1.1. + + + version=2.1 + Specifies that version 2.1 of the IPP protocol should be used instead of the default version 1.1. + waitjob=false Specifies that the IPP backend should not wait for the job to complete. @@ -165,8 +173,11 @@ ipp://ip-address-or-hostname:port-number/resource?option
 lpd://ip-address-or-hostname/queue
+lpd://username@ip-address-or-hostname/queue
 lpd://ip-address-or-hostname/queue?option=value
+lpd://username@ip-address-or-hostname/queue?option=value
 lpd://ip-address-or-hostname/queue?option=value&option=value
+lpd://username@ip-address-or-hostname/queue?option=value&option=value
 

Table 3 summarizes the options supported by the lpd backend.

diff --git a/doc/help/whatsnew.html b/doc/help/whatsnew.html index a36ee0fd86..56d13e4e69 100644 --- a/doc/help/whatsnew.html +++ b/doc/help/whatsnew.html @@ -76,6 +76,8 @@
    +
  1. IPP/2.x support; CUPS now conforms to the draft IPP/2.0 and IPP/2.1 specifications.
  2. +
  3. CUPS-Add-Modify-Printer operation; the scheduler now supports setting the printer-state-reasons attribute using this operation.
  4. CUPS-Get-Document operation; the scheduler now supports a "get document" operation to download files from a print job.
  5. @@ -89,7 +91,7 @@

    Scheduler

    -
      +
      1. Access control; the scheduler now supports multiple addresses in Allow and Deny lines. It also now returns a HTTP 403 (forbidden) status when a user authenticates successfully but is not allowed to perform an operation.
      2. @@ -138,7 +140,7 @@

        Printer Drivers

        -
          +
          1. Device discovery; the cups-deviced helper now runs backends in parallel for faster discovery and streams the results of discovery as the backends provide them.
          2. @@ -163,7 +165,7 @@

            Print Filters

            -
              +
              1. Banner filter; the bundled banner ("job-sheets") pages are now generated using a new banner filter provides easier customization and better support for UTF-8 text.
              2. @@ -176,7 +178,7 @@

                CUPS API

                -
                  +
                  1. Backend API; a new cupsBackendReport function is provided to report a device from a backend and handles any needed quoting of the make-and-model, info, device-id, and location strings.
                  2. diff --git a/doc/index.html.in b/doc/index.html.in index c2fa482804..13376fb3a9 100644 --- a/doc/index.html.in +++ b/doc/index.html.in @@ -101,7 +101,7 @@ HEIGHT="128" ALT="CUPS">   The Common UNIX Printing System, CUPS, and the CUPS logo are trademarks of Apple Inc. CUPS is -copyright 2007-2008 Apple Inc. All rights reserved. +copyright 2007-2009 Apple Inc. All rights reserved. diff --git a/driver/Makefile b/driver/Makefile index d0078a88f2..a8d41967a4 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -3,7 +3,7 @@ # # Makefile for the CUPS base drivers. # -# Copyright 2007-2008 by Apple Inc. +# Copyright 2007-2009 by Apple Inc. # Copyright 2002-2005 by Easy Software Products. # # These coded instructions, statements, and computer programs are the @@ -266,7 +266,8 @@ test: testcmyk: test testcmyk.o libcupsdriver.a ../cups/libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcmyk.o libcupsdriver.a \ - ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) echo Running CMYK API tests... ./testcmyk > test/testcmyk.log @@ -278,7 +279,8 @@ testcmyk: test testcmyk.o libcupsdriver.a ../cups/libcups.a testdither: test testdither.o libcupsdriver.a ../cups/libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testdither.o libcupsdriver.a \ - ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) echo Running dither API tests... ./testdither > test/0-255.pgm 2>test/0-255.log ./testdither 0 127 255 > test/0-127-255.pgm 2>test/0-127-255.log @@ -297,7 +299,8 @@ testdither: test testdither.o libcupsdriver.a ../cups/libcups.a testrgb: test testrgb.o libcupsdriver.a ../cups/libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testrgb.o libcupsdriver.a \ - ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) echo Running RGB API tests... ./testrgb > test/testrgb.log 2>&1 || echo "RGB tests failed!" diff --git a/filter/Makefile b/filter/Makefile index d77e7cb031..0f6d694113 100644 --- a/filter/Makefile +++ b/filter/Makefile @@ -3,7 +3,7 @@ # # Filter makefile for the Common UNIX Printing System (CUPS). # -# Copyright 2007-2008 by Apple Inc. +# Copyright 2007-2009 by Apple Inc. # Copyright 1997-2006 by Easy Software Products. # # These coded instructions, statements, and computer programs are the @@ -503,7 +503,7 @@ testraster: testraster.o ../cups/libcups.a libcupsimage.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \ ../cups/libcups.a $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \ - $(SSLLIBS) $(LIBGSSAPI) + $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI) echo Running raster API tests... ./testraster diff --git a/filter/commandtops.c b/filter/commandtops.c index 0a0666e769..2d0d3e45eb 100644 --- a/filter/commandtops.c +++ b/filter/commandtops.c @@ -267,8 +267,8 @@ begin_ps(ppd_file_t *ppd, /* I - PPD file */ static void end_ps(ppd_file_t *ppd) /* I - PPD file */ { - if (ppd->jcl_begin) - fputs(ppd->jcl_begin, stdout); + if (ppd->jcl_end) + fputs(ppd->jcl_end, stdout); else putchar(0x04); diff --git a/man/backend.man b/man/backend.man index 17dd8d3090..14ac41b19c 100644 --- a/man/backend.man +++ b/man/backend.man @@ -3,7 +3,7 @@ .\" .\" Backend man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -179,7 +179,7 @@ All other exit code values are reserved. http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: backend.man 7810 2008-07-29 01:11:15Z mike $". .\" diff --git a/man/cancel.man b/man/cancel.man index 1a107b2b7e..dd46de6eb5 100644 --- a/man/cancel.man +++ b/man/cancel.man @@ -3,7 +3,7 @@ .\" .\" cancel man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -69,7 +69,7 @@ Cancel-Jobs operations in \fIcupsd.conf(5)\fR. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cancel.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/classes.conf.man b/man/classes.conf.man index 1c227095ad..4ff14d79d9 100644 --- a/man/classes.conf.man +++ b/man/classes.conf.man @@ -3,7 +3,7 @@ .\" .\" classes.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -112,7 +112,7 @@ Specifies the date/time associated with the state. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: classes.conf.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/client.conf.man.in b/man/client.conf.man.in index 608b41b2d3..d7dcc575df 100644 --- a/man/client.conf.man.in +++ b/man/client.conf.man.in @@ -3,7 +3,7 @@ .\" .\" client.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -43,7 +43,7 @@ connecting to the server .SH SEE ALSO http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: client.conf.man.in 6649 2007-07-11 21:46:42Z mike $". .\" diff --git a/man/commandtoescpx.man b/man/commandtoescpx.man index 771c9d8453..fd0c7b6e80 100644 --- a/man/commandtoescpx.man +++ b/man/commandtoescpx.man @@ -3,7 +3,7 @@ .\" .\" rastertoescpx man page for the CUPS Driver Development Kit. .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -27,7 +27,7 @@ EPSON-compatible printers and plotters. .SH SEE ALSO cupsprofile(1), ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual. .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: commandtoescpx.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/commandtopclx.man b/man/commandtopclx.man index 931d928318..ba6a5238dc 100644 --- a/man/commandtopclx.man +++ b/man/commandtopclx.man @@ -3,7 +3,7 @@ .\" .\" rastertopclx man page for the CUPS Driver Development Kit. .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -27,7 +27,7 @@ printers and plotters. .SH SEE ALSO cupsprofile(1), ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual. .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: commandtopclx.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cups-config.man b/man/cups-config.man index c3dfeeff07..9825b3a118 100644 --- a/man/cups-config.man +++ b/man/cups-config.man @@ -3,7 +3,7 @@ .\" .\" cups-config man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -111,7 +111,7 @@ Displays the full version number of the CUPS installation .SH SEE ALSO http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cups-config.man 7646 2008-06-16 17:26:20Z mike $". .\" diff --git a/man/cups-deviced.man.in b/man/cups-deviced.man.in index c3a99334f8..ddac8232c6 100644 --- a/man/cups-deviced.man.in +++ b/man/cups-deviced.man.in @@ -3,7 +3,7 @@ .\" .\" cups-deviced man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -38,7 +38,7 @@ backend(7), cupsd(8), cupsd.conf(5), .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cups-deviced.man.in 7646 2008-06-16 17:26:20Z mike $". .\" diff --git a/man/cups-driverd.man.in b/man/cups-driverd.man.in index 576d3612a0..11edc42a2e 100644 --- a/man/cups-driverd.man.in +++ b/man/cups-driverd.man.in @@ -3,7 +3,7 @@ .\" .\" cups-driverd man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -99,7 +99,7 @@ cupsd(8), cupsd.conf(5), cupstestppd(1), .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cups-driverd.man.in 7662 2008-06-17 14:34:20Z mike $". .\" diff --git a/man/cups-lpd.man.in b/man/cups-lpd.man.in index e26556ca99..4d96a4f640 100644 --- a/man/cups-lpd.man.in +++ b/man/cups-lpd.man.in @@ -3,7 +3,7 @@ .\" .\" cups-lpd man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -118,7 +118,7 @@ clients may be unreliable. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cups-lpd.man.in 7835 2008-08-09 06:37:04Z mike $". .\" diff --git a/man/cups-polld.man b/man/cups-polld.man index 067380a477..d91b8e7512 100644 --- a/man/cups-polld.man +++ b/man/cups-polld.man @@ -3,7 +3,7 @@ .\" .\" cups-polld man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -32,7 +32,7 @@ This program is started automatically by \fIcupsd\fR for every .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cups-polld.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cups-snmp.conf.man b/man/cups-snmp.conf.man index 3a77e42e53..2586b421cb 100644 --- a/man/cups-snmp.conf.man +++ b/man/cups-snmp.conf.man @@ -3,7 +3,7 @@ .\" .\" snmp.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -67,7 +67,7 @@ will scan the network for printers. .SH SEE ALSO http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cups-snmp.conf.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cupsaccept.man b/man/cupsaccept.man index 3f43a8bdf3..48601503f3 100644 --- a/man/cupsaccept.man +++ b/man/cupsaccept.man @@ -3,7 +3,7 @@ .\" .\" accept/reject man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -73,7 +73,7 @@ require the root user to execute these commands. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cupsaccept.man 7930 2008-09-10 22:25:54Z mike $". .\" diff --git a/man/cupsaddsmb.man.in b/man/cupsaddsmb.man.in index c825b98b8c..16a376f472 100644 --- a/man/cupsaddsmb.man.in +++ b/man/cupsaddsmb.man.in @@ -3,7 +3,7 @@ .\" .\" cupsaddsmb man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -208,7 +208,7 @@ http://localhost:631/help http://www.cups.org/windows/ .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cupsaddsmb.man.in 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cupsctl.man b/man/cupsctl.man index 6f6d1ce7ef..391286135e 100644 --- a/man/cupsctl.man +++ b/man/cupsctl.man @@ -3,7 +3,7 @@ .\" .\" cupsctl man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -99,7 +99,7 @@ Enable printing using the file: pseudo-device: .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cupsctl.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cupsd.conf.man.in b/man/cupsd.conf.man.in index b4c0c5fbe2..0aa299ff17 100644 --- a/man/cupsd.conf.man.in +++ b/man/cupsd.conf.man.in @@ -3,7 +3,7 @@ .\" .\" cupsd.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -684,7 +684,7 @@ Specifies the user name or ID that is used when running external programs. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cupsd.conf.man.in 7935 2008-09-11 01:54:11Z mike $". .\" diff --git a/man/cupsd.man.in b/man/cupsd.man.in index c87287a128..1d2ea933d7 100644 --- a/man/cupsd.man.in +++ b/man/cupsd.man.in @@ -3,7 +3,7 @@ .\" .\" cupsd man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -67,7 +67,7 @@ operations. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cupsd.man.in 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cupsenable.man b/man/cupsenable.man index 3ba0bcc0ff..32f137e727 100644 --- a/man/cupsenable.man +++ b/man/cupsenable.man @@ -4,7 +4,7 @@ .\" cupsenable/cupsdisable man page for the Common UNIX Printing System .\" (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -87,7 +87,7 @@ require the root user to execute these commands. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cupsenable.man 7600 2008-05-20 21:06:23Z mike $". diff --git a/man/cupsfilter.man b/man/cupsfilter.man index 7ffa912213..337c57e0d6 100644 --- a/man/cupsfilter.man +++ b/man/cupsfilter.man @@ -3,7 +3,7 @@ .\" .\" cupsfilter man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" .\" These coded instructions, statements, and computer programs are the .\" property of Apple Inc. and are protected by Federal copyright @@ -76,7 +76,7 @@ This will be addressed in a future CUPS release. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cupsfilter.man 7936 2008-09-11 03:12:59Z mike $". .\" diff --git a/man/cupstestdsc.man b/man/cupstestdsc.man index 4de16f6fac..3d8c292da0 100644 --- a/man/cupstestdsc.man +++ b/man/cupstestdsc.man @@ -3,7 +3,7 @@ .\" .\" cupstestdsc man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -44,7 +44,7 @@ http://localhost:631/help Adobe PostScript Language Document Structuring Conventions Specification, Version 3.0. .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cupstestdsc.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cupstestppd.man b/man/cupstestppd.man index 311c71808c..4757c5d72e 100644 --- a/man/cupstestppd.man +++ b/man/cupstestppd.man @@ -3,7 +3,7 @@ .\" .\" cupstestppd man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -141,7 +141,7 @@ http://localhost:631/help .br Adobe PostScript Printer Description File Format Specification, Version 4.3. .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: cupstestppd.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/drv.man.in b/man/drv.man.in index 504f662f6c..04ef610c74 100644 --- a/man/drv.man.in +++ b/man/drv.man.in @@ -3,7 +3,7 @@ .\" .\" drv man page for the Common UNIX Printing System. .\" -.\" Copyright 2008 by Apple Inc. +.\" Copyright 2008-2009 by Apple Inc. .\" .\" These coded instructions, statements, and computer programs are the .\" property of Apple Inc. and are protected by Federal copyright @@ -34,7 +34,7 @@ ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5) .br http://localhost:631/help .SH COPYRIGHT -Copyright 2008 by Apple Inc. +Copyright 2008-2009 by Apple Inc. .\" .\" End of "$Id$". .\" diff --git a/man/filter.man b/man/filter.man index 77a280c9a7..c2a3fd052e 100644 --- a/man/filter.man +++ b/man/filter.man @@ -3,7 +3,7 @@ .\" .\" filter man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -233,7 +233,7 @@ only filter. Typically the interface script will be provided via the .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: filter.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/lp.man b/man/lp.man index 3ae537d3d4..0f8605227c 100644 --- a/man/lp.man +++ b/man/lp.man @@ -3,7 +3,7 @@ .\" .\" lp man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -258,7 +258,7 @@ is highest priority). .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lp.man 7889 2008-08-29 22:03:35Z mike $". .\" diff --git a/man/lpadmin.man b/man/lpadmin.man index d3c3cb31f6..1075800ac5 100644 --- a/man/lpadmin.man +++ b/man/lpadmin.man @@ -3,7 +3,7 @@ .\" .\" lpadmin man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -201,7 +201,7 @@ System V or Solaris printing system configuration options. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lpadmin.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/lpc.man b/man/lpc.man index 9196190a79..1ca8939bcf 100644 --- a/man/lpc.man +++ b/man/lpc.man @@ -3,7 +3,7 @@ .\" .\" lpc man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -65,7 +65,7 @@ standard Berkeley or LPRng commands. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lpc.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/lpinfo.man b/man/lpinfo.man index b4f572cbd4..34cf5f0b54 100644 --- a/man/lpinfo.man +++ b/man/lpinfo.man @@ -3,7 +3,7 @@ .\" .\" lpinfo man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -109,7 +109,7 @@ The \fIlpinfo\fR command is unique to CUPS. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lpinfo.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/lpmove.man b/man/lpmove.man index 480c81998b..b355b0b8fc 100644 --- a/man/lpmove.man +++ b/man/lpmove.man @@ -3,7 +3,7 @@ .\" .\" lpmove man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -60,7 +60,7 @@ Specifies an alternate server. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lpmove.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/lpoptions.man.in b/man/lpoptions.man.in index 66594e2811..94b21b46b2 100644 --- a/man/lpoptions.man.in +++ b/man/lpoptions.man.in @@ -3,7 +3,7 @@ .\" .\" lpoptions man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -129,7 +129,7 @@ created by the root user. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lpoptions.man.in 7889 2008-08-29 22:03:35Z mike $". .\" diff --git a/man/lppasswd.man b/man/lppasswd.man index 93e89e0b7c..15fd92db2d 100644 --- a/man/lppasswd.man +++ b/man/lppasswd.man @@ -3,7 +3,7 @@ .\" .\" lpadmin man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -62,7 +62,7 @@ accounts managed by PAM instead. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lppasswd.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/lpq.man b/man/lpq.man index 8bbe47b562..98e59628e2 100644 --- a/man/lpq.man +++ b/man/lpq.man @@ -3,7 +3,7 @@ .\" .\" lpq man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -66,7 +66,7 @@ Requests a more verbose (long) reporting format. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lpq.man 7646 2008-06-16 17:26:20Z mike $". .\" diff --git a/man/lpr.man b/man/lpr.man index e91bef0a54..c8de2af1ca 100644 --- a/man/lpr.man +++ b/man/lpr.man @@ -3,7 +3,7 @@ .\" .\" lpr man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -116,7 +116,7 @@ are not supported by CUPS and produce a warning message if used. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lpr.man 7889 2008-08-29 22:03:35Z mike $". .\" diff --git a/man/lprm.man b/man/lprm.man index c5441d44c9..2eb87f43d1 100644 --- a/man/lprm.man +++ b/man/lprm.man @@ -3,7 +3,7 @@ .\" .\" lprm man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -59,7 +59,7 @@ Berkeley \fIlprm\fR command. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lprm.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/lpstat.man b/man/lpstat.man index 33e519cf94..ba831f5aee 100644 --- a/man/lpstat.man +++ b/man/lpstat.man @@ -3,7 +3,7 @@ .\" .\" lpstat man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -137,7 +137,7 @@ The Solaris "-f", "-P", and "-S" options are silently ignored. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: lpstat.man 7921 2008-09-10 15:42:24Z mike $". .\" diff --git a/man/mailto.conf.man b/man/mailto.conf.man index 79b2c4b8af..88aad21408 100644 --- a/man/mailto.conf.man +++ b/man/mailto.conf.man @@ -3,7 +3,7 @@ .\" .\" mailto.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -54,7 +54,7 @@ Specifies a prefix string for the subject line of an email notification. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: mailto.conf.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/mime.convs.man b/man/mime.convs.man index 417b3ba746..0072a383aa 100644 --- a/man/mime.convs.man +++ b/man/mime.convs.man @@ -3,7 +3,7 @@ .\" .\" mime.convs man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -40,7 +40,7 @@ application/postscript application/vnd.cups-raster 50 pstoraster .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: mime.convs.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/mime.types.man b/man/mime.types.man index ce785907fa..ba387e5624 100644 --- a/man/mime.types.man +++ b/man/mime.types.man @@ -3,7 +3,7 @@ .\" .\" mime.types man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -93,7 +93,7 @@ strings. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: mime.types.man 7670 2008-06-17 22:42:08Z mike $". .\" diff --git a/man/ppdc.man b/man/ppdc.man index 618b5af392..bf0489bfd1 100644 --- a/man/ppdc.man +++ b/man/ppdc.man @@ -3,7 +3,7 @@ .\" .\" ppdc man page for the Common UNIX Printing System. .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -74,7 +74,7 @@ ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5) .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: ppdc.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/ppdcfile.man b/man/ppdcfile.man index de4f951293..1c67343066 100644 --- a/man/ppdcfile.man +++ b/man/ppdcfile.man @@ -3,7 +3,7 @@ .\" .\" ppdcfile man page for the Common UNIX Printing System. .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -165,7 +165,7 @@ ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1) .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: ppdcfile.man 7607 2008-05-21 01:06:23Z mike $". .\" diff --git a/man/ppdhtml.man b/man/ppdhtml.man index 7135c364ce..1f3e49191a 100644 --- a/man/ppdhtml.man +++ b/man/ppdhtml.man @@ -3,7 +3,7 @@ .\" .\" ppdhtml man page for the Common UNIX Printing System. .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -40,7 +40,7 @@ ppdc(1), ppdcfile(5), ppdi(1), ppdmerge(1), ppdpo(1) .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: ppdhtml.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/ppdi.man b/man/ppdi.man index 85db4346ba..a9e1a02948 100644 --- a/man/ppdi.man +++ b/man/ppdi.man @@ -3,7 +3,7 @@ .\" .\" ppdi man page for the Common UNIX Printing System. .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -40,7 +40,7 @@ ppdc(1), ppdhtml(1), ppdmerge(1), ppdpo(1), ppdcfile(5) .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: ppdi.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/ppdmerge.man b/man/ppdmerge.man index 45bb02e1ae..ccbd0ca021 100644 --- a/man/ppdmerge.man +++ b/man/ppdmerge.man @@ -3,7 +3,7 @@ .\" .\" ppdmerge man page for the Common UNIX Printing System. .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -41,7 +41,7 @@ cupsprofile(1), ppdc(1), ppdhtml(1), ppdi(1), ppdpo(1), ppdcfile(5) .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: ppdmerge.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/ppdpo.man b/man/ppdpo.man index 205973e0f5..04efb61a1d 100644 --- a/man/ppdpo.man +++ b/man/ppdpo.man @@ -3,7 +3,7 @@ .\" .\" ppdpo man page for the Common UNIX Printing System. .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -46,7 +46,7 @@ ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdcfile(5) .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: ppdpo.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/printers.conf.man b/man/printers.conf.man index 04717eb87b..6171e03b90 100644 --- a/man/printers.conf.man +++ b/man/printers.conf.man @@ -3,7 +3,7 @@ .\" .\" printers.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -116,7 +116,7 @@ Specifies the date/time associated with the state. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: printers.conf.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/rastertoescpx.man b/man/rastertoescpx.man index ab65351367..0d0f4def57 100644 --- a/man/rastertoescpx.man +++ b/man/rastertoescpx.man @@ -3,7 +3,7 @@ .\" .\" rastertoescpx man page for the Common UNIX Printing System. .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -29,7 +29,7 @@ ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5) .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: rastertoescpx.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/rastertopclx.man b/man/rastertopclx.man index 266ecf3b71..3c1c823856 100644 --- a/man/rastertopclx.man +++ b/man/rastertopclx.man @@ -3,7 +3,7 @@ .\" .\" rastertopclx man page for the Common UNIX Printing System. .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -29,7 +29,7 @@ ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5) .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: rastertopclx.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/subscriptions.conf.man b/man/subscriptions.conf.man index e473ad0786..87e039abd7 100644 --- a/man/subscriptions.conf.man +++ b/man/subscriptions.conf.man @@ -3,7 +3,7 @@ .\" .\" subscriptions.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007-2008 by Apple Inc. +.\" Copyright 2007-2009 by Apple Inc. .\" Copyright 2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -83,7 +83,7 @@ is typically the "from" address in mailto: notifications. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007-2008 by Apple Inc. +Copyright 2007-2009 by Apple Inc. .\" .\" End of "$Id: subscriptions.conf.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/packaging/cups.spec.in b/packaging/cups.spec.in index 6e07e4f835..c9b22430fb 100644 --- a/packaging/cups.spec.in +++ b/packaging/cups.spec.in @@ -264,7 +264,7 @@ rm -rf $RPM_BUILD_ROOT /usr/share/doc/cups/help/whatsnew.html %dir /usr/share/doc/cups/images /usr/share/doc/cups/images/* -#/usr/share/locale/* +/usr/share/locale/* %dir /usr/share/man/man1 /usr/share/man/man1/cancel.1.gz diff --git a/ppdc/Makefile b/ppdc/Makefile index 598b9112c5..55c85b3c04 100644 --- a/ppdc/Makefile +++ b/ppdc/Makefile @@ -3,7 +3,7 @@ # # Makefile for the CUPS PPD Compiler. # -# Copyright 2007-2008 by Apple Inc. +# Copyright 2007-2009 by Apple Inc. # Copyright 2002-2006 by Easy Software Products. # # These coded instructions, statements, and computer programs are the @@ -237,7 +237,7 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \ echo Linking $@... $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \ libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \ - $(COMMONLIBS) $(LIBZ) + $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) echo Generating localization strings... ./genstrings >sample.c @@ -254,7 +254,8 @@ ppdc: ppdc.o $(LIBCUPSPPDC) ../cups/$(LIBCUPS) ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po echo Linking $@... $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \ - ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) echo Testing PPD compiler... ./ppdc-static -l en,fr -I ../data foo.drv ./ppdc-static -l en,fr -z -I ../data foo.drv @@ -303,7 +304,8 @@ ppdpo: ppdpo.o $(LIBCUPSPPDC) ../cups/$(LIBCUPS) testcatalog: testcatalog.o libcupsppdc.a ../cups/libcups.a echo Linking $@... $(CXX) $(LDFLAGS) -o $@ testcatalog.o libcupsppdc.a \ - ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) # diff --git a/scheduler/Dependencies b/scheduler/Dependencies index ec69eb8674..279262d32f 100644 --- a/scheduler/Dependencies +++ b/scheduler/Dependencies @@ -129,6 +129,7 @@ printers.o: mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h printers.o: ../cups/transcode.h ../cups/debug.h sysman.h statbuf.h cert.h printers.o: auth.h client.h policy.h printers.h classes.h job.h conf.h printers.o: banners.h dirsvc.h network.h subscriptions.h ../cups/dir.h +printers.o: ../cups/pwgmedia.h process.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h process.o: ../cups/versioning.h ../cups/md5.h ../cups/ipp-private.h process.o: ../cups/ipp.h ../cups/string.h ../cups/array.h ../cups/cups.h diff --git a/scheduler/Makefile b/scheduler/Makefile index c8846001fb..596547f5e3 100644 --- a/scheduler/Makefile +++ b/scheduler/Makefile @@ -3,7 +3,7 @@ # # Scheduler Makefile for the Common UNIX Printing System (CUPS). # -# Copyright 2007-2008 by Apple Inc. +# Copyright 2007-2009 by Apple Inc. # Copyright 1997-2007 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -438,7 +438,7 @@ testdirsvc: testdirsvc.o testlpd: testlpd.o ../cups/libcups.a cups-lpd echo Linking $@... $(CC) $(LDFLAGS) -o testlpd testlpd.o ../cups/libcups.a \ - $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI) + $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI) # @@ -448,7 +448,8 @@ testlpd: testlpd.o ../cups/libcups.a cups-lpd testmime: testmime.o libcupsmime.a ../cups/libcups.a echo Linking $@... $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testmime.o libcupsmime.a \ - ../cups/libcups.a $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI) + ../cups/libcups.a $(COMMONLIBS) $(LIBZ) $(SSLLIBS) \ + $(DNSSDLIBS) $(LIBGSSAPI) echo Running MIME tests... ./testmime @@ -460,7 +461,7 @@ testmime: testmime.o libcupsmime.a ../cups/libcups.a testspeed: testspeed.o ../cups/libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o testspeed testspeed.o ../cups/libcups.a \ - $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI) + $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI) # @@ -470,7 +471,7 @@ testspeed: testspeed.o ../cups/libcups.a testsub: testsub.o ../cups/libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o testsub testsub.o ../cups/libcups.a \ - $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI) + $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI) # diff --git a/scheduler/classes.c b/scheduler/classes.c index b126a08d91..5e53c85778 100644 --- a/scheduler/classes.c +++ b/scheduler/classes.c @@ -3,7 +3,7 @@ * * Printer class routines for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -122,9 +122,7 @@ cupsdDeletePrinterFromClass( cupsd_printer_t *c, /* I - Class to delete from */ cupsd_printer_t *p) /* I - Printer to delete */ { - int i; /* Looping var */ - cups_ptype_t type, /* Class type */ - oldtype; /* Old class type */ + int i; /* Looping var */ /* @@ -154,27 +152,10 @@ cupsdDeletePrinterFromClass( return; /* - * Recompute the printer type mask as needed... + * Update the IPP attributes (have to do this for member-names)... */ - if (c->num_printers > 0) - { - oldtype = c->type; - type = c->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT); - c->type = ~CUPS_PRINTER_REMOTE; - - for (i = 0; i < c->num_printers; i ++) - c->type &= c->printers[i]->type; - - c->type |= type; - - /* - * Update the IPP attributes... - */ - - if (c->type != oldtype) - cupsdSetPrinterAttrs(c); - } + cupsdSetPrinterAttrs(c); } diff --git a/scheduler/cups-driverd.cxx b/scheduler/cups-driverd.cxx index dfe7b5b0e4..1b551c09e0 100644 --- a/scheduler/cups-driverd.cxx +++ b/scheduler/cups-driverd.cxx @@ -7,7 +7,7 @@ * in CUPS_DATADIR/model and dynamically generated PPD files using * the driver helper programs in CUPS_SERVERBIN/driver. * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -1522,8 +1522,26 @@ load_ppds(const char *d, /* I - Actual directory */ } else if (!strncmp(line, "*Product:", 9)) { - if (sscanf(line, "%*[^\"]\"(%255[^)]", product) == 1) - cupsArrayAdd(products, strdup(product)); + if (sscanf(line, "%*[^\"]\"(%255[^\"]", product) == 1) + { + /* + * Make sure the value ends with a right parenthesis - can't stop at + * the first right paren since the product name may contain escaped + * parenthesis... + */ + + ptr = product + strlen(product) - 1; + if (ptr > product && *ptr == ')') + { + /* + * Yes, ends with a parenthesis, so remove it from the end and + * add the product to the list... + */ + + *ptr = '\0'; + cupsArrayAdd(products, strdup(product)); + } + } } else if (!strncmp(line, "*PSVersion:", 11)) { diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 2518f211f4..668da3ee19 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -3,7 +3,7 @@ * * IPP routines for the Common UNIX Printing System (CUPS) scheduler. * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * This file contains Kerberos support code, copyright 2006 by @@ -89,6 +89,7 @@ * send_ipp_status() - Send a status back to the IPP client. * set_default() - Set the default destination... * set_job_attrs() - Set job attributes. + * set_printer_attrs() - Set printer attributes. * set_printer_defaults() - Set printer default options from a request. * start_printer() - Start a printer. * stop_printer() - Stop a printer. @@ -193,6 +194,7 @@ static void get_ppd(cupsd_client_t *con, ipp_attribute_t *uri); static void get_ppds(cupsd_client_t *con); static void get_printers(cupsd_client_t *con, int type); static void get_printer_attrs(cupsd_client_t *con, ipp_attribute_t *uri); +static void get_printer_supported(cupsd_client_t *con, ipp_attribute_t *uri); static void get_subscription_attrs(cupsd_client_t *con, int sub_id); static void get_subscriptions(cupsd_client_t *con, ipp_attribute_t *uri); static const char *get_username(cupsd_client_t *con); @@ -225,6 +227,7 @@ __attribute__ ((__format__ (__printf__, 3, 4))) ; static void set_default(cupsd_client_t *con, ipp_attribute_t *uri); static void set_job_attrs(cupsd_client_t *con, ipp_attribute_t *uri); +static void set_printer_attrs(cupsd_client_t *con, ipp_attribute_t *uri); static void set_printer_defaults(cupsd_client_t *con, cupsd_printer_t *printer); static void start_printer(cupsd_client_t *con, ipp_attribute_t *uri); @@ -278,10 +281,11 @@ cupsdProcessIPPRequest( * Then validate the request header and required attributes... */ - if (con->request->request.any.version[0] != 1) + if (con->request->request.any.version[0] != 1 && + con->request->request.any.version[0] != 2) { /* - * Return an error, since we only support IPP 1.x. + * Return an error, since we only support IPP 1.x and 2.x. */ cupsdAddEvent(CUPSD_EVENT_SERVER_AUDIT, NULL, NULL, @@ -539,6 +543,10 @@ cupsdProcessIPPRequest( get_printer_attrs(con, uri); break; + case IPP_GET_PRINTER_SUPPORTED_VALUES : + get_printer_supported(con, uri); + break; + case IPP_HOLD_JOB : hold_job(con, uri); break; @@ -567,6 +575,10 @@ cupsdProcessIPPRequest( set_job_attrs(con, uri); break; + case IPP_SET_PRINTER_ATTRIBUTES : + set_printer_attrs(con, uri); + break; + case IPP_HOLD_NEW_JOBS : hold_new_jobs(con, uri); break; @@ -7512,6 +7524,61 @@ get_printer_attrs(cupsd_client_t *con, /* I - Client connection */ } +/* + * 'get_printer_supported()' - Get printer supported values. + */ + +static void +get_printer_supported( + cupsd_client_t *con, /* I - Client connection */ + ipp_attribute_t *uri) /* I - Printer URI */ +{ + http_status_t status; /* Policy status */ + cups_ptype_t dtype; /* Destination type (printer/class) */ + cupsd_printer_t *printer; /* Printer/class */ + + + cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_printer_supported(%p[%d], %s)", con, + con->http.fd, uri->values[0].string.text); + + /* + * Is the destination valid? + */ + + if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer)) + { + /* + * Bad URI... + */ + + send_ipp_status(con, IPP_NOT_FOUND, + _("The printer or class was not found.")); + return; + } + + /* + * Check policy... + */ + + if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con, NULL)) != HTTP_OK) + { + send_http_error(con, status, printer); + return; + } + + /* + * Return a list of attributes that can be set via Set-Printer-Attributes. + */ + + ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_ADMINDEFINE, + "printer-info", 0); + ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_ADMINDEFINE, + "printer-location", 0); + + con->response->request.status.status_code = IPP_OK; +} + + /* * 'get_printers()' - Get a list of printers or classes. */ @@ -10600,6 +10667,89 @@ set_job_attrs(cupsd_client_t *con, /* I - Client connection */ } +/* + * 'set_printer_attrs()' - Set printer attributes. + */ + +static void +set_printer_attrs(cupsd_client_t *con, /* I - Client connection */ + ipp_attribute_t *uri) /* I - Printer */ +{ + http_status_t status; /* Policy status */ + cups_ptype_t dtype; /* Destination type (printer/class) */ + cupsd_printer_t *printer; /* Printer/class */ + ipp_attribute_t *attr; /* Printer attribute */ + int changed; /* Was anything changed? */ + + + cupsdLogMessage(CUPSD_LOG_DEBUG2, "set_printer_attrs(%p[%d], %s)", con, + con->http.fd, uri->values[0].string.text); + + /* + * Is the destination valid? + */ + + if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer)) + { + /* + * Bad URI... + */ + + send_ipp_status(con, IPP_NOT_FOUND, + _("The printer or class was not found.")); + return; + } + + /* + * Check policy... + */ + + if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con, NULL)) != HTTP_OK) + { + send_http_error(con, status, printer); + return; + } + + /* + * Return a list of attributes that can be set via Set-Printer-Attributes. + */ + + if ((attr = ippFindAttribute(con->request, "printer-location", + IPP_TAG_TEXT)) != NULL) + { + cupsdSetString(&printer->location, attr->values[0].string.text); + changed = 1; + } + + if ((attr = ippFindAttribute(con->request, "printer-info", + IPP_TAG_TEXT)) != NULL) + { + cupsdSetString(&printer->info, attr->values[0].string.text); + changed = 1; + } + + /* + * Update the printer attributes and return... + */ + + if (changed) + { + cupsdSetPrinterAttrs(printer); + cupsdMarkDirty(CUPSD_DIRTY_PRINTERS); + + cupsdAddEvent(CUPSD_EVENT_PRINTER_CONFIG, printer, NULL, + "Printer \"%s\" description or location changed by \"%s\".", + printer->name, get_username(con)); + + cupsdLogMessage(CUPSD_LOG_INFO, + "Printer \"%s\" description or location changed by \"%s\".", + printer->name, get_username(con)); + } + + con->response->request.status.status_code = IPP_OK; +} + + /* * 'set_printer_defaults()' - Set printer default options from a request. */ diff --git a/scheduler/job.c b/scheduler/job.c index f86e967a30..9bdacc3266 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -608,6 +608,13 @@ cupsdFinishJob(cupsd_job_t *job) /* I - Job */ update_job_attrs(job, 0); + /* + * Clear the "connecting-to-device" reason, which is only valid when a + * printer is processing... + */ + + cupsdSetPrinterReasons(printer, "-connecting-to-device"); + if (job->status < 0) { /* @@ -1802,15 +1809,20 @@ cupsdStopJob(cupsd_job_t *job, /* I - Job */ if (job->filters[i] > 0) { cupsdEndProcess(job->filters[i], force); - job->filters[i] = 0; + if (force) + job->filters[i] = 0; } if (job->backend > 0) { cupsdEndProcess(job->backend, force); - job->backend = 0; + if (force) + job->backend = 0; } + if (!force) + return; + cupsdDestroyProfile(job->profile); job->profile = NULL; diff --git a/scheduler/printers.c b/scheduler/printers.c index 6685d34342..e4029cd1cf 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -3,7 +3,7 @@ * * Printer routines for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -14,42 +14,48 @@ * * Contents: * - * cupsdAddPrinter() - Add a printer to the system. - * cupsdAddPrinterHistory() - Add the current printer state to the history. - * cupsdAddPrinterUser() - Add a user to the ACL. - * cupsdCreateCommonData() - Create the common printer data. - * cupsdDeleteAllPrinters() - Delete all printers from the system. - * cupsdDeletePrinter() - Delete a printer from the system. - * cupsdFindPrinter() - Find a printer in the list. - * cupsdFreePrinterUsers() - Free allow/deny users. - * cupsdLoadAllPrinters() - Load printers from the printers.conf file. - * cupsdRenamePrinter() - Rename a printer. - * cupsdSaveAllPrinters() - Save all printer definitions to the - * printers.conf file. - * cupsdSetAuthInfoRequired() - Set the required authentication info. - * cupsdSetDeviceURI() - Set the device URI for a printer. - * cupsdSetPrinterAttr() - Set a printer attribute. - * cupsdSetPrinterAttrs() - Set printer attributes based upon the PPD - * file. - * cupsdSetPrinterReasons() - Set/update the reasons strings. - * cupsdSetPrinterState() - Update the current state of a printer. - * cupsdStopPrinter() - Stop a printer from printing any jobs... - * cupsdUpdatePrinters() - Update printers after a partial reload. - * cupsdValidateDest() - Validate a printer/class destination. - * cupsdWritePrintcap() - Write a pseudo-printcap file for older - * applications that need it... - * add_printer_defaults() - Add name-default attributes to the printer - * attributes. - * add_printer_filter() - Add a MIME filter for a printer. - * add_printer_formats() - Add document-format-supported values for - * a printer. - * compare_printers() - Compare two printers. - * delete_printer_filters() - Delete all MIME filters for a printer. - * write_irix_config() - Update the config files used by the IRIX - * desktop tools. - * write_irix_state() - Update the status files used by IRIX - * printing desktop tools. - * write_xml_string() - Write a string with XML escaping. + * cupsdAddPrinter() - Add a printer to the system. + * cupsdAddPrinterHistory() - Add the current printer state to the history. + * cupsdAddPrinterUser() - Add a user to the ACL. + * cupsdCreateCommonData() - Create the common printer data. + * cupsdDeleteAllPrinters() - Delete all printers from the system. + * cupsdDeletePrinter() - Delete a printer from the system. + * cupsdFindDest() - Find a destination in the list. + * cupsdFindPrinter() - Find a printer in the list. + * cupsdFreePrinterUsers() - Free allow/deny users. + * cupsdLoadAllPrinters() - Load printers from the printers.conf file. + * cupsdRenamePrinter() - Rename a printer. + * cupsdSaveAllPrinters() - Save all printer definitions to the + * printers.conf file. + * cupsdSetAuthInfoRequired() - Set the required authentication info. + * cupsdSetDeviceURI() - Set the device URI for a printer. + * cupsdSetPrinterAttr() - Set a printer attribute. + * cupsdSetPrinterAttrs() - Set printer attributes based upon the PPD + * file. + * cupsdSetPrinterReasons() - Set/update the reasons strings. + * cupsdSetPrinterState() - Update the current state of a printer. + * cupsdStopPrinter() - Stop a printer from printing any jobs... + * cupsdUpdatePrinterPPD() - Update keywords in a printer's PPD file. + * cupsdUpdatePrinters() - Update printers after a partial reload. + * cupsdValidateDest() - Validate a printer/class destination. + * cupsdWritePrintcap() - Write a pseudo-printcap file for older + * applications that need it... + * add_printer_defaults() - Add name-default attributes to the printer + * attributes. + * add_printer_filter() - Add a MIME filter for a printer. + * add_printer_formats() - Add document-format-supported values for a + * printer. + * add_string_array() - Add a string to an array of CUPS strings. + * compare_printers() - Compare two printers. + * delete_printer_filters() - Delete all MIME filters for a printer. + * delete_string_array() - Delete an array of CUPS strings. + * load_ppd() - Load a cached PPD file, updating the cache as + * needed. + * write_irix_config() - Update the config files used by the IRIX + * desktop tools. + * write_irix_state() - Update the status files used by IRIX printing + * desktop tools. + * write_xml_string() - Write a string with XML escaping. */ /* @@ -58,6 +64,7 @@ #include "cupsd.h" #include +#include /* @@ -289,7 +296,9 @@ cupsdCreateCommonData(void) static const char * const versions[] =/* ipp-versions-supported values */ { "1.0", - "1.1" + "1.1", + "2.0", + "2.1" }; static const int ops[] = /* operations-supported values */ { @@ -306,7 +315,9 @@ cupsdCreateCommonData(void) IPP_PAUSE_PRINTER, IPP_RESUME_PRINTER, IPP_PURGE_JOBS, + IPP_SET_PRINTER_ATTRIBUTES, IPP_SET_JOB_ATTRIBUTES, + IPP_GET_PRINTER_SUPPORTED_VALUES, IPP_CREATE_PRINTER_SUBSCRIPTION, IPP_CREATE_JOB_SUBSCRIPTION, IPP_GET_SUBSCRIPTION_ATTRIBUTES, @@ -405,6 +416,11 @@ cupsdCreateCommonData(void) "printer-resolution", "sides" }; + static const char * const printer_settable[] = + { /* printer-settable-attributes-supported */ + "printer-info", + "printer-location" + }; if (CommonData) @@ -606,6 +622,12 @@ cupsdCreateCommonData(void) i ++, p = (cupsd_policy_t *)cupsArrayNext(Policies)) attr->values[i].string.text = p->name; + /* printer-settable-attributes-supported */ + ippAddStrings(CommonData, IPP_TAG_PRINTER, IPP_TAG_KEYWORD | IPP_TAG_COPY, + "printer-settable-attributes-supported", + sizeof(printer_settable) / sizeof(printer_settable[0]), + NULL, printer_settable); + /* server-is-sharing-printers */ ippAddBoolean(CommonData, IPP_TAG_PRINTER, "server-is-sharing-printers", BrowseLocalProtocols != 0 && Browsing); @@ -3773,13 +3795,13 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ char ppd_name[1024]; /* PPD filename */ struct stat ppd_info; /* PPD file info */ int num_media; /* Number of media options */ - ppd_option_t *input_slot, /* InputSlot options */ - *media_type, /* MediaType options */ - *page_size, /* PageSize options */ - *output_bin, /* OutputBin options */ - *media_quality, /* EFMediaQualityMode options */ + char custom_in[256], /* Custom size name in inches */ + custom_mm[256]; /* Custom size name in millimeters */ + ppd_size_t *size; /* Current size */ + ppd_option_t *output_bin, /* OutputBin options */ *duplex; /* Duplex options */ ppd_attr_t *ppd_attr; /* PPD attribute */ + _cups_pwg_media_t *pwgmedia; /* Matching PWG size name */ ipp_attribute_t *attr; /* Attribute data */ ipp_value_t *val; /* Attribute value */ int num_finishings; /* Number of finishings */ @@ -3794,8 +3816,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ { /* Standard CUPS commands */ "AutoConfigure", "Clean", - "PrintSelfTestPage", - "ReportLevels" + "PrintSelfTestPage" }; @@ -3856,6 +3877,8 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ * Add make/model and other various attributes... */ + ppdMarkDefaults(ppd); + if (ppd->color_device) p->type |= CUPS_PRINTER_COLOR; if (ppd->variable_sizes) @@ -3901,21 +3924,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ * Add media options from the PPD file... */ - if ((input_slot = ppdFindOption(ppd, "InputSlot")) != NULL) - num_media = input_slot->num_choices; - else - num_media = 0; - - if ((media_type = ppdFindOption(ppd, "MediaType")) != NULL) - num_media += media_type->num_choices; - - if ((page_size = ppdFindOption(ppd, "PageSize")) != NULL) - num_media += page_size->num_choices; - - if ((media_quality = ppdFindOption(ppd, "EFMediaQualityMode")) != NULL) - num_media += media_quality->num_choices; - - if (num_media == 0) + if (ppd->num_sizes == 0) { cupsdLogMessage(CUPSD_LOG_CRIT, "The PPD file for printer %s contains no media " @@ -3923,44 +3932,70 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ } else { + num_media = ppd->num_sizes; + if (ppd->variable_sizes) + num_media ++; + attr = ippAddStrings(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "media-supported", num_media, NULL, NULL); if (attr != NULL) { val = attr->values; - if (input_slot != NULL) - for (i = 0; i < input_slot->num_choices; i ++, val ++) - val->string.text = _cupsStrAlloc(input_slot->choices[i].choice); + for (i = ppd->num_sizes, size = ppd->sizes; i > 0; i --, size ++) + { + if (strcasecmp(size->name, "Custom")) + { + if ((pwgmedia = _cupsPWGMediaBySize(size->width, + size->length)) != NULL) + { + val->string.text = _cupsStrAlloc(pwgmedia->pwg); + } + else + { + snprintf(custom_in, sizeof(custom_in), "adobe_%s_%gx%gin", + size->name, size->width / 72.0, size->length / 72.0); + snprintf(custom_mm, sizeof(custom_mm), "adobe_%s_%gx%gmm", + size->name, size->width * 25.4 / 72.0, + size->length * 25.4 / 72.0); + if (strlen(custom_in) < strlen(custom_mm)) + val->string.text = _cupsStrAlloc(custom_in); + else + val->string.text = _cupsStrAlloc(custom_mm); + } - if (media_type != NULL) - for (i = 0; i < media_type->num_choices; i ++, val ++) - val->string.text = _cupsStrAlloc(media_type->choices[i].choice); + if (size->marked) + ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, + "media-default", NULL, + _cupsStrRetain(val->string.text)); - if (media_quality != NULL) - for (i = 0; i < media_quality->num_choices; i ++, val ++) - val->string.text = _cupsStrAlloc(media_quality->choices[i].choice); + val ++; + } + } - if (page_size != NULL) + if (ppd->variable_sizes) { - for (i = 0; i < page_size->num_choices; i ++, val ++) - val->string.text = _cupsStrAlloc(page_size->choices[i].choice); - - ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, - "media-default", NULL, page_size->defchoice); + snprintf(custom_in, sizeof(custom_in), "custom_min_%gx%gin", + ppd->custom_min[0] / 72.0, ppd->custom_min[1] / 72.0); + snprintf(custom_mm, sizeof(custom_mm), "custom_min_%gx%gmm", + ppd->custom_min[0] * 25.4 / 72.0, + ppd->custom_min[1] * 25.4 / 72.0); + if (strlen(custom_in) < strlen(custom_mm)) + val->string.text = _cupsStrAlloc(custom_in); + else + val->string.text = _cupsStrAlloc(custom_mm); + val ++; + + snprintf(custom_in, sizeof(custom_in), "custom_max_%gx%gin", + ppd->custom_max[0] / 72.0, ppd->custom_max[1] / 72.0); + snprintf(custom_mm, sizeof(custom_mm), "custom_max_%gx%gmm", + ppd->custom_max[0] * 25.4 / 72.0, + ppd->custom_max[1] * 25.4 / 72.0); + if (strlen(custom_in) < strlen(custom_mm)) + val->string.text = _cupsStrAlloc(custom_in); + else + val->string.text = _cupsStrAlloc(custom_mm); } - else if (input_slot != NULL) - ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, - "media-default", NULL, input_slot->defchoice); - else if (media_type != NULL) - ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, - "media-default", NULL, media_type->defchoice); - else if (media_quality != NULL) - ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, - "media-default", NULL, media_quality->defchoice); - else - ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, - "media-default", NULL, "none"); } } @@ -3981,6 +4016,9 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ i ++, val ++) val->string.text = _cupsStrAlloc(output_bin->choices[i].choice); } + + attr = ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, + "output-bin-default", NULL, output_bin->defchoice); } /* diff --git a/scheduler/testmime.c b/scheduler/testmime.c index 3eface432e..cf14e223b9 100644 --- a/scheduler/testmime.c +++ b/scheduler/testmime.c @@ -3,7 +3,7 @@ * * MIME test program for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2006 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -137,7 +137,7 @@ main(int argc, /* I - Number of command-line args */ puts("MIME database types:"); for (src = mimeFirstType(mime); src; src = mimeNextType(mime)) { - printf("\t%s/%s:\n", src->super, src->type); + printf("\t%s/%s (%d):\n", src->super, src->type, src->priority); print_rules(src->rules); puts(""); } diff --git a/scheduler/type.c b/scheduler/type.c index 23c1e5b292..c334e99eb6 100644 --- a/scheduler/type.c +++ b/scheduler/type.c @@ -3,7 +3,7 @@ * * MIME typing routines for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2006 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -364,7 +364,10 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */ length[num_values] = ptr - value[num_values]; if (*rule != ',') + { + num_values ++; break; + } rule ++; } diff --git a/standards/Makefile b/standards/Makefile index 18ed41ae17..9ae30e27b1 100644 --- a/standards/Makefile +++ b/standards/Makefile @@ -3,7 +3,7 @@ # # Standards makefile for the Common UNIX Printing System (CUPS). # -# Copyright 2007-2008 by Apple Inc. +# Copyright 2007-2009 by Apple Inc. # Copyright 2006 by Easy Software Products. # # These coded instructions, statements, and computer programs are the @@ -146,7 +146,7 @@ uninstall: rfctohtml: rfctohtml.o ../cups/libcups.a $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ rfctohtml.o ../cups/libcups.a \ - $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) # diff --git a/templates/es/trailer.tmpl b/templates/es/trailer.tmpl index e9813372b6..448f65fc5a 100644 --- a/templates/es/trailer.tmpl +++ b/templates/es/trailer.tmpl @@ -2,7 +2,7 @@   Common UNIX Printing System, CUPS, y el logo de CUPS son marcas registradas de Apple, Inc. Los -derechos de copia de CUPS 2007-2008 son de Apple Inc. +derechos de copia de CUPS 2007-2009 son de Apple Inc. Todos los derechos reservados. diff --git a/templates/trailer.tmpl b/templates/trailer.tmpl index 6ae8558664..9c98c54590 100644 --- a/templates/trailer.tmpl +++ b/templates/trailer.tmpl @@ -2,7 +2,7 @@   The Common UNIX Printing System, CUPS, and the CUPS logo are trademarks of Apple Inc. CUPS is -copyright 2007-2008 Apple Inc. All rights reserved. +copyright 2007-2009 Apple Inc. All rights reserved. diff --git a/test/Makefile b/test/Makefile index d525485719..dfb0088013 100644 --- a/test/Makefile +++ b/test/Makefile @@ -3,7 +3,7 @@ # # IPP test makefile for the Common UNIX Printing System (CUPS). # -# Copyright 2007-2008 by Apple Inc. +# Copyright 2007-2009 by Apple Inc. # Copyright 1997-2006 by Easy Software Products, all rights reserved. # # These coded instructions, statements, and computer programs are the @@ -102,7 +102,7 @@ uninstall: ipptest: ipptest.o ../cups/libcups.a echo Linking $@... $(CC) $(LDFLAGS) -o ipptest ipptest.o ../cups/libcups.a \ - $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) + $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) # diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh index 0123470fb7..bf44c17d54 100755 --- a/test/run-stp-tests.sh +++ b/test/run-stp-tests.sh @@ -750,7 +750,7 @@ else fi # Page log file... -if grep -q 'testfile.pdf Letter' /tmp/cups-$user/log/page_log; then +if grep -iq 'testfile.pdf na_letter_8.5x11in' /tmp/cups-$user/log/page_log; then echo "PASS: page_log formatted correctly." echo "

                    PASS: page_log formatted correctly.

                    " >>$strfile else