Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 060f751517 |
+21
-1
@@ -1,6 +1,26 @@
|
||||
CHANGES.txt - 2006-10-20
|
||||
CHANGES.txt - 2006-11-02
|
||||
------------------------
|
||||
|
||||
CHANGES IN CUPS V1.2.6
|
||||
|
||||
- The web interface was not localized on Mac OS X (STR
|
||||
#2075)
|
||||
- "lpc status" did not show the number of queued jobs for
|
||||
disabled queues (STR #2069)
|
||||
- The lpstat program could hang (STR #2073)
|
||||
- The serial backend did not support the new USB serial
|
||||
filenames on Linux (STR #2061)
|
||||
- The parallel backend did not support bidirectional I/O
|
||||
properly (STR #2056)
|
||||
- The network backends now log the numeric address that
|
||||
is being used (STR #2046)
|
||||
- Fixed a compile error when using libpaper.
|
||||
- Fixed a compile error when compiling on Solaris with
|
||||
threading enabled (STR #2049, STR #2050)
|
||||
- Missing printer-state-changed event for
|
||||
printer-state-message updates (STR #2047)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.2.5
|
||||
|
||||
- Documentation updates (STR #2038)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
INSTALL - CUPS v1.2.5 - 2006-10-20
|
||||
INSTALL - CUPS v1.2.6 - 2006-11-06
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source
|
||||
|
||||
+17
-20
@@ -17,12 +17,12 @@ General Public License ("LGPL"), Version 2, with exceptions for
|
||||
Apple operating systems and the OpenSSL toolkit. A copy of the
|
||||
exceptions and licenses follow this introduction.
|
||||
|
||||
The GNU LGPL applies to the CUPS API library, located in the
|
||||
"cups" subdirectory of the CUPS source distribution and in the
|
||||
"cups" include directory and library files in the binary
|
||||
distributions. The GNU GPL applies to the remainder of the CUPS
|
||||
distribution, including the "pdftops" filter which is based upon
|
||||
Xpdf and the CUPS imaging library.
|
||||
The GNU LGPL applies to the CUPS and CUPS Imaging libraries
|
||||
located in the "cups" and "filter" subdirectories of the CUPS
|
||||
source distribution and in the "cups" include directory and
|
||||
library files in the binary distributions. The GNU GPL applies to
|
||||
the remainder of the CUPS distribution, including the "pdftops"
|
||||
filter which is based upon Xpdf.
|
||||
|
||||
For those not familiar with the GNU GPL, the license basically
|
||||
allows you to:
|
||||
@@ -32,22 +32,19 @@ allows you to:
|
||||
binary form.
|
||||
- Sell verbatim copies of the software for a media fee, or
|
||||
sell support for the software.
|
||||
- Distribute or sell printer drivers and filters that use
|
||||
CUPS so long as source code is made available under the
|
||||
GPL.
|
||||
|
||||
What this license *does not* allow you to do is make changes or
|
||||
add features to CUPS and then sell a binary distribution without
|
||||
source code. You must provide source for any new drivers,
|
||||
changes, or additions to the software, and all code must be
|
||||
provided under the GPL or LGPL as appropriate. The only
|
||||
exceptions to this are the portions of the CUPS software covered
|
||||
by the Apple operating system license exceptions outlined later
|
||||
in this license agreement.
|
||||
source code. You must provide source for any changes or additions
|
||||
to the software, and all code must be provided under the GPL or
|
||||
LGPL as appropriate. The only exceptions to this are the portions
|
||||
of the CUPS software covered by the Apple operating system
|
||||
license exceptions outlined later in this license agreement.
|
||||
|
||||
The GNU LGPL relaxes the "link-to" restriction, allowing you to
|
||||
develop applications that use the CUPS API library under other
|
||||
licenses and/or conditions as appropriate for your application.
|
||||
develop applications that use the CUPS and CUPS Imaging libraries
|
||||
under other licenses and/or conditions as appropriate for your
|
||||
application, driver, or filter.
|
||||
|
||||
|
||||
LICENSE EXCEPTIONS
|
||||
@@ -119,9 +116,9 @@ BINARY DISTRIBUTION RIGHTS
|
||||
|
||||
Easy Software Products also sells rights to the CUPS source code
|
||||
under a binary distribution license for vendors that are unable
|
||||
to release source code for their drivers, additions, and
|
||||
modifications to CUPS under the GNU GPL and LGPL. For
|
||||
information please contact us at the address shown above.
|
||||
to release source code for their additions and modifications to
|
||||
CUPS under the GNU GPL and LGPL. For information please contact
|
||||
us at the address shown above.
|
||||
|
||||
The Common UNIX Printing System provides a "pdftops" filter that
|
||||
is based on the Xpdf software. For binary distribution licensing
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
README - CUPS v1.2.5 - 2006-10-20
|
||||
README - CUPS v1.2.6 - 2006-11-06
|
||||
---------------------------------
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt"
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ all: $(TARGETS)
|
||||
#
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(TARGETS) http
|
||||
$(RM) $(OBJS) $(TARGETS) $(LIBOBJS) http
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -107,6 +107,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
hostname[1024], /* Hostname */
|
||||
username[255], /* Username info */
|
||||
resource[1024], /* Resource info (printer name) */
|
||||
addrname[256], /* Address name */
|
||||
*optptr, /* Pointer to URI options */
|
||||
name[255], /* Name of option */
|
||||
value[255], /* Value of option */
|
||||
@@ -574,6 +575,18 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "INFO: Connected to %s...\n", hostname);
|
||||
|
||||
#ifdef AF_INET6
|
||||
if (http->hostaddr->addr.sa_family == AF_INET6)
|
||||
fprintf(stderr, "DEBUG: Connected to [%s]:%d (IPv6)...\n",
|
||||
httpAddrString(http->hostaddr, addrname, sizeof(addrname)),
|
||||
ntohs(http->hostaddr->ipv6.sin6_port));
|
||||
else
|
||||
#endif /* AF_INET6 */
|
||||
if (http->hostaddr->addr.sa_family == AF_INET)
|
||||
fprintf(stderr, "DEBUG: Connected to %s:%d (IPv4)...\n",
|
||||
httpAddrString(http->hostaddr, addrname, sizeof(addrname)),
|
||||
ntohs(http->hostaddr->ipv4.sin_port));
|
||||
|
||||
/*
|
||||
* Build a URI for the printer and fill the standard IPP attributes for
|
||||
* an IPP_PRINT_FILE request. We can't use the URI in argv[0] because it
|
||||
|
||||
+13
-2
@@ -582,6 +582,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
*cptr; /* Pointer into control file string */
|
||||
char status; /* Status byte from command */
|
||||
char portname[255]; /* Port name */
|
||||
char addrname[256]; /* Address name */
|
||||
http_addrlist_t *addrlist, /* Address list */
|
||||
*addr; /* Socket address */
|
||||
int copy; /* Copies written */
|
||||
@@ -820,8 +821,18 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "INFO: Connected to %s...\n", hostname);
|
||||
fprintf(stderr, "DEBUG: Connected on ports %d (local %d)...\n", port,
|
||||
lport);
|
||||
|
||||
#ifdef AF_INET6
|
||||
if (addr->addr.addr.sa_family == AF_INET6)
|
||||
fprintf(stderr, "DEBUG: Connected to [%s]:%d (IPv6) (local port %d)...\n",
|
||||
httpAddrString(&addr->addr, addrname, sizeof(addrname)),
|
||||
ntohs(addr->addr.ipv6.sin6_port), lport);
|
||||
else
|
||||
#endif /* AF_INET6 */
|
||||
if (addr->addr.addr.sa_family == AF_INET)
|
||||
fprintf(stderr, "DEBUG: Connected to %s:%d (IPv4) (local port %d)...\n",
|
||||
httpAddrString(&addr->addr, addrname, sizeof(addrname)),
|
||||
ntohs(addr->addr.ipv4.sin_port), lport);
|
||||
|
||||
/*
|
||||
* Next, open the print file and figure out its size...
|
||||
|
||||
+23
-3
@@ -88,7 +88,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
*options; /* Pointer to options */
|
||||
int port; /* Port number (not used) */
|
||||
int print_fd, /* Print file */
|
||||
device_fd; /* Parallel device */
|
||||
device_fd, /* Parallel device */
|
||||
use_bc; /* Read back-channel data? */
|
||||
int copies; /* Number of copies to print */
|
||||
size_t tbytes; /* Total number of bytes written */
|
||||
struct termios opts; /* Parallel port options */
|
||||
@@ -188,7 +189,26 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
do
|
||||
{
|
||||
if ((device_fd = open(resource, O_WRONLY | O_EXCL)) == -1)
|
||||
#ifdef __linux
|
||||
/*
|
||||
* The Linux parallel port driver currently is broken WRT select()
|
||||
* and bidirection I/O...
|
||||
*/
|
||||
|
||||
device_fd = open(resource, O_WRONLY | O_EXCL);
|
||||
use_bc = 0;
|
||||
|
||||
#else
|
||||
if ((device_fd = open(resource, O_RDWR | O_EXCL)) < 0)
|
||||
{
|
||||
device_fd = open(resource, O_WRONLY | O_EXCL);
|
||||
use_bc = 0;
|
||||
}
|
||||
else
|
||||
use_bc = 1;
|
||||
#endif /* __linux */
|
||||
|
||||
if (device_fd == -1)
|
||||
{
|
||||
if (getenv("CLASS") != NULL)
|
||||
{
|
||||
@@ -264,7 +284,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
lseek(print_fd, 0, SEEK_SET);
|
||||
}
|
||||
|
||||
tbytes = backendRunLoop(print_fd, device_fd, 1);
|
||||
tbytes = backendRunLoop(print_fd, device_fd, use_bc);
|
||||
|
||||
if (print_fd != 0 && tbytes >= 0)
|
||||
fprintf(stderr, "INFO: Sent print file, " CUPS_LLFMT " bytes...\n",
|
||||
|
||||
@@ -778,6 +778,14 @@ list_devices(void)
|
||||
printf("serial serial:%s?baud=230400 \"Unknown\" \"USB Serial Port #%d\"\n",
|
||||
device, i + 1);
|
||||
}
|
||||
|
||||
sprintf(device, "/dev/ttyUSB%d", i);
|
||||
if ((fd = open(device, O_WRONLY | O_NOCTTY | O_NDELAY)) >= 0)
|
||||
{
|
||||
close(fd);
|
||||
printf("serial serial:%s?baud=230400 \"Unknown\" \"USB Serial Port #%d\"\n",
|
||||
device, i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 64; i ++)
|
||||
|
||||
+17
-2
@@ -78,7 +78,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
int delay; /* Delay for retries... */
|
||||
int device_fd; /* AppSocket */
|
||||
int error; /* Error code (if any) */
|
||||
http_addrlist_t *addrlist; /* Address list */
|
||||
http_addrlist_t *addrlist, /* Address list */
|
||||
*addr; /* Connected address */
|
||||
char addrname[256]; /* Address name */
|
||||
ssize_t tbytes; /* Total number of bytes written */
|
||||
struct timeval timeout; /* Timeout for select() */
|
||||
fd_set input; /* Input set for select() */
|
||||
@@ -245,7 +247,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
for (delay = 5;;)
|
||||
{
|
||||
if (!httpAddrConnect(addrlist, &device_fd))
|
||||
if ((addr = httpAddrConnect(addrlist, &device_fd)) == NULL)
|
||||
{
|
||||
error = errno;
|
||||
device_fd = -1;
|
||||
@@ -293,6 +295,19 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
}
|
||||
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "INFO: Connected to %s...\n", hostname);
|
||||
|
||||
#ifdef AF_INET6
|
||||
if (addr->addr.addr.sa_family == AF_INET6)
|
||||
fprintf(stderr, "DEBUG: Connected to [%s]:%d (IPv6)...\n",
|
||||
httpAddrString(&addr->addr, addrname, sizeof(addrname)),
|
||||
ntohs(addr->addr.ipv6.sin6_port));
|
||||
else
|
||||
#endif /* AF_INET6 */
|
||||
if (addr->addr.addr.sa_family == AF_INET)
|
||||
fprintf(stderr, "DEBUG: Connected to %s:%d (IPv4)...\n",
|
||||
httpAddrString(&addr->addr, addrname, sizeof(addrname)),
|
||||
ntohs(addr->addr.ipv4.sin_port));
|
||||
|
||||
/*
|
||||
* Print everything...
|
||||
|
||||
+18
-67
@@ -237,10 +237,8 @@ show_status(http_t *http, /* I - HTTP connection to server */
|
||||
const char *dests) /* I - Destinations */
|
||||
{
|
||||
ipp_t *request, /* IPP Request */
|
||||
*response, /* IPP Response */
|
||||
*jobs; /* IPP Get Jobs response */
|
||||
ipp_attribute_t *attr, /* Current attribute */
|
||||
*jattr; /* Current job attribute */
|
||||
*response; /* IPP Response */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
cups_lang_t *language; /* Default language */
|
||||
char *printer, /* Printer name */
|
||||
*device, /* Device URI */
|
||||
@@ -251,14 +249,13 @@ show_status(http_t *http, /* I - HTTP connection to server */
|
||||
const char *dptr, /* Pointer into destination list */
|
||||
*ptr; /* Pointer into printer name */
|
||||
int match; /* Non-zero if this job matches */
|
||||
char printer_uri[HTTP_MAX_URI];
|
||||
/* Printer URI */
|
||||
static const char *requested[] = /* Requested attributes */
|
||||
{
|
||||
"printer-name",
|
||||
"device-uri",
|
||||
"printer-is-accepting-jobs",
|
||||
"printer-name",
|
||||
"printer-state",
|
||||
"printer-is-accepting-jobs"
|
||||
"queued-job-count"
|
||||
};
|
||||
|
||||
|
||||
@@ -329,21 +326,21 @@ show_status(http_t *http, /* I - HTTP connection to server */
|
||||
|
||||
while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
|
||||
{
|
||||
if (!strcmp(attr->name, "printer-name") &&
|
||||
attr->value_tag == IPP_TAG_NAME)
|
||||
printer = attr->values[0].string.text;
|
||||
|
||||
if (!strcmp(attr->name, "device-uri") &&
|
||||
attr->value_tag == IPP_TAG_URI)
|
||||
device = attr->values[0].string.text;
|
||||
|
||||
if (!strcmp(attr->name, "printer-state") &&
|
||||
attr->value_tag == IPP_TAG_ENUM)
|
||||
pstate = (ipp_pstate_t)attr->values[0].integer;
|
||||
|
||||
if (!strcmp(attr->name, "printer-is-accepting-jobs") &&
|
||||
attr->value_tag == IPP_TAG_BOOLEAN)
|
||||
else if (!strcmp(attr->name, "printer-is-accepting-jobs") &&
|
||||
attr->value_tag == IPP_TAG_BOOLEAN)
|
||||
accepting = attr->values[0].boolean;
|
||||
else if (!strcmp(attr->name, "printer-name") &&
|
||||
attr->value_tag == IPP_TAG_NAME)
|
||||
printer = attr->values[0].string.text;
|
||||
else if (!strcmp(attr->name, "printer-state") &&
|
||||
attr->value_tag == IPP_TAG_ENUM)
|
||||
pstate = (ipp_pstate_t)attr->values[0].integer;
|
||||
else if (!strcmp(attr->name, "queued-job-count") &&
|
||||
attr->value_tag == IPP_TAG_INTEGER)
|
||||
jobcount = attr->values[0].integer;
|
||||
|
||||
attr = attr->next;
|
||||
}
|
||||
@@ -395,7 +392,8 @@ show_status(http_t *http, /* I - HTTP connection to server */
|
||||
*ptr != '\0' && *dptr != '\0' && *ptr == *dptr;
|
||||
ptr ++, dptr ++);
|
||||
|
||||
if (*ptr == '\0' && (*dptr == '\0' || *dptr == ',' || isspace(*dptr & 255)))
|
||||
if (*ptr == '\0' && (*dptr == '\0' || *dptr == ',' ||
|
||||
isspace(*dptr & 255)))
|
||||
{
|
||||
match = 1;
|
||||
break;
|
||||
@@ -421,53 +419,6 @@ show_status(http_t *http, /* I - HTTP connection to server */
|
||||
|
||||
if (match)
|
||||
{
|
||||
/*
|
||||
* Build an IPP_GET_JOBS request, which requires the following
|
||||
* attributes:
|
||||
*
|
||||
* attributes-charset
|
||||
* attributes-natural-language
|
||||
* printer-uri
|
||||
* limit
|
||||
*/
|
||||
|
||||
request = ippNew();
|
||||
|
||||
request->request.op.operation_id = IPP_GET_JOBS;
|
||||
request->request.op.request_id = 1;
|
||||
|
||||
language = cupsLangDefault();
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
|
||||
"attributes-charset", NULL,
|
||||
cupsLangEncoding(language));
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
|
||||
"attributes-natural-language", NULL,
|
||||
language->language);
|
||||
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, printer_uri, sizeof(printer_uri),
|
||||
"ipp", NULL, "localhost", 631, "/printers/%s",
|
||||
printer);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
|
||||
"printer-uri", NULL, printer_uri);
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
|
||||
"requested-attributes", NULL, "job-id");
|
||||
|
||||
if ((jobs = cupsDoRequest(http, request, "/")) != NULL)
|
||||
{
|
||||
/*
|
||||
* Grab the number of jobs for the printer.
|
||||
*/
|
||||
|
||||
for (jattr = jobs->attrs; jattr != NULL; jattr = jattr->next)
|
||||
if (jattr->name && !strcmp(jattr->name, "job-id"))
|
||||
jobcount ++;
|
||||
|
||||
ippDelete(jobs);
|
||||
}
|
||||
|
||||
/*
|
||||
* Display it...
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 6032 2006-10-12 19:19:47Z mike $"
|
||||
dnl "$Id: cups-common.m4 6052 2006-10-20 20:35:41Z mike $"
|
||||
dnl
|
||||
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -29,7 +29,7 @@ dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Versio number information...
|
||||
CUPS_VERSION="1.2.5"
|
||||
CUPS_VERSION="1.2.6"
|
||||
CUPS_REVISION=""
|
||||
if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
@@ -267,5 +267,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 6032 2006-10-12 19:19:47Z mike $".
|
||||
dnl End of "$Id: cups-common.m4 6052 2006-10-20 20:35:41Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-threads.m4 6012 2006-10-03 22:35:12Z mike $"
|
||||
dnl "$Id: cups-threads.m4 6061 2006-10-23 00:26:52Z mike $"
|
||||
dnl
|
||||
dnl Threading stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -45,10 +45,10 @@ if test "x$enable_threads" != xno; then
|
||||
if test $have_pthread = yes; then
|
||||
PTHREAD_FLAGS="-D_THREAD_SAFE -D_REENTRANT"
|
||||
|
||||
# Solaris requires _POSIX_PTHREAD_SEMANTICS to
|
||||
# Solaris requires -D_POSIX_PTHREAD_SEMANTICS to
|
||||
# be POSIX-compliant... :(
|
||||
if test $uname = SunOS; then
|
||||
PTHREAD_FLAGS="$PTHREAD_FLAGS _POSIX_PTHREAD_SEMANTICS"
|
||||
PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
||||
fi
|
||||
break
|
||||
fi
|
||||
@@ -59,5 +59,5 @@ fi
|
||||
AC_SUBST(PTHREAD_FLAGS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-threads.m4 6012 2006-10-03 22:35:12Z mike $".
|
||||
dnl End of "$Id: cups-threads.m4 6061 2006-10-23 00:26:52Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -420,6 +420,13 @@
|
||||
#undef HAVE_CFBUNDLEPRIV_H
|
||||
|
||||
|
||||
/*
|
||||
* Do we have CFLocaleCreateCanonicalLocaleIdentifierFromString()?
|
||||
*/
|
||||
|
||||
#undef HAVE_CF_LOCALE_ID
|
||||
|
||||
|
||||
/*
|
||||
* Do we have MacOSX 10.4's mbr_XXX functions()?
|
||||
*/
|
||||
|
||||
+2
-2
@@ -61,10 +61,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 1.0205
|
||||
# define CUPS_VERSION 1.0206
|
||||
# define CUPS_VERSION_MAJOR 1
|
||||
# define CUPS_VERSION_MINOR 2
|
||||
# define CUPS_VERSION_PATCH 5
|
||||
# define CUPS_VERSION_PATCH 6
|
||||
# define CUPS_DATE_ANY -1
|
||||
|
||||
|
||||
|
||||
@@ -98,11 +98,7 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
|
||||
/* language.c */
|
||||
cups_lang_t *lang_default; /* Default language */
|
||||
# ifdef __APPLE__
|
||||
# ifdef HAVE_CF_LOCALE_ID
|
||||
char language[32]; /* Cached language */
|
||||
# else
|
||||
const char *language; /* Cached language */
|
||||
# endif /* HAVE_CF_LOCALE_ID */
|
||||
# endif /* __APPLE__ */
|
||||
|
||||
/* ppd.c */
|
||||
|
||||
+13
-2
@@ -595,8 +595,14 @@ httpEncode64_2(char *out, /* I - String to write to */
|
||||
|
||||
if (outptr < outend)
|
||||
*outptr ++ = base64[(in[0] & 255) >> 2];
|
||||
|
||||
if (outptr < outend)
|
||||
*outptr ++ = base64[(((in[0] & 255) << 4) | ((in[1] & 255) >> 4)) & 63];
|
||||
{
|
||||
if (inlen > 1)
|
||||
*outptr ++ = base64[(((in[0] & 255) << 4) | ((in[1] & 255) >> 4)) & 63];
|
||||
else
|
||||
*outptr ++ = base64[((in[0] & 255) << 4) & 63];
|
||||
}
|
||||
|
||||
in ++;
|
||||
inlen --;
|
||||
@@ -610,7 +616,12 @@ httpEncode64_2(char *out, /* I - String to write to */
|
||||
}
|
||||
|
||||
if (outptr < outend)
|
||||
*outptr ++ = base64[(((in[0] & 255) << 2) | ((in[1] & 255) >> 6)) & 63];
|
||||
{
|
||||
if (inlen > 1)
|
||||
*outptr ++ = base64[(((in[0] & 255) << 2) | ((in[1] & 255) >> 6)) & 63];
|
||||
else
|
||||
*outptr ++ = base64[((in[0] & 255) << 2) & 63];
|
||||
}
|
||||
|
||||
in ++;
|
||||
inlen --;
|
||||
|
||||
+66
-53
@@ -995,6 +995,7 @@ appleLangDefault(void)
|
||||
/* List of localization data */
|
||||
CFStringRef languageName; /* Current name */
|
||||
CFStringRef localeName; /* Canonical from of name */
|
||||
char *lang; /* LANG environment variable */
|
||||
_cups_globals_t *cg = _cupsGlobals();
|
||||
/* Pointer to library globals */
|
||||
|
||||
@@ -1005,38 +1006,43 @@ appleLangDefault(void)
|
||||
|
||||
if (!cg->language[0])
|
||||
{
|
||||
localizationList =
|
||||
CFPreferencesCopyAppValue(CFSTR("AppleLanguages"),
|
||||
kCFPreferencesCurrentApplication);
|
||||
|
||||
if (localizationList != NULL)
|
||||
if ((lang = getenv("LANG")))
|
||||
strlcpy(cg->language, lang, sizeof(cg->language));
|
||||
else
|
||||
{
|
||||
if (CFGetTypeID(localizationList) == CFArrayGetTypeID() &&
|
||||
CFArrayGetCount(localizationList) > 0)
|
||||
localizationList =
|
||||
CFPreferencesCopyAppValue(CFSTR("AppleLanguages"),
|
||||
kCFPreferencesCurrentApplication);
|
||||
|
||||
if (localizationList != NULL)
|
||||
{
|
||||
languageName = CFArrayGetValueAtIndex(localizationList, 0);
|
||||
if (CFGetTypeID(localizationList) == CFArrayGetTypeID() &&
|
||||
CFArrayGetCount(localizationList) > 0)
|
||||
{
|
||||
languageName = CFArrayGetValueAtIndex(localizationList, 0);
|
||||
|
||||
if (languageName != NULL &&
|
||||
CFGetTypeID(languageName) == CFStringGetTypeID())
|
||||
{
|
||||
localeName = CFLocaleCreateCanonicalLocaleIdentifierFromString(
|
||||
kCFAllocatorDefault, languageName);
|
||||
if (languageName != NULL &&
|
||||
CFGetTypeID(languageName) == CFStringGetTypeID())
|
||||
{
|
||||
localeName = CFLocaleCreateCanonicalLocaleIdentifierFromString(
|
||||
kCFAllocatorDefault, languageName);
|
||||
|
||||
if (localeName != NULL)
|
||||
{
|
||||
CFStringGetCString(localeName, cg->language, sizeof(cg->language),
|
||||
kCFStringEncodingASCII);
|
||||
CFRelease(localeName);
|
||||
if (localeName != NULL)
|
||||
{
|
||||
CFStringGetCString(localeName, cg->language, sizeof(cg->language),
|
||||
kCFStringEncodingASCII);
|
||||
CFRelease(localeName);
|
||||
|
||||
if (!strcmp(cg->language, "en"))
|
||||
strlcpy(cg->language, "en_US.UTF-8", sizeof(cg->language));
|
||||
else if (strchr(cg->language, '.') == NULL)
|
||||
strlcat(cg->language, ".UTF-8", sizeof(cg->language));
|
||||
}
|
||||
}
|
||||
if (!strcmp(cg->language, "en"))
|
||||
strlcpy(cg->language, "en_US.UTF-8", sizeof(cg->language));
|
||||
else if (strchr(cg->language, '.') == NULL)
|
||||
strlcat(cg->language, ".UTF-8", sizeof(cg->language));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CFRelease(localizationList);
|
||||
}
|
||||
|
||||
CFRelease(localizationList);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1144,59 +1150,66 @@ appleLangDefault(void)
|
||||
char buff[256]; /* Temporary buffer */
|
||||
_cups_globals_t *cg = _cupsGlobals();
|
||||
/* Pointer to library globals */
|
||||
char *lang; /* LANG environment variable */
|
||||
|
||||
|
||||
/*
|
||||
* Only do the lookup and translation the first time.
|
||||
*/
|
||||
|
||||
if (cg->language == NULL)
|
||||
if (!cg->language[0])
|
||||
{
|
||||
localizationList =
|
||||
CFPreferencesCopyAppValue(CFSTR("AppleLanguages"),
|
||||
kCFPreferencesCurrentApplication);
|
||||
|
||||
if (localizationList != NULL)
|
||||
if ((lang = getenv("LANG")))
|
||||
strlcpy(cg->language, lang, sizeof(cg->language));
|
||||
else
|
||||
{
|
||||
if (CFGetTypeID(localizationList) == CFArrayGetTypeID() &&
|
||||
CFArrayGetCount(localizationList) > 0)
|
||||
localizationList =
|
||||
CFPreferencesCopyAppValue(CFSTR("AppleLanguages"),
|
||||
kCFPreferencesCurrentApplication);
|
||||
|
||||
if (localizationList != NULL)
|
||||
{
|
||||
localizationName = CFArrayGetValueAtIndex(localizationList, 0);
|
||||
|
||||
if (localizationName != NULL &&
|
||||
CFGetTypeID(localizationName) == CFStringGetTypeID())
|
||||
if (CFGetTypeID(localizationList) == CFArrayGetTypeID() &&
|
||||
CFArrayGetCount(localizationList) > 0)
|
||||
{
|
||||
CFIndex length = CFStringGetLength(localizationName);
|
||||
localizationName = CFArrayGetValueAtIndex(localizationList, 0);
|
||||
|
||||
if (length <= sizeof(buff) &&
|
||||
CFStringGetCString(localizationName, buff, sizeof(buff),
|
||||
kCFStringEncodingASCII))
|
||||
if (localizationName != NULL &&
|
||||
CFGetTypeID(localizationName) == CFStringGetTypeID())
|
||||
{
|
||||
buff[sizeof(buff) - 1] = '\0';
|
||||
CFIndex length = CFStringGetLength(localizationName);
|
||||
|
||||
for (i = 0;
|
||||
i < sizeof(apple_name_locale) / sizeof(apple_name_locale[0]);
|
||||
i++)
|
||||
if (length <= sizeof(buff) &&
|
||||
CFStringGetCString(localizationName, buff, sizeof(buff),
|
||||
kCFStringEncodingASCII))
|
||||
{
|
||||
if (!strcasecmp(buff, apple_name_locale[i].name))
|
||||
buff[sizeof(buff) - 1] = '\0';
|
||||
|
||||
for (i = 0;
|
||||
i < sizeof(apple_name_locale) / sizeof(apple_name_locale[0]);
|
||||
i++)
|
||||
{
|
||||
cg->language = apple_name_locale[i].locale;
|
||||
break;
|
||||
if (!strcasecmp(buff, apple_name_locale[i].name))
|
||||
{
|
||||
strlcpy(cg->language, apple_name_locale[i].locale,
|
||||
sizeof(cg->language));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CFRelease(localizationList);
|
||||
CFRelease(localizationList);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we didn't find the language, default to en_US...
|
||||
*/
|
||||
|
||||
if (cg->language == NULL)
|
||||
cg->language = apple_name_locale[0].locale;
|
||||
if (!cg->language[0])
|
||||
strlcpy(cg->language, apple_name_locale[0].locale, sizeof(cg->language));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+149
-12
@@ -72,7 +72,7 @@ CUPS 1.1 or higher.</p>
|
||||
<h2 class='title'>Licensing</h2>
|
||||
|
||||
<p>The CUPS raster API is provided under the terms of the GNU
|
||||
General Public License, with exceptions for MacOS X-based
|
||||
Library General Public License, with exceptions for MacOS X-based
|
||||
programs. Please see the CUPS license agreement for more
|
||||
information.</p>
|
||||
<h2 class='title'>Contents</h2>
|
||||
@@ -85,10 +85,31 @@ information.</p>
|
||||
<!-- NEW PAGE -->
|
||||
<h2 class='title'><a name='ENUMERATIONS'>Enumerations</a></h2>
|
||||
<ul>
|
||||
<li><a href='#cups_adv_e'><tt>cups_adv_e</tt></a> </li>
|
||||
<li><a href='#cups_bool_e'><tt>cups_bool_e</tt></a> </li>
|
||||
<li><a href='#cups_cspace_e'><tt>cups_cspace_e</tt></a> </li>
|
||||
<li><a href='#cups_cut_e'><tt>cups_cut_e</tt></a> </li>
|
||||
<li><a href='#cups_edge_e'><tt>cups_edge_e</tt></a> </li>
|
||||
<li><a href='#cups_jog_e'><tt>cups_jog_e</tt></a> </li>
|
||||
<li><a href='#cups_mode_e'><tt>cups_mode_e</tt></a> </li>
|
||||
<li><a href='#cups_order_e'><tt>cups_order_e</tt></a> </li>
|
||||
<li><a href='#cups_orient_e'><tt>cups_orient_e</tt></a> </li>
|
||||
</ul>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_adv_e'>cups_adv_e</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p></p>
|
||||
<h4>Values</h4>
|
||||
<div class='table'><table align='center' border='1' width='80%'>
|
||||
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><tt>CUPS_ADVANCE_FILE</tt> </td><td>Advance the roll after this file</td></tr>
|
||||
<tr><td><tt>CUPS_ADVANCE_JOB</tt> </td><td>Advance the roll after this job</td></tr>
|
||||
<tr><td><tt>CUPS_ADVANCE_NONE</tt> </td><td>Never advance the roll</td></tr>
|
||||
<tr><td><tt>CUPS_ADVANCE_PAGE</tt> </td><td>Advance the roll after this page</td></tr>
|
||||
<tr><td><tt>CUPS_ADVANCE_SET</tt> </td><td>Advance the roll after this set</td></tr>
|
||||
</tbody></table></div>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_bool_e'>cups_bool_e</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p>Types...</p>
|
||||
@@ -100,6 +121,89 @@ information.</p>
|
||||
<tr><td><tt>CUPS_TRUE</tt> </td><td>Logical true</td></tr>
|
||||
</tbody></table></div>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_cspace_e'>cups_cspace_e</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p></p>
|
||||
<h4>Values</h4>
|
||||
<div class='table'><table align='center' border='1' width='80%'>
|
||||
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><tt>CUPS_CSPACE_CIELab</tt> <span class='info'> CUPS 1.1.19 </span></td><td>CIE Lab </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_CIEXYZ</tt> <span class='info'> CUPS 1.1.19 </span></td><td>CIE XYZ </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_CMY</tt> </td><td>Cyan, magenta, yellow</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_CMYK</tt> </td><td>Cyan, magenta, yellow, black</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_GMCK</tt> </td><td>Gold, magenta, yellow, black</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_GMCS</tt> </td><td>Gold, magenta, yellow, silver</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_GOLD</tt> </td><td>Gold foil</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICC1</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 1 color </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICC2</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 2 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICC3</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 3 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICC4</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 4 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICC5</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 5 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICC6</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 6 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICC7</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 7 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICC8</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 8 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICC9</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 9 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICCA</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 10 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICCB</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 11 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICCC</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 12 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICCD</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 13 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICCE</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 14 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_ICCF</tt> <span class='info'> CUPS 1.1.19 </span></td><td>ICC-based, 15 colors </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_K</tt> </td><td>Black</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_KCMY</tt> </td><td>Black, cyan, magenta, yellow</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_KCMYcm</tt> </td><td>Black, cyan, magenta, yellow, *
|
||||
light-cyan, light-magenta</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_RGB</tt> </td><td>Red, green, blue</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_RGBA</tt> </td><td>Red, green, blue, alpha</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_RGBW</tt> <span class='info'> CUPS 1.2 </span></td><td>Red, green, blue, white </td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_SILVER</tt> </td><td>Silver foil</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_W</tt> </td><td>Luminance</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_WHITE</tt> </td><td>White ink (as black)</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_YMC</tt> </td><td>Yellow, magenta, cyan</td></tr>
|
||||
<tr><td><tt>CUPS_CSPACE_YMCK</tt> </td><td>Yellow, magenta, cyan, black</td></tr>
|
||||
</tbody></table></div>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_cut_e'>cups_cut_e</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p></p>
|
||||
<h4>Values</h4>
|
||||
<div class='table'><table align='center' border='1' width='80%'>
|
||||
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><tt>CUPS_CUT_FILE</tt> </td><td>Cut the roll after this file</td></tr>
|
||||
<tr><td><tt>CUPS_CUT_JOB</tt> </td><td>Cut the roll after this job</td></tr>
|
||||
<tr><td><tt>CUPS_CUT_NONE</tt> </td><td>Never cut the roll</td></tr>
|
||||
<tr><td><tt>CUPS_CUT_PAGE</tt> </td><td>Cut the roll after this page</td></tr>
|
||||
<tr><td><tt>CUPS_CUT_SET</tt> </td><td>Cut the roll after this set</td></tr>
|
||||
</tbody></table></div>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_edge_e'>cups_edge_e</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p></p>
|
||||
<h4>Values</h4>
|
||||
<div class='table'><table align='center' border='1' width='80%'>
|
||||
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><tt>CUPS_EDGE_BOTTOM</tt> </td><td>Leading edge is the bottom of the page</td></tr>
|
||||
<tr><td><tt>CUPS_EDGE_LEFT</tt> </td><td>Leading edge is the left of the page</td></tr>
|
||||
<tr><td><tt>CUPS_EDGE_RIGHT</tt> </td><td>Leading edge is the right of the page</td></tr>
|
||||
<tr><td><tt>CUPS_EDGE_TOP</tt> </td><td>Leading edge is the top of the page</td></tr>
|
||||
</tbody></table></div>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_jog_e'>cups_jog_e</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p></p>
|
||||
<h4>Values</h4>
|
||||
<div class='table'><table align='center' border='1' width='80%'>
|
||||
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><tt>CUPS_JOG_FILE</tt> </td><td>Move pages after this file</td></tr>
|
||||
<tr><td><tt>CUPS_JOG_JOB</tt> </td><td>Move pages after this job</td></tr>
|
||||
<tr><td><tt>CUPS_JOG_NONE</tt> </td><td>Never move pages</td></tr>
|
||||
<tr><td><tt>CUPS_JOG_SET</tt> </td><td>Move pages after this set</td></tr>
|
||||
</tbody></table></div>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_mode_e'>cups_mode_e</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p>Raster modes</p>
|
||||
@@ -111,6 +215,31 @@ information.</p>
|
||||
<tr><td><tt>CUPS_RASTER_WRITE</tt> </td><td>Open stream for writing</td></tr>
|
||||
</tbody></table></div>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_order_e'>cups_order_e</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p></p>
|
||||
<h4>Values</h4>
|
||||
<div class='table'><table align='center' border='1' width='80%'>
|
||||
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><tt>CUPS_ORDER_BANDED</tt> </td><td>CCC MMM YYY KKK ...</td></tr>
|
||||
<tr><td><tt>CUPS_ORDER_CHUNKED</tt> </td><td>CMYK CMYK CMYK ...</td></tr>
|
||||
<tr><td><tt>CUPS_ORDER_PLANAR</tt> </td><td>CCC ... MMM ... YYY ... KKK ...</td></tr>
|
||||
</tbody></table></div>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_orient_e'>cups_orient_e</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p></p>
|
||||
<h4>Values</h4>
|
||||
<div class='table'><table align='center' border='1' width='80%'>
|
||||
<thead><tr><th>Name</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><tt>CUPS_ORIENT_0</tt> </td><td>Don't rotate the page</td></tr>
|
||||
<tr><td><tt>CUPS_ORIENT_180</tt> </td><td>Turn the page upside down</td></tr>
|
||||
<tr><td><tt>CUPS_ORIENT_270</tt> </td><td>Rotate the page clockwise</td></tr>
|
||||
<tr><td><tt>CUPS_ORIENT_90</tt> </td><td>Rotate the page counter-clockwise</td></tr>
|
||||
</tbody></table></div>
|
||||
<!-- NEW PAGE -->
|
||||
<h2 class='title'><a name='FUNCTIONS'>Functions</a></h2>
|
||||
<ul>
|
||||
<li><a href='#cupsRasterClose'><tt>cupsRasterClose()</tt></a> </li>
|
||||
@@ -151,6 +280,12 @@ and "options" arguments. Instead, mark the options prior to calling
|
||||
cupsRasterInterpretPPD() - this allows you to do per-page options
|
||||
without manipulating the options array.
|
||||
|
||||
The "func" argument specifies an optional callback function that is
|
||||
called prior to the computation of the final raster data. The function
|
||||
can make changes to the cups_page_header2_t data as needed to use a
|
||||
supported raster format and then returns 0 on success and -1 if the
|
||||
requested attributes cannot be supported.
|
||||
|
||||
</p>
|
||||
<h4>Syntax</h4>
|
||||
<pre>
|
||||
@@ -159,7 +294,8 @@ cupsRasterInterpretPPD(
|
||||
<a href='#cups_page_header2_t'>cups_page_header2_t</a> * h,
|
||||
ppd_file_t * ppd,
|
||||
int num_options,
|
||||
cups_option_t * options);
|
||||
cups_option_t * options,
|
||||
<a href='#cups_interpret_cb_t'>cups_interpret_cb_t</a> func);
|
||||
</pre>
|
||||
<h4>Arguments</h4>
|
||||
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
|
||||
@@ -169,6 +305,7 @@ cupsRasterInterpretPPD(
|
||||
<tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
|
||||
<tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
|
||||
<tr><td><tt>options</tt></td><td>Options</td></tr>
|
||||
<tr><td><tt>func</tt></td><td>Optional page header callback</td></tr>
|
||||
</tbody></table></div>
|
||||
<h4>Returns</h4>
|
||||
<p>0 on success, -1 on failure</p>
|
||||
@@ -448,7 +585,7 @@ factor not applied) </td></tr>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_page_header_s'>cups_page_header_s</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p>Version 1 Page Header</p>
|
||||
<p></p>
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
struct cups_page_header_s
|
||||
@@ -541,11 +678,19 @@ struct cups_page_header_s
|
||||
<!-- NEW PAGE -->
|
||||
<h2 class='title'><a name='TYPES'>Types</a></h2>
|
||||
<ul>
|
||||
<li><a href='#cups_interpret_cb_t'><tt>cups_interpret_cb_t</tt></a> </li>
|
||||
<li><a href='#cups_page_header2_t'><tt>cups_page_header2_t</tt></a> <span class='info'> CUPS 1.2 </span></li>
|
||||
<li><a href='#cups_page_header_t'><tt>cups_page_header_t</tt></a> </li>
|
||||
<li><a href='#cups_raster_t'><tt>cups_raster_t</tt></a> </li>
|
||||
</ul>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_interpret_cb_t'>cups_interpret_cb_t</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p>Prototypes...</p>
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
typedef int (*cups_interpret_cb_t)(<a href='#cups_page_header2_t'>cups_page_header2_t</a> *header, int preferred_bits);
|
||||
</pre>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cups_page_header2_t'>cups_page_header2_t</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p>Version 2 Page Header </p>
|
||||
@@ -554,14 +699,6 @@ struct cups_page_header_s
|
||||
typedef struct <a href='#cups_page_header2_s'>cups_page_header2_s</a> cups_page_header2_t;
|
||||
</pre>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_page_header_t'>cups_page_header_t</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p>Version 1 Page Header</p>
|
||||
<h4>Definition</h4>
|
||||
<pre>
|
||||
typedef struct <a href='#cups_page_header_s'>cups_page_header_s</a> cups_page_header_t;
|
||||
</pre>
|
||||
<!-- NEW PAGE -->
|
||||
<h3 class='title'><a name='cups_raster_t'>cups_raster_t</a></h3>
|
||||
<h4>Description</h4>
|
||||
<p>Raster stream data</p>
|
||||
|
||||
+12
-16
@@ -22,12 +22,12 @@ Version 2, with exceptions for Apple operating systems and the
|
||||
OpenSSL toolkit. A copy of the exceptions and licenses follow
|
||||
this introduction.</P>
|
||||
|
||||
<P>The GNU LGPL applies to the CUPS API library, located in the
|
||||
"cups" subdirectory of the CUPS source distribution and in the
|
||||
"cups" include directory and library files in the binary
|
||||
distributions. The GNU GPL applies to the remainder of the CUPS
|
||||
distribution, including the "pdftops" filter which is based upon
|
||||
Xpdf and the CUPS imaging library.</P>
|
||||
<P>The GNU LGPL applies to the CUPS and CUPS Imaging libraries
|
||||
located in the "cups" and "filter" subdirectories of the CUPS
|
||||
source distribution and in the "cups" include directory and
|
||||
library files in the binary distributions. The GNU GPL applies to
|
||||
the remainder of the CUPS distribution, including the "pdftops"
|
||||
filter which is based upon Xpdf.</P>
|
||||
|
||||
<P>For those not familiar with the GNU GPL, the license basically
|
||||
allows you to:</P>
|
||||
@@ -42,25 +42,21 @@ allows you to:</P>
|
||||
<LI>Sell verbatim copies of the software for a media
|
||||
fee, or sell support for the software.</LI>
|
||||
|
||||
<LI>Distribute or sell printer drivers and filters that
|
||||
use CUPS so long as source code is made available under
|
||||
the GPL.</LI>
|
||||
|
||||
</UL>
|
||||
|
||||
<P>What this license <EM>does not</EM> allow you to do is make
|
||||
changes or add features to CUPS and then sell a binary
|
||||
distribution without source code. You must provide source for any
|
||||
new drivers, changes, or additions to the software, and all code
|
||||
must be provided under the GPL or LGPL as appropriate. The only
|
||||
changes or additions to the software, and all code must be
|
||||
provided under the GPL or LGPL as appropriate. The only
|
||||
exceptions to this are the portions of the CUPS software covered
|
||||
by the Apple operating system license exceptions outlined later
|
||||
in this license agreement.</P>
|
||||
|
||||
<P>The GNU LGPL relaxes the "link-to" restriction, allowing you
|
||||
to develop applications that use the CUPS API library under other
|
||||
licenses and/or conditions as appropriate for your
|
||||
application.</P>
|
||||
to develop applications that use the CUPS and CUPS Imaging
|
||||
libraries under other licenses and/or conditions as appropriate
|
||||
for your application, driver, or filter.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="EXCEPTIONS">License Exceptions</A></H2>
|
||||
@@ -150,7 +146,7 @@ same high-quality standards as the original.</P>
|
||||
|
||||
<P>Easy Software Products also sells rights to the CUPS source
|
||||
code under a binary distribution license for vendors that are
|
||||
unable to release source code for their drivers, additions, and
|
||||
unable to release source code for their additions and
|
||||
modifications to CUPS under the GNU GPL and LGPL. For information
|
||||
please contact us at the address shown above.</P>
|
||||
|
||||
|
||||
@@ -55,6 +55,6 @@ CUPS 1.1 or higher.</p>
|
||||
<h2 class='title'>Licensing</h2>
|
||||
|
||||
<p>The CUPS raster API is provided under the terms of the GNU
|
||||
General Public License, with exceptions for MacOS X-based
|
||||
Library General Public License, with exceptions for MacOS X-based
|
||||
programs. Please see the CUPS license agreement for more
|
||||
information.</p>
|
||||
|
||||
@@ -23,13 +23,6 @@
|
||||
* EMail: cups-info@cups.org
|
||||
* WWW: http://www.cups.org
|
||||
*
|
||||
* This code and any derivative of it may be used and distributed
|
||||
* freely under the terms of the GNU General Public License when
|
||||
* used with GNU/GPL Ghostscript or its derivatives. Use of the
|
||||
* code (or any derivative of it) with software other than GNU/GPL
|
||||
* GhostScript (or its derivatives) is governed by the CUPS license
|
||||
* agreement.
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*
|
||||
* Contents:
|
||||
|
||||
@@ -23,13 +23,6 @@
|
||||
* EMail: cups-info@cups.org
|
||||
* WWW: http://www.cups.org
|
||||
*
|
||||
* This code and any derivative of it may be used and distributed
|
||||
* freely under the terms of the GNU General Public License when
|
||||
* used with GNU/GPL Ghostscript or its derivatives. Use of the
|
||||
* code (or any derivative of it) with software other than GNU/GPL
|
||||
* GhostScript (or its derivatives) is governed by the CUPS license
|
||||
* agreement.
|
||||
*
|
||||
* This file is subject to the Apple OS-Developed Software exception.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1160,7 +1160,7 @@ void PSOutputDev::writeHeader(int firstPage, int lastPage,
|
||||
|
||||
writePSFmt("%%Producer: xpdf/pdftops %s\n", xpdfVersion);
|
||||
xref->getDocInfo(&info);
|
||||
if (info.dictLookup("Creator", &obj1)->isString()) {
|
||||
if (info.isDict() && info.dictLookup("Creator", &obj1)->isString()) {
|
||||
writePS("%%Creator: ");
|
||||
s = obj1.getString();
|
||||
if ((s->getChar(0) & 0xff) == 0xfe &&
|
||||
@@ -1226,7 +1226,7 @@ void PSOutputDev::writeHeader(int firstPage, int lastPage,
|
||||
writePS("\n");
|
||||
}
|
||||
obj1.free();
|
||||
if (info.dictLookup("Title", &obj1)->isString()) {
|
||||
if (info.isDict() && info.dictLookup("Title", &obj1)->isString()) {
|
||||
writePS("%%Title: ");
|
||||
s = obj1.getString();
|
||||
if ((s->getChar(0) & 0xff) == 0xfe &&
|
||||
|
||||
+8
-8
@@ -4020,14 +4020,14 @@ copy_model(cupsd_client_t *con, /* I - Client connection */
|
||||
if ((!strcmp(system_paper, "Letter") && have_letter) ||
|
||||
(!strcmp(system_paper, "A4") && have_a4))
|
||||
{
|
||||
num_defaults = ppd_add_default("PageSize", system_paper,
|
||||
num_defaults, &defaults);
|
||||
num_defaults = ppd_add_default("PageRegion", system_paper,
|
||||
num_defaults, &defaults);
|
||||
num_defaults = ppd_add_default("PaperDimension", system_paper,
|
||||
num_defaults, &defaults);
|
||||
num_defaults = ppd_add_default("ImageableArea", system_paper,
|
||||
num_defaults, &defaults);
|
||||
num_defaults = cupsAddOption("PageSize", system_paper,
|
||||
num_defaults, &defaults);
|
||||
num_defaults = cupsAddOption("PageRegion", system_paper,
|
||||
num_defaults, &defaults);
|
||||
num_defaults = cupsAddOption("PaperDimension", system_paper,
|
||||
num_defaults, &defaults);
|
||||
num_defaults = cupsAddOption("ImageableArea", system_paper,
|
||||
num_defaults, &defaults);
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_LIBPAPER */
|
||||
|
||||
@@ -1775,6 +1775,7 @@ cupsdUpdateJob(cupsd_job_t *job) /* I - Job to check */
|
||||
strlcpy(job->printer->state_message, message,
|
||||
sizeof(job->printer->state_message));
|
||||
cupsdAddPrinterHistory(job->printer);
|
||||
event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
|
||||
}
|
||||
|
||||
if (!strchr(job->status_buffer->buffer, '\n'))
|
||||
|
||||
+13
-13
@@ -1695,7 +1695,7 @@ show_printers(http_t *http, /* I - HTTP connection to server */
|
||||
cups_dest_t *dests, /* I - User-defined destinations */
|
||||
int long_status) /* I - Show long status? */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
int i, j; /* Looping vars */
|
||||
ipp_t *request, /* IPP Request */
|
||||
*response, /* IPP Response */
|
||||
*jobs; /* IPP Get Jobs response */
|
||||
@@ -2038,9 +2038,9 @@ show_printers(http_t *http, /* I - HTTP connection to server */
|
||||
if (reasons)
|
||||
{
|
||||
_cupsLangPuts(stdout, _("\tAlerts:"));
|
||||
for (i = 0; i < reasons->num_values; i ++)
|
||||
for (j = 0; j < reasons->num_values; i ++)
|
||||
_cupsLangPrintf(stdout, " %s",
|
||||
reasons->values[i].string.text);
|
||||
reasons->values[j].string.text);
|
||||
_cupsLangPuts(stdout, "\n");
|
||||
}
|
||||
}
|
||||
@@ -2076,16 +2076,16 @@ show_printers(http_t *http, /* I - HTTP connection to server */
|
||||
if (allowed)
|
||||
{
|
||||
_cupsLangPuts(stdout, _("\tUsers allowed:\n"));
|
||||
for (i = 0; i < allowed->num_values; i ++)
|
||||
for (j = 0; j < allowed->num_values; j ++)
|
||||
_cupsLangPrintf(stdout, "\t\t%s\n",
|
||||
allowed->values[i].string.text);
|
||||
allowed->values[j].string.text);
|
||||
}
|
||||
else if (denied)
|
||||
{
|
||||
_cupsLangPuts(stdout, _("\tUsers denied:\n"));
|
||||
for (i = 0; i < denied->num_values; i ++)
|
||||
for (j = 0; j < denied->num_values; j ++)
|
||||
_cupsLangPrintf(stdout, "\t\t%s\n",
|
||||
denied->values[i].string.text);
|
||||
denied->values[j].string.text);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2151,9 +2151,9 @@ show_printers(http_t *http, /* I - HTTP connection to server */
|
||||
if (reasons)
|
||||
{
|
||||
_cupsLangPuts(stdout, _("\tAlerts:"));
|
||||
for (i = 0; i < reasons->num_values; i ++)
|
||||
for (j = 0; j < reasons->num_values; j ++)
|
||||
_cupsLangPrintf(stdout, " %s",
|
||||
reasons->values[i].string.text);
|
||||
reasons->values[j].string.text);
|
||||
_cupsLangPuts(stdout, "\n");
|
||||
}
|
||||
}
|
||||
@@ -2189,16 +2189,16 @@ show_printers(http_t *http, /* I - HTTP connection to server */
|
||||
if (allowed)
|
||||
{
|
||||
_cupsLangPuts(stdout, _("\tUsers allowed:\n"));
|
||||
for (i = 0; i < allowed->num_values; i ++)
|
||||
for (j = 0; j < allowed->num_values; j ++)
|
||||
_cupsLangPrintf(stdout, "\t\t%s\n",
|
||||
allowed->values[i].string.text);
|
||||
allowed->values[j].string.text);
|
||||
}
|
||||
else if (denied)
|
||||
{
|
||||
_cupsLangPuts(stdout, _("\tUsers denied:\n"));
|
||||
for (i = 0; i < denied->num_values; i ++)
|
||||
for (j = 0; j < denied->num_values; j ++)
|
||||
_cupsLangPrintf(stdout, "\t\t%s\n",
|
||||
denied->values[i].string.text);
|
||||
denied->values[j].string.text);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário