From f3c17241a42a0845eae2099e6970b5aca9bbd836 Mon Sep 17 00:00:00 2001
From: msweet
In addition, some operating systems provide additional security mechanisms that further limit file system access, even for backends running as root. On -Mac OS X, for example, no backend may write to a user's home directory.
+OS X, for example, no backend may write to a user's home directory.Note:"STATE:" messages often provide visible alerts to the user. For example, -on Mac OS X setting a printer-state-reason value with an "-error" or +on OS X setting a printer-state-reason value with an "-error" or "-warning" suffix will cause the printer's dock item to bounce if the corresponding reason is localized with a cupsIPPReason keyword in the printer's PPD file.
diff --git a/cups/api-ppd.header b/cups/api-ppd.header index 9eae26b48..ef0d05122 100644 --- a/cups/api-ppd.header +++ b/cups/api-ppd.header @@ -3,7 +3,7 @@ PPD API header for CUPS. - Copyright 2008-2011 by Apple Inc. + Copyright 2008-2012 by Apple Inc. These coded instructions, statements, and computer programs are the property of Apple Inc. and are protected by Federal copyright @@ -14,7 +14,7 @@PPD API (DEPRECATED)
-The PPD API is deprecated starting in CUPS 1.6. Please use the new Job Ticket APIs in the CUPS API documentation. These functions will be removed in a future release of CUPS.+The PPD API is deprecated starting in CUPS 1.6/OS X 10.8. Please use the new Job Ticket APIs in the CUPS API documentation. These functions will be removed in a future release of CUPS.diff --git a/cups/api-ppd.shtml b/cups/api-ppd.shtml index a8ecc095c..6319f23f1 100644 --- a/cups/api-ppd.shtml +++ b/cups/api-ppd.shtml @@ -3,7 +3,7 @@ PPD API introduction for CUPS. - Copyright 2007-2011 by Apple Inc. + Copyright 2007-2012 by Apple Inc. Copyright 1997-2006 by Easy Software Products, all rights reserved. These coded instructions, statements, and computer programs are the @@ -15,7 +15,7 @@
Overview
-The PPD API is deprecated starting in CUPS 1.6. Please use the new Job Ticket APIs in the CUPS API documentation. These functions will be removed in a future release of CUPS.+The PPD API is deprecated starting in CUPS 1.6/OS X 10.8. Please use the new Job Ticket APIs in the CUPS API documentation. These functions will be removed in a future release of CUPS.The CUPS PPD API provides read-only access the data in PostScript Printer Description ("PPD") files which are used for all printers with a driver. With diff --git a/cups/array.c b/cups/array.c index b2b4679b1..2fb7701c0 100644 --- a/cups/array.c +++ b/cups/array.c @@ -3,7 +3,7 @@ * * Sorted array routines for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -110,7 +110,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 1 on success, 0 on failure */ @@ -202,7 +202,7 @@ _cupsArrayAddStrings(cups_array_t *a, /* I - Array */ * The caller is responsible for freeing the memory used by the * elements themselves. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void @@ -244,7 +244,7 @@ cupsArrayClear(cups_array_t *a) /* I - Array */ /* * 'cupsArrayCount()' - Get the number of elements in the array. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - Number of elements */ @@ -271,7 +271,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void * /* O - Element */ @@ -301,7 +301,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void @@ -345,7 +345,7 @@ cupsArrayDelete(cups_array_t *a) /* I - Array */ /* * 'cupsArrayDup()' - Duplicate the array. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_array_t * /* O - Duplicate array */ @@ -430,7 +430,7 @@ cupsArrayDup(cups_array_t *a) /* I - Array */ /* * 'cupsArrayFind()' - Find an element in the array. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void * /* O - Element found or @code NULL@ */ @@ -525,7 +525,7 @@ cupsArrayFind(cups_array_t *a, /* I - Array */ /* * 'cupsArrayFirst()' - Get the first element in the array. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void * /* O - First element or @code NULL@ if the array is empty */ @@ -554,7 +554,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/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ int /* O - Index of the current element, starting at 0 */ @@ -570,7 +570,7 @@ cupsArrayGetIndex(cups_array_t *a) /* I - Array */ /* * 'cupsArrayGetInsert()' - Get the index of the last inserted element. * - * @since CUPS 1.3/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ int /* O - Index of the last inserted element, starting at 0 */ @@ -586,7 +586,7 @@ cupsArrayGetInsert(cups_array_t *a) /* I - Array */ /* * 'cupsArrayIndex()' - Get the N-th element in the array. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void * /* O - N-th element or @code NULL@ */ @@ -609,7 +609,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 0 on failure, 1 on success */ @@ -639,7 +639,7 @@ cupsArrayInsert(cups_array_t *a, /* I - Array */ /* * 'cupsArrayLast()' - Get the last element in the array. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void * /* O - Last element or @code NULL@ if the array is empty */ @@ -670,7 +670,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_array_t * /* O - Array */ @@ -692,7 +692,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/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ cups_array_t * /* O - Array */ @@ -722,7 +722,7 @@ cupsArrayNew2(cups_array_func_t f, /* I - Comparison function or @code NULL@ fo * The free function ("cf") is used to automatically free/release elements when * removed or the array is deleted. * - * @since CUPS 1.5/Mac OS X 10.7@ + * @since CUPS 1.5/OS X 10.7@ */ cups_array_t * /* O - Array */ @@ -805,7 +805,7 @@ _cupsArrayNewStrings(const char *s) /* I - Comma-delimited strings or NULL */ * @link cupsArrayFirst@, or @link cupsArrayIndex@, or @link cupsArrayLast@ * to set the current element. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void * /* O - Next element or @code NULL@ */ @@ -838,7 +838,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void * /* O - Previous element or @code NULL@ */ @@ -871,7 +871,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 1 on success, 0 on failure */ @@ -936,7 +936,7 @@ cupsArrayRemove(cups_array_t *a, /* I - Array */ /* * 'cupsArrayRestore()' - Reset the current element to the last @link cupsArraySave@. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void * /* O - New current element */ @@ -967,7 +967,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 1 on success, 0 on failure */ @@ -989,7 +989,7 @@ cupsArraySave(cups_array_t *a) /* I - Array */ /* * 'cupsArrayUserData()' - Return the user data for an array. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void * /* O - User data */ @@ -1005,7 +1005,7 @@ cupsArrayUserData(cups_array_t *a) /* I - Array */ /* * 'cups_array_add()' - Insert or append an element to the array. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ static int /* O - 1 on success, 0 on failure */ diff --git a/cups/attr.c b/cups/attr.c index 19c27d582..da7a72537 100644 --- a/cups/attr.c +++ b/cups/attr.c @@ -3,7 +3,7 @@ * * PPD model-specific attribute routines for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -30,7 +30,7 @@ /* * 'ppdFindAttr()' - Find the first matching attribute. * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ ppd_attr_t * /* O - Attribute or @code NULL@ if not found */ @@ -87,7 +87,7 @@ ppdFindAttr(ppd_file_t *ppd, /* I - PPD file data */ /* * 'ppdFindNextAttr()' - Find the next matching attribute. * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ ppd_attr_t * /* O - Attribute or @code NULL@ if not found */ diff --git a/cups/auth.c b/cups/auth.c index 7e091bee0..4b0856ade 100644 --- a/cups/auth.c +++ b/cups/auth.c @@ -3,7 +3,7 @@ * * Authentication functions for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * This file contains Kerberos support code, copyright 2006 by @@ -115,7 +115,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/Mac OS X 10.4@ + * @since CUPS 1.1.20/OS X 10.4@ */ int /* O - 0 on success, -1 on error */ diff --git a/cups/backchannel.c b/cups/backchannel.c index 496b1f768..3ee1dbc97 100644 --- a/cups/backchannel.c +++ b/cups/backchannel.c @@ -3,7 +3,7 @@ * * Backchannel functions for CUPS. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -18,7 +18,7 @@ * * cupsBackChannelRead() - Read data from the backchannel. * cupsBackChannelWrite() - Write data to the backchannel. - * cups_setup() - Setup select() + * cups_setup() - Setup select() */ /* @@ -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/Mac OS X 10.5@ + * @since CUPS 1.2/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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ssize_t /* O - Bytes written or -1 on error */ @@ -178,7 +178,7 @@ cupsBackChannelWrite( /* - * 'cups_setup()' - Setup select() + * 'cups_setup()' - Setup select() */ static void diff --git a/cups/backend.c b/cups/backend.c index 6a5e078ec..bed23f464 100644 --- a/cups/backend.c +++ b/cups/backend.c @@ -44,7 +44,7 @@ static void quote_string(const char *s); * variable or the device URI passed in argv[0], whichever is found * first. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ const char * /* O - Device URI or @code NULL@ */ @@ -54,6 +54,8 @@ cupsBackendDeviceURI(char **argv) /* I - Command-line arguments */ *auth_info_required; /* AUTH_INFO_REQUIRED env var */ _cups_globals_t *cg = _cupsGlobals(); /* Global info */ int options; /* Resolve options */ + ppd_file_t *ppd; /* PPD file */ + ppd_attr_t *ppdattr; /* PPD attribute */ if ((device_uri = getenv("DEVICE_URI")) == NULL) @@ -69,6 +71,15 @@ cupsBackendDeviceURI(char **argv) /* I - Command-line arguments */ !strcmp(auth_info_required, "negotiate")) options |= _HTTP_RESOLVE_FQDN; + if ((ppd = ppdOpenFile(getenv("PPD"))) != NULL) + { + if ((ppdattr = ppdFindAttr(ppd, "cupsIPPFaxOut", NULL)) != NULL && + !_cups_strcasecmp(ppdattr->value, "true")) + options |= _HTTP_RESOLVE_FAXOUT; + + ppdClose(ppd); + } + return (_httpResolveURI(device_uri, cg->resolved_uri, sizeof(cg->resolved_uri), options, NULL, NULL)); } @@ -81,7 +92,7 @@ cupsBackendDeviceURI(char **argv) /* I - Command-line arguments */ * It handles quoting of special characters in the device-make-and-model, * device-info, device-id, and device-location strings. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ void diff --git a/cups/conflicts.c b/cups/conflicts.c index cded4585e..456f69053 100644 --- a/cups/conflicts.c +++ b/cups/conflicts.c @@ -3,7 +3,7 @@ * * Option marking routines for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -79,7 +79,7 @@ static cups_array_t *ppd_test_constraints(ppd_file_t *ppd, * the conflicting options. The returned option array must be freed using * @link cupsFreeOptions@. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ int /* O - Number of conflicting options */ @@ -178,7 +178,7 @@ cupsGetConflicts( * choice for the conflicting option, then iterating over all possible choices * until a non-conflicting option choice is found. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ int /* O - 1 on success, 0 on failure */ @@ -650,7 +650,7 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */ * This function tests whether a particular option choice is available based * on constraints against options in the "InstallableOptions" group. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ int /* O - 1 if conflicting, 0 if not conflicting */ diff --git a/cups/cups.h b/cups/cups.h index 7425ce16e..8d19651d6 100644 --- a/cups/cups.h +++ b/cups/cups.h @@ -52,10 +52,10 @@ extern "C" { * Constants... */ -# define CUPS_VERSION 1.0599 +# define CUPS_VERSION 1.0600 # define CUPS_VERSION_MAJOR 1 # define CUPS_VERSION_MINOR 6 -# define CUPS_VERSION_PATCH -1 +# define CUPS_VERSION_PATCH 0 # define CUPS_BC_FD 3 /* Back-channel file descriptor for @@ -230,20 +230,20 @@ enum cups_ptype_e /* Printer type/capability bit CUPS_PRINTER_FAX = 0x40000, /* Fax queue */ CUPS_PRINTER_REJECTING = 0x80000, /* Printer is rejecting jobs */ CUPS_PRINTER_DELETE = 0x100000, /* Delete printer - * @since CUPS 1.2/Mac OS X 10.5@ */ + * @since CUPS 1.2/OS X 10.5@ */ CUPS_PRINTER_NOT_SHARED = 0x200000, /* Printer is not shared - * @since CUPS 1.2/Mac OS X 10.5@ */ + * @since CUPS 1.2/OS X 10.5@ */ CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication - * @since CUPS 1.2/Mac OS X 10.5@ */ + * @since CUPS 1.2/OS X 10.5@ */ CUPS_PRINTER_COMMANDS = 0x800000, /* Printer supports maintenance commands - * @since CUPS 1.2/Mac OS X 10.5@ */ + * @since CUPS 1.2/OS X 10.5@ */ CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered * and added @private@ * @since Deprecated@ */ CUPS_PRINTER_SCANNER = 0x2000000, /* Scanner-only device - * @since CUPS 1.4/Mac OS X 10.6@ */ + * @since CUPS 1.4/OS X 10.6@ */ CUPS_PRINTER_MFP = 0x4000000, /* Printer with scanning capabilities - * @since CUPS 1.4/Mac OS X 10.6@ */ + * @since CUPS 1.4/OS X 10.6@ */ CUPS_PRINTER_OPTIONS = 0x6fffc /* ~(CLASS | REMOTE | IMPLICIT | * DEFAULT | FAX | REJECTING | DELETE | * NOT_SHARED | AUTHENTICATED | @@ -267,7 +267,7 @@ typedef struct cups_dest_s /**** Destination ****/ typedef struct _cups_dinfo_s cups_dinfo_t; /* Destination capability and status - * information @since CUPS 1.6@ */ + * information @since CUPS 1.6/OS X 10.8@ */ typedef struct cups_job_s /**** Job ****/ { @@ -284,7 +284,7 @@ typedef struct cups_job_s /**** Job ****/ time_t processing_time; /* Time the job was processed */ } cups_job_t; -typedef struct cups_size_s /**** Media Size @since CUPS 1.6@ ****/ +typedef struct cups_size_s /**** Media Size @since CUPS 1.6/OS X 10.8@ ****/ { char media[128]; /* Media name to use */ int width, /* Width in hundredths of millimeters */ @@ -304,17 +304,17 @@ typedef int (*cups_client_cert_cb_t)(http_t *http, void *tls, cups_array_t *distinguished_names, void *user_data); /* Client credentials callback - * @since CUPS 1.5/Mac OS X 10.7@ */ + * @since CUPS 1.5/OS X 10.7@ */ typedef int (*cups_dest_cb_t)(void *user_data, unsigned flags, cups_dest_t *dest); /* Destination enumeration callback - * @since CUPS 1.6@ */ + * @since CUPS 1.6/OS X 10.8@ */ # ifdef __BLOCKS__ typedef int (^cups_dest_block_t)(unsigned flags, cups_dest_t *dest); /* Destination enumeration block - * @since CUPS 1.6@ */ + * @since CUPS 1.6/OS X 10.8@ */ # endif /* __BLOCKS__ */ typedef void (*cups_device_cb_t)(const char *device_class, @@ -323,7 +323,7 @@ typedef void (*cups_device_cb_t)(const char *device_class, const char *device_uri, const char *device_location, void *user_data); /* Device callback - * @since CUPS 1.4/Mac OS X 10.6@ */ + * @since CUPS 1.4/OS X 10.6@ */ typedef const char *(*cups_password_cb_t)(const char *prompt); /* Password callback */ @@ -333,12 +333,12 @@ typedef const char *(*cups_password_cb2_t)(const char *prompt, http_t *http, const char *resource, void *user_data); /* New password callback - * @since CUPS 1.4/Mac OS X 10.6@ */ + * @since CUPS 1.4/OS X 10.6@ */ typedef int (*cups_server_cert_cb_t)(http_t *http, void *tls, cups_array_t *certs, void *user_data); /* Server credentials callback - * @since CUPS 1.5/Mac OS X 10.7@ */ + * @since CUPS 1.5/OS X 10.7@ */ /* @@ -429,7 +429,7 @@ extern int cupsPrintFiles2(http_t *http, const char *name, extern int cupsSetDests2(http_t *http, int num_dests, cups_dest_t *dests) _CUPS_API_1_1_21; -/**** New in CUPS 1.2/Mac OS X 10.5 ****/ +/**** New in CUPS 1.2/OS X 10.5 ****/ extern ssize_t cupsBackChannelRead(char *buffer, size_t bytes, double timeout) _CUPS_API_1_2; extern ssize_t cupsBackChannelWrite(const char *buffer, size_t bytes, @@ -446,7 +446,7 @@ extern int cupsRemoveOption(const char *name, int num_options, cups_option_t **options) _CUPS_API_1_2; extern cups_file_t *cupsTempFile2(char *filename, int len) _CUPS_API_1_2; -/**** New in CUPS 1.3/Mac OS X 10.5 ****/ +/**** New in CUPS 1.3/OS X 10.5 ****/ extern ipp_t *cupsDoIORequest(http_t *http, ipp_t *request, const char *resource, int infile, int outfile) _CUPS_API_1_3; @@ -461,7 +461,7 @@ extern void cupsSetDefaultDest(const char *name, int num_dests, cups_dest_t *dests) _CUPS_API_1_3; -/**** New in CUPS 1.4/Mac OS X 10.6 ****/ +/**** New in CUPS 1.4/OS X 10.6 ****/ extern ipp_status_t cupsCancelJob2(http_t *http, const char *name, int job_id, int purge) _CUPS_API_1_4; extern int cupsCreateJob(http_t *http, const char *name, @@ -498,14 +498,14 @@ extern http_status_t cupsStartDocument(http_t *http, const char *name, extern http_status_t cupsWriteRequestData(http_t *http, const char *buffer, size_t length) _CUPS_API_1_4; -/**** New in CUPS 1.5 ****/ +/**** New in CUPS 1.5/OS X 10.7 ****/ extern void cupsSetClientCertCB(cups_client_cert_cb_t cb, void *user_data) _CUPS_API_1_5; extern int cupsSetCredentials(cups_array_t *certs) _CUPS_API_1_5; extern void cupsSetServerCertCB(cups_server_cert_cb_t cb, void *user_data) _CUPS_API_1_5; -/**** New in CUPS 1.6 ****/ +/**** New in CUPS 1.6/OS X 10.8 ****/ extern ipp_status_t cupsCancelDestJob(http_t *http, cups_dest_t *dest, int job_id) _CUPS_API_1_6; extern int cupsCheckDestSupported(http_t *http, cups_dest_t *dest, diff --git a/cups/custom.c b/cups/custom.c index 471361cc4..4c4cc8ace 100644 --- a/cups/custom.c +++ b/cups/custom.c @@ -3,7 +3,7 @@ * * PPD custom option routines for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2006 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -41,7 +41,7 @@ /* * 'ppdFindCustomOption()' - Find a custom option. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ppd_coption_t * /* O - Custom option or NULL */ @@ -62,7 +62,7 @@ ppdFindCustomOption(ppd_file_t *ppd, /* I - PPD file */ /* * 'ppdFindCustomParam()' - Find a parameter for a custom option. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ppd_cparam_t * /* O - Custom parameter or NULL */ @@ -88,7 +88,7 @@ ppdFindCustomParam(ppd_coption_t *opt, /* I - Custom option */ /* * 'ppdFirstCustomParam()' - Return the first parameter for a custom option. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ppd_cparam_t * /* O - Custom parameter or NULL */ @@ -104,7 +104,7 @@ ppdFirstCustomParam(ppd_coption_t *opt) /* I - Custom option */ /* * 'ppdNextCustomParam()' - Return the next parameter for a custom option. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ppd_cparam_t * /* O - Custom parameter or NULL */ diff --git a/cups/dest-job.c b/cups/dest-job.c index 01f8578e0..dc4f0879b 100644 --- a/cups/dest-job.c +++ b/cups/dest-job.c @@ -37,7 +37,7 @@ * Returns IPP_OK on success and IPP_NOT_AUTHORIZED or IPP_FORBIDDEN on * failure. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_status_t @@ -56,7 +56,7 @@ cupsCancelDestJob(http_t *http, /* I - Connection to destination */ * "job_id" is the job ID returned by cupsCreateDestJob. Returns @code IPP_OK@ * on success. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_status_t /* O - IPP status code */ @@ -140,7 +140,7 @@ cupsCloseDestJob( * Returns @code IPP_OK@ or @code IPP_OK_SUBST@ on success, saving the job ID * in the variable pointed to by "job_id". * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_status_t /* O - IPP status code */ @@ -228,7 +228,7 @@ cupsCreateDestJob( * * Returns @code IPP_OK@ or @code IPP_OK_SUBST@ on success. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_status_t /* O - Status of document submission */ @@ -275,7 +275,7 @@ cupsFinishDestDocument( * if this is the last document to be submitted in the job. Returns * @code HTTP_CONTINUE@ on success. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ http_status_t /* O - Status of document creation */ diff --git a/cups/dest-localization.c b/cups/dest-localization.c index 9d0d8b1d7..375386909 100644 --- a/cups/dest-localization.c +++ b/cups/dest-localization.c @@ -35,7 +35,7 @@ * The returned string is stored in the localization array and will become * invalid if the localization array is deleted. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ const char * /* O - Localized string */ @@ -56,7 +56,7 @@ cupsLocalizeDestOption( * The returned string is stored in the localization array and will become * invalid if the localization array is deleted. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ const char * /* O - Localized string */ diff --git a/cups/dest-options.c b/cups/dest-options.c index a36b5334e..cfdf6077e 100644 --- a/cups/dest-options.c +++ b/cups/dest-options.c @@ -62,7 +62,7 @@ static int cups_is_close_media_db(_cups_media_db_t *a, * * Returns 1 if supported, 0 otherwise. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 if supported, 0 otherwise */ @@ -249,7 +249,7 @@ cupsCheckDestSupported( * If cupsCopyDestConflicts returns 1 but "num_resolved" and "resolved" are set * to 0 and NULL, respectively, then the conflict cannot be resolved. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 if there is a conflict */ @@ -308,7 +308,7 @@ cupsCopyDestConflicts( * The caller is responsible for calling @link cupsFreeDestInfo@ on the return * value. @code NULL@ is returned on error. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ cups_dinfo_t * /* O - Destination information */ @@ -459,7 +459,7 @@ cupsFreeDestInfo(cups_dinfo_t *dinfo) /* I - Destination information */ * * Returns 1 when there is a match and 0 if there is not a match. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on match, 0 on failure */ @@ -525,7 +525,7 @@ cupsGetDestMediaByName( * * Returns 1 when there is a match and 0 if there is not a match. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on match, 0 on failure */ diff --git a/cups/dest.c b/cups/dest.c index bf9a0dcc4..ee9d57208 100644 --- a/cups/dest.c +++ b/cups/dest.c @@ -544,7 +544,7 @@ _cupsAppleSetUseLastPrinter( * to by "cancel" is non-zero, or the callback function (or block) returns 0, * The caller is responsible for calling httpClose() on the returned object. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ http_t * /* O - Connection to server or @code NULL@ */ @@ -710,7 +710,7 @@ cupsConnectDest( * to by "cancel" is non-zero, or the callback function (or block) returns 0, * The caller is responsible for calling httpClose() on the returned object. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ http_t * /* O - Connection to server or @code NULL@ */ @@ -736,7 +736,7 @@ cupsConnectDestBlock( * copy) - for use with the cupsEnumDests* functions. The caller is responsible * for calling cupsFreeDests() on the returned object(s). * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int @@ -816,7 +816,7 @@ cupsCopyDest(cups_dest_t *dest, * Enumeration happens on the current thread and does not return until all * destinations have been enumerated or the callback function returns 0. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -860,6 +860,8 @@ cupsEnumDests( * Range check input... */ + (void)flags; + if (!cb) return (0); @@ -1028,7 +1030,7 @@ cupsEnumDests( * Enumeration happens on the current thread and does not return until all * destinations have been enumerated or the block returns 0. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -1208,7 +1210,7 @@ _cupsGetDestResource( * Free the memory used by the destination array using the @link cupsFreeDests@ * function. * - * Note: On Mac OS X this function also gets the default paper from the system + * Note: On OS X this function also gets the default paper from the system * preferences (~/L/P/org.cups.PrintingPrefs.plist) and includes it in the * options array for each destination that supports it. */ @@ -1501,7 +1503,7 @@ cupsGetDests(cups_dest_t **dests) /* O - Destinations */ * 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/Mac OS X 10.4@ + * @since CUPS 1.1.21/OS X 10.4@ */ int /* O - Number of destinations */ @@ -1684,7 +1686,7 @@ cupsGetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_ * The returned destination must be freed using @link cupsFreeDests@ with a * "num_dests" value of 1. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ cups_dest_t * /* O - Destination or @code NULL@ */ @@ -1809,7 +1811,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/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ int /* O - New number of destinations */ @@ -1855,7 +1857,7 @@ cupsRemoveDest(const char *name, /* I - Destination name */ /* * 'cupsSetDefaultDest()' - Set the default destination. * - * @since CUPS 1.3/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ void @@ -1910,7 +1912,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/Mac OS X 10.4@ + * @since CUPS 1.1.21/OS X 10.4@ */ int /* O - 0 on success, -1 on error */ diff --git a/cups/dir.c b/cups/dir.c index 94a2a9b5b..b98f07c85 100644 --- a/cups/dir.c +++ b/cups/dir.c @@ -5,7 +5,7 @@ * * This set of APIs abstracts enumeration of directory entries. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2005 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -79,7 +79,7 @@ _cups_dir_time(FILETIME ft) /* I - File time */ /* * 'cupsDirClose()' - Close a directory. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void @@ -110,7 +110,7 @@ cupsDirClose(cups_dir_t *dp) /* I - Directory pointer */ /* * 'cupsDirOpen()' - Open a directory. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_dir_t * /* O - Directory pointer or @code NULL@ if the directory could not be opened. */ @@ -153,7 +153,7 @@ cupsDirOpen(const char *directory) /* I - Directory name */ /* * 'cupsDirRead()' - Read the next directory entry. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_dentry_t * /* O - Directory entry or @code NULL@ if there are no more */ @@ -213,7 +213,7 @@ cupsDirRead(cups_dir_t *dp) /* I - Directory pointer */ /* * 'cupsDirRewind()' - Rewind to the start of the directory. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void @@ -263,7 +263,7 @@ struct _cups_dir_s /**** Directory data structure ****/ /* * 'cupsDirClose()' - Close a directory. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void @@ -290,7 +290,7 @@ cupsDirClose(cups_dir_t *dp) /* I - Directory pointer */ /* * 'cupsDirOpen()' - Open a directory. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_dir_t * /* O - Directory pointer or @code NULL@ if the directory could not be opened. */ @@ -344,7 +344,7 @@ cupsDirOpen(const char *directory) /* I - Directory name */ /* * 'cupsDirRead()' - Read the next directory entry. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_dentry_t * /* O - Directory entry or @code NULL@ when there are no more */ @@ -442,7 +442,7 @@ cupsDirRead(cups_dir_t *dp) /* I - Directory pointer */ /* * 'cupsDirRewind()' - Rewind to the start of the directory. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void diff --git a/cups/emit.c b/cups/emit.c index e322bfe1a..650e8479b 100644 --- a/cups/emit.c +++ b/cups/emit.c @@ -87,7 +87,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - Number of options marked */ @@ -260,7 +260,7 @@ ppdEmit(ppd_file_t *ppd, /* I - PPD file record */ * * When "limit" is zero, this function is identical to ppdEmit(). * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 0 on success, -1 on failure */ @@ -554,7 +554,7 @@ ppdEmitJCL(ppd_file_t *ppd, /* I - PPD file record */ /* * 'ppdEmitJCLEnd()' - Emit JCLEnd code to a file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 0 on success, -1 on failure */ @@ -613,7 +613,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ char * /* O - String containing option code or @code NULL@ if there is no option code */ diff --git a/cups/encode.c b/cups/encode.c index 2226e1950..b417fe164 100644 --- a/cups/encode.c +++ b/cups/encode.c @@ -227,7 +227,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void diff --git a/cups/file.c b/cups/file.c index 2711e5680..1918ec5be 100644 --- a/cups/file.c +++ b/cups/file.c @@ -8,7 +8,7 @@ * our own file functions allows us to provide transparent support of * gzip'd print files, PPD files, etc. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -352,7 +352,7 @@ _cupsFileCheckFilter( /* * 'cupsFileClose()' - Close a CUPS file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 0 on success, -1 on error */ @@ -484,7 +484,7 @@ cupsFileClose(cups_file_t *fp) /* I - CUPS file */ /* * 'cupsFileCompression()' - Return whether a file is compressed. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - @code CUPS_FILE_NONE@ or @code CUPS_FILE_GZIP@ */ @@ -497,7 +497,7 @@ cupsFileCompression(cups_file_t *fp) /* I - CUPS file */ /* * 'cupsFileEOF()' - Return the end-of-file status. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 1 on end of file, 0 otherwise */ @@ -516,7 +516,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ const char * /* O - Full path to file or @code NULL@ if not found */ @@ -619,7 +619,7 @@ cupsFileFind(const char *filename, /* I - File to find */ /* * 'cupsFileFlush()' - Flush pending output. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 0 on success, -1 on error */ @@ -667,7 +667,7 @@ cupsFileFlush(cups_file_t *fp) /* I - CUPS file */ /* * 'cupsFileGetChar()' - Get a single character from a file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - Character or -1 on end of file */ @@ -711,7 +711,7 @@ cupsFileGetChar(cups_file_t *fp) /* I - CUPS file */ /* * 'cupsFileGetConf()' - Get a line from a configuration file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ char * /* O - Line read or @code NULL@ on end of file or error */ @@ -855,7 +855,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ size_t /* O - Number of bytes on line or 0 on end of file */ @@ -930,7 +930,7 @@ cupsFileGetLine(cups_file_t *fp, /* I - File to read from */ /* * 'cupsFileGets()' - Get a CR and/or LF-terminated line. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ char * /* O - Line read or @code NULL@ on end of file or error */ @@ -1012,7 +1012,7 @@ cupsFileGets(cups_file_t *fp, /* I - CUPS file */ /* * 'cupsFileLock()' - Temporarily lock access to a file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 0 on success, -1 on error */ @@ -1041,7 +1041,7 @@ cupsFileLock(cups_file_t *fp, /* I - CUPS file */ /* * 'cupsFileNumber()' - Return the file descriptor associated with a CUPS file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - File descriptor */ @@ -1070,7 +1070,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_file_t * /* O - CUPS file or @code NULL@ if the file or socket cannot be opened */ @@ -1192,7 +1192,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_file_t * /* O - CUPS file or @code NULL@ if the file could not be opened */ @@ -1304,7 +1304,7 @@ cupsFileOpenFd(int fd, /* I - File descriptor */ /* * 'cupsFilePeekChar()' - Peek at the next character from a file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - Character or -1 on end of file */ @@ -1336,7 +1336,7 @@ cupsFilePeekChar(cups_file_t *fp) /* I - CUPS file */ /* * 'cupsFilePrintf()' - Write a formatted string. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - Number of bytes written or -1 on error */ @@ -1433,7 +1433,7 @@ cupsFilePrintf(cups_file_t *fp, /* I - CUPS file */ /* * 'cupsFilePutChar()' - Write a character. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 0 on success, -1 on error */ @@ -1487,7 +1487,7 @@ cupsFilePutChar(cups_file_t *fp, /* I - CUPS file */ * * This function handles any comment escaping of the value. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ ssize_t /* O - Number of bytes written or -1 on error */ @@ -1548,7 +1548,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - Number of bytes written or -1 on error */ @@ -1612,7 +1612,7 @@ cupsFilePuts(cups_file_t *fp, /* I - CUPS file */ /* * 'cupsFileRead()' - Read from a file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ssize_t /* O - Number of bytes read or -1 on error */ @@ -1689,7 +1689,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ off_t /* O - New file position or -1 on error */ @@ -1761,7 +1761,7 @@ cupsFileRewind(cups_file_t *fp) /* I - CUPS file */ /* * 'cupsFileSeek()' - Seek in a file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ off_t /* O - New file position or -1 on error */ @@ -1914,7 +1914,7 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */ /* * 'cupsFileStderr()' - Return a CUPS file associated with stderr. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_file_t * /* O - CUPS file */ @@ -1950,7 +1950,7 @@ cupsFileStderr(void) /* * 'cupsFileStdin()' - Return a CUPS file associated with stdin. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_file_t * /* O - CUPS file */ @@ -1980,7 +1980,7 @@ cupsFileStdin(void) /* * 'cupsFileStdout()' - Return a CUPS file associated with stdout. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_file_t * /* O - CUPS file */ @@ -2016,7 +2016,7 @@ cupsFileStdout(void) /* * 'cupsFileTell()' - Return the current file position. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ off_t /* O - File position */ @@ -2033,7 +2033,7 @@ cupsFileTell(cups_file_t *fp) /* I - CUPS file */ /* * 'cupsFileUnlock()' - Unlock access to a file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 0 on success, -1 on error */ @@ -2063,7 +2063,7 @@ cupsFileUnlock(cups_file_t *fp) /* I - CUPS file */ /* * 'cupsFileWrite()' - Write to a file. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ssize_t /* O - Number of bytes written or -1 on error */ diff --git a/cups/getdevices.c b/cups/getdevices.c index a0744ac89..c1f5a294a 100644 --- a/cups/getdevices.c +++ b/cups/getdevices.c @@ -3,7 +3,7 @@ * * cupsGetDevices implementation for CUPS. * - * Copyright 2008-2011 by Apple Inc. + * Copyright 2008-2012 by Apple Inc. * * These coded instructions, statements, and computer programs are the * property of Apple Inc. and are protected by Federal copyright @@ -34,7 +34,7 @@ * parameters provide comma-delimited lists of backends to include or omit from * the request respectively. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ ipp_status_t /* O - Request status - @code IPP_OK@ on success. */ diff --git a/cups/getputfile.c b/cups/getputfile.c index 5104abdd8..7e12fe9fc 100644 --- a/cups/getputfile.c +++ b/cups/getputfile.c @@ -3,7 +3,7 @@ * * Get/put file functions for CUPS. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -41,7 +41,7 @@ * * This function returns @code HTTP_OK@ when the file is successfully retrieved. * - * @since CUPS 1.1.20/Mac OS X 10.4@ + * @since CUPS 1.1.20/OS X 10.4@ */ http_status_t /* O - HTTP status */ @@ -187,7 +187,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/Mac OS X 10.4@ + * @since CUPS 1.1.20/OS X 10.4@ */ http_status_t /* O - HTTP status */ @@ -255,7 +255,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/Mac OS X 10.4@ + * @since CUPS 1.1.20/OS X 10.4@ */ http_status_t /* O - HTTP status */ @@ -446,7 +446,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/Mac OS X 10.4@ + * @since CUPS 1.1.20/OS X 10.4@ */ http_status_t /* O - HTTP status */ diff --git a/cups/globals.c b/cups/globals.c index 86375ea5c..bc4191c1d 100644 --- a/cups/globals.c +++ b/cups/globals.c @@ -44,8 +44,10 @@ static _cups_threadkey_t cups_globals_key = _CUPS_THREADKEY_INITIALIZER; static pthread_once_t cups_globals_key_once = PTHREAD_ONCE_INIT; /* One-time initialization object */ #endif /* HAVE_PTHREAD_H */ +#if defined(HAVE_PTHREAD_H) || defined(WIN32) static _cups_mutex_t cups_global_mutex = _CUPS_MUTEX_INITIALIZER; /* Global critical section */ +#endif /* HAVE_PTHREAD_H || WIN32 */ /* @@ -56,7 +58,9 @@ static _cups_mutex_t cups_global_mutex = _CUPS_MUTEX_INITIALIZER; static void cups_fix_path(char *path); #endif /* WIN32 */ static _cups_globals_t *cups_globals_alloc(void); +#if defined(HAVE_PTHREAD_H) || defined(WIN32) static void cups_globals_free(_cups_globals_t *g); +#endif /* HAVE_PTHREAD_H || WIN32 */ #ifdef HAVE_PTHREAD_H static void cups_globals_init(void); #endif /* HAVE_PTHREAD_H */ @@ -322,6 +326,7 @@ cups_globals_alloc(void) * 'cups_globals_free()' - Free global data. */ +#if defined(HAVE_PTHREAD_H) || defined(WIN32) static void cups_globals_free(_cups_globals_t *cg) /* I - Pointer to global data */ { @@ -354,6 +359,7 @@ cups_globals_free(_cups_globals_t *cg) /* I - Pointer to global data */ free(cg); } +#endif /* HAVE_PTHREAD_H || WIN32 */ #ifdef HAVE_PTHREAD_H diff --git a/cups/http-addr.c b/cups/http-addr.c index faf7348d2..9e1ef660f 100644 --- a/cups/http-addr.c +++ b/cups/http-addr.c @@ -3,7 +3,7 @@ * * HTTP address routines for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2006 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -45,7 +45,7 @@ /* * 'httpAddrAny()' - Check for the "any" address. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 1 if "any", 0 otherwise */ @@ -71,7 +71,7 @@ httpAddrAny(const http_addr_t *addr) /* I - Address to check */ /* * 'httpAddrEqual()' - Compare two addresses. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 1 if equal, 0 if not */ @@ -104,7 +104,7 @@ httpAddrEqual(const http_addr_t *addr1, /* I - First address */ /* * 'httpAddrLength()' - Return the length of the address in bytes. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - Length in bytes */ @@ -135,7 +135,7 @@ httpAddrLength(const http_addr_t *addr) /* I - Address */ /* * 'httpAddrLocalhost()' - Check for the local loopback address. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 1 if local host, 0 otherwise */ @@ -174,7 +174,7 @@ httpAddrLocalhost( /* * 'httpAddrLookup()' - Lookup the hostname associated with the address. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ char * /* O - Host name */ @@ -342,7 +342,7 @@ _httpAddrSetPort(http_addr_t *addr, /* I - Address */ /* * 'httpAddrString()' - Convert an address to a numeric string. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ char * /* O - Numeric address string */ @@ -616,7 +616,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ const char * /* O - FQDN for connection or system */ diff --git a/cups/http-addrlist.c b/cups/http-addrlist.c index 93e4df58f..223a68695 100644 --- a/cups/http-addrlist.c +++ b/cups/http-addrlist.c @@ -40,7 +40,7 @@ /* * 'httpAddrConnect()' - Connect to any of the addresses in the list. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ http_addrlist_t * /* O - Connected address or NULL on failure */ @@ -58,7 +58,7 @@ httpAddrConnect( * 'httpAddrConnect2()' - Connect to any of the addresses in the list with a * timeout and optional cancel. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ http_addrlist_t * /* O - Connected address or NULL on failure */ @@ -330,7 +330,7 @@ httpAddrConnect2( /* * 'httpAddrFreeList()' - Free an address list. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void @@ -358,7 +358,7 @@ httpAddrFreeList( /* * 'httpAddrGetList()' - Get a list of addresses for a hostname. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ http_addrlist_t * /* O - List of addresses or NULL */ diff --git a/cups/http-private.h b/cups/http-private.h index ab98b5ab3..3cfeff7f6 100644 --- a/cups/http-private.h +++ b/cups/http-private.h @@ -3,7 +3,7 @@ * * Private HTTP definitions for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -154,6 +154,7 @@ extern "C" { #define _HTTP_RESOLVE_DEFAULT 0 /* Just resolve with default options */ #define _HTTP_RESOLVE_STDERR 1 /* Log resolve progress to stderr */ #define _HTTP_RESOLVE_FQDN 2 /* Resolve to a FQDN */ +#define _HTTP_RESOLVE_FAXOUT 4 /* Resolve FaxOut service? */ /* diff --git a/cups/http-support.c b/cups/http-support.c index 40c69826f..19538941d 100644 --- a/cups/http-support.c +++ b/cups/http-support.c @@ -3,7 +3,7 @@ * * HTTP support routines for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -16,33 +16,37 @@ * * Contents: * - * httpAssembleURI() - Assemble a uniform resource identifier from its - * components. + * httpAssembleURI() - Assemble a uniform resource identifier from its + * components. * httpAssembleURIf() - Assemble a uniform resource identifier from its - * components with a formatted resource. + * components with a formatted resource. * _httpAssembleUUID() - Make a UUID URI conforming to RFC 4122. - * httpDecode64() - Base64-decode a string. - * httpDecode64_2() - Base64-decode a string. - * httpEncode64() - Base64-encode a string. - * httpEncode64_2() - Base64-encode a string. + * httpDecode64() - Base64-decode a string. + * httpDecode64_2() - Base64-decode a string. + * httpEncode64() - Base64-encode a string. + * httpEncode64_2() - Base64-encode a string. * httpGetDateString() - Get a formatted date/time string from a time value. * httpGetDateString2() - Get a formatted date/time string from a time value. - * httpGetDateTime() - Get a time value from a formatted date/time string. - * httpSeparate() - Separate a Universal Resource Identifier into its - * components. - * httpSeparate2() - Separate a Universal Resource Identifier into its - * components. - * httpSeparateURI() - Separate a Universal Resource Identifier into its - * components. - * httpStatus() - Return a short string describing a HTTP status code. - * _cups_hstrerror() - hstrerror() emulation function for Solaris and - * others. - * _httpDecodeURI() - Percent-decode a HTTP request URI. - * _httpEncodeURI() - Percent-encode a HTTP request URI. - * _httpResolveURI() - Resolve a DNS-SD URI. + * httpGetDateTime() - Get a time value from a formatted date/time string. + * httpSeparate() - Separate a Universal Resource Identifier into its + * components. + * httpSeparate2() - Separate a Universal Resource Identifier into its + * components. + * httpSeparateURI() - Separate a Universal Resource Identifier into its + * components. + * httpStatus() - Return a short string describing a HTTP status + * code. + * _cups_hstrerror() - hstrerror() emulation function for Solaris and + * others. + * _httpDecodeURI() - Percent-decode a HTTP request URI. + * _httpEncodeURI() - Percent-encode a HTTP request URI. + * _httpResolveURI() - Resolve a DNS-SD URI. + * http_client_cb() - Client callback for resolving URI. * http_copy_decode() - Copy and decode a URI. * http_copy_encode() - Copy and encode a URI. - * http_resolve_cb() - Build a device URI for the given service name. + * http_poll_cb() - Wait for input on the specified file descriptors. + * http_resolve_cb() - Build a device URI for the given service name. + * http_resolve_cb() - Build a device URI for the given service name. */ /* @@ -59,6 +63,10 @@ # else # include
# endif /* WIN32 */ +#elif defined(HAVE_AVAHI) +# include +# include +# include #endif /* HAVE_DNSSD */ @@ -68,9 +76,12 @@ typedef struct _http_uribuf_s /* URI buffer */ { - char *buffer; /* Pointer to buffer */ - size_t bufsize; /* Size of buffer */ - int options; /* Options passed to _httpResolveURI */ +#ifdef HAVE_AVAHI + AvahiSimplePoll *poll; /* Poll state */ +#endif /* HAVE_AVAHI */ + char *buffer; /* Pointer to buffer */ + size_t bufsize; /* Size of buffer */ + int options; /* Options passed to _httpResolveURI */ } _http_uribuf_t; @@ -127,6 +138,22 @@ static void DNSSD_API http_resolve_cb(DNSServiceRef sdRef, void *context); #endif /* HAVE_DNSSD */ +#ifdef HAVE_AVAHI +static void http_client_cb(AvahiClient *client, + AvahiClientState state, void *simple_poll); +static int http_poll_cb(struct pollfd *pollfds, unsigned int num_pollfds, + int timeout, void *context); +static void http_resolve_cb(AvahiServiceResolver *resolver, + AvahiIfIndex interface, + AvahiProtocol protocol, + AvahiResolverEvent event, + const char *name, const char *type, + const char *domain, const char *host_name, + const AvahiAddress *address, uint16_t port, + AvahiStringList *txt, + AvahiLookupResultFlags flags, void *context); +#endif /* HAVE_AVAHI */ + /* * 'httpAssembleURI()' - Assemble a uniform resource identifier from its @@ -137,7 +164,7 @@ static void DNSSD_API http_resolve_cb(DNSServiceRef sdRef, * place of traditional string functions whenever you need to create a * URI string. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ http_uri_status_t /* O - URI status */ @@ -387,7 +414,7 @@ httpAssembleURI( * this function in place of traditional string functions whenever * you need to create a URI string. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ http_uri_status_t /* O - URI status */ @@ -517,7 +544,7 @@ httpDecode64(char *out, /* I - String to write to */ /* * 'httpDecode64_2()' - Base64-decode a string. * - * @since CUPS 1.1.21/Mac OS X 10.4@ + * @since CUPS 1.1.21/OS X 10.4@ */ char * /* O - Decoded string */ @@ -636,7 +663,7 @@ httpEncode64(char *out, /* I - String to write to */ /* * 'httpEncode64_2()' - Base64-encode a string. * - * @since CUPS 1.1.21/Mac OS X 10.4@ + * @since CUPS 1.1.21/OS X 10.4@ */ char * /* O - Encoded string */ @@ -745,7 +772,7 @@ httpGetDateString(time_t t) /* I - UNIX time */ /* * 'httpGetDateString2()' - Get a formatted date/time string from a time value. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ const char * /* O - Date/time string */ @@ -865,7 +892,7 @@ httpSeparate(const char *uri, /* I - Universal Resource Identifier */ * * This function is deprecated; use the httpSeparateURI() function instead. * - * @since CUPS 1.1.21/Mac OS X 10.4@ + * @since CUPS 1.1.21/OS X 10.4@ * @deprecated@ */ @@ -890,7 +917,7 @@ httpSeparate2(const char *uri, /* I - Universal Resource Identifier */ * 'httpSeparateURI()' - Separate a Universal Resource Identifier into its * components. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ http_uri_status_t /* O - Result of separation */ @@ -1434,24 +1461,29 @@ _httpResolveURI( if (strstr(hostname, "._tcp")) { -#ifdef HAVE_DNSSD -# ifdef WIN32 -# pragma comment(lib, "dnssd.lib") -# endif /* WIN32 */ - DNSServiceRef ref, /* DNS-SD master service reference */ - domainref, /* DNS-SD service reference for domain */ - localref; /* DNS-SD service reference for .local */ - int domainsent = 0, /* Send the domain resolve? */ - offline = 0; /* offline-report state set? */ +#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) char *regtype, /* Pointer to type in hostname */ *domain; /* Pointer to domain in hostname */ _http_uribuf_t uribuf; /* URI buffer */ -#ifdef HAVE_POLL + int offline = 0; /* offline-report state set? */ +# ifdef HAVE_DNSSD +# ifdef WIN32 +# pragma comment(lib, "dnssd.lib") +# endif /* WIN32 */ + DNSServiceRef ref, /* DNS-SD master service reference */ + domainref, /* DNS-SD service reference for domain */ + localref; /* DNS-SD service reference for .local */ + int domainsent = 0; /* Send the domain resolve? */ +# ifdef HAVE_POLL struct pollfd polldata; /* Polling data */ -#else /* select() */ +# else /* select() */ fd_set input_set; /* Input set for select() */ struct timeval stimeout; /* Timeout value for select() */ -#endif /* HAVE_POLL */ +# endif /* HAVE_POLL */ +# elif defined(HAVE_AVAHI) + AvahiClient *client; /* Client information */ + int error; /* Status */ +# endif /* HAVE_DNSSD */ if (options & _HTTP_RESOLVE_STDERR) fprintf(stderr, "DEBUG: Resolving \"%s\"...\n", hostname); @@ -1491,6 +1523,7 @@ _httpResolveURI( uribuf.buffer = resolved_uri; uribuf.bufsize = resolved_size; uribuf.options = options; + resolved_uri[0] = '\0'; DEBUG_printf(("6_httpResolveURI: Resolving hostname=\"%s\", regtype=\"%s\", " @@ -1504,6 +1537,7 @@ _httpResolveURI( uri = NULL; +# ifdef HAVE_DNSSD if (DNSServiceCreateConnection(&ref) == kDNSServiceErr_NoError) { localref = ref; @@ -1536,26 +1570,26 @@ _httpResolveURI( if ((timeout = end_time - time(NULL)) > 2) timeout = 2; -#ifdef HAVE_POLL +# ifdef HAVE_POLL polldata.fd = DNSServiceRefSockFD(ref); polldata.events = POLLIN; fds = poll(&polldata, 1, 1000 * timeout); -#else /* select() */ +# else /* select() */ FD_ZERO(&input_set); FD_SET(DNSServiceRefSockFD(ref), &input_set); -#ifdef WIN32 +# ifdef WIN32 stimeout.tv_sec = (long)timeout; -#else +# else stimeout.tv_sec = timeout; -#endif /* WIN32 */ +# endif /* WIN32 */ stimeout.tv_usec = 0; fds = select(DNSServiceRefSockFD(ref)+1, &input_set, NULL, NULL, &stimeout); -#endif /* HAVE_POLL */ +# endif /* HAVE_POLL */ if (fds < 0) { @@ -1619,6 +1653,74 @@ _httpResolveURI( DNSServiceRefDeallocate(ref); } +# else /* HAVE_AVAHI */ + if ((uribuf.poll = avahi_simple_poll_new()) != NULL) + { + avahi_simple_poll_set_func(uribuf.poll, http_poll_cb, NULL); + + if ((client = avahi_client_new(avahi_simple_poll_get(uribuf.poll), + 0, http_client_cb, + &uribuf, &error)) != NULL) + { + if (avahi_service_resolver_new(client, AVAHI_IF_UNSPEC, + AVAHI_PROTO_UNSPEC, hostname, + regtype, "local.", AVAHI_PROTO_UNSPEC, 0, + http_resolve_cb, &uribuf) != NULL) + { + time_t start_time = time(NULL), + /* Start time */ + end_time = start_time + 90; + /* End time */ + int pstatus; /* Poll status */ + + pstatus = avahi_simple_poll_iterate(uribuf.poll, 2000); + + if (pstatus == 0 && !resolved_uri[0] && domain && + _cups_strcasecmp(domain, "local.")) + { + /* + * Resolve for .local hasn't returned anything, try the listed + * domain... + */ + + avahi_service_resolver_new(client, AVAHI_IF_UNSPEC, + AVAHI_PROTO_UNSPEC, hostname, + regtype, domain, AVAHI_PROTO_UNSPEC, 0, + http_resolve_cb, &uribuf); + } + + while (!pstatus && !resolved_uri[0] && time(NULL) < end_time) + { + if ((pstatus = avahi_simple_poll_iterate(uribuf.poll, 2000)) != 0) + break; + + /* + * If it hasn't resolved within 5 seconds set the offline-report + * printer-state-reason... + */ + + if ((options & _HTTP_RESOLVE_STDERR) && offline == 0 && + time(NULL) > (start_time + 5)) + { + fputs("STATE: +offline-report\n", stderr); + offline = 1; + } + } + + /* + * Collect the result (if we got one). + */ + + if (resolved_uri[0]) + uri = resolved_uri; + } + + avahi_client_free(client); + } + + avahi_simple_poll_free(uribuf.poll); + } +# endif /* HAVE_DNSSD */ if (options & _HTTP_RESOLVE_STDERR) { @@ -1634,13 +1736,13 @@ _httpResolveURI( } } -#else +#else /* HAVE_DNSSD || HAVE_AVAHI */ /* * No DNS-SD support... */ uri = NULL; -#endif /* HAVE_DNSSD */ +#endif /* HAVE_DNSSD || HAVE_AVAHI */ if ((options & _HTTP_RESOLVE_STDERR) && !uri) _cupsLangPrintFilter(stderr, "ERROR", _("Unable to find printer.")); @@ -1661,6 +1763,35 @@ _httpResolveURI( } +#ifdef HAVE_AVAHI +/* + * 'http_client_cb()' - Client callback for resolving URI. + */ + +static void +http_client_cb( + AvahiClient *client, /* I - Client information */ + AvahiClientState state, /* I - Current state */ + void *context) /* I - Pointer to URI buffer */ +{ + DEBUG_printf(("7http_client_cb(client=%p, state=%d, context=%p)", client, + state, context)); + + /* + * If the connection drops, quit. + */ + + if (state == AVAHI_CLIENT_FAILURE) + { + _http_uribuf_t *uribuf = (_http_uribuf_t *)context; + /* URI buffer */ + + avahi_simple_poll_quit(uribuf->poll); + } +} +#endif /* HAVE_AVAHI */ + + /* * 'http_copy_decode()' - Copy and decode a URI. */ @@ -1796,13 +1927,16 @@ http_resolve_cb( const unsigned char *txtRecord, /* I - TXT record data */ void *context) /* I - Pointer to URI buffer */ { + _http_uribuf_t *uribuf = (_http_uribuf_t *)context; + /* URI buffer */ const char *scheme, /* URI scheme */ - *hostptr; /* Pointer into hostTarget */ - char rp[257], /* Remote printer */ + *hostptr, /* Pointer into hostTarget */ + *reskey, /* "rp" or "rfo" */ + *resdefault; /* Default path */ + char resource[257], /* Remote path */ fqdn[256]; /* FQDN of the .local name */ const void *value; /* Value from TXT record */ uint8_t valueLen; /* Length of value */ - _http_uribuf_t *uribuf; /* URI buffer */ DEBUG_printf(("7http_resolve_cb(sdRef=%p, flags=%x, interfaceIndex=%u, " @@ -1811,8 +1945,6 @@ http_resolve_cb( interfaceIndex, errorCode, fullName, hostTarget, port, txtLen, txtRecord, context)); - uribuf = (_http_uribuf_t *)context; - /* * Figure out the scheme from the full name... */ @@ -1836,17 +1968,29 @@ http_resolve_cb( * Extract the "remote printer" key from the TXT record... */ - if ((value = TXTRecordGetValuePtr(txtLen, txtRecord, "rp", + if ((uribuf->options & _HTTP_RESOLVE_FAXOUT) && + (!strcmp(scheme, "ipp") || !strcmp(scheme, "ipps"))) + { + reskey = "rfo"; + resdefault = "/ipp/faxout"; + } + else + { + reskey = "rp"; + resdefault = "/"; + } + + if ((value = TXTRecordGetValuePtr(txtLen, txtRecord, reskey, &valueLen)) != NULL) { if (((char *)value)[0] == '/') { /* - * "rp" value (incorrectly) has a leading slash already... + * Value (incorrectly) has a leading slash already... */ - memcpy(rp, value, valueLen); - rp[valueLen] = '\0'; + memcpy(resource, value, valueLen); + resource[valueLen] = '\0'; } else { @@ -1854,19 +1998,18 @@ http_resolve_cb( * Convert to resource by concatenating with a leading "/"... */ - rp[0] = '/'; - memcpy(rp + 1, value, valueLen); - rp[valueLen + 1] = '\0'; + resource[0] = '/'; + memcpy(resource + 1, value, valueLen); + resource[valueLen + 1] = '\0'; } } else { /* - * Default "rp" value is blank, mapping to a path of "/"... + * Use the default value... */ - rp[0] = '/'; - rp[1] = '\0'; + strlcpy(resource, resdefault, sizeof(resource)); } /* @@ -1922,10 +2065,220 @@ http_resolve_cb( */ httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize, scheme, - NULL, hostTarget, ntohs(port), rp); + NULL, hostTarget, ntohs(port), resource); DEBUG_printf(("8http_resolve_cb: Resolved URI is \"%s\"...", uribuf->buffer)); } + +#elif defined(HAVE_AVAHI) +/* + * 'http_poll_cb()' - Wait for input on the specified file descriptors. + * + * Note: This function is needed because avahi_simple_poll_iterate is broken + * and always uses a timeout of 0 (!) milliseconds. + * (Avahi Ticket #364) + */ + +static int /* O - Number of file descriptors matching */ +http_poll_cb( + struct pollfd *pollfds, /* I - File descriptors */ + unsigned int num_pollfds, /* I - Number of file descriptors */ + int timeout, /* I - Timeout in milliseconds (used) */ + void *context) /* I - User data (unused) */ +{ + (void)timeout; + (void)context; + + return (poll(pollfds, num_pollfds, 2000)); +} + + +/* + * 'http_resolve_cb()' - Build a device URI for the given service name. + */ + +static void +http_resolve_cb( + AvahiServiceResolver *resolver, /* I - Resolver (unused) */ + AvahiIfIndex interface, /* I - Interface index (unused) */ + AvahiProtocol protocol, /* I - Network protocol (unused) */ + AvahiResolverEvent event, /* I - Event (found, etc.) */ + const char *name, /* I - Service name */ + const char *type, /* I - Registration type */ + const char *domain, /* I - Domain (unused) */ + const char *hostTarget, /* I - Hostname */ + const AvahiAddress *address, /* I - Address (unused) */ + uint16_t port, /* I - Port number */ + AvahiStringList *txt, /* I - TXT record */ + AvahiLookupResultFlags flags, /* I - Lookup flags (unused) */ + void *context) /* I - Pointer to URI buffer */ +{ + _http_uribuf_t *uribuf = (_http_uribuf_t *)context; + /* URI buffer */ + const char *scheme, /* URI scheme */ + *hostptr, /* Pointer into hostTarget */ + *reskey, /* "rp" or "rfo" */ + *resdefault; /* Default path */ + char resource[257], /* Remote path */ + fqdn[256]; /* FQDN of the .local name */ + AvahiStringList *pair; /* Current TXT record key/value pair */ + char *value; /* Value for "rp" key */ + size_t valueLen = 0; /* Length of "rp" key */ + + + DEBUG_printf(("7http_resolve_cb(resolver=%p, " + "interface=%d, protocol=%d, event=%d, name=\"%s\", " + "type=\"%s\", domain=\"%s\", hostTarget=\"%s\", address=%p, " + "port=%d, txt=%p, flags=%d, context=%p)", + resolver, interface, protocol, event, name, type, domain, + hostTarget, address, port, txt, flags, context)); + + if (event != AVAHI_RESOLVER_FOUND) + { + avahi_service_resolver_free(resolver); + avahi_simple_poll_quit(uribuf->poll); + return; + } + + /* + * Figure out the scheme from the full name... + */ + + if (strstr(type, "_ipp.")) + scheme = "ipp"; + else if (strstr(type, "_printer.")) + scheme = "lpd"; + else if (strstr(type, "_pdl-datastream.")) + scheme = "socket"; + else + scheme = "riousbprint"; + + if (!strncmp(type, "_ipps.", 6) || !strncmp(type, "_ipp-tls.", 9)) + scheme = "ipps"; + else if (!strncmp(type, "_ipp.", 5) || !strncmp(type, "_fax-ipp.", 9)) + scheme = "ipp"; + else if (!strncmp(type, "_http.", 6)) + scheme = "http"; + else if (!strncmp(type, "_https.", 7)) + scheme = "https"; + else if (!strncmp(type, "_printer.", 9)) + scheme = "lpd"; + else if (!strncmp(type, "_pdl-datastream.", 16)) + scheme = "socket"; + else + { + avahi_service_resolver_free(resolver); + avahi_simple_poll_quit(uribuf->poll); + return; + } + + /* + * Extract the remote resource key from the TXT record... + */ + + if ((uribuf->options & _HTTP_RESOLVE_FAXOUT) && + (!strcmp(scheme, "ipp") || !strcmp(scheme, "ipps"))) + { + reskey = "rfo"; + resdefault = "/ipp/faxout"; + } + else + { + reskey = "rp"; + resdefault = "/"; + } + + if ((pair = avahi_string_list_find(txt, reskey)) != NULL) + { + avahi_string_list_get_pair(pair, NULL, &value, &valueLen); + + if (value[0] == '/') + { + /* + * Value (incorrectly) has a leading slash already... + */ + + memcpy(resource, value, valueLen); + resource[valueLen] = '\0'; + } + else + { + /* + * Convert to resource by concatenating with a leading "/"... + */ + + resource[0] = '/'; + memcpy(resource + 1, value, valueLen); + resource[valueLen + 1] = '\0'; + } + } + else + { + /* + * Use the default value... + */ + + strlcpy(resource, resdefault, sizeof(resource)); + } + + /* + * Lookup the FQDN if needed... + */ + + if ((uribuf->options & _HTTP_RESOLVE_FQDN) && + (hostptr = hostTarget + strlen(hostTarget) - 6) > hostTarget && + !_cups_strcasecmp(hostptr, ".local")) + { + /* + * OK, we got a .local name but the caller needs a real domain. Start by + * getting the IP address of the .local name and then do reverse-lookups... + */ + + http_addrlist_t *addrlist, /* List of addresses */ + *addr; /* Current address */ + + DEBUG_printf(("8http_resolve_cb: Looking up \"%s\".", hostTarget)); + + snprintf(fqdn, sizeof(fqdn), "%d", ntohs(port)); + if ((addrlist = httpAddrGetList(hostTarget, AF_UNSPEC, fqdn)) != NULL) + { + for (addr = addrlist; addr; addr = addr->next) + { + int error = getnameinfo(&(addr->addr.addr), + httpAddrLength(&(addr->addr)), + fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD); + + if (!error) + { + DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn)); + + if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn || + _cups_strcasecmp(hostptr, ".local")) + { + hostTarget = fqdn; + break; + } + } +#ifdef DEBUG + else + DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d", + httpAddrString(&(addr->addr), fqdn, sizeof(fqdn)), + error)); +#endif /* DEBUG */ + } + } + } + + /* + * Assemble the final device URI using the resolved hostname... + */ + + httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize, scheme, + NULL, hostTarget, port, resource); + DEBUG_printf(("8http_resolve_cb: Resolved URI is \"%s\".", uribuf->buffer)); + + avahi_simple_poll_quit(uribuf->poll); +} #endif /* HAVE_DNSSD */ diff --git a/cups/http.c b/cups/http.c index b95baa9d0..945404cdd 100644 --- a/cups/http.c +++ b/cups/http.c @@ -258,7 +258,7 @@ static BIO_METHOD http_bio_methods = * * Use @code cupsArrayNew(NULL, NULL)@ to create a credentials array. * - * @since CUPS 1.5/Mac OS X 10.7@ + * @since CUPS 1.5/OS X 10.7@ */ int /* O - 0 on success, -1 on error */ @@ -331,7 +331,7 @@ httpCheck(http_t *http) /* I - Connection to server */ /* * 'httpClearCookie()' - Clear the cookie value(s). * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ void @@ -494,7 +494,7 @@ httpConnectEncrypt( * 'httpCopyCredentials()' - Copy the credentials associated with an encrypted * connection. * - * @since CUPS 1.5/Mac OS X 10.7@ + * @since CUPS 1.5/OS X 10.7@ */ int /* O - Status of call (0 = success) */ @@ -835,7 +835,7 @@ httpFlush(http_t *http) /* I - Connection to server */ /* * 'httpFlushWrite()' - Flush data in write buffer. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - Bytes written or -1 on error */ @@ -937,7 +937,7 @@ httpGet(http_t *http, /* I - Connection to server */ * string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION * value. * - * @since CUPS 1.3/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ char * /* O - Authorization string */ @@ -953,7 +953,7 @@ httpGetAuthString(http_t *http) /* I - Connection to server */ /* * 'httpGetBlocking()' - Get the blocking/non-block state of a connection. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - 1 if blocking, 0 if non-blocking */ @@ -966,7 +966,7 @@ httpGetBlocking(http_t *http) /* I - Connection to server */ /* * 'httpGetCookie()' - Get any cookie data from the response. * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ const char * /* O - Cookie data or NULL */ @@ -979,7 +979,7 @@ httpGetCookie(http_t *http) /* I - HTTP connecion */ /* * 'httpGetFd()' - Get the file descriptor associated with a connection. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - File descriptor or -1 if none */ @@ -1049,7 +1049,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ off_t /* O - Content length */ @@ -1307,7 +1307,7 @@ httpGetState(http_t *http) /* I - Connection to server */ /* * 'httpGetStatus()' - Get the status of the last HTTP request. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ http_status_t /* O - HTTP status */ @@ -1336,7 +1336,7 @@ httpGetSubField(http_t *http, /* I - Connection to server */ /* * 'httpGetSubField2()' - Get a sub-field value. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ char * /* O - Value or NULL */ @@ -1877,7 +1877,7 @@ httpRead(http_t *http, /* I - Connection to server */ /* * 'httpRead2()' - Read data from a HTTP connection. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ssize_t /* O - Number of bytes read */ @@ -2435,7 +2435,7 @@ httpReconnect2(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/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ void @@ -2492,7 +2492,7 @@ httpSetAuthString(http_t *http, /* I - Connection to server */ * 'httpSetCredentials()' - Set the credentials associated with an encrypted * connection. * - * @since CUPS 1.5/Mac OS X 10.7@ + * @since CUPS 1.5/OS X 10.7@ */ int /* O - Status of call (0 = success) */ @@ -2513,7 +2513,7 @@ httpSetCredentials(http_t *http, /* I - Connection to server */ /* * 'httpSetCookie()' - Set the cookie value(s). * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ void @@ -2538,7 +2538,7 @@ httpSetCookie(http_t *http, /* I - Connection */ * * Currently only HTTP_CONTINUE is supported for the "expect" argument. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void @@ -2623,7 +2623,7 @@ httpSetField(http_t *http, /* I - Connection to server */ /* * 'httpSetLength()' - Set the content-length and content-encoding. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ void @@ -2653,7 +2653,7 @@ httpSetLength(http_t *http, /* I - Connection to server */ * The optional timeout callback receives both the HTTP connection and a user * data pointer and must return 1 to continue or 0 to error (time) out. * - * @since CUPS 1.5/Mac OS X 10.7@ + * @since CUPS 1.5/OS X 10.7@ */ void @@ -3021,7 +3021,7 @@ _httpWait(http_t *http, /* I - Connection to server */ /* * 'httpWait()' - Wait for data available on a connection. * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ int /* O - 1 if data is available, 0 otherwise */ @@ -3084,7 +3084,7 @@ httpWrite(http_t *http, /* I - Connection to server */ /* * 'httpWrite2()' - Write data to a HTTP connection. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ssize_t /* O - Number of bytes written */ diff --git a/cups/http.h b/cups/http.h index fc83209d9..f6ef45b99 100644 --- a/cups/http.h +++ b/cups/http.h @@ -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/Mac OS X 10.5@ */ + HTTP_AUTH_NEGOTIATE /* GSSAPI authentication in use @since CUPS 1.3/OS X 10.5@ */ } http_auth_t; typedef enum http_encoding_e /**** HTTP transfer encoding values ****/ @@ -251,7 +251,7 @@ typedef enum http_status_e /**** HTTP status codes ****/ HTTP_NOT_SUPPORTED, /* HTTP version not supported */ HTTP_AUTHORIZATION_CANCELED = 1000, /* User canceled authorization @since CUPS 1.4@ */ - HTTP_PKI_ERROR, /* Error negotiating a secure connection @since CUPS 1.5/Mac OS X 10.7@ */ + HTTP_PKI_ERROR, /* Error negotiating a secure connection @since CUPS 1.5/OS X 10.7@ */ HTTP_WEBIF_DISABLED /* Web interface is disabled @private@ */ } http_status_t; @@ -292,7 +292,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/Mac OS X 10.5@ + **** more portable. @since CUPS 1.2/OS X 10.5@ ****/ { struct sockaddr addr; /* Base structure for family value */ @@ -309,7 +309,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/Mac OS X 10.5@ + **** with a hostname. @since CUPS 1.2/OS X 10.5@ ****/ { struct http_addrlist_s *next; /* Pointer to next address in list */ @@ -318,14 +318,14 @@ typedef struct http_addrlist_s /**** Socket address list, which is typedef struct _http_s http_t; /**** HTTP connection type ****/ -typedef struct http_credential_s /**** HTTP credential data @since CUPS 1.5/Mac OS X 10.7@ ****/ +typedef struct http_credential_s /**** HTTP credential data @since CUPS 1.5/OS X 10.7@ ****/ { void *data; /* Pointer to credential data */ size_t datalen; /* Credential length */ } http_credential_t; typedef int (*http_timeout_cb_t)(http_t *http, void *user_data); - /**** HTTP timeout callback @since CUPS 1.5/Mac OS X 10.7@ ****/ + /**** HTTP timeout callback @since CUPS 1.5/OS X 10.7@ ****/ @@ -395,7 +395,7 @@ extern void httpSeparate2(const char *uri, char *host, int hostlen, int *port, char *resource, int resourcelen) _CUPS_DEPRECATED; -/**** New in CUPS 1.2/Mac OS X 10.5 ****/ +/**** New in CUPS 1.2/OS X 10.5 ****/ extern int httpAddrAny(const http_addr_t *addr) _CUPS_API_1_2; extern http_addrlist_t *httpAddrConnect(http_addrlist_t *addrlist, int *sock) _CUPS_API_1_2; extern int httpAddrEqual(const http_addr_t *addr1, @@ -443,12 +443,12 @@ extern void httpSetLength(http_t *http, size_t length) _CUPS_API_1_2; extern ssize_t httpWrite2(http_t *http, const char *buffer, size_t length) _CUPS_API_1_2; -/**** New in CUPS 1.3/Mac OS X 10.5 ****/ +/**** New in CUPS 1.3/OS X 10.5 ****/ extern char *httpGetAuthString(http_t *http) _CUPS_API_1_3; extern void httpSetAuthString(http_t *http, const char *scheme, const char *data) _CUPS_API_1_3; -/**** New in CUPS 1.5/Mac OS X 10.7 ****/ +/**** New in CUPS 1.5/OS X 10.7 ****/ extern int httpAddCredential(cups_array_t *credentials, const void *data, size_t datalen) _CUPS_API_1_5; @@ -462,7 +462,7 @@ extern void httpSetTimeout(http_t *http, double timeout, http_timeout_cb_t cb, void *user_data) _CUPS_API_1_5; -/**** New in CUPS 1.6 ****/ +/**** New in CUPS 1.6/OS X 10.8 ****/ extern http_addrlist_t *httpAddrConnect2(http_addrlist_t *addrlist, int *sock, int msec, int *cancel) _CUPS_API_1_6; diff --git a/cups/ipp-support.c b/cups/ipp-support.c index c20c11043..8ad921dd5 100644 --- a/cups/ipp-support.c +++ b/cups/ipp-support.c @@ -411,7 +411,7 @@ static size_t ipp_col_string(ipp_t *col, char *buffer, size_t bufsize); * trailing nul. The buffer pointer can be NULL to get the required length, * just like (v)snprintf. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ size_t /* O - Number of bytes less nul */ @@ -821,7 +821,7 @@ ippErrorString(ipp_status_t error) /* I - Error status */ /* * 'ippErrorValue()' - Return a status code for the given name. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ipp_status_t /* O - IPP status code */ @@ -859,7 +859,7 @@ ippErrorValue(const char *name) /* I - Name */ /* * 'ippOpString()' - Return a name for the given operation id. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ const char * /* O - Name */ @@ -894,7 +894,7 @@ ippOpString(ipp_op_t op) /* I - Operation ID */ /* * 'ippOpValue()' - Return an operation id for the given name. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ipp_op_t /* O - Operation ID */ @@ -970,7 +970,7 @@ ippSetPort(int p) /* I - Port number to use */ * * The returned names are defined in RFC 2911 and 3382. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ const char * /* O - Tag name */ @@ -990,7 +990,7 @@ ippTagString(ipp_tag_t tag) /* I - Tag value */ * * The tag names are defined in RFC 2911 and 3382. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ ipp_tag_t /* O - Tag value */ diff --git a/cups/ipp.c b/cups/ipp.c index ab5303c72..dd3e4e0d4 100644 --- a/cups/ipp.c +++ b/cups/ipp.c @@ -308,7 +308,7 @@ ippAddBooleans(ipp_t *ipp, /* I - IPP message */ * (@code IPP_TAG_OPERATION@), printer (@code IPP_TAG_PRINTER@), subscription * (@code IPP_TAG_SUBSCRIPTION@), or unsupported (@code IPP_TAG_UNSUPPORTED_GROUP@). * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ ipp_attribute_t * /* O - New attribute */ @@ -359,7 +359,7 @@ ippAddCollection(ipp_t *ipp, /* I - IPP message */ * (@code IPP_TAG_OPERATION@), printer (@code IPP_TAG_PRINTER@), subscription * (@code IPP_TAG_SUBSCRIPTION@), or unsupported (@code IPP_TAG_UNSUPPORTED_GROUP@). * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ ipp_attribute_t * /* O - New attribute */ @@ -609,7 +609,7 @@ ippAddIntegers(ipp_t *ipp, /* I - IPP message */ * (@code IPP_TAG_OPERATION@), printer (@code IPP_TAG_PRINTER@), subscription * (@code IPP_TAG_SUBSCRIPTION@), or unsupported (@code IPP_TAG_UNSUPPORTED_GROUP@). * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ipp_attribute_t * /* O - New attribute */ @@ -672,7 +672,7 @@ ippAddOctetString(ipp_t *ipp, /* I - IPP message */ * (@code IPP_TAG_NOTSETTABLE@), delete-attribute (@code IPP_TAG_DELETEATTR@), and * admin-define (@code IPP_TAG_ADMINDEFINE@). * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_attribute_t * /* O - New attribute */ @@ -1231,7 +1231,7 @@ ippAddStrings( * created - this should only be done as long as the original source IPP message will * not be freed for the life of the destination. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ @@ -1482,7 +1482,7 @@ ippCopyAttribute( * 0 to skip it. The function may also choose to do a partial copy of the source attribute * itself. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on error */ @@ -1610,7 +1610,7 @@ ippDelete(ipp_t *ipp) /* I - IPP message */ /* * 'ippDeleteAttribute()' - Delete a single attribute in an IPP message. * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ void @@ -1685,7 +1685,7 @@ ippDeleteAttribute( * * Deleting all values in an attribute deletes the attribute. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -1812,7 +1812,7 @@ ippFindNextAttribute(ipp_t *ipp, /* I - IPP message */ /* * 'ippFirstAttribute()' - Return the first attribute in the message. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_attribute_t * /* O - First attribute or @code NULL@ if none */ @@ -1839,7 +1839,7 @@ ippFirstAttribute(ipp_t *ipp) /* I - IPP message */ * The @code element@ parameter specifies which value to get from 0 to * @link ippGetCount(attr)@ - 1. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - Boolean value or -1 on error */ @@ -1868,7 +1868,7 @@ ippGetBoolean(ipp_attribute_t *attr, /* I - IPP attribute */ * The @code element@ parameter specifies which value to get from 0 to * @link ippGetCount(attr)@ - 1. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_t * /* O - Collection value or @code NULL@ on error */ @@ -1895,7 +1895,7 @@ ippGetCollection( /* * 'ippGetCount()' - Get the number of values in an attribute. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - Number of values or -1 on error */ @@ -1922,7 +1922,7 @@ ippGetCount(ipp_attribute_t *attr) /* I - IPP attribute */ * The @code element@ parameter specifies which value to get from 0 to * @link ippGetCount(attr)@ - 1. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ const ipp_uchar_t * /* O - Date value or @code NULL@ */ @@ -1948,7 +1948,7 @@ ippGetDate(ipp_attribute_t *attr, /* I - IPP attribute */ /* * 'ippGetGroupTag()' - Get the group associated with an attribute. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_tag_t /* O - Group tag or @code IPP_TAG_ZERO@ on error */ @@ -1975,7 +1975,7 @@ ippGetGroupTag(ipp_attribute_t *attr) /* I - IPP attribute */ * The @code element@ parameter specifies which value to get from 0 to * @link ippGetCount(attr)@ - 1. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - Value or -1 on error */ @@ -2001,7 +2001,7 @@ ippGetInteger(ipp_attribute_t *attr, /* I - IPP attribute */ /* * 'ippGetName()' - Get the attribute name. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ const char * /* O - Attribute name or @code NULL@ for separators */ @@ -2025,7 +2025,7 @@ ippGetName(ipp_attribute_t *attr) /* I - IPP attribute */ /* * 'ippGetOperation()' - Get the operation ID in an IPP message. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_op_t /* O - Operation ID or -1 on error */ @@ -2052,7 +2052,7 @@ ippGetOperation(ipp_t *ipp) /* I - IPP request message */ * The @code element@ parameter specifies which value to get from 0 to * @link ippGetCount(attr)@ - 1. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - Lower value of range or -1 */ @@ -2087,7 +2087,7 @@ ippGetRange(ipp_attribute_t *attr, /* I - IPP attribute */ /* * 'ippGetRequestId()' - Get the request ID from an IPP message. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - Request ID or -1 on error */ @@ -2114,7 +2114,7 @@ ippGetRequestId(ipp_t *ipp) /* I - IPP message */ * The @code element@ parameter specifies which value to get from 0 to * @link ippGetCount(attr)@ - 1. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - Horizontal/cross feed resolution or -1 */ @@ -2149,7 +2149,7 @@ ippGetResolution( /* * 'ippGetState()' - Get the IPP message state. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_state_t /* O - IPP message state value */ @@ -2173,7 +2173,7 @@ ippGetState(ipp_t *ipp) /* I - IPP message */ /* * 'ippGetStatusCode()' - Get the status code from an IPP response or event message. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_status_t /* O - Status code in IPP message */ @@ -2200,7 +2200,7 @@ ippGetStatusCode(ipp_t *ipp) /* I - IPP response or event message */ * The @code element@ parameter specifies which value to get from 0 to * @link ippGetCount(attr)@ - 1. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ const char * @@ -2231,7 +2231,7 @@ ippGetString(ipp_attribute_t *attr, /* I - IPP attribute */ /* * 'ippGetValueTag()' - Get the value tag for an attribute. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_tag_t /* O - Value tag or @code IPP_TAG_ZERO@ on error */ @@ -2255,7 +2255,7 @@ ippGetValueTag(ipp_attribute_t *attr) /* I - IPP attribute */ /* * 'ippGetVersion()' - Get the major and minor version number from an IPP message. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - Major version number or -1 on error */ @@ -2299,7 +2299,7 @@ ippLength(ipp_t *ipp) /* I - IPP message */ /* * 'ippNextAttribute()' - Return the next attribute in the message. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ ipp_attribute_t * /* O - Next attribute or @code NULL@ if none */ @@ -2356,7 +2356,7 @@ ippNew(void) * attributes-natural-language attributes added. The * attributes-natural-language value is derived from the current locale. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ipp_t * /* O - IPP request message */ @@ -2438,7 +2438,7 @@ ippRead(http_t *http, /* I - HTTP connection */ /* * 'ippReadFile()' - Read data for an IPP message from a file. * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ ipp_state_t /* O - Current state */ @@ -2454,7 +2454,7 @@ ippReadFile(int fd, /* I - HTTP data */ /* * 'ippReadIO()' - Read data for an IPP message. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ipp_state_t /* O - Current state */ @@ -3189,7 +3189,7 @@ ippReadIO(void *src, /* I - Data source */ * The @code element@ parameter specifies which value to set from 0 to * @link ippGetCount(attr)@. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3231,7 +3231,7 @@ ippSetBoolean(ipp_t *ipp, /* IO - IPP message */ * The @code element@ parameter specifies which value to set from 0 to * @link ippGetCount(attr)@. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3280,7 +3280,7 @@ ippSetCollection( * The @code element@ parameter specifies which value to set from 0 to * @link ippGetCount(attr)@. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3325,7 +3325,7 @@ ippSetDate(ipp_t *ipp, /* IO - IPP message */ * (@code IPP_TAG_OPERATION@), printer (@code IPP_TAG_PRINTER@), subscription * (@code IPP_TAG_SUBSCRIPTION@), or unsupported (@code IPP_TAG_UNSUPPORTED_GROUP@). * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3363,7 +3363,7 @@ ippSetGroupTag( * The @code element@ parameter specifies which value to set from 0 to * @link ippGetCount(attr)@. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3403,7 +3403,7 @@ ippSetInteger(ipp_t *ipp, /* IO - IPP message */ * * The @code attr@ parameter may be modified as a result of setting the value. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3443,7 +3443,7 @@ ippSetName(ipp_t *ipp, /* IO - IPP message */ * The @code ipp@ parameter refers to an IPP message previously created using the * @link ippNew@ or @link ippNewRequest@ functions. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3478,7 +3478,7 @@ ippSetOperation(ipp_t *ipp, /* I - IPP request message */ * The @code element@ parameter specifies which value to set from 0 to * @link ippGetCount(attr)@. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3521,7 +3521,7 @@ ippSetRange(ipp_t *ipp, /* IO - IPP message */ * * The @code request_id@ parameter must be greater than 0. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3558,7 +3558,7 @@ ippSetRequestId(ipp_t *ipp, /* I - IPP message */ * The @code element@ parameter specifies which value to set from 0 to * @link ippGetCount(attr)@. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3600,7 +3600,7 @@ ippSetResolution( /* * 'ippSetState()' - Set the current state of the IPP message. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3631,7 +3631,7 @@ ippSetState(ipp_t *ipp, /* I - IPP message */ * The @code ipp@ parameter refers to an IPP message previously created using the * @link ippNew@ or @link ippNewRequest@ functions. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3666,7 +3666,7 @@ ippSetStatusCode(ipp_t *ipp, /* I - IPP response or event message */ * The @code element@ parameter specifies which value to set from 0 to * @link ippGetCount(attr)@. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3737,7 +3737,7 @@ ippSetString(ipp_t *ipp, /* IO - IPP message */ * code in the "attributes-natural-language" attribute or, if not present, the language * code for the current locale. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3894,7 +3894,7 @@ ippSetValueTag( * * The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2. * - * @since CUPS 1.6@ + * @since CUPS 1.6/OS X 10.8@ */ int /* O - 1 on success, 0 on failure */ @@ -3988,7 +3988,7 @@ ippWrite(http_t *http, /* I - HTTP connection */ /* * 'ippWriteFile()' - Write data for an IPP message to a file. * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ ipp_state_t /* O - Current state */ @@ -4006,7 +4006,7 @@ ippWriteFile(int fd, /* I - HTTP data */ /* * 'ippWriteIO()' - Write data for an IPP message. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ipp_state_t /* O - Current state */ diff --git a/cups/ipp.h b/cups/ipp.h index d0556d363..2fb1995e3 100644 --- a/cups/ipp.h +++ b/cups/ipp.h @@ -150,13 +150,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/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_CREATE_PRINTER_SUBSCRIPTION, /* Create a printer subscription @since CUPS 1.2/OS X 10.5@ */ + IPP_CREATE_JOB_SUBSCRIPTION, /* Create a job subscription @since CUPS 1.2/OS X 10.5@ */ + IPP_GET_SUBSCRIPTION_ATTRIBUTES, /* Get subscription attributes @since CUPS 1.2/OS X 10.5@ */ + IPP_GET_SUBSCRIPTIONS, /* Get list of subscriptions @since CUPS 1.2/OS X 10.5@ */ + IPP_RENEW_SUBSCRIPTION, /* Renew a printer subscription @since CUPS 1.2/OS X 10.5@ */ + IPP_CANCEL_SUBSCRIPTION, /* Cancel a subscription @since CUPS 1.2/OS X 10.5@ */ + IPP_GET_NOTIFICATIONS, /* Get notification events @since CUPS 1.2/OS X 10.5@ */ IPP_SEND_NOTIFICATIONS, /* Send notification events @private@ */ IPP_GET_RESOURCE_ATTRIBUTES, /* Get resource attributes @private@ */ IPP_GET_RESOURCE_DATA, /* Get resource data @private@ */ @@ -203,9 +203,9 @@ 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/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/Mac OS X 10.6@ */ + CUPS_AUTHENTICATE_JOB, /* Authenticate a job @since CUPS 1.2/OS X 10.5@ */ + CUPS_GET_PPD, /* Get a PPD file @since CUPS 1.3/OS X 10.5@ */ + CUPS_GET_DOCUMENT = 0x4027 /* Get a document file @since CUPS 1.4/OS X 10.6@ */ /* Legacy names for the add operations */ #define CUPS_ADD_PRINTER CUPS_ADD_MODIFY_PRINTER @@ -305,8 +305,8 @@ typedef enum ipp_status_e /**** IPP status codes ****/ IPP_TOO_MANY_JOBS, /* server-error-too-many-jobs */ IPP_TOO_MANY_DOCUMENTS, /* server-error-too-many-documents */ - IPP_AUTHENTICATION_CANCELED = 0x1000, /* Authentication canceled by user @since CUPS 1.5/Mac OS X 10.7@ */ - IPP_PKI_ERROR, /* Error negotiating a secure connection @since CUPS 1.5/Mac OS X 10.7@ */ + IPP_AUTHENTICATION_CANCELED = 0x1000, /* Authentication canceled by user @since CUPS 1.5/OS X 10.7@ */ + IPP_PKI_ERROR, /* Error negotiating a secure connection @since CUPS 1.5/OS X 10.7@ */ IPP_UPGRADE_REQUIRED /* TLS upgrade required */ /* Legacy name for canceled status */ @@ -366,21 +366,22 @@ typedef struct _ipp_s ipp_t; /**** IPP request/response data ****/ typedef struct _ipp_attribute_s ipp_attribute_t; /**** IPP attribute ****/ -/**** New in CUPS 1.2 ****/ +/**** New in CUPS 1.2/OS X 10.5 ****/ typedef ssize_t (*ipp_iocb_t)(void *context, ipp_uchar_t *buffer, size_t bytes); - /**** IPP IO Callback Function @since CUPS 1.2/Mac OS X 10.5@ ****/ + /**** IPP IO Callback Function @since CUPS 1.2/OS X 10.5@ ****/ -/**** New in CUPS 1.6 ****/ +/**** New in CUPS 1.6/OS X 10.8 ****/ typedef int (*ipp_copycb_t)(void *context, ipp_t *dst, ipp_attribute_t *attr); /* - * The following structures are PRIVATE starting with CUPS 1.6. Please use the - * new accessor functions available in CUPS 1.6 and later, as these definitions - * will be moved to a private header file in a future release. + * The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8. + * Please use the new accessor functions available in CUPS 1.6 and later, as + * these definitions will be moved to a private header file in a future release. * * Define _IPP_PRIVATE_STRUCTURES to cause the private IPP structures to be - * exposed in CUPS 1.6. + * exposed in CUPS 1.6. This happens automatically on OS X when compiling for + * a deployment target of 10.7 or earlier. */ # if defined(_CUPS_SOURCE) || defined(_CUPS_IPP_PRIVATE_H_) @@ -421,7 +422,7 @@ typedef union _ipp_request_u /**** Request Header ****/ } status; /**** New in CUPS 1.1.19 ****/ - struct /* Event Header @since CUPS 1.1.19/Mac OS X 10.3@ */ + struct /* Event Header @since CUPS 1.1.19/OS X 10.3@ */ { ipp_uchar_t version[2]; /* Protocol version number */ ipp_status_t status_code; /* Status code */ @@ -465,7 +466,7 @@ typedef union _ipp_value_u /**** Attribute Value ****/ } unknown; /* Unknown attribute type */ /**** New in CUPS 1.1.19 ****/ - ipp_t *collection; /* Collection value @since CUPS 1.1.19/Mac OS X 10.3@ */ + ipp_t *collection; /* Collection value @since CUPS 1.1.19/OS X 10.3@ */ } _ipp_value_t; typedef _ipp_value_t ipp_value_t; /**** Convenience typedef that will be removed @private@ ****/ @@ -489,10 +490,10 @@ 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) @since CUPS 1.2/Mac OS X 10.5@ */ + ipp_attribute_t *prev; /* Previous attribute (for read) @since CUPS 1.2/OS X 10.5@ */ /**** New in CUPS 1.4.4 ****/ - int use; /* Use count @since CUPS 1.4.4/Mac OS X 10.6.?@ */ + int use; /* Use count @since CUPS 1.4.4/OS X 10.6.?@ */ }; # endif /* _IPP_PRIVATE_STRUCTURES */ @@ -559,7 +560,7 @@ extern void ippDeleteAttribute(ipp_t *ipp, ipp_attribute_t *attr) _CUPS_API_1_1 extern ipp_state_t ippReadFile(int fd, ipp_t *ipp) _CUPS_API_1_1_19; extern ipp_state_t ippWriteFile(int fd, ipp_t *ipp) _CUPS_API_1_1_19; -/**** New in CUPS 1.2/Mac OS X 10.5 ****/ +/**** New in CUPS 1.2/OS X 10.5 ****/ extern ipp_attribute_t *ippAddOctetString(ipp_t *ipp, ipp_tag_t group, const char *name, const void *data, int datalen) _CUPS_API_1_2; @@ -572,11 +573,11 @@ extern ipp_state_t ippReadIO(void *src, ipp_iocb_t cb, int blocking, extern ipp_state_t ippWriteIO(void *dst, ipp_iocb_t cb, int blocking, ipp_t *parent, ipp_t *ipp) _CUPS_API_1_2; -/**** New in CUPS 1.4/Mac OS X 10.6 ****/ +/**** New in CUPS 1.4/OS X 10.6 ****/ extern const char *ippTagString(ipp_tag_t tag) _CUPS_API_1_4; extern ipp_tag_t ippTagValue(const char *name) _CUPS_API_1_4; -/**** New in CUPS 1.6 ****/ +/**** New in CUPS 1.6/OS X 10.8 ****/ extern ipp_attribute_t *ippAddOutOfBand(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name) _CUPS_API_1_6; diff --git a/cups/localize.c b/cups/localize.c index 0dd682abb..7bb0fedd0 100644 --- a/cups/localize.c +++ b/cups/localize.c @@ -61,7 +61,7 @@ static cups_lang_t *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/Mac OS X 10.5@ + * @since CUPS 1.2/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/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ const char * /* O - Value or NULL if not found */ @@ -332,7 +332,7 @@ ppdLocalizeIPPReason( else if (!strncmp(reason, "output-area-full", 16)) message = _("The output bin is full."); else if (!strncmp(reason, "marker-supply-low", 17)) - message = _("The printer is running low on ink."); + message = _("The printer is running low on ink."); else if (!strncmp(reason, "marker-supply-empty", 19)) message = _("The printer may be out of ink."); else if (!strncmp(reason, "marker-waste-almost-full", 24)) @@ -351,7 +351,7 @@ ppdLocalizeIPPReason( message = _("The developer unit will need to be replaced soon."); else if (!strncmp(reason, "developer-empty", 15)) message = _("The developer unit needs to be replaced."); - + if (message) { strlcpy(buffer, _cupsLangString(lang, message), bufsize); @@ -499,7 +499,7 @@ ppdLocalizeIPPReason( * text from the attribute value. If no localized text for the requested * name can be found, @code NULL@ is returned. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ const char * /* O - Value or @code NULL@ if not found */ @@ -637,7 +637,7 @@ _ppdGetLanguages(ppd_file_t *ppd) /* I - PPD file */ /* * '_ppdHashName()' - Generate a hash value for a device or profile name. * - * This function is primarily used on Mac OS X, but is generally accessible + * This function is primarily used on OS X, but is generally accessible * since cupstestppd needs to check for profile name collisions in PPD files... */ diff --git a/cups/mark.c b/cups/mark.c index 44fc54d68..dc2257f39 100644 --- a/cups/mark.c +++ b/cups/mark.c @@ -3,7 +3,7 @@ * * Option marking routines for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -575,7 +575,7 @@ ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */ * * Options are returned from all groups in ascending alphanumeric order. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ppd_option_t * /* O - First option or @code NULL@ */ @@ -593,7 +593,7 @@ ppdFirstOption(ppd_file_t *ppd) /* I - PPD file */ * * Options are returned from all groups in ascending alphanumeric order. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ppd_option_t * /* O - Next option or @code NULL@ */ diff --git a/cups/notify.c b/cups/notify.c index b514c7db3..9d520f17d 100644 --- a/cups/notify.c +++ b/cups/notify.c @@ -3,7 +3,7 @@ * * Notification routines for CUPS. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 2005-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -33,7 +33,7 @@ * * The returned string must be freed by the caller using @code free@. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ char * /* O - Message text or @code NULL@ */ diff --git a/cups/options.c b/cups/options.c index e2b0c397d..8efe0b495 100644 --- a/cups/options.c +++ b/cups/options.c @@ -3,7 +3,7 @@ * * Option routines for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -438,7 +438,7 @@ cupsParseOptions( /* * 'cupsRemoveOption()' - Remove an option from an option array. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ int /* O - New number of options */ diff --git a/cups/page.c b/cups/page.c index 8e79889ab..fb5841ca5 100644 --- a/cups/page.c +++ b/cups/page.c @@ -3,7 +3,7 @@ * * Page size functions for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -198,7 +198,7 @@ ppdPageSize(ppd_file_t *ppd, /* I - PPD file record */ * If the specified PPD file does not support custom page sizes, both * "minimum" and "maximum" are filled with zeroes. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ int /* O - 1 if custom sizes are supported, 0 otherwise */ diff --git a/cups/ppd.c b/cups/ppd.c index 2c826ff1b..1ff51b244 100644 --- a/cups/ppd.c +++ b/cups/ppd.c @@ -3,7 +3,7 @@ * * PPD file routines for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -327,7 +327,7 @@ ppdClose(ppd_file_t *ppd) /* I - PPD file record */ /* * 'ppdErrorString()' - Returns the text assocated with a status. * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ const char * /* O - Status string */ @@ -397,7 +397,7 @@ _ppdGetEncoding(const char *name) /* I - LanguageEncoding string */ /* * 'ppdLastError()' - Return the status from the last ppdOpen*(). * - * @since CUPS 1.1.19/Mac OS X 10.3@ + * @since CUPS 1.1.19/OS X 10.3@ */ ppd_status_t /* O - Status code */ @@ -417,7 +417,7 @@ ppdLastError(int *line) /* O - Line number */ /* * '_ppdOpen()' - Read a PPD file into memory. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ppd_file_t * /* O - PPD file record or @code NULL@ if the PPD file could not be opened. */ @@ -2106,7 +2106,7 @@ ppdOpen(FILE *fp) /* I - File to read from */ /* * 'ppdOpen2()' - Read a PPD file into memory. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ ppd_file_t * /* O - PPD file record or @code NULL@ if the PPD file could not be opened. */ @@ -2231,7 +2231,7 @@ ppdOpenFile(const char *filename) /* I - File to read from */ /* * 'ppdSetConformance()' - Set the conformance level for PPD files. * - * @since CUPS 1.1.20/Mac OS X 10.4@ + * @since CUPS 1.1.20/OS X 10.4@ */ void @@ -3062,7 +3062,7 @@ ppd_read(cups_file_t *fp, /* I - File to read from */ DEBUG_printf(("9ppd_read: LINE=\"%s\"", line->buffer)); /* - * The dynamically created PPDs for older style Mac OS X + * The dynamically created PPDs for older style OS X * drivers include a large blob of data inserted as comments * at the end of the file. As an optimization we can stop * reading the PPD when we get to the start of this data. diff --git a/cups/ppd.h b/cups/ppd.h index 049340efc..3e281bd42 100644 --- a/cups/ppd.h +++ b/cups/ppd.h @@ -58,10 +58,10 @@ extern "C" { # ifndef _PPD_DEPRECATED # if defined(__APPLE__) # if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8 - /* Building for 10.7 and earlier */ + /* Building for OS X 10.7 and earlier */ # define _PPD_DEPRECATED # elif !defined(MAC_OS_X_VERSION_10_8) - /* Building for 10.7 and earlier */ + /* Building for OS X 10.7 and earlier */ # define _PPD_DEPRECATED # else # define _PPD_DEPRECATED _CUPS_DEPRECATED @@ -119,7 +119,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/Mac OS X 10.3@ ****/ +typedef enum ppd_status_e /**** Status Codes @since CUPS 1.1.19/OS X 10.3@ ****/ { PPD_OK = 0, /* OK */ PPD_FILE_OPEN_ERROR, /* Unable to open PPD file */ @@ -148,16 +148,16 @@ typedef enum ppd_status_e /**** Status Codes @since CUPS 1.1.19/Mac OS X 10.3@ PPD_MAX_STATUS /* @private@ */ } ppd_status_t; -enum ppd_conform_e /**** Conformance Levels @since CUPS 1.1.19/Mac OS X 10.3@ ****/ +enum ppd_conform_e /**** Conformance Levels @since CUPS 1.1.19/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/Mac OS X 10.3@ ****/ + /**** Conformance Levels @since CUPS 1.1.19/OS X 10.3@ ****/ -typedef struct ppd_attr_s /**** PPD Attribute Structure @since CUPS 1.1.19/Mac OS X 10.3@ ****/ +typedef struct ppd_attr_s /**** PPD Attribute Structure @since CUPS 1.1.19/OS X 10.3@ ****/ { char name[PPD_MAX_NAME]; /* Name of attribute (cupsXYZ) */ char spec[PPD_MAX_NAME]; /* Specifier string, if any */ @@ -198,7 +198,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/Mac OS X 10.3@ */ + char name[PPD_MAX_NAME]; /* Group name @since CUPS 1.1.18/OS X 10.3@ */ int num_options; /* Number of options */ ppd_option_t *options; /* Options */ int num_subgroups; /* Number of sub-groups */ @@ -243,8 +243,8 @@ typedef struct ppd_profile_s /**** sRGB Color Profiles ****/ float matrix[3][3]; /* Transform matrix */ } ppd_profile_t; -/**** New in CUPS 1.2/Mac OS X 10.5 ****/ -typedef enum ppd_cptype_e /**** Custom Parameter Type @since CUPS 1.2/Mac OS X 10.5@ ****/ +/**** New in CUPS 1.2/OS X 10.5 ****/ +typedef enum ppd_cptype_e /**** Custom Parameter Type @since CUPS 1.2/OS X 10.5@ ****/ { PPD_CUSTOM_CURVE, /* Curve value for f(x) = x^value */ PPD_CUSTOM_INT, /* Integer number value */ @@ -256,7 +256,7 @@ typedef enum ppd_cptype_e /**** Custom Parameter Type @since CUPS 1.2/Mac OS X PPD_CUSTOM_STRING /* String of characters */ } ppd_cptype_t; -typedef union ppd_cplimit_u /**** Custom Parameter Limit @since CUPS 1.2/Mac OS X 10.5@ ****/ +typedef union ppd_cplimit_u /**** Custom Parameter Limit @since CUPS 1.2/OS X 10.5@ ****/ { float custom_curve; /* Gamma value */ int custom_int; /* Integer value */ @@ -268,7 +268,7 @@ typedef union ppd_cplimit_u /**** Custom Parameter Limit @since CUPS 1.2/Mac OS int custom_string; /* String length */ } ppd_cplimit_t; -typedef union ppd_cpvalue_u /**** Custom Parameter Value @since CUPS 1.2/Mac OS X 10.5@ ****/ +typedef union ppd_cpvalue_u /**** Custom Parameter Value @since CUPS 1.2/OS X 10.5@ ****/ { float custom_curve; /* Gamma value */ int custom_int; /* Integer value */ @@ -280,7 +280,7 @@ typedef union ppd_cpvalue_u /**** Custom Parameter Value @since CUPS 1.2/Mac OS char *custom_string; /* String value */ } ppd_cpvalue_t; -typedef struct ppd_cparam_s /**** Custom Parameter @since CUPS 1.2/Mac OS X 10.5@ ****/ +typedef struct ppd_cparam_s /**** Custom Parameter @since CUPS 1.2/OS X 10.5@ ****/ { char name[PPD_MAX_NAME]; /* Parameter name */ char text[PPD_MAX_TEXT]; /* Human-readable text */ @@ -291,7 +291,7 @@ typedef struct ppd_cparam_s /**** Custom Parameter @since CUPS 1.2/Mac OS X 10. ppd_cpvalue_t current; /* Current value */ } ppd_cparam_t; -typedef struct ppd_coption_s /**** Custom Option @since CUPS 1.2/Mac OS X 10.5@ ****/ +typedef struct ppd_coption_s /**** Custom Option @since CUPS 1.2/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... */ @@ -300,7 +300,7 @@ typedef struct ppd_coption_s /**** Custom Option @since CUPS 1.2/Mac OS X 10.5@ } ppd_coption_t; typedef struct _ppd_cache_s _ppd_cache_t; - /**** PPD cache and mapping data @since CUPS 1.5/Mac OS X 10.7@ @private@ ****/ + /**** PPD cache and mapping data @since CUPS 1.5/OS X 10.7@ @private@ ****/ typedef struct ppd_file_s /**** PPD File ****/ { @@ -348,25 +348,25 @@ 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/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@ */ + char *protocols; /* Protocols (BCP, TBCP) string @since CUPS 1.1.19/OS X 10.3@ */ + char *pcfilename; /* PCFileName string @since CUPS 1.1.19/OS X 10.3@ */ + int num_attrs; /* Number of attributes @since CUPS 1.1.19/OS X 10.3@ @private@ */ + int cur_attr; /* Current attribute @since CUPS 1.1.19/OS X 10.3@ @private@ */ + ppd_attr_t **attrs; /* Attributes @since CUPS 1.1.19/OS X 10.3@ @private@ */ - /**** New in CUPS 1.2/Mac OS X 10.5 ****/ - 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.2/OS X 10.5 ****/ + cups_array_t *sorted_attrs; /* Attribute lookup array @since CUPS 1.2/OS X 10.5@ @private@ */ + cups_array_t *options; /* Option lookup array @since CUPS 1.2/OS X 10.5@ @private@ */ + cups_array_t *coptions; /* Custom options array @since CUPS 1.2/OS X 10.5@ @private@ */ - /**** New in CUPS 1.3/Mac OS X 10.5 ****/ - cups_array_t *marked; /* Marked choices @since CUPS 1.3/Mac OS X 10.5@ @private@ */ + /**** New in CUPS 1.3/OS X 10.5 ****/ + cups_array_t *marked; /* Marked choices @since CUPS 1.3/OS X 10.5@ @private@ */ - /**** New in CUPS 1.4/Mac OS X 10.6 ****/ - cups_array_t *cups_uiconstraints; /* cupsUIConstraints @since CUPS 1.4/Mac OS X 10.6@ @private@ */ + /**** New in CUPS 1.4/OS X 10.6 ****/ + cups_array_t *cups_uiconstraints; /* cupsUIConstraints @since CUPS 1.4/OS X 10.6@ @private@ */ /**** New in CUPS 1.5 ****/ - _ppd_cache_t *cache; /* PPD cache and mapping data @since CUPS 1.5/Mac OS X 10.7@ @private@ */ + _ppd_cache_t *cache; /* PPD cache and mapping data @since CUPS 1.5/OS X 10.7@ @private@ */ } ppd_file_t; @@ -434,14 +434,14 @@ extern ppd_option_t *ppdNextOption(ppd_file_t *ppd) _PPD_DEPRECATED; extern int ppdLocalize(ppd_file_t *ppd) _PPD_DEPRECATED; extern ppd_file_t *ppdOpen2(cups_file_t *fp) _PPD_DEPRECATED; -/**** New in CUPS 1.3/Mac OS X 10.5 ****/ +/**** New in CUPS 1.3/OS X 10.5 ****/ extern const char *ppdLocalizeIPPReason(ppd_file_t *ppd, const char *reason, const char *scheme, char *buffer, size_t bufsize) _PPD_DEPRECATED; -/**** New in CUPS 1.4/Mac OS X 10.6 ****/ +/**** New in CUPS 1.4/OS X 10.6 ****/ extern int cupsGetConflicts(ppd_file_t *ppd, const char *option, const char *choice, cups_option_t **options) diff --git a/cups/pwg-media.c b/cups/pwg-media.c index 24528868c..9e811054e 100644 --- a/cups/pwg-media.c +++ b/cups/pwg-media.c @@ -204,6 +204,7 @@ static _pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_MM("jpn_chou4_90x205mm", NULL, "EnvChou4", 90, 205), _PWG_MEDIA_MM("jpn_hagaki_100x148mm", NULL, "Postcard", 100, 148), _PWG_MEDIA_MM("jpn_you4_105x235mm", NULL, "EnvYou4", 105, 235), + _PWG_MEDIA_MM("jpn_you6_98x190mm", NULL, "EnvYou6", 98, 190), _PWG_MEDIA_MM("jpn_chou2_111.1x146mm", NULL, NULL, 111.1, 146), _PWG_MEDIA_MM("jpn_chou3_120x235mm", NULL, "EnvChou3", 120, 235), _PWG_MEDIA_MM("jpn_oufuku_148x200mm", NULL, "DoublePostcardRotated", 148, 200), @@ -760,8 +761,11 @@ _pwgMediaForSize(int width, /* I - Width in 2540ths */ int length) /* I - Length in 2540ths */ { int i; /* Looping var */ - _pwg_media_t *media; /* Current media */ - int dw, dl; /* Difference in width and length */ + _pwg_media_t *media, /* Current media */ + *best_media = NULL; /* Best match */ + int dw, dl, /* Difference in width and length */ + best_dw = 999, /* Best difference in width and length */ + best_dl = 999; _cups_globals_t *cg = _cupsGlobals(); /* Global data */ @@ -786,13 +790,25 @@ _pwgMediaForSize(int width, /* I - Width in 2540ths */ * is just about 176/2540ths... */ - dw = media->width - width; - dl = media->length - length; + dw = abs(media->width - width); + dl = abs(media->length - length); - if (dw > -176 && dw < 176 && dl > -176 && dl < 176) + if (!dw && !dl) return (media); + else if (dw < 176 && dl < 176) + { + if (dw <= best_dw && dl <= best_dl) + { + best_media = media; + best_dw = dw; + best_dl = dl; + } + } } + if (best_media) + return (best_media); + /* * Not a standard size; convert it to a PWG custom name of the form: * diff --git a/cups/raster-private.h b/cups/raster-private.h index 169631e68..0e9118fcb 100644 --- a/cups/raster-private.h +++ b/cups/raster-private.h @@ -36,7 +36,7 @@ /* - * min/max/abs macros... + * min/max macros... */ # ifndef max @@ -45,9 +45,6 @@ # ifndef min # define min(a,b) ((a) < (b) ? (a) : (b)) # endif /* !min */ -# ifndef abs -# define abs(a) ((a) < 0 ? -(a) : (a)) -# endif /* !abs */ /* diff --git a/cups/raster.h b/cups/raster.h index 1510df2d6..c83d0bf7b 100644 --- a/cups/raster.h +++ b/cups/raster.h @@ -3,7 +3,7 @@ * * Raster file definitions for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * This file is part of the CUPS Imaging library. @@ -117,28 +117,28 @@ typedef enum cups_cspace_e /**** cupsColorSpace attribute values ****/ CUPS_CSPACE_GOLD = 13, /* Gold foil @deprecated@ */ CUPS_CSPACE_SILVER = 14, /* Silver foil @deprecated@ */ - 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 (DeviceRGB, sRGB by default) @since CUPS 1.2/Mac OS X 10.5@ */ + CUPS_CSPACE_CIEXYZ = 15, /* CIE XYZ @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_CIELab = 16, /* CIE Lab @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_RGBW = 17, /* Red, green, blue, white (DeviceRGB, sRGB by default) @since CUPS 1.2/OS X 10.5@ */ CUPS_CSPACE_SW = 18, /* Luminance (gamma 2.2) @since CUPS 1.4.5@ */ CUPS_CSPACE_SRGB = 19, /* Red, green, blue (sRGB) @since CUPS 1.4.5@ */ CUPS_CSPACE_ADOBERGB = 20, /* Red, green, blue (Adobe RGB) @since CUPS 1.4.5@ */ - 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_ICC1 = 32, /* ICC-based, 1 color @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICC2 = 33, /* ICC-based, 2 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICC3 = 34, /* ICC-based, 3 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICC4 = 35, /* ICC-based, 4 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICC5 = 36, /* ICC-based, 5 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICC6 = 37, /* ICC-based, 6 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICC7 = 38, /* ICC-based, 7 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICC8 = 39, /* ICC-based, 8 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICC9 = 40, /* ICC-based, 9 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICCA = 41, /* ICC-based, 10 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICCB = 42, /* ICC-based, 11 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICCC = 43, /* ICC-based, 12 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICCD = 44, /* ICC-based, 13 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICCE = 45, /* ICC-based, 14 colors @since CUPS 1.1.19/OS X 10.3@ */ + CUPS_CSPACE_ICCF = 46, /* ICC-based, 15 colors @since CUPS 1.1.19/OS X 10.3@ */ CUPS_CSPACE_DEVICE1 = 48, /* DeviceN, 1 color @since CUPS 1.4.5@ */ CUPS_CSPACE_DEVICE2 = 49, /* DeviceN, 2 colors @since CUPS 1.4.5@ */ @@ -186,8 +186,8 @@ 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/Mac OS X 10.5@ */ - CUPS_RASTER_WRITE_PWG = 3 /* Open stream for compressed writing in PWG mode @since CUPS 1.5/Mac OS X 10.7@ */ + CUPS_RASTER_WRITE_COMPRESSED = 2, /* Open stream for compressed writing @since CUPS 1.3/OS X 10.5@ */ + CUPS_RASTER_WRITE_PWG = 3 /* Open stream for compressed writing in PWG mode @since CUPS 1.5/OS X 10.7@ */ }; typedef enum cups_mode_e cups_mode_t; /**** cupsRasterOpen modes ****/ @@ -266,7 +266,7 @@ typedef struct cups_page_header_s /**** Version 1 page header @deprecated@ ****/ } cups_page_header_t; /**** New in CUPS 1.2 ****/ -typedef struct cups_page_header2_s /**** Version 2 page header @since CUPS 1.2/Mac OS X 10.5@ ****/ +typedef struct cups_page_header2_s /**** Version 2 page header @since CUPS 1.2/OS X 10.5@ ****/ { /**** Standard Page Device Dictionary String Values ****/ char MediaClass[64]; /* MediaClass string */ @@ -314,20 +314,20 @@ typedef struct cups_page_header2_s /**** Version 2 page header @since CUPS 1.2/M unsigned cupsRowStep; /* Spacing between lines */ /**** Version 2 Dictionary Values ****/ - unsigned cupsNumColors; /* Number of color compoents @since CUPS 1.2/Mac OS X 10.5@ */ + unsigned cupsNumColors; /* Number of color compoents @since CUPS 1.2/OS X 10.5@ */ float cupsBorderlessScalingFactor; - /* Scaling that was applied to page data @since CUPS 1.2/Mac OS X 10.5@ */ + /* Scaling that was applied to page data @since CUPS 1.2/OS X 10.5@ */ float cupsPageSize[2]; /* Floating point PageSize (scaling * - * factor not applied) @since CUPS 1.2/Mac OS X 10.5@ */ + * factor not applied) @since CUPS 1.2/OS X 10.5@ */ float cupsImagingBBox[4]; /* Floating point ImagingBoundingBox * (scaling factor not applied, left, - * bottom, right, top) @since CUPS 1.2/Mac OS X 10.5@ */ - unsigned cupsInteger[16]; /* User-defined integer values @since CUPS 1.2/Mac OS X 10.5@ */ - float cupsReal[16]; /* User-defined floating-point values @since CUPS 1.2/Mac OS X 10.5@ */ - char cupsString[16][64]; /* User-defined string values @since CUPS 1.2/Mac OS X 10.5@ */ - char cupsMarkerType[64]; /* Ink/toner type @since CUPS 1.2/Mac OS X 10.5@ */ - char cupsRenderingIntent[64];/* Color rendering intent @since CUPS 1.2/Mac OS X 10.5@ */ - char cupsPageSizeName[64]; /* PageSize name @since CUPS 1.2/Mac OS X 10.5@ */ + * bottom, right, top) @since CUPS 1.2/OS X 10.5@ */ + unsigned cupsInteger[16]; /* User-defined integer values @since CUPS 1.2/OS X 10.5@ */ + float cupsReal[16]; /* User-defined floating-point values @since CUPS 1.2/OS X 10.5@ */ + char cupsString[16][64]; /* User-defined string values @since CUPS 1.2/OS X 10.5@ */ + char cupsMarkerType[64]; /* Ink/toner type @since CUPS 1.2/OS X 10.5@ */ + char cupsRenderingIntent[64];/* Color rendering intent @since CUPS 1.2/OS X 10.5@ */ + char cupsPageSizeName[64]; /* PageSize name @since CUPS 1.2/OS X 10.5@ */ } cups_page_header2_t; typedef struct _cups_raster_s cups_raster_t; diff --git a/cups/request.c b/cups/request.c index b71f7ffb0..34591e374 100644 --- a/cups/request.c +++ b/cups/request.c @@ -3,7 +3,7 @@ * * IPP utilities for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -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/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ ipp_t * /* O - Response data */ @@ -335,7 +335,7 @@ cupsDoRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP_ * additional data, use httpRead() after getting a successful response, * otherwise call httpFlush() to complete the response processing. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ ipp_t * /* O - Response or @code NULL@ on HTTP error */ @@ -499,7 +499,7 @@ cupsLastError(void) /* * 'cupsLastErrorString()' - Return the last IPP status-message. * - * @since CUPS 1.2/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ const char * /* O - status-message text from last request */ @@ -545,7 +545,7 @@ _cupsNextDelay(int current, /* I - Current delay value or 0 */ * This function is used after cupsGetResponse() to read the PPD or document * files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ ssize_t /* O - Bytes read, 0 on EOF, -1 on error */ @@ -592,7 +592,7 @@ cupsReadResponseData( * Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the * request is not freed. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ http_status_t /* O - Initial HTTP status */ @@ -884,7 +884,7 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP * This function is used after @link cupsSendRequest@ to provide a PPD and * after @link cupsStartDocument@ to provide a document file. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ http_status_t /* O - @code HTTP_CONTINUE@ if OK or HTTP status on error */ diff --git a/cups/sidechannel.c b/cups/sidechannel.c index 40091deca..7bd626eaf 100644 --- a/cups/sidechannel.c +++ b/cups/sidechannel.c @@ -69,7 +69,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/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ cups_sc_status_t /* O - Status of command */ @@ -108,7 +108,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/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ int /* O - 0 on success, -1 on error */ @@ -308,7 +308,7 @@ cupsSideChannelRead( * support SNMP queries. @code CUPS_SC_STATUS_NO_RESPONSE@ is returned when * the printer does not respond to the SNMP query. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ cups_sc_status_t /* O - Query status */ @@ -414,7 +414,7 @@ cupsSideChannelSNMPGet( * support SNMP queries. @code CUPS_SC_STATUS_NO_RESPONSE@ is returned when * the printer does not respond to the first SNMP query. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ cups_sc_status_t /* O - Status of first query of @code CUPS_SC_STATUS_OK@ on success */ @@ -533,7 +533,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/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ int /* O - 0 on success, -1 on error */ diff --git a/cups/sidechannel.h b/cups/sidechannel.h index ced5edd31..5f97257e0 100644 --- a/cups/sidechannel.h +++ b/cups/sidechannel.h @@ -3,7 +3,7 @@ * * Side-channel API definitions for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -61,9 +61,9 @@ enum cups_sc_command_e /**** Request command codes ****/ CUPS_SC_CMD_GET_BIDI = 3, /* Return bidirectional capabilities */ CUPS_SC_CMD_GET_DEVICE_ID = 4, /* Return the IEEE-1284 device ID */ CUPS_SC_CMD_GET_STATE = 5, /* Return the device state */ - CUPS_SC_CMD_SNMP_GET = 6, /* Query an SNMP OID @since CUPS 1.4/Mac OS X 10.6@ */ - CUPS_SC_CMD_SNMP_GET_NEXT = 7, /* Query the next SNMP OID @since CUPS 1.4/Mac OS X 10.6@ */ - CUPS_SC_CMD_GET_CONNECTED = 8, /* Return whether the backend is "connected" to the printer @since CUPS 1.5/Mac OS X 10.7@ */ + CUPS_SC_CMD_SNMP_GET = 6, /* Query an SNMP OID @since CUPS 1.4/OS X 10.6@ */ + CUPS_SC_CMD_SNMP_GET_NEXT = 7, /* Query the next SNMP OID @since CUPS 1.4/OS X 10.6@ */ + CUPS_SC_CMD_GET_CONNECTED = 8, /* Return whether the backend is "connected" to the printer @since CUPS 1.5/OS X 10.7@ */ CUPS_SC_CMD_MAX /* End of valid values @private@ */ }; typedef enum cups_sc_command_e cups_sc_command_t; diff --git a/cups/snmp-private.h b/cups/snmp-private.h index fbd5467ab..49f5b60fa 100644 --- a/cups/snmp-private.h +++ b/cups/snmp-private.h @@ -3,7 +3,7 @@ * * Private SNMP definitions for CUPS. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 2006-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -34,7 +34,7 @@ #define CUPS_SNMP_MAX_COMMUNITY 512 /* Maximum size of community name */ #define CUPS_SNMP_MAX_OID 128 /* Maximum number of OID numbers */ #define CUPS_SNMP_MAX_PACKET 1472 /* Maximum size of SNMP packet */ -#define CUPS_SNMP_MAX_STRING 65536 /* Maximum size of string */ +#define CUPS_SNMP_MAX_STRING 1024 /* Maximum size of string */ #define CUPS_SNMP_VERSION_1 0 /* SNMPv1 */ diff --git a/cups/snmp.c b/cups/snmp.c index 29b47d77e..33dd1d4ea 100644 --- a/cups/snmp.c +++ b/cups/snmp.c @@ -1085,7 +1085,7 @@ asn1_decode_snmp(unsigned char *buffer, /* I - Buffer */ packet->object_value.string.num_bytes = length; asn1_get_string(&bufptr, bufend, length, (char *)packet->object_value.string.bytes, - CUPS_SNMP_MAX_STRING); + sizeof(packet->object_value.string.bytes)); break; case CUPS_ASN1_OID : diff --git a/cups/tempfile.c b/cups/tempfile.c index facd5242a..ac59d9f8c 100644 --- a/cups/tempfile.c +++ b/cups/tempfile.c @@ -3,7 +3,7 @@ * * Temp file utilities for CUPS. * - * Copyright 2007-2010 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -204,7 +204,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/Mac OS X 10.5@ + * @since CUPS 1.2/OS X 10.5@ */ cups_file_t * /* O - CUPS file or @code NULL@ on error */ diff --git a/cups/testpwg.c b/cups/testpwg.c index 756baf0d8..a352f9ffc 100644 --- a/cups/testpwg.c +++ b/cups/testpwg.c @@ -3,7 +3,7 @@ * * PWG test program for CUPS. * - * Copyright 2009-2011 by Apple Inc. + * Copyright 2009-2012 by Apple Inc. * * These coded instructions, statements, and computer programs are the * property of Apple Inc. and are protected by Federal copyright @@ -260,6 +260,34 @@ main(int argc, /* I - Number of command-line args */ else puts("PASS"); + fputs("_pwgMediaForSize(9842, 19050): ", stdout); + if ((pwgmedia = _pwgMediaForSize(9842, 19050)) == NULL) + { + puts("FAIL (not found)"); + status ++; + } + else if (strcmp(pwgmedia->pwg, "na_monarch_3.875x7.5in")) + { + printf("FAIL (%s)\n", pwgmedia->pwg); + status ++; + } + else + printf("PASS (%s)\n", pwgmedia->pwg); + + fputs("_pwgMediaForSize(9800, 19000): ", stdout); + if ((pwgmedia = _pwgMediaForSize(9800, 19000)) == NULL) + { + puts("FAIL (not found)"); + status ++; + } + else if (strcmp(pwgmedia->pwg, "jpn_you6_98x190mm")) + { + printf("FAIL (%s)\n", pwgmedia->pwg); + status ++; + } + else + printf("PASS (%s)\n", pwgmedia->pwg); + return (status); } diff --git a/cups/thread-private.h b/cups/thread-private.h index 48f8a39a6..b16eec187 100644 --- a/cups/thread-private.h +++ b/cups/thread-private.h @@ -3,7 +3,7 @@ * * Private threading definitions for CUPS. * - * Copyright 2009-2010 by Apple Inc. + * Copyright 2009-2012 by Apple Inc. * * These coded instructions, statements, and computer programs are the * property of Apple Inc. and are protected by Federal copyright @@ -49,7 +49,7 @@ typedef pthread_key_t _cups_threadkey_t; typedef void *(__stdcall *_cups_thread_func_t)(void *arg); typedef struct _cups_mutex_s { - int m_init; /* Flag for on-demand initialization */ + int m_init; /* Flag for on-demand initialization */ CRITICAL_SECTION m_criticalSection; /* Win32 Critical Section */ } _cups_mutex_t; @@ -62,6 +62,7 @@ typedef DWORD _cups_threadkey_t; # define _cupsThreadSetData(k,p) TlsSetValue(k,p) # else +typedef void *(*_cups_thread_func_t)(void *arg); typedef char _cups_mutex_t; typedef char _cups_rwlock_t; typedef void *_cups_threadkey_t; diff --git a/cups/thread.c b/cups/thread.c index 7574298fa..da1882e9d 100644 --- a/cups/thread.c +++ b/cups/thread.c @@ -3,7 +3,7 @@ * * Threading primitives for CUPS. * - * Copyright 2009-2010 by Apple Inc. + * Copyright 2009-2012 by Apple Inc. * * These coded instructions, statements, and computer programs are the * property of Apple Inc. and are protected by Federal copyright @@ -113,7 +113,7 @@ _cupsRWUnlock(_cups_rwlock_t *rwlock) /* I - Reader/writer lock */ * '_cupsThreadCreate()' - Create a thread. */ -int /* O - 0 on failure, 1 on success */ +int /* O - 0 on failure, 1 on success */ _cupsThreadCreate( _cups_thread_func_t func, /* I - Entry point */ void *arg) /* I - Entry point context */ @@ -223,7 +223,7 @@ _cupsRWUnlock(_cups_rwlock_t *rwlock) /* I - Reader/writer lock */ * '_cupsThreadCreate()' - Create a thread. */ -int /* O - 0 on failure, 1 on success */ +int /* O - 0 on failure, 1 on success */ _cupsThreadCreate( _cups_thread_func_t func, /* I - Entry point */ void *arg) /* I - Entry point context */ @@ -309,6 +309,25 @@ _cupsRWUnlock(_cups_rwlock_t *rwlock) /* I - Reader/writer lock */ { (void)rwlock; } + + +/* + * '_cupsThreadCreate()' - Create a thread. + */ + +int /* O - 0 on failure, 1 on success */ +_cupsThreadCreate( + _cups_thread_func_t func, /* I - Entry point */ + void *arg) /* I - Entry point context */ +{ + fputs("DEBUG: CUPS was compiled without threading support, no thread " + "created.\n", stderr); + + (void)func; + (void)arg; + + return (0); +} #endif /* HAVE_PTHREAD_H */ diff --git a/cups/usersys.c b/cups/usersys.c index 0fcd86e57..7aee0007f 100644 --- a/cups/usersys.c +++ b/cups/usersys.c @@ -136,7 +136,7 @@ cupsGetPassword(const char *prompt) /* I - Prompt string */ * the @link cupsSetPasswordCB@ or @link cupsSetPasswordCB2@ functions need to * do so in each thread for the same function to be used. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ const char * /* O - Password */ @@ -194,7 +194,7 @@ cupsServer(void) * in a program. Multi-threaded programs that override the callback need to do * so in each thread for the same callback to be used. * - * @since CUPS 1.5/Mac OS X 10.7@ + * @since CUPS 1.5/OS X 10.7@ */ void @@ -218,7 +218,7 @@ cupsSetClientCertCB( * program. Multi-threaded programs that override the setting need to do so in * each thread for the same setting to be used. * - * @since CUPS 1.5/Mac OS X 10.7@ + * @since CUPS 1.5/OS X 10.7@ */ int /* O - Status of call (0 = success) */ @@ -304,7 +304,7 @@ cupsSetPasswordCB(cups_password_cb_t cb)/* I - Callback function */ * in a program. Multi-threaded programs that override the callback need to do * so in each thread for the same callback to be used. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ void @@ -385,7 +385,7 @@ cupsSetServer(const char *server) /* I - Server name */ * in a program. Multi-threaded programs that override the callback need to do * so in each thread for the same callback to be used. * - * @since CUPS 1.5/Mac OS X 10.7@ + * @since CUPS 1.5/OS X 10.7@ */ void @@ -874,7 +874,7 @@ cups_read_client_conf( } #ifndef __APPLE__ /* - * The Server directive is not supported on Mac OS X due to app sandboxing + * The Server directive is not supported on OS X due to app sandboxing * restrictions, i.e. not all apps request network access. */ else if (!cups_server && (!cg->server[0] || !cg->ipp_port) && diff --git a/cups/util.c b/cups/util.c index e6fb06d0a..4c5b4c43d 100644 --- a/cups/util.c +++ b/cups/util.c @@ -3,7 +3,7 @@ * * Printing utilities for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -106,7 +106,7 @@ cupsCancelJob(const char *name, /* I - Name of printer or class */ * Use the @link cupsLastError@ and @link cupsLastErrorString@ functions to get * the cause of any failure. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ ipp_status_t /* O - IPP status */ @@ -194,7 +194,7 @@ cupsCancelJob2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_ * print, use the @link cupsPrintFile2@ or @link cupsPrintFiles2@ function * instead. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ int /* O - Job ID or 0 on error */ @@ -274,7 +274,7 @@ cupsCreateJob( * * The document must have been started using @link cupsStartDocument@. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ ipp_status_t /* O - Status of document submission */ @@ -443,7 +443,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/Mac OS X 10.4@ + * @since CUPS 1.1.21/OS X 10.4@ */ const char * /* O - Default printer or @code NULL@ */ @@ -534,7 +534,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/Mac OS X 10.4@ + * @since CUPS 1.1.21/OS X 10.4@ */ int /* O - Number of jobs */ @@ -838,7 +838,7 @@ cupsGetPPD(const char *name) /* I - Destination name */ * each call to @link cupsGetPPD@ or @code cupsGetPPD2@. The caller "owns" the * file that is created and must @code unlink@ the returned filename. * - * @since CUPS 1.1.21/Mac OS X 10.4@ + * @since CUPS 1.1.21/OS X 10.4@ */ const char * /* O - Filename for PPD file */ @@ -879,7 +879,7 @@ cupsGetPPD2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DE * For classes, @code cupsGetPPD3@ returns the PPD file for the first printer * in the class. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ http_status_t /* O - HTTP status */ @@ -1275,7 +1275,7 @@ cupsGetPrinters(char ***printers) /* O - Printers */ * overwritten on the next call to @link cupsGetPPD@, @link cupsGetPPD2@, * or @link cupsGetServerPPD@. * - * @since CUPS 1.3/Mac OS X 10.5@ + * @since CUPS 1.3/OS X 10.5@ */ char * /* O - Name of PPD file or @code NULL@ on error */ @@ -1364,7 +1364,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/Mac OS X 10.4@ + * @since CUPS 1.1.21/OS X 10.4@ */ int /* O - Job ID or 0 on error */ @@ -1416,7 +1416,7 @@ cupsPrintFiles( * 'cupsPrintFiles2()' - Print one or more files to a printer or class on the * specified server. * - * @since CUPS 1.1.21/Mac OS X 10.4@ + * @since CUPS 1.1.21/OS X 10.4@ */ int /* O - Job ID or 0 on error */ @@ -1548,7 +1548,7 @@ cupsPrintFiles2( * @code CUPS_FORMAT_TEXT@ are provided for the "format" argument, although * any supported MIME type string can be supplied. * - * @since CUPS 1.4/Mac OS X 10.6@ + * @since CUPS 1.4/OS X 10.6@ */ http_status_t /* O - HTTP status of request */ diff --git a/cups/versioning.h b/cups/versioning.h index 2e6447af5..38bfddbeb 100644 --- a/cups/versioning.h +++ b/cups/versioning.h @@ -3,7 +3,7 @@ * * API versioning definitions for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * * These coded instructions, statements, and computer programs are the * property of Apple Inc. and are protected by Federal copyright @@ -24,11 +24,9 @@ * which add compiler-specific attributes that flag functions that are * deprecated or added in particular releases. * - * On Mac OS X, the _CUPS_API_* constants are defined based on the values of + * On OS X, the _CUPS_API_* constants are defined based on the values of * the MAC_OS_X_VERSION_MIN_ALLOWED and MAC_OS_X_VERSION_MAX_ALLOWED constants * provided by the compiler. - * - * */ # if defined(__APPLE__) && !defined(_CUPS_SOURCE) diff --git a/data/media.defs b/data/media.defs index 43b48c352..6f0be82e8 100644 --- a/data/media.defs +++ b/data/media.defs @@ -198,7 +198,7 @@ #media "w167h288/Shipping Address" 167 288 #media "w162h540/Internet Postage 2-Part" 162 540 #media "w162h504/Internet Postage 3-Part" 162 504 -#media "w41h248/File Folder" 41 248 +#media "w41h248/File Folder " 41 248 #media "w41h144/Hanging Folder" 41 144 #media "w153h198/3.5\" Disk" 153 198 diff --git a/doc/Makefile b/doc/Makefile index 0e4688474..33c1e1d01 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -66,7 +66,7 @@ HELPFILES = \ help/man-cancel.html \ help/man-cups-config.html \ help/man-cups-lpd.html \ - help/man-cups-polld.html \ + help/man-cups-snmp.html \ help/man-cupsaddsmb.html \ help/man-cupsd.html \ help/man-cupsenable.html \ diff --git a/doc/help/api-array.html b/doc/help/api-array.html index 147251ebd..c5ab8f773 100644 --- a/doc/help/api-array.html +++ b/doc/help/api-array.html @@ -609,7 +609,7 @@ for (s = (char *)cupsArrayFirst(array); s != NULL; puts(s); Functions
-CUPS 1.2/Mac OS X 10.5 cupsArrayAdd
+CUPS 1.2/OS X 10.5 cupsArrayAdd
Add an element to the array.
int cupsArrayAdd (
-
@@ -631,7 +631,7 @@ appended at the end of the run of identical elements. For unsorted arrays, the element is appended to the end of the array.CUPS 1.2/Mac OS X 10.5 cupsArrayClear
+CUPS 1.2/OS X 10.5 cupsArrayClear
Clear the array.
void cupsArrayClear (
-
@@ -648,7 +648,7 @@ The caller is responsible for freeing the memory used by the elements themselves.CUPS 1.2/Mac OS X 10.5 cupsArrayCount
+CUPS 1.2/OS X 10.5 cupsArrayCount
Get the number of elements in the array.
int cupsArrayCount (
@@ -661,7 +661,7 @@ int cupsArrayCount (
Return Value
Number of elements
-CUPS 1.2/Mac OS X 10.5 cupsArrayCurrent
+CUPS 1.2/OS X 10.5 cupsArrayCurrent
Return the current element in the array.
void *cupsArrayCurrent (
-
@@ -679,7 +679,7 @@ void *cupsArrayCurrent (
cupsArrayFirst
, orcupsArrayIndex
, orcupsArrayLast
.CUPS 1.2/Mac OS X 10.5 cupsArrayDelete
+CUPS 1.2/OS X 10.5 cupsArrayDelete
Free all memory used by the array.
void cupsArrayDelete (
-
@@ -695,7 +695,7 @@ void cupsArrayDelete (
elements themselves.CUPS 1.2/Mac OS X 10.5 cupsArrayDup
+CUPS 1.2/OS X 10.5 cupsArrayDup
Duplicate the array.
cups_array_t *cupsArrayDup (
@@ -708,7 +708,7 @@ elements themselves.Return Value
Duplicate array
-CUPS 1.2/Mac OS X 10.5 cupsArrayFind
+CUPS 1.2/OS X 10.5 cupsArrayFind
Find an element in the array.
void *cupsArrayFind (
@@ -724,7 +724,7 @@ void *cupsArrayFind (
Return Value
Element found or
-NULL
CUPS 1.2/Mac OS X 10.5 cupsArrayFirst
+CUPS 1.2/OS X 10.5 cupsArrayFirst
Get the first element in the array.
void *cupsArrayFirst (
@@ -737,7 +737,7 @@ void *cupsArrayFirst (
Return Value
First element or
-NULL
if the array is emptyCUPS 1.3/Mac OS X 10.5 cupsArrayGetIndex
+CUPS 1.3/OS X 10.5 cupsArrayGetIndex
Get the index of the current element.
int cupsArrayGetIndex (
-
@@ -755,7 +755,7 @@ int cupsArrayGetIndex (
cupsArrayFirst
, orcupsArrayIndex
, orcupsArrayLast
.CUPS 1.3/Mac OS X 10.5 cupsArrayGetInsert
+CUPS 1.3/OS X 10.5 cupsArrayGetInsert
Get the index of the last inserted element.
int cupsArrayGetInsert (
@@ -768,7 +768,7 @@ int cupsArrayGetInsert (
Return Value
Index of the last inserted element, starting at 0
-CUPS 1.2/Mac OS X 10.5 cupsArrayIndex
+CUPS 1.2/OS X 10.5 cupsArrayIndex
Get the N-th element in the array.
void *cupsArrayIndex (
@@ -784,7 +784,7 @@ void *cupsArrayIndex (
Return Value
N-th element or
-NULL
CUPS 1.2/Mac OS X 10.5 cupsArrayInsert
+CUPS 1.2/OS X 10.5 cupsArrayInsert
Insert an element in the array.
int cupsArrayInsert (
-
@@ -806,7 +806,7 @@ inserted at the beginning of the run of identical elements. For unsorted arrays, the element is inserted at the beginning of the array.CUPS 1.2/Mac OS X 10.5 cupsArrayLast
+CUPS 1.2/OS X 10.5 cupsArrayLast
Get the last element in the array.
void *cupsArrayLast (
@@ -819,7 +819,7 @@ void *cupsArrayLast (
Return Value
Last element or
-NULL
if the array is emptyCUPS 1.2/Mac OS X 10.5 cupsArrayNew
+CUPS 1.2/OS X 10.5 cupsArrayNew
Create a new array.
cups_array_t *cupsArrayNew (
-
@@ -842,7 +842,7 @@ data pointer argument can safely be omitted when not required so functions likestrcmp
can be used for sorted string arrays.CUPS 1.3/Mac OS X 10.5 cupsArrayNew2
+CUPS 1.3/OS X 10.5 cupsArrayNew2
Create a new array with hash.
cups_array_t *cupsArrayNew2 (
-
@@ -874,7 +874,7 @@ The hash function ("h") is used to implement cached lookups with the specified hash size ("hsize").CUPS 1.5/Mac OS X 10.7 cupsArrayNew3
+CUPS 1.5/OS X 10.7 cupsArrayNew3
Create a new array with hash and/or free function.
cups_array_t *cupsArrayNew3 (
-
@@ -918,7 +918,7 @@ The free function ("cf") is used to automatically free/release element removed or the array is deleted.CUPS 1.2/Mac OS X 10.5 cupsArrayNext
+CUPS 1.2/OS X 10.5 cupsArrayNext
Get the next element in the array.
void *cupsArrayNext (
-
@@ -939,7 +939,7 @@ The next element is undefined until you callcups to set the current element.
CUPS 1.2/Mac OS X 10.5 cupsArrayPrev
+CUPS 1.2/OS X 10.5 cupsArrayPrev
Get the previous element in the array.
void *cupsArrayPrev (
-
@@ -960,7 +960,7 @@ The previous element is undefined until you callto set the current element.
CUPS 1.2/Mac OS X 10.5 cupsArrayRemove
+CUPS 1.2/OS X 10.5 cupsArrayRemove
Remove an element from the array.
int cupsArrayRemove (
-
@@ -984,7 +984,7 @@ The caller is responsible for freeing the memory used by the removed element.CUPS 1.2/Mac OS X 10.5 cupsArrayRestore
+CUPS 1.2/OS X 10.5 cupsArrayRestore
Reset the current element to the last
cupsArraySave
.void *cupsArrayRestore (
@@ -997,7 +997,7 @@ void *cupsArrayRestore (
Return Value
New current element
-CUPS 1.2/Mac OS X 10.5 cupsArraySave
+CUPS 1.2/OS X 10.5 cupsArraySave
Mark the current element for a later
cupsArrayRestore
.int cupsArraySave (
-
@@ -1018,7 +1018,7 @@ to set the current element.
The save/restore stack is guaranteed to be at least 32 elements deep.CUPS 1.2/Mac OS X 10.5 cupsArrayUserData
+CUPS 1.2/OS X 10.5 cupsArrayUserData
Return the user data for an array.
void *cupsArrayUserData (
diff --git a/doc/help/api-cups.html b/doc/help/api-cups.html index bda8ad661..8555764f9 100644 --- a/doc/help/api-cups.html +++ b/doc/help/api-cups.html @@ -1022,7 +1022,7 @@ int cupsAddOption (
Discussion
New option arrays can be initialized simply by passing 0 for the "num_options" parameter.
-CUPS 1.2/Mac OS X 10.5 cupsAdminCreateWindowsPPD
+CUPS 1.2/OS X 10.5 cupsAdminCreateWindowsPPD
Create the Windows PPD file for a printer.
char *cupsAdminCreateWindowsPPD (
@@ -1044,7 +1044,7 @@ char *cupsAdminCreateWindowsPPD (
Return Value
PPD file or NULL
-CUPS 1.2/Mac OS X 10.5 cupsAdminExportSamba
+CUPS 1.2/OS X 10.5 cupsAdminExportSamba
Export a printer to Samba.
int cupsAdminExportSamba (
@@ -1072,7 +1072,7 @@ int cupsAdminExportSamba (
Return Value
1 on success, 0 on failure
-CUPS 1.3/Mac OS X 10.5 cupsAdminGetServerSettings
+CUPS 1.3/OS X 10.5 cupsAdminGetServerSettings
Get settings from the server.
int cupsAdminGetServerSettings (
-
@@ -1096,7 +1096,7 @@ int cupsAdminGetServerSettings (
you are done with them.CUPS 1.3/Mac OS X 10.5 cupsAdminSetServerSettings
+CUPS 1.3/OS X 10.5 cupsAdminSetServerSettings
Set settings on the server.
int cupsAdminSetServerSettings (
-
@@ -1137,7 +1137,7 @@ to cancel the current job on the named destination.
Use thecupsLastError
andcupsLastErrorString
functions to get the cause of any failure.CUPS 1.4/Mac OS X 10.6 cupsCancelJob2
+CUPS 1.4/OS X 10.6 cupsCancelJob2
Cancel or purge a print job.
ipp_status_t cupsCancelJob2 (
@@ -1170,7 +1170,7 @@ Use thecupsLastError
and CUPS 1.6 cupsConnectDest +CUPS 1.6/OS X 10.8 cupsConnectDest
Connect to the server for a destination.
http_t *cupsConnectDest (
-
@@ -1212,7 +1212,7 @@ to by "cancel" is non-zero, or the callback function (or block) return The caller is responsible for calling httpClose() on the returned object.CUPS 1.6 cupsConnectDestBlock
+CUPS 1.6/OS X 10.8 cupsConnectDestBlock
Connect to the server for a destination.
http_t *cupsConnectDestBlock (
-
@@ -1272,7 +1272,7 @@ copy) - for use with the cupsEnumDests* functions. The caller is responsible for calling cupsFreeDests() on the returned object(s).CUPS 1.4/Mac OS X 10.6 cupsCreateJob
+CUPS 1.4/OS X 10.6 cupsCreateJob
Create an empty job for streaming.
int cupsCreateJob (
-
@@ -1321,7 +1321,7 @@ Note: The current encryption setting is tracked separately for each thread in a program. Multi-threaded programs that override the setting via thecupsSetEncryption
function need to do so in each thread for the same setting to be used.CUPS 1.6 cupsEnumDests
+CUPS 1.6/OS X 10.8 cupsEnumDests
Enumerate available destinations with a callback function.
int cupsEnumDests (
-
@@ -1363,7 +1363,7 @@ Enumeration happens on the current thread and does not return until all destinations have been enumerated or the callback function returns 0.CUPS 1.6 cupsEnumDestsBlock
+CUPS 1.6/OS X 10.8 cupsEnumDestsBlock
Enumerate available destinations with a block.
int cupsEnumDestsBlock (
-
@@ -1401,7 +1401,7 @@ Enumeration happens on the current thread and does not return until all destinations have been enumerated or the block returns 0.CUPS 1.4/Mac OS X 10.6 cupsFinishDocument
+CUPS 1.4/OS X 10.6 cupsFinishDocument
Finish sending a document.
ipp_status_t cupsFinishDocument (
-
@@ -1493,7 +1493,7 @@ variables are not set, the server default destination is returned. Applications should use thecupsGetDests
andcupsGetDest
functions to get the user-defined default printer, as this function does not support the lpoptions-defined default printer.CUPS 1.1.21/Mac OS X 10.4 cupsGetDefault2
+CUPS 1.1.21/OS X 10.4 cupsGetDefault2
Get the default printer or class for the specified server.
const char *cupsGetDefault2 (
-
@@ -1564,7 +1564,7 @@ marker-types, and printer-commands attributes as well.
Use thecupsFreeDests
function to free the destination list and thecupsGetDest
function to find a particular destination.CUPS 1.1.21/Mac OS X 10.4 cupsGetDests2
+CUPS 1.1.21/OS X 10.4 cupsGetDests2
Get the list of destinations from the specified server.
int cupsGetDests2 (
-
@@ -1620,7 +1620,7 @@ int cupsGetJobs (
of state, whileCUPS_WHICHJOBS_ACTIVE
returns jobs that are pending, processing, or held andCUPS_WHICHJOBS_COMPLETED
returns jobs that are stopped, canceled, aborted, or completed.CUPS 1.1.21/Mac OS X 10.4 cupsGetJobs2
+CUPS 1.1.21/OS X 10.4 cupsGetJobs2
Get the jobs from the specified server.
int cupsGetJobs2 (
-
@@ -1652,7 +1652,7 @@ pending, processing, or held andCUPS_WHICHJOBS_COMPLETED
returns jobs that are stopped, canceled, aborted, or completed.CUPS 1.4/Mac OS X 10.6 cupsGetNamedDest
+CUPS 1.4/OS X 10.6 cupsGetNamedDest
Get options for the named destination.
cups_dest_t *cupsGetNamedDest (
-
@@ -1727,7 +1727,7 @@ in the class.
The returned filename is stored in a static buffer and is overwritten with each call tocupsGetPPD
orcupsGetPPD2
. The caller "owns" the file that is created and mustunlink
the returned filename.CUPS 1.1.21/Mac OS X 10.4 cupsGetPPD2
+CUPS 1.1.21/OS X 10.4 cupsGetPPD2
Get the PPD file for a printer from the specified server.
const char *cupsGetPPD2 (
-
@@ -1752,7 +1752,7 @@ each call tocupsGetPPD
orcupsGetP file that is created and must
unlink
the returned filename.CUPS 1.4/Mac OS X 10.6 cupsGetPPD3
+CUPS 1.4/OS X 10.6 cupsGetPPD3
Get the PPD file for a printer on the specified server if it has changed.
@@ -1817,7 +1817,7 @@ Note: The current password callback function is tracked separately for each thread in a program. Multi-threaded programs that override the setting via the
-cupsSetPasswordCB
orcupsSetPasswordCB2
functions need to do so in each thread for the same function to be used.CUPS 1.4/Mac OS X 10.6 cupsGetPassword2
+CUPS 1.4/OS X 10.6 cupsGetPassword2
Get a password from the user using the advanced password callback.
@@ -1867,7 +1867,7 @@ int cupsGetPrinters (
This function is deprecated - use
-cupsGetDests
instead.CUPS 1.3/Mac OS X 10.5 cupsGetServerPPD
+CUPS 1.3/OS X 10.5 cupsGetServerPPD
Get an available PPD file from the server.
char *cupsGetServerPPD (
@@ -1944,7 +1944,7 @@ cups_lang_t *cupsLangGet (
Return Value
Language data
-CUPS 1.2/Mac OS X 10.5 cupsNotifySubject
+CUPS 1.2/OS X 10.5 cupsNotifySubject
Return the subject for the given notification message.
char *cupsNotifySubject (
@@ -1964,7 +1964,7 @@ char *cupsNotifySubject (
The returned string must be freed by the caller using
-free
.CUPS 1.2/Mac OS X 10.5 cupsNotifyText
+CUPS 1.2/OS X 10.5 cupsNotifyText
Return the text for the given notification message.
char *cupsNotifyText (
@@ -2034,7 +2034,7 @@ int cupsPrintFile (
Return Value
Job ID or 0 on error
-CUPS 1.1.21/Mac OS X 10.4 cupsPrintFile2
+CUPS 1.1.21/OS X 10.4 cupsPrintFile2
Print a file to a printer or class on the specified server.
@@ -2092,7 +2092,7 @@ int cupsPrintFiles (
Return Value
Job ID or 0 on error
-CUPS 1.1.21/Mac OS X 10.4 cupsPrintFiles2
+CUPS 1.1.21/OS X 10.4 cupsPrintFiles2
Print one or more files to a printer or class on the specified server.
@@ -2124,7 +2124,7 @@ int cupsPrintFiles2 (
Return Value
Job ID or 0 on error
-CUPS 1.3/Mac OS X 10.5 cupsRemoveDest
+CUPS 1.3/OS X 10.5 cupsRemoveDest
Remove a destination from the destination list.
int cupsRemoveDest (
-
@@ -2153,7 +2153,7 @@ queue, merely the lpoptions for that destination/instance. Use the options for the user.CUPS 1.2/Mac OS X 10.5 cupsRemoveOption
+CUPS 1.2/OS X 10.5 cupsRemoveOption
Remove an option from an option array.
int cupsRemoveOption (
-
@@ -2191,7 +2191,7 @@ Note: The current server is tracked separately for each thread in a program. Multi-threaded programs that override the server via thecupsSetServer
function need to do so in each thread for the same server to be used.CUPS 1.5/Mac OS X 10.7 cupsSetClientCertCB
+CUPS 1.5/OS X 10.7 cupsSetClientCertCB
Set the client certificate callback.
void cupsSetClientCertCB (
-
@@ -2213,7 +2213,7 @@ in a program. Multi-threaded programs that override the callback need to do so in each thread for the same callback to be used.CUPS 1.5/Mac OS X 10.7 cupsSetCredentials
+CUPS 1.5/OS X 10.7 cupsSetCredentials
Set the default credentials to be used for SSL/TLS connections.
@@ -2233,7 +2233,7 @@ program. Multi-threaded programs that override the setting need to do so in each thread for the same setting to be used.
-CUPS 1.3/Mac OS X 10.5 cupsSetDefaultDest
+CUPS 1.3/OS X 10.5 cupsSetDefaultDest
Set the default destination.
void cupsSetDefaultDest (
@@ -2270,7 +2270,7 @@ void cupsSetDests (
Discussion
This function saves the destinations to /etc/cups/lpoptions when run as root and ~/.cups/lpoptions when run as a normal user.
-CUPS 1.1.21/Mac OS X 10.4 cupsSetDests2
+CUPS 1.1.21/OS X 10.4 cupsSetDests2
Save the list of destinations for the specified server.
int cupsSetDests2 (
-
@@ -2334,7 +2334,7 @@ by a program per thread.
Note: The current password callback is tracked separately for each thread in a program. Multi-threaded programs that override the callback need to do so in each thread for the same callback to be used.CUPS 1.4/Mac OS X 10.6 cupsSetPasswordCB2
+CUPS 1.4/OS X 10.6 cupsSetPasswordCB2
Set the advanced password callback for CUPS.
void cupsSetPasswordCB2 (
-
@@ -2380,7 +2380,7 @@ default server name and port.
Note: The current server is tracked separately for each thread in a program. Multi-threaded programs that override the server need to do so in each thread for the same server to be used.CUPS 1.5/Mac OS X 10.7 cupsSetServerCertCB
+CUPS 1.5/OS X 10.7 cupsSetServerCertCB
Set the server certificate callback.
void cupsSetServerCertCB (
-
@@ -2419,7 +2419,7 @@ void cupsSetUser (
Note: The current user name is tracked separately for each thread in a program. Multi-threaded programs that override the user name need to do so in each thread for the same user name to be used.CUPS 1.4/Mac OS X 10.6 cupsStartDocument
+CUPS 1.4/OS X 10.6 cupsStartDocument
Add a document to a job created with cupsCreateJob().
http_status_t cupsStartDocument (
-
@@ -2498,7 +2498,7 @@ This function is deprecated - usecupsTempFd
<cupsTempFile2
instead.CUPS 1.2/Mac OS X 10.5 cupsTempFile2
+CUPS 1.2/OS X 10.5 cupsTempFile2
Creates a temporary CUPS file.
cups_file_t *cupsTempFile2 (
@@ -2531,19 +2531,19 @@ program. Multi-threaded programs that override the user name with thecupsSetUser
function need to do so in each thread for the same user name to be used.Data Types
-CUPS 1.5/Mac OS X 10.7 cups_client_cert_cb_t
+CUPS 1.5/OS X 10.7 cups_client_cert_cb_t
Client credentials callback
typedef int (*cups_client_cert_cb_t)(http_t *http, void *tls, cups_array_t *distinguished_names, void *user_data);
-CUPS 1.6 cups_dest_block_t
+CUPS 1.6/OS X 10.8 cups_dest_block_t
Destination enumeration block
typedef int (*cups_dest_block_t(unsigned flags, cups_dest_t *dest);
-CUPS 1.6 cups_dest_cb_t
+CUPS 1.6/OS X 10.8 cups_dest_cb_t
Destination enumeration callback
@@ -2554,13 +2554,13 @@ typedef int (*cups_dest_cb_t)(void *user_data, unsigned flags, typedef struct cups_dest_s cups_dest_t;
-CUPS 1.4/Mac OS X 10.6 cups_device_cb_t
+CUPS 1.4/OS X 10.6 cups_device_cb_t
Device callback
typedef void (*cups_device_cb_t)(const char *device_class, const char *device_id, const char *device_info, const char *device_make_and_model, const char *device_uri, const char *device_location, void *user_data);
-CUPS 1.6 cups_dinfo_t
+CUPS 1.6/OS X 10.8 cups_dinfo_t
Destination capability and status information
@@ -2576,7 +2576,7 @@ typedef struct cups_job_s cups_job_t;
typedef struct cups_option_s cups_option_t;
-CUPS 1.4/Mac OS X 10.6 cups_password_cb2_t
+CUPS 1.4/OS X 10.6 cups_password_cb2_t
New password callback
@@ -2592,13 +2592,13 @@ typedef const char *(*cups_password_cb_t)(const char *prompt);
typedef unsigned cups_ptype_t;
-CUPS 1.5/Mac OS X 10.7 cups_server_cert_cb_t
+CUPS 1.5/OS X 10.7 cups_server_cert_cb_t
Server credentials callback
typedef int (*cups_server_cert_cb_t)(http_t *http, void *tls, cups_array_t *certs, void *user_data);
-CUPS 1.6 cups_size_t
+CUPS 1.6/OS X 10.8 cups_size_t
Media Size
typedef struct cups_size_s cups_size_t; @@ -2676,7 +2676,7 @@ typedef struct cups_size_s cups_size_t;
value Value of option -CUPS 1.6 cups_size_s
+CUPS 1.6/OS X 10.8 cups_size_s
Media Size
struct cups_size_s {
constants
char media[128];
@@ -2701,7 +2701,7 @@ locale ID.Constants
-
-- CUPS_PRINTER_AUTHENTICATED CUPS 1.2/Mac OS X 10.5
+- CUPS_PRINTER_AUTHENTICATED CUPS 1.2/OS X 10.5
- Printer requires authentication
- CUPS_PRINTER_BIND
@@ -2714,7 +2714,7 @@ constants- Can collage copies
- CUPS_PRINTER_COLOR
- Can do color printing
-- CUPS_PRINTER_COMMANDS CUPS 1.2/Mac OS X 10.5
+- CUPS_PRINTER_COMMANDS CUPS 1.2/OS X 10.5
- Printer supports maintenance commands
- CUPS_PRINTER_COPIES
@@ -2723,7 +2723,7 @@ constants- Can cover output
- CUPS_PRINTER_DEFAULT
- Default printer on network
-- CUPS_PRINTER_DELETE CUPS 1.2/Mac OS X 10.5
+- CUPS_PRINTER_DELETE CUPS 1.2/OS X 10.5
- Delete printer
- CUPS_PRINTER_DUPLEX
@@ -2736,10 +2736,10 @@ constants- Local printer or class
- CUPS_PRINTER_MEDIUM
- Can do Tabloid/B/C/A3/A2
-- CUPS_PRINTER_MFP CUPS 1.4/Mac OS X 10.6
+- CUPS_PRINTER_MFP CUPS 1.4/OS X 10.6
- Printer with scanning capabilities
-- CUPS_PRINTER_NOT_SHARED CUPS 1.2/Mac OS X 10.5
+- CUPS_PRINTER_NOT_SHARED CUPS 1.2/OS X 10.5
- Printer is not shared
- CUPS_PRINTER_PUNCH
@@ -2748,7 +2748,7 @@ constants- Printer is rejecting jobs
- CUPS_PRINTER_REMOTE
- Remote printer or class
-- CUPS_PRINTER_SCANNER CUPS 1.4/Mac OS X 10.6
+- CUPS_PRINTER_SCANNER CUPS 1.4/OS X 10.6
- Scanner-only device
- CUPS_PRINTER_SMALL
diff --git a/doc/help/api-filedir.html b/doc/help/api-filedir.html index cca4bd94e..a25588686 100644 --- a/doc/help/api-filedir.html +++ b/doc/help/api-filedir.html @@ -455,7 +455,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.Functions
-CUPS 1.2/Mac OS X 10.5 cupsDirClose
+CUPS 1.2/OS X 10.5 cupsDirClose
Close a directory.
void cupsDirClose (
@@ -466,7 +466,7 @@ void cupsDirClose (
- dp
- Directory pointer
CUPS 1.2/Mac OS X 10.5 cupsDirOpen
+CUPS 1.2/OS X 10.5 cupsDirOpen
Open a directory.
cups_dir_t *cupsDirOpen (
@@ -479,7 +479,7 @@ void cupsDirClose (
Return Value
Directory pointer or
-NULL
if the directory could not be opened.CUPS 1.2/Mac OS X 10.5 cupsDirRead
+CUPS 1.2/OS X 10.5 cupsDirRead
Read the next directory entry.
cups_dentry_t *cupsDirRead (
@@ -492,7 +492,7 @@ void cupsDirClose (
Return Value
Directory entry or
-NULL
when there are no moreCUPS 1.2/Mac OS X 10.5 cupsDirRewind
+CUPS 1.2/OS X 10.5 cupsDirRewind
Rewind to the start of the directory.
void cupsDirRewind (
@@ -503,7 +503,7 @@ void cupsDirRewind (
dp Directory pointer -CUPS 1.2/Mac OS X 10.5 cupsFileClose
+CUPS 1.2/OS X 10.5 cupsFileClose
Close a CUPS file.
int cupsFileClose (
@@ -516,7 +516,7 @@ int cupsFileClose (
Return Value
0 on success, -1 on error
-CUPS 1.2/Mac OS X 10.5 cupsFileCompression
+CUPS 1.2/OS X 10.5 cupsFileCompression
Return whether a file is compressed.
int cupsFileCompression (
@@ -529,7 +529,7 @@ int cupsFileCompression (
Return Value
-
CUPS_FILE_NONE
orCUPS_FILE_GZIP
CUPS 1.2/Mac OS X 10.5 cupsFileEOF
+CUPS 1.2/OS X 10.5 cupsFileEOF
Return the end-of-file status.
int cupsFileEOF (
@@ -542,7 +542,7 @@ int cupsFileEOF (
Return Value
1 on end of file, 0 otherwise
-CUPS 1.2/Mac OS X 10.5 cupsFileFind
+CUPS 1.2/OS X 10.5 cupsFileFind
Find a file using the specified path.
const char *cupsFileFind (
-
@@ -575,7 +575,7 @@ the supplied paths,NULL
is returned. ANULL
path only matches the current directory.CUPS 1.2/Mac OS X 10.5 cupsFileFlush
+CUPS 1.2/OS X 10.5 cupsFileFlush
Flush pending output.
int cupsFileFlush (
@@ -588,7 +588,7 @@ int cupsFileFlush (
Return Value
0 on success, -1 on error
-CUPS 1.2/Mac OS X 10.5 cupsFileGetChar
+CUPS 1.2/OS X 10.5 cupsFileGetChar
Get a single character from a file.
int cupsFileGetChar (
@@ -601,7 +601,7 @@ int cupsFileGetChar (
Return Value
Character or -1 on end of file
-CUPS 1.2/Mac OS X 10.5 cupsFileGetConf
+CUPS 1.2/OS X 10.5 cupsFileGetConf
Get a line from a configuration file.
char *cupsFileGetConf (
@@ -626,7 +626,7 @@ char *cupsFileGetConf (
Return Value
Line read or
-NULL
on end of file or errorCUPS 1.2/Mac OS X 10.5 cupsFileGetLine
+CUPS 1.2/OS X 10.5 cupsFileGetLine
Get a CR and/or LF-terminated line that may contain binary data.
@@ -653,7 +653,7 @@ nul-terminated, however you should use the returned length to determine the number of bytes on the line.
-CUPS 1.2/Mac OS X 10.5 cupsFileGets
+CUPS 1.2/OS X 10.5 cupsFileGets
Get a CR and/or LF-terminated line.
char *cupsFileGets (
@@ -672,7 +672,7 @@ char *cupsFileGets (
Return Value
Line read or
-NULL
on end of file or errorCUPS 1.2/Mac OS X 10.5 cupsFileLock
+CUPS 1.2/OS X 10.5 cupsFileLock
Temporarily lock access to a file.
int cupsFileLock (
@@ -688,7 +688,7 @@ int cupsFileLock (
Return Value
0 on success, -1 on error
-CUPS 1.2/Mac OS X 10.5 cupsFileNumber
+CUPS 1.2/OS X 10.5 cupsFileNumber
Return the file descriptor associated with a CUPS file.
int cupsFileNumber (
@@ -701,7 +701,7 @@ int cupsFileNumber (
Return Value
File descriptor
-CUPS 1.2/Mac OS X 10.5 cupsFileOpen
+CUPS 1.2/OS X 10.5 cupsFileOpen
Open a CUPS file.
cups_file_t *cupsFileOpen (
-
@@ -732,7 +732,7 @@ connection as needed, generally preferring IPv6 connections when there is a choice.CUPS 1.2/Mac OS X 10.5 cupsFileOpenFd
+CUPS 1.2/OS X 10.5 cupsFileOpenFd
Open a CUPS file using a file descriptor.
cups_file_t *cupsFileOpenFd (
-
@@ -757,7 +757,7 @@ supplied which enables Flate compression of the file. Compression is not supported for the "a" (append) mode.CUPS 1.2/Mac OS X 10.5 cupsFilePeekChar
+CUPS 1.2/OS X 10.5 cupsFilePeekChar
Peek at the next character from a file.
int cupsFilePeekChar (
@@ -770,7 +770,7 @@ int cupsFilePeekChar (
Return Value
Character or -1 on end of file
-CUPS 1.2/Mac OS X 10.5 cupsFilePrintf
+CUPS 1.2/OS X 10.5 cupsFilePrintf
Write a formatted string.
int cupsFilePrintf (
@@ -789,7 +789,7 @@ int cupsFilePrintf (
Return Value
Number of bytes written or -1 on error
-CUPS 1.2/Mac OS X 10.5 cupsFilePutChar
+CUPS 1.2/OS X 10.5 cupsFilePutChar
Write a character.
int cupsFilePutChar (
@@ -805,7 +805,7 @@ int cupsFilePutChar (
Return Value
0 on success, -1 on error
-CUPS 1.4/Mac OS X 10.6 cupsFilePutConf
+CUPS 1.4/OS X 10.6 cupsFilePutConf
Write a configuration line.
ssize_t cupsFilePutConf (
@@ -828,7 +828,7 @@ ssize_t cupsFilePutConf (
This function handles any comment escaping of the value.
-CUPS 1.2/Mac OS X 10.5 cupsFilePuts
+CUPS 1.2/OS X 10.5 cupsFilePuts
Write a string.
int cupsFilePuts (
@@ -848,7 +848,7 @@ int cupsFilePuts (
Like the
-fputs
function, no newline is appended to the string.CUPS 1.2/Mac OS X 10.5 cupsFileRead
+CUPS 1.2/OS X 10.5 cupsFileRead
Read from a file.
ssize_t cupsFileRead (
@@ -867,7 +867,7 @@ ssize_t cupsFileRead (
Return Value
Number of bytes read or -1 on error
-CUPS 1.2/Mac OS X 10.5 cupsFileRewind
+CUPS 1.2/OS X 10.5 cupsFileRewind
Set the current file position to the beginning of the file.
@@ -881,7 +881,7 @@ off_t cupsFileRewind (
Return Value
New file position or -1 on error
-CUPS 1.2/Mac OS X 10.5 cupsFileSeek
+CUPS 1.2/OS X 10.5 cupsFileSeek
Seek in a file.
off_t cupsFileSeek (
@@ -897,25 +897,25 @@ off_t cupsFileSeek (
Return Value
New file position or -1 on error
-CUPS 1.2/Mac OS X 10.5 cupsFileStderr
+CUPS 1.2/OS X 10.5 cupsFileStderr
Return a CUPS file associated with stderr.
cups_file_t *cupsFileStderr (void);
Return Value
CUPS file
-CUPS 1.2/Mac OS X 10.5 cupsFileStdin
+CUPS 1.2/OS X 10.5 cupsFileStdin
Return a CUPS file associated with stdin.
cups_file_t *cupsFileStdin (void);
Return Value
CUPS file
-CUPS 1.2/Mac OS X 10.5 cupsFileStdout
+CUPS 1.2/OS X 10.5 cupsFileStdout
Return a CUPS file associated with stdout.
cups_file_t *cupsFileStdout (void);
Return Value
CUPS file
-CUPS 1.2/Mac OS X 10.5 cupsFileTell
+CUPS 1.2/OS X 10.5 cupsFileTell
Return the current file position.
off_t cupsFileTell (
@@ -928,7 +928,7 @@ off_t cupsFileTell (
Return Value
File position
-CUPS 1.2/Mac OS X 10.5 cupsFileUnlock
+CUPS 1.2/OS X 10.5 cupsFileUnlock
Unlock access to a file.
int cupsFileUnlock (
@@ -941,7 +941,7 @@ int cupsFileUnlock (
Return Value
0 on success, -1 on error
-CUPS 1.2/Mac OS X 10.5 cupsFileWrite
+CUPS 1.2/OS X 10.5 cupsFileWrite
Write to a file.
ssize_t cupsFileWrite (
diff --git a/doc/help/api-filter.html b/doc/help/api-filter.html index 4e18d2ef0..38e6291d0 100644 --- a/doc/help/api-filter.html +++ b/doc/help/api-filter.html @@ -430,7 +430,7 @@ div.contents ul.subcontents li { Filter and backend programming introduction for CUPS. - Copyright 2007-2011 by Apple Inc. + Copyright 2007-2012 by Apple Inc. Copyright 1997-2006 by Easy Software Products, all rights reserved. These coded instructions, statements, and computer programs are the @@ -508,7 +508,7 @@ directory to write to.In addition, some operating systems provide additional security mechanisms that further limit file system access, even for backends running as root. On -Mac OS X, for example, no backend may write to a user's home directory.
+OS X, for example, no backend may write to a user's home directory.Canceled Jobs and Signal Handling
@@ -580,7 +580,7 @@ when running print filters and backends:APPLE_LANGUAGE The Apple language identifier associated with the job - (Mac OS X only). + (OS X only).CHARSET The job character set, typically "utf-8". @@ -901,7 +901,7 @@ sub-state and not an issue that applies when a job is not printing.Note:"STATE:" messages often provide visible alerts to the user. For example, -on Mac OS X setting a printer-state-reason value with an "-error" or +on OS X setting a printer-state-reason value with an "-error" or "-warning" suffix will cause the printer's dock item to bounce if the corresponding reason is localized with a cupsIPPReason keyword in the printer's PPD file.
@@ -1191,7 +1191,7 @@ void *my_data; cupsSNMPSideChannelWalk(".1.3.6.1.2.1.43", 5.0, my_callback, my_data);Functions
-CUPS 1.2/Mac OS X 10.5 cupsBackChannelRead
+CUPS 1.2/OS X 10.5 cupsBackChannelRead
Read data from the backchannel.
ssize_t cupsBackChannelRead (
-
@@ -1216,7 +1216,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.CUPS 1.2/Mac OS X 10.5 cupsBackChannelWrite
+CUPS 1.2/OS X 10.5 cupsBackChannelWrite
Write data to the backchannel.
ssize_t cupsBackChannelWrite (
-
@@ -1242,7 +1242,7 @@ controls how many seconds to wait for the data to be written - use indefinitely.CUPS 1.2/Mac OS X 10.5 cupsBackendDeviceURI
+CUPS 1.2/OS X 10.5 cupsBackendDeviceURI
Get the device URI for a backend.
const char *cupsBackendDeviceURI (
-
@@ -1262,7 +1262,7 @@ variable or the device URI passed in argv[0], whichever is found first.CUPS 1.4/Mac OS X 10.6 cupsBackendReport
+CUPS 1.4/OS X 10.6 cupsBackendReport
Write a device line from a backend.
void cupsBackendReport (
-
@@ -1294,7 +1294,7 @@ It handles quoting of special characters in the device-make-and-model, device-info, device-id, and device-location strings.CUPS 1.3/Mac OS X 10.5 cupsSideChannelDoRequest
+CUPS 1.3/OS X 10.5 cupsSideChannelDoRequest
Send a side-channel command to a backend and wait for a response.
cups_sc_status_t cupsSideChannelDoRequest (
-
@@ -1328,7 +1328,7 @@ pointed to by the "data" parameter. cupsSideChannelDoRequest() will update the value to contain the number of data bytes in the buffer.CUPS 1.3/Mac OS X 10.5 cupsSideChannelRead
+CUPS 1.3/OS X 10.5 cupsSideChannelRead
Read a side-channel message.
int cupsSideChannelRead (
-
@@ -1364,7 +1364,7 @@ pointed to by the "data" parameter. cupsSideChannelDoRequest() will update the value to contain the number of data bytes in the buffer.CUPS 1.4/Mac OS X 10.6 cupsSideChannelSNMPGet
+CUPS 1.4/OS X 10.6 cupsSideChannelSNMPGet
Query a SNMP OID's value.
cups_sc_status_t cupsSideChannelSNMPGet (
-
@@ -1405,7 +1405,7 @@ support SNMP queries.CUPS_SC_STATUS_NO_RESPONSE
is returned when the printer does not respond to the SNMP query.CUPS 1.4/Mac OS X 10.6 cupsSideChannelSNMPWalk
+CUPS 1.4/OS X 10.6 cupsSideChannelSNMPWalk
Query multiple SNMP OID values.
cups_sc_status_t cupsSideChannelSNMPWalk (
-
@@ -1451,7 +1451,7 @@ support SNMP queries.CUPS_SC_STATUS_NO_RESPONSE
is returned when the printer does not respond to the first SNMP query.CUPS 1.3/Mac OS X 10.5 cupsSideChannelWrite
+CUPS 1.3/OS X 10.5 cupsSideChannelWrite
Write a side-channel message.
int cupsSideChannelWrite (
@@ -1556,15 +1556,15 @@ typedef void (*cups_sc_walk_func_t)(const char *oid, const char *data, int datalDrain all pending output CUPS_SC_CMD_GET_BIDI Return bidirectional capabilities -CUPS_SC_CMD_GET_CONNECTED CUPS 1.5/Mac OS X 10.7 +CUPS_SC_CMD_GET_CONNECTED CUPS 1.5/OS X 10.7 Return whether the backend is "connected" to the printer CUPS_SC_CMD_GET_DEVICE_ID Return the IEEE-1284 device ID CUPS_SC_CMD_GET_STATE Return the device state -CUPS_SC_CMD_SNMP_GET CUPS 1.4/Mac OS X 10.6 +CUPS_SC_CMD_SNMP_GET CUPS 1.4/OS X 10.6 Query an SNMP OID -CUPS_SC_CMD_SNMP_GET_NEXT CUPS 1.4/Mac OS X 10.6 +CUPS_SC_CMD_SNMP_GET_NEXT CUPS 1.4/OS X 10.6 Query the next SNMP OID CUPS_SC_CMD_SOFT_RESET Do a soft reset diff --git a/doc/help/api-httpipp.html b/doc/help/api-httpipp.html index 394be16cd..33e1672af 100644 --- a/doc/help/api-httpipp.html +++ b/doc/help/api-httpipp.html @@ -595,9 +595,9 @@ are server-oriented...">http_state_thttp_uri_status_t http_version_t ipp_attribute_t -ipp_copycb_t +ipp_copycb_t ipp_dstate_t ipp_finish_t ipp_iocb_t @@ -617,6 +617,7 @@ used to enumerate all of the addresses that are associated with a hostname. ">http_addrlist_shttp_credential_s +pollfd Constants
- http_auth_e
@@ -962,7 +963,7 @@ if (status == HTTP_CONTINUE) ippDelete(request);Functions
-CUPS 1.1.20/Mac OS X 10.4 cupsDoAuthentication
+CUPS 1.1.20/OS X 10.4 cupsDoAuthentication
Authenticate a request.
int cupsDoAuthentication (
@@ -1012,7 +1013,7 @@ status, prior to resubmitting your request.This function sends the IPP request to the specified server, retrying and authenticating as necessary. The request is freed with
-ippDelete
after receiving a valid IPP response.CUPS 1.3/Mac OS X 10.5 cupsDoIORequest
+CUPS 1.3/OS X 10.5 cupsDoIORequest
Do an IPP request with file descriptors.
ipp_t *cupsDoIORequest (
@@ -1093,7 +1094,7 @@ void cupsEncodeOptions (
This function adds operation, job, and then subscription attributes, in that order. Use the cupsEncodeOptions2() function to add attributes for a single group.
-CUPS 1.2/Mac OS X 10.5 cupsEncodeOptions2
+CUPS 1.2/OS X 10.5 cupsEncodeOptions2
Encode printer options into IPP attributes for a group.
void cupsEncodeOptions2 (
-
@@ -1119,7 +1120,7 @@ function multiple times for each group, or use cupsEncodeOptions() to add the standard groups.CUPS 1.4/Mac OS X 10.6 cupsGetDevices
+CUPS 1.4/OS X 10.6 cupsGetDevices
Get available printer devices.
ipp_status_t cupsGetDevices (
-
@@ -1155,7 +1156,7 @@ parameters provide comma-delimited lists of backends to include or omit from the request respectively.CUPS 1.1.20/Mac OS X 10.4 cupsGetFd
+CUPS 1.1.20/OS X 10.4 cupsGetFd
Get a file from the server.
http_status_t cupsGetFd (
@@ -1178,7 +1179,7 @@ the request respectively.This function returns
-HTTP_OK
when the file is successfully retrieved.CUPS 1.1.20/Mac OS X 10.4 cupsGetFile
+CUPS 1.1.20/OS X 10.4 cupsGetFile
Get a file from the server.
http_status_t cupsGetFile (
@@ -1201,7 +1202,7 @@ the request respectively.This function returns
-HTTP_OK
when the file is successfully retrieved.CUPS 1.4/Mac OS X 10.6 cupsGetResponse
+CUPS 1.4/OS X 10.6 cupsGetResponse
Get a response to an IPP request.
ipp_t *cupsGetResponse (
@@ -1230,13 +1231,13 @@ otherwise call httpFlush() to complete the response processing. ipp_status_t cupsLastError (void);Return Value
IPP status code from last request
-CUPS 1.2/Mac OS X 10.5 cupsLastErrorString
+CUPS 1.2/OS X 10.5 cupsLastErrorString
Return the last IPP status-message.
const char *cupsLastErrorString (void);
Return Value
status-message text from last request
-CUPS 1.1.20/Mac OS X 10.4 cupsPutFd
+CUPS 1.1.20/OS X 10.4 cupsPutFd
Put a file on the server.
http_status_t cupsPutFd (
successfully. -
@@ -1260,7 +1261,7 @@ const char *cupsLastErrorString (void);CUPS 1.1.20/Mac OS X 10.4 cupsPutFile
+CUPS 1.1.20/OS X 10.4 cupsPutFile
Put a file on the server.
http_status_t cupsPutFile (
-
@@ -1284,7 +1285,7 @@ successfully. successfully.CUPS 1.4/Mac OS X 10.6 cupsReadResponseData
+CUPS 1.4/OS X 10.6 cupsReadResponseData
Read additional data after the IPP response.
ssize_t cupsReadResponseData (
-
@@ -1308,7 +1309,7 @@ ssize_t cupsReadResponseData (
files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.CUPS 1.4/Mac OS X 10.6 cupsSendRequest
+CUPS 1.4/OS X 10.6 cupsSendRequest
Send an IPP request.
http_status_t cupsSendRequest (
-
@@ -1340,7 +1341,7 @@ Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the request is not freed.CUPS 1.4/Mac OS X 10.6 cupsWriteRequestData
+CUPS 1.4/OS X 10.6 cupsWriteRequestData
Write additional data after an IPP request.
http_status_t cupsWriteRequestData (
-
@@ -1364,7 +1365,7 @@ request is not freed. aftercupsStartDocument
to provide a document file.CUPS 1.5/Mac OS X 10.7 httpAddCredential
+CUPS 1.5/OS X 10.7 httpAddCredential
Allocates and adds a single credential to an array.
int httpAddCredential (
@@ -1387,7 +1388,7 @@ int httpAddCredential (
Use
-cupsArrayNew(NULL, NULL)
to create a credentials array.CUPS 1.2/Mac OS X 10.5 httpAddrAny
+CUPS 1.2/OS X 10.5 httpAddrAny
Check for the "any" address.
int httpAddrAny (
@@ -1400,7 +1401,7 @@ int httpAddrAny (
Return Value
1 if "any", 0 otherwise
-CUPS 1.2/Mac OS X 10.5 httpAddrEqual
+CUPS 1.2/OS X 10.5 httpAddrEqual
Compare two addresses.
int httpAddrEqual (
@@ -1416,7 +1417,7 @@ int httpAddrEqual (
Return Value
1 if equal, 0 if not
-CUPS 1.2/Mac OS X 10.5 httpAddrLength
+CUPS 1.2/OS X 10.5 httpAddrLength
Return the length of the address in bytes.
int httpAddrLength (
@@ -1429,7 +1430,7 @@ int httpAddrLength (
Return Value
Length in bytes
-CUPS 1.2/Mac OS X 10.5 httpAddrLocalhost
+CUPS 1.2/OS X 10.5 httpAddrLocalhost
Check for the local loopback address.
int httpAddrLocalhost (
@@ -1442,7 +1443,7 @@ int httpAddrLocalhost (
Return Value
1 if local host, 0 otherwise
-CUPS 1.2/Mac OS X 10.5 httpAddrLookup
+CUPS 1.2/OS X 10.5 httpAddrLookup
Lookup the hostname associated with the address.
char *httpAddrLookup (
@@ -1461,7 +1462,7 @@ char *httpAddrLookup (
Return Value
Host name
-CUPS 1.2/Mac OS X 10.5 httpAddrString
+CUPS 1.2/OS X 10.5 httpAddrString
Convert an address to a numeric string.
char *httpAddrString (
@@ -1480,7 +1481,7 @@ char *httpAddrString (
Return Value
Numeric address string
-CUPS 1.2/Mac OS X 10.5 httpAssembleURI
+CUPS 1.2/OS X 10.5 httpAssembleURI
Assemble a uniform resource identifier from its components.
@@ -1522,7 +1523,7 @@ place of traditional string functions whenever you need to create a URI string.
-CUPS 1.2/Mac OS X 10.5 httpAssembleURIf
+CUPS 1.2/OS X 10.5 httpAssembleURIf
Assemble a uniform resource identifier from its components with a formatted resource.
@@ -1595,7 +1596,7 @@ int httpCheck (
Return Value
0 = no data, 1 = data available
-CUPS 1.1.19/Mac OS X 10.3 httpClearCookie
+CUPS 1.1.19/OS X 10.3 httpClearCookie
Clear the cookie value(s).
void httpClearCookie (
@@ -1667,7 +1668,7 @@ void httpClose (
Return Value
New HTTP connection
-CUPS 1.5/Mac OS X 10.7 httpCopyCredentials
+CUPS 1.5/OS X 10.7 httpCopyCredentials
Copy the credentials associated with an encrypted connection.
@@ -1705,7 +1706,7 @@ char *httpDecode64 (
-
which provides buffer length arguments.CUPS 1.1.21/Mac OS X 10.4 httpDecode64_2
+CUPS 1.1.21/OS X 10.4 httpDecode64_2
Base64-decode a string.
char *httpDecode64_2 (
-
@@ -1761,7 +1762,7 @@ char *httpEncode64 (
which provides buffer length arguments.CUPS 1.1.21/Mac OS X 10.4 httpEncode64_2
+CUPS 1.1.21/OS X 10.4 httpEncode64_2
Base64-encode a string.
char *httpEncode64_2 (
@@ -1823,7 +1824,7 @@ void httpFlush (
- http
- Connection to server
-CUPS 1.2/Mac OS X 10.5 httpFlushWrite
+CUPS 1.2/OS X 10.5 httpFlushWrite
Flush data in write buffer.
int httpFlushWrite (
@@ -1863,7 +1864,7 @@ int httpGet (
Return Value
Status of call (0 = success)
-CUPS 1.3/Mac OS X 10.5 httpGetAuthString
+CUPS 1.3/OS X 10.5 httpGetAuthString
Get the current authorization string.
char *httpGetAuthString (
-
@@ -1883,7 +1884,7 @@ string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION value.CUPS 1.2/Mac OS X 10.5 httpGetBlocking
+CUPS 1.2/OS X 10.5 httpGetBlocking
Get the blocking/non-block state of a connection.
int httpGetBlocking (
@@ -1896,7 +1897,7 @@ int httpGetBlocking (
Return Value
1 if blocking, 0 if non-blocking
-CUPS 1.1.19/Mac OS X 10.3 httpGetCookie
+CUPS 1.1.19/OS X 10.3 httpGetCookie
Get any cookie data from the response.
const char *httpGetCookie (
@@ -1922,7 +1923,7 @@ const char *httpGetDateString (
Return Value
Date/time string
-CUPS 1.2/Mac OS X 10.5 httpGetDateString2
+CUPS 1.2/OS X 10.5 httpGetDateString2
Get a formatted date/time string from a time value.
const char *httpGetDateString2 (
@@ -1954,7 +1955,7 @@ time_t httpGetDateTime (
Return Value
UNIX time
-CUPS 1.2/Mac OS X 10.5 httpGetFd
+CUPS 1.2/OS X 10.5 httpGetFd
Get the file descriptor associated with a connection.
int httpGetFd (
@@ -1997,7 +1998,7 @@ struct hostent *httpGetHostByName (
Return Value
Host entry
-CUPS 1.2/Mac OS X 10.5 httpGetHostname
+CUPS 1.2/OS X 10.5 httpGetHostname
Get the FQDN for the connection or local system.
const char *httpGetHostname (
-
@@ -2042,7 +2043,7 @@ int httpGetLength (
2^31 - 1; use httpGetLength2() instead.CUPS 1.2/Mac OS X 10.5 httpGetLength2
+CUPS 1.2/OS X 10.5 httpGetLength2
Get the amount of data remaining from the content-length or transfer-encoding fields.
@@ -2074,7 +2075,7 @@ content larger than 2^31 - 1.
Return Value
HTTP state
-CUPS 1.2/Mac OS X 10.5 httpGetStatus
+CUPS 1.2/OS X 10.5 httpGetStatus
Get the status of the last HTTP request.
http_status_t httpGetStatus (
@@ -2109,7 +2110,7 @@ char *httpGetSubField (
Return Value
Value or NULL
-CUPS 1.2/Mac OS X 10.5 httpGetSubField2
+CUPS 1.2/OS X 10.5 httpGetSubField2
Get a sub-field value.
char *httpGetSubField2 (
-
@@ -2321,7 +2322,7 @@ int httpRead (
read more than 2GB of data.CUPS 1.2/Mac OS X 10.5 httpRead2
+CUPS 1.2/OS X 10.5 httpRead2
Read data from a HTTP connection.
ssize_t httpRead2 (
@@ -2404,7 +2405,7 @@ void httpSeparate (
This function is deprecated; use the httpSeparateURI() function instead.
-CUPS 1.1.21/Mac OS X 10.4 httpSeparate2
+CUPS 1.1.21/OS X 10.4 httpSeparate2
Separate a Universal Resource Identifier into its components.
@@ -2448,7 +2449,7 @@ void httpSeparate2 (
-
CUPS 1.2/Mac OS X 10.5 httpSeparateURI
+CUPS 1.2/OS X 10.5 httpSeparateURI
Separate a Universal Resource Identifier into its components.
@@ -2492,7 +2493,7 @@ components.
Return Value
Result of separation
-CUPS 1.3/Mac OS X 10.5 httpSetAuthString
+CUPS 1.3/OS X 10.5 httpSetAuthString
Set the current authorization string.
void httpSetAuthString (
-
@@ -2516,7 +2517,7 @@ HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(), httpHead(), httpOptions(), httpPost, or httpPut().CUPS 1.1.19/Mac OS X 10.3 httpSetCookie
+CUPS 1.1.19/OS X 10.3 httpSetCookie
Set the cookie value(s).
void httpSetCookie (
@@ -2530,7 +2531,7 @@ void httpSetCookie (
- cookie
- Cookie string
-CUPS 1.5/Mac OS X 10.7 httpSetCredentials
+CUPS 1.5/OS X 10.7 httpSetCredentials
Set the credentials associated with an encrypted connection.
@@ -2547,7 +2548,7 @@ int httpSetCredentials (
Return Value
Status of call (0 = success)
-CUPS 1.2/Mac OS X 10.5 httpSetExpect
+CUPS 1.2/OS X 10.5 httpSetExpect
Set the Expect: header in a request.
void httpSetExpect (
@@ -2582,7 +2583,7 @@ void httpSetField (
- value
- Value
-CUPS 1.2/Mac OS X 10.5 httpSetLength
+CUPS 1.2/OS X 10.5 httpSetLength
Set the content-length and content-encoding.
void httpSetLength (
@@ -2596,7 +2597,7 @@ void httpSetLength (
- length
- Length (0 for chunked)
-CUPS 1.5/Mac OS X 10.7 httpSetTimeout
+CUPS 1.5/OS X 10.7 httpSetTimeout
Set read/write timeouts and an optional callback.
void httpSetTimeout (
@@ -2667,7 +2668,7 @@ int httpTrace (
Return Value
HTTP status
-CUPS 1.1.19/Mac OS X 10.3 httpWait
+CUPS 1.1.19/OS X 10.3 httpWait
Wait for data available on a connection.
int httpWait (
-
@@ -2707,7 +2708,7 @@ int httpWrite (
write more than 2GB of data.CUPS 1.2/Mac OS X 10.5 httpWrite2
+CUPS 1.2/OS X 10.5 httpWrite2
Write data to a HTTP connection.
ssize_t httpWrite2 (
-
@@ -2791,7 +2792,7 @@ Thegroup
parameter specifies the IPP attribute group tag: none event notification (IPP_TAG_EVENT_NOTIFICATION
), operation (IPP_TAG_OPERATION
), printer (IPP_TAG_PRINTER
), subscription (IPP_TAG_SUBSCRIPTION
), or unsupported (IPP_TAG_UNSUPPORTED_GROUP
).CUPS 1.1.19/Mac OS X 10.3 ippAddCollection
+CUPS 1.1.19/OS X 10.3 ippAddCollection
Add a collection value.
ipp_attribute_t *ippAddCollection (
-
@@ -2824,7 +2825,7 @@ event notification (IPP_TAG_EVENT_NOTIFICATION
), operation (IPP_TAG_SUBSCRIPTION
), or unsupported (IPP_TAG_UNSUPPORTED_GROUP
).CUPS 1.1.19/Mac OS X 10.3 ippAddCollections
+CUPS 1.1.19/OS X 10.3 ippAddCollections
Add an array of collection values.
ipp_attribute_t *ippAddCollections (
-
@@ -2968,7 +2969,7 @@ event notification (IPP_TAG_EVENT_NOTIFICATION
), operation
Supported values include enum (IPP_TAG_ENUM
) and integer (IPP_TAG_INTEGER
).CUPS 1.2/Mac OS X 10.5 ippAddOctetString
+CUPS 1.2/OS X 10.5 ippAddOctetString
Add an octetString value to an IPP message.
ipp_attribute_t *ippAddOctetString (
-
@@ -3004,7 +3005,7 @@ event notification (IPP_TAG_EVENT_NOTIFICATION
), operation (IPP_TAG_SUBSCRIPTION
), or unsupported (IPP_TAG_UNSUPPORTED_GROUP
).CUPS 1.6 ippAddOutOfBand
+CUPS 1.6/OS X 10.8 ippAddOutOfBand
Add an out-of-band value to an IPP message.
ipp_attribute_t *ippAddOutOfBand (
-
@@ -3306,7 +3307,7 @@ Supported string values include charset (IPP_TAG_CHARSET
), keyword
Thelanguage
parameter must be non-NULL
for nameWithLanguage and textWithLanguage string values and must beNULL
for all other string values.CUPS 1.6 ippAttributeString
+CUPS 1.6/OS X 10.8 ippAttributeString
Convert the attribute's value to a string.
size_t ippAttributeString (
-
@@ -3331,7 +3332,7 @@ trailing nul. The buffer pointer can be NULL to get the required length, just like (v)snprintf.CUPS 1.6 ippCopyAttribute
+CUPS 1.6/OS X 10.8 ippCopyAttribute
Copy an attribute.
ipp_attribute_t *ippCopyAttribute (
-
@@ -3357,7 +3358,7 @@ created - this should only be done as long as the original source IPP message wi not be freed for the life of the destination.CUPS 1.6 ippCopyAttributes
+CUPS 1.6/OS X 10.8 ippCopyAttributes
Copy attributes from one IPP message to another.
int ippCopyAttributes (
@@ -3419,7 +3420,7 @@ void ippDelete (
- ipp
- IPP message
-CUPS 1.1.19/Mac OS X 10.3 ippDeleteAttribute
+CUPS 1.1.19/OS X 10.3 ippDeleteAttribute
Delete a single attribute in an IPP message.
void ippDeleteAttribute (
@@ -3433,7 +3434,7 @@ void ippDeleteAttribute (
- attr
- Attribute to delete
-CUPS 1.6 ippDeleteValues
+CUPS 1.6/OS X 10.8 ippDeleteValues
Delete values in an attribute.
int ippDeleteValues (
@@ -3509,7 +3510,7 @@ const char *ippErrorString (
Return Value
Text string
-CUPS 1.2/Mac OS X 10.5 ippErrorValue
+CUPS 1.2/OS X 10.5 ippErrorValue
Return a status code for the given name.
ipp_status_t ippErrorValue (
@@ -3560,7 +3561,7 @@ ipp_status_t ippErrorValue (
Return Value
Matching attribute
-CUPS 1.6 ippFirstAttribute
+CUPS 1.6/OS X 10.8 ippFirstAttribute
Return the first attribute in the message.
ipp_attribute_t *ippFirstAttribute (
@@ -3573,7 +3574,7 @@ ipp_status_t ippErrorValue (
Return Value
First attribute or
-NULL
if noneCUPS 1.6 ippGetBoolean
+CUPS 1.6/OS X 10.8 ippGetBoolean
Get a boolean value for an attribute.
int ippGetBoolean (
-
@@ -3594,7 +3595,7 @@ int ippGetBoolean (
ippGetCount(attr)
- 1.CUPS 1.6 ippGetCollection
+CUPS 1.6/OS X 10.8 ippGetCollection
Get a collection value for an attribute.
ipp_t *ippGetCollection (
-
@@ -3615,7 +3616,7 @@ int ippGetBoolean (
ippGetCount(attr)
- 1.CUPS 1.6 ippGetCount
+CUPS 1.6/OS X 10.8 ippGetCount
Get the number of values in an attribute.
int ippGetCount (
@@ -3628,7 +3629,7 @@ int ippGetCount (
Return Value
Number of values or -1 on error
-CUPS 1.6 ippGetDate
+CUPS 1.6/OS X 10.8 ippGetDate
Get a date value for an attribute.
const ipp_uchar_t *ippGetDate (
-
@@ -3649,7 +3650,7 @@ const ipp_uchar_t *ippGetDate (
ippGetCount(attr)
- 1.CUPS 1.6 ippGetGroupTag
+CUPS 1.6/OS X 10.8 ippGetGroupTag
Get the group associated with an attribute.
ipp_tag_t ippGetGroupTag (
@@ -3662,7 +3663,7 @@ ipp_tag_t ippGetGroupTag (
Return Value
Group tag or
-IPP_TAG_ZERO
on errorCUPS 1.6 ippGetInteger
+CUPS 1.6/OS X 10.8 ippGetInteger
Get the integer/enum value for an attribute.
int ippGetInteger (
-
@@ -3683,7 +3684,7 @@ int ippGetInteger (
ippGetCount(attr)
- 1.CUPS 1.6 ippGetName
+CUPS 1.6/OS X 10.8 ippGetName
Get the attribute name.
const char *ippGetName (
@@ -3696,7 +3697,7 @@ const char *ippGetName (
Return Value
Attribute name or
-NULL
for separatorsCUPS 1.6 ippGetOperation
+CUPS 1.6/OS X 10.8 ippGetOperation
Get the operation ID in an IPP message.
ipp_op_t ippGetOperation (
@@ -3709,7 +3710,7 @@ ipp_op_t ippGetOperation (
Return Value
Operation ID or -1 on error
-CUPS 1.6 ippGetRange
+CUPS 1.6/OS X 10.8 ippGetRange
Get a rangeOfInteger value from an attribute.
int ippGetRange (
-
@@ -3733,7 +3734,7 @@ int ippGetRange (
ippGetCount(attr)
- 1.CUPS 1.6 ippGetRequestId
+CUPS 1.6/OS X 10.8 ippGetRequestId
Get the request ID from an IPP message.
int ippGetRequestId (
@@ -3746,7 +3747,7 @@ int ippGetRequestId (
Return Value
Request ID or -1 on error
-CUPS 1.6 ippGetResolution
+CUPS 1.6/OS X 10.8 ippGetResolution
Get a resolution value for an attribute.
int ippGetResolution (
-
@@ -3773,7 +3774,7 @@ int ippGetResolution (
ippGetCount(attr)
- 1.CUPS 1.6 ippGetState
+CUPS 1.6/OS X 10.8 ippGetState
Get the IPP message state.
ipp_state_t ippGetState (
@@ -3786,7 +3787,7 @@ int ippGetResolution (
Return Value
IPP message state value
-CUPS 1.6 ippGetStatusCode
+CUPS 1.6/OS X 10.8 ippGetStatusCode
Get the status code from an IPP response or event message.
ipp_status_t ippGetStatusCode (
-
@@ -3822,7 +3823,7 @@ const char *ippGetString (
ippGetCount(attr)
- 1.CUPS 1.6 ippGetValueTag
+CUPS 1.6/OS X 10.8 ippGetValueTag
Get the value tag for an attribute.
ipp_tag_t ippGetValueTag (
@@ -3835,7 +3836,7 @@ ipp_tag_t ippGetValueTag (
Return Value
Value tag or
-IPP_TAG_ZERO
on errorCUPS 1.6 ippGetVersion
+CUPS 1.6/OS X 10.8 ippGetVersion
Get the major and minor version number from an IPP message.
int ippGetVersion (
@@ -3870,7 +3871,7 @@ size_t ippLength (
ipp_t *ippNew (void);Return Value
New IPP message
-CUPS 1.2/Mac OS X 10.5 ippNewRequest
+CUPS 1.2/OS X 10.5 ippNewRequest
Allocate a new IPP request message.
ipp_t *ippNewRequest (
-
@@ -3889,7 +3890,7 @@ attributes-natural-language attributes added. The attributes-natural-language value is derived from the current locale.CUPS 1.6 ippNextAttribute
+CUPS 1.6/OS X 10.8 ippNextAttribute
Return the next attribute in the message.
ipp_attribute_t *ippNextAttribute (
@@ -3902,7 +3903,7 @@ attributes-natural-language value is derived from the current locale.Return Value
Next attribute or
-NULL
if noneCUPS 1.2/Mac OS X 10.5 ippOpString
+CUPS 1.2/OS X 10.5 ippOpString
Return a name for the given operation id.
const char *ippOpString (
@@ -3915,7 +3916,7 @@ const char *ippOpString (
Return Value
Name
-CUPS 1.2/Mac OS X 10.5 ippOpValue
+CUPS 1.2/OS X 10.5 ippOpValue
Return an operation id for the given name.
ipp_op_t ippOpValue (
@@ -3950,7 +3951,7 @@ int ippPort (void);Return Value
Current state
-CUPS 1.1.19/Mac OS X 10.3 ippReadFile
+CUPS 1.1.19/OS X 10.3 ippReadFile
Read data for an IPP message from a file.
ipp_state_t ippReadFile (
@@ -3966,7 +3967,7 @@ int ippPort (void);Return Value
Current state
-CUPS 1.2/Mac OS X 10.5 ippReadIO
+CUPS 1.2/OS X 10.5 ippReadIO
Read data for an IPP message.
ipp_state_t ippReadIO (
@@ -3991,7 +3992,7 @@ int ippPort (void);Return Value
Current state
-CUPS 1.6 ippSetBoolean
+CUPS 1.6/OS X 10.8 ippSetBoolean
Set a boolean value in an attribute.
int ippSetBoolean (
-
@@ -4023,7 +4024,7 @@ Theelement
parameter specifies which value to set from 0 toippGetCount(attr)
.CUPS 1.6 ippSetCollection
+CUPS 1.6/OS X 10.8 ippSetCollection
Set a collection value in an attribute.
int ippSetCollection (
-
@@ -4055,7 +4056,7 @@ Theelement
parameter specifies which value to set from 0 toippGetCount(attr)
.CUPS 1.6 ippSetDate
+CUPS 1.6/OS X 10.8 ippSetDate
Set a date value in an attribute.
int ippSetDate (
-
@@ -4087,7 +4088,7 @@ Theelement
parameter specifies which value to set from 0 toippGetCount(attr)
.CUPS 1.6 ippSetGroupTag
+CUPS 1.6/OS X 10.8 ippSetGroupTag
Set the group tag of an attribute.
int ippSetGroupTag (
-
@@ -4119,7 +4120,7 @@ event notification (IPP_TAG_EVENT_NOTIFICATION
), operation (IPP_TAG_SUBSCRIPTION
), or unsupported (IPP_TAG_UNSUPPORTED_GROUP
).CUPS 1.6 ippSetInteger
+CUPS 1.6/OS X 10.8 ippSetInteger
Set an integer or enum value in an attribute.
int ippSetInteger (
-
@@ -4151,7 +4152,7 @@ Theelement
parameter specifies which value to set from 0 toippGetCount(attr)
.CUPS 1.6 ippSetName
+CUPS 1.6/OS X 10.8 ippSetName
Set the name of an attribute.
int ippSetName (
-
@@ -4177,7 +4178,7 @@ previously created using theippNew
or attr parameter may be modified as a result of setting the value.CUPS 1.6 ippSetOperation
+CUPS 1.6/OS X 10.8 ippSetOperation
Set the operation ID in an IPP request message.
int ippSetOperation (
@@ -4209,7 +4210,7 @@ void ippSetPort (
- p
- Port number to use
-CUPS 1.6 ippSetRange
+CUPS 1.6/OS X 10.8 ippSetRange
Set a rangeOfInteger value in an attribute.
int ippSetRange (
-
@@ -4244,7 +4245,7 @@ Theelement
parameter specifies which value to set from 0 toippGetCount(attr)
.CUPS 1.6 ippSetRequestId
+CUPS 1.6/OS X 10.8 ippSetRequestId
Set the request ID in an IPP message.
int ippSetRequestId (
-
@@ -4267,7 +4268,7 @@ int ippSetRequestId (
Therequest_id
parameter must be greater than 0.CUPS 1.6 ippSetResolution
+CUPS 1.6/OS X 10.8 ippSetResolution
Set a resolution value in an attribute.
int ippSetResolution (
-
@@ -4305,7 +4306,7 @@ Theelement
parameter specifies which value to set from 0 toippGetCount(attr)
.CUPS 1.6 ippSetState
+CUPS 1.6/OS X 10.8 ippSetState
Set the current state of the IPP message.
int ippSetState (
@@ -4321,7 +4322,7 @@ int ippSetState (
Return Value
1 on success, 0 on failure
-CUPS 1.6 ippSetStatusCode
+CUPS 1.6/OS X 10.8 ippSetStatusCode
Set the status code in an IPP response or event message.
int ippSetStatusCode (
-
@@ -4342,7 +4343,7 @@ int ippSetStatusCode (
ippNew
orippNewRequest
functions.CUPS 1.6 ippSetString
+CUPS 1.6/OS X 10.8 ippSetString
Set a string value in an attribute.
int ippSetString (
-
@@ -4374,7 +4375,7 @@ Theelement
parameter specifies which value to set from 0 toippGetCount(attr)
.CUPS 1.6 ippSetValueTag
+CUPS 1.6/OS X 10.8 ippSetValueTag
Set the value tag of an attribute.
int ippSetValueTag (
-
@@ -4412,7 +4413,7 @@ code in the "attributes-natural-language" attribute or, if not present code for the current locale.CUPS 1.6 ippSetVersion
+CUPS 1.6/OS X 10.8 ippSetVersion
Set the version number in an IPP message.
int ippSetVersion (
-
@@ -4438,7 +4439,7 @@ int ippSetVersion (
The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2.CUPS 1.4/Mac OS X 10.6 ippTagString
+CUPS 1.4/OS X 10.6 ippTagString
Return the tag name corresponding to a tag value.
const char *ippTagString (
@@ -4455,7 +4456,7 @@ const char *ippTagString (
The returned names are defined in RFC 2911 and 3382.
-CUPS 1.4/Mac OS X 10.6 ippTagValue
+CUPS 1.4/OS X 10.6 ippTagValue
Return the tag value corresponding to a tag name.
ipp_tag_t ippTagValue (
@@ -4501,7 +4502,7 @@ const ipp_uchar_t *ippTimeToDate (
Return Value
Current state
-CUPS 1.1.19/Mac OS X 10.3 ippWriteFile
+CUPS 1.1.19/OS X 10.3 ippWriteFile
Write data for an IPP message to a file.
ipp_state_t ippWriteFile (
@@ -4517,7 +4518,7 @@ const ipp_uchar_t *ippTimeToDate (
Return Value
Current state
-CUPS 1.2/Mac OS X 10.5 ippWriteIO
+CUPS 1.2/OS X 10.5 ippWriteIO
Write data for an IPP message.
ipp_state_t ippWriteIO (
@@ -4548,7 +4549,7 @@ const ipp_uchar_t *ippTimeToDate (
typedef struct gss_auth_identity gss_auth_identity_desc;
-CUPS 1.2/Mac OS X 10.5 http_addr_t
+CUPS 1.2/OS X 10.5 http_addr_t
Socket address union, which makes using IPv6 and other address types easier and @@ -4556,7 +4557,7 @@ more portable.
typedef union _http_addr_u / http_addr_t;
-CUPS 1.2/Mac OS X 10.5 http_addrlist_t
+CUPS 1.2/OS X 10.5 http_addrlist_t
Socket address list, which is used to enumerate all of the addresses that are associated @@ -4569,7 +4570,7 @@ typedef struct http_addrlist_s / http_addrlist_t;
typedef enum http_auth_e http_auth_t;
-CUPS 1.5/Mac OS X 10.7 http_credential_t
+CUPS 1.5/OS X 10.7 http_credential_t
HTTP credential data
typedef struct http_credential_s http_credential_t; @@ -4610,7 +4611,7 @@ typedef enum http_status_e http_status_t;
typedef struct _http_s http_t;
-CUPS 1.5/Mac OS X 10.7 http_timeout_cb_t
+CUPS 1.5/OS X 10.7 http_timeout_cb_t
HTTP timeout callback
typedef int (*http_timeout_cb_t)(http_t *http, void *user_data); @@ -4636,9 +4637,9 @@ typedef enum http_version_e http_version_t; typedef struct _ipp_attribute_s ipp_attribute_t;
ipp_copycb_t
-The following structures are PRIVATE starting with CUPS 1.6. Please use the -new accessor functions available in CUPS 1.6 and later, as these definitions -will be moved to a private header file in a future release.
+The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8. +Please use the new accessor functions available in CUPS 1.6 and later, as +these definitions will be moved to a private header file in a future release.
typedef int (*ipp_copycb_t)(void *context, ipp_t *dst, ipp_attribute_t *attr);
@@ -4652,7 +4653,7 @@ typedef enum ipp_dstate_e ipp_dstate_t;typedef enum ipp_finish_e ipp_finish_t;
-CUPS 1.2/Mac OS X 10.5 ipp_iocb_t
+CUPS 1.2/OS X 10.5 ipp_iocb_t
IPP IO Callback Function
typedef ssize_t (*ipp_iocb_t)(void *context, ipp_uchar_t *buffer, size_t bytes); @@ -4717,7 +4718,7 @@ typedef unsigned char ipp_uchar_t;
- type
- username
-CUPS 1.2/Mac OS X 10.5 http_addrlist_s
+CUPS 1.2/OS X 10.5 http_addrlist_s
Socket address list, which is used to enumerate all of the addresses that are associated @@ -4733,7 +4734,7 @@ with a hostname.
- next
- Pointer to next address in list
-CUPS 1.5/Mac OS X 10.7 http_credential_s
+CUPS 1.5/OS X 10.7 http_credential_s
HTTP credential data
struct http_credential_s {
void *data;
@@ -4746,6 +4747,17 @@ with a hostname.- datalen
- Credential length
+pollfd
+User data (unused)
+struct pollfd *pollfds, unsigned int num_pollfds, int timeout, void *context) {
+
+ void) context;
+ void) timeout;
+};Members
++
- context
+- timeout
+Constants
http_auth_e
HTTP authentication types
@@ -4761,7 +4773,7 @@ with a hostname.- MD5-session authentication in use
- HTTP_AUTH_MD5_SESS_INT
- MD5-session authentication in use for body
-- HTTP_AUTH_NEGOTIATE CUPS 1.3/Mac OS X 10.5
+- HTTP_AUTH_NEGOTIATE CUPS 1.3/OS X 10.5
- GSSAPI authentication in use
- HTTP_AUTH_NONE
- No authentication in use
@@ -4954,7 +4966,7 @@ are server-oriented...- Only a partial file was recieved/sent
- HTTP_PAYMENT_REQUIRED
- Payment required
-- HTTP_PKI_ERROR CUPS 1.5/Mac OS X 10.7
+- HTTP_PKI_ERROR CUPS 1.5/OS X 10.7
- Error negotiating a secure connection
- HTTP_PRECONDITION
- Precondition failed
@@ -5162,7 +5174,7 @@ are server-oriented...- Add or modify a class
- CUPS_ADD_MODIFY_PRINTER
- Add or modify a printer
-- CUPS_AUTHENTICATE_JOB CUPS 1.2/Mac OS X 10.5
+- CUPS_AUTHENTICATE_JOB CUPS 1.2/OS X 10.5
- Authenticate a job
- CUPS_DELETE_CLASS
- Delete a class
@@ -5174,9 +5186,9 @@ are server-oriented...- Get the default printer
- CUPS_GET_DEVICES
- Get a list of supported devices
-- CUPS_GET_DOCUMENT CUPS 1.4/Mac OS X 10.6
+- CUPS_GET_DOCUMENT CUPS 1.4/OS X 10.6
- Get a document file
-- CUPS_GET_PPD CUPS 1.3/Mac OS X 10.5
+- CUPS_GET_PPD CUPS 1.3/OS X 10.5
- Get a PPD file
- CUPS_GET_PPDS
- Get a list of supported drivers
@@ -5194,15 +5206,15 @@ are server-oriented...- Cancel-Jobs
- IPP_CANCEL_MY_JOBS
- Cancel-My-Jobs
-- IPP_CANCEL_SUBSCRIPTION CUPS 1.2/Mac OS X 10.5
+- IPP_CANCEL_SUBSCRIPTION CUPS 1.2/OS X 10.5
- Cancel a subscription
- IPP_CLOSE_JOB
- Close-Job
- IPP_CREATE_JOB
- Create an empty print job
-- IPP_CREATE_JOB_SUBSCRIPTION CUPS 1.2/Mac OS X 10.5
+- IPP_CREATE_JOB_SUBSCRIPTION CUPS 1.2/OS X 10.5
- Create a job subscription
-- IPP_CREATE_PRINTER_SUBSCRIPTION CUPS 1.2/Mac OS X 10.5
+- IPP_CREATE_PRINTER_SUBSCRIPTION CUPS 1.2/OS X 10.5
- Create a printer subscription
- IPP_DISABLE_PRINTER
- Stop a printer
@@ -5212,15 +5224,15 @@ are server-oriented...- Get a list of jobs
- IPP_GET_JOB_ATTRIBUTES
- Get job attributes
-- IPP_GET_NOTIFICATIONS CUPS 1.2/Mac OS X 10.5
+- IPP_GET_NOTIFICATIONS CUPS 1.2/OS X 10.5
- Get notification events
- IPP_GET_PRINTER_ATTRIBUTES
- Get printer attributes
- IPP_GET_PRINTER_SUPPORTED_VALUES
- Get supported attribute values
-- IPP_GET_SUBSCRIPTIONS CUPS 1.2/Mac OS X 10.5
+- IPP_GET_SUBSCRIPTIONS CUPS 1.2/OS X 10.5
- Get list of subscriptions
-- IPP_GET_SUBSCRIPTION_ATTRIBUTES CUPS 1.2/Mac OS X 10.5
+- IPP_GET_SUBSCRIPTION_ATTRIBUTES CUPS 1.2/OS X 10.5
- Get subscription attributes
- IPP_HOLD_JOB
- Hold a job for printing
@@ -5236,7 +5248,7 @@ are server-oriented...- Cancel all jobs
- IPP_RELEASE_JOB
- Release a job for printing
-- IPP_RENEW_SUBSCRIPTION CUPS 1.2/Mac OS X 10.5
+- IPP_RENEW_SUBSCRIPTION CUPS 1.2/OS X 10.5
- Renew a printer subscription
- IPP_RESTART_JOB
- Reprint a job
@@ -5322,7 +5334,7 @@ are server-oriented...- client-error-attributes-or-values-not-supported
- IPP_ATTRIBUTES_NOT_SETTABLE
- client-error-attributes-not-settable
-- IPP_AUTHENTICATION_CANCELED CUPS 1.5/Mac OS X 10.7
+- IPP_AUTHENTICATION_CANCELED CUPS 1.5/OS X 10.7
- Authentication canceled by user
- IPP_BAD_REQUEST
- client-error-bad-request
@@ -5386,7 +5398,7 @@ are server-oriented...- successful-ok-too-many-events
- IPP_OPERATION_NOT_SUPPORTED
- server-error-operation-not-supported
-- IPP_PKI_ERROR CUPS 1.5/Mac OS X 10.7
+- IPP_PKI_ERROR CUPS 1.5/OS X 10.7
- Error negotiating a secure connection
- IPP_PRINTER_BUSY
- server-error-busy
diff --git a/doc/help/api-ppd.html b/doc/help/api-ppd.html index 574640692..d01626182 100644 --- a/doc/help/api-ppd.html +++ b/doc/help/api-ppd.html @@ -345,7 +345,7 @@ div.contents ul.subcontents li { PPD API header for CUPS. - Copyright 2008-2011 by Apple Inc. + Copyright 2008-2012 by Apple Inc. These coded instructions, statements, and computer programs are the property of Apple Inc. and are protected by Federal copyright @@ -356,7 +356,7 @@ div.contents ul.subcontents li {PPD API (DEPRECATED)
-The PPD API is deprecated starting in CUPS 1.6. Please use the new Job Ticket APIs in the CUPS API documentation. These functions will be removed in a future release of CUPS.+The PPD API is deprecated starting in CUPS 1.6/OS X 10.8. Please use the new Job Ticket APIs in the CUPS API documentation. These functions will be removed in a future release of CUPS.@@ -490,7 +490,7 @@ conflicts.">ppdMarkOption PPD API introduction for CUPS. - Copyright 2007-2011 by Apple Inc. + Copyright 2007-2012 by Apple Inc. Copyright 1997-2006 by Easy Software Products, all rights reserved. These coded instructions, statements, and computer programs are the @@ -502,7 +502,7 @@ conflicts.">ppdMarkOption
Overview
-The PPD API is deprecated starting in CUPS 1.6. Please use the new Job Ticket APIs in the CUPS API documentation. These functions will be removed in a future release of CUPS.+The PPD API is deprecated starting in CUPS 1.6/OS X 10.8. Please use the new Job Ticket APIs in the CUPS API documentation. These functions will be removed in a future release of CUPS.The CUPS PPD API provides read-only access the data in PostScript Printer Description ("PPD") files which are used for all printers with a driver. With @@ -705,7 +705,7 @@ for (attr = ppdFindAttr(ppd, "Product", NULL); puts(attr->value);
Functions
-CUPS 1.4/Mac OS X 10.6 cupsGetConflicts
+CUPS 1.4/OS X 10.6 cupsGetConflicts
Get a list of conflicting options in a marked PPD.
int cupsGetConflicts (
-
@@ -762,7 +762,7 @@ int cupsMarkOptions (
"multiple-document-handling", "output-bin", "print-color-mode", "print-quality", "printer-resolution", and "sides" attributes to their corresponding PPD options and choices.CUPS 1.4/Mac OS X 10.6 cupsResolveConflicts
+CUPS 1.4/OS X 10.6 cupsResolveConflicts
Resolve conflicts in a marked PPD.
int cupsResolveConflicts (
@@ -854,7 +854,7 @@ int ppdCollect (
Discussion
The choices array should be freed using
-free
when you are finished with it.CUPS 1.2/Mac OS X 10.5 ppdCollect2
+CUPS 1.2/OS X 10.5 ppdCollect2
Collect all marked options that reside in the specified section and minimum order.
@@ -917,7 +917,7 @@ int ppdEmit (
Return Value
0 on success, -1 on failure
-CUPS 1.2/Mac OS X 10.5 ppdEmitAfterOrder
+CUPS 1.2/OS X 10.5 ppdEmitAfterOrder
Emit a subset of the code for marked options to a file.
int ppdEmitAfterOrder (
@@ -993,7 +993,7 @@ int ppdEmitJCL (
Return Value
0 on success, -1 on failure
-CUPS 1.2/Mac OS X 10.5 ppdEmitJCLEnd
+CUPS 1.2/OS X 10.5 ppdEmitJCLEnd
Emit JCLEnd code to a file.
int ppdEmitJCLEnd (
@@ -1009,7 +1009,7 @@ int ppdEmitJCLEnd (
Return Value
0 on success, -1 on failure
-CUPS 1.2/Mac OS X 10.5 ppdEmitString
+CUPS 1.2/OS X 10.5 ppdEmitString
Get a string containing the code for marked options.
char *ppdEmitString (
-
@@ -1038,7 +1038,7 @@ The return string is allocated on the heap and should be freed usingfree
when you are done with it.CUPS 1.1.19/Mac OS X 10.3 ppdErrorString
+CUPS 1.1.19/OS X 10.3 ppdErrorString
Returns the text assocated with a status.
const char *ppdErrorString (
@@ -1051,7 +1051,7 @@ const char *ppdErrorString (
Return Value
Status string
-CUPS 1.1.19/Mac OS X 10.3 ppdFindAttr
+CUPS 1.1.19/OS X 10.3 ppdFindAttr
Find the first matching attribute.
ppd_attr_t *ppdFindAttr (
@@ -1086,7 +1086,7 @@ const char *ppdErrorString (
Return Value
Choice pointer or
-NULL
CUPS 1.2/Mac OS X 10.5 ppdFindCustomOption
+CUPS 1.2/OS X 10.5 ppdFindCustomOption
Find a custom option.
ppd_coption_t *ppdFindCustomOption (
@@ -1102,7 +1102,7 @@ const char *ppdErrorString (
Return Value
Custom option or NULL
-CUPS 1.2/Mac OS X 10.5 ppdFindCustomParam
+CUPS 1.2/OS X 10.5 ppdFindCustomParam
Find a parameter for a custom option.
ppd_cparam_t *ppdFindCustomParam (
@@ -1134,7 +1134,7 @@ const char *ppdErrorString (
Return Value
Pointer to choice or
-NULL
CUPS 1.1.19/Mac OS X 10.3 ppdFindNextAttr
+CUPS 1.1.19/OS X 10.3 ppdFindNextAttr
Find the next matching attribute.
ppd_attr_t *ppdFindNextAttr (
@@ -1169,7 +1169,7 @@ const char *ppdErrorString (
Return Value
Pointer to option or
-NULL
CUPS 1.2/Mac OS X 10.5 ppdFirstCustomParam
+CUPS 1.2/OS X 10.5 ppdFirstCustomParam
Return the first parameter for a custom option.
ppd_cparam_t *ppdFirstCustomParam (
@@ -1182,7 +1182,7 @@ const char *ppdErrorString (
Return Value
Custom parameter or NULL
-CUPS 1.2/Mac OS X 10.5 ppdFirstOption
+CUPS 1.2/OS X 10.5 ppdFirstOption
Return the first option in the PPD file.
ppd_option_t *ppdFirstOption (
@@ -1199,7 +1199,7 @@ const char *ppdErrorString (
Options are returned from all groups in ascending alphanumeric order.
-CUPS 1.4/Mac OS X 10.6 ppdInstallableConflict
+CUPS 1.4/OS X 10.6 ppdInstallableConflict
Test whether an option choice conflicts with an installable option.
@@ -1243,7 +1243,7 @@ int ppdIsMarked (
Return Value
Non-zero if option is marked
-CUPS 1.1.19/Mac OS X 10.3 ppdLastError
+CUPS 1.1.19/OS X 10.3 ppdLastError
Return the status from the last ppdOpen*().
ppd_status_t ppdLastError (
@@ -1256,7 +1256,7 @@ int ppdIsMarked (
Return Value
Status code
-CUPS 1.2/Mac OS X 10.5 ppdLocalize
+CUPS 1.2/OS X 10.5 ppdLocalize
Localize the PPD file to the current locale.
int ppdLocalize (
@@ -1298,7 +1298,7 @@ localized string uses the UTF-8 character encoding.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.
-CUPS 1.3/Mac OS X 10.5 ppdLocalizeIPPReason
+CUPS 1.3/OS X 10.5 ppdLocalizeIPPReason
Get the localized version of a cupsIPPReason attribute.
@@ -1333,7 +1333,7 @@ string or attribute value. Otherwise the corresponding URI is returned.
-
If no value of the requested scheme can be found, NULL is returned.CUPS 1.4/Mac OS X 10.6 ppdLocalizeMarkerName
+CUPS 1.4/OS X 10.6 ppdLocalizeMarkerName
Get the localized version of a marker-names attribute value.
@@ -1387,7 +1387,7 @@ int ppdMarkOption (
Return Value
Number of conflicts
-CUPS 1.2/Mac OS X 10.5 ppdNextCustomParam
+CUPS 1.2/OS X 10.5 ppdNextCustomParam
Return the next parameter for a custom option.
ppd_cparam_t *ppdNextCustomParam (
@@ -1400,7 +1400,7 @@ int ppdMarkOption (
Return Value
Custom parameter or NULL
-CUPS 1.2/Mac OS X 10.5 ppdNextOption
+CUPS 1.2/OS X 10.5 ppdNextOption
Return the next option in the PPD file.
ppd_option_t *ppdNextOption (
@@ -1430,7 +1430,7 @@ int ppdMarkOption (
Return Value
PPD file record
-CUPS 1.2/Mac OS X 10.5 ppdOpen2
+CUPS 1.2/OS X 10.5 ppdOpen2
Read a PPD file into memory.
ppd_file_t *ppdOpen2 (
@@ -1501,7 +1501,7 @@ float ppdPageLength (
Return Value
Size record for page or NULL
-CUPS 1.4/Mac OS X 10.6 ppdPageSizeLimits
+CUPS 1.4/OS X 10.6 ppdPageSizeLimits
Return the custom page size limits.
int ppdPageSizeLimits (
@@ -1544,7 +1544,7 @@ float ppdPageWidth (
Return Value
Width of page in points or 0.0
-CUPS 1.1.20/Mac OS X 10.4 ppdSetConformance
+CUPS 1.1.20/OS X 10.4 ppdSetConformance
Set the conformance level for PPD files.
void ppdSetConformance (
@@ -1556,7 +1556,7 @@ void ppdSetConformance (
- Conformance level
Data Types
-CUPS 1.1.19/Mac OS X 10.3 ppd_attr_t
+CUPS 1.1.19/OS X 10.3 ppd_attr_t
PPD Attribute Structure
typedef struct ppd_attr_s ppd_attr_t; @@ -1566,7 +1566,7 @@ typedef struct ppd_attr_s ppd_attr_t;
typedef struct ppd_choice_s ppd_choice_t;
-CUPS 1.1.19/Mac OS X 10.3 ppd_conform_t
+CUPS 1.1.19/OS X 10.3 ppd_conform_t
Conformance Levels
typedef enum ppd_conform_e ppd_conform_t; @@ -1576,27 +1576,27 @@ typedef enum ppd_conform_e ppd_conform_t;
typedef struct ppd_const_s ppd_const_t;
-CUPS 1.2/Mac OS X 10.5 ppd_coption_t
+CUPS 1.2/OS X 10.5 ppd_coption_t
Custom Option
typedef struct ppd_coption_s ppd_coption_t;
-CUPS 1.2/Mac OS X 10.5 ppd_cparam_t
+CUPS 1.2/OS X 10.5 ppd_cparam_t
Custom Parameter
typedef struct ppd_cparam_s ppd_cparam_t;
-CUPS 1.2/Mac OS X 10.5 ppd_cplimit_t
+CUPS 1.2/OS X 10.5 ppd_cplimit_t
Custom Parameter Limit
typedef union ppd_cplimit_u ppd_cplimit_t;
-CUPS 1.2/Mac OS X 10.5 ppd_cptype_t
+CUPS 1.2/OS X 10.5 ppd_cptype_t
Custom Parameter Type
typedef enum ppd_cptype_e ppd_cptype_t;
-CUPS 1.2/Mac OS X 10.5 ppd_cpvalue_t
+CUPS 1.2/OS X 10.5 ppd_cpvalue_t
Custom Parameter Value
typedef union ppd_cpvalue_u ppd_cpvalue_t; @@ -1641,7 +1641,7 @@ typedef enum ppd_section_e ppd_section_t;
typedef struct ppd_size_s ppd_size_t;
-CUPS 1.1.19/Mac OS X 10.3 ppd_status_t
+CUPS 1.1.19/OS X 10.3 ppd_status_t
Status Codes
typedef enum ppd_status_e ppd_status_t; @@ -1652,7 +1652,7 @@ typedef enum ppd_status_e ppd_status_t; typedef enum ppd_ui_e ppd_ui_t;
Structures
-CUPS 1.1.19/Mac OS X 10.3 ppd_attr_s
+CUPS 1.1.19/OS X 10.3 ppd_attr_s
PPD Attribute Structure
struct ppd_attr_s {
char name[PPD_MAX_NAME];
@@ -1712,7 +1712,7 @@ typedef enum ppd_ui_e ppd_ui_t;- option2[PPD_MAX_NAME]
- Second keyword
-CUPS 1.2/Mac OS X 10.5 ppd_coption_s
+CUPS 1.2/OS X 10.5 ppd_coption_s
Custom Option
struct ppd_coption_s {
char keyword[PPD_MAX_NAME];
@@ -1731,7 +1731,7 @@ typedef enum ppd_ui_e ppd_ui_t;- params
- Parameters
-CUPS 1.2/Mac OS X 10.5 ppd_cparam_s
+CUPS 1.2/OS X 10.5 ppd_cparam_s
Custom Parameter
struct ppd_cparam_s {
ppd_cpvalue_t current;
@@ -1886,13 +1886,13 @@ typedef enum ppd_ui_e ppd_ui_t;- Number of page sizes
- patches
- Patch commands to be sent to printer
-- pcfilename CUPS 1.1.19/Mac OS X 10.3
+- pcfilename CUPS 1.1.19/OS X 10.3
- PCFileName string
- product
- Product name (from PS RIP/interpreter)
- profiles DEPRECATED
- sRGB color profiles
-- protocols CUPS 1.1.19/Mac OS X 10.3
+- protocols CUPS 1.1.19/OS X 10.3
- Protocols (BCP, TBCP) string
- shortnickname
- Short version of nickname
@@ -1919,7 +1919,7 @@ typedef enum ppd_ui_e ppd_ui_t;
- PPD_MAX_NAME]
- Human-readable group name
-- name[PPD_MAX_NAME] CUPS 1.1.18/Mac OS X 10.3
+- name[PPD_MAX_NAME] CUPS 1.1.18/OS X 10.3
- Group name
- num_options
- Number of options
@@ -2018,7 +2018,7 @@ typedef enum ppd_ui_e ppd_ui_t;- Width of media in points
Unions
-CUPS 1.2/Mac OS X 10.5 ppd_cplimit_u
+CUPS 1.2/OS X 10.5 ppd_cplimit_u
Custom Parameter Limit
union ppd_cplimit_u {
float custom_curve;
@@ -2049,7 +2049,7 @@ typedef enum ppd_ui_e ppd_ui_t;- custom_string
- String length
-CUPS 1.2/Mac OS X 10.5 ppd_cpvalue_u
+CUPS 1.2/OS X 10.5 ppd_cpvalue_u
Custom Parameter Value
union ppd_cpvalue_u {
float custom_curve;
@@ -2081,7 +2081,7 @@ typedef enum ppd_ui_e ppd_ui_t;- String value
Constants
-CUPS 1.1.19/Mac OS X 10.3 ppd_conform_e
+CUPS 1.1.19/OS X 10.3 ppd_conform_e
Conformance Levels
Constants
@@ -2124,7 +2124,7 @@ typedef enum ppd_ui_e ppd_ui_t;
-- PPD_ORDER_PROLOG
- ... must be in the Prolog section
CUPS 1.1.19/Mac OS X 10.3 ppd_status_e
+CUPS 1.1.19/OS X 10.3 ppd_status_e
Status Codes
Constants
diff --git a/doc/help/api-raster.html b/doc/help/api-raster.html index ebeb8d829..706d1eb02 100644 --- a/doc/help/api-raster.html +++ b/doc/help/api-raster.html @@ -438,7 +438,7 @@ page header structure.">cupsRasterWriteHeader2 Raster API introduction for CUPS. - Copyright 2007-2011 by Apple Inc. + Copyright 2007-2012 by Apple Inc. Copyright 1997-2006 by Easy Software Products, all rights reserved. These coded instructions, statements, and computer programs are the @@ -457,7 +457,7 @@ avoid incompatibilities with newer versions of CUPS.
Two kinds of CUPS filters use the CUPS raster API - raster image processor (RIP) filters such as
@@ -577,7 +577,7 @@ the memory used to read the raster file:pstoraster
andcgpdftoraster
-(Mac OS X) that produce CUPS raster files and printer driver filters that +(OS X) that produce CUPS raster files and printer driver filters that convert CUPS raster files into a format usable by the printer. Printer driver filters are by far the most common.-
diff --git a/doc/help/license.html b/doc/help/license.html index 2b7c2460f..9bbc729ed 100644 --- a/doc/help/license.html +++ b/doc/help/license.html @@ -8,7 +8,7 @@- cupsRasterReadHeader Deprecated in CUPS 1.2/Mac OS X 10.5
+- cupsRasterReadHeader Deprecated in CUPS 1.2/OS X 10.5
- cupsRasterReadHeader2
- cupsRasterReadPixels
@@ -588,10 +588,10 @@ the memory used to read the raster file:
- cupsRasterInterpretPPD
-- cupsRasterWriteHeader Deprecated in CUPS 1.2/Mac OS X 10.5
+- cupsRasterWriteHeader Deprecated in CUPS 1.2/OS X 10.5
- cupsRasterWriteHeader2
- cupsRasterWritePixels
- +Functions
cupsRasterClose
@@ -608,7 +608,7 @@ void cupsRasterClose (
Discussion
The file descriptor associated with the raster stream must be closed separately as needed.
-CUPS 1.2/Mac OS X 10.5 cupsRasterInterpretPPD
+CUPS 1.2/OS X 10.5 cupsRasterInterpretPPD
Interpret PPD commands to create a page header.
int cupsRasterInterpretPPD (
-
@@ -743,7 +743,7 @@ of the version 2 page header data. This function handles reading version 2 page headers and copying only the version 1 data into the provided buffer.CUPS 1.2/Mac OS X 10.5 cupsRasterReadHeader2
+CUPS 1.2/OS X 10.5 cupsRasterReadHeader2
Read a raster page header and store it in a version 2 page header structure.
@@ -804,7 +804,7 @@ unsigned cupsRasterWriteHeader (
This function is deprecated. Use
-cupsRasterWriteHeader2
instead.CUPS 1.2/Mac OS X 10.5 cupsRasterWriteHeader2
+CUPS 1.2/OS X 10.5 cupsRasterWriteHeader2
Write a raster page header from a version 2 page header structure.
@@ -899,7 +899,7 @@ typedef enum cups_order_e cups_order_t;
typedef enum cups_orient_e cups_orient_t;
-CUPS 1.2/Mac OS X 10.5 cups_page_header2_t
+CUPS 1.2/OS X 10.5 cups_page_header2_t
Version 2 page header
typedef struct cups_page_header2_s cups_page_header2_t; @@ -920,7 +920,7 @@ typedef ssize_t (*cups_raster_iocb_t)(void *ctx, unsigned char *buffer, size_t l typedef struct _cups_raster_s cups_raster_t;
Structures
-CUPS 1.2/Mac OS X 10.5 cups_page_header2_s
+CUPS 1.2/OS X 10.5 cups_page_header2_s
Version 2 page header
struct cups_page_header2_s {
unsigned AdvanceDistance;
@@ -1033,7 +1033,7 @@ typedef struct _cups_raster_s cups_raster_t;- Number of bits for each color
- cupsBitsPerPixel
- Number of bits for each pixel
-- cupsBorderlessScalingFactor CUPS 1.2/Mac OS X 10.5
+- cupsBorderlessScalingFactor CUPS 1.2/OS X 10.5
- Scaling that was applied to page data
- cupsBytesPerLine
- Number of bytes per line
@@ -1045,26 +1045,26 @@ typedef struct _cups_raster_s cups_raster_t;- Device compression to use
- cupsHeight
- Height of page image in pixels
-- cupsImagingBBox[4] CUPS 1.2/Mac OS X 10.5
+- cupsImagingBBox[4] CUPS 1.2/OS X 10.5
- Floating point ImagingBoundingBox (scaling factor not applied, left, bottom, right, top)
-- cupsInteger[16] CUPS 1.2/Mac OS X 10.5
+- cupsInteger[16] CUPS 1.2/OS X 10.5
- User-defined integer values
-- cupsMarkerType[64] CUPS 1.2/Mac OS X 10.5
+- cupsMarkerType[64] CUPS 1.2/OS X 10.5
- Ink/toner type
- cupsMediaType
- Media type code
-- cupsNumColors CUPS 1.2/Mac OS X 10.5
+- cupsNumColors CUPS 1.2/OS X 10.5
- Number of color compoents
-- cupsPageSizeName[64] CUPS 1.2/Mac OS X 10.5
+- cupsPageSizeName[64] CUPS 1.2/OS X 10.5
- PageSize name
-- cupsPageSize[2] CUPS 1.2/Mac OS X 10.5
+- cupsPageSize[2] CUPS 1.2/OS X 10.5
- Floating point PageSize (scaling * factor not applied)
-- cupsReal[16] CUPS 1.2/Mac OS X 10.5
+- cupsReal[16] CUPS 1.2/OS X 10.5
- User-defined floating-point values
-- cupsRenderingIntent[64] CUPS 1.2/Mac OS X 10.5
+- cupsRenderingIntent[64] CUPS 1.2/OS X 10.5
- Color rendering intent
- cupsRowCount
- Rows per band
@@ -1072,7 +1072,7 @@ factor not applied)- Feed between bands
- cupsRowStep
- Spacing between lines
-- cupsString[16][64] CUPS 1.2/Mac OS X 10.5
+- cupsString[16][64] CUPS 1.2/OS X 10.5
- User-defined string values
- cupsWidth
- Width of page image in pixels
@@ -1232,9 +1232,9 @@ factor not applied)
- CUPS_CSPACE_ADOBERGB CUPS 1.4.5
- Red, green, blue (Adobe RGB)
-- CUPS_CSPACE_CIELab CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_CIELab CUPS 1.1.19/OS X 10.3
- CIE Lab
-- CUPS_CSPACE_CIEXYZ CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_CIEXYZ CUPS 1.1.19/OS X 10.3
- CIE XYZ
- CUPS_CSPACE_CMY
- Cyan, magenta, yellow (DeviceCMY)
@@ -1276,35 +1276,35 @@ factor not applied)- Gold, magenta, yellow, silver
- CUPS_CSPACE_GOLD DEPRECATED
- Gold foil
-- CUPS_CSPACE_ICC1 CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICC1 CUPS 1.1.19/OS X 10.3
- ICC-based, 1 color
-- CUPS_CSPACE_ICC2 CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICC2 CUPS 1.1.19/OS X 10.3
- ICC-based, 2 colors
-- CUPS_CSPACE_ICC3 CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICC3 CUPS 1.1.19/OS X 10.3
- ICC-based, 3 colors
-- CUPS_CSPACE_ICC4 CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICC4 CUPS 1.1.19/OS X 10.3
- ICC-based, 4 colors
-- CUPS_CSPACE_ICC5 CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICC5 CUPS 1.1.19/OS X 10.3
- ICC-based, 5 colors
-- CUPS_CSPACE_ICC6 CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICC6 CUPS 1.1.19/OS X 10.3
- ICC-based, 6 colors
-- CUPS_CSPACE_ICC7 CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICC7 CUPS 1.1.19/OS X 10.3
- ICC-based, 7 colors
-- CUPS_CSPACE_ICC8 CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICC8 CUPS 1.1.19/OS X 10.3
- ICC-based, 8 colors
-- CUPS_CSPACE_ICC9 CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICC9 CUPS 1.1.19/OS X 10.3
- ICC-based, 9 colors
-- CUPS_CSPACE_ICCA CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICCA CUPS 1.1.19/OS X 10.3
- ICC-based, 10 colors
-- CUPS_CSPACE_ICCB CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICCB CUPS 1.1.19/OS X 10.3
- ICC-based, 11 colors
-- CUPS_CSPACE_ICCC CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICCC CUPS 1.1.19/OS X 10.3
- ICC-based, 12 colors
-- CUPS_CSPACE_ICCD CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICCD CUPS 1.1.19/OS X 10.3
- ICC-based, 13 colors
-- CUPS_CSPACE_ICCE CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICCE CUPS 1.1.19/OS X 10.3
- ICC-based, 14 colors
-- CUPS_CSPACE_ICCF CUPS 1.1.19/Mac OS X 10.3
+- CUPS_CSPACE_ICCF CUPS 1.1.19/OS X 10.3
- ICC-based, 15 colors
- CUPS_CSPACE_K
- Black (DeviceK)
@@ -1316,7 +1316,7 @@ factor not applied)- Red, green, blue (DeviceRGB, sRGB by default)
- CUPS_CSPACE_RGBA
- Red, green, blue, alpha (DeviceRGB, sRGB by default)
-- CUPS_CSPACE_RGBW CUPS 1.2/Mac OS X 10.5
+- CUPS_CSPACE_RGBW CUPS 1.2/OS X 10.5
- Red, green, blue, white (DeviceRGB, sRGB by default)
- CUPS_CSPACE_SILVER DEPRECATED
- Silver foil
@@ -1382,9 +1382,9 @@ factor not applied)- Open stream for reading
- CUPS_RASTER_WRITE
- Open stream for writing
-- CUPS_RASTER_WRITE_COMPRESSED CUPS 1.3/Mac OS X 10.5
+- CUPS_RASTER_WRITE_COMPRESSED CUPS 1.3/OS X 10.5
- Open stream for compressed writing
-- CUPS_RASTER_WRITE_PWG CUPS 1.5/Mac OS X 10.7
+- CUPS_RASTER_WRITE_PWG CUPS 1.5/OS X 10.7
- Open stream for compressed writing in PWG mode
cups_order_e
diff --git a/doc/help/kerberos.html b/doc/help/kerberos.html index cb8b88c29..30fb53364 100644 --- a/doc/help/kerberos.html +++ b/doc/help/kerberos.html @@ -46,7 +46,7 @@ DNS server(s).- Kerberos: The Network Authentication Protocol
- Kerberos - on Mac OS X Frequently Asked Questions
+ on OS X Frequently Asked QuestionsSoftware License Agreement
-Copyright 2007-2011 by Apple Inc.
+Copyright 2007-2012 by Apple Inc.
1 Infinite Loop
Cupertino, CA 95014 USA
@@ -91,11 +91,10 @@ the following special exceptions:- An Apple Operating System means any operating system software developed and/or - marketed by Apple Computer, Inc., including but - not limited to all existing releases and - versions of Apple's Darwin, Mac OS X, and Mac OS - X Server products and all follow-on releases and - future versions thereof.
+ marketed by Apple Inc., including but not limited + to all existing releases and versions of Apple's + Darwin, OS X, and OS X Server products and all + follow-on releases and future versions thereof.- This exception is only available for Apple OS-Developed Software and does not apply to diff --git a/doc/help/man-ipptool.html b/doc/help/man-ipptool.html index ce090951d..1b523c537 100644 --- a/doc/help/man-ipptool.html +++ b/doc/help/man-ipptool.html @@ -122,12 +122,25 @@ Get a list of completed jobs for "myprinter":
Standard Files
The following standard files are available:+ color.jpg create-printer-subscription.test + document-a4.pdf + document-a4.ps + document-letter.pdf + document-letter.ps get-completed-jobs.test get-jobs.test + get-printer-attributes.test + gray.jpg ipp-1.1.test ipp-2.0.test ipp-2.1.test + ipp-2.2.test + onepage-a4.pdf + onepage-a4.ps + onepage-letter.pdf + onepage-letter.ps + print-job.test testfile.jpg testfile.pdf testfile.ps @@ -138,7 +151,7 @@ The following standard files are available:
http://localhost:631/helpCopyright
-Copyright 2007-2010 by Apple Inc. +Copyright 2007-2012 by Apple Inc.