]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.4svn-r8227.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 9 Jan 2009 23:33:14 +0000 (23:33 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 9 Jan 2009 23:33:14 +0000 (23:33 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1113 a1ca3aef-8c08-0410-bb20-df032aa958be

95 files changed:
CHANGES-1.3.txt
CHANGES.txt
Makedefs.in
README.txt
backend/Makefile
backend/ipp.c
cgi-bin/Makefile
cgi-bin/ipp-var.c
conf/cupsd.conf.in
cups/Dependencies
cups/Makefile
cups/conflicts.c
cups/dest.c
cups/file.c
cups/globals.c
cups/globals.h
cups/ipp.c
cups/libcups.exp
cups/libcups_s.exp
cups/mark.c
cups/pwgmedia.c [new file with mode: 0644]
cups/pwgmedia.h [new file with mode: 0644]
cups/testconflicts.c
cups/testppd.c
doc/Makefile
doc/es/index.html.in
doc/help/network.html
doc/help/whatsnew.html
doc/index.html.in
driver/Makefile
filter/Makefile
filter/commandtops.c
man/backend.man
man/cancel.man
man/classes.conf.man
man/client.conf.man.in
man/commandtoescpx.man
man/commandtopclx.man
man/cups-config.man
man/cups-deviced.man.in
man/cups-driverd.man.in
man/cups-lpd.man.in
man/cups-polld.man
man/cups-snmp.conf.man
man/cupsaccept.man
man/cupsaddsmb.man.in
man/cupsctl.man
man/cupsd.conf.man.in
man/cupsd.man.in
man/cupsenable.man
man/cupsfilter.man
man/cupstestdsc.man
man/cupstestppd.man
man/drv.man.in
man/filter.man
man/lp.man
man/lpadmin.man
man/lpc.man
man/lpinfo.man
man/lpmove.man
man/lpoptions.man.in
man/lppasswd.man
man/lpq.man
man/lpr.man
man/lprm.man
man/lpstat.man
man/mailto.conf.man
man/mime.convs.man
man/mime.types.man
man/ppdc.man
man/ppdcfile.man
man/ppdhtml.man
man/ppdi.man
man/ppdmerge.man
man/ppdpo.man
man/printers.conf.man
man/rastertoescpx.man
man/rastertopclx.man
man/subscriptions.conf.man
packaging/cups.spec.in
ppdc/Makefile
scheduler/Dependencies
scheduler/Makefile
scheduler/classes.c
scheduler/cups-driverd.cxx
scheduler/ipp.c
scheduler/job.c
scheduler/printers.c
scheduler/testmime.c
scheduler/type.c
standards/Makefile
templates/es/trailer.tmpl
templates/trailer.tmpl
test/Makefile
test/run-stp-tests.sh

index b9d317c255330797a5b3be94eb054613859779f9..42e447283e17e56e1b47b970219d5f36547f83a3 100644 (file)
@@ -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
index 6bed9053488934388f0aa8fe6c52b1bc71897ba5..4c35ec79d2d13164cdc4487b427d7edf06075f73 100644 (file)
@@ -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)
index 8753db79fc161f4a6018babe37351beac77ac0a2..1c182ed0b7fd10eab2fe1796c1a1f851cd4d5e68 100644 (file)
@@ -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@
index 784a7087e56a28124c62dc0a2af8b2b13b60a887..2535148646180fa3ab3f0beb3524f1cf39d33059 100644 (file)
@@ -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.
index 4622733391ee93821c71170f57861e0387456318..6ea05fdb2de42a625ff711456c91bfa56d693784 100644 (file)
@@ -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)
 
 
 #
index 78b3ddb3bba0b0d50a9c510ab0f4e9df90a450c9..d2f1d570e19ef49a76403d44d253ad4af61f5722 100644 (file)
@@ -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);
index b94cf0840476723d51face9c08dee33abb9acf88..3e1a59aaab9d8e2cc44bae316d272511ec78f10a 100644 (file)
@@ -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)
 
 
 #
