CHANGES-1.2.txt
---------------
+CHANGES IN CUPS V1.2.11
+
+ - The pstops filter did not handle %%EndFeature comments
+ properly (STR #2306)
+ - Fixed a problem with the Polish web page printer icons
+ (STR #2305)
+ - ppdLocalize() now also localizes the cupsICCProfile
+ attributes.
+ - The scheduler still had a reference to the incorrect
+ "notify-recipient" attribute (STR #2307)
+ - The "make check" and "make test" subscription tests did
+ not set the locale (STR #2307)
+ - The "make check" and "make test" subscription tests
+ incorrectly used the notify-recipient attribute instead
+ of notify-recipient-uri (STR #2307)
+ - cupsRasterInterpretPPD() incorrectly limited the
+ cupsBorderlessScalingFactor when specified in the
+ job options.
+
+
CHANGES IN CUPS V1.2.10
- ppdLocalize() now supports localizing for Japanese
-CHANGES.txt - 2007-03-21
+CHANGES.txt - 2007-03-26
------------------------
CHANGES IN CUPS V1.3
- - Documentation updates (STR #2130, STR #2131)
+ - Documentation updates (STR #1775, STR #2130, STR #2131)
+ - Added support for LPD "stream" mode (STR #2036)
- The scheduler now reports the PostScript product string
from PPD files in CUPS-Get-PPDs responses (STR #1900)
- Raw printing with queues pointing to the file pseudo-
/*
- * "$Id: lpd.c 6058 2006-10-23 00:20:09Z mike $"
+ * "$Id: lpd.c 6398 2007-03-26 12:57:59Z mike $"
*
* Line Printer Daemon backend for the Common UNIX Printing System (CUPS).
*
- * Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ * Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
static int abort_job = 0; /* Non-zero if we get SIGTERM */
+/*
+ * Print mode...
+ */
+
+#define MODE_STANDARD 0 /* Queue a copy */
+#define MODE_STREAM 1 /* Stream a copy */
+
+
/*
* The order for control and data files in LPD requests...
*/
static int lpd_command(int lpd_fd, int timeout, char *format, ...);
static int lpd_queue(const char *hostname, int port, const char *printer,
- const char *filename,
- const char *user, const char *title, int copies,
- int banner, int format, int order, int reserve,
+ int print_fd, int mode, const char *user,
+ const char *title, int copies, int banner,
+ int format, int order, int reserve,
int manual_copies, int timeout, int contimeout);
static void lpd_timeout(int sig);
static int lpd_write(int lpd_fd, char *buffer, int length);
*filename, /* File to print */
title[256]; /* Title string */
int port; /* Port number */
+ int fd; /* Print file */
int status; /* Status of LPD job */
+ int mode; /* Print mode */
int banner; /* Print banner page? */
int format; /* Print format */
int order; /* Order of control/data files */
return (CUPS_BACKEND_FAILED);
}
- /*
- * If we have 7 arguments, print the file named on the command-line.
- * Otherwise, copy stdin to a temporary file and print the temporary
- * file.
- */
-
- if (argc == 6)
- {
- /*
- * Copy stdin to a temporary file...
- */
-
- int fd; /* Temporary file */
- char buffer[8192]; /* Buffer for copying */
- int bytes; /* Number of bytes read */
-
-
- if ((fd = cupsTempFd(tmpfilename, sizeof(tmpfilename))) < 0)
- {
- perror("ERROR: unable to create temporary file");
- return (CUPS_BACKEND_FAILED);
- }
-
- while ((bytes = fread(buffer, 1, sizeof(buffer), stdin)) > 0)
- if (write(fd, buffer, bytes) < bytes)
- {
- perror("ERROR: unable to write to temporary file");
- close(fd);
- unlink(tmpfilename);
- return (CUPS_BACKEND_FAILED);
- }
-
- close(fd);
- filename = tmpfilename;
- }
- else
- filename = argv[6];
-
/*
* Extract the hostname and printer name from the URI...
*/
* See if there are any options...
*/
+ mode = MODE_STANDARD;
banner = 0;
format = 'l';
order = ORDER_CONTROL_DATA;
else
fprintf(stderr, "ERROR: Unknown format character \"%c\"\n", value[0]);
}
+ else if (!strcasecmp(name, "mode") && value[0])
+ {
+ /*
+ * Set control/data order...
+ */
+
+ if (!strcasecmp(value, "standard"))
+ order = MODE_STANDARD;
+ else if (!strcasecmp(value, "stream"))
+ order = MODE_STREAM;
+ else
+ fprintf(stderr, "ERROR: Unknown print mode \"%s\"\n", value);
+ }
else if (!strcasecmp(name, "order") && value[0])
{
/*
}
}
+ if (mode == MODE_STREAM)
+ order = ORDER_CONTROL_DATA;
+
+ /*
+ * If we have 7 arguments, print the file named on the command-line.
+ * Otherwise, copy stdin to a temporary file and print the temporary
+ * file.
+ */
+
+ if (argc == 6 && mode == MODE_STANDARD)
+ {
+ /*
+ * Copy stdin to a temporary file...
+ */
+
+ char buffer[8192]; /* Buffer for copying */
+ int bytes; /* Number of bytes read */
+
+
+ if ((fd = cupsTempFd(tmpfilename, sizeof(tmpfilename))) < 0)
+ {
+ perror("ERROR: unable to create temporary file");
+ return (CUPS_BACKEND_FAILED);
+ }
+
+ while ((bytes = fread(buffer, 1, sizeof(buffer), stdin)) > 0)
+ if (write(fd, buffer, bytes) < bytes)
+ {
+ perror("ERROR: unable to write to temporary file");
+ close(fd);
+ unlink(tmpfilename);
+ return (CUPS_BACKEND_FAILED);
+ }
+
+ filename = tmpfilename;
+ }
+ else if (argc == 6)
+ {
+ /*
+ * Stream from stdin...
+ */
+
+ filename = NULL;
+ fd = 0;
+ }
+ else
+ {
+ filename = argv[6];
+ fd = open(filename, O_RDONLY);
+
+ if (fd == -1)
+ {
+ fprintf(stderr, "ERROR: Unable to open print file %s: %s\n",
+ filename, strerror(errno));
+ return (CUPS_BACKEND_FAILED);
+ }
+ }
+
/*
* Sanitize the document title...
*/
copies = atoi(argv[4]);
}
- status = lpd_queue(hostname, port, resource + 1, filename,
+ status = lpd_queue(hostname, port, resource + 1, fd, mode,
username, title, copies,
banner, format, order, reserve, manual_copies,
timeout, contimeout);
fprintf(stderr, "PAGE: 1 %d\n", atoi(argv[4]));
}
else
- status = lpd_queue(hostname, port, resource + 1, filename,
+ status = lpd_queue(hostname, port, resource + 1, fd, mode,
username, title, 1,
banner, format, order, reserve, 1,
timeout, contimeout);
if (tmpfilename[0])
unlink(tmpfilename);
+ if (fd)
+ close(fd);
+
/*
* Return the queue status...
*/
lpd_queue(const char *hostname, /* I - Host to connect to */
int port, /* I - Port to connect on */
const char *printer, /* I - Printer/queue name */
- const char *filename, /* I - File to print */
+ int print_fd, /* I - File to print */
+ int mode, /* I - Print mode */
const char *user, /* I - Requesting user */
const char *title, /* I - Job title */
int copies, /* I - Number of copies */
int timeout, /* I - Timeout... */
int contimeout) /* I - Connection timeout */
{
- FILE *fp; /* Job file */
char localhost[255]; /* Local host name */
int error; /* Error number */
struct stat filestats; /* File statistics */
* Next, open the print file and figure out its size...
*/
- if (stat(filename, &filestats))
+ if (print_fd)
{
- httpAddrFreeList(addrlist);
- close(fd);
-
- perror("ERROR: unable to stat print file");
- return (CUPS_BACKEND_FAILED);
- }
-
- filestats.st_size *= manual_copies;
+ if (fstat(print_fd, &filestats))
+ {
+ httpAddrFreeList(addrlist);
+ close(fd);
- if ((fp = fopen(filename, "rb")) == NULL)
- {
- httpAddrFreeList(addrlist);
- close(fd);
+ perror("ERROR: unable to stat print file");
+ return (CUPS_BACKEND_FAILED);
+ }
- perror("ERROR: unable to open print file for reading");
- return (CUPS_BACKEND_FAILED);
+ filestats.st_size *= manual_copies;
}
+ else
+#ifdef _LARGEFILE_SOURCE
+ filestats.st_size = (size_t)(999999999999.0);
+#else
+ filestats.st_size = 2147483647;
+#endif /* _LARGEFILE_SOURCE */
/*
* Send a job header to the printer, specifying no banner page and
tbytes = 0;
for (copy = 0; copy < manual_copies; copy ++)
{
- rewind(fp);
+ lseek(print_fd, 0, SEEK_SET);
- while ((nbytes = fread(buffer, 1, sizeof(buffer), fp)) > 0)
+ while ((nbytes = read(print_fd, buffer, sizeof(buffer))) > 0)
{
fprintf(stderr, "INFO: Spooling LPR job, %.0f%% complete...\n",
100.0 * tbytes / filestats.st_size);
}
}
- if (tbytes < filestats.st_size)
- status = errno;
- else if (lpd_write(fd, "", 1) < 1)
+ if (mode == MODE_STANDARD)
{
- perror("ERROR: Unable to send trailing nul to printer");
- status = errno;
- }
- else
- {
- /*
- * Read the status byte from the printer; if we can't read the byte
- * back now, we should set status to "errno", however at this point
- * we know the printer got the whole file and we don't necessarily
- * want to requeue it over and over...
- */
+ if (tbytes < filestats.st_size)
+ status = errno;
+ else if (lpd_write(fd, "", 1) < 1)
+ {
+ perror("ERROR: Unable to send trailing nul to printer");
+ status = errno;
+ }
+ else
+ {
+ /*
+ * Read the status byte from the printer; if we can't read the byte
+ * back now, we should set status to "errno", however at this point
+ * we know the printer got the whole file and we don't necessarily
+ * want to requeue it over and over...
+ */
- alarm(timeout);
+ alarm(timeout);
- if (recv(fd, &status, 1, 0) < 1)
- {
- fprintf(stderr, "WARNING: Remote host did not respond with data "
- "status byte after %d seconds!\n", timeout);
- status = 0;
- }
+ if (recv(fd, &status, 1, 0) < 1)
+ {
+ fprintf(stderr, "WARNING: Remote host did not respond with data "
+ "status byte after %d seconds!\n", timeout);
+ status = 0;
+ }
- alarm(0);
+ alarm(0);
+ }
}
+ else
+ status = 0;
if (status != 0)
fprintf(stderr, "ERROR: Remote host did not accept data file (%d)\n",
*/
close(fd);
- fclose(fp);
if (status == 0)
{
/*
- * End of "$Id: lpd.c 6058 2006-10-23 00:20:09Z mike $".
+ * End of "$Id: lpd.c 6398 2007-03-26 12:57:59Z mike $".
*/
/*
- * "$Id: help-index.c 6258 2007-02-11 01:16:31Z mike $"
+ * "$Id: help-index.c 6394 2007-03-25 00:01:14Z mike $"
*
* On-line help index routines for the Common UNIX Printing System (CUPS).
*
cups_file_t *fp; /* HTML file */
help_node_t *node; /* Current node */
char line[1024], /* Line from file */
+ temp[1024], /* Temporary word */
section[1024], /* Section */
*ptr, /* Pointer into line */
*anchor, /* Anchor name */
*/
for (ptr ++; *ptr && *ptr != '>'; ptr ++)
+ {
if (*ptr == '\"' || *ptr == '\'')
{
for (quote = *ptr++; *ptr && *ptr != quote; ptr ++);
if (!*ptr)
ptr --;
}
+ }
if (!*ptr)
ptr --;
wordlen = ptr - text;
- if (*ptr)
- *ptr = '\0';
- else
- ptr --;
+ memcpy(temp, text, wordlen);
+ temp[wordlen] = '\0';
+
+ ptr --;
- if (wordlen > 1 && !bsearch(text, help_common_words,
+ if (wordlen > 1 && !bsearch(temp, help_common_words,
(sizeof(help_common_words) /
sizeof(help_common_words[0])),
sizeof(help_common_words[0]),
(int (*)(const void *, const void *))
strcasecmp))
- help_add_word(node, text);
+ help_add_word(node, temp);
}
}
/*
- * End of "$Id: help-index.c 6258 2007-02-11 01:16:31Z mike $".
+ * End of "$Id: help-index.c 6394 2007-03-25 00:01:14Z mike $".
*/
<H1><A NAME="FIRST">This is the First Anchor</A></H1>
-<P>This is some text for the first anchor.</P>
+<P>This is some text for the <em>first</em> anchor.</P>
<H1><A NAME="2ND">This is the Second Anchor</A></H1>
if test x$enable_gssapi != xno; then
AC_PATH_PROG(KRB5CONFIG, krb5-config)
if test "x$KRB5CONFIG" != x; then
- CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
- CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
- LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
+ if test "x$uname" = "xDarwin"; then
+ # Mac OS X weak-links to the Kerberos framework...
+ LIBGSSAPI="-weak_framework Kerberos"
+ else
+ CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
+ CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
+ LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
+ fi
AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
else
# Solaris provides its own GSSAPI implementation...
/*
- * "$Id: auth.c 6253 2007-02-10 18:48:40Z mike $"
+ * "$Id: auth.c 6397 2007-03-25 23:33:32Z mike $"
*
* Authentication functions for the Common UNIX Printing System (CUPS).
*
/* Pointer into Authorization string */
+# ifdef __APPLE__
+ /*
+ * If the weak-linked GSSAPI/Kerberos library is not present, don't try
+ * to use it...
+ */
+
+ if (gss_init_sec_context == NULL)
+ {
+ DEBUG_puts("cupsDoAuthentication: Weak-linked GSSAPI/Kerberos framework "
+ "is not present");
+ return (-1);
+ }
+# endif /* __APPLE__ */
+
if (http->gssname == GSS_C_NO_NAME)
{
if ((gss_service_name = getenv("CUPS_GSSSERVICENAME")) == NULL)
/*
- * End of "$Id: auth.c 6253 2007-02-10 18:48:40Z mike $".
+ * End of "$Id: auth.c 6397 2007-03-25 23:33:32Z mike $".
*/
/*
- * "$Id: dest.c 6265 2007-02-11 19:42:42Z mike $"
+ * "$Id: dest.c 6386 2007-03-23 19:03:01Z mike $"
*
* User-defined destination (and option) support for the Common UNIX
* Printing System (CUPS).
change_time, /* printer-state-change-time attribute */
type; /* printer-type attribute */
const char *info, /* printer-info attribute */
+ *location, /* printer-location attribute */
*make_model, /* printer-make-and-model attribute */
*name; /* printer-name attribute */
char job_sheets[1024], /* job-sheets-default attribute */
+ auth_info_req[1024], /* auth-info-required attribute */
reasons[1024]; /* printer-state-reasons attribute */
int num_options; /* Number of options */
cups_option_t *options; /* Options */
*ptr; /* Pointer into name/value */
static const char * const pattrs[] = /* Attributes we're interested in */
{
+ "auth-info-required",
"job-sheets-default",
"printer-info",
"printer-is-accepting-jobs",
"printer-is-shared",
+ "printer-location",
"printer-make-and-model",
"printer-name",
"printer-state",
accepting = 0;
change_time = 0;
info = NULL;
+ location = NULL;
make_model = NULL;
name = NULL;
num_options = 0;
state = IPP_PRINTER_IDLE;
type = CUPS_PRINTER_LOCAL;
- strcpy(job_sheets, "");
- strcpy(reasons, "");
+ auth_info_req[0] = '\0';
+ job_sheets[0] = '\0';
+ reasons[0] = '\0';
while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
{
- if (!strcmp(attr->name, "job-sheets-default") &&
- (attr->value_tag == IPP_TAG_KEYWORD ||
- attr->value_tag == IPP_TAG_NAME))
+ if (!strcmp(attr->name, "auth-info-required") &&
+ attr->value_tag == IPP_TAG_KEYWORD)
+ {
+ strlcpy(auth_info_req, attr->values[0].string.text,
+ sizeof(auth_info_req));
+
+ for (i = 1, ptr = auth_info_req + strlen(auth_info_req);
+ i < attr->num_values;
+ i ++)
+ {
+ snprintf(ptr, sizeof(auth_info_req) - (ptr - auth_info_req), ",%s",
+ attr->values[i].string.text);
+ ptr += strlen(ptr);
+ }
+ }
+ else if (!strcmp(attr->name, "job-sheets-default") &&
+ (attr->value_tag == IPP_TAG_KEYWORD ||
+ attr->value_tag == IPP_TAG_NAME))
{
if (attr->num_values == 2)
snprintf(job_sheets, sizeof(job_sheets), "%s,%s",
else if (!strcmp(attr->name, "printer-is-shared") &&
attr->value_tag == IPP_TAG_BOOLEAN)
shared = attr->values[0].boolean;
+ else if (!strcmp(attr->name, "printer-location") &&
+ attr->value_tag == IPP_TAG_TEXT)
+ location = attr->values[0].string.text;
else if (!strcmp(attr->name, "printer-make-and-model") &&
attr->value_tag == IPP_TAG_TEXT)
make_model = attr->values[0].string.text;
num_options = 0;
options = NULL;
+ if (auth_info_req[0])
+ dest->num_options = cupsAddOption("auth-info-required", auth_info_req,
+ dest->num_options,
+ &(dest->options));
+
if (job_sheets[0])
dest->num_options = cupsAddOption("job-sheets", job_sheets,
dest->num_options,
dest->num_options,
&(dest->options));
+ if (location)
+ dest->num_options = cupsAddOption("printer-location",
+ location, dest->num_options,
+ &(dest->options));
+
if (make_model)
dest->num_options = cupsAddOption("printer-make-and-model",
make_model, dest->num_options,
/*
- * End of "$Id: dest.c 6265 2007-02-11 19:42:42Z mike $".
+ * End of "$Id: dest.c 6386 2007-03-23 19:03:01Z mike $".
*/
/*
- * "$Id: encode.c 6356 2007-03-19 13:54:48Z mike $"
+ * "$Id: encode.c 6386 2007-03-23 19:03:01Z mike $"
*
* Option encoding routines for the Common UNIX Printing System (CUPS).
*
static const _ipp_option_t ipp_options[] =
{
+ { "auth-info", IPP_TAG_TEXT, IPP_TAG_JOB },
+ { "auth-info-required", IPP_TAG_KEYWORD, IPP_TAG_PRINTER },
{ "blackplot", IPP_TAG_BOOLEAN, IPP_TAG_JOB },
{ "blackplot-default", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
{ "brightness", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ "printer-info", IPP_TAG_TEXT, IPP_TAG_PRINTER },
{ "printer-is-accepting-jobs",IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
{ "printer-is-shared", IPP_TAG_BOOLEAN, IPP_TAG_PRINTER },
+ { "printer-location", IPP_TAG_TEXT, IPP_TAG_PRINTER },
{ "printer-make-and-model", IPP_TAG_TEXT, IPP_TAG_PRINTER },
{ "printer-more-info", IPP_TAG_URI, IPP_TAG_PRINTER },
{ "printer-op-policy", IPP_TAG_NAME, IPP_TAG_PRINTER },
/*
- * End of "$Id: encode.c 6356 2007-03-19 13:54:48Z mike $".
+ * End of "$Id: encode.c 6386 2007-03-23 19:03:01Z mike $".
*/
/*
- * "$Id: localize.c 6367 2007-03-20 01:34:29Z mike $"
+ * "$Id: localize.c 6388 2007-03-24 14:21:31Z mike $"
*
* PPD custom option routines for the Common UNIX Printing System (CUPS).
*
ppd_choice_t *choice; /* Current choice */
ppd_coption_t *coption; /* Current custom option */
ppd_cparam_t *cparam; /* Current custom parameter */
+ ppd_attr_t *attr; /* Current attribute */
cups_lang_t *lang; /* Current language */
char ckeyword[PPD_MAX_NAME], /* Custom keyword */
ll_CC[6], /* Language + country locale */
}
}
+ /*
+ * Translate ICC profile names...
+ */
+
+ if ((attr = ppdFindAttr(ppd, "APCustomColorMatchingName", NULL)) != NULL)
+ {
+ if ((text = ppd_text(ppd, "APCustomColorMatchingName", attr->spec,
+ ll_CC, ll)) != NULL)
+ strlcpy(attr->text, text, sizeof(attr->text));
+ }
+
+ for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
+ attr;
+ attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))
+ {
+ cupsArraySave(ppd->sorted_attrs);
+
+ if ((text = ppd_text(ppd, "cupsICCProfile", attr->spec, ll_CC, ll)) != NULL)
+ strlcpy(attr->text, text, sizeof(attr->text));
+
+ cupsArrayRestore(ppd->sorted_attrs);
+ }
+
return (0);
}
/*
- * End of "$Id: localize.c 6367 2007-03-20 01:34:29Z mike $".
+ * End of "$Id: localize.c 6388 2007-03-24 14:21:31Z mike $".
*/
lpoptions -p printer -l
</PRE>
+<H3><A NAME="INSTANCES">Creating Saved Options</A></H3>
+
+<P>Saved options are supported in CUPS through <em>printer
+instances</em>. Printer instances are, as their name implies, copies
+of a printer that have certain options associated with them. Use the
+<B>lpoptions</B> command to create a printer instance:</P>
+
+<PRE CLASS="command">
+lpoptions -p printer/instance -o name=value ...
+</PRE>
+
+<P>The <CODE>-p printer/instance</CODE> option provides the name of
+the instance, which is always the printer name, a slash, and the
+instance name which can contain any printable characters except
+space and slash. The remaining options are then associated with the
+instance instead of the main queue. For example, the following
+command creates a duplex instance of the LaserJet queue:</P>
+
+<PRE CLASS="command">
+lpoptions -p LaserJet/duplex -o sides=two-sided-long-edge
+</PRE>
+
+<P>Instances <em>do not</em> inherit lpoptions from the main
+queue.</P>
+
<H3><A NAME="COPIES">Printing Multiple Copies</A></H3>
<P>Both the <B>lp</B> and <B>lpr</B> commands have options for
/*
- * "$Id: gziptoany.c 6378 2007-03-21 07:18:18Z mike $"
+ * "$Id: gziptoany.c 6400 2007-03-26 14:29:40Z mike $"
*
* GZIP/raw pre-filter for the Common UNIX Printing System (CUPS).
*
while (copies > 0)
{
+ if (!getenv("FINAL_CONTENT_TYPE"))
+ fputs("PAGE: 1 1\n", stderr);
+
cupsFileRewind(fp);
while ((bytes = cupsFileRead(fp, buffer, sizeof(buffer))) > 0)
/*
- * End of "$Id: gziptoany.c 6378 2007-03-21 07:18:18Z mike $".
+ * End of "$Id: gziptoany.c 6400 2007-03-26 14:29:40Z mike $".
*/
/*
- * "$Id: pstops.c 6320 2007-03-08 13:36:56Z mike $"
+ * "$Id: pstops.c 6391 2007-03-24 14:35:56Z mike $"
*
* PostScript filter for the Common UNIX Printing System (CUPS).
*
if (doc->number_up > 1 || doc->fitplot)
continue;
}
- else if (!strncmp(line, "%%EndFeature:", 13))
+ else if (!strncmp(line, "%%EndFeature", 12))
{
feature = 0;
/*
- * End of "$Id: pstops.c 6320 2007-03-08 13:36:56Z mike $".
+ * End of "$Id: pstops.c 6391 2007-03-24 14:35:56Z mike $".
*/
/*
- * "$Id: rastertolabel.c 6235 2007-02-05 21:03:49Z mike $"
+ * "$Id: rastertolabel.c 6401 2007-03-26 14:36:01Z mike $"
*
* Label printer filter for the Common UNIX Printing System (CUPS).
*
* Set label size...
*/
- printf("q%d\n", header->cupsWidth);
+ printf("q%d\n", (header->cupsWidth + 7) & ~7);
break;
case ZEBRA_ZPL :
/*
- * End of "$Id: rastertolabel.c 6235 2007-02-05 21:03:49Z mike $".
+ * End of "$Id: rastertolabel.c 6401 2007-03-26 14:36:01Z mike $".
*/
/*
- * "$Id: auth.c 6361 2007-03-19 16:01:28Z mike $"
+ * "$Id: auth.c 6397 2007-03-25 23:33:32Z mike $"
*
* Authorization routines for the Common UNIX Printing System (CUPS).
*
gss_name_t client_name; /* Client name */
+# ifdef __APPLE__
+ /*
+ * If the weak-linked GSSAPI/Kerberos library is not present, don't try
+ * to use it...
+ */
+
+ if (gss_init_sec_context == NULL)
+ {
+ cupsdLogMessage(CUPSD_LOG_WARN,
+ "GSSAPI/Kerberos authentication failed because the "
+ "Kerberos framework is not present.");
+ return;
+ }
+# endif /* __APPLE__ */
+
con->gss_output_token.length = 0;
/*
/*
- * End of "$Id: auth.c 6361 2007-03-19 16:01:28Z mike $".
+ * End of "$Id: auth.c 6397 2007-03-25 23:33:32Z mike $".
*/
/*
- * "$Id: ipp.c 6383 2007-03-21 20:01:20Z mike $"
+ * "$Id: ipp.c 6397 2007-03-25 23:33:32Z mike $"
*
* IPP routines for the Common UNIX Printing System (CUPS) scheduler.
*
minor_status; /* Minor status code */
+# ifdef __APPLE__
+ /*
+ * If the weak-linked GSSAPI/Kerberos library is not present, don't try
+ * to use it...
+ */
+
+ if (krb5_init_context == NULL)
+ {
+ cupsdLogMessage(CUPSD_LOG_DEBUG,
+ "save_krb5_creds: GSSAPI/Kerberos framework is not "
+ "present");
+ return;
+ }
+# endif /* __APPLE__ */
+
/*
* Setup a cached context for the job filters to use...
*/
/*
- * End of "$Id: ipp.c 6383 2007-03-21 20:01:20Z mike $".
+ * End of "$Id: ipp.c 6397 2007-03-25 23:33:32Z mike $".
*/
/*
- * "$Id: job.c 6376 2007-03-21 06:39:10Z mike $"
+ * "$Id: job.c 6399 2007-03-26 14:27:48Z mike $"
*
* Job management routines for the Common UNIX Printing System (CUPS).
*
envp[envc ++] = printer_name;
if (!printer->remote && !printer->raw &&
- (filter = (mime_filter_t *)cupsArrayLast(filters)) != NULL)
+ (filter = (mime_filter_t *)cupsArrayLast(filters)) != NULL &&
+ filter->dst)
{
snprintf(final_content_type, sizeof(final_content_type),
"FINAL_CONTENT_TYPE=%s/%s",
/*
- * End of "$Id: job.c 6376 2007-03-21 06:39:10Z mike $".
+ * End of "$Id: job.c 6399 2007-03-26 14:27:48Z mike $".
*/
<TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0" SUMMARY="{printer_name}">
<TR>
<TD VALIGN="TOP"><A HREF="{printer_uri_supported}">
-<IMG SRC="/images/printer-{printer_state=3?bezczynna:{printer_state=4?przetwarzanie:zatrzymana}}.gif" CLASS="button" ALT=""></A>
+<IMG SRC="/images/printer-{printer_state=3?idle:{printer_state=4?processing:stopped}}.gif" CLASS="button" ALT=""></A>
</TD>
<TD VALIGN="TOP"><B>Opis:</B> {printer_info}<BR>
<B>Położenie:</B> {printer_location}<BR>
#!/bin/sh
#
-# "$Id: run-stp-tests.sh 6380 2007-03-21 15:18:53Z mike $"
+# "$Id: run-stp-tests.sh 6389 2007-03-24 14:26:04Z mike $"
#
# Perform the complete set of IPP compliance tests specified in the
# CUPS Software Test Plan.
HOME=/tmp/cups-$user
export HOME
+#
+# Force POSIX locale for tests...
+#
+
+LANG=C
+export LANG
+
#
# Start the server; run as foreground daemon in the background...
#
echo ""
#
-# End of "$Id: run-stp-tests.sh 6380 2007-03-21 15:18:53Z mike $"
+# End of "$Id: run-stp-tests.sh 6389 2007-03-24 14:26:04Z mike $"
#
# Bitstream Vera font...
font="fonts/Vera.ttf"
-# Base image
-base="tools/buttons.gif"
-
# Colors
background="#d4d4a4"
black="#000000"
# First step: generate an image trimmed to the text.
# -> annotate a 40x400 rectangle with the provided text
# -> trim to the text
- convert $base -extent 400x40 -fill "$fgclr" \
+ convert xc:transparent -extent 400x40 -fill "$fgclr" \
-draw "rectangle 0,0 399,39" \
-fill "#ffffff" -encoding Unicode -pointsize 13 -font "$font" \
-gravity Center -annotate 0x0+0+0 "$txt" -trim $tmp_btn
btn_w=`expr $txt_w + $rad + $rad`
btn_top=`expr $btn_h - 1`
- convert $base \
+ convert xc:transparent \
-extent $btn_w'x'$btn_h -fill "$bgclr" \
-draw "rectangle 0,0 $btn_w,$btn_h" -fill "$fgclr" \
-draw "roundRectangle 0,0 `expr $btn_w - 1`,$btn_top `expr $rad - 1`,$rad" \