]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.4svn-r8177 (tentative CUPS 1.4b2)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 11 Dec 2008 01:40:30 +0000 (01:40 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 11 Dec 2008 01:40:30 +0000 (01:40 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1090 a1ca3aef-8c08-0410-bb20-df032aa958be

63 files changed:
CHANGES.txt
backend/ipp.c
backend/lpd.c
backend/socket.c
cups/Makefile
cups/adminutil.c
cups/array.c
cups/attr.c
cups/auth.c
cups/backchannel.c
cups/backend.c
cups/cups.h
cups/custom.c
cups/dest.c
cups/dir.c
cups/emit.c
cups/encode.c
cups/file.c
cups/getputfile.c
cups/http-addr.c
cups/http-addrlist.c
cups/http-private.h
cups/http-support.c
cups/http.c
cups/http.h
cups/ipp-support.c
cups/ipp.c
cups/ipp.h
cups/language.h
cups/libcups.exp
cups/libcups_s.exp
cups/localize.c
cups/mark.c
cups/notify.c
cups/options.c
cups/page.c
cups/ppd.c
cups/ppd.h
cups/raster.h
cups/request.c
cups/sidechannel.c
cups/snmp.c
cups/string.c
cups/string.h
cups/tempfile.c
cups/testadmin.c
cups/testcups.c
cups/util.c
doc/help/api-array.html
doc/help/api-cups.html
doc/help/api-filedir.html
doc/help/api-filter.html
doc/help/api-httpipp.html
doc/help/api-overview.html
doc/help/api-ppd.html
doc/help/api-raster.html
doc/help/postscript-driver.html
doc/help/ppd-compiler.html
doc/help/raster-driver.html
filter/image.h
scheduler/ipp.c
scheduler/printers.c
test/run-stp-tests.sh

index 7bf8ca79d48aa4f03d0cc8a276e080464914a706..a1190f7c75b54b0133681c61bab4f5a8ebf83012 100644 (file)
@@ -1,9 +1,17 @@
-CHANGES.txt - 2008-12-08
+CHANGES.txt - 2008-12-10
 ------------------------
 
 CHANGES IN CUPS V1.4b2
 
        - Documentation updates (STR #2983, STR #2998, STR #3021)
+       - The cupsGetPPD* APIs now create symlinks to local PPD files
+         rather than copying them whenever possible.
+       - Various performance optimizations in the string pool, dests, and
+         options implementations.
+       - The cupsGetDests* APIs now return the marker and printer-commands
+         attributes.
+       - Side-channel SNMP lookups would not work when cupsSNMPSupplies
+         was set to False in the PPD file.
        - Localized the device descriptions for the SCSI, serial,
          and network backends (STR #3014)
        - Added a Spanish localization (STR #3015)
index b06aba7755ea58cc63a0a101a3945a083f7769be..78b3ddb3bba0b0d50a9c510ab0f4e9df90a450c9 100644 (file)
@@ -102,7 +102,8 @@ main(int  argc,                             /* I - Number of command-line args */
                sep;                    /* Separator character */
   int          snmp_fd,                /* SNMP socket */
                start_count,            /* Page count via SNMP at start */
-               page_count;             /* Page count via SNMP */
+               page_count,             /* Page count via SNMP */
+               have_supplies;          /* Printer supports supply levels? */
   int          num_files;              /* Number of files to print */
   char         **files,                /* Files to print */
                *filename;              /* Pointer to single filename */
@@ -630,19 +631,10 @@ main(int  argc,                           /* I - Number of command-line args */
   */
 
   if ((snmp_fd = _cupsSNMPOpen(http->hostaddr->addr.sa_family)) >= 0)
-  {
-    if (backendSNMPSupplies(snmp_fd, http->hostaddr, &start_count, NULL))
-    {
-     /*
-      * No, close it...
-      */
-
-      _cupsSNMPClose(snmp_fd);
-      snmp_fd = -1;
-    }
-  }
+    have_supplies = !backendSNMPSupplies(snmp_fd, http->hostaddr, &start_count,
+                                         NULL);
   else
-    start_count = 0;
+    have_supplies = start_count = 0;
 
  /*
   * Build a URI for the printer and fill the standard IPP attributes for
@@ -1258,7 +1250,7 @@ main(int  argc,                           /* I - Number of command-line args */
   * Collect the final page count as needed...
   */
 
-  if (snmp_fd >= 0 && 
+  if (have_supplies && 
       !backendSNMPSupplies(snmp_fd, http->hostaddr, &page_count, NULL) &&
       page_count > start_count)
     fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
index 4f9b06f87e0f9eee56565e60087a8b7590b44dc6..b39394c611739e0192ea7e76243826c400854a1a 100644 (file)
@@ -637,7 +637,8 @@ lpd_queue(const char *hostname,             /* I - Host to connect to */
   char                 addrname[256];  /* Address name */
   http_addrlist_t      *addrlist,      /* Address list */
                        *addr;          /* Socket address */
-  int                  snmp_fd;        /* SNMP socket */
+  int                  snmp_fd,        /* SNMP socket */
+                       have_supplies;  /* Printer supports supply levels? */
   int                  copy;           /* Copies written */
   time_t               start_time;     /* Time of first connect */
   int                  recoverable;    /* Recoverable error shown? */
@@ -884,17 +885,9 @@ lpd_queue(const char *hostname,            /* I - Host to connect to */
     */
 
     if ((snmp_fd = _cupsSNMPOpen(addr->addr.addr.sa_family)) >= 0)
-    {
-      if (backendSNMPSupplies(snmp_fd, &(addr->addr), NULL, NULL))
-      {
-       /*
-       * No, close it...
-       */
-
-       _cupsSNMPClose(snmp_fd);
-       snmp_fd = -1;
-      }
-    }
+      have_supplies = !backendSNMPSupplies(snmp_fd, &(addr->addr), NULL, NULL);
+    else
+      have_supplies = 0;
 
    /*
     * Check for side-channel requests...
@@ -1186,7 +1179,7 @@ lpd_queue(const char *hostname,           /* I - Host to connect to */
     * Collect the final supply levels as needed...
     */
 
-    if (snmp_fd >= 0)
+    if (have_supplies)
       backendSNMPSupplies(snmp_fd, &(addr->addr), NULL, NULL);
 
    /*
index ec6368d942b025f7a6ab0eb3ed60642c4d0c6853..09137f9580d8296b6d03c5f0389f9fba9f14ce5c 100644 (file)
@@ -88,7 +88,8 @@ main(int  argc,                               /* I - Number of command-line arguments (6 or 7) */
   char         addrname[256];          /* Address name */
   int          snmp_fd,                /* SNMP socket */
                start_count,            /* Page count via SNMP at start */
-               page_count;             /* Page count via SNMP */
+               page_count,             /* Page count via SNMP */
+               have_supplies;          /* Printer supports supply levels? */
   ssize_t      tbytes;                 /* Total number of bytes written */
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
   struct sigaction action;             /* Actions for POSIX signals */
@@ -372,18 +373,11 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
 
   if ((snmp_fd = _cupsSNMPOpen(addr->addr.addr.sa_family)) >= 0)
   {
-    if (backendSNMPSupplies(snmp_fd, &(addr->addr), &start_count, NULL))
-    {
-     /*
-      * No, close it...
-      */
-
-      _cupsSNMPClose(snmp_fd);
-      snmp_fd = -1;
-    }
+    have_supplies = !backendSNMPSupplies(snmp_fd, &(addr->addr), &start_count,
+                                         NULL);
   }
   else
-    start_count = 0;
+    have_supplies = start_count = 0;
 
  /*
   * Print everything...
@@ -441,7 +435,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
   * Collect the final page count as needed...
   */
 
-  if (snmp_fd >= 0 && 
+  if (have_supplies && 
       !backendSNMPSupplies(snmp_fd, &(addr->addr), &page_count, NULL) &&
       page_count > start_count)
     fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
index 9a0a80638e247a99dc42afdd7068cfc48c501408..8674389640d3a15ea672577aba53fbf6dc34fa91 100644 (file)
@@ -544,7 +544,7 @@ apihelp:
        mxmldoc --section "Programming" --title "CUPS API" \
                --css ../doc/cups-printable.css \
                --header api-cups.header --intro api-cups.shtml \
-               cups.h dest.c language.c notify.c \
+               cups.h adminutil.c dest.c language.c notify.c \
                options.c tempfile.c usersys.c \
                util.c >../doc/help/api-cups.html
        mxmldoc --section "Programming" --title "File and Directory APIs" \
@@ -585,7 +585,7 @@ framedhelp:
                --section "Programming" --title "CUPS API" \
                --css ../doc/cups-printable.css \
                --header api-cups.header --intro api-cups.shtml \
-               cups.h dest.c language.c notify.c \
+               cups.h adminutil.c dest.c language.c notify.c \
                options.c tempfile.c usersys.c \
                util.c
        mxmldoc --framed api-filedir \
@@ -626,7 +626,7 @@ docsets:
        ../tools/makedocset --docset org.cups.cups.docset \
                --title "CUPS API" \
                --header api-cups.header --intro api-cups.shtml \
-               cups.h dest.c language.c notify.c \
+               cups.h adminutil.c dest.c language.c notify.c \
                options.c tempfile.c usersys.c \
                util.c
        ../tools/makedocset --docset org.cups.filedir.docset \
index 4d4eba8f1d2e72a59b77bc12eff572d5e6cdd0ef..8ef12ad5bb2b1d75f011db63e6d4d3f99953c8ba 100644 (file)
@@ -75,6 +75,8 @@ static void           write_option(cups_file_t *dstfp, int order,
 
 /*
  * 'cupsAdminCreateWindowsPPD()' - Create the Windows PPD file for a printer.
+ *
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 char *                                 /* O - PPD file or NULL */
@@ -401,6 +403,8 @@ cupsAdminCreateWindowsPPD(
 
 /*
  * 'cupsAdminExportSamba()' - Export a printer to Samba.
+ *
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 1 on success, 0 on failure */
@@ -850,7 +854,7 @@ cupsAdminExportSamba(
  * The returned settings should be freed with cupsFreeOptions() when
  * you are done with them.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 int                                    /* O - 1 on success, 0 on failure */
@@ -1193,7 +1197,7 @@ _cupsAdminGetServerSettings(
 /*
  * 'cupsAdminSetServerSettings()' - Set settings on the server.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 int                                    /* O - 1 on success, 0 on failure */
index ae45eeba09a5739a9444b90eef396a44b90ad835..4f40d7f4a30b85e74fca6fc228b9abdf7a710f28 100644 (file)
@@ -102,7 +102,7 @@ static int  cups_array_find(cups_array_t *a, void *e, int prev, int *rdiff);
  * appended at the end of the run of identical elements.  For unsorted arrays,
  * the element is appended to the end of the array.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 1 on success, 0 on failure */
@@ -136,7 +136,7 @@ cupsArrayAdd(cups_array_t *a,               /* I - Array */
  * The caller is responsible for freeing the memory used by the
  * elements themselves.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void
@@ -165,7 +165,7 @@ cupsArrayClear(cups_array_t *a)             /* I - Array */
 /*
  * 'cupsArrayCount()' - Get the number of elements in the array.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - Number of elements */
@@ -192,7 +192,7 @@ cupsArrayCount(cups_array_t *a)             /* I - Array */
  * The current element is undefined until you call @link cupsArrayFind@,
  * @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void *                                 /* O - Element */
@@ -222,7 +222,7 @@ cupsArrayCurrent(cups_array_t *a)   /* I - Array */
  * The caller is responsible for freeing the memory used by the
  * elements themselves.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void
@@ -253,7 +253,7 @@ cupsArrayDelete(cups_array_t *a)    /* I - Array */
 /*
  * 'cupsArrayDup()' - Duplicate the array.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_array_t *                         /* O - Duplicate array */
@@ -319,7 +319,7 @@ cupsArrayDup(cups_array_t *a)               /* I - Array */
 /*
  * 'cupsArrayFind()' - Find an element in the array.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void *                                 /* O - Element found or @code NULL@ */
@@ -414,7 +414,7 @@ cupsArrayFind(cups_array_t *a,              /* I - Array */
 /*
  * 'cupsArrayFirst()' - Get the first element in the array.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void *                                 /* O - First element or @code NULL@ if the array is empty */
@@ -443,7 +443,7 @@ cupsArrayFirst(cups_array_t *a)             /* I - Array */
  * The current element is undefined until you call @link cupsArrayFind@,
  * @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 int                                    /* O - Index of the current element, starting at 0 */
@@ -459,7 +459,7 @@ cupsArrayGetIndex(cups_array_t *a)  /* I - Array */
 /*
  * 'cupsArrayGetInsert()' - Get the index of the last inserted element.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 int                                    /* O - Index of the last inserted element, starting at 0 */
@@ -475,7 +475,7 @@ cupsArrayGetInsert(cups_array_t *a) /* I - Array */
 /*
  * 'cupsArrayIndex()' - Get the N-th element in the array.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void *                                 /* O - N-th element or @code NULL@ */
@@ -498,7 +498,7 @@ cupsArrayIndex(cups_array_t *a,             /* I - Array */
  * inserted at the beginning of the run of identical elements.  For unsorted
  * arrays, the element is inserted at the beginning of the array.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on failure, 1 on success */
@@ -528,7 +528,7 @@ cupsArrayInsert(cups_array_t *a,    /* I - Array */
 /*
  * 'cupsArrayLast()' - Get the last element in the array.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void *                                 /* O - Last element or @code NULL@ if the array is empty */
@@ -559,7 +559,7 @@ cupsArrayLast(cups_array_t *a)              /* I - Array */
  * data pointer argument can safely be omitted when not required so functions
  * like @code strcmp@ can be used for sorted string arrays.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_array_t *                         /* O - Array */
@@ -581,7 +581,7 @@ cupsArrayNew(cups_array_func_t f,   /* I - Comparison function or @code NULL@ for
  * The hash function ("h") is used to implement cached lookups with the
  * specified hash size ("hsize").
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 cups_array_t *                         /* O - Array */
@@ -636,7 +636,7 @@ cupsArrayNew2(cups_array_func_t  f, /* I - Comparison function or @code NULL@ fo
  * @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@
  * to set the current element.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void *                                 /* O - Next element or @code NULL@ */
@@ -669,7 +669,7 @@ cupsArrayNext(cups_array_t *a)              /* I - Array */
  * @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@
  * to set the current element.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void *                                 /* O - Previous element or @code NULL@ */
@@ -702,7 +702,7 @@ cupsArrayPrev(cups_array_t *a)              /* I - Array */
  * The caller is responsible for freeing the memory used by the
  * removed element.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 1 on success, 0 on failure */
@@ -764,7 +764,7 @@ cupsArrayRemove(cups_array_t *a,    /* I - Array */
 /*
  * 'cupsArrayRestore()' - Reset the current element to the last @link cupsArraySave@.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void *                                 /* O - New current element */
@@ -795,7 +795,7 @@ cupsArrayRestore(cups_array_t *a)   /* I - Array */
  *
  * The save/restore stack is guaranteed to be at least 32 elements deep.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 1 on success, 0 on failure */
@@ -817,7 +817,7 @@ cupsArraySave(cups_array_t *a)              /* I - Array */
 /*
  * 'cupsArrayUserData()' - Return the user data for an array.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void *                                 /* O - User data */
@@ -833,7 +833,7 @@ cupsArrayUserData(cups_array_t *a)  /* I - Array */
 /*
  * 'cups_array_add()' - Insert or append an element to the array...
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 static int                             /* O - 1 on success, 0 on failure */
@@ -1003,8 +1003,6 @@ cups_array_add(cups_array_t *a,           /* I - Array */
 
 /*
  * 'cups_array_find()' - Find an element in the array...
- *
- * @since CUPS 1.2@
  */
 
 static int                             /* O - Index of match */
index 903e4970d7ddd0149d0a63f691c50a2cff751bf0..f7b1a76b82c6e946fc9f8a761880c15666f97506 100644 (file)
@@ -32,7 +32,7 @@
 /*
  * 'ppdFindAttr()' - Find the first matching attribute.
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 ppd_attr_t *                           /* O - Attribute or @code NULL@ if not found */
@@ -89,7 +89,7 @@ ppdFindAttr(ppd_file_t *ppd,          /* I - PPD file data */
 /*
  * 'ppdFindNextAttr()' - Find the next matching attribute.
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 ppd_attr_t *                           /* O - Attribute or @code NULL@ if not found */
index d97029e137030445635506116199e97f737523c3..332301c8169b1ed4e9df250b239bd6812cafa487 100644 (file)
@@ -79,7 +79,7 @@ static int    cups_local_auth(http_t *http);
  * This function should be called in response to a @code HTTP_UNAUTHORIZED@
  * status, prior to resubmitting your request.
  *
- * @since CUPS 1.1.20@
+ * @since CUPS 1.1.20/Mac OS X 10.4@
  */
 
 int                                    /* O - 0 on success, -1 on error */
index c2b53bb493b876df4f41e7cb94fe21c813749b6b..23caace80808d0df76a27526de666ae11ead9933 100644 (file)
@@ -50,7 +50,7 @@ static void   cups_setup(fd_set *set, struct timeval *tval,
  * parameter controls how many seconds to wait for the data - use 0.0 to
  * return immediately if there is no data, -1.0 to wait for data indefinitely.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ssize_t                                        /* O - Bytes read or -1 on error */
@@ -101,7 +101,7 @@ cupsBackChannelRead(char   *buffer, /* I - Buffer to read into */
  * 0.0 to return immediately if the data cannot be written, -1.0 to wait
  * indefinitely.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ssize_t                                        /* O - Bytes written or -1 on error */
index ca4fad2f3cb3076c13cb7fd7f1c3d2d77e650090..fa7d056458e074b5ad10e7a8fcd406d40828922d 100644 (file)
@@ -44,6 +44,8 @@ static void   quote_string(const char *s);
  * function returns the device URI passed in the DEVICE_URI environment
  * variable or the device URI passed in argv[0], whichever is found
  * first.
+ *
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 const char *                           /* O - Device URI or @code NULL@ */
@@ -72,6 +74,8 @@ cupsBackendDeviceURI(char **argv)     /* I - Command-line arguments */
  * This function writes a single device line to stdout for a backend.
  * It handles quoting of special characters in the device-make-and-model,
  * device-info, device-id, and device-location strings.
+ *
+ * @since CUPS 1.4@
  */
 
 void
index 03ca440546198adb98a7adb417f2f433afb18e1a..6d3ca29a468859293213ad9b416f333a8fd01bfb 100644 (file)
@@ -59,7 +59,7 @@ extern "C" {
  * Constants...
  */
 
-#  define CUPS_VERSION         1.0399
+#  define CUPS_VERSION         1.0400
 #  define CUPS_VERSION_MAJOR   1
 #  define CUPS_VERSION_MINOR   4
 #  define CUPS_VERSION_PATCH   -1
@@ -112,11 +112,11 @@ enum cups_ptype_e                 /**** Printer type/capability bit constants ****/
   CUPS_PRINTER_DEFAULT = 0x20000,      /* Default printer on network */
   CUPS_PRINTER_FAX = 0x40000,          /* Fax queue */
   CUPS_PRINTER_REJECTING = 0x80000,    /* Printer is rejecting jobs */
-  CUPS_PRINTER_DELETE = 0x100000,      /* Delete printer @since CUPS 1.2@ */
-  CUPS_PRINTER_NOT_SHARED = 0x200000,  /* Printer is not shared @since CUPS 1.2@ */
-  CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication @since CUPS 1.2@ */
-  CUPS_PRINTER_COMMANDS = 0x800000,    /* Printer supports maintenance commands @since CUPS 1.2@ */
-  CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered and added @since CUPS 1.3@ */
+  CUPS_PRINTER_DELETE = 0x100000,      /* Delete printer @since CUPS 1.2/Mac OS X 10.5@ */
+  CUPS_PRINTER_NOT_SHARED = 0x200000,  /* Printer is not shared @since CUPS 1.2/Mac OS X 10.5@ */
+  CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication @since CUPS 1.2/Mac OS X 10.5@ */
+  CUPS_PRINTER_COMMANDS = 0x800000,    /* Printer supports maintenance commands @since CUPS 1.2/Mac OS X 10.5@ */
+  CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered and added @since CUPS 1.3/Mac OS X 10.5@ */
   CUPS_PRINTER_OPTIONS = 0x6fffc       /* ~(CLASS | REMOTE | IMPLICIT | DEFAULT | FAX | REJECTING | DELETE | NOT_SHARED | AUTHENTICATED | COMMANDS | DISCOVERED) @private@ */
 };
 
index 92bdcdc905ac49d08a3adaf98b17c70d32a13f0c..7ca3a900ad128b5df5ff285a33b6e64ebedd9078 100644 (file)
@@ -42,7 +42,7 @@
 /*
  * 'ppdFindCustomOption()' - Find a custom option.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ppd_coption_t *                                /* O - Custom option or NULL */
@@ -63,7 +63,7 @@ ppdFindCustomOption(ppd_file_t *ppd,  /* I - PPD file */
 /*
  * 'ppdFindCustomParam()' - Find a parameter for a custom option.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ppd_cparam_t *                         /* O - Custom parameter or NULL */
@@ -84,7 +84,7 @@ ppdFindCustomParam(ppd_coption_t *opt,        /* I - Custom option */
 /*
  * 'ppdFirstCustomParam()' - Return the first parameter for a custom option.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ppd_cparam_t *                         /* O - Custom parameter or NULL */
@@ -100,7 +100,7 @@ ppdFirstCustomParam(ppd_coption_t *opt)     /* I - Custom option */
 /*
  * 'ppdNextCustomParam()' - Return the next parameter for a custom option.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ppd_cparam_t *                         /* O - Custom parameter or NULL */
index 75513d87a36b3af30110940b3323bf34105266db..5cdf5975d51e8dc298d804a762557745270de302 100644 (file)
  *                           server.
  *   cupsSetDests2()       - Save the list of destinations for the specified
  *                           server.
- *   appleCopyLocations()  - Get the location history array.
+ *   appleCopyLocations()  - Copy the location history array.
  *   appleCopyNetwork()    - Get the network ID for the current location.
  *   appleGetDefault()     - Get the default printer for this location.
+ *   appleGetPaperSize()   - Get the default paper size.
  *   appleGetPrinter()     - Get a printer from the history array.
  *   appleSetDefault()     - Set the default printer for this location.
  *   appleUseLastPrinter() - Get the default printer preference value.
+ *   cups_add_dest()       - Add a destination to the array.
+ *   cups_compare_dests()  - Compare two destinations.
+ *   cups_find_dest()      - Find a destination using a binary search.
  *   cups_get_default()    - Get the default destination from an lpoptions file.
  *   cups_get_dests()      - Get destinations from a file.
  *   cups_get_sdests()     - Get destinations from a server.
+ *   cups_make_string()    - Make a comma-separated string of values from an IPP
+ *                           attribute.
  */
 
 /*
@@ -60,6 +66,7 @@
 #  include <sys/cdefs.h>
 #  include <CoreFoundation/CoreFoundation.h>
 #  include <SystemConfiguration/SystemConfiguration.h>
+#  define kDefaultPaperIDKey CFSTR("DefaultPaperID")
 #  define kLocationHistoryArrayKey CFSTR("kLocationHistoryArrayKeyTMP")
 #  define kLocationNetworkKey CFSTR("kLocationNetworkKey")
 #  define kLocationPrinterIDKey CFSTR("kLocationPrinterIDKey")
 static CFArrayRef appleCopyLocations(void);
 static CFStringRef appleCopyNetwork(void);
 static char    *appleGetDefault(char *name, int namesize);
+static char    *appleGetPaperSize(char *name, int namesize);
 static CFStringRef appleGetPrinter(CFArrayRef locations, CFStringRef network,
                                   CFIndex *locindex);
 static void    appleSetDefault(const char *name);
 static int     appleUseLastPrinter(void);
 #endif /* __APPLE__ */
+static cups_dest_t *cups_add_dest(const char *name, const char *instance,
+                                 int *num_dests, cups_dest_t **dests);
+static int     cups_compare_dests(cups_dest_t *a, cups_dest_t *b);
+static int     cups_find_dest(const char *name, const char *instance,
+                              int num_dests, cups_dest_t *dests, int prev,
+                              int *rdiff);
 static char    *cups_get_default(const char *filename, char *namebuf,
-                                   size_t namesize, const char **instance);
+                                 size_t namesize, const char **instance);
 static int     cups_get_dests(const char *filename, const char *match_name,
                               const char *match_inst, int num_dests,
                               cups_dest_t **dests);
 static int     cups_get_sdests(http_t *http, ipp_op_t op, const char *name,
                                int num_dests, cups_dest_t **dests);
+static char    *cups_make_string(ipp_attribute_t *attr, char *buffer,
+                                 size_t bufsize);
 
 
 /*
@@ -114,77 +130,46 @@ cupsAddDest(const char  *name,            /* I  - Destination name */
   int          i;                      /* Looping var */
   cups_dest_t  *dest;                  /* Destination pointer */
   cups_dest_t  *parent;                /* Parent destination */
-  cups_option_t        *option;                /* Current option */
+  cups_option_t        *doption,               /* Current destination option */
+               *poption;               /* Current parent option */
 
 
   if (!name || !dests)
     return (0);
 
-  if (cupsGetDest(name, instance, num_dests, *dests))
-    return (num_dests);
-
- /*
-  * Add new destination...
-  */
-
-  if (num_dests == 0)
-    dest = malloc(sizeof(cups_dest_t));
-  else
-    dest = realloc(*dests, sizeof(cups_dest_t) * (num_dests + 1));
-
-  if (dest == NULL)
-    return (num_dests);
-
-  *dests = dest;
-
- /*
-  * Find where to insert the destination...
-  */
-
-  for (i = num_dests; i > 0; i --, dest ++)
-    if (strcasecmp(name, dest->name) < 0)
-      break;
-    else if (!instance && dest->instance)
-      break;
-    else if (!strcasecmp(name, dest->name) &&
-             instance  && dest->instance &&
-             strcasecmp(instance, dest->instance) < 0)
-      break;
-
-  if (i > 0)
-    memmove(dest + 1, dest, i * sizeof(cups_dest_t));
+  if (!cupsGetDest(name, instance, num_dests, *dests))
+  {
+    if (instance &&
+        (parent = cupsGetDest(name, NULL, num_dests, *dests)) == NULL)
+      return (num_dests);
 
- /*
-  * Initialize the destination...
-  */
+    dest = cups_add_dest(name, instance, &num_dests, dests);
 
-  dest->name        = _cupsStrAlloc(name);
-  dest->is_default  = 0;
-  dest->num_options = 0;
-  dest->options     = (cups_option_t *)0;
+    if (instance && parent && parent->num_options > 0)
+    {
+     /*
+      * Copy options from parent...
+      */
 
-  if (!instance)
-    dest->instance = NULL;
-  else
-  {
-   /*
-    * Copy options from the primary instance...
-    */
+      dest->options = calloc(sizeof(cups_option_t), parent->num_options);
 
-    dest->instance = _cupsStrAlloc(instance);
+      if (dest->options)
+      {
+        dest->num_options = parent->num_options;
 
-    if ((parent = cupsGetDest(name, NULL, num_dests + 1, *dests)) != NULL)
-    {
-      for (i = parent->num_options, option = parent->options;
-           i > 0;
-          i --, option ++)
-       dest->num_options = cupsAddOption(option->name, option->value,
-                                         dest->num_options,
-                                         &(dest->options));
+       for (i = dest->num_options, doption = dest->options,
+                poption = parent->options;
+            i > 0;
+            i --, doption ++, poption ++)
+       {
+         doption->name  = _cupsStrRetain(poption->name);
+         doption->value = _cupsStrRetain(poption->value);
+       }
+      }
     }
   }
 
-  return (num_dests + 1);
+  return (num_dests);
 }
 
 
@@ -228,7 +213,8 @@ cupsGetDest(const char  *name,              /* I - Destination name or @code NULL@ for the d
             int         num_dests,     /* I - Number of destinations */
             cups_dest_t *dests)                /* I - Destinations */
 {
-  int  comp;                           /* Result of comparison */
+  int  diff,                           /* Result of comparison */
+       match;                          /* Matching index */
 
 
   if (num_dests <= 0 || !dests)
@@ -255,21 +241,10 @@ cupsGetDest(const char  *name,            /* I - Destination name or @code NULL@ for the d
     * Lookup name and optionally the instance...
     */
 
-    while (num_dests > 0)
-    {
-      if ((comp = strcasecmp(name, dests->name)) < 0)
-       return (NULL);
-      else if (comp == 0)
-      {
-       if ((!instance && !dests->instance) ||
-            (instance != NULL && dests->instance != NULL &&
-            !strcasecmp(instance, dests->instance)))
-         return (dests);
-      }
+    match = cups_find_dest(name, instance, num_dests, dests, -1, &diff);
 
-      num_dests --;
-      dests ++;
-    }
+    if (!diff)
+      return (dests + match);
   }
 
   return (NULL);
@@ -282,7 +257,10 @@ cupsGetDest(const char  *name,             /* I - Destination name or @code NULL@ for the d
  * Starting with CUPS 1.2, the returned list of destinations include the
  * printer-info, printer-is-accepting-jobs, printer-is-shared,
  * printer-make-and-model, printer-state, printer-state-change-time,
- * printer-state-reasons, and printer-type attributes as options.
+ * printer-state-reasons, and printer-type attributes as options.  CUPS 1.4
+ * adds the marker-change-time, marker-colors, marker-high-levels,
+ * marker-levels, marker-low-levels, marker-message, marker-names,
+ * marker-types, and printer-commands attributes as well.
  *
  * Use the @link cupsFreeDests@ function to free the destination list and
  * the @link cupsGetDest@ function to find a particular destination.
@@ -301,12 +279,15 @@ cupsGetDests(cups_dest_t **dests) /* O - Destinations */
  * Starting with CUPS 1.2, the returned list of destinations include the
  * printer-info, printer-is-accepting-jobs, printer-is-shared,
  * printer-make-and-model, printer-state, printer-state-change-time,
- * printer-state-reasons, and printer-type attributes as options.
+ * printer-state-reasons, and printer-type attributes as options.  CUPS 1.4
+ * adds the marker-change-time, marker-colors, marker-high-levels,
+ * marker-levels, marker-low-levels, marker-message, marker-names,
+ * marker-types, and printer-commands attributes as well.
  *
  * Use the @link cupsFreeDests@ function to free the destination list and
  * the @link cupsGetDest@ function to find a particular destination.
  *
- * @since CUPS 1.1.21@
+ * @since CUPS 1.1.21/Mac OS X 10.4@
  */
 
 int                                    /* O - Number of destinations */
@@ -348,8 +329,6 @@ cupsGetDests2(http_t      *http,    /* I - Connection to server or @code CUPS_HTTP_
   */
 
   num_dests = cups_get_sdests(http, CUPS_GET_PRINTERS, NULL, num_dests, dests);
-  if (cupsLastError() < IPP_REDIRECTION_OTHER_SITE)
-    num_dests = cups_get_sdests(http, CUPS_GET_CLASSES, NULL, num_dests, dests);
 
   if (cupsLastError() >= IPP_REDIRECTION_OTHER_SITE)
   {
@@ -613,7 +592,7 @@ cupsGetNamedDest(http_t     *http,  /* I - Connection to server or @code CUPS_HTT
  * @link cupsSetDests@ or @link cupsSetDests2@ functions to save the new
  * options for the user.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 int                                    /* O  - New number of destinations */
@@ -659,7 +638,7 @@ cupsRemoveDest(const char  *name,   /* I  - Destination name */
 /*
  * 'cupsSetDefaultDest()' - Set the default destination.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 void
@@ -714,7 +693,7 @@ cupsSetDests(int         num_dests, /* I - Number of destinations */
  * This function saves the destinations to /etc/cups/lpoptions when run
  * as root and ~/.cups/lpoptions when run as a normal user.
  *
- * @since CUPS 1.1.21@
+ * @since CUPS 1.1.21/Mac OS X 10.4@
  */
 
 int                                    /* O - 0 on success, -1 on error */
@@ -751,7 +730,12 @@ cupsSetDests2(http_t      *http,   /* I - Connection to server or @code CUPS_HTTP_
   */
 
   num_temps = cups_get_sdests(http, CUPS_GET_PRINTERS, NULL, 0, &temps);
-  num_temps = cups_get_sdests(http, CUPS_GET_CLASSES, NULL, num_temps, &temps);
+
+  if (cupsLastError() >= IPP_REDIRECTION_OTHER_SITE)
+  {
+    cupsFreeDests(num_temps, temps);
+    return (-1);
+  }
 
  /*
   * Figure out which file to write to...
@@ -1082,6 +1066,35 @@ appleGetDefault(char *name,              /* I - Name buffer */
 }
 
 
+/*
+ * 'appleGetPaperSize()' - Get the default paper size.
+ */
+
+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 */
+
+
+  defaultPaperID = CFPreferencesCopyAppValue(kDefaultPaperIDKey,
+                                             kPMPrintingPreferences);
+  if (!defaultPaperID ||
+      !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);
+
+  if (defaultPaperID)
+    CFRelease(defaultPaperID);
+
+  return (name);
+}
+
+
 /*
  * 'appleGetPrinter()' - Get a printer from the history array.
  */
@@ -1253,6 +1266,200 @@ appleUseLastPrinter(void)
 #endif /* __APPLE__ */
 
 
+/*
+ * 'cups_add_dest()' - Add a destination to the array.
+ *
+ * Unlike cupsAddDest(), this function does not check for duplicates.
+ */
+
+static cups_dest_t *                   /* O  - New destination */
+cups_add_dest(const char  *name,       /* I  - Name of destination */
+              const char  *instance,   /* I  - Instance or NULL */
+              int         *num_dests,  /* IO - Number of destinations */
+             cups_dest_t **dests)      /* IO - Destinations */
+{
+  int          insert,                 /* Insertion point */
+               diff;                   /* Result of comparison */
+  cups_dest_t  *dest;                  /* Destination pointer */
+
+
+ /*
+  * Add new destination...
+  */
+
+  if (*num_dests == 0)
+    dest = malloc(sizeof(cups_dest_t));
+  else
+    dest = realloc(*dests, sizeof(cups_dest_t) * (*num_dests + 1));
+
+  if (!dest)
+    return (NULL);
+
+  *dests = dest;
+
+ /*
+  * Find where to insert the destination...
+  */
+
+  if (*num_dests == 0)
+    insert = 0;
+  else
+  {
+    insert = cups_find_dest(name, instance, *num_dests, *dests, *num_dests - 1,
+                            &diff);
+
+    if (diff > 0)
+      insert ++;
+  }
+
+ /*
+  * Move the array elements as needed...
+  */
+
+  if (insert < *num_dests)
+    memmove(*dests + insert + 1, *dests + insert,
+            (*num_dests - insert) * sizeof(cups_dest_t));
+
+  (*num_dests) ++;
+
+ /*
+  * Initialize the destination...
+  */
+
+  dest              = *dests + insert;
+  dest->name        = _cupsStrAlloc(name);
+  dest->instance    = _cupsStrAlloc(instance);
+  dest->is_default  = 0;
+  dest->num_options = 0;
+  dest->options     = (cups_option_t *)0;
+
+  return (dest);
+}
+
+
+/*
+ * 'cups_compare_dests()' - Compare two destinations.
+ */
+
+static int                             /* O - Result of comparison */
+cups_compare_dests(cups_dest_t *a,     /* I - First destination */
+                   cups_dest_t *b)     /* I - Second destination */
+{
+  int  diff;                           /* Difference */
+
+
+  if ((diff = strcasecmp(a->name, b->name)) != 0)
+    return (diff);
+  else if (a->instance && b->instance)
+    return (strcasecmp(a->instance, b->instance));
+  else
+    return ((a->instance && !b->instance) - (!a->instance && b->instance));
+}
+
+
+/*
+ * 'cups_find_dest()' - Find a destination using a binary search.
+ */
+
+static int                             /* O - Index of match */
+cups_find_dest(const char  *name,      /* I - Destination name */
+               const char  *instance,  /* I - Instance or NULL */
+               int         num_dests,  /* I - Number of destinations */
+              cups_dest_t *dests,      /* I - Destinations */
+              int         prev,        /* I - Previous index */
+              int         *rdiff)      /* O - Difference of match */
+{
+  int          left,                   /* Low mark for binary search */
+               right,                  /* High mark for binary search */
+               current,                /* Current index */
+               diff;                   /* Result of comparison */
+  cups_dest_t  key;                    /* Search key */
+
+
+  key.name     = (char *)name;
+  key.instance = (char *)instance;
+
+  if (prev >= 0)
+  {
+   /*
+    * Start search on either side of previous...
+    */
+
+    if ((diff = cups_compare_dests(&key, dests + prev)) == 0 ||
+        (diff < 0 && prev == 0) ||
+       (diff > 0 && prev == (num_dests - 1)))
+    {
+      *rdiff = diff;
+      return (prev);
+    }
+    else if (diff < 0)
+    {
+     /*
+      * Start with previous on right side...
+      */
+
+      left  = 0;
+      right = prev;
+    }
+    else
+    {
+     /*
+      * Start wih previous on left side...
+      */
+
+      left  = prev;
+      right = num_dests - 1;
+    }
+  }
+  else
+  {
+   /*
+    * Start search in the middle...
+    */
+
+    left  = 0;
+    right = num_dests - 1;
+  }
+
+  do
+  {
+    current = (left + right) / 2;
+    diff    = cups_compare_dests(&key, dests + current);
+
+    if (diff == 0)
+      break;
+    else if (diff < 0)
+      right = current;
+    else
+      left = current;
+  }
+  while ((right - left) > 1);
+
+  if (diff != 0)
+  {
+   /*
+    * Check the last 1 or 2 elements...
+    */
+
+    if ((diff = cups_compare_dests(&key, dests + left)) <= 0)
+      current = left;
+    else
+    {
+      diff    = cups_compare_dests(&key, dests + right);
+      current = right;
+    }
+  }
+
+ /*
+  * Return the closest destination and the difference...
+  */
+
+  *rdiff = diff;
+
+  return (current);
+}
+
+
 /*
  * 'cups_get_default()' - Get the default destination from an lpoptions file.
  */
@@ -1500,21 +1707,13 @@ cups_get_sdests(http_t      *http,      /* I - Connection to server or CUPS_HTTP_DEFA
   ipp_t                *request,               /* IPP Request */
                *response;              /* IPP Response */
   ipp_attribute_t *attr;               /* Current attribute */
-  int          accepting,              /* printer-is-accepting-jobs attribute */
-               shared,                 /* printer-is-shared attribute */
-               state,                  /* printer-state attribute */
-               change_time,            /* printer-state-change-time attribute */
-               type;                   /* printer-type attribute */
-  const char   *info,                  /* printer-info attribute */
-               *location,              /* printer-location attribute */
-               *make_model,            /* printer-make-and-model attribute */
-               *printer_name;          /* printer-name attribute */
-  char         uri[1024],              /* printer-uri value */
-               job_sheets[1024],       /* job-sheets-default attribute */
-               auth_info_req[1024],    /* auth-info-required attribute */
-               reasons[1024];          /* printer-state-reasons attribute */
+  const char   *printer_name;          /* printer-name attribute */
+  char         uri[1024];              /* printer-uri value */
   int          num_options;            /* Number of options */
   cups_option_t        *options;               /* Options */
+#ifdef __APPLE__
+  char         media_default[41];      /* Default paper size */
+#endif /* __APPLE__ */
   char         optname[1024],          /* Option name */
                value[2048],            /* Option value */
                *ptr;                   /* Pointer into name/value */
@@ -1522,6 +1721,18 @@ cups_get_sdests(http_t      *http,       /* I - Connection to server or CUPS_HTTP_DEFA
                {
                  "auth-info-required",
                  "job-sheets-default",
+                 "marker-change-time",
+                 "marker-colors",
+                 "marker-high-levels",
+                 "marker-levels",
+                 "marker-low-levels",
+                 "marker-message",
+                 "marker-names",
+                 "marker-types",
+#ifdef __APPLE__
+                 "media-supported",
+#endif /* __APPLE__ */
+                 "printer-commands",
                  "printer-info",
                  "printer-is-accepting-jobs",
                  "printer-is-shared",
@@ -1536,13 +1747,22 @@ cups_get_sdests(http_t      *http,      /* I - Connection to server or CUPS_HTTP_DEFA
                };
 
 
+#ifdef __APPLE__
+ /*
+  * Get the default paper size...
+  */
+
+  appleGetPaperSize(media_default, sizeof(media_default));
+#endif /* __APPLE__ */
+
  /*
-  * Build a CUPS_GET_PRINTERS or CUPS_GET_CLASSES request, which require
-  * the following attributes:
+  * Build a CUPS_GET_PRINTERS or IPP_GET_PRINTER_ATTRIBUTES request, which
+  * require the following attributes:
   *
   *    attributes-charset
   *    attributes-natural-language
   *    requesting-user-name
+  *    printer-uri [for IPP_GET_PRINTER_ATTRIBUTES]
   */
 
   request = ippNewRequest(op);
@@ -1584,90 +1804,69 @@ cups_get_sdests(http_t      *http,      /* I - Connection to server or CUPS_HTTP_DEFA
       * Pull the needed attributes from this printer...
       */
 
-      accepting    = 0;
-      change_time  = 0;
-      info         = NULL;
-      location     = NULL;
-      make_model   = NULL;
       printer_name = NULL;
       num_options  = 0;
       options      = NULL;
-      shared       = 1;
-      state        = IPP_PRINTER_IDLE;
-      type         = CUPS_PRINTER_LOCAL;
 
-      auth_info_req[0] = '\0';
-      job_sheets[0]    = '\0';
-      reasons[0]       = '\0';
-
-      while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
+      for (; attr && attr->group_tag == IPP_TAG_PRINTER; attr = attr->next)
       {
-        if (!strcmp(attr->name, "auth-info-required") &&
-           attr->value_tag == IPP_TAG_KEYWORD)
-        {
-         strlcpy(auth_info_req, attr->values[0].string.text,
-                 sizeof(auth_info_req));
+       if (attr->value_tag != IPP_TAG_INTEGER &&
+           attr->value_tag != IPP_TAG_ENUM &&
+           attr->value_tag != IPP_TAG_BOOLEAN &&
+           attr->value_tag != IPP_TAG_TEXT &&
+           attr->value_tag != IPP_TAG_TEXTLANG &&
+           attr->value_tag != IPP_TAG_NAME &&
+           attr->value_tag != IPP_TAG_NAMELANG &&
+           attr->value_tag != IPP_TAG_KEYWORD &&
+           attr->value_tag != IPP_TAG_RANGE)
+          continue;
 
-         for (i = 1, ptr = auth_info_req + strlen(auth_info_req);
-              i < attr->num_values;
-              i ++)
-         {
-           snprintf(ptr, sizeof(auth_info_req) - (ptr - auth_info_req), ",%s",
-                    attr->values[i].string.text);
-           ptr += strlen(ptr);
-         }
-        }
-        else if (!strcmp(attr->name, "job-sheets-default") &&
-                (attr->value_tag == IPP_TAG_KEYWORD ||
-                 attr->value_tag == IPP_TAG_NAME))
+        if (!strcmp(attr->name, "auth-info-required") ||
+           !strcmp(attr->name, "marker-change-time") ||
+           !strcmp(attr->name, "marker-colors") ||
+           !strcmp(attr->name, "marker-high-levels") ||
+           !strcmp(attr->name, "marker-levels") ||
+           !strcmp(attr->name, "marker-low-levels") ||
+           !strcmp(attr->name, "marker-message") ||
+           !strcmp(attr->name, "marker-names") ||
+           !strcmp(attr->name, "marker-types") ||
+           !strcmp(attr->name, "printer-commands") ||
+           !strcmp(attr->name, "printer-info") ||
+           !strcmp(attr->name, "printer-is-shared") ||
+           !strcmp(attr->name, "printer-make-and-model") ||
+           !strcmp(attr->name, "printer-state") ||
+           !strcmp(attr->name, "printer-state-change-time") ||
+           !strcmp(attr->name, "printer-type") ||
+            !strcmp(attr->name, "printer-is-accepting-jobs") ||
+            !strcmp(attr->name, "printer-location") ||
+            !strcmp(attr->name, "printer-state-reasons"))
         {
-         if (attr->num_values == 2)
-           snprintf(job_sheets, sizeof(job_sheets), "%s,%s",
-                    attr->values[0].string.text, attr->values[1].string.text);
-         else
-           strlcpy(job_sheets, attr->values[0].string.text,
-                   sizeof(job_sheets));
-        }
-        else if (!strcmp(attr->name, "printer-info") &&
-                attr->value_tag == IPP_TAG_TEXT)
-         info = attr->values[0].string.text;
-       else if (!strcmp(attr->name, "printer-is-accepting-jobs") &&
-                attr->value_tag == IPP_TAG_BOOLEAN)
-          accepting = attr->values[0].boolean;
-       else if (!strcmp(attr->name, "printer-is-shared") &&
-                attr->value_tag == IPP_TAG_BOOLEAN)
-          shared = attr->values[0].boolean;
-        else if (!strcmp(attr->name, "printer-location") &&
-                attr->value_tag == IPP_TAG_TEXT)
-         location = attr->values[0].string.text;
-        else if (!strcmp(attr->name, "printer-make-and-model") &&
-                attr->value_tag == IPP_TAG_TEXT)
-         make_model = attr->values[0].string.text;
+        /*
+         * Add a printer description attribute...
+         */
+
+          num_options = cupsAddOption(attr->name,
+                                     cups_make_string(attr, value,
+                                                      sizeof(value)),
+                                     num_options, &options);
+       }
+       else if (!strcmp(attr->name, "media-supported"))
+       {
+        /*
+         * See if we can set a default media size...
+         */
+
+         for (i = 0; i < attr->num_values; i ++)
+           if (!strcasecmp(media_default, attr->values[i].string.text))
+           {
+             num_options = cupsAddOption("media", media_default, num_options,
+                                         &options);
+              break;
+           }
+       }
         else if (!strcmp(attr->name, "printer-name") &&
                 attr->value_tag == IPP_TAG_NAME)
          printer_name = attr->values[0].string.text;
-       else if (!strcmp(attr->name, "printer-state") &&
-                attr->value_tag == IPP_TAG_ENUM)
-          state = attr->values[0].integer;
-       else if (!strcmp(attr->name, "printer-state-change-time") &&
-                attr->value_tag == IPP_TAG_INTEGER)
-          change_time = attr->values[0].integer;
-        else if (!strcmp(attr->name, "printer-state-reasons") &&
-                attr->value_tag == IPP_TAG_KEYWORD)
-       {
-         strlcpy(reasons, attr->values[0].string.text, sizeof(reasons));
-         for (i = 1, ptr = reasons + strlen(reasons);
-              i < attr->num_values;
-              i ++)
-         {
-           snprintf(ptr, sizeof(reasons) - (ptr - reasons), ",%s",
-                    attr->values[i].string.text);
-           ptr += strlen(ptr);
-         }
-       }
-       else if (!strcmp(attr->name, "printer-type") &&
-                attr->value_tag == IPP_TAG_ENUM)
-          type = attr->values[0].integer;
         else if (strncmp(attr->name, "notify-", 7) &&
                 (attr->value_tag == IPP_TAG_BOOLEAN ||
                  attr->value_tag == IPP_TAG_ENUM ||
@@ -1675,75 +1874,22 @@ cups_get_sdests(http_t      *http,      /* I - Connection to server or CUPS_HTTP_DEFA
                  attr->value_tag == IPP_TAG_KEYWORD ||
                  attr->value_tag == IPP_TAG_NAME ||
                  attr->value_tag == IPP_TAG_RANGE) &&
-                strstr(attr->name, "-default"))
+                (ptr = strstr(attr->name, "-default")) != NULL)
        {
-         char  *valptr;                /* Pointer into attribute value */
-
-
         /*
          * Add a default option...
          */
 
           strlcpy(optname, attr->name, sizeof(optname));
-         if ((ptr = strstr(optname, "-default")) != NULL)
-           *ptr = '\0';
-
-          value[0] = '\0';
-         for (i = 0, ptr = value; i < attr->num_values; i ++)
-         {
-           if (ptr >= (value + sizeof(value) - 1))
-             break;
-
-            if (i)
-             *ptr++ = ',';
-
-            switch (attr->value_tag)
-           {
-             case IPP_TAG_INTEGER :
-             case IPP_TAG_ENUM :
-                 snprintf(ptr, sizeof(value) - (ptr - value), "%d",
-                          attr->values[i].integer);
-                 break;
-
-             case IPP_TAG_BOOLEAN :
-                 if (attr->values[i].boolean)
-                   strlcpy(ptr, "true", sizeof(value) - (ptr - value));
-                 else
-                   strlcpy(ptr, "false", sizeof(value) - (ptr - value));
-                 break;
-
-             case IPP_TAG_RANGE :
-                 if (attr->values[i].range.lower ==
-                         attr->values[i].range.upper)
-                   snprintf(ptr, sizeof(value) - (ptr - value), "%d",
-                            attr->values[i].range.lower);
-                 else
-                   snprintf(ptr, sizeof(value) - (ptr - value), "%d-%d",
-                            attr->values[i].range.lower,
-                            attr->values[i].range.upper);
-                 break;
-
-             default :
-                 for (valptr = attr->values[i].string.text;
-                      *valptr && ptr < (value + sizeof(value) - 2);)
-                 {
-                   if (strchr(" \t\n\\\'\"", *valptr))
-                     *ptr++ = '\\';
-
-                   *ptr++ = *valptr++;
-                 }
-
-                 *ptr = '\0';
-                 break;
-           }
-
-           ptr += strlen(ptr);
-          }
-
-         num_options = cupsAddOption(optname, value, num_options, &options);
+         optname[ptr - attr->name] = '\0';
+
+         if (strcasecmp(optname, "media") ||
+             !cupsGetOption("media", num_options, options))
+           num_options = cupsAddOption(optname,
+                                       cups_make_string(attr, value,
+                                                        sizeof(value)),
+                                       num_options, &options);
        }
-
-        attr = attr->next;
       }
 
      /*
@@ -1760,76 +1906,13 @@ cups_get_sdests(http_t      *http,      /* I - Connection to server or CUPS_HTTP_DEFA
           continue;
       }
 
-      num_dests = cupsAddDest(printer_name, NULL, num_dests, dests);
-
-      if ((dest = cupsGetDest(printer_name, NULL, num_dests, *dests)) != NULL)
+      if ((dest = cups_add_dest(printer_name, NULL, &num_dests, dests)) != NULL)
       {
         dest->num_options = num_options;
        dest->options     = options;
-
-        num_options = 0;
-       options     = NULL;
-
-        if (auth_info_req[0])
-          dest->num_options = cupsAddOption("auth-info-required", auth_info_req,
-                                           dest->num_options,
-                                           &(dest->options));
-
-        if (job_sheets[0])
-          dest->num_options = cupsAddOption("job-sheets", job_sheets,
-                                           dest->num_options,
-                                           &(dest->options));
-
-        if (info)
-          dest->num_options = cupsAddOption("printer-info", info,
-                                           dest->num_options,
-                                           &(dest->options));
-
-        sprintf(value, "%d", accepting);
-       dest->num_options = cupsAddOption("printer-is-accepting-jobs", value,
-                                         dest->num_options,
-                                         &(dest->options));
-
-        sprintf(value, "%d", shared);
-       dest->num_options = cupsAddOption("printer-is-shared", value,
-                                         dest->num_options,
-                                         &(dest->options));
-
-        if (location)
-          dest->num_options = cupsAddOption("printer-location",
-                                           location, dest->num_options,
-                                           &(dest->options));
-
-        if (make_model)
-          dest->num_options = cupsAddOption("printer-make-and-model",
-                                           make_model, dest->num_options,
-                                           &(dest->options));
-
-        sprintf(value, "%d", state);
-       dest->num_options = cupsAddOption("printer-state", value,
-                                         dest->num_options,
-                                         &(dest->options));
-
-        if (change_time)
-       {
-         sprintf(value, "%d", change_time);
-         dest->num_options = cupsAddOption("printer-state-change-time", value,
-                                           dest->num_options,
-                                           &(dest->options));
-        }
-
-        if (reasons[0])
-          dest->num_options = cupsAddOption("printer-state-reasons", reasons,
-                                           dest->num_options,
-                                           &(dest->options));
-
-        sprintf(value, "%d", type);
-       dest->num_options = cupsAddOption("printer-type", value,
-                                         dest->num_options,
-                                         &(dest->options));
       }
-
-      cupsFreeOptions(num_options, options);
+      else
+        cupsFreeOptions(num_options, options);
 
       if (attr == NULL)
        break;
@@ -1846,6 +1929,96 @@ cups_get_sdests(http_t      *http,       /* I - Connection to server or CUPS_HTTP_DEFA
 }
 
 
+/*
+ * 'cups_make_string()' - Make a comma-separated string of values from an IPP
+ *                        attribute.
+ */
+
+static char *                          /* O - New string */
+cups_make_string(
+    ipp_attribute_t *attr,             /* I - Attribute to convert */
+    char            *buffer,           /* I - Buffer */
+    size_t          bufsize)           /* I - Size of buffer */
+{
+  int          i;                      /* Looping var */
+  char         *ptr,                   /* Pointer into buffer */
+               *end,                   /* Pointer to end of buffer */
+               *valptr;                /* Pointer into string attribute */
+
+
+ /*
+  * Return quickly if we have a single string value...
+  */
+
+  if (attr->num_values == 1 &&
+      attr->value_tag != IPP_TAG_INTEGER &&
+      attr->value_tag != IPP_TAG_ENUM &&
+      attr->value_tag != IPP_TAG_BOOLEAN &&
+      attr->value_tag != IPP_TAG_RANGE)
+    return (attr->values[0].string.text);
+
+ /*
+  * Copy the values to the string, separating with commas and escaping strings
+  * as needed...
+  */
+
+  end = buffer + bufsize - 1;
+
+  for (i = 0, ptr = buffer; i < attr->num_values && ptr < end; i ++)
+  {
+    if (i)
+      *ptr++ = ',';
+
+    switch (attr->value_tag)
+    {
+      case IPP_TAG_INTEGER :
+      case IPP_TAG_ENUM :
+         snprintf(ptr, end - ptr + 1, "%d", attr->values[i].integer);
+         break;
+
+      case IPP_TAG_BOOLEAN :
+         if (attr->values[i].boolean)
+           strlcpy(ptr, "true", end - ptr + 1);
+         else
+           strlcpy(ptr, "false", end - ptr + 1);
+         break;
+
+      case IPP_TAG_RANGE :
+         if (attr->values[i].range.lower == attr->values[i].range.upper)
+           snprintf(ptr, end - ptr + 1, "%d", attr->values[i].range.lower);
+         else
+           snprintf(ptr, end - ptr + 1, "%d-%d", attr->values[i].range.lower,
+                    attr->values[i].range.upper);
+         break;
+
+      default :
+         for (valptr = attr->values[i].string.text;
+              *valptr && ptr < end;)
+         {
+           if (strchr(" \t\n\\\'\"", *valptr))
+           {
+             if (ptr >= (end - 1))
+               break;
+
+             *ptr++ = '\\';
+           }
+
+           *ptr++ = *valptr++;
+         }
+
+         *ptr = '\0';
+         break;
+    }
+
+    ptr += strlen(ptr);
+  }
+
+  *ptr = '\0';
+
+  return (buffer);
+}
+
+
 /*
  * End of "$Id: dest.c 7946 2008-09-16 23:27:54Z mike $".
  */
index b55cfc8c61832fa1714d384ba7e30d48eaf6b6b3..319908f1f5115470924681c793996e3086752326 100644 (file)
@@ -81,7 +81,7 @@ _cups_dir_time(FILETIME ft)           /* I - File time */
 /*
  * 'cupsDirClose()' - Close a directory.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void
@@ -112,7 +112,7 @@ cupsDirClose(cups_dir_t *dp)                /* I - Directory pointer */
 /*
  * 'cupsDirOpen()' - Open a directory.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_dir_t *                           /* O - Directory pointer or @code NULL@ if the directory could not be opened. */
@@ -155,7 +155,7 @@ cupsDirOpen(const char *directory)  /* I - Directory name */
 /*
  * 'cupsDirRead()' - Read the next directory entry.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_dentry_t *                                /* O - Directory entry or @code NULL@ if there are no more */
@@ -215,7 +215,7 @@ cupsDirRead(cups_dir_t *dp)         /* I - Directory pointer */
 /*
  * 'cupsDirRewind()' - Rewind to the start of the directory.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void
@@ -265,7 +265,7 @@ struct _cups_dir_s                  /**** Directory data structure ****/
 /*
  * 'cupsDirClose()' - Close a directory.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void
@@ -292,7 +292,7 @@ cupsDirClose(cups_dir_t *dp)                /* I - Directory pointer */
 /*
  * 'cupsDirOpen()' - Open a directory.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_dir_t *                           /* O - Directory pointer or @code NULL@ if the directory could not be opened. */
@@ -346,7 +346,7 @@ cupsDirOpen(const char *directory)  /* I - Directory name */
 /*
  * 'cupsDirRead()' - Read the next directory entry.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_dentry_t *                                /* O - Directory entry or @code NULL@ when there are no more */
@@ -443,7 +443,7 @@ cupsDirRead(cups_dir_t *dp)         /* I - Directory pointer */
 /*
  * 'cupsDirRewind()' - Rewind to the start of the directory.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void
index f3b32e666b0e3d9ddc60cd9d78701c7f9e1fc16b..9b1aeb3aa54d7cdc14205a5c06fc736884945df6 100644 (file)
@@ -92,7 +92,7 @@ ppdCollect(ppd_file_t    *ppd,                /* I - PPD file data */
  * The choices array should be freed using @code free@ when you are
  * finished with it.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - Number of options marked */
@@ -265,7 +265,7 @@ ppdEmit(ppd_file_t    *ppd,         /* I - PPD file record */
  *
  * When "limit" is zero, this function is identical to ppdEmit().
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on success, -1 on failure */
@@ -511,7 +511,7 @@ ppdEmitJCL(ppd_file_t *ppd,         /* I - PPD file record */
 /*
  * 'ppdEmitJCLEnd()' - Emit JCLEnd code to a file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on success, -1 on failure */
@@ -570,7 +570,7 @@ ppdEmitJCLEnd(ppd_file_t *ppd,              /* I - PPD file record */
  * The return string is allocated on the heap and should be freed using
  * @code free@ when you are done with it.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 char *                                 /* O - String containing option code or @code NULL@ if there is no option code */
index 3b737aebd8f298ba532befaeb00252e7a4310bb5..19e6aa4e062f34fbcd78d8af8002e258048d5827 100644 (file)
@@ -77,6 +77,14 @@ static const _ipp_option_t ipp_options[] =
   { 1, "job-sheets-default",   IPP_TAG_NAME,           IPP_TAG_PRINTER },
   { 0, "job-uuid",             IPP_TAG_URI,            IPP_TAG_JOB },
   { 0, "landscape",            IPP_TAG_BOOLEAN,        IPP_TAG_JOB },
+  { 1, "marker-change-time",   IPP_TAG_INTEGER,        IPP_TAG_PRINTER },
+  { 1, "marker-colors",                IPP_TAG_NAME,           IPP_TAG_PRINTER },
+  { 1, "marker-high-levels",   IPP_TAG_INTEGER,        IPP_TAG_PRINTER },
+  { 1, "marker-levels",                IPP_TAG_INTEGER,        IPP_TAG_PRINTER },
+  { 1, "marker-low-levels",    IPP_TAG_INTEGER,        IPP_TAG_PRINTER },
+  { 0, "marker-message",       IPP_TAG_TEXT,           IPP_TAG_PRINTER },
+  { 1, "marker-names",         IPP_TAG_NAME,           IPP_TAG_PRINTER },
+  { 1, "marker-types",         IPP_TAG_KEYWORD,        IPP_TAG_PRINTER },
   { 1, "media",                        IPP_TAG_KEYWORD,        IPP_TAG_JOB },
   { 0, "mirror",               IPP_TAG_BOOLEAN,        IPP_TAG_JOB },
   { 0, "mirror-default",       IPP_TAG_BOOLEAN,        IPP_TAG_PRINTER },
@@ -115,6 +123,7 @@ static const _ipp_option_t ipp_options[] =
   { 0, "prettyprint-default",  IPP_TAG_BOOLEAN,        IPP_TAG_PRINTER },
   { 0, "print-quality",                IPP_TAG_ENUM,           IPP_TAG_JOB },
   { 0, "print-quality-default",        IPP_TAG_ENUM,           IPP_TAG_PRINTER },
+  { 1, "printer-commands",     IPP_TAG_KEYWORD,        IPP_TAG_PRINTER },
   { 0, "printer-error-policy", IPP_TAG_NAME,           IPP_TAG_PRINTER },
   { 0, "printer-info",         IPP_TAG_TEXT,           IPP_TAG_PRINTER },
   { 0, "printer-is-accepting-jobs", IPP_TAG_BOOLEAN,   IPP_TAG_PRINTER },
@@ -186,7 +195,7 @@ cupsEncodeOptions(ipp_t         *ipp,               /* I - Request to add to */
  * function multiple times for each group, or use cupsEncodeOptions()
  * to add the standard groups.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void
@@ -345,15 +354,7 @@ cupsEncodeOptions2(
     * Copy the name over...
     */
 
-    if ((attr->name = _cupsStrAlloc(option->name)) == NULL)
-    {
-     /*
-      * Ran out of memory!
-      */
-
-      DEBUG_puts("cupsEncodeOptions2: Ran out of memory for name!");
-      return;
-    }
+    attr->name = _cupsStrRetain(option->name);
 
     if (count > 1)
     {
@@ -534,7 +535,9 @@ cupsEncodeOptions2(
             break;
 
        default :
-            if ((attr->values[j].string.text = _cupsStrAlloc(val)) == NULL)
+           if (count == 1)
+             attr->values[0].string.text = _cupsStrRetain(val);
+           else if ((attr->values[j].string.text = _cupsStrAlloc(val)) == NULL)
            {
             /*
              * Ran out of memory!
index bbaac6fe0a1f9245fbca5dda5d186ca30e136426..0fb212d1f8cd40dff95fcc07a5b79a559b9b8db8 100644 (file)
@@ -140,7 +140,7 @@ static ssize_t      cups_write(cups_file_t *fp, const char *buf, size_t bytes);
 /*
  * 'cupsFileClose()' - Close a CUPS file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on success, -1 on error */
@@ -272,7 +272,7 @@ cupsFileClose(cups_file_t *fp)              /* I - CUPS file */
 /*
  * 'cupsFileCompression()' - Return whether a file is compressed.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - @code CUPS_FILE_NONE@ or @code CUPS_FILE_GZIP@ */
@@ -285,7 +285,7 @@ cupsFileCompression(cups_file_t *fp)        /* I - CUPS file */
 /*
  * 'cupsFileEOF()' - Return the end-of-file status.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 1 on end of file, 0 otherwise */
@@ -304,7 +304,7 @@ cupsFileEOF(cups_file_t *fp)                /* I - CUPS file */
  * the supplied paths, @code NULL@ is returned. A @code NULL@ path only
  * matches the current directory.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 const char *                           /* O - Full path to file or @code NULL@ if not found */
@@ -403,7 +403,7 @@ cupsFileFind(const char *filename,  /* I - File to find */
 /*
  * 'cupsFileFlush()' - Flush pending output.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on success, -1 on error */
@@ -451,7 +451,7 @@ cupsFileFlush(cups_file_t *fp)              /* I - CUPS file */
 /*
  * 'cupsFileGetChar()' - Get a single character from a file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - Character or -1 on end of file */
@@ -497,7 +497,7 @@ cupsFileGetChar(cups_file_t *fp)    /* I - CUPS file */
 /*
  * 'cupsFileGetConf()' - Get a line from a configuration file...
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 char *                                 /* O  - Line read or @code NULL@ on end of file or error */
@@ -641,7 +641,7 @@ cupsFileGetConf(cups_file_t *fp,    /* I  - CUPS file */
  * nul-terminated, however you should use the returned length to determine
  * the number of bytes on the line.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 size_t                                 /* O - Number of bytes on line or 0 on end of file */
@@ -716,7 +716,7 @@ cupsFileGetLine(cups_file_t *fp,    /* I - File to read from */
 /*
  * 'cupsFileGets()' - Get a CR and/or LF-terminated line.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 char *                                 /* O - Line read or @code NULL@ on end of file or error */
@@ -798,7 +798,7 @@ cupsFileGets(cups_file_t *fp,               /* I - CUPS file */
 /*
  * 'cupsFileLock()' - Temporarily lock access to a file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on success, -1 on error */
@@ -827,7 +827,7 @@ cupsFileLock(cups_file_t *fp,               /* I - CUPS file */
 /*
  * 'cupsFileNumber()' - Return the file descriptor associated with a CUPS file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - File descriptor */
@@ -856,7 +856,7 @@ cupsFileNumber(cups_file_t *fp)             /* I - CUPS file */
  * connection as needed, generally preferring IPv6 connections when there is
  * a choice.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_file_t *                          /* O - CUPS file or @code NULL@ if the file or socket cannot be opened */
@@ -963,7 +963,7 @@ cupsFileOpen(const char *filename,  /* I - Name of file */
  * supplied which enables Flate compression of the file.  Compression is
  * not supported for the "a" (append) mode.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_file_t *                          /* O - CUPS file or @code NULL@ if the file could not be opened */
@@ -1075,7 +1075,7 @@ cupsFileOpenFd(int        fd,             /* I - File descriptor */
 /*
  * 'cupsFilePeekChar()' - Peek at the next character from a file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - Character or -1 on end of file */
@@ -1107,7 +1107,7 @@ cupsFilePeekChar(cups_file_t *fp) /* I - CUPS file */
 /*
  * 'cupsFilePrintf()' - Write a formatted string.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - Number of bytes written or -1 on error */
@@ -1204,7 +1204,7 @@ cupsFilePrintf(cups_file_t *fp,           /* I - CUPS file */
 /*
  * 'cupsFilePutChar()' - Write a character.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on success, -1 on error */
@@ -1319,7 +1319,7 @@ cupsFilePutConf(cups_file_t *fp,  /* I - CUPS file */
  *
  * Like the @code fputs@ function, no newline is appended to the string.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - Number of bytes written or -1 on error */
@@ -1383,7 +1383,7 @@ cupsFilePuts(cups_file_t *fp,             /* I - CUPS file */
 /*
  * 'cupsFileRead()' - Read from a file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ssize_t                                        /* O - Number of bytes read or -1 on error */
@@ -1460,7 +1460,7 @@ cupsFileRead(cups_file_t *fp,             /* I - CUPS file */
  * 'cupsFileRewind()' - Set the current file position to the beginning of the
  *                      file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 off_t                                  /* O - New file position or -1 on error */
@@ -1532,7 +1532,7 @@ cupsFileRewind(cups_file_t *fp)           /* I - CUPS file */
 /*
  * 'cupsFileSeek()' - Seek in a file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 off_t                                  /* O - New file position or -1 on error */
@@ -1685,7 +1685,7 @@ cupsFileSeek(cups_file_t *fp,             /* I - CUPS file */
 /*
  * 'cupsFileStderr()' - Return a CUPS file associated with stderr.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_file_t *                          /* O - CUPS file */
@@ -1721,7 +1721,7 @@ cupsFileStderr(void)
 /*
  * 'cupsFileStdin()' - Return a CUPS file associated with stdin.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_file_t *                          /* O - CUPS file */
@@ -1751,7 +1751,7 @@ cupsFileStdin(void)
 /*
  * 'cupsFileStdout()' - Return a CUPS file associated with stdout.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_file_t *                          /* O - CUPS file */
@@ -1787,7 +1787,7 @@ cupsFileStdout(void)
 /*
  * 'cupsFileTell()' - Return the current file position.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 off_t                                  /* O - File position */
@@ -1803,7 +1803,7 @@ cupsFileTell(cups_file_t *fp)             /* I - CUPS file */
 /*
  * 'cupsFileUnlock()' - Unlock access to a file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on success, -1 on error */
@@ -1833,7 +1833,7 @@ cupsFileUnlock(cups_file_t *fp)           /* I - CUPS file */
 /*
  * 'cupsFileWrite()' - Write to a file.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ssize_t                                        /* O - Number of bytes written or -1 on error */
index 31dde6ca7eb6b37ea36f8d8571aa586a6e009763..c61da916b8b5294c5be704ac340987bd04b11911 100644 (file)
@@ -47,7 +47,7 @@
  *
  * This function returns @code HTTP_OK@ when the file is successfully retrieved.
  *
- * @since CUPS 1.1.20@
+ * @since CUPS 1.1.20/Mac OS X 10.4@
  */
 
 http_status_t                          /* O - HTTP status */
@@ -188,7 +188,7 @@ cupsGetFd(http_t     *http,         /* I - Connection to server or @code CUPS_HTTP_DEFA
  *
  * This function returns @code HTTP_OK@ when the file is successfully retrieved.
  *
- * @since CUPS 1.1.20@
+ * @since CUPS 1.1.20/Mac OS X 10.4@
  */
 
 http_status_t                          /* O - HTTP status */
@@ -256,7 +256,7 @@ cupsGetFile(http_t     *http,               /* I - Connection to server or @code CUPS_HTTP_DE
  * This function returns @code HTTP_CREATED@ when the file is stored
  * successfully.
  *
- * @since CUPS 1.1.20@
+ * @since CUPS 1.1.20/Mac OS X 10.4@
  */
 
 http_status_t                          /* O - HTTP status */
@@ -442,7 +442,7 @@ cupsPutFd(http_t     *http,         /* I - Connection to server or @code CUPS_HTTP_DEFA
  * This function returns @code HTTP_CREATED@ when the file is stored
  * successfully.
  *
- * @since CUPS 1.1.20@
+ * @since CUPS 1.1.20/Mac OS X 10.4@
  */
 
 http_status_t                          /* O - HTTP status */
index d25692f6228a4dc330e2f0d57927070ad9039e00..9a39292eb08343473196f8f5b06df3043f1ef54c 100644 (file)
@@ -42,7 +42,7 @@
 /*
  * 'httpAddrAny()' - Check for the "any" address.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 1 if "any", 0 otherwise */
@@ -68,7 +68,7 @@ httpAddrAny(const http_addr_t *addr)  /* I - Address to check */
 /*
  * 'httpAddrEqual()' - Compare two addresses.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                            /* O - 1 if equal, 0 if not */
@@ -101,7 +101,7 @@ httpAddrEqual(const http_addr_t *addr1,             /* I - First address */
 /*
  * 'httpAddrLength()' - Return the length of the address in bytes.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - Length in bytes */
@@ -132,7 +132,7 @@ httpAddrLength(const http_addr_t *addr)     /* I - Address */
 /*
  * 'httpAddrLocalhost()' - Check for the local loopback address.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 1 if local host, 0 otherwise */
@@ -171,7 +171,7 @@ httpAddrLocalhost(
 /*
  * 'httpAddrLookup()' - Lookup the hostname associated with the address.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 char *                                 /* O - Host name */
@@ -306,7 +306,7 @@ _httpAddrPort(http_addr_t *addr)    /* I - Address */
 /*
  * 'httpAddrString()' - Convert an address to a numeric string.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 char *                                 /* O - Numeric address string */
@@ -564,7 +564,7 @@ httpGetHostByName(const char *name) /* I - Hostname or IP address */
  * Otherwise, return the FQDN for the local system using both gethostname()
  * and gethostbyname() to get the local hostname with domain.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 const char *                           /* O - FQDN for connection or system */
index cee5017d79a532320f503b35d366aa6a49125bd5..b44acc6368cb5bcb44f4f18d494cefe3402755fb 100644 (file)
@@ -36,7 +36,7 @@
 /*
  * 'httpAddrConnect()' - Connect to any of the addresses in the list.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 http_addrlist_t *                      /* O - Connected address or NULL on failure */
@@ -165,7 +165,7 @@ httpAddrConnect(
 /*
  * 'httpAddrFreeList()' - Free an address list.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void
@@ -193,7 +193,7 @@ httpAddrFreeList(
 /*
  * 'httpAddrGetList()' - Get a list of addresses for a hostname.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 http_addrlist_t        *                       /* O - List of addresses or NULL */
index ec3f6a84e8a8c88968ce34c044953b2278a52d4b..8ffe5a281f2262459b6d8a6e24aa53614d2ed1be 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Private HTTP definitions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
index 063756926e4c674f40769411d7d5860ed687f29a..a2d227e531759d1d31a3205c9c0eae3d722c92a6 100644 (file)
@@ -129,7 +129,7 @@ static void         resolve_callback(DNSServiceRef sdRef,
  * place of traditional string functions whenever you need to create a
  * URI string.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 http_uri_status_t                      /* O - URI status */
@@ -379,7 +379,7 @@ httpAssembleURI(
  * this function in place of traditional string functions whenever
  * you need to create a URI string.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 http_uri_status_t                      /* O - URI status */
@@ -459,7 +459,7 @@ httpDecode64(char       *out,               /* I - String to write to */
 /*
  * 'httpDecode64_2()' - Base64-decode a string.
  *
- * @since CUPS 1.1.21@
+ * @since CUPS 1.1.21/Mac OS X 10.4@
  */
 
 char *                                 /* O  - Decoded string */
@@ -578,7 +578,7 @@ httpEncode64(char       *out,               /* I - String to write to */
 /*
  * 'httpEncode64_2()' - Base64-encode a string.
  *
- * @since CUPS 1.1.21@
+ * @since CUPS 1.1.21/Mac OS X 10.4@
  */
 
 char *                                 /* O - Encoded string */
@@ -687,7 +687,7 @@ httpGetDateString(time_t t)         /* I - UNIX time */
 /*
  * 'httpGetDateString2()' - Get a formatted date/time string from a time value.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 const char *                           /* O - Date/time string */
@@ -804,7 +804,7 @@ httpSeparate(const char *uri,               /* I - Universal Resource Identifier */
  *
  * This function is deprecated; use the httpSeparateURI() function instead.
  *
- * @since CUPS 1.1.21@
+ * @since CUPS 1.1.21/Mac OS X 10.4@
  * @deprecated@
  */
 
@@ -829,7 +829,7 @@ httpSeparate2(const char *uri,              /* I - Universal Resource Identifier */
  * 'httpSeparateURI()' - Separate a Universal Resource Identifier into its
  *                       components.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 http_uri_status_t                      /* O - Result of separation */
index 5c11435a26b4fc146426ec619ea1b24e1ab29c27..439f180f30a48c078fd5e76a41a86b30826b92d5 100644 (file)
@@ -247,7 +247,7 @@ httpCheck(http_t *http)                     /* I - Connection to server */
 /*
  * 'httpClearCookie()' - Clear the cookie value(s).
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 void
@@ -592,7 +592,7 @@ httpFlush(http_t *http)                     /* I - Connection to server */
 /*
  * 'httpFlushWrite()' - Flush data in write buffer.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - Bytes written or -1 on error */
@@ -637,7 +637,7 @@ httpGet(http_t     *http,           /* I - Connection to server */
  * string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
  * value.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 char *                                 /* O - Authorization string */
@@ -653,7 +653,7 @@ httpGetAuthString(http_t *http)             /* I - Connection to server */
 /*
  * 'httpGetBlocking()' - Get the blocking/non-block state of a connection.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 1 if blocking, 0 if non-blocking */
@@ -666,7 +666,7 @@ httpGetBlocking(http_t *http)               /* I - Connection to server */
 /*
  * 'httpGetCookie()' - Get any cookie data from the response.
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 const char *                           /* O - Cookie data or NULL */
@@ -679,7 +679,7 @@ httpGetCookie(http_t *http)         /* I - HTTP connecion */
 /*
  * 'httpGetFd()' - Get the file descriptor associated with a connection.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - File descriptor or -1 if none */
@@ -749,7 +749,7 @@ httpGetLength(http_t *http)         /* I - Connection to server */
  * This function returns the complete content length, even for
  * content larger than 2^31 - 1.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 off_t                                  /* O - Content length */
@@ -811,7 +811,7 @@ httpGetLength2(http_t *http)                /* I - Connection to server */
 /*
  * 'httpGetStatus()' - Get the status of the last HTTP request.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 http_status_t                          /* O - HTTP status */
@@ -840,7 +840,7 @@ httpGetSubField(http_t       *http, /* I - Connection to server */
 /*
  * 'httpGetSubField2()' - Get a sub-field value.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 char *                                 /* O - Value or NULL */
@@ -1300,7 +1300,7 @@ httpRead(http_t *http,                    /* I - Connection to server */
 /*
  * 'httpRead2()' - Read data from a HTTP connection.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ssize_t                                        /* O - Number of bytes read */
@@ -1732,7 +1732,7 @@ httpReconnect(http_t *http)               /* I - Connection to server */
  * HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
  * httpHead(), httpOptions(), httpPost, or httpPut().
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 void
@@ -1788,7 +1788,7 @@ httpSetAuthString(http_t     *http,       /* I - Connection to server */
 /*
  * 'httpSetCookie()' - Set the cookie value(s)...
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 void
@@ -1813,7 +1813,7 @@ httpSetCookie(http_t     *http,           /* I - Connection */
  *
  * Currently only HTTP_CONTINUE is supported for the "expect" argument.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void
@@ -1860,7 +1860,7 @@ httpSetField(http_t       *http,  /* I - Connection to server */
 /*
  * 'httpSetLength()' - Set the content-length and content-encoding.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 void
@@ -2077,7 +2077,7 @@ httpUpdate(http_t *http)          /* I - Connection to server */
 /*
  * 'httpWait()' - Wait for data available on a connection.
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 int                                    /* O - 1 if data is available, 0 otherwise */
@@ -2133,7 +2133,7 @@ httpWrite(http_t     *http,               /* I - Connection to server */
 /*
  * 'httpWrite2()' - Write data to a HTTP connection.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
  
 ssize_t                                        /* O - Number of bytes written */
index 169a1575c82483560154c1e3005d0acc74c014fa..0c51578d736e01a18746632365af9e70b3deda5d 100644 (file)
@@ -124,7 +124,7 @@ typedef enum http_auth_e            /**** HTTP authentication types ****/
   HTTP_AUTH_MD5_SESS,                  /* MD5-session authentication in use */
   HTTP_AUTH_MD5_INT,                   /* Digest authentication in use for body */
   HTTP_AUTH_MD5_SESS_INT,              /* MD5-session authentication in use for body */
-  HTTP_AUTH_NEGOTIATE                  /* GSSAPI authentication in use @since CUPS 1.3@ */
+  HTTP_AUTH_NEGOTIATE                  /* GSSAPI authentication in use @since CUPS 1.3/Mac OS X 10.5@ */
 } http_auth_t;
 
 typedef enum http_encoding_e           /**** HTTP transfer encoding values ****/
@@ -288,7 +288,7 @@ typedef enum http_version_e         /**** HTTP version numbers ****/
 typedef union _http_addr_u             /**** Socket address union, which
                                         **** makes using IPv6 and other
                                         **** address types easier and
-                                        **** more portable. @since CUPS 1.2@
+                                        **** more portable. @since CUPS 1.2/Mac OS X 10.5@
                                         ****/
 {
   struct sockaddr      addr;           /* Base structure for family value */
@@ -305,7 +305,7 @@ typedef union _http_addr_u          /**** Socket address union, which
 typedef struct http_addrlist_s         /**** Socket address list, which is
                                         **** used to enumerate all of the
                                         **** addresses that are associated
-                                        **** with a hostname. @since CUPS 1.2@
+                                        **** with a hostname. @since CUPS 1.2/Mac OS X 10.5@
                                         ****/
 {
   struct http_addrlist_s *next;                /* Pointer to next address in list */
index ca1111b8569e36d1f0b5b544ce34b7fc5b3b61f4..8553a488e2c2d988d14ea72fd98eca5d7ead0704 100644 (file)
@@ -281,7 +281,7 @@ ippErrorString(ipp_status_t error)  /* I - Error status */
 /*
  * 'ippErrorValue()' - Return a status code for the given name.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ipp_status_t                           /* O - IPP status code */
@@ -315,7 +315,7 @@ ippErrorValue(const char *name)             /* I - Name */
 /*
  * 'ippOpString()' - Return a name for the given operation id.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 const char *                           /* O - Name */
@@ -350,7 +350,7 @@ ippOpString(ipp_op_t op)            /* I - Operation ID */
 /*
  * 'ippOpValue()' - Return an operation id for the given name.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ipp_op_t                               /* O - Operation ID */
index f9bbb5c96f8aa48f9fa4f6c2504950dd604cdc21..1f932403d46425012c6bb4eb2168ef0835051d30 100644 (file)
@@ -160,7 +160,7 @@ ippAddBooleans(ipp_t      *ipp,             /* I - IPP message */
 /*
  * 'ippAddCollection()' - Add a collection value.
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 ipp_attribute_t *                      /* O - New attribute */
@@ -193,7 +193,7 @@ ippAddCollection(ipp_t      *ipp,   /* I - IPP message */
 /*
  * 'ippAddCollections()' - Add an array of collection values.
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 ipp_attribute_t *                      /* O - New attribute */
@@ -342,7 +342,7 @@ ippAddIntegers(ipp_t      *ipp,             /* I - IPP message */
 /*
  * 'ippAddOctetString()' - Add an octetString value to an IPP message.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ipp_attribute_t        *                       /* O - New attribute */
@@ -789,7 +789,7 @@ ippDelete(ipp_t *ipp)                       /* I - IPP message */
 /*
  * 'ippDeleteAttribute()' - Delete a single attribute in an IPP message.
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 void
@@ -964,7 +964,7 @@ ippNew(void)
  * attributes-natural-language attributes added. The
  * attributes-natural-language value is derived from the current locale.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ipp_t *                                        /* O - IPP request message */
@@ -1039,7 +1039,7 @@ ippRead(http_t *http,                     /* I - HTTP connection */
 /*
  * 'ippReadFile()' - Read data for an IPP message from a file.
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 ipp_state_t                            /* O - Current state */
@@ -1055,7 +1055,7 @@ ippReadFile(int   fd,                     /* I - HTTP data */
 /*
  * 'ippReadIO()' - Read data for an IPP message.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ipp_state_t                            /* O - Current state */
@@ -1798,7 +1798,7 @@ ippWrite(http_t *http,                    /* I - HTTP connection */
 /*
  * 'ippWriteFile()' - Write data for an IPP message to a file.
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 ipp_state_t                            /* O - Current state */
@@ -1816,7 +1816,7 @@ ippWriteFile(int   fd,                    /* I - HTTP data */
 /*
  * 'ippWriteIO()' - Write data for an IPP message.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ipp_state_t                            /* O - Current state */
index 1e6fadaf9bfa94b0735cc1dfd24a68c0048d0dfc..6d182bd4745a9cd3d6485d422b9c783fb06c5cf1 100644 (file)
@@ -4,7 +4,7 @@
  *   Internet Printing Protocol definitions for the Common UNIX Printing
  *   System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -207,13 +207,13 @@ typedef enum ipp_op_e                     /**** IPP operations... ****/
   IPP_SET_PRINTER_ATTRIBUTES,          /* Set printer attributes @private@ */
   IPP_SET_JOB_ATTRIBUTES,              /* Set job attributes */
   IPP_GET_PRINTER_SUPPORTED_VALUES,    /* Get supported attribute values */
-  IPP_CREATE_PRINTER_SUBSCRIPTION,     /* Create a printer subscription @since CUPS 1.2@ */
-  IPP_CREATE_JOB_SUBSCRIPTION,         /* Create a job subscription @since CUPS 1.2@ */
-  IPP_GET_SUBSCRIPTION_ATTRIBUTES,     /* Get subscription attributes @since CUPS 1.2@ */
-  IPP_GET_SUBSCRIPTIONS,               /* Get list of subscriptions @since CUPS 1.2@ */
-  IPP_RENEW_SUBSCRIPTION,              /* Renew a printer subscription @since CUPS 1.2@ */
-  IPP_CANCEL_SUBSCRIPTION,             /* Cancel a subscription @since CUPS 1.2@ */
-  IPP_GET_NOTIFICATIONS,               /* Get notification events @since CUPS 1.2@ */
+  IPP_CREATE_PRINTER_SUBSCRIPTION,     /* Create a printer subscription @since CUPS 1.2/Mac OS X 10.5@ */
+  IPP_CREATE_JOB_SUBSCRIPTION,         /* Create a job subscription @since CUPS 1.2/Mac OS X 10.5@ */
+  IPP_GET_SUBSCRIPTION_ATTRIBUTES,     /* Get subscription attributes @since CUPS 1.2/Mac OS X 10.5@ */
+  IPP_GET_SUBSCRIPTIONS,               /* Get list of subscriptions @since CUPS 1.2/Mac OS X 10.5@ */
+  IPP_RENEW_SUBSCRIPTION,              /* Renew a printer subscription @since CUPS 1.2/Mac OS X 10.5@ */
+  IPP_CANCEL_SUBSCRIPTION,             /* Cancel a subscription @since CUPS 1.2/Mac OS X 10.5@ */
+  IPP_GET_NOTIFICATIONS,               /* Get notification events @since CUPS 1.2/Mac OS X 10.5@ */
   IPP_SEND_NOTIFICATIONS,              /* Send notification events @private@ */
   IPP_GET_PRINT_SUPPORT_FILES = 0x0021,        /* Get printer support files @private@ */
   IPP_ENABLE_PRINTER,                  /* Start a printer */
@@ -246,8 +246,8 @@ typedef enum ipp_op_e                       /**** IPP operations... ****/
   CUPS_GET_DEVICES,                    /* Get a list of supported devices */
   CUPS_GET_PPDS,                       /* Get a list of supported drivers */
   CUPS_MOVE_JOB,                       /* Move a job to a different printer */
-  CUPS_AUTHENTICATE_JOB,               /* Authenticate a job @since CUPS 1.2@ */
-  CUPS_GET_PPD,                                /* Get a PPD file @since CUPS 1.3@ */
+  CUPS_AUTHENTICATE_JOB,               /* Authenticate a job @since CUPS 1.2/Mac OS X 10.5@ */
+  CUPS_GET_PPD,                                /* Get a PPD file @since CUPS 1.3/Mac OS X 10.5@ */
   CUPS_GET_DOCUMENT = 0x4027           /* Get a document file @since CUPS 1.4@ */
 } ipp_op_t;
 
@@ -310,7 +310,7 @@ typedef unsigned char ipp_uchar_t;  /**** Unsigned 8-bit integer/character ****/
 
 /**** New in CUPS 1.2 ****/
 typedef ssize_t        (*ipp_iocb_t)(void *, ipp_uchar_t *, size_t);
-                                       /**** IPP IO Callback Function @since CUPS 1.2@ ****/
+                                       /**** IPP IO Callback Function @since CUPS 1.2/Mac OS X 10.5@ ****/
 
 typedef union ipp_request_u            /**** Request Header ****/
 {
@@ -336,7 +336,7 @@ typedef union ipp_request_u         /**** Request Header ****/
   }            status;
 
   /**** New in CUPS 1.1.19 ****/
-  struct                               /* Event Header */
+  struct                               /* Event Header @since CUPS 1.1.19/Mac OS X 10.3@ */
   {
     ipp_uchar_t        version[2];             /* Protocol version number */
     ipp_status_t status_code;          /* Status code */
@@ -381,7 +381,7 @@ typedef union ipp_value_u           /**** Attribute Value ****/
   }            unknown;                /* Unknown attribute type */
 
 /**** New in CUPS 1.1.19 ****/
-  ipp_t                *collection;            /* Collection value */
+  ipp_t                *collection;            /* Collection value @since CUPS 1.1.19/Mac OS X 10.3@ */
 } ipp_value_t;
 
 typedef struct ipp_attribute_s         /**** Attribute ****/
@@ -404,7 +404,7 @@ struct ipp_s                                /**** IPP Request/Response/Notification ****/
   ipp_tag_t    curtag;                 /* Current attribute group tag */
 
 /**** New in CUPS 1.2 ****/
-  ipp_attribute_t *prev;               /* Previous attribute (for read) */
+  ipp_attribute_t *prev;               /* Previous attribute (for read) @since CUPS 1.2/Mac OS X 10.5@ */
 };
 
 
index 403b4933f43ebbdaf09d2d5fdf18910f04caca93..e8075744afde73560d1ec36a5ecbee8f983c170d 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Multi-language support for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
index 92d2f9c91d8366ba06cde96be11fa81691a2ed02..c67afed84a48692cf998030af71f9619087f831f 100644 (file)
@@ -39,6 +39,7 @@ __cupsStrAlloc
 __cupsStrFlush
 __cupsStrFormatd
 __cupsStrFree
+__cupsStrRetain
 __cupsStrScand
 __cupsStrStatistics
 __httpAddrPort
index 97aa9c04635c5ace5c2208106fe2f216d015c754..d46e979119ecf63e50e4991c09b9ca4a2d73144d 100644 (file)
@@ -34,6 +34,7 @@ _cupsStrAlloc
 _cupsStrFlush
 _cupsStrFormatd
 _cupsStrFree
+_cupsStrRetain
 _cupsStrScand
 _cupsStrStatistics
 _cups_getifaddrs
index 7a98607de1b0d0648c7ea7a9984106c8d91b43c6..19a03e26c7a668813ec435e7cf55a54feb723878 100644 (file)
@@ -62,7 +62,7 @@ static void           ppd_ll_CC(char *ll_CC, int ll_CC_size);
  * descriptions, printer presets, and custom option parameters.  Each
  * localized string uses the UTF-8 character encoding.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on success, -1 on error */
@@ -246,7 +246,7 @@ ppdLocalizeAttr(ppd_file_t *ppd,    /* I - PPD file */
  *
  * If no value of the requested scheme can be found, NULL is returned.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 const char *                           /* O - Value or NULL if not found */
index 878ace885dba71d01e621950a48406a25d258e30..ffbc436ecf58daf1a98e93cb337d4c746cfad332 100644 (file)
@@ -551,7 +551,7 @@ ppdMarkOption(ppd_file_t *ppd,              /* I - PPD file record */
  *
  * Options are returned from all groups in ascending alphanumeric order.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ppd_option_t *                         /* O - First option or @code NULL@ */
@@ -569,7 +569,7 @@ ppdFirstOption(ppd_file_t *ppd)             /* I - PPD file */
  *
  * Options are returned from all groups in ascending alphanumeric order.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ppd_option_t *                         /* O - Next option or @code NULL@ */
@@ -931,7 +931,7 @@ ppd_mark_option(ppd_file_t *ppd,    /* I - PPD file */
              if (cparam->current.custom_string)
                _cupsStrFree(cparam->current.custom_string);
 
-             cparam->current.custom_string = _cupsStrAlloc(val->value);
+             cparam->current.custom_string = _cupsStrRetain(val->value);
              break;
        }
       }
index cbfe5f070364fd95e899ecc1517624a441a4e58a..3cb07a5afd323ddcea51233fccaa9ec215605dee 100644 (file)
@@ -33,7 +33,7 @@
  *
  * The returned string must be freed by the caller using @code free@.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 char *                                 /* O - Subject string or @code NULL@ */
@@ -164,7 +164,7 @@ cupsNotifySubject(cups_lang_t *lang,        /* I - Language data */
  *
  * The returned string must be freed by the caller using @code free@.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 char *                                 /* O - Message text or @code NULL@ */
index a5b757da1cb2a9b0bcac8621a7e8af523b7862dc..b1476a49aa86a3c83a510a6b89d56c32f6c4214c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: options.c 7819 2008-08-01 00:27:24Z mike $"
+ * "$Id: options.c 8181 2008-12-10 17:29:57Z mike $"
  *
  *   Option routines for the Common UNIX Printing System (CUPS).
  *
 #include "debug.h"
 
 
+/*
+ * Local functions...
+ */
+
+static int     cups_compare_options(cups_option_t *a, cups_option_t *b);
+static int     cups_find_option(const char *name, int num_options,
+                                cups_option_t *option, int prev, int *rdiff);
+
+
 /*
  * 'cupsAddOption()' - Add an option to an option array.
  *
@@ -47,8 +56,9 @@ cupsAddOption(const char    *name,    /* I  - Name of option */
              int           num_options,/* I  - Number of options */
               cups_option_t **options) /* IO - Pointer to options */
 {
-  int          i;                      /* Looping var */
   cups_option_t        *temp;                  /* Pointer to new option */
+  int          insert,                 /* Insertion point */
+               diff;                   /* Result of search */
 
 
   DEBUG_printf(("cupsAddOption(name=\"%s\", value=\"%s\", num_options=%d, "
@@ -64,17 +74,28 @@ cupsAddOption(const char    *name,  /* I  - Name of option */
   * Look for an existing option with the same name...
   */
 
-  for (i = 0, temp = *options; i < num_options; i ++, temp ++)
-    if (!strcasecmp(temp->name, name))
-      break;
+  if (num_options == 0)
+  {
+    insert = 0;
+    diff   = 1;
+  }
+  else
+  {
+    insert = cups_find_option(name, num_options, *options, num_options - 1,
+                              &diff);
 
-  if (i >= num_options)
+    if (diff > 0)
+      insert ++;
+  }
+
+  if (diff)
   {
    /*
     * No matching option name...
     */
 
-    DEBUG_puts("cupsAddOption: New option...");
+    DEBUG_printf(("cupsAddOption: New option inserted at index %d...\n",
+                  insert));
 
     if (num_options == 0)
       temp = (cups_option_t *)malloc(sizeof(cups_option_t));
@@ -88,8 +109,17 @@ cupsAddOption(const char    *name,  /* I  - Name of option */
       return (0);
     }
 
-    *options    = temp;
-    temp        += num_options;
+    *options = temp;
+
+    if (insert < num_options)
+    {
+      DEBUG_printf(("cupsAddOption: Shifting %d options...\n",
+                    (int)(num_options - insert)));
+      memmove(temp + insert + 1, temp + insert,
+             (num_options - insert) * sizeof(cups_option_t));
+    }
+
+    temp        += insert;
     temp->name  = _cupsStrAlloc(name);
     num_options ++;
   }
@@ -99,7 +129,10 @@ cupsAddOption(const char    *name,  /* I  - Name of option */
     * Match found; free the old value...
     */
 
-    DEBUG_puts("cupsAddOption: Option already exists...");
+    DEBUG_printf(("cupsAddOption: Option already exists at index %d...\n",
+                  insert));
+
+    temp = *options + insert;
     _cupsStrFree(temp->value);
   }
 
@@ -148,7 +181,8 @@ cupsGetOption(const char    *name,  /* I - Name of option */
               int           num_options,/* I - Number of options */
               cups_option_t *options)  /* I - Options */
 {
-  int  i;                              /* Looping var */
+  int  diff,                           /* Result of comparison */
+       match;                          /* Matching index */
 
 
   DEBUG_printf(("cupsGetOption(name=\"%s\", num_options=%d, options=%p)\n",
@@ -160,12 +194,13 @@ cupsGetOption(const char    *name,        /* I - Name of option */
     return (NULL);
   }
 
-  for (i = 0; i < num_options; i ++)
-    if (!strcasecmp(options[i].name, name))
-    {
-      DEBUG_printf(("cupsGetOption: Returning \"%s\"\n", options[i].value));
-      return (options[i].value);
-    }
+  match = cups_find_option(name, num_options, options, -1, &diff);
+
+  if (!diff)
+  {
+    DEBUG_printf(("cupsGetOption: Returning \"%s\"\n", options[match].value));
+    return (options[match].value);
+  }
 
   DEBUG_puts("cupsGetOption: Returning NULL");
   return (NULL);
@@ -192,6 +227,7 @@ cupsParseOptions(
        *ptr,                           /* Pointer into string */
        *name,                          /* Pointer to name */
        *value,                         /* Pointer to value */
+       sep,                            /* Separator character */
        quote;                          /* Quote character */
 
 
@@ -277,9 +313,12 @@ cupsParseOptions(
     while (isspace(*ptr & 255))
       *ptr++ = '\0';
 
+    if ((sep = *ptr) == '=')
+      *ptr++ = '\0';
+
     DEBUG_printf(("cupsParseOptions: name=\"%s\"\n", name));
 
-    if (*ptr != '=')
+    if (sep != '=')
     {
      /*
       * Boolean option...
@@ -298,8 +337,7 @@ cupsParseOptions(
     * Remove = and parse the value...
     */
 
-    *ptr++ = '\0';
-    value  = ptr;
+    value = ptr;
 
     while (*ptr && !isspace(*ptr & 255))
     {
@@ -401,7 +439,7 @@ cupsParseOptions(
 /*
  * 'cupsRemoveOption()' - Remove an option from an option array.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 int                                    /* O  - New number of options */
@@ -463,5 +501,129 @@ cupsRemoveOption(
 
 
 /*
- * End of "$Id: options.c 7819 2008-08-01 00:27:24Z mike $".
+ * 'cups_compare_options()' - Compare two options.
+ */
+
+static int                             /* O - Result of comparison */
+cups_compare_options(cups_option_t *a, /* I - First option */
+                    cups_option_t *b)  /* I - Second option */
+{
+  return (strcasecmp(a->name, b->name));
+}
+
+
+/*
+ * 'cups_find_option()' - Find an option using a binary search.
+ */
+
+static int                             /* O - Index of match */
+cups_find_option(
+    const char    *name,               /* I - Option name */
+    int           num_options,         /* I - Number of options */
+    cups_option_t *options,            /* I - Options */
+    int           prev,                        /* I - Previous index */
+    int           *rdiff)              /* O - Difference of match */
+{
+  int          left,                   /* Low mark for binary search */
+               right,                  /* High mark for binary search */
+               current,                /* Current index */
+               diff;                   /* Result of comparison */
+  cups_option_t        key;                    /* Search key */
+
+
+  DEBUG_printf(("cups_find_option(name=\"%s\", num_options=%d, options=%p, "
+               "prev=%d, rdiff=%p)\n", name, num_options, options, prev,
+               rdiff));
+
+#ifdef DEBUG
+  for (left = 0; left < num_options; left ++)
+    DEBUG_printf(("cups_find_option: options[%d].name=\"%s\", .value=\"%s\"\n",
+                  left, options[left].name, options[left].value));
+#endif /* DEBUG */
+
+  key.name = (char *)name;
+
+  if (prev >= 0)
+  {
+   /*
+    * Start search on either side of previous...
+    */
+
+    if ((diff = cups_compare_options(&key, options + prev)) == 0 ||
+        (diff < 0 && prev == 0) ||
+       (diff > 0 && prev == (num_options - 1)))
+    {
+      *rdiff = diff;
+      return (prev);
+    }
+    else if (diff < 0)
+    {
+     /*
+      * Start with previous on right side...
+      */
+
+      left  = 0;
+      right = prev;
+    }
+    else
+    {
+     /*
+      * Start wih previous on left side...
+      */
+
+      left  = prev;
+      right = num_options - 1;
+    }
+  }
+  else
+  {
+   /*
+    * Start search in the middle...
+    */
+
+    left  = 0;
+    right = num_options - 1;
+  }
+
+  do
+  {
+    current = (left + right) / 2;
+    diff    = cups_compare_options(&key, options + current);
+
+    if (diff == 0)
+      break;
+    else if (diff < 0)
+      right = current;
+    else
+      left = current;
+  }
+  while ((right - left) > 1);
+
+  if (diff != 0)
+  {
+   /*
+    * Check the last 1 or 2 elements...
+    */
+
+    if ((diff = cups_compare_options(&key, options + left)) <= 0)
+      current = left;
+    else
+    {
+      diff    = cups_compare_options(&key, options + right);
+      current = right;
+    }
+  }
+
+ /*
+  * Return the closest destination and the difference...
+  */
+
+  *rdiff = diff;
+
+  return (current);
+}
+
+
+/*
+ * End of "$Id: options.c 8181 2008-12-10 17:29:57Z mike $".
  */
index 8c7b0e2abd50670fe3d490605793505783762523..2b59c1e7282709c960ab24451c6eba73ecda01dd 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Page size functions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
index 4804c04f273de65983b9ee685a75a12d82dc63ed..bdb0f2ddc0971de8d7864c66d26ecebf3db536d3 100644 (file)
@@ -323,7 +323,7 @@ ppdClose(ppd_file_t *ppd)           /* I - PPD file record */
 /*
  * 'ppdErrorString()' - Returns the text assocated with a status.
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 const char *                           /* O - Status string */
@@ -390,7 +390,7 @@ _ppdGetEncoding(const char *name)   /* I - LanguageEncoding string */
 /*
  * 'ppdLastError()' - Return the status from the last ppdOpen*().
  *
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
  */
 
 ppd_status_t                           /* O - Status code */
@@ -444,7 +444,7 @@ ppdOpen(FILE *fp)                   /* I - File to read from */
 /*
  * 'ppdOpen2()' - Read a PPD file into memory.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 ppd_file_t *                           /* O - PPD file record or @code NULL@ if the PPD file could not be opened. */
@@ -1321,7 +1321,7 @@ ppdOpen2(cups_file_t *fp)         /* I - File to read from */
        strlcpy(choice->text,
                custom_attr->text[0] ? custom_attr->text : _("Custom"),
                sizeof(choice->text));
-        choice->code = _cupsStrAlloc(custom_attr->value);
+        choice->code = _cupsStrRetain(custom_attr->value);
       }
     }
     else if (!strcmp(keyword, "JCLOpenUI"))
@@ -1424,7 +1424,7 @@ ppdOpen2(cups_file_t *fp)         /* I - File to read from */
        strlcpy(choice->text,
                custom_attr->text[0] ? custom_attr->text : _("Custom"),
                sizeof(choice->text));
-        choice->code = _cupsStrAlloc(custom_attr->value);
+        choice->code = _cupsStrRetain(custom_attr->value);
       }
     }
     else if (!strcmp(keyword, "CloseUI") || !strcmp(keyword, "JCLCloseUI"))
@@ -2073,7 +2073,7 @@ ppdOpenFile(const char *filename) /* I - File to read from */
 /*
  * 'ppdSetConformance()' - Set the conformance level for PPD files.
  *
- * @since CUPS 1.1.20@
+ * @since CUPS 1.1.20/Mac OS X 10.4@
  */
 
 void
index 3f59b77634664b3cc9f0bb5e8df0743a269b76bc..1a5f34db1a474bfe2f8354c942b1fff2e95f2adb 100644 (file)
@@ -93,7 +93,7 @@ typedef enum ppd_cs_e                 /**** Colorspaces ****/
   PPD_CS_N                             /* DeviceN colorspace */
 } ppd_cs_t;
 
-typedef enum ppd_status_e              /**** Status Codes @since CUPS 1.1.19@ ****/
+typedef enum ppd_status_e              /**** Status Codes @since CUPS 1.1.19/Mac OS X 10.3@ ****/
 {
   PPD_OK = 0,                          /* OK */
   PPD_FILE_OPEN_ERROR,                 /* Unable to open PPD file */
@@ -118,16 +118,16 @@ typedef enum ppd_status_e         /**** Status Codes @since CUPS 1.1.19@ ****/
   PPD_BAD_CUSTOM_PARAM                 /* Bad custom parameter */
 } ppd_status_t;
 
-enum ppd_conform_e                     /**** Conformance Levels @since CUPS 1.1.19@ ****/
+enum ppd_conform_e                     /**** Conformance Levels @since CUPS 1.1.19/Mac OS X 10.3@ ****/
 {
   PPD_CONFORM_RELAXED,                 /* Relax whitespace and control char */
   PPD_CONFORM_STRICT                   /* Require strict conformance */
 };
 
 typedef enum ppd_conform_e ppd_conform_t;
-                                       /**** Conformance Levels @since CUPS 1.1.19@ ****/
+                                       /**** Conformance Levels @since CUPS 1.1.19/Mac OS X 10.3@ ****/
 
-typedef struct ppd_attr_s              /**** PPD Attribute Structure @since CUPS 1.1.19@ ****/
+typedef struct ppd_attr_s              /**** PPD Attribute Structure @since CUPS 1.1.19/Mac OS X 10.3@ ****/
 {
   char         name[PPD_MAX_NAME];     /* Name of attribute (cupsXYZ) */
   char         spec[PPD_MAX_NAME];     /* Specifier string, if any */
@@ -168,7 +168,7 @@ typedef struct ppd_group_s          /**** Groups ****/
    ****/
   char         text[PPD_MAX_TEXT - PPD_MAX_NAME];
                                        /* Human-readable group name */
-  char         name[PPD_MAX_NAME];     /* Group name @since CUPS 1.1.18@ */
+  char         name[PPD_MAX_NAME];     /* Group name @since CUPS 1.1.18/Mac OS X 10.3@ */
   int          num_options;            /* Number of options */
   ppd_option_t *options;               /* Options */
   int          num_subgroups;          /* Number of sub-groups */
@@ -214,7 +214,7 @@ typedef struct ppd_profile_s                /**** sRGB Color Profiles ****/
 } ppd_profile_t;
 
 /**** New in CUPS 1.2 ****/
-typedef enum ppd_cptype_e              /**** Custom Parameter Type @since CUPS 1.2@ ****/
+typedef enum ppd_cptype_e              /**** Custom Parameter Type @since CUPS 1.2/Mac OS X 10.5@ ****/
 {
   PPD_CUSTOM_CURVE,                    /* Curve value for f(x) = x^value */
   PPD_CUSTOM_INT,                      /* Integer number value */
@@ -226,7 +226,7 @@ typedef enum ppd_cptype_e           /**** Custom Parameter Type @since CUPS 1.2@ ****/
   PPD_CUSTOM_STRING                    /* String of characters */
 } ppd_cptype_t;
 
-typedef union ppd_cplimit_u            /**** Custom Parameter Limit @since CUPS 1.2@ ****/
+typedef union ppd_cplimit_u            /**** Custom Parameter Limit @since CUPS 1.2/Mac OS X 10.5@ ****/
 {
   float                custom_curve;           /* Gamma value */
   int          custom_int;             /* Integer value */
@@ -238,7 +238,7 @@ typedef union ppd_cplimit_u         /**** Custom Parameter Limit @since CUPS 1.2@ ****/
   int          custom_string;          /* String length */
 } ppd_cplimit_t;
 
-typedef union ppd_cpvalue_u            /**** Custom Parameter Value @since CUPS 1.2@ ****/
+typedef union ppd_cpvalue_u            /**** Custom Parameter Value @since CUPS 1.2/Mac OS X 10.5@ ****/
 {
   float                custom_curve;           /* Gamma value */
   int          custom_int;             /* Integer value */
@@ -250,7 +250,7 @@ typedef union ppd_cpvalue_u         /**** Custom Parameter Value @since CUPS 1.2@ ****/
   char         *custom_string;         /* String value */
 } ppd_cpvalue_t;
 
-typedef struct ppd_cparam_s            /**** Custom Parameter @since CUPS 1.2@ ****/
+typedef struct ppd_cparam_s            /**** Custom Parameter @since CUPS 1.2/Mac OS X 10.5@ ****/
 {
   char         name[PPD_MAX_NAME];     /* Parameter name */
   char         text[PPD_MAX_TEXT];     /* Human-readable text */
@@ -261,7 +261,7 @@ typedef struct ppd_cparam_s         /**** Custom Parameter @since CUPS 1.2@ ****/
   ppd_cpvalue_t        current;                /* Current value */
 } ppd_cparam_t;
 
-typedef struct ppd_coption_s           /**** Custom Option @since CUPS 1.2@ ****/
+typedef struct ppd_coption_s           /**** Custom Option @since CUPS 1.2/Mac OS X 10.5@ ****/
 {
   char         keyword[PPD_MAX_NAME];  /* Name of option that is being extended... */
   ppd_option_t *option;                /* Option that is being extended... */
@@ -315,19 +315,19 @@ typedef struct ppd_file_s         /**** PPD File ****/
   int          flip_duplex;            /* 1 = Flip page for back sides @deprecated@ */
 
   /**** New in CUPS 1.1.19 ****/
-  char         *protocols;             /* Protocols (BCP, TBCP) string @since CUPS 1.1.19@ */
-  char         *pcfilename;            /* PCFileName string @since CUPS 1.1.19@ */
-  int          num_attrs;              /* Number of attributes @since CUPS 1.1.19@ @private@ */
-  int          cur_attr;               /* Current attribute @since CUPS 1.1.19@ @private@ */
-  ppd_attr_t   **attrs;                /* Attributes @since CUPS 1.1.19@ @private@ */
+  char         *protocols;             /* Protocols (BCP, TBCP) string @since CUPS 1.1.19/Mac OS X 10.3@ */
+  char         *pcfilename;            /* PCFileName string @since CUPS 1.1.19/Mac OS X 10.3@ */
+  int          num_attrs;              /* Number of attributes @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */
+  int          cur_attr;               /* Current attribute @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */
+  ppd_attr_t   **attrs;                /* Attributes @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */
 
   /**** New in CUPS 1.2 ****/
-  cups_array_t *sorted_attrs;          /* Attribute lookup array @since CUPS 1.2@ @private@ */
-  cups_array_t *options;               /* Option lookup array @since CUPS 1.2@ @private@ */
-  cups_array_t *coptions;              /* Custom options array @since CUPS 1.2@ @private@ */
+  cups_array_t *sorted_attrs;          /* Attribute lookup array @since CUPS 1.2/Mac OS X 10.5@ @private@ */
+  cups_array_t *options;               /* Option lookup array @since CUPS 1.2/Mac OS X 10.5@ @private@ */
+  cups_array_t *coptions;              /* Custom options array @since CUPS 1.2/Mac OS X 10.5@ @private@ */
 
   /**** New in CUPS 1.3 ****/
-  cups_array_t *marked;                /* Marked choices @since CUPS 1.3@ @private@ */
+  cups_array_t *marked;                /* Marked choices @since CUPS 1.3/Mac OS X 10.5@ @private@ */
 
   /**** New in CUPS 1.4 ****/
   cups_array_t *cups_uiconstraints;    /* cupsUIConstraints @since CUPS 1.4@ @private@ */
index 20f362bb714b3beb136bdc50d8857d237647115a..86d4a255c11ead3937a287b0e42306db18a36cbe 100644 (file)
@@ -101,25 +101,25 @@ typedef enum cups_cspace_e                /**** cupsColorSpace attribute values ****/
   CUPS_CSPACE_GOLD = 13,               /* Gold foil */
   CUPS_CSPACE_SILVER = 14,             /* Silver foil */
 
-  CUPS_CSPACE_CIEXYZ = 15,             /* CIE XYZ @since CUPS 1.1.19@ */
-  CUPS_CSPACE_CIELab = 16,             /* CIE Lab @since CUPS 1.1.19@ */
+  CUPS_CSPACE_CIEXYZ = 15,             /* CIE XYZ @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_CIELab = 16,             /* CIE Lab @since CUPS 1.1.19/Mac OS X 10.3@ */
   CUPS_CSPACE_RGBW = 17,               /* Red, green, blue, white @since CUPS 1.2/Mac OS X 10.5@ */
 
-  CUPS_CSPACE_ICC1 = 32,               /* ICC-based, 1 color @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICC2 = 33,               /* ICC-based, 2 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICC3 = 34,               /* ICC-based, 3 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICC4 = 35,               /* ICC-based, 4 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICC5 = 36,               /* ICC-based, 5 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICC6 = 37,               /* ICC-based, 6 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICC7 = 38,               /* ICC-based, 7 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICC8 = 39,               /* ICC-based, 8 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICC9 = 40,               /* ICC-based, 9 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICCA = 41,               /* ICC-based, 10 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICCB = 42,               /* ICC-based, 11 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICCC = 43,               /* ICC-based, 12 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICCD = 44,               /* ICC-based, 13 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICCE = 45,               /* ICC-based, 14 colors @since CUPS 1.1.19@ */
-  CUPS_CSPACE_ICCF = 46                        /* ICC-based, 15 colors @since CUPS 1.1.19@ */
+  CUPS_CSPACE_ICC1 = 32,               /* ICC-based, 1 color @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICC2 = 33,               /* ICC-based, 2 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICC3 = 34,               /* ICC-based, 3 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICC4 = 35,               /* ICC-based, 4 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICC5 = 36,               /* ICC-based, 5 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICC6 = 37,               /* ICC-based, 6 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICC7 = 38,               /* ICC-based, 7 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICC8 = 39,               /* ICC-based, 8 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICC9 = 40,               /* ICC-based, 9 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICCA = 41,               /* ICC-based, 10 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICCB = 42,               /* ICC-based, 11 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICCC = 43,               /* ICC-based, 12 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICCD = 44,               /* ICC-based, 13 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICCE = 45,               /* ICC-based, 14 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
+  CUPS_CSPACE_ICCF = 46                        /* ICC-based, 15 colors @since CUPS 1.1.19/Mac OS X 10.3@ */
 } cups_cspace_t;
 
 typedef enum cups_cut_e                        /**** CutMedia attribute values ****/
@@ -151,7 +151,7 @@ enum cups_mode_e                    /**** cupsRasterOpen modes ****/
 {
   CUPS_RASTER_READ = 0,                        /* Open stream for reading */
   CUPS_RASTER_WRITE = 1,               /* Open stream for writing */
-  CUPS_RASTER_WRITE_COMPRESSED = 2     /* Open stream for compressed writing @since CUPS 1.3@ */
+  CUPS_RASTER_WRITE_COMPRESSED = 2     /* Open stream for compressed writing @since CUPS 1.3/Mac OS X 10.5@ */
 };
 
 typedef enum cups_mode_e cups_mode_t;  /**** cupsRasterOpen modes ****/
index 20f3b2f751ee1314875dea876a5961df28e6f913..5169267299b2069248e191477b3f605a62d4a793 100644 (file)
@@ -112,7 +112,7 @@ cupsDoFileRequest(http_t     *http, /* I - Connection to server or @code CUPS_HT
  * If "outfile" is a valid file descriptor, cupsDoIORequest() copies
  * all of the data after the IPP response message to the file.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 ipp_t *                                        /* O - Response data */
index 0b79f8b0132242f369d4825e63502c0a958d396d..ccf1d190456a77e967f91422b12968f8c3bafe37 100644 (file)
@@ -59,7 +59,7 @@
  * pointed to by the "data" parameter.  cupsSideChannelDoRequest() will
  * update the value to contain the number of data bytes in the buffer.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 cups_sc_status_t                       /* O  - Status of command */
@@ -98,7 +98,7 @@ cupsSideChannelDoRequest(
  * pointed to by the "data" parameter.  cupsSideChannelDoRequest() will
  * update the value to contain the number of data bytes in the buffer.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on success, -1 on error */
@@ -455,7 +455,7 @@ cupsSideChannelSNMPWalk(
  * This function is normally only called by backend programs to send
  * responses to a filter, driver, or port monitor program.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 int                                    /* O - 0 on success, -1 on error */
index 943e8ed90b62d3c1a55924c3800ef9bf6296d8be..69a91ac51e57fba351d1c8c1f6a7489575f92a41 100644 (file)
@@ -111,8 +111,6 @@ static void         snmp_set_error(cups_snmp_t *packet,
 
 /*
  * '_cupsSNMPClose()' - Close a SNMP socket.
- *
- * @since CUPS 1.4@
  */
 
 void
@@ -132,8 +130,6 @@ _cupsSNMPClose(int fd)                      /* I - SNMP socket file descriptor */
  * '_cupsSNMPCopyOID()' - Copy an OID.
  *
  * The array pointed to by "src" is terminated by the value -1.
- *
- * @since CUPS 1.4@
  */
 
 int *                                  /* O - New OID */
@@ -161,8 +157,6 @@ _cupsSNMPCopyOID(int       *dst,    /* I - Destination OID */
  *
  * The default community name is the first community name found in the
  * snmp.conf file. If no community name is defined there, "public" is used.
- *
- * @since CUPS 1.4@
  */
 
 const char *                           /* O - Default community name */
@@ -207,8 +201,6 @@ _cupsSNMPDefaultCommunity(void)
  * '_cupsSNMPIsOID()' - Test whether a SNMP response contains the specified OID.
  *
  * The array pointed to by "oid" is terminated by the value -1.
- *
- * @since CUPS 1.4@
  */
 
 int                                    /* O - 1 if equal, 0 if not equal */
@@ -257,8 +249,6 @@ _cupsSNMPIsOID(cups_snmp_t *packet, /* I - Response packet */
  *                              OID prefix.
  *
  * The array pointed to by "prefix" is terminated by the value -1.
- *
- * @since CUPS 1.4@
  */
 
 int                                    /* O - 1 if prefixed, 0 if not prefixed */
@@ -306,8 +296,6 @@ _cupsSNMPIsOIDPrefixed(
 
 /*
  * '_cupsSNMPOIDToString()' - Convert an OID to a string.
- *
- * @since CUPS 1.4@
  */
 
 
@@ -348,8 +336,6 @@ _cupsSNMPOIDToString(const int *src,        /* I - OID */
 
 /*
  * '_cupsSNMPOpen()' - Open a SNMP socket.
- *
- * @since CUPS 1.4@
  */
 
 int                                    /* O - SNMP socket file descriptor */
@@ -398,8 +384,6 @@ _cupsSNMPOpen(int family)           /* I - Address family - @code AF_INET@ or @code AF_IN
  *
  * If "timeout" is negative, @code _cupsSNMPRead@ will wait for a response
  * indefinitely.
- *
- * @since CUPS 1.4@
  */
 
 cups_snmp_t *                          /* O - SNMP packet or @code NULL@ if none */
@@ -513,8 +497,6 @@ _cupsSNMPRead(int         fd,               /* I - SNMP socket file descriptor */
 
 /*
  * '_cupsSNMPSetDebug()' - Enable/disable debug logging to stderr.
- *
- * @since CUPS 1.4@
  */
 
 void
@@ -537,8 +519,6 @@ _cupsSNMPSetDebug(int level)                /* I - 1 to enable debug output, 0 otherwise */
  *
  * @code NULL@ is returned if the array is not large enough or the string is
  * not a valid OID number.
- *
- * @since CUPS 1.4@
  */
 
 int *                                  /* O - Pointer to OID array or @code NULL@ on error */
@@ -609,8 +589,6 @@ _cupsSNMPStringToOID(const char *src,       /* I - OID string */
  *
  * If "timeout" is negative, @code _cupsSNMPWalk@ will wait for a response
  * indefinitely.
- *
- * @since CUPS 1.4@
  */
 
 int                                    /* O - Number of OIDs found or -1 on error */
@@ -696,8 +674,6 @@ _cupsSNMPWalk(int            fd,    /* I - SNMP socket */
  * '_cupsSNMPWrite()' - Send an SNMP query packet.
  *
  * The array pointed to by "oid" is terminated by the value -1.
- *
- * @since CUPS 1.4@
  */
 
 int                                    /* O - 1 on success, 0 on error */
index bd7d9cc16064c07ab9a88965054089e20420f77f..632b2cc5bcee232641bb0b813e884ea974bc51ed 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   String functions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *
  * Contents:
  *
- *   _cupsStrAlloc()       - Allocate/reference a string.
- *   _cupsStrFlush()       - Flush the string pool...
- *   _cupsStrFormatd()     - Format a floating-point number.
- *   _cupsStrFree()        - Free/dereference a string.
- *   _cupsStrScand()       - Scan a string for a floating-point number.
- *   _cupsStrStatistics()  - Return allocation statistics for string pool.
- *   _cups_strcpy()        - Copy a string allowing for overlapping strings.
- *   _cups_strdup()        - Duplicate a string.
- *   _cups_strcasecmp()    - Do a case-insensitive comparison.
- *   _cups_strncasecmp()   - Do a case-insensitive comparison on up to N chars.
- *   _cups_strlcat()       - Safely concatenate two strings.
- *   _cups_strlcpy()       - Safely copy two strings.
- *   compare_sp_items()    - Compare two string pool items...
+ *   _cupsStrAlloc()      - Allocate/reference a string.
+ *   _cupsStrFlush()      - Flush the string pool.
+ *   _cupsStrFormatd()    - Format a floating-point number.
+ *   _cupsStrFree()       - Free/dereference a string.
+ *   _cupsStrRetain()     - Increment the reference count of a string.
+ *   _cupsStrScand()      - Scan a string for a floating-point number.
+ *   _cupsStrStatistics() - Return allocation statistics for string pool.
+ *   _cups_strcpy()       - Copy a string allowing for overlapping strings.
+ *   _cups_strdup()       - Duplicate a string.
+ *   _cups_strcasecmp()   - Do a case-insensitive comparison.
+ *   _cups_strncasecmp()  - Do a case-insensitive comparison on up to N chars.
+ *   _cups_strlcat()      - Safely concatenate two strings.
+ *   _cups_strlcpy()      - Safely copy two strings.
+ *   compare_sp_items()   - Compare two string pool items...
  */
 
 /*
@@ -72,7 +73,7 @@ char *                                        /* O - String pointer */
 _cupsStrAlloc(const char *s)           /* I - String */
 {
   _cups_sp_item_t      *item,          /* String pool item */
-                       key;            /* Search key */
+                       *key;           /* Search key */
 
 
  /*
@@ -106,9 +107,9 @@ _cupsStrAlloc(const char *s)                /* I - String */
   * See if the string is already in the pool...
   */
 
-  key.str = (char *)s;
+  key = (_cups_sp_item_t *)(s - sizeof(unsigned int));
 
-  if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, &key)) != NULL)
+  if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, key)) != NULL)
   {
    /*
     * Found it, return the cached string...
@@ -127,7 +128,7 @@ _cupsStrAlloc(const char *s)                /* I - String */
   * Not found, so allocate a new one...
   */
 
-  item = (_cups_sp_item_t *)calloc(1, sizeof(_cups_sp_item_t));
+  item = (_cups_sp_item_t *)calloc(1, sizeof(_cups_sp_item_t) + strlen(s));
   if (!item)
   {
 #ifdef HAVE_PTHREAD_H
@@ -138,18 +139,7 @@ _cupsStrAlloc(const char *s)               /* I - String */
   }
 
   item->ref_count = 1;
-  item->str       = strdup(s);
-
-  if (!item->str)
-  {
-    free(item);
-
-#ifdef HAVE_PTHREAD_H
-    pthread_mutex_unlock(&sp_mutex);
-#endif /* HAVE_PTHREAD_H */
-
-    return (NULL);
-  }
+  strcpy(item->str, s);
 
  /*
   * Add the string to the pool and return it...
@@ -166,7 +156,7 @@ _cupsStrAlloc(const char *s)                /* I - String */
 
 
 /*
- * '_cupsStrFlush()' - Flush the string pool...
+ * '_cupsStrFlush()' - Flush the string pool.
  */
 
 void
@@ -185,10 +175,7 @@ _cupsStrFlush(void)
   for (item = (_cups_sp_item_t *)cupsArrayFirst(stringpool);
        item;
        item = (_cups_sp_item_t *)cupsArrayNext(stringpool))
-  {
-    free(item->str);
     free(item);
-  }
 
   cupsArrayDelete(stringpool);
   stringpool = NULL;
@@ -287,7 +274,7 @@ void
 _cupsStrFree(const char *s)            /* I - String to free */
 {
   _cups_sp_item_t      *item,          /* String pool item */
-                       key;            /* Search key */
+                       *key;           /* Search key */
 
 
  /*
@@ -316,10 +303,10 @@ _cupsStrFree(const char *s)               /* I - String to free */
   pthread_mutex_lock(&sp_mutex);
 #endif /* HAVE_PTHREAD_H */
 
-  key.str = (char *)s;
+  key = (_cups_sp_item_t *)(s - sizeof(unsigned int));
 
-  if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, &key)) != NULL &&
-      item->str == s)
+  if ((item = (_cups_sp_item_t *)cupsArrayFind(stringpool, key)) != NULL &&
+      item == key)
   {
    /*
     * Found it, dereference...
@@ -335,7 +322,6 @@ _cupsStrFree(const char *s)         /* I - String to free */
 
       cupsArrayRemove(stringpool, item);
 
-      free(item->str);
       free(item);
     }
   }
@@ -346,6 +332,39 @@ _cupsStrFree(const char *s)                /* I - String to free */
 }
 
 
+/*
+ * '_cupsStrRetain()' - Increment the reference count of a string.
+ *
+ * Note: This function does not verify that the passed pointer is in the
+ *       string pool, so any calls to it MUST know they are passing in a
+ *       good pointer.
+ */
+
+char *                                 /* O - Pointer to string */
+_cupsStrRetain(char *s)                        /* I - String to retain */
+{
+  _cups_sp_item_t      *item;          /* Pointer to string pool item */
+
+
+  if (s)
+  {
+    item = (_cups_sp_item_t *)(s - sizeof(unsigned int));
+
+#ifdef HAVE_PTHREAD_H
+    pthread_mutex_lock(&sp_mutex);
+#endif /* HAVE_PTHREAD_H */
+
+    item->ref_count ++;
+
+#ifdef HAVE_PTHREAD_H
+    pthread_mutex_unlock(&sp_mutex);
+#endif /* HAVE_PTHREAD_H */
+  }
+
+  return (s);
+}
+
+
 /*
  * '_cupsStrScand()' - Scan a string for a floating-point number.
  *
index e0cd0e49b26357d9dbf353855ffd0190e920a5a2..e9a44ee8c3b8832d3304229d29ea647301538615 100644 (file)
@@ -68,8 +68,8 @@ extern "C" {
 
 typedef struct _cups_sp_item_s         /**** String Pool Item ****/
 {
-  char         *str;                   /* String */
   unsigned int ref_count;              /* Reference count */
+  char         str[1];                 /* String */
 } _cups_sp_item_t;
 
 
@@ -125,6 +125,7 @@ extern int  _cups_vsnprintf(char *, size_t, const char *, va_list);
 extern char    *_cupsStrAlloc(const char *s);
 extern void    _cupsStrFlush(void);
 extern void    _cupsStrFree(const char *s);
+extern char    *_cupsStrRetain(char *s);
 extern size_t  _cupsStrStatistics(size_t *alloc_bytes, size_t *total_bytes);
 
 
index 6dea52b100ec33b3ce22c7ac309b808640da442a..664b915f8db59c58f7879bef196236b8ac697816 100644 (file)
@@ -206,7 +206,7 @@ cupsTempFile(char *filename,                /* I - Pointer to buffer */
  * The temporary filename is returned in the filename buffer.
  * The temporary file is opened for writing.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 cups_file_t *                          /* O - CUPS file or @code NULL@ on error */
index e7603ec91d8a42a61829663321671e11c5e49c91..09aaa324c9b508ff76563b3d5c4b56368b2d2fb2 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Admin function test program for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
index 087ed4310fda51c33728db211c076f5a2d1fb7ef..834e08a90bd1f15d209ba5d2a0bc0e014a4db96b 100644 (file)
@@ -197,10 +197,10 @@ main(int  argc,                           /* I - Number of command-line arguments */
   fputs("cupsPrintFile: ", stdout);
   fflush(stdout);
 
-  if (cupsPrintFile(dest->name, "../data/testprint.ps", "Test Page",
+  if (cupsPrintFile(dest->name, "../data/testprint", "Test Page",
                     dest->num_options, dest->options) <= 0)
   {
-    puts("FAIL");
+    printf("FAIL (%s)\n", cupsLastErrorString());
     return (1);
   }
   else
index d03542cb9cf78bcbb7ce720e251a8d86f24d0620..30c0f54906e79a52ee3038b61408876a535ab4de 100644 (file)
@@ -449,7 +449,7 @@ cupsGetDefault(void)
  * functions to get the user-defined default printer, as this function does
  * not support the lpoptions-defined default printer.
  *
- * @since CUPS 1.1.21@
+ * @since CUPS 1.1.21/Mac OS X 10.4@
  */
 
 const char *                           /* O - Default printer or @code NULL@ */
@@ -546,7 +546,7 @@ cupsGetJobs(cups_job_t **jobs,              /* O - Job data */
  * pending, processing, or held and @code CUPS_WHICHJOBS_COMPLETED@ returns
  * jobs that are stopped, canceled, aborted, or completed.
  *
- * @since CUPS 1.1.21@
+ * @since CUPS 1.1.21/Mac OS X 10.4@
  */
 
 int                                    /* O - Number of jobs */
@@ -848,7 +848,7 @@ cupsGetPPD(const char *name)                /* I - Destination name */
  * The returned filename is stored in a static buffer and is overwritten with
  * each call to @link cupsGetPPD@ or @code cupsGetPPD2@.
  *
- * @since CUPS 1.1.21@
+ * @since CUPS 1.1.21/Mac OS X 10.4@
  */
 
 const char *                           /* O - Filename for PPD file */
@@ -937,6 +937,110 @@ cupsGetPPD3(http_t     *http,             /* I  - HTTP connection or @code CUPS_HTTP_DEFAUL
     return (HTTP_NOT_ACCEPTABLE);
   }
 
+#ifndef WIN32
+ /*
+  * See if the PPD file is available locally...
+  */
+
+  if (!cg->servername[0])
+    cupsServer();
+
+  if (!strcasecmp(cg->servername, "localhost"))
+  {
+    char       ppdname[1024];          /* PPD filename */
+    struct stat        ppdinfo;                /* PPD file information */
+
+
+    snprintf(ppdname, sizeof(ppdname), "%s/%s.ppd", cg->cups_serverroot, name);
+    if (!stat(ppdname, &ppdinfo))
+    {
+     /*
+      * OK, the file exists, use it!
+      */
+
+      if (buffer[0])
+      {
+        unlink(buffer);
+
+       if (symlink(ppdname, buffer) && errno != EEXIST)
+        {
+          _cupsSetError(IPP_INTERNAL_ERROR, NULL, 0);
+
+         return (HTTP_SERVER_ERROR);
+       }
+      }
+      else
+      {
+        int            tries;          /* Number of tries */
+        const char     *tmpdir;        /* TMPDIR environment variable */
+       struct timeval  curtime;        /* Current time */
+
+       /*
+       * Previously we put root temporary files in the default CUPS temporary
+       * directory under /var/spool/cups.  However, since the scheduler cleans
+       * out temporary files there and runs independently of the user apps, we
+       * don't want to use it unless specifically told to by cupsd.
+       */
+
+       if ((tmpdir = getenv("TMPDIR")) == NULL)
+#  ifdef __APPLE__
+         tmpdir = "/private/tmp";      /* /tmp is a symlink to /private/tmp */
+#  else
+          tmpdir = "/tmp";
+#  endif /* __APPLE__ */
+
+       /*
+       * Make the temporary name using the specified directory...
+       */
+
+       tries = 0;
+
+       do
+       {
+        /*
+         * Get the current time of day...
+         */
+
+         gettimeofday(&curtime, NULL);
+
+        /*
+         * Format a string using the hex time values...
+         */
+
+         snprintf(buffer, bufsize, "%s/%08lx%05lx", tmpdir,
+                  (unsigned long)curtime.tv_sec,
+                  (unsigned long)curtime.tv_usec);
+
+        /*
+         * Try to make a symlink...
+         */
+
+         if (!symlink(ppdname, buffer))
+           break;
+
+         tries ++;
+       }
+       while (tries < 1000);
+
+        if (tries >= 1000)
+       {
+          _cupsSetError(IPP_INTERNAL_ERROR, NULL, 0);
+
+         return (HTTP_SERVER_ERROR);
+       }
+      }
+
+      if (*modtime <= ppdinfo.st_mtime)
+        return (HTTP_NOT_MODIFIED);
+      else
+      {
+        *modtime = ppdinfo.st_mtime;
+       return (HTTP_OK);
+      }
+    }
+  }
+#endif /* !WIN32 */
+
  /*
   * Try finding a printer URI for this printer...
   */
@@ -1181,7 +1285,7 @@ cupsGetPrinters(char ***printers) /* O - Printers */
  * overwritten on the next call to @link cupsGetPPD@, @link cupsGetPPD2@,
  * or @link cupsGetServerPPD@.
  *
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
  */
 
 char *                                 /* O - Name of PPD file or @code NULL@ on error */
@@ -1260,7 +1364,7 @@ cupsLastError(void)
 /*
  * 'cupsLastErrorString()' - Return the last IPP status-message.
  *
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
  */
 
 const char *                           /* O - status-message text from last request */
@@ -1294,7 +1398,7 @@ cupsPrintFile(const char    *name,        /* I - Destination name */
  * 'cupsPrintFile2()' - Print a file to a printer or class on the specified
  *                      server.
  *
- * @since CUPS 1.1.21@
+ * @since CUPS 1.1.21/Mac OS X 10.4@
  */
 
 int                                    /* O - Job ID or 0 on error */
@@ -1347,7 +1451,7 @@ cupsPrintFiles(
  * 'cupsPrintFiles2()' - Print one or more files to a printer or class on the
  *                       specified server.
  *
- * @since CUPS 1.1.21@
+ * @since CUPS 1.1.21/Mac OS X 10.4@
  */
 
 int                                    /* O - Job ID or 0 on error */
index 300f41df5d350dee7c0498c783f50a76b68ab421..f7373e3b690eb57175ee601c3fed3a591977fd19 100644 (file)
@@ -364,6 +364,7 @@ div.contents ul.subcontents li {
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
 <li><a href="#MANAGING_ARRAYS">Managing Arrays</a></li>
 <li><a href="#FINDING_AND_ENUMERATING">Finding and Enumerating Elements</a></li>
@@ -396,7 +397,6 @@ div.contents ul.subcontents li {
        <li><a href="#cups_array_func_t" title="Array comparison function">cups_array_func_t</a></li>
        <li><a href="#cups_array_t" title="CUPS array type">cups_array_t</a></li>
 </ul></li>
-</ul>
 <!--
   "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
 
@@ -575,7 +575,7 @@ for (s = (char *)<a href='#cupsArrayFirst'>cupsArrayFirst</a>(array); s != NULL;
   puts(s);
 </pre>
 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayAdd">cupsArrayAdd</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayAdd">cupsArrayAdd</a></h3>
 <p class="description">Add an element to the array.</p>
 <p class="code">
 int cupsArrayAdd (<br>
@@ -597,7 +597,7 @@ appended at the end of the run of identical elements.  For unsorted arrays,
 the element is appended to the end of the array.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayClear">cupsArrayClear</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayClear">cupsArrayClear</a></h3>
 <p class="description">Clear the array.</p>
 <p class="code">
 void cupsArrayClear (<br>
@@ -614,7 +614,7 @@ The caller is responsible for freeing the memory used by the
 elements themselves.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayCount">cupsArrayCount</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayCount">cupsArrayCount</a></h3>
 <p class="description">Get the number of elements in the array.</p>
 <p class="code">
 int cupsArrayCount (<br>
@@ -627,7 +627,7 @@ int cupsArrayCount (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Number of elements</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayCurrent">cupsArrayCurrent</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayCurrent">cupsArrayCurrent</a></h3>
 <p class="description">Return the current element in the array.</p>
 <p class="code">
 void *cupsArrayCurrent (<br>
@@ -645,7 +645,7 @@ void *cupsArrayCurrent (<br>
 <a href="#cupsArrayFirst"><code>cupsArrayFirst</code></a>, or <a href="#cupsArrayIndex"><code>cupsArrayIndex</code></a>, or <a href="#cupsArrayLast"><code>cupsArrayLast</code></a>.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayDelete">cupsArrayDelete</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayDelete">cupsArrayDelete</a></h3>
 <p class="description">Free all memory used by the array.</p>
 <p class="code">
 void cupsArrayDelete (<br>
@@ -661,7 +661,7 @@ void cupsArrayDelete (<br>
 elements themselves.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayDup">cupsArrayDup</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayDup">cupsArrayDup</a></h3>
 <p class="description">Duplicate the array.</p>
 <p class="code">
 <a href="#cups_array_t">cups_array_t</a> *cupsArrayDup (<br>
@@ -674,7 +674,7 @@ elements themselves.
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Duplicate array</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayFind">cupsArrayFind</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayFind">cupsArrayFind</a></h3>
 <p class="description">Find an element in the array.</p>
 <p class="code">
 void *cupsArrayFind (<br>
@@ -690,7 +690,7 @@ void *cupsArrayFind (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Element found or <code>NULL</code></p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayFirst">cupsArrayFirst</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayFirst">cupsArrayFirst</a></h3>
 <p class="description">Get the first element in the array.</p>
 <p class="code">
 void *cupsArrayFirst (<br>
@@ -703,7 +703,7 @@ void *cupsArrayFirst (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">First element or <code>NULL</code> if the array is empty</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsArrayGetIndex">cupsArrayGetIndex</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsArrayGetIndex">cupsArrayGetIndex</a></h3>
 <p class="description">Get the index of the current element.</p>
 <p class="code">
 int cupsArrayGetIndex (<br>
@@ -721,7 +721,7 @@ int cupsArrayGetIndex (<br>
 <a href="#cupsArrayFirst"><code>cupsArrayFirst</code></a>, or <a href="#cupsArrayIndex"><code>cupsArrayIndex</code></a>, or <a href="#cupsArrayLast"><code>cupsArrayLast</code></a>.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsArrayGetInsert">cupsArrayGetInsert</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsArrayGetInsert">cupsArrayGetInsert</a></h3>
 <p class="description">Get the index of the last inserted element.</p>
 <p class="code">
 int cupsArrayGetInsert (<br>
@@ -734,7 +734,7 @@ int cupsArrayGetInsert (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Index of the last inserted element, starting at 0</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayIndex">cupsArrayIndex</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayIndex">cupsArrayIndex</a></h3>
 <p class="description">Get the N-th element in the array.</p>
 <p class="code">
 void *cupsArrayIndex (<br>
@@ -750,7 +750,7 @@ void *cupsArrayIndex (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">N-th element or <code>NULL</code></p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayInsert">cupsArrayInsert</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayInsert">cupsArrayInsert</a></h3>
 <p class="description">Insert an element in the array.</p>
 <p class="code">
 int cupsArrayInsert (<br>
@@ -772,7 +772,7 @@ inserted at the beginning of the run of identical elements.  For unsorted
 arrays, the element is inserted at the beginning of the array.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayLast">cupsArrayLast</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayLast">cupsArrayLast</a></h3>
 <p class="description">Get the last element in the array.</p>
 <p class="code">
 void *cupsArrayLast (<br>
@@ -785,7 +785,7 @@ void *cupsArrayLast (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Last element or <code>NULL</code> if the array is empty</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayNew">cupsArrayNew</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayNew">cupsArrayNew</a></h3>
 <p class="description">Create a new array.</p>
 <p class="code">
 <a href="#cups_array_t">cups_array_t</a> *cupsArrayNew (<br>
@@ -808,7 +808,7 @@ data pointer argument can safely be omitted when not required so functions
 like <code>strcmp</code> can be used for sorted string arrays.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsArrayNew2">cupsArrayNew2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsArrayNew2">cupsArrayNew2</a></h3>
 <p class="description">Create a new array with hash.</p>
 <p class="code">
 <a href="#cups_array_t">cups_array_t</a> *cupsArrayNew2 (<br>
@@ -840,7 +840,7 @@ The hash function (&quot;h&quot;) is used to implement cached lookups with the
 specified hash size (&quot;hsize&quot;).
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayNext">cupsArrayNext</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayNext">cupsArrayNext</a></h3>
 <p class="description">Get the next element in the array.</p>
 <p class="code">
 void *cupsArrayNext (<br>
@@ -861,7 +861,7 @@ The next element is undefined until you call <a href="#cupsArrayFind"><code>cups
 to set the current element.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayPrev">cupsArrayPrev</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayPrev">cupsArrayPrev</a></h3>
 <p class="description">Get the previous element in the array.</p>
 <p class="code">
 void *cupsArrayPrev (<br>
@@ -882,7 +882,7 @@ The previous element is undefined until you call <a href="#cupsArrayFind"><code>
 to set the current element.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayRemove">cupsArrayRemove</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayRemove">cupsArrayRemove</a></h3>
 <p class="description">Remove an element from the array.</p>
 <p class="code">
 int cupsArrayRemove (<br>
@@ -906,7 +906,7 @@ The caller is responsible for freeing the memory used by the
 removed element.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayRestore">cupsArrayRestore</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayRestore">cupsArrayRestore</a></h3>
 <p class="description">Reset the current element to the last <a href="#cupsArraySave"><code>cupsArraySave</code></a>.</p>
 <p class="code">
 void *cupsArrayRestore (<br>
@@ -919,7 +919,7 @@ void *cupsArrayRestore (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">New current element</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArraySave">cupsArraySave</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArraySave">cupsArraySave</a></h3>
 <p class="description">Mark the current element for a later <a href="#cupsArrayRestore"><code>cupsArrayRestore</code></a>.</p>
 <p class="code">
 int cupsArraySave (<br>
@@ -940,7 +940,7 @@ to set the current element.<br>
 The save/restore stack is guaranteed to be at least 32 elements deep.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsArrayUserData">cupsArrayUserData</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsArrayUserData">cupsArrayUserData</a></h3>
 <p class="description">Return the user data for an array.</p>
 <p class="code">
 void *cupsArrayUserData (<br>
index f8500af3bb7f31c8b24644cb96930199596890c4..ca5d353b4a6c8839f2e1941b1d3b01baa577fb80 100644 (file)
@@ -370,6 +370,7 @@ div.contents ul.subcontents li {
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
 <li><a href="#CLIENTS_AND_SERVERS">Clients and Servers</a></li>
 <li><a href="#PRINTERS_AND_CLASSES">Printers and Classes</a></li>
@@ -381,6 +382,10 @@ div.contents ul.subcontents li {
 <li><a href="#FUNCTIONS">Functions</a><ul class="code">
 <li><a href="#cupsAddDest" title="Add a destination to the list of destinations.">cupsAddDest</a></li>
 <li><a href="#cupsAddOption" title="Add an option to an option array.">cupsAddOption</a></li>
+<li><a href="#cupsAdminCreateWindowsPPD" title="Create the Windows PPD file for a printer.">cupsAdminCreateWindowsPPD</a></li>
+<li><a href="#cupsAdminExportSamba" title="Export a printer to Samba.">cupsAdminExportSamba</a></li>
+<li><a href="#cupsAdminGetServerSettings" title="Get settings from the server.">cupsAdminGetServerSettings</a></li>
+<li><a href="#cupsAdminSetServerSettings" title="Set settings on the server.">cupsAdminSetServerSettings</a></li>
 <li><a href="#cupsCancelJob" title="Cancel a print job on the default server.">cupsCancelJob</a></li>
 <li><a href="#cupsCancelJob2" title="Cancel or purge a print job.">cupsCancelJob2</a></li>
 <li><a href="#cupsCreateJob" title="Create an empty job for streaming.">cupsCreateJob</a></li>
@@ -456,7 +461,6 @@ specified server.">cupsPrintFiles2</a></li>
 <li><a href="#ENUMERATIONS">Constants</a><ul class="code">
        <li><a href="#cups_ptype_e" title="Printer type/capability bit constants">cups_ptype_e</a></li>
 </ul></li>
-</ul>
 <!--
   "$Id: api-cups.shtml 7337 2008-02-22 04:44:04Z mike $"
 
@@ -958,6 +962,99 @@ int cupsAddOption (<br>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">New option arrays can be initialized simply by passing 0 for the
 &quot;num_options&quot; parameter.</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsAdminCreateWindowsPPD">cupsAdminCreateWindowsPPD</a></h3>
+<p class="description">Create the Windows PPD file for a printer.</p>
+<p class="code">
+char *cupsAdminCreateWindowsPPD (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;http_t *http,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *dest,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;int bufsize<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dt>dest</dt>
+<dd class="description">Printer or class</dd>
+<dt>buffer</dt>
+<dd class="description">Filename buffer</dd>
+<dt>bufsize</dt>
+<dd class="description">Size of filename buffer</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">PPD file or NULL</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsAdminExportSamba">cupsAdminExportSamba</a></h3>
+<p class="description">Export a printer to Samba.</p>
+<p class="code">
+int cupsAdminExportSamba (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *dest,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *ppd,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *samba_server,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *samba_user,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;const char *samba_password,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;FILE *logfile<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>dest</dt>
+<dd class="description">Destination to export</dd>
+<dt>ppd</dt>
+<dd class="description">PPD file</dd>
+<dt>samba_server</dt>
+<dd class="description">Samba server</dd>
+<dt>samba_user</dt>
+<dd class="description">Samba username</dd>
+<dt>samba_password</dt>
+<dd class="description">Samba password</dd>
+<dt>logfile</dt>
+<dd class="description">Log file, if any</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">1 on success, 0 on failure</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsAdminGetServerSettings">cupsAdminGetServerSettings</a></h3>
+<p class="description">Get settings from the server.</p>
+<p class="code">
+int cupsAdminGetServerSettings (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;http_t *http,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;int *num_settings,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_option_t">cups_option_t</a> **settings<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dt>num_settings</dt>
+<dd class="description">Number of settings</dd>
+<dt>settings</dt>
+<dd class="description">Settings</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">1 on success, 0 on failure</p>
+<h4 class="discussion">Discussion</h4>
+<p class="discussion">The returned settings should be freed with cupsFreeOptions() when
+you are done with them.
+
+</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsAdminSetServerSettings">cupsAdminSetServerSettings</a></h3>
+<p class="description">Set settings on the server.</p>
+<p class="code">
+int cupsAdminSetServerSettings (<br>
+&nbsp;&nbsp;&nbsp;&nbsp;http_t *http,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;int num_settings,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_option_t">cups_option_t</a> *settings<br>
+);</p>
+<h4 class="parameters">Parameters</h4>
+<dl>
+<dt>http</dt>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dt>num_settings</dt>
+<dd class="description">Number of settings</dd>
+<dt>settings</dt>
+<dd class="description">Settings</dd>
+</dl>
+<h4 class="returnvalue">Return Value</h4>
+<p class="description">1 on success, 0 on failure</p>
 <h3 class="function"><a name="cupsCancelJob">cupsCancelJob</a></h3>
 <p class="description">Cancel a print job on the default server.</p>
 <p class="code">
@@ -1149,7 +1246,7 @@ variables are not set, the server default destination is returned.
 Applications should use the <a href="#cupsGetDests"><code>cupsGetDests</code></a> and <a href="#cupsGetDest"><code>cupsGetDest</code></a>
 functions to get the user-defined default printer, as this function does
 not support the lpoptions-defined default printer.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="cupsGetDefault2">cupsGetDefault2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="cupsGetDefault2">cupsGetDefault2</a></h3>
 <p class="description">Get the default printer or class for the specified server.</p>
 <p class="code">
 const char *cupsGetDefault2 (<br>
@@ -1213,11 +1310,14 @@ int cupsGetDests (<br>
 <p class="discussion">Starting with CUPS 1.2, the returned list of destinations include the
 printer-info, printer-is-accepting-jobs, printer-is-shared,
 printer-make-and-model, printer-state, printer-state-change-time,
-printer-state-reasons, and printer-type attributes as options.<br>
+printer-state-reasons, and printer-type attributes as options.  CUPS 1.4
+adds the marker-change-time, marker-colors, marker-high-levels,
+marker-levels, marker-low-levels, marker-message, marker-names,
+marker-types, and printer-commands attributes as well.<br>
 <br>
 Use the <a href="#cupsFreeDests"><code>cupsFreeDests</code></a> function to free the destination list and
 the <a href="#cupsGetDest"><code>cupsGetDest</code></a> function to find a particular destination.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="cupsGetDests2">cupsGetDests2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="cupsGetDests2">cupsGetDests2</a></h3>
 <p class="description">Get the list of destinations from the specified server.</p>
 <p class="code">
 int cupsGetDests2 (<br>
@@ -1237,7 +1337,10 @@ int cupsGetDests2 (<br>
 <p class="discussion">Starting with CUPS 1.2, the returned list of destinations include the
 printer-info, printer-is-accepting-jobs, printer-is-shared,
 printer-make-and-model, printer-state, printer-state-change-time,
-printer-state-reasons, and printer-type attributes as options.<br>
+printer-state-reasons, and printer-type attributes as options.  CUPS 1.4
+adds the marker-change-time, marker-colors, marker-high-levels,
+marker-levels, marker-low-levels, marker-message, marker-names,
+marker-types, and printer-commands attributes as well.<br>
 <br>
 Use the <a href="#cupsFreeDests"><code>cupsFreeDests</code></a> function to free the destination list and
 the <a href="#cupsGetDest"><code>cupsGetDest</code></a> function to find a particular destination.
@@ -1270,7 +1373,7 @@ int cupsGetJobs (<br>
 of state, while <code>CUPS_WHICHJOBS_ACTIVE</code> returns jobs that are
 pending, processing, or held and <code>CUPS_WHICHJOBS_COMPLETED</code> returns
 jobs that are stopped, canceled, aborted, or completed.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="cupsGetJobs2">cupsGetJobs2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="cupsGetJobs2">cupsGetJobs2</a></h3>
 <p class="description">Get the jobs from the specified server.</p>
 <p class="code">
 int cupsGetJobs2 (<br>
@@ -1376,7 +1479,7 @@ in the class.<br>
 <br>
 The returned filename is stored in a static buffer and is overwritten with
 each call to <code>cupsGetPPD</code> or <a href="#cupsGetPPD2"><code>cupsGetPPD2</code></a>.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="cupsGetPPD2">cupsGetPPD2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="cupsGetPPD2">cupsGetPPD2</a></h3>
 <p class="description">Get the PPD file for a printer from the specified server.</p>
 <p class="code">
 const char *cupsGetPPD2 (<br>
@@ -1476,7 +1579,7 @@ int cupsGetPrinters (<br>
 <p class="discussion">This function is deprecated - use <a href="#cupsGetDests"><code>cupsGetDests</code></a> instead.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsGetServerPPD">cupsGetServerPPD</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsGetServerPPD">cupsGetServerPPD</a></h3>
 <p class="description">Get an available PPD file from the server.</p>
 <p class="code">
 char *cupsGetServerPPD (<br>
@@ -1559,13 +1662,13 @@ cups_lang_t *cupsLangGet (<br>
 ipp_status_t cupsLastError (void);</p>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">IPP status code from last request</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsLastErrorString">cupsLastErrorString</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsLastErrorString">cupsLastErrorString</a></h3>
 <p class="description">Return the last IPP status-message.</p>
 <p class="code">
 const char *cupsLastErrorString (void);</p>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">status-message text from last request</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsNotifySubject">cupsNotifySubject</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsNotifySubject">cupsNotifySubject</a></h3>
 <p class="description">Return the subject for the given notification message.</p>
 <p class="code">
 char *cupsNotifySubject (<br>
@@ -1585,7 +1688,7 @@ char *cupsNotifySubject (<br>
 <p class="discussion">The returned string must be freed by the caller using <code>free</code>.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsNotifyText">cupsNotifyText</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsNotifyText">cupsNotifyText</a></h3>
 <p class="description">Return the text for the given notification message.</p>
 <p class="code">
 char *cupsNotifyText (<br>
@@ -1655,7 +1758,7 @@ int cupsPrintFile (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Job ID or 0 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="cupsPrintFile2">cupsPrintFile2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="cupsPrintFile2">cupsPrintFile2</a></h3>
 <p class="description">Print a file to a printer or class on the specified
 server.</p>
 <p class="code">
@@ -1713,7 +1816,7 @@ int cupsPrintFiles (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Job ID or 0 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="cupsPrintFiles2">cupsPrintFiles2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="cupsPrintFiles2">cupsPrintFiles2</a></h3>
 <p class="description">Print one or more files to a printer or class on the
 specified server.</p>
 <p class="code">
@@ -1745,7 +1848,7 @@ int cupsPrintFiles2 (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Job ID or 0 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsRemoveDest">cupsRemoveDest</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsRemoveDest">cupsRemoveDest</a></h3>
 <p class="description">Remove a destination from the destination list.</p>
 <p class="code">
 int cupsRemoveDest (<br>
@@ -1774,7 +1877,7 @@ queue, merely the lpoptions for that destination/instance.  Use the
 options for the user.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsRemoveOption">cupsRemoveOption</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsRemoveOption">cupsRemoveOption</a></h3>
 <p class="description">Remove an option from an option array.</p>
 <p class="code">
 int cupsRemoveOption (<br>
@@ -1802,7 +1905,7 @@ const char *cupsServer (void);</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">The returned value can be a fully-qualified hostname, a numeric
 IPv4 or IPv6 address, or a domain socket pathname.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsSetDefaultDest">cupsSetDefaultDest</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsSetDefaultDest">cupsSetDefaultDest</a></h3>
 <p class="description">Set the default destination.</p>
 <p class="code">
 void cupsSetDefaultDest (<br>
@@ -1839,7 +1942,7 @@ void cupsSetDests (<br>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">This function saves the destinations to /etc/cups/lpoptions when run
 as root and ~/.cups/lpoptions when run as a normal user.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="cupsSetDests2">cupsSetDests2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="cupsSetDests2">cupsSetDests2</a></h3>
 <p class="description">Save the list of destinations for the specified server.</p>
 <p class="code">
 int cupsSetDests2 (<br>
@@ -1994,7 +2097,7 @@ This function is deprecated - use <a href="#cupsTempFd"><code>cupsTempFd</code><
 <a href="#cupsTempFile2"><code>cupsTempFile2</code></a> instead.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsTempFile2">cupsTempFile2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsTempFile2">cupsTempFile2</a></h3>
 <p class="description">Creates a temporary CUPS file.</p>
 <p class="code">
 cups_file_t *cupsTempFile2 (<br>
@@ -2130,7 +2233,7 @@ typedef unsigned cups_ptype_t;
 <p class="description">Printer type/capability bit constants</p>
 <h4 class="constants">Constants</h4>
 <dl>
-<dt>CUPS_PRINTER_AUTHENTICATED <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>CUPS_PRINTER_AUTHENTICATED <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Printer requires authentication </dd>
 <dt>CUPS_PRINTER_BIND </dt>
 <dd class="description">Can bind output</dd>
@@ -2142,7 +2245,7 @@ typedef unsigned cups_ptype_t;
 <dd class="description">Can collage copies</dd>
 <dt>CUPS_PRINTER_COLOR </dt>
 <dd class="description">Can do color printing</dd>
-<dt>CUPS_PRINTER_COMMANDS <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>CUPS_PRINTER_COMMANDS <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Printer supports maintenance commands </dd>
 <dt>CUPS_PRINTER_COPIES </dt>
 <dd class="description">Can do copies</dd>
@@ -2150,9 +2253,9 @@ typedef unsigned cups_ptype_t;
 <dd class="description">Can cover output</dd>
 <dt>CUPS_PRINTER_DEFAULT </dt>
 <dd class="description">Default printer on network</dd>
-<dt>CUPS_PRINTER_DELETE <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>CUPS_PRINTER_DELETE <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Delete printer </dd>
-<dt>CUPS_PRINTER_DISCOVERED <span class="info">&nbsp;CUPS 1.3&nbsp;</span></dt>
+<dt>CUPS_PRINTER_DISCOVERED <span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Printer was automatically discovered and added </dd>
 <dt>CUPS_PRINTER_DUPLEX </dt>
 <dd class="description">Can do duplexing</dd>
@@ -2166,7 +2269,7 @@ typedef unsigned cups_ptype_t;
 <dd class="description">Local printer or class</dd>
 <dt>CUPS_PRINTER_MEDIUM </dt>
 <dd class="description">Can do Tabloid/B/C/A3/A2</dd>
-<dt>CUPS_PRINTER_NOT_SHARED <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>CUPS_PRINTER_NOT_SHARED <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Printer is not shared </dd>
 <dt>CUPS_PRINTER_PUNCH </dt>
 <dd class="description">Can punch output</dd>
index 99418d5148021a7590614d512f270284e262f675..9d00a98eb5718255d5101b3f7442fb6c8c550be3 100644 (file)
@@ -366,6 +366,7 @@ div.contents ul.subcontents li {
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#OVERVIEW">Overview</a></li>
 <li><a href="#FUNCTIONS">Functions</a><ul class="code">
 <li><a href="#cupsDirClose" title="Close a directory.">cupsDirClose</a></li>
@@ -410,7 +411,6 @@ file.">cupsFileRewind</a></li>
 <li><a href="#STRUCTURES">Structures</a><ul class="code">
        <li><a href="#cups_dentry_s" title="Directory entry type">cups_dentry_s</a></li>
 </ul></li>
-</ul>
 <!--
   "$Id: api-filedir.shtml 7279 2008-01-31 01:50:44Z mike $"
 
@@ -443,7 +443,7 @@ details of directory access/listing and provide a convenient way
 to get both a list of files and the information (permissions,
 size, timestamp, etc.) for each of those files.</p>
 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsDirClose">cupsDirClose</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsDirClose">cupsDirClose</a></h3>
 <p class="description">Close a directory.</p>
 <p class="code">
 void cupsDirClose (<br>
@@ -454,7 +454,7 @@ void cupsDirClose (<br>
 <dt>dp</dt>
 <dd class="description">Directory pointer</dd>
 </dl>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsDirOpen">cupsDirOpen</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsDirOpen">cupsDirOpen</a></h3>
 <p class="description">Open a directory.</p>
 <p class="code">
 <a href="#cups_dir_t">cups_dir_t</a> *cupsDirOpen (<br>
@@ -467,7 +467,7 @@ void cupsDirClose (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Directory pointer or <code>NULL</code> if the directory could not be opened.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsDirRead">cupsDirRead</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsDirRead">cupsDirRead</a></h3>
 <p class="description">Read the next directory entry.</p>
 <p class="code">
 <a href="#cups_dentry_t">cups_dentry_t</a> *cupsDirRead (<br>
@@ -480,7 +480,7 @@ void cupsDirClose (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Directory entry or <code>NULL</code> when there are no more</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsDirRewind">cupsDirRewind</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsDirRewind">cupsDirRewind</a></h3>
 <p class="description">Rewind to the start of the directory.</p>
 <p class="code">
 void cupsDirRewind (<br>
@@ -491,7 +491,7 @@ void cupsDirRewind (<br>
 <dt>dp</dt>
 <dd class="description">Directory pointer</dd>
 </dl>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileClose">cupsFileClose</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileClose">cupsFileClose</a></h3>
 <p class="description">Close a CUPS file.</p>
 <p class="code">
 int cupsFileClose (<br>
@@ -504,7 +504,7 @@ int cupsFileClose (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, -1 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileCompression">cupsFileCompression</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileCompression">cupsFileCompression</a></h3>
 <p class="description">Return whether a file is compressed.</p>
 <p class="code">
 int cupsFileCompression (<br>
@@ -517,7 +517,7 @@ int cupsFileCompression (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description"><code>CUPS_FILE_NONE</code> or <code>CUPS_FILE_GZIP</code></p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileEOF">cupsFileEOF</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileEOF">cupsFileEOF</a></h3>
 <p class="description">Return the end-of-file status.</p>
 <p class="code">
 int cupsFileEOF (<br>
@@ -530,7 +530,7 @@ int cupsFileEOF (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 on end of file, 0 otherwise</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileFind">cupsFileFind</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileFind">cupsFileFind</a></h3>
 <p class="description">Find a file using the specified path.</p>
 <p class="code">
 const char *cupsFileFind (<br>
@@ -563,7 +563,7 @@ the supplied paths, <code>NULL</code> is returned. A <code>NULL</code> path only
 matches the current directory.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileFlush">cupsFileFlush</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileFlush">cupsFileFlush</a></h3>
 <p class="description">Flush pending output.</p>
 <p class="code">
 int cupsFileFlush (<br>
@@ -576,7 +576,7 @@ int cupsFileFlush (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, -1 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileGetChar">cupsFileGetChar</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileGetChar">cupsFileGetChar</a></h3>
 <p class="description">Get a single character from a file.</p>
 <p class="code">
 int cupsFileGetChar (<br>
@@ -589,7 +589,7 @@ int cupsFileGetChar (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Character or -1 on end of file</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileGetConf">cupsFileGetConf</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileGetConf">cupsFileGetConf</a></h3>
 <p class="description">Get a line from a configuration file...</p>
 <p class="code">
 char *cupsFileGetConf (<br>
@@ -614,7 +614,7 @@ char *cupsFileGetConf (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Line read or <code>NULL</code> on end of file or error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileGetLine">cupsFileGetLine</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileGetLine">cupsFileGetLine</a></h3>
 <p class="description">Get a CR and/or LF-terminated line that may
 contain binary data.</p>
 <p class="code">
@@ -641,7 +641,7 @@ nul-terminated, however you should use the returned length to determine
 the number of bytes on the line.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileGets">cupsFileGets</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileGets">cupsFileGets</a></h3>
 <p class="description">Get a CR and/or LF-terminated line.</p>
 <p class="code">
 char *cupsFileGets (<br>
@@ -660,7 +660,7 @@ char *cupsFileGets (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Line read or <code>NULL</code> on end of file or error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileLock">cupsFileLock</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileLock">cupsFileLock</a></h3>
 <p class="description">Temporarily lock access to a file.</p>
 <p class="code">
 int cupsFileLock (<br>
@@ -676,7 +676,7 @@ int cupsFileLock (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, -1 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileNumber">cupsFileNumber</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileNumber">cupsFileNumber</a></h3>
 <p class="description">Return the file descriptor associated with a CUPS file.</p>
 <p class="code">
 int cupsFileNumber (<br>
@@ -689,7 +689,7 @@ int cupsFileNumber (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">File descriptor</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileOpen">cupsFileOpen</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileOpen">cupsFileOpen</a></h3>
 <p class="description">Open a CUPS file.</p>
 <p class="code">
 <a href="#cups_file_t">cups_file_t</a> *cupsFileOpen (<br>
@@ -720,7 +720,7 @@ connection as needed, generally preferring IPv6 connections when there is
 a choice.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileOpenFd">cupsFileOpenFd</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileOpenFd">cupsFileOpenFd</a></h3>
 <p class="description">Open a CUPS file using a file descriptor.</p>
 <p class="code">
 <a href="#cups_file_t">cups_file_t</a> *cupsFileOpenFd (<br>
@@ -745,7 +745,7 @@ supplied which enables Flate compression of the file.  Compression is
 not supported for the &quot;a&quot; (append) mode.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFilePeekChar">cupsFilePeekChar</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFilePeekChar">cupsFilePeekChar</a></h3>
 <p class="description">Peek at the next character from a file.</p>
 <p class="code">
 int cupsFilePeekChar (<br>
@@ -758,7 +758,7 @@ int cupsFilePeekChar (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Character or -1 on end of file</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFilePrintf">cupsFilePrintf</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFilePrintf">cupsFilePrintf</a></h3>
 <p class="description">Write a formatted string.</p>
 <p class="code">
 int cupsFilePrintf (<br>
@@ -777,7 +777,7 @@ int cupsFilePrintf (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Number of bytes written or -1 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFilePutChar">cupsFilePutChar</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFilePutChar">cupsFilePutChar</a></h3>
 <p class="description">Write a character.</p>
 <p class="code">
 int cupsFilePutChar (<br>
@@ -816,7 +816,7 @@ ssize_t cupsFilePutConf (<br>
 <p class="discussion">This function handles any comment escaping of the value.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFilePuts">cupsFilePuts</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFilePuts">cupsFilePuts</a></h3>
 <p class="description">Write a string.</p>
 <p class="code">
 int cupsFilePuts (<br>
@@ -836,7 +836,7 @@ int cupsFilePuts (<br>
 <p class="discussion">Like the <code>fputs</code> function, no newline is appended to the string.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileRead">cupsFileRead</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileRead">cupsFileRead</a></h3>
 <p class="description">Read from a file.</p>
 <p class="code">
 ssize_t cupsFileRead (<br>
@@ -855,7 +855,7 @@ ssize_t cupsFileRead (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Number of bytes read or -1 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileRewind">cupsFileRewind</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileRewind">cupsFileRewind</a></h3>
 <p class="description">Set the current file position to the beginning of the
 file.</p>
 <p class="code">
@@ -869,7 +869,7 @@ off_t cupsFileRewind (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">New file position or -1 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileSeek">cupsFileSeek</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileSeek">cupsFileSeek</a></h3>
 <p class="description">Seek in a file.</p>
 <p class="code">
 off_t cupsFileSeek (<br>
@@ -885,25 +885,25 @@ off_t cupsFileSeek (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">New file position or -1 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileStderr">cupsFileStderr</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileStderr">cupsFileStderr</a></h3>
 <p class="description">Return a CUPS file associated with stderr.</p>
 <p class="code">
 <a href="#cups_file_t">cups_file_t</a> *cupsFileStderr (void);</p>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">CUPS file</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileStdin">cupsFileStdin</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileStdin">cupsFileStdin</a></h3>
 <p class="description">Return a CUPS file associated with stdin.</p>
 <p class="code">
 <a href="#cups_file_t">cups_file_t</a> *cupsFileStdin (void);</p>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">CUPS file</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileStdout">cupsFileStdout</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileStdout">cupsFileStdout</a></h3>
 <p class="description">Return a CUPS file associated with stdout.</p>
 <p class="code">
 <a href="#cups_file_t">cups_file_t</a> *cupsFileStdout (void);</p>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">CUPS file</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileTell">cupsFileTell</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileTell">cupsFileTell</a></h3>
 <p class="description">Return the current file position.</p>
 <p class="code">
 off_t cupsFileTell (<br>
@@ -916,7 +916,7 @@ off_t cupsFileTell (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">File position</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileUnlock">cupsFileUnlock</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileUnlock">cupsFileUnlock</a></h3>
 <p class="description">Unlock access to a file.</p>
 <p class="code">
 int cupsFileUnlock (<br>
@@ -929,7 +929,7 @@ int cupsFileUnlock (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, -1 on error</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsFileWrite">cupsFileWrite</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsFileWrite">cupsFileWrite</a></h3>
 <p class="description">Write to a file.</p>
 <p class="code">
 ssize_t cupsFileWrite (<br>
index 2d1a13d885dc3fe7d50f147ba13481521dd45ccb..2202c4f7b9c9bff8c7aa6f72198251bf88340dfd 100644 (file)
@@ -370,6 +370,7 @@ div.contents ul.subcontents li {
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
 <li><a href="#SECURITY">Security Considerations</a></li>
 <li><a href="#TEMPFILES">Temporary Files</a></li>
@@ -407,7 +408,6 @@ div.contents ul.subcontents li {
        <li><a href="#cups_sc_state_e" title="Printer state bits">cups_sc_state_e</a></li>
        <li><a href="#cups_sc_status_e" title="Response status codes">cups_sc_status_e</a></li>
 </ul></li>
-</ul>
 <!--
   "$Id: api-filter.shtml 7962 2008-09-18 17:31:33Z mike $"
 
@@ -967,7 +967,7 @@ void *my_data;
 <a href="#cupsSideChannelSNMPWalk">cupsSNMPSideChannelWalk</a>(".1.3.6.1.2.1.43", 5.0, my_callback, my_data);
 </pre>
 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsBackChannelRead">cupsBackChannelRead</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsBackChannelRead">cupsBackChannelRead</a></h3>
 <p class="description">Read data from the backchannel.</p>
 <p class="code">
 ssize_t cupsBackChannelRead (<br>
@@ -992,7 +992,7 @@ parameter controls how many seconds to wait for the data - use 0.0 to
 return immediately if there is no data, -1.0 to wait for data indefinitely.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsBackChannelWrite">cupsBackChannelWrite</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsBackChannelWrite">cupsBackChannelWrite</a></h3>
 <p class="description">Write data to the backchannel.</p>
 <p class="code">
 ssize_t cupsBackChannelWrite (<br>
@@ -1018,7 +1018,7 @@ controls how many seconds to wait for the data to be written - use
 indefinitely.
 
 </p>
-<h3 class="function"><a name="cupsBackendDeviceURI">cupsBackendDeviceURI</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsBackendDeviceURI">cupsBackendDeviceURI</a></h3>
 <p class="description">Get the device URI for a backend.</p>
 <p class="code">
 const char *cupsBackendDeviceURI (<br>
@@ -1035,8 +1035,10 @@ const char *cupsBackendDeviceURI (<br>
 <p class="discussion">The &quot;argv&quot; argument is the argv argument passed to main(). This
 function returns the device URI passed in the DEVICE_URI environment
 variable or the device URI passed in argv[0], whichever is found
-first.</p>
-<h3 class="function"><a name="cupsBackendReport">cupsBackendReport</a></h3>
+first.
+
+</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsBackendReport">cupsBackendReport</a></h3>
 <p class="description">Write a device line from a backend.</p>
 <p class="code">
 void cupsBackendReport (<br>
@@ -1065,8 +1067,10 @@ void cupsBackendReport (<br>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">This function writes a single device line to stdout for a backend.
 It handles quoting of special characters in the device-make-and-model,
-device-info, device-id, and device-location strings.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsSideChannelDoRequest">cupsSideChannelDoRequest</a></h3>
+device-info, device-id, and device-location strings.
+
+</p>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsSideChannelDoRequest">cupsSideChannelDoRequest</a></h3>
 <p class="description">Send a side-channel command to a backend and wait for a response.</p>
 <p class="code">
 <a href="#cups_sc_status_t">cups_sc_status_t</a> cupsSideChannelDoRequest (<br>
@@ -1100,7 +1104,7 @@ pointed to by the &quot;data&quot; parameter.  cupsSideChannelDoRequest() will
 update the value to contain the number of data bytes in the buffer.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsSideChannelRead">cupsSideChannelRead</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsSideChannelRead">cupsSideChannelRead</a></h3>
 <p class="description">Read a side-channel message.</p>
 <p class="code">
 int cupsSideChannelRead (<br>
@@ -1223,7 +1227,7 @@ support SNMP queries.  <code>CUPS_SC_STATUS_NO_RESPONSE</code> is returned when
 the printer does not respond to the first SNMP query.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsSideChannelWrite">cupsSideChannelWrite</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsSideChannelWrite">cupsSideChannelWrite</a></h3>
 <p class="description">Write a side-channel message.</p>
 <p class="code">
 int cupsSideChannelWrite (<br>
index fd1f1bb7b6c0cfa2ca15117bab26adb18e6c2567..e120400f6e85e9d4a4f6e95a11f3421bc58c7395 100644 (file)
@@ -367,6 +367,7 @@ div.contents ul.subcontents li {
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
 <li><a href="#CREATING_URI_STRINGS">Creating URI Strings</a></li>
 <li><a href="#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files</a></li>
@@ -573,7 +574,6 @@ with a hostname. ">http_addrlist_s</a></li>
        <li><a href="#ipp_status_e" title="IPP status codes...">ipp_status_e</a></li>
        <li><a href="#ipp_tag_e" title="Format tags for attributes...">ipp_tag_e</a></li>
 </ul></li>
-</ul>
 <!--
   "$Id: api-httpipp.shtml 7684 2008-06-23 16:47:38Z mike $"
 
@@ -898,7 +898,7 @@ if (status == HTTP_CONTINUE)
 <a href='#ippDelete'>ippDelete</a>(request);
 </pre>
 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="cupsDoAuthentication">cupsDoAuthentication</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="cupsDoAuthentication">cupsDoAuthentication</a></h3>
 <p class="description">Authenticate a request.</p>
 <p class="code">
 int cupsDoAuthentication (<br>
@@ -948,7 +948,7 @@ status, prior to resubmitting your request.
 <p class="discussion">This function sends the IPP request to the specified server, retrying
 and authenticating as necessary.  The request is freed with <a href="#ippDelete"><code>ippDelete</code></a>
 after receiving a valid IPP response.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsDoIORequest">cupsDoIORequest</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsDoIORequest">cupsDoIORequest</a></h3>
 <p class="description">Do an IPP request with file descriptors.</p>
 <p class="code">
 <a href="#ipp_t">ipp_t</a> *cupsDoIORequest (<br>
@@ -1029,7 +1029,7 @@ void cupsEncodeOptions (<br>
 <p class="discussion">This function adds operation, job, and then subscription attributes,
 in that order. Use the cupsEncodeOptions2() function to add attributes
 for a single group.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsEncodeOptions2">cupsEncodeOptions2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsEncodeOptions2">cupsEncodeOptions2</a></h3>
 <p class="description">Encode printer options into IPP attributes for a group.</p>
 <p class="code">
 void cupsEncodeOptions2 (<br>
@@ -1091,7 +1091,7 @@ parameters provide comma-delimited lists of backends to include or omit from
 the request respectively.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="cupsGetFd">cupsGetFd</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="cupsGetFd">cupsGetFd</a></h3>
 <p class="description">Get a file from the server.</p>
 <p class="code">
 <a href="#http_status_t">http_status_t</a> cupsGetFd (<br>
@@ -1114,7 +1114,7 @@ the request respectively.
 <p class="discussion">This function returns <code>HTTP_OK</code> when the file is successfully retrieved.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="cupsGetFile">cupsGetFile</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="cupsGetFile">cupsGetFile</a></h3>
 <p class="description">Get a file from the server.</p>
 <p class="code">
 <a href="#http_status_t">http_status_t</a> cupsGetFile (<br>
@@ -1159,7 +1159,7 @@ cupsSendDocument() or cupsSendRequest(). For requests that return
 additional data, use httpRead() after getting a successful response.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="cupsPutFd">cupsPutFd</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="cupsPutFd">cupsPutFd</a></h3>
 <p class="description">Put a file on the server.</p>
 <p class="code">
 <a href="#http_status_t">http_status_t</a> cupsPutFd (<br>
@@ -1183,7 +1183,7 @@ additional data, use httpRead() after getting a successful response.
 successfully.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="cupsPutFile">cupsPutFile</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="cupsPutFile">cupsPutFile</a></h3>
 <p class="description">Put a file on the server.</p>
 <p class="code">
 <a href="#http_status_t">http_status_t</a> cupsPutFile (<br>
@@ -1287,7 +1287,7 @@ request is not freed.
 after <a href="#cupsStartDocument"><code>cupsStartDocument</code></a> to provide a document file.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpAddrAny">httpAddrAny</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrAny">httpAddrAny</a></h3>
 <p class="description">Check for the &quot;any&quot; address.</p>
 <p class="code">
 int httpAddrAny (<br>
@@ -1300,7 +1300,7 @@ int httpAddrAny (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 if &quot;any&quot;, 0 otherwise</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpAddrEqual">httpAddrEqual</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrEqual">httpAddrEqual</a></h3>
 <p class="description">Compare two addresses.</p>
 <p class="code">
 int httpAddrEqual (<br>
@@ -1316,7 +1316,7 @@ int httpAddrEqual (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 if equal, 0 if not</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpAddrLength">httpAddrLength</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrLength">httpAddrLength</a></h3>
 <p class="description">Return the length of the address in bytes.</p>
 <p class="code">
 int httpAddrLength (<br>
@@ -1329,7 +1329,7 @@ int httpAddrLength (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Length in bytes</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpAddrLocalhost">httpAddrLocalhost</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrLocalhost">httpAddrLocalhost</a></h3>
 <p class="description">Check for the local loopback address.</p>
 <p class="code">
 int httpAddrLocalhost (<br>
@@ -1342,7 +1342,7 @@ int httpAddrLocalhost (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 if local host, 0 otherwise</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpAddrLookup">httpAddrLookup</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrLookup">httpAddrLookup</a></h3>
 <p class="description">Lookup the hostname associated with the address.</p>
 <p class="code">
 char *httpAddrLookup (<br>
@@ -1361,7 +1361,7 @@ char *httpAddrLookup (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Host name</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpAddrString">httpAddrString</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrString">httpAddrString</a></h3>
 <p class="description">Convert an address to a numeric string.</p>
 <p class="code">
 char *httpAddrString (<br>
@@ -1380,7 +1380,7 @@ char *httpAddrString (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Numeric address string</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpAssembleURI">httpAssembleURI</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAssembleURI">httpAssembleURI</a></h3>
 <p class="description">Assemble a uniform resource identifier from its
 components.</p>
 <p class="code">
@@ -1422,7 +1422,7 @@ place of traditional string functions whenever you need to create a
 URI string.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpAssembleURIf">httpAssembleURIf</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAssembleURIf">httpAssembleURIf</a></h3>
 <p class="description">Assemble a uniform resource identifier from its
 components with a formatted resource.</p>
 <p class="code">
@@ -1495,7 +1495,7 @@ int httpCheck (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 = no data, 1 = data available</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="httpClearCookie">httpClearCookie</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="httpClearCookie">httpClearCookie</a></h3>
 <p class="description">Clear the cookie value(s).</p>
 <p class="code">
 void httpClearCookie (<br>
@@ -1588,7 +1588,7 @@ char *httpDecode64 (<br>
 which provides buffer length arguments.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="httpDecode64_2">httpDecode64_2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="httpDecode64_2">httpDecode64_2</a></h3>
 <p class="description">Base64-decode a string.</p>
 <p class="code">
 char *httpDecode64_2 (<br>
@@ -1644,7 +1644,7 @@ char *httpEncode64 (<br>
 which provides buffer length arguments.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="httpEncode64_2">httpEncode64_2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="httpEncode64_2">httpEncode64_2</a></h3>
 <p class="description">Base64-encode a string.</p>
 <p class="code">
 char *httpEncode64_2 (<br>
@@ -1706,7 +1706,7 @@ void httpFlush (<br>
 <dt>http</dt>
 <dd class="description">Connection to server</dd>
 </dl>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpFlushWrite">httpFlushWrite</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpFlushWrite">httpFlushWrite</a></h3>
 <p class="description">Flush data in write buffer.</p>
 <p class="code">
 int httpFlushWrite (<br>
@@ -1735,7 +1735,7 @@ int httpGet (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Status of call (0 = success)</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="httpGetAuthString">httpGetAuthString</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="httpGetAuthString">httpGetAuthString</a></h3>
 <p class="description">Get the current authorization string.</p>
 <p class="code">
 char *httpGetAuthString (<br>
@@ -1755,7 +1755,7 @@ string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
 value.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpGetBlocking">httpGetBlocking</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetBlocking">httpGetBlocking</a></h3>
 <p class="description">Get the blocking/non-block state of a connection.</p>
 <p class="code">
 int httpGetBlocking (<br>
@@ -1768,7 +1768,7 @@ int httpGetBlocking (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 if blocking, 0 if non-blocking</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="httpGetCookie">httpGetCookie</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="httpGetCookie">httpGetCookie</a></h3>
 <p class="description">Get any cookie data from the response.</p>
 <p class="code">
 const char *httpGetCookie (<br>
@@ -1794,7 +1794,7 @@ const char *httpGetDateString (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Date/time string</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpGetDateString2">httpGetDateString2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetDateString2">httpGetDateString2</a></h3>
 <p class="description">Get a formatted date/time string from a time value.</p>
 <p class="code">
 const char *httpGetDateString2 (<br>
@@ -1826,7 +1826,7 @@ time_t httpGetDateTime (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">UNIX time</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpGetFd">httpGetFd</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetFd">httpGetFd</a></h3>
 <p class="description">Get the file descriptor associated with a connection.</p>
 <p class="code">
 int httpGetFd (<br>
@@ -1869,7 +1869,7 @@ struct hostent *httpGetHostByName (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Host entry</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpGetHostname">httpGetHostname</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetHostname">httpGetHostname</a></h3>
 <p class="description">Get the FQDN for the connection or local system.</p>
 <p class="code">
 const char *httpGetHostname (<br>
@@ -1914,7 +1914,7 @@ int httpGetLength (<br>
 2^31 - 1; use httpGetLength2() instead.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpGetLength2">httpGetLength2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetLength2">httpGetLength2</a></h3>
 <p class="description">Get the amount of data remaining from the
 content-length or transfer-encoding fields.</p>
 <p class="code">
@@ -1933,7 +1933,7 @@ off_t httpGetLength2 (<br>
 content larger than 2^31 - 1.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpGetStatus">httpGetStatus</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetStatus">httpGetStatus</a></h3>
 <p class="description">Get the status of the last HTTP request.</p>
 <p class="code">
 <a href="#http_status_t">http_status_t</a> httpGetStatus (<br>
@@ -1968,7 +1968,7 @@ char *httpGetSubField (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Value or NULL</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpGetSubField2">httpGetSubField2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetSubField2">httpGetSubField2</a></h3>
 <p class="description">Get a sub-field value.</p>
 <p class="code">
 char *httpGetSubField2 (<br>
@@ -2167,7 +2167,7 @@ int httpRead (<br>
 read more than 2GB of data.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpRead2">httpRead2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpRead2">httpRead2</a></h3>
 <p class="description">Read data from a HTTP connection.</p>
 <p class="code">
 ssize_t httpRead2 (<br>
@@ -2230,7 +2230,7 @@ void httpSeparate (<br>
 <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="httpSeparate2">httpSeparate2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="httpSeparate2">httpSeparate2</a></h3>
 <p class="description">Separate a Universal Resource Identifier into its
 components.</p>
 <p class="code">
@@ -2274,7 +2274,7 @@ void httpSeparate2 (<br>
 
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpSeparateURI">httpSeparateURI</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpSeparateURI">httpSeparateURI</a></h3>
 <p class="description">Separate a Universal Resource Identifier into its
 components.</p>
 <p class="code">
@@ -2318,7 +2318,7 @@ components.</p>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Result of separation</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="httpSetAuthString">httpSetAuthString</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="httpSetAuthString">httpSetAuthString</a></h3>
 <p class="description">Set the current authorization string.</p>
 <p class="code">
 void httpSetAuthString (<br>
@@ -2342,7 +2342,7 @@ HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
 httpHead(), httpOptions(), httpPost, or httpPut().
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="httpSetCookie">httpSetCookie</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="httpSetCookie">httpSetCookie</a></h3>
 <p class="description">Set the cookie value(s)...</p>
 <p class="code">
 void httpSetCookie (<br>
@@ -2356,7 +2356,7 @@ void httpSetCookie (<br>
 <dt>cookie</dt>
 <dd class="description">Cookie string</dd>
 </dl>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpSetExpect">httpSetExpect</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpSetExpect">httpSetExpect</a></h3>
 <p class="description">Set the Expect: header in a request.</p>
 <p class="code">
 void httpSetExpect (<br>
@@ -2391,7 +2391,7 @@ void httpSetField (<br>
 <dt>value</dt>
 <dd class="description">Value</dd>
 </dl>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpSetLength">httpSetLength</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpSetLength">httpSetLength</a></h3>
 <p class="description">Set the content-length and content-encoding.</p>
 <p class="code">
 void httpSetLength (<br>
@@ -2450,7 +2450,7 @@ int httpTrace (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">HTTP status</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="httpWait">httpWait</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="httpWait">httpWait</a></h3>
 <p class="description">Wait for data available on a connection.</p>
 <p class="code">
 int httpWait (<br>
@@ -2490,7 +2490,7 @@ int httpWrite (<br>
 write more than 2GB of data.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpWrite2">httpWrite2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpWrite2">httpWrite2</a></h3>
 <p class="description">Write data to a HTTP connection.</p>
 <p class="code">
 ssize_t httpWrite2 (<br>
@@ -2556,7 +2556,7 @@ ssize_t httpWrite2 (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">New attribute</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ippAddCollection">ippAddCollection</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ippAddCollection">ippAddCollection</a></h3>
 <p class="description">Add a collection value.</p>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollection (<br>
@@ -2578,7 +2578,7 @@ ssize_t httpWrite2 (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">New attribute</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ippAddCollections">ippAddCollections</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ippAddCollections">ippAddCollections</a></h3>
 <p class="description">Add an array of collection values.</p>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollections (<br>
@@ -2678,7 +2678,7 @@ ssize_t httpWrite2 (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">New attribute</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ippAddOctetString">ippAddOctetString</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippAddOctetString">ippAddOctetString</a></h3>
 <p class="description">Add an octetString value to an IPP message.</p>
 <p class="code">
 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOctetString (<br>
@@ -2912,7 +2912,7 @@ void ippDelete (<br>
 <dt>ipp</dt>
 <dd class="description">IPP message</dd>
 </dl>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ippDeleteAttribute">ippDeleteAttribute</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ippDeleteAttribute">ippDeleteAttribute</a></h3>
 <p class="description">Delete a single attribute in an IPP message.</p>
 <p class="code">
 void ippDeleteAttribute (<br>
@@ -2939,7 +2939,7 @@ const char *ippErrorString (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Text string</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ippErrorValue">ippErrorValue</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippErrorValue">ippErrorValue</a></h3>
 <p class="description">Return a status code for the given name.</p>
 <p class="code">
 ipp_status_t ippErrorValue (<br>
@@ -3009,7 +3009,7 @@ size_t ippLength (<br>
 <a href="#ipp_t">ipp_t</a> *ippNew (void);</p>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">New IPP message</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ippNewRequest">ippNewRequest</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippNewRequest">ippNewRequest</a></h3>
 <p class="description">Allocate a new IPP request message.</p>
 <p class="code">
 <a href="#ipp_t">ipp_t</a> *ippNewRequest (<br>
@@ -3028,7 +3028,7 @@ attributes-natural-language attributes added. The
 attributes-natural-language value is derived from the current locale.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ippOpString">ippOpString</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippOpString">ippOpString</a></h3>
 <p class="description">Return a name for the given operation id.</p>
 <p class="code">
 const char *ippOpString (<br>
@@ -3041,7 +3041,7 @@ const char *ippOpString (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Name</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ippOpValue">ippOpValue</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippOpValue">ippOpValue</a></h3>
 <p class="description">Return an operation id for the given name.</p>
 <p class="code">
 <a href="#ipp_op_t">ipp_op_t</a> ippOpValue (<br>
@@ -3076,7 +3076,7 @@ int ippPort (void);</p>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Current state</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ippReadFile">ippReadFile</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ippReadFile">ippReadFile</a></h3>
 <p class="description">Read data for an IPP message from a file.</p>
 <p class="code">
 <a href="#ipp_state_t">ipp_state_t</a> ippReadFile (<br>
@@ -3092,7 +3092,7 @@ int ippPort (void);</p>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Current state</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ippReadIO">ippReadIO</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippReadIO">ippReadIO</a></h3>
 <p class="description">Read data for an IPP message.</p>
 <p class="code">
 <a href="#ipp_state_t">ipp_state_t</a> ippReadIO (<br>
@@ -3191,7 +3191,7 @@ const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Current state</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ippWriteFile">ippWriteFile</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ippWriteFile">ippWriteFile</a></h3>
 <p class="description">Write data for an IPP message to a file.</p>
 <p class="code">
 <a href="#ipp_state_t">ipp_state_t</a> ippWriteFile (<br>
@@ -3207,7 +3207,7 @@ const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Current state</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ippWriteIO">ippWriteIO</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippWriteIO">ippWriteIO</a></h3>
 <p class="description">Write data for an IPP message.</p>
 <p class="code">
 <a href="#ipp_state_t">ipp_state_t</a> ippWriteIO (<br>
@@ -3233,7 +3233,7 @@ const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Current state</p>
 <h2 class="title"><a name="TYPES">Data Types</a></h2>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="http_addrlist_t">http_addrlist_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="http_addrlist_t">http_addrlist_t</a></h3>
 <p class="description">Socket address list, which is
 used to enumerate all of the
 addresses that are associated
@@ -3286,7 +3286,7 @@ typedef enum <a href="#http_uri_coding_e">http_uri_coding_e</a> http_uri_coding_
 <p class="code">
 typedef enum <a href="#http_uri_status_e">http_uri_status_e</a> http_uri_status_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="http_version_t">http_version_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="http_version_t">http_version_t</a></h3>
 <p class="description">Socket address union, which
 makes using IPv6 and other
 address types easier and
@@ -3304,7 +3304,7 @@ typedef struct <a href="#ipp_attribute_s">ipp_attribute_s</a> ipp_attribute_t;
 <p class="code">
 typedef enum <a href="#ipp_finish_e">ipp_finish_e</a> ipp_finish_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ipp_iocb_t">ipp_iocb_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ipp_iocb_t">ipp_iocb_t</a></h3>
 <p class="description">IPP IO Callback Function </p>
 <p class="code">
 typedef ssize_t (*ipp_iocb_t)(void *, <a href="#ipp_uchar_t">ipp_uchar_t</a> *, size_t);
@@ -3370,7 +3370,7 @@ typedef enum <a href="#ipp_tag_e">ipp_tag_e</a> ipp_tag_t;
 typedef union <a href="#ipp_value_u">ipp_value_u</a> ipp_value_t;
 </p>
 <h2 class="title"><a name="STRUCTURES">Structures</a></h2>
-<h3 class="struct"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="http_addrlist_s">http_addrlist_s</a></h3>
+<h3 class="struct"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="http_addrlist_s">http_addrlist_s</a></h3>
 <p class="description">Socket address list, which is
 used to enumerate all of the
 addresses that are associated
@@ -3429,8 +3429,8 @@ with a hostname. </p>
 <dd class="description">Current attribute group tag</dd>
 <dt>last </dt>
 <dd class="description">Last attribute in list</dd>
-<dt>prev </dt>
-<dd class="description">Previous attribute (for read)</dd>
+<dt>prev <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
+<dd class="description">Previous attribute (for read) </dd>
 <dt>request </dt>
 <dd class="description">Request header</dd>
 <dt>state </dt>
@@ -3456,8 +3456,8 @@ with a hostname. </p>
 <dl>
 <dt>boolean </dt>
 <dd class="description">Boolean value</dd>
-<dt>collection </dt>
-<dd class="description">Collection value</dd>
+<dt>collection <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
+<dd class="description">Collection value </dd>
 <dt>date[11] </dt>
 <dd class="description">Date/time value</dd>
 <dt>integer </dt>
@@ -3478,7 +3478,7 @@ with a hostname. </p>
 <dd class="description">MD5-session authentication in use</dd>
 <dt>HTTP_AUTH_MD5_SESS_INT </dt>
 <dd class="description">MD5-session authentication in use for body</dd>
-<dt>HTTP_AUTH_NEGOTIATE <span class="info">&nbsp;CUPS 1.3&nbsp;</span></dt>
+<dt>HTTP_AUTH_NEGOTIATE <span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">GSSAPI authentication in use </dd>
 <dt>HTTP_AUTH_NONE </dt>
 <dd class="description">No authentication in use</dd>
@@ -3848,7 +3848,7 @@ with a hostname. </p>
 <dd class="description">Add or modify a class</dd>
 <dt>CUPS_ADD_MODIFY_PRINTER </dt>
 <dd class="description">Add or modify a printer</dd>
-<dt>CUPS_AUTHENTICATE_JOB <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>CUPS_AUTHENTICATE_JOB <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Authenticate a job </dd>
 <dt>CUPS_DELETE_CLASS </dt>
 <dd class="description">Delete a class</dd>
@@ -3862,7 +3862,7 @@ with a hostname. </p>
 <dd class="description">Get a list of supported devices</dd>
 <dt>CUPS_GET_DOCUMENT <span class="info">&nbsp;CUPS 1.4&nbsp;</span></dt>
 <dd class="description">Get a document file </dd>
-<dt>CUPS_GET_PPD <span class="info">&nbsp;CUPS 1.3&nbsp;</span></dt>
+<dt>CUPS_GET_PPD <span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Get a PPD file </dd>
 <dt>CUPS_GET_PPDS </dt>
 <dd class="description">Get a list of supported drivers</dd>
@@ -3876,13 +3876,13 @@ with a hostname. </p>
 <dd class="description">Set the default printer</dd>
 <dt>IPP_CANCEL_JOB </dt>
 <dd class="description">Cancel a job</dd>
-<dt>IPP_CANCEL_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>IPP_CANCEL_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Cancel a subscription </dd>
 <dt>IPP_CREATE_JOB </dt>
 <dd class="description">Create an empty print job</dd>
-<dt>IPP_CREATE_JOB_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>IPP_CREATE_JOB_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Create a job subscription </dd>
-<dt>IPP_CREATE_PRINTER_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>IPP_CREATE_PRINTER_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Create a printer subscription </dd>
 <dt>IPP_DISABLE_PRINTER </dt>
 <dd class="description">Stop a printer</dd>
@@ -3892,15 +3892,15 @@ with a hostname. </p>
 <dd class="description">Get a list of jobs</dd>
 <dt>IPP_GET_JOB_ATTRIBUTES </dt>
 <dd class="description">Get job attributes</dd>
-<dt>IPP_GET_NOTIFICATIONS <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>IPP_GET_NOTIFICATIONS <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Get notification events </dd>
 <dt>IPP_GET_PRINTER_ATTRIBUTES </dt>
 <dd class="description">Get printer attributes</dd>
 <dt>IPP_GET_PRINTER_SUPPORTED_VALUES </dt>
 <dd class="description">Get supported attribute values</dd>
-<dt>IPP_GET_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>IPP_GET_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Get list of subscriptions </dd>
-<dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Get subscription attributes </dd>
 <dt>IPP_HOLD_JOB </dt>
 <dd class="description">Hold a job for printing</dd>
@@ -3912,7 +3912,7 @@ with a hostname. </p>
 <dd class="description">Cancel all jobs</dd>
 <dt>IPP_RELEASE_JOB </dt>
 <dd class="description">Release a job for printing</dd>
-<dt>IPP_RENEW_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2&nbsp;</span></dt>
+<dt>IPP_RENEW_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Renew a printer subscription </dd>
 <dt>IPP_RESTART_JOB </dt>
 <dd class="description">Reprint a job</dd>
index 11b34287ed3e9eb518d05f37459900be6aa63869..4c201d3d1123b902edfa6bdd431b94d84fadc4ee 100644 (file)
@@ -384,13 +384,13 @@ div.contents ul.subcontents li {
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#OVERVIEW">Overview</a></li>
 <li><a href="#COMPILING">Compiling Programs</a><ul class="subcontents">
 <li><a href="#XCODE">Compiling with Xcode</a></li>
 <li><a href="#COMMANDLINE">Compiling with GCC</a></li>
 </ul></li>
 <li><a href="#WHERETOGO">Where to Go Next</a></li>
-</ul>
 <!--
   "$Id: api-cups.header 7279 2008-01-31 01:50:44Z mike $"
 
index bf087b5b73ad268360855b3e7aa022d519f8eb0f..3da1d965ec0754232b9a1a61b731d588f53a6098 100644 (file)
@@ -366,6 +366,7 @@ div.contents ul.subcontents li {
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
 <li><a href="#LOADING">Loading a PPD File</a></li>
 <li><a href="#OPTIONS_AND_GROUPS">Options and Groups</a></li>
@@ -470,7 +471,6 @@ conflicts.">ppdMarkOption</a></li>
        <li><a href="#ppd_status_e" title="Types and structures...">ppd_status_e</a></li>
        <li><a href="#ppd_ui_e" title="UI Types">ppd_ui_e</a></li>
 </ul></li>
-</ul>
 <!--
   "$Id: api-ppd.shtml 7616 2008-05-28 00:34:13Z mike $"
 
@@ -804,7 +804,7 @@ int ppdCollect (<br>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">The choices array should be freed using <code>free</code> when you are
 finished with it.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdCollect2">ppdCollect2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdCollect2">ppdCollect2</a></h3>
 <p class="description">Collect all marked options that reside in the
 specified section and minimum order.</p>
 <p class="code">
@@ -867,7 +867,7 @@ int ppdEmit (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, -1 on failure</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdEmitAfterOrder">ppdEmitAfterOrder</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdEmitAfterOrder">ppdEmitAfterOrder</a></h3>
 <p class="description">Emit a subset of the code for marked options to a file.</p>
 <p class="code">
 int ppdEmitAfterOrder (<br>
@@ -943,7 +943,7 @@ int ppdEmitJCL (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, -1 on failure</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdEmitJCLEnd">ppdEmitJCLEnd</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdEmitJCLEnd">ppdEmitJCLEnd</a></h3>
 <p class="description">Emit JCLEnd code to a file.</p>
 <p class="code">
 int ppdEmitJCLEnd (<br>
@@ -959,7 +959,7 @@ int ppdEmitJCLEnd (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, -1 on failure</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdEmitString">ppdEmitString</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdEmitString">ppdEmitString</a></h3>
 <p class="description">Get a string containing the code for marked options.</p>
 <p class="code">
 char *ppdEmitString (<br>
@@ -988,7 +988,7 @@ The return string is allocated on the heap and should be freed using
 <code>free</code> when you are done with it.
 
 </p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppdErrorString">ppdErrorString</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ppdErrorString">ppdErrorString</a></h3>
 <p class="description">Returns the text assocated with a status.</p>
 <p class="code">
 const char *ppdErrorString (<br>
@@ -1001,7 +1001,7 @@ const char *ppdErrorString (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Status string</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppdFindAttr">ppdFindAttr</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ppdFindAttr">ppdFindAttr</a></h3>
 <p class="description">Find the first matching attribute.</p>
 <p class="code">
 <a href="#ppd_attr_t">ppd_attr_t</a> *ppdFindAttr (<br>
@@ -1036,7 +1036,7 @@ const char *ppdErrorString (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Choice pointer or <code>NULL</code></p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdFindCustomOption">ppdFindCustomOption</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdFindCustomOption">ppdFindCustomOption</a></h3>
 <p class="description">Find a custom option.</p>
 <p class="code">
 <a href="#ppd_coption_t">ppd_coption_t</a> *ppdFindCustomOption (<br>
@@ -1052,7 +1052,7 @@ const char *ppdErrorString (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Custom option or NULL</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdFindCustomParam">ppdFindCustomParam</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdFindCustomParam">ppdFindCustomParam</a></h3>
 <p class="description">Find a parameter for a custom option.</p>
 <p class="code">
 <a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdFindCustomParam (<br>
@@ -1084,7 +1084,7 @@ const char *ppdErrorString (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Pointer to choice or <code>NULL</code></p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppdFindNextAttr">ppdFindNextAttr</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ppdFindNextAttr">ppdFindNextAttr</a></h3>
 <p class="description">Find the next matching attribute.</p>
 <p class="code">
 <a href="#ppd_attr_t">ppd_attr_t</a> *ppdFindNextAttr (<br>
@@ -1119,7 +1119,7 @@ const char *ppdErrorString (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Pointer to option or <code>NULL</code></p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdFirstCustomParam">ppdFirstCustomParam</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdFirstCustomParam">ppdFirstCustomParam</a></h3>
 <p class="description">Return the first parameter for a custom option.</p>
 <p class="code">
 <a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdFirstCustomParam (<br>
@@ -1132,7 +1132,7 @@ const char *ppdErrorString (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Custom parameter or NULL</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdFirstOption">ppdFirstOption</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdFirstOption">ppdFirstOption</a></h3>
 <p class="description">Return the first option in the PPD file.</p>
 <p class="code">
 <a href="#ppd_option_t">ppd_option_t</a> *ppdFirstOption (<br>
@@ -1193,7 +1193,7 @@ int ppdIsMarked (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Non-zero if option is marked</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppdLastError">ppdLastError</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ppdLastError">ppdLastError</a></h3>
 <p class="description">Return the status from the last ppdOpen*().</p>
 <p class="code">
 <a href="#ppd_status_t">ppd_status_t</a> ppdLastError (<br>
@@ -1206,7 +1206,7 @@ int ppdIsMarked (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Status code</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdLocalize">ppdLocalize</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdLocalize">ppdLocalize</a></h3>
 <p class="description">Localize the PPD file to the current locale.</p>
 <p class="code">
 int ppdLocalize (<br>
@@ -1248,7 +1248,7 @@ localized string uses the UTF-8 character encoding.
 <p class="discussion">This function uses the current locale to find the localized attribute for
 the given main and option keywords.  If no localized version of the
 attribute exists for the current locale, the unlocalized version is returned.</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="ppdLocalizeIPPReason">ppdLocalizeIPPReason</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="ppdLocalizeIPPReason">ppdLocalizeIPPReason</a></h3>
 <p class="description">Get the localized version of a cupsIPPReason
 attribute.</p>
 <p class="code">
@@ -1337,7 +1337,7 @@ int ppdMarkOption (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Number of conflicts</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdNextCustomParam">ppdNextCustomParam</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdNextCustomParam">ppdNextCustomParam</a></h3>
 <p class="description">Return the next parameter for a custom option.</p>
 <p class="code">
 <a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdNextCustomParam (<br>
@@ -1350,7 +1350,7 @@ int ppdMarkOption (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Custom parameter or NULL</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdNextOption">ppdNextOption</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdNextOption">ppdNextOption</a></h3>
 <p class="description">Return the next option in the PPD file.</p>
 <p class="code">
 <a href="#ppd_option_t">ppd_option_t</a> *ppdNextOption (<br>
@@ -1380,7 +1380,7 @@ int ppdMarkOption (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">PPD file record</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppdOpen2">ppdOpen2</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppdOpen2">ppdOpen2</a></h3>
 <p class="description">Read a PPD file into memory.</p>
 <p class="code">
 <a href="#ppd_file_t">ppd_file_t</a> *ppdOpen2 (<br>
@@ -1494,7 +1494,7 @@ float ppdPageWidth (<br>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Width of page in points or 0.0</p>
-<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20&nbsp;</span><a name="ppdSetConformance">ppdSetConformance</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="ppdSetConformance">ppdSetConformance</a></h3>
 <p class="description">Set the conformance level for PPD files.</p>
 <p class="code">
 void ppdSetConformance (<br>
@@ -1506,7 +1506,7 @@ void ppdSetConformance (<br>
 <dd class="description">Conformance level</dd>
 </dl>
 <h2 class="title"><a name="TYPES">Data Types</a></h2>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppd_attr_t">ppd_attr_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ppd_attr_t">ppd_attr_t</a></h3>
 <p class="description">PPD Attribute Structure </p>
 <p class="code">
 typedef struct <a href="#ppd_attr_s">ppd_attr_s</a> ppd_attr_t;
@@ -1516,7 +1516,7 @@ typedef struct <a href="#ppd_attr_s">ppd_attr_s</a> ppd_attr_t;
 <p class="code">
 typedef struct <a href="#ppd_choice_s">ppd_choice_s</a> ppd_choice_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppd_conform_t">ppd_conform_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ppd_conform_t">ppd_conform_t</a></h3>
 <p class="description">Conformance Levels </p>
 <p class="code">
 typedef enum <a href="#ppd_conform_e">ppd_conform_e</a> ppd_conform_t;
@@ -1526,27 +1526,27 @@ typedef enum <a href="#ppd_conform_e">ppd_conform_e</a> ppd_conform_t;
 <p class="code">
 typedef struct <a href="#ppd_const_s">ppd_const_s</a> ppd_const_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_coption_t">ppd_coption_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppd_coption_t">ppd_coption_t</a></h3>
 <p class="description">Custom Option </p>
 <p class="code">
 typedef struct <a href="#ppd_coption_s">ppd_coption_s</a> ppd_coption_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cparam_t">ppd_cparam_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppd_cparam_t">ppd_cparam_t</a></h3>
 <p class="description">Custom Parameter </p>
 <p class="code">
 typedef struct <a href="#ppd_cparam_s">ppd_cparam_s</a> ppd_cparam_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cplimit_t">ppd_cplimit_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppd_cplimit_t">ppd_cplimit_t</a></h3>
 <p class="description">Custom Parameter Limit </p>
 <p class="code">
 typedef union <a href="#ppd_cplimit_u">ppd_cplimit_u</a> ppd_cplimit_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cptype_t">ppd_cptype_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppd_cptype_t">ppd_cptype_t</a></h3>
 <p class="description">Custom Parameter Type </p>
 <p class="code">
 typedef enum <a href="#ppd_cptype_e">ppd_cptype_e</a> ppd_cptype_t;
 </p>
-<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cpvalue_t">ppd_cpvalue_t</a></h3>
+<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppd_cpvalue_t">ppd_cpvalue_t</a></h3>
 <p class="description">Custom Parameter Value </p>
 <p class="code">
 typedef union <a href="#ppd_cpvalue_u">ppd_cpvalue_u</a> ppd_cpvalue_t;
@@ -1602,7 +1602,7 @@ typedef enum <a href="#ppd_status_e">ppd_status_e</a> ppd_status_t;
 typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
 </p>
 <h2 class="title"><a name="STRUCTURES">Structures</a></h2>
-<h3 class="struct"><span class="info">&nbsp;CUPS 1.1.19&nbsp;</span><a name="ppd_attr_s">ppd_attr_s</a></h3>
+<h3 class="struct"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ppd_attr_s">ppd_attr_s</a></h3>
 <p class="description">PPD Attribute Structure </p>
 <p class="code">struct ppd_attr_s {<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char name[PPD_MAX_NAME];<br>
@@ -1662,7 +1662,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
 <dt>option2[PPD_MAX_NAME] </dt>
 <dd class="description">Second keyword</dd>
 </dl>
-<h3 class="struct"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_coption_s">ppd_coption_s</a></h3>
+<h3 class="struct"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppd_coption_s">ppd_coption_s</a></h3>
 <p class="description">Custom Option </p>
 <p class="code">struct ppd_coption_s {<br>
 &nbsp;&nbsp;&nbsp;&nbsp;char keyword[PPD_MAX_NAME];<br>
@@ -1681,7 +1681,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
 <dt>params </dt>
 <dd class="description">Parameters</dd>
 </dl>
-<h3 class="struct"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cparam_s">ppd_cparam_s</a></h3>
+<h3 class="struct"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppd_cparam_s">ppd_cparam_s</a></h3>
 <p class="description">Custom Parameter </p>
 <p class="code">struct ppd_cparam_s {<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppd_cpvalue_t">ppd_cpvalue_t</a> current;<br>
@@ -1836,13 +1836,13 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
 <dd class="description">Number of page sizes</dd>
 <dt>patches </dt>
 <dd class="description">Patch commands to be sent to printer</dd>
-<dt>pcfilename <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>pcfilename <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">PCFileName string </dd>
 <dt>product </dt>
 <dd class="description">Product name (from PS RIP/interpreter)</dd>
 <dt>profiles <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
 <dd class="description">sRGB color profiles </dd>
-<dt>protocols <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>protocols <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">Protocols (BCP, TBCP) string </dd>
 <dt>shortnickname </dt>
 <dd class="description">Short version of nickname</dd>
@@ -1869,7 +1869,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
 <dl>
 <dt>PPD_MAX_NAME] </dt>
 <dd class="description">Human-readable group name</dd>
-<dt>name[PPD_MAX_NAME] <span class="info">&nbsp;CUPS 1.1.18&nbsp;</span></dt>
+<dt>name[PPD_MAX_NAME] <span class="info">&nbsp;CUPS 1.1.18/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">Group name </dd>
 <dt>num_options </dt>
 <dd class="description">Number of options</dd>
@@ -1968,7 +1968,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
 <dd class="description">Width of media in points</dd>
 </dl>
 <h2 class="title"><a name="UNIONS">Unions</a></h2>
-<h3 class="union"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cplimit_u">ppd_cplimit_u</a></h3>
+<h3 class="union"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppd_cplimit_u">ppd_cplimit_u</a></h3>
 <p class="description">Custom Parameter Limit </p>
 <p class="code">union ppd_cplimit_u {<br>
 &nbsp;&nbsp;&nbsp;&nbsp;float custom_curve;<br>
@@ -1999,7 +1999,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
 <dt>custom_string </dt>
 <dd class="description">String length</dd>
 </dl>
-<h3 class="union"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cpvalue_u">ppd_cpvalue_u</a></h3>
+<h3 class="union"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppd_cpvalue_u">ppd_cpvalue_u</a></h3>
 <p class="description">Custom Parameter Value </p>
 <p class="code">union ppd_cpvalue_u {<br>
 &nbsp;&nbsp;&nbsp;&nbsp;float custom_curve;<br>
@@ -2040,7 +2040,7 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
 <dt>PPD_CONFORM_STRICT </dt>
 <dd class="description">Require strict conformance</dd>
 </dl>
-<h3 class="enumeration"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="ppd_cptype_e">ppd_cptype_e</a></h3>
+<h3 class="enumeration"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ppd_cptype_e">ppd_cptype_e</a></h3>
 <p class="description">Custom Parameter Type </p>
 <h4 class="constants">Constants</h4>
 <dl>
index 80fdd1b7f8b311337f1c2b33ad8a7a61c6c6a7e7..21efaa5d9245ef89157484b54ddf649b41877e88 100644 (file)
@@ -367,6 +367,7 @@ div.contents ul.subcontents li {
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#OVERVIEW">Overview</a></li>
 <li><a href="#TASKS">Functions by Task</a><ul class="subcontents">
 <li><a href="#OPENCLOSE">Opening and Closing Raster Streams</a></li>
@@ -420,7 +421,6 @@ by the RIPs...">cups_orient_t</a></li>
        <li><a href="#cups_order_e" title="cupsColorOrder attribute values">cups_order_e</a></li>
        <li><a href="#cups_orient_e" title="">cups_orient_e</a></li>
 </ul></li>
-</ul>
 <!--
   "$Id$"
 
@@ -1181,9 +1181,9 @@ factor not applied) </dd>
 <p class="description"></p>
 <h4 class="constants">Constants</h4>
 <dl>
-<dt>CUPS_CSPACE_CIELab <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_CIELab <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">CIE Lab </dd>
-<dt>CUPS_CSPACE_CIEXYZ <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_CIEXYZ <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">CIE XYZ </dd>
 <dt>CUPS_CSPACE_CMY </dt>
 <dd class="description">Cyan, magenta, yellow</dd>
@@ -1195,35 +1195,35 @@ factor not applied) </dd>
 <dd class="description">Gold, magenta, yellow, silver</dd>
 <dt>CUPS_CSPACE_GOLD </dt>
 <dd class="description">Gold foil</dd>
-<dt>CUPS_CSPACE_ICC1 <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICC1 <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 1 color </dd>
-<dt>CUPS_CSPACE_ICC2 <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICC2 <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 2 colors </dd>
-<dt>CUPS_CSPACE_ICC3 <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICC3 <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 3 colors </dd>
-<dt>CUPS_CSPACE_ICC4 <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICC4 <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 4 colors </dd>
-<dt>CUPS_CSPACE_ICC5 <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICC5 <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 5 colors </dd>
-<dt>CUPS_CSPACE_ICC6 <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICC6 <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 6 colors </dd>
-<dt>CUPS_CSPACE_ICC7 <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICC7 <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 7 colors </dd>
-<dt>CUPS_CSPACE_ICC8 <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICC8 <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 8 colors </dd>
-<dt>CUPS_CSPACE_ICC9 <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICC9 <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 9 colors </dd>
-<dt>CUPS_CSPACE_ICCA <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICCA <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 10 colors </dd>
-<dt>CUPS_CSPACE_ICCB <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICCB <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 11 colors </dd>
-<dt>CUPS_CSPACE_ICCC <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICCC <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 12 colors </dd>
-<dt>CUPS_CSPACE_ICCD <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICCD <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 13 colors </dd>
-<dt>CUPS_CSPACE_ICCE <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICCE <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 14 colors </dd>
-<dt>CUPS_CSPACE_ICCF <span class="info">&nbsp;CUPS 1.1.19&nbsp;</span></dt>
+<dt>CUPS_CSPACE_ICCF <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
 <dd class="description">ICC-based, 15 colors </dd>
 <dt>CUPS_CSPACE_K </dt>
 <dd class="description">Black</dd>
@@ -1298,7 +1298,7 @@ light-cyan, light-magenta</dd>
 <dd class="description">Open stream for reading</dd>
 <dt>CUPS_RASTER_WRITE </dt>
 <dd class="description">Open stream for writing</dd>
-<dt>CUPS_RASTER_WRITE_COMPRESSED <span class="info">&nbsp;CUPS 1.3&nbsp;</span></dt>
+<dt>CUPS_RASTER_WRITE_COMPRESSED <span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span></dt>
 <dd class="description">Open stream for compressed writing </dd>
 </dl>
 <h3 class="enumeration"><a name="cups_order_e">cups_order_e</a></h3>
index bfe810bd2c551277fc7a2a8cfa5daa350e8ccc24..295cf83c99b1455f1366ef6d83a47ade6f3757de 100644 (file)
@@ -347,6 +347,7 @@ div.contents ul.subcontents li {
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#BASICS">Printer Driver Basics</a></li>
 <li><a href="#CREATING">Creating New PPD Files</a><ul class="subcontents">
 <li><a href="#IMPORT">Importing Existing PPD Files</a></li>
@@ -355,7 +356,6 @@ div.contents ul.subcontents li {
 <li><a href="#COLOR">Implementing Color Management</a></li>
 <li><a href="#MACOSX">Adding Mac OS X Features</a></li>
 <li><a href="#DEPLOY">Deploying Your Driver</a></li>
-</ul>
 <h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2>
 
 <p>A CUPS PostScript printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, zero or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p>
index 10e9c462b71a916dfc8c72c6afb518bae3c12367..86d06c23510cf1c748eab7ac33888f633b5ad719 100644 (file)
@@ -349,6 +349,7 @@ that describe the features and capabilities of one or more printers.</P>
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#BASICS">The Basics</a></li>
 <li><a href="#DRV">Driver Information Files</a><ul class="subcontents">
 <li><a href="#SIMPLE">A Simple Example</a></li>
@@ -359,7 +360,6 @@ that describe the features and capabilities of one or more printers.</P>
 <li><a href="#CONDITIONAL">Conditional Statements</a></li>
 <li><a href="#CONSTRAINTS">Defining Constraints</a></li>
 </ul></li>
-</ul>
 <h2 class='title'><a name='BASICS'>The Basics</a></h2>
 
 <P>The PPD compiler, <a href='man-ppdc.html'><code>ppdc(1)</code></a>, is a
index 59a5aca46bc143827b98abbe1ecc01bb49e02968..993255c08deec91bb73d9e942e7ebde94faa6186 100644 (file)
@@ -347,13 +347,13 @@ div.contents ul.subcontents li {
 </table></div>
 <h2 class="title">Contents</h2>
 <ul class="contents">
+<ul class="subcontents">
 <li><a href="#BASICS">Printer Driver Basics</a></li>
 <li><a href="#CREATING">Creating New PPD Files</a></li>
 <li><a href="#FILTERS">Using Filters</a></li>
 <li><a href="#COLOR">Implementing Color Management</a></li>
 <li><a href="#MACOSX">Adding Mac OS X Features</a></li>
 <li><a href="#DEPLOY">Deploying Your Driver</a></li>
-</ul>
 <h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2>
 
 <p>A CUPS raster printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, one or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p>
index ca3521aed892e94ca4cd18cb545536f993dcaa6c..7563118b7872b9390e75d4b423dbd223a5aeb1ec 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Image library definitions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1993-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
index 5a92c7d3ae9fe7e2c928d4f01e390f62adbdf90f..2518f211f4e9686d5b7fda4b5714d7dfe634547c 100644 (file)
@@ -1740,8 +1740,8 @@ add_job(cupsd_client_t  *con,             /* I - Client connection */
 
       attr = ippAddStrings(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-sheets",
                            2, NULL, NULL);
-      attr->values[0].string.text = _cupsStrAlloc(printer->job_sheets[0]);
-      attr->values[1].string.text = _cupsStrAlloc(printer->job_sheets[1]);
+      attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]);
+      attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]);
     }
 
     job->job_sheets = attr;
@@ -2656,7 +2656,7 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
         continue;
 
       printer->reasons[printer->num_reasons] =
-          _cupsStrAlloc(attr->values[i].string.text);
+          _cupsStrRetain(attr->values[i].string.text);
 
       if (!strcmp(printer->reasons[printer->num_reasons], "paused") &&
           printer->state != IPP_PRINTER_STOPPED)
@@ -4543,12 +4543,18 @@ copy_attribute(
           for (i = 0; i < attr->num_values; i ++)
            toattr->values[i].string.text = attr->values[i].string.text;
         }
-       else
+       else if (attr->value_tag & IPP_TAG_COPY)
        {
           for (i = 0; i < attr->num_values; i ++)
            toattr->values[i].string.text =
                _cupsStrAlloc(attr->values[i].string.text);
        }
+       else
+       {
+          for (i = 0; i < attr->num_values; i ++)
+           toattr->values[i].string.text =
+               _cupsStrRetain(attr->values[i].string.text);
+       }
         break;
 
     case IPP_TAG_DATE :
@@ -4594,7 +4600,7 @@ copy_attribute(
            toattr->values[i].string.text    = attr->values[i].string.text;
           }
         }
-       else
+       else if (attr->value_tag & IPP_TAG_COPY)
        {
           for (i = 0; i < attr->num_values; i ++)
          {
@@ -4609,6 +4615,21 @@ copy_attribute(
                _cupsStrAlloc(attr->values[i].string.text);
           }
         }
+       else
+       {
+          for (i = 0; i < attr->num_values; i ++)
+         {
+           if (!i)
+              toattr->values[i].string.charset =
+                 _cupsStrRetain(attr->values[i].string.charset);
+           else
+              toattr->values[i].string.charset =
+                 toattr->values[0].string.charset;
+
+           toattr->values[i].string.text =
+               _cupsStrRetain(attr->values[i].string.text);
+          }
+        }
         break;
 
     case IPP_TAG_BEGIN_COLLECTION :
@@ -5409,7 +5430,7 @@ copy_printer_attrs(
         if ((p2_uri = ippFindAttribute(p2->attrs, "printer-uri-supported",
                                       IPP_TAG_URI)) != NULL)
           member_uris->values[i].string.text =
-             _cupsStrAlloc(p2_uri->values[0].string.text);
+             _cupsStrRetain(p2_uri->values[0].string.text);
         else
        {
          httpAssembleURIf(HTTP_URI_CODING_ALL, printer_uri,
@@ -7989,7 +8010,7 @@ hold_job(cupsd_client_t  *con,            /* I - Client connection */
     {
       attr->value_tag = newattr->value_tag;
       attr->values[0].string.text =
-          _cupsStrAlloc(newattr->values[0].string.text);
+          _cupsStrRetain(newattr->values[0].string.text);
     }
     else
     {
index cbe1c547c4865a48c5979f4fb4530242b90d5cba..6685d34342792454ef7a5c015a044d9eb9c4f248 100644 (file)
@@ -2317,7 +2317,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
        for (i = 0; i < p->num_printers; i ++)
        {
           if (attr != NULL)
-            attr->values[i].string.text = _cupsStrAlloc(p->printers[i]->name);
+            attr->values[i].string.text = _cupsStrRetain(p->printers[i]->name);
 
          p->type &= ~CUPS_PRINTER_OPTIONS | p->printers[i]->type;
         }
@@ -2377,7 +2377,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
       {
        for (i = 0; i < oldattr->num_values; i ++)
          attr->values[i].string.text =
-             _cupsStrAlloc(oldattr->values[i].string.text);
+             _cupsStrRetain(oldattr->values[i].string.text);
       }
     }
 
@@ -2402,7 +2402,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
       {
        for (i = 0; i < oldattr->num_values; i ++)
          attr->values[i].string.text =
-             _cupsStrAlloc(oldattr->values[i].string.text);
+             _cupsStrRetain(oldattr->values[i].string.text);
       }
     }
 
@@ -2415,7 +2415,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
       {
        for (i = 0; i < oldattr->num_values; i ++)
          attr->values[i].string.text =
-             _cupsStrAlloc(oldattr->values[i].string.text);
+             _cupsStrRetain(oldattr->values[i].string.text);
       }
     }
 
index ce876297f7fa4617de1c35e7df841f12fafe6c77..0123470fb7725b6d4a4d57eaf1801d0da43418c2 100755 (executable)
@@ -384,7 +384,11 @@ EOF
        i=`expr $i + 1`
 done
 
-cp /tmp/cups-$user/printers.conf /tmp/cups-$user/printers.conf.orig
+if test -f /tmp/cups-$user/printers.conf; then
+       cp /tmp/cups-$user/printers.conf /tmp/cups-$user/printers.conf.orig
+else
+       touch /tmp/cups-$user/printers.conf.orig
+fi
 
 #
 # Setup the paths...