index 604b864696f8d594aa1391e5691318c15f71a7e6..90c90cf74a8daf0249aef38a0a3b74e7b7669507 100644 (file)
@@ -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))
index a716cdec708a9f95251bd1ac106f7e613997c6bb..3e17f3f435f8b1eef3445181a86980c9066719bc 100644 (file)
@@ -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
index b1336d501f6d53bf9e2faca68544c10347a9620a..8b8c25c8b2636459654de364ce67e9fd8b4e60cd 100644 (file)
@@ -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
index 8674389640d3a15ea672577aba53fbf6dc34fa91..bec16188f8d66a60b381c346d20d89fe52a112a2 100644 (file)
@@ -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)
 
 
 #
index b05ecd57db709ee13a12098fd24a393fe95c7233..a99810cd90f1f38e855b68e422626585f926457f 100644 (file)
@@ -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);
           }
         }
       }
index 3530075735e990acdc6d1e889580c24dec4efc6a..eab2eb5872c58ecabc9b7e0841cbe4af49d03442 100644 (file)
@@ -54,6 +54,7 @@
 
 #include "debug.h"
 #include "globals.h"
+#include "pwgmedia.h"
 #include <stdlib.h>
 #include <ctype.h>
 #include <sys/stat.h>
@@ -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);
index 0fb212d1f8cd40dff95fcc07a5b79a559b9b8db8..722a8323b66a41bf656455b3d84ac76c32bde386 100644 (file)
@@ -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)
   {
    /*
index c66261e1276090984b9106f4b66ce770329792ad..fc7d6807b5b11138854143742062ed6320c6959d 100644 (file)
@@ -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);
 }
 
index 6ba518e8cf93d83ea982a0743a19a989b53b6e99..9a0a9984239972b745adbd767b8a3aebb92a7197 100644 (file)
@@ -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 */
index 1f932403d46425012c6bb4eb2168ef0835051d30..de0f12c400134d5a8ce8d547889932668af9f05d 100644 (file)
@@ -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)
index c67afed84a48692cf998030af71f9619087f831f..32803d6b6f5c45ea32b3e3524b19d6e8d47891ee 100644 (file)
@@ -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
index d46e979119ecf63e50e4991c09b9ca4a2d73144d..1b45a396ac64f6d5e4f14aab641279707a2e7a44 100644 (file)
@@ -16,6 +16,9 @@ _cupsMD5Init
 _cupsMessageFree
 _cupsMessageLoad
 _cupsMessageLookup
+_cupsPWGMediaByName
+_cupsPWGMediaByLegacy
+_cupsPWGMediaBySize
 _cupsSetError
 _cupsSetLocale
 _cupsSNMPClose
index ffbc436ecf58daf1a98e93cb337d4c746cfad332..4466ec1ce936ebae8f66133cfb413008a9142003 100644 (file)
@@ -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 (file)
index 0000000..c2d10f0
--- /dev/null
@@ -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 <math.h>
+
+
+/*
+ * 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 (file)
index 0000000..a07ca0c
--- /dev/null
@@ -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$".
+ */
index 6d526493ba668a65dadacaa7ff7dbb9018a29239..291739a2684a69908259dc5eefdea8a962ff954d 100644 (file)
@@ -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);
index 2583f3fd915867a764f9a5bb4060d510dce8520b..97337ccac53c0e0ebded3744ddb4fa811adaf460 100644 (file)
@@ -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 <sys/stat.h>
 #include <errno.h>
 #include "cups.h"
+#include "pwgmedia.h"
 #ifdef WIN32
 #  include <io.h>
 #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...
     */
index 879cb59113ad9cd9fb7e07bba61c2d5c03133dff..bf8bca0d1bc178ddeb9461ece1498a7c8e851fe9 100644 (file)
@@ -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
 
index 7ccc1197a227478302afdd7209f186f1e642077f..8695f1d68f0bf40780d2a8a2fd7d3f5167933901 100644 (file)
@@ -101,7 +101,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
 <TR><TD>&nbsp;</TD></TR>
 <TR><TD CLASS="trailer">Common UNIX Printing System, CUPS, y el logo de CUPS son
 marcas registradas de <A HREF="http://www.apple.com">Apple Inc.</A> Los derechos
-de copia de CUPS 2007-2008 son de Apple Inc. Todos los derechos reservados.</TD></TR>
+de copia de CUPS 2007-2009 son de Apple Inc. Todos los derechos reservados.</TD></TR>
 </TABLE>
 </BODY>
 </HTML>
index e14771acc97278f77272ed0e7841204b84aa0378..58c0784113f8f0f8bd5b903012aa40c197fe0331 100644 (file)
@@ -148,6 +148,14 @@ ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option
        <TD><TT>version=1.0</TT></TD>
        <TD>Specifies that version 1.0 of the IPP protocol should be used instead of the default version 1.1.</TD>
 </TR>
+<TR>
+       <TD><TT>version=2.0</TT></TD>
+       <TD>Specifies that version 2.0 of the IPP protocol should be used instead of the default version 1.1.</TD>
+</TR>
+<TR>
+       <TD><TT>version=2.1</TT></TD>
+       <TD>Specifies that version 2.1 of the IPP protocol should be used instead of the default version 1.1.</TD>
+</TR>
 <TR>
        <TD><TT>waitjob=false</TT></TD>
        <TD>Specifies that the IPP backend should not wait for the job to complete.</TD>
@@ -165,8 +173,11 @@ ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option
 
 <PRE>
 lpd://<i>ip-address-or-hostname</i>/<i>queue</i>
+lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>
 lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value</i>
+lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value</i>
 lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option=value</i>
+lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option=value</i>
 </PRE>
 
 <P><A HREF="#TABLE3">Table 3</A> summarizes the options supported by the <tt>lpd</tt> backend.</P>
index a36ee0fd866c9fdbbfc90bd1a3eff870bbd3d33d..56d13e4e69067ac8323a3560b7872d75c0a46fa2 100644 (file)
@@ -76,6 +76,8 @@
 
 <OL START="23">
 
+       <LI><EM>IPP/2.x support;</EM> CUPS now conforms to the draft IPP/2.0 and IPP/2.1 specifications.</LI>
+
        <LI><EM>CUPS-Add-Modify-Printer operation;</EM> the scheduler now supports setting the printer-state-reasons attribute using this operation.</LI>
 
        <LI><EM>CUPS-Get-Document operation;</EM> the scheduler now supports a "get document" operation to download files from a print job.</LI>
@@ -89,7 +91,7 @@
 
 <H2 CLASS="title"><A NAME="SCHEDULER">Scheduler</A></H2>
 
-<OL START="27">
+<OL START="28">
 
        <LI><EM>Access control;</EM> 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.</LI>
 
 
 <H2 CLASS="title"><A NAME="DRIVERS">Printer Drivers</A></H2>
 
-<OL START="48">
+<OL START="49">
 
        <LI><EM>Device discovery;</EM> the cups-deviced helper now runs backends in parallel for faster discovery and streams the results of discovery as the backends provide them.</LI>
 
 
 <H2 CLASS="title"><A NAME="FILTERS">Print Filters</A></H2>
 
-<OL START="57">
+<OL START="58">
 
        <LI><EM>Banner filter;</EM> the bundled banner ("job-sheets") pages are now generated using a new banner filter provides easier customization and better support for UTF-8 text.</LI>
 
 
 <H2 CLASS="title"><A NAME="CUPSAPI">CUPS API</A></H2>
 
-<OL START="60">
+<OL START="61">
 
        <LI><EM>Backend API;</EM> 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.</LI>
 
index c2fa482804ec2f85afe14df73c2fd344adbdfa3d..13376fb3a91b689476811b4fa5ffa59bf292e7e4 100644 (file)
@@ -101,7 +101,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
 <TR><TD>&nbsp;</TD></TR>
 <TR><TD CLASS="trailer">The Common UNIX Printing System, CUPS, and the CUPS
 logo are trademarks of <A HREF="http://www.apple.com">Apple Inc.</A> CUPS is
-copyright 2007-2008 Apple Inc. All rights reserved.</TD></TR>
+copyright 2007-2009 Apple Inc. All rights reserved.</TD></TR>
 </TABLE>
 </BODY>
 </HTML>
index d0078a88f25cdd8c26a8170e79e7600904d34901..a8d41967a4af05a1f498ba9cf3ba026b9c3fd58f 100644 (file)
@@ -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!"
 
index d77e7cb0316565c1e0cb7bcff021af236f15119c..0f6d694113fce8308d3882c8af6fbc96001b661e 100644 (file)
@@ -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
 
index 0a0666e769ed1deb85b3b07137214e998a0dfa1d..2d0d3e45eb944989a845806085f0becb85425a81 100644 (file)
@@ -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);
 
index 17dd8d309087b9856c2c934ed8b4c2cd92dcd7a0..14ac41b19c4fb74f6982570e582940f4f49251fc 100644 (file)
@@ -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 $".
 .\"
index 1a107b2b7ed65d2005a5dbbd3079311a286ac909..dd46de6eb5f982cf60a7087672718e5768dba16f 100644 (file)
@@ -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 $".
 .\"
index 1c227095ad0d468f84df375fae28fd90476ad34b..4ff14d79d9c941507b705c5854a448ec027d8587 100644 (file)
@@ -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 $".
 .\"
index 608b41b2d3f4212b384d45a4d736105570c15b5c..d7dcc575df3f956ec85984d3d0148ec6bd4c6dc5 100644 (file)
@@ -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 $".
 .\"
index 771c9d84538772f0cc205aeebd36b0ff2e13c3a1..fd0c7b6e80c49d3a315861e0fef0149d1ad34578 100644 (file)
@@ -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 $".
 .\"
index 931d9283180aedde140ad6e4f7cfe72dff61eb19..ba6a5238dc02771e375b7ddc8768a48858e8022c 100644 (file)
@@ -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 $".
 .\"
index c3dfeeff07e1bdba6be9f5cf6488af2dd95cb0bf..9825b3a11899f844e4054313f8ddec4f0f34fc5b 100644 (file)
@@ -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 $".
 .\"
index c3a99334f8145bb80bc672d36853f5dd8d65574f..ddac8232c6d2101c0e6da0522cecebff19f7af5a 100644 (file)
@@ -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 $".
 .\"
index 576d3612a0f9a5cb4a29e636f5603bdfc02b6521..11edc42a2ef540025a1464970f7df61de8377983 100644 (file)
@@ -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 $".
 .\"
index e26556ca99d61a9783e9c34ca175c2aa0c3ccb04..4d96a4f640516119cb65d0bafa971f15d37f4015 100644 (file)
@@ -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 $".
 .\"
index 067380a477ff0840252b8f5c61282584a278845b..d91b8e751288a882087a2837444c2f5d6224b424 100644 (file)
@@ -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 $".
 .\"
index 3a77e42e531433c0693ea22784a78436e7d57dc2..2586b421cb7d850fcf2e313a43b326892038665b 100644 (file)
@@ -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 $".
 .\"
index 3f43a8bdf3f7d384ab0f171f1979317962763346..48601503f343dc955f48d76e777fc6d1bf19271d 100644 (file)
@@ -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 $".
 .\"
index c825b98b8c8f45e4433da666350f21d62b2a7ebc..16a376f4728a90da0ec051f443b8c008ec472ae7 100644 (file)
@@ -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 $".
 .\"
index 6f6d1ce7ef2a7274c9a396133b13a144610090fd..391286135ebb8706a88d2b6c14170e9b0ba15f5a 100644 (file)
@@ -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 $".
 .\"
index b4c0c5fbe232409c414e58d958257d8ebf2a683c..0aa299ff1709f7dab2a3534cbb909f9f12ef4a2f 100644 (file)
@@ -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 $".
 .\"
index c87287a12819cb34a62c6380fb9493a46a597d8c..1d2ea933d79e4e2f322c7a154ac9e3f53b017700 100644 (file)
@@ -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 $".
 .\"
index 3ba0bcc0ff47bff421d32128a2c3e828cd655036..32f137e727b97a2a354e3c5b96eec209951459cf 100644 (file)
@@ -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 $".
index 7ffa912213e74f53c11811b2d7730a41de108265..337c57e0d608e6e17793524ac1a272cac88f2105 100644 (file)
@@ -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 $".
 .\"
index 4de16f6face76c7d51489d4d2de6ce9e7c455dc6..3d8c292da0411dacca8af0b3ff85d5dd90f4d8e4 100644 (file)
@@ -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 $".
 .\"
index 311c71808cf088639f430b0c5eff82c44a8ec061..4757c5d72ea4c3925ed1984dd2b3e32bbd0aefca 100644 (file)
@@ -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 $".
 .\"
index 504f662f6cfcbfbbfb2f3fd7223d90f12c719076..04ef610c74e3c37c807af7568c8c3131749dbe8e 100644 (file)
@@ -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$".
 .\"
index 77a280c9a7d54c65969570239a457596e77190c5..c2a3fd052e88c15e9436bdf19f7ee8ab58e679b2 100644 (file)
@@ -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 $".
 .\"
index 3ae537d3d46920a714f4177492165601caae0851..0f8605227c30f072500a42b3e0ed7e65737156b2 100644 (file)
@@ -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 $".
 .\"
index d3c3cb31f62bb4a5cbca5882ebde31d68240efd6..1075800ac598ad5b17f4e26eac1d388fa3126811 100644 (file)
@@ -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 $".
 .\"
index 9196190a799c7e0e50adab9e1fd469fa2e76d4f5..1ca8939bcf2ab02876ac6b58231b22b570ab6331 100644 (file)
@@ -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 $".
 .\"
index b4f572cbd4464b99fb6904de7126943089d74c16..34cf5f0b54eeca4448a9b0d478553bc03b8e6620 100644 (file)
@@ -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 $".
 .\"
index 480c81998b7ce272f349e4d616210b4ec2690ebb..b355b0b8fc9fd11d3a7118277de98408d4213bdd 100644 (file)
@@ -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 $".
 .\"
index 66594e28110838e5071c47c5ce1920cec0c36801..94b21b46b2b0fa9a5050fcb294d1f6b92330ea6a 100644 (file)
@@ -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 $".
 .\"
index 93e89e0b7c5771625571e51f456de871090fa30d..15fd92db2dc0ff28ab57aee0c4a99dcbfe220baf 100644 (file)
@@ -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 $".
 .\"
index 8bbe47b5627f142de06d8070b7f79ee0e8107c3e..98e59628e2b123bc696d3050325e2ea84d628d78 100644 (file)
@@ -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 $".
 .\"
index e91bef0a54735b99f1448a7ad69deaeed2953572..c8de2af1ca25368895fbc18c899bbdbe7fa5bbcb 100644 (file)
@@ -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 $".
 .\"
index c5441d44c91b9e759b6ddd6d380ea701563f1c95..2eb87f43d1ff9fc5a9916286a9f44f3e5789ff74 100644 (file)
@@ -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 $".
 .\"
index 33e519cf941f95e32dc37282a7bd8e1dba946106..ba831f5aeea6123565283189ac091e4a5146072d 100644 (file)
@@ -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 $".
 .\"
index 79b2c4b8af59883960e30ea5bce1d63724a7c981..88aad214082a0ea3fbb8f75c6d3f9d637a346565 100644 (file)
@@ -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 $".
 .\"
index 417b3ba7462e2a131518f3676d14ebef8eeec62b..0072a383aa04a96e55d4febc1f08b49b904cea4d 100644 (file)
@@ -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 $".
 .\"
index ce785907fa435e00e8e97b95cccacbc94ad7ca57..ba387e562474201d2c2a497e2548af15d8385c1d 100644 (file)
@@ -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 $".
 .\"
index 618b5af3924fe22f5020c44fa97521763967b76d..bf0489bfd169d9360c5d161a6b50bc9afce9b466 100644 (file)
@@ -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 $".
 .\"
index de4f951293ffbed2ffbc098507a5597ae2c5d662..1c67343066573bfb6a1dd6e736c4cd9175f05677 100644 (file)
@@ -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 $".
 .\"
index 7135c364ce36ba4e75a846730096afb1c92ccd9d..1f3e49191afe2be2889246f2bbe13c973f909dcf 100644 (file)
@@ -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 $".
 .\"
index 85db4346ba7fb751af81c3350ad515531e4e82a2..a9e1a0294840c1845d2f1eb959b476e9b70230e5 100644 (file)
@@ -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 $".
 .\"
index 45bb02e1aeda91a8a14cb7ff3421b4b27f3b9515..ccbd0ca021e6ddd189f0d22683f598ef306ac281 100644 (file)
@@ -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 $".
 .\"
index 205973e0f50412e7fa988f7dd5b6961a8814646e..04efb61a1d4deb437704ce9e98228f144007a032 100644 (file)
@@ -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 $".
 .\"
index 04717eb87bac01276de808049caea0907bf194e1..6171e03b90c817b2252104fab6c49311346e3e4f 100644 (file)
@@ -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 $".
 .\"
index ab653513671fa7365d5bedd436b41979942242d8..0d0f4def570adcda64c8489f3f3fa1ac1b103cfd 100644 (file)
@@ -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 $".
 .\"
index 266ecf3b716cffea48c19f33e9feb7ee94d62750..3c1c823856dad437e88cdfcb10dc68ad6f53d624 100644 (file)
@@ -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 $".
 .\"
index e473ad0786bf6f3ee93cb86dd8ae55f23c287116..87e039abd7c4b9ee06f021c177602fedc01944a8 100644 (file)
@@ -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 $".
 .\"
index 6e07e4f835402681443b21b3a4d6f9fc3343be1d..c9b22430fb1b23d0f59e23f7e9cae1d4b8ae3c56 100644 (file)
@@ -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
index 598b9112c50d4ad0902a49ab6c00196d5cb41f38..55c85b3c04dd070d0e65c5b99d313bfc75d83778 100644 (file)
@@ -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)
 
 
 #
index ec69eb86748b7905d1cd686bd2bdc385170eee57..279262d32f74d9fdba3b6fb0bae120a7eb07525e 100644 (file)
@@ -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
index c8846001fb1c9886c9d50a695c0d3da8d18428e4..596547f5e3507da95089c1ad912777d5018348b8 100644 (file)
@@ -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)
 
 
 #
index b126a08d912df73b0548bb372392b2e0f7537683..5e53c85778445cff5f7421172d02812410164730 100644 (file)
@@ -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);
 }
 
 
index dfe7b5b0e4e06351f0b68c36f766c5586f4f8120..1b551c09e078134857c778df051423d6044dfd25 100644 (file)
@@ -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))
       {
index 2518f211f4e9686d5b7fda4b5714d7dfe634547c..668da3ee197f1cf8e8049451ba832a7f9603b60a 100644 (file)
@@ -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.
  */
index f86e967a30f1d5fcff04e308bc7d118b84d4e5d9..9bdacc3266756f151f39020bd3b4579d65efcb2b 100644 (file)
@@ -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;
 
index 6685d34342792454ef7a5c015a044d9eb9c4f248..e4029cd1cf90acab745d487c3841b9235f4039ed 100644 (file)
@@ -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
  *
  * 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 <cups/dir.h>
+#include <cups/pwgmedia.h>
 
 
 /*
@@ -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);
     }
 
    /*
index 3eface432e3b2ce31458b219040c261c2dd24b83..cf14e223b9cbb76b7b62e7e1c18b1d1ee5467bfc 100644 (file)
@@ -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("");
     }
index 23c1e5b292abd0060a9d32dc3824e44b9b03e926..c334e99eb68082a753c93479bef3bc02031eda37 100644 (file)
@@ -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 ++;
        }
index 18ed41ae174a1e8c7bb1eb38e38b771b06a738f7..9ae30e27b132f4d45593d1373f4ce22f9b3e5e39 100644 (file)
@@ -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)
 
 
 #
index e9813372b6b6b4bfe141dba62ec5cc1082e30933..448f65fc5a77afe6276a96099b48999bbf480fa0 100644 (file)
@@ -2,7 +2,7 @@
 <TR><TD>&nbsp;</TD></TR>
 <TR><TD CLASS="trailer">Common UNIX Printing System, CUPS, y el logo de CUPS son
 marcas registradas de <A HREF="http://www.apple.com">Apple, Inc.</A> 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.</TD></TR>
 </TABLE>
 </BODY>
index 6ae8558664f2f191ced87cf14470826771acd07c..9c98c545907dec0a1955984d04a93deb9d028ece 100644 (file)
@@ -2,7 +2,7 @@
 <TR><TD>&nbsp;</TD></TR>
 <TR><TD CLASS="trailer">The Common UNIX Printing System, CUPS, and the CUPS
 logo are trademarks of <A HREF="http://www.apple.com">Apple Inc.</A> CUPS is
-copyright 2007-2008 Apple Inc. All rights reserved.</TD></TR>
+copyright 2007-2009 Apple Inc. All rights reserved.</TD></TR>
 </TABLE>
 </BODY>
 </HTML>
index d525485719cabbf5c1773ca88172b863750b274c..dfb00880133569d308400c3c1fba880850f525d5 100644 (file)
@@ -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)
 
 
 #
index 0123470fb7725b6d4a4d57eaf1801d0da43418c2..bf44c17d542bd508129c5893a8d087f6391df2b0 100755 (executable)
@@ -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 "<P>PASS: page_log formatted correctly.</P>" >>$strfile
 else