Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 7d9c80dda0 |
+21
-1
@@ -1,6 +1,26 @@
|
||||
CHANGES.txt - 2007-03-15
|
||||
CHANGES.txt - 2007-03-19
|
||||
------------------------
|
||||
|
||||
CHANGES IN CUPS V1.2.10
|
||||
|
||||
- ppdLocalize() now supports localizing for Japanese
|
||||
using the "jp" locale name used by the ppdmerge
|
||||
program from the CUPS DDK 1.1.0 (STR #2301)
|
||||
- _cupsAdminSetServerSettings() did not support changing
|
||||
of top-level directives as designed.
|
||||
- The init script path check was broken.
|
||||
- CUPS incorrectly used the attribute "notify-recipient"
|
||||
instead of "notify-recicpient-uri" in several places
|
||||
(STR #2297)
|
||||
- Fixed a configure script bug on MirBSD (STR #2294)
|
||||
- The pdftops filter did not limit the amount of recursion
|
||||
of page sets (STR #2293)
|
||||
- Custom page sizes with fractional point sizes did not
|
||||
work (STR #2296)
|
||||
- The lpoptions command would crash when adding or removing
|
||||
options on a system with no printers (STR #2295)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.2.9
|
||||
|
||||
- The scheduler did not use the default job-sheets
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
INSTALL - CUPS v1.2.9 - 2007-03-15
|
||||
----------------------------------
|
||||
INSTALL - CUPS v1.2.10 - 2007-03-19
|
||||
-----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source
|
||||
code. For more information on CUPS see the file called
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
README - CUPS v1.2.9 - 2007-03-15
|
||||
---------------------------------
|
||||
README - CUPS v1.2.10 - 2007-03-19
|
||||
----------------------------------
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt"
|
||||
instead...
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* "lpr" command for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Easy Software Products and are protected by Federal
|
||||
@@ -232,7 +232,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
snprintf(email, sizeof(email), "mailto:%s@%s", cupsUser(),
|
||||
httpGetHostname(NULL, buffer, sizeof(buffer)));
|
||||
num_options = cupsAddOption("notify-recipient", email,
|
||||
num_options = cupsAddOption("notify-recipient-uri", email,
|
||||
num_options, &options);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 6296 2007-02-20 16:33:25Z mike $"
|
||||
dnl "$Id: cups-common.m4 6346 2007-03-17 18:07:17Z 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 Version number information...
|
||||
CUPS_VERSION="1.2.9"
|
||||
CUPS_VERSION="1.2.10"
|
||||
CUPS_REVISION=""
|
||||
|
||||
AC_SUBST(CUPS_VERSION)
|
||||
@@ -264,5 +264,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 6296 2007-02-20 16:33:25Z mike $".
|
||||
dnl End of "$Id: cups-common.m4 6346 2007-03-17 18:07:17Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-directories.m4 6333 2007-03-12 20:49:13Z mike $"
|
||||
dnl "$Id: cups-directories.m4 6353 2007-03-19 06:04:35Z mike $"
|
||||
dnl
|
||||
dnl Directory stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -148,7 +148,7 @@ if test x$rcdir = x; then
|
||||
fi
|
||||
;;
|
||||
|
||||
FreeBSD* | OpenBSD* | MirBsD* | ekkoBSD*)
|
||||
FreeBSD* | OpenBSD* | MirBSD* | ekkoBSD*)
|
||||
# FreeBSD and OpenBSD
|
||||
;;
|
||||
|
||||
@@ -343,5 +343,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
|
||||
AC_SUBST(CUPS_STATEDIR)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-directories.m4 6333 2007-03-12 20:49:13Z mike $".
|
||||
dnl End of "$Id: cups-directories.m4 6353 2007-03-19 06:04:35Z mike $".
|
||||
dnl
|
||||
|
||||
+6
-7
@@ -1508,14 +1508,13 @@ _cupsAdminSetServerSettings(
|
||||
}
|
||||
}
|
||||
else if (!in_policy && !in_location &&
|
||||
(val = cupsGetOption(line, num_settings, settings)) != NULL &&
|
||||
!cupsGetOption(line, cupsd_num_settings, cupsd_settings))
|
||||
(val = cupsGetOption(line, num_settings, settings)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Add this directive to the list of directives we have written...
|
||||
* Replace this directive's value with the new one...
|
||||
*/
|
||||
|
||||
cupsd_num_settings = cupsAddOption(line, value, cupsd_num_settings,
|
||||
cupsd_num_settings = cupsAddOption(line, val, cupsd_num_settings,
|
||||
&cupsd_settings);
|
||||
|
||||
/*
|
||||
@@ -1523,7 +1522,7 @@ _cupsAdminSetServerSettings(
|
||||
* only support setting root directives, not in sections...
|
||||
*/
|
||||
|
||||
cupsFilePrintf(temp, "%s %s\n", line, value);
|
||||
cupsFilePrintf(temp, "%s %s\n", line, val);
|
||||
}
|
||||
else if (value)
|
||||
{
|
||||
@@ -1729,8 +1728,8 @@ _cupsAdminSetServerSettings(
|
||||
cupsd_num_settings, &cupsd_settings);
|
||||
|
||||
/*
|
||||
* Write the new value in its place, without indentation since we
|
||||
* only support setting root directives, not in sections...
|
||||
* Write the new value, without indentation since we only support
|
||||
* setting root directives, not in sections...
|
||||
*/
|
||||
|
||||
cupsFilePrintf(temp, "%s %s\n", setting->name, setting->value);
|
||||
|
||||
+2
-2
@@ -68,10 +68,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 1.0209
|
||||
# define CUPS_VERSION 1.0210
|
||||
# define CUPS_VERSION_MAJOR 1
|
||||
# define CUPS_VERSION_MINOR 2
|
||||
# define CUPS_VERSION_PATCH 9
|
||||
# define CUPS_VERSION_PATCH 10
|
||||
# define CUPS_DATE_ANY -1
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ static const _ipp_option_t ipp_options[] =
|
||||
{ "notify-lease-duration", IPP_TAG_INTEGER, IPP_TAG_SUBSCRIPTION },
|
||||
{ "notify-natural-language", IPP_TAG_LANGUAGE, IPP_TAG_SUBSCRIPTION },
|
||||
{ "notify-pull-method", IPP_TAG_KEYWORD, IPP_TAG_SUBSCRIPTION },
|
||||
{ "notify-recipient", IPP_TAG_URI, IPP_TAG_SUBSCRIPTION },
|
||||
{ "notify-recipient-uri", IPP_TAG_URI, IPP_TAG_SUBSCRIPTION },
|
||||
{ "notify-time-interval", IPP_TAG_INTEGER, IPP_TAG_SUBSCRIPTION },
|
||||
{ "notify-user-data", IPP_TAG_STRING, IPP_TAG_SUBSCRIPTION },
|
||||
{ "number-up", IPP_TAG_INTEGER, IPP_TAG_JOB },
|
||||
|
||||
+14
-1
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* PPD custom option routines 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
|
||||
@@ -183,6 +183,19 @@ ppd_text(ppd_file_t *ppd, /* I - PPD file */
|
||||
{
|
||||
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll, keyword);
|
||||
attr = ppdFindAttr(ppd, lkeyword, spec);
|
||||
|
||||
if (!attr && !strcmp(ll, "ja"))
|
||||
{
|
||||
/*
|
||||
* Due to a bug in the CUPS DDK 1.1.0 ppdmerge program, Japanese
|
||||
* PPD files were incorrectly assigned "jp" as the locale name
|
||||
* instead of "ja". Support both the old (incorrect) and new
|
||||
* locale names for Japanese...
|
||||
*/
|
||||
|
||||
snprintf(lkeyword, sizeof(lkeyword), "jp.%s", keyword);
|
||||
attr = ppdFindAttr(ppd, lkeyword, spec);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
+2
-2
@@ -266,9 +266,9 @@ _cupsStrFormatd(char *buf, /* I - String */
|
||||
tempptr < tempdec && bufptr < bufend;
|
||||
*bufptr++ = *tempptr++);
|
||||
|
||||
tempdec += declen;
|
||||
tempptr += declen;
|
||||
|
||||
if (*tempdec && bufptr < bufend)
|
||||
if (*tempptr && bufptr < bufend)
|
||||
{
|
||||
*bufptr++ = '.';
|
||||
|
||||
|
||||
+37
-1
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include "i18n.h"
|
||||
#include "string.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -44,10 +45,24 @@ int /* O - Exit status */
|
||||
main(int argc, /* I - Number of command-line arguments */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
int errors = 0; /* Number of errors */
|
||||
cups_lang_t *language; /* Message catalog */
|
||||
cups_lang_t *language2; /* Message catalog */
|
||||
struct lconv *loc; /* Locale data */
|
||||
char buffer[1024]; /* String buffer */
|
||||
double number; /* Number */
|
||||
static const char * const tests[] = /* Test strings */
|
||||
{
|
||||
"1",
|
||||
"-1",
|
||||
"3",
|
||||
"5.125"
|
||||
};
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
language = cupsLangDefault();
|
||||
@@ -61,6 +76,8 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
if (language != language2)
|
||||
{
|
||||
errors ++;
|
||||
|
||||
puts("**** ERROR: Language cache did not work! ****");
|
||||
puts("First result from cupsLangGet:");
|
||||
}
|
||||
@@ -80,7 +97,26 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
printf("Yes = \"%s\"\n", _cupsLangString(language2, "Yes"));
|
||||
}
|
||||
|
||||
return (0);
|
||||
loc = localeconv();
|
||||
|
||||
for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i ++)
|
||||
{
|
||||
number = _cupsStrScand(tests[i], NULL, loc);
|
||||
|
||||
printf("_cupsStrScand(\"%s\") number=%f\n", tests[i], number);
|
||||
|
||||
_cupsStrFormatd(buffer, buffer + sizeof(buffer), number, loc);
|
||||
|
||||
printf("_cupsStrFormatd(%f) buffer=\"%s\"\n", number, buffer);
|
||||
|
||||
if (strcmp(buffer, tests[i]))
|
||||
{
|
||||
errors ++;
|
||||
puts("**** ERROR: Bad formatted number! ****");
|
||||
}
|
||||
}
|
||||
|
||||
return (errors > 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -137,142 +137,3 @@ WIDTH="15" HEIGHT="15" ALT=""></TD>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>Accueil - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/favicon.ico" TYPE="image/x-icon">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE WIDTH="100%" STYLE="height: 100%;" BORDER="0" CELLSPACING="0" CELLPADDING="0" SUMMARY="Common UNIX Printing System @CUPS_VERSION@">
|
||||
<TR CLASS="header">
|
||||
<TD VALIGN="TOP" WIDTH="15" ROWSPAN="2"><IMG SRC="/images/top-left.gif" WIDTH="15" HEIGHT="80" ALT=""></TD>
|
||||
<TD VALIGN="TOP" WIDTH="55" ROWSPAN="2"><IMG SRC="/images/top-middle.gif" WIDTH="55" HEIGHT="80" ALT=""></TD>
|
||||
<TD WIDTH="100%" HEIGHT="60"><H1>Common UNIX Printing System @CUPS_VERSION@@CUPS_REVISION@</H1></TD>
|
||||
<TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="15" ROWSPAN="2"><IMG
|
||||
SRC="/images/top-right.gif" WIDTH="15" HEIGHT="15" ALT=""></TD>
|
||||
</TR>
|
||||
<TR CLASS="header"><TD WIDTH="100%" VALIGN="BOTTOM" NOWRAP>
|
||||
|
||||
<A CLASS="sel" HREF="/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
|
||||
HEIGHT="4" ALIGN="TOP" BORDER="0"
|
||||
ALT=""> Accueil <IMG
|
||||
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
|
||||
BORDER="0" ALT=""></A>
|
||||
|
||||
<A CLASS="unsel" HREF="/admin/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
|
||||
HEIGHT="4" ALIGN="TOP" BORDER="0"
|
||||
ALT=""> Administration <IMG
|
||||
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
|
||||
BORDER="0" ALT=""></A>
|
||||
|
||||
<A CLASS="unsel" HREF="/classes/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
|
||||
HEIGHT="4" ALIGN="TOP" BORDER="0"
|
||||
ALT=""> Classes <IMG
|
||||
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
|
||||
BORDER="0" ALT=""></A>
|
||||
|
||||
<A CLASS="unsel" HREF="/help/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
|
||||
HEIGHT="4" ALIGN="TOP" BORDER="0"
|
||||
ALT=""> Documentation/Aide <IMG
|
||||
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
|
||||
BORDER="0" ALT=""></A>
|
||||
|
||||
<A CLASS="unsel" HREF="/jobs/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
|
||||
HEIGHT="4" ALIGN="TOP" BORDER="0"
|
||||
ALT=""> Tâches <IMG
|
||||
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
|
||||
BORDER="0" ALT=""></A>
|
||||
|
||||
<A CLASS="unsel" HREF="/printers/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
|
||||
HEIGHT="4" ALIGN="TOP" BORDER="0"
|
||||
ALT=""> Imprimantes <IMG
|
||||
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
|
||||
BORDER="0" ALT=""></A>
|
||||
|
||||
</TD></TR>
|
||||
<TR CLASS="page">
|
||||
<TD WIDTH="15"> </TD>
|
||||
<TD COLSPAN="2" WIDTH="100%" VALIGN="TOP" CLASS="page">
|
||||
|
||||
<H2 CLASS="title">Bienvenue !</H2>
|
||||
|
||||
<P>Ces pages Web vous permettent de gérer vos imprimantes et vos tâches
|
||||
d'impression comme d'administrer le système. Cliquez sur les onglets ci-dessus ou
|
||||
sur les boutons ci-dessous pour effectuer une action.</P>
|
||||
|
||||
<P>
|
||||
<A HREF="/help/"><IMG SRC="/images/button-help.gif" CLASS="button" ALT="Aide"></A>
|
||||
<A HREF="/admin?OP=add-class"><IMG SRC="/images/button-add-class.gif" CLASS="button" ALT="Ajouter une classe"></A>
|
||||
<A HREF="/admin?OP=add-printer"><IMG SRC="/images/button-add-printer.gif" CLASS="button" ALT="Ajouter une imprimante"></A>
|
||||
<A HREF="/classes"><IMG SRC="/images/button-manage-classes.gif" CLASS="button" ALT="Administrer les classes"></A>
|
||||
<A HREF="/jobs"><IMG SRC="/images/button-manage-jobs.gif" CLASS="button" ALT="Administrer les tâches"></A>
|
||||
<A HREF="/printers"><IMG SRC="/images/button-manage-printers.gif" CLASS="button" ALT="Administrer les imprimantes"></A>
|
||||
<A HREF="/admin"><IMG SRC="/images/button-manage-server.gif" CLASS="button" ALT="Administrer le serveur"></A>
|
||||
</P>
|
||||
|
||||
<P><I>Si l'on vous demande de vous identifier, utilisez votre nom d'utilisateur et
|
||||
votre mot de passe UNIX ou bien identifiez-vous en tant que "root".</I></P>
|
||||
|
||||
<H2 CLASS="title">À propos de CUPS</H2>
|
||||
|
||||
<P>
|
||||
<IMG SRC="/images/happy.gif" ALIGN="LEFT" WIDTH="196" HEIGHT="144"
|
||||
STYLE="padding-right: 10px;" ALT="Ordinateur content et imprimante">
|
||||
|
||||
<A HREF="http://www.easysw.com/"><IMG SRC="/images/esp-logo.gif"
|
||||
ALIGN="RIGHT" WIDTH="110" HEIGHT="68" BORDER="0"
|
||||
STYLE="padding-left: 10px; padding-bottom: 10px;"
|
||||
ALT="Easy Software Products"></A>
|
||||
|
||||
CUPS propose une interface portable pour l'impression sur les systèmes
|
||||
UNIX<SUP>®</SUP>. Ce logiciel est développé et maintenu par <A HREF="http://www.easysw.com">Easy Software
|
||||
Products</a> afin de promouvoir une solution standard pour l'impression. CUPS
|
||||
est le système d'impression standard de MacOS<SUP>®</SUP> X et de la
|
||||
plupart des distributions Linux<SUP>®</SUP>.</P>
|
||||
|
||||
<P>CUPS repose sur le protocole <A HREF="http://www.pwg.org/ipp/"
|
||||
TARGET="_blank">IPP ( Internet Printing Protocol )</A> pour la gestion des tâches
|
||||
d'impression et, pour être utilisable en pratique, y ajoute la détection
|
||||
d'imprimantes en réseau et des options d'impression fondées sur le format PPD (
|
||||
PostScript Printer Description ).<BR CLEAR="ALL"></P>
|
||||
|
||||
<H2 CLASS="title">Pilotes d'imprimante et Assistance</H2>
|
||||
|
||||
<P>Visitez le site officiel de CUPS pour avoir des pilotes d'imprimante ou toute
|
||||
autre assistance:</P>
|
||||
|
||||
<PRE>
|
||||
<A HREF="http://www.cups.org/" TARGET="_blank">www.cups.org</A>
|
||||
</PRE>
|
||||
|
||||
<P>Vous pouvez obtenir un suivi commercial et une version améliorée de CUPS, <A
|
||||
HREF="http://www.easysw.com/printpro/">ESP Print Pro</A>, à l'adresse suivante:</P>
|
||||
|
||||
<PRE>
|
||||
<A HREF="http://www.easysw.com/" TARGET="_blank">www.easysw.com</A>
|
||||
</PRE>
|
||||
|
||||
</TD>
|
||||
<TD WIDTH="15"> </TD>
|
||||
</TR>
|
||||
<TR CLASS="header">
|
||||
<TD VALIGN="BOTTOM" WIDTH="15"><IMG SRC="/images/bottom-left.gif"
|
||||
WIDTH="15" HEIGHT="15" ALT=""></TD>
|
||||
<TD COLSPAN="2" WIDTH="100%" STYLE="padding: 5;">
|
||||
|
||||
<P><SMALL>Le logiciel CUPS ( Common UNIX Printing System ) et son logo sont
|
||||
propriété commerciale de <A HREF="http://www.easysw.com">Easy Software
|
||||
Products</A>. CUPS est sous copyright 1997-2006 par Easy Software Products, Tous
|
||||
Droits Réservés.</SMALL></P>
|
||||
|
||||
</TD>
|
||||
|
||||
<TD ALIGN="RIGHT" VALIGN="BOTTOM" WIDTH="15"><IMG SRC="/images/bottom-right.gif"
|
||||
WIDTH="15" HEIGHT="15" ALT=""></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ unset TMPDIR
|
||||
# provide a standard path on boot-up...
|
||||
#
|
||||
|
||||
if "x$PATH" = x; then
|
||||
if test "x$PATH" = x; then
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
|
||||
else
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH"
|
||||
|
||||
+15
-5
@@ -23,6 +23,12 @@
|
||||
#include "Link.h"
|
||||
#include "Catalog.h"
|
||||
|
||||
// This define is used to limit the depth of recursive readPageTree calls
|
||||
// This is needed because the page tree nodes can reference their parents
|
||||
// leaving us in an infinite loop
|
||||
// Most sane pdf documents don't have a call depth higher than 10
|
||||
#define MAX_CALL_DEPTH 1000
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Catalog
|
||||
//------------------------------------------------------------------------
|
||||
@@ -71,7 +77,7 @@ Catalog::Catalog(XRef *xrefA) {
|
||||
pageRefs[i].num = -1;
|
||||
pageRefs[i].gen = -1;
|
||||
}
|
||||
numPages = readPageTree(pagesDict.getDict(), NULL, 0);
|
||||
numPages = readPageTree(pagesDict.getDict(), NULL, 0, 0);
|
||||
if (numPages != numPages0) {
|
||||
error(-1, "Page count in top-level pages object is incorrect");
|
||||
}
|
||||
@@ -169,7 +175,7 @@ GString *Catalog::readMetadata() {
|
||||
return s;
|
||||
}
|
||||
|
||||
int Catalog::readPageTree(Dict *pagesDict, PageAttrs *attrs, int start) {
|
||||
int Catalog::readPageTree(Dict *pagesDict, PageAttrs *attrs, int start, int callDepth) {
|
||||
Object kids;
|
||||
Object kid;
|
||||
Object kidRef;
|
||||
@@ -214,9 +220,13 @@ int Catalog::readPageTree(Dict *pagesDict, PageAttrs *attrs, int start) {
|
||||
// This should really be isDict("Pages"), but I've seen at least one
|
||||
// PDF file where the /Type entry is missing.
|
||||
} else if (kid.isDict()) {
|
||||
if ((start = readPageTree(kid.getDict(), attrs1, start))
|
||||
< 0)
|
||||
goto err2;
|
||||
if (callDepth > MAX_CALL_DEPTH) {
|
||||
error(-1, "Limit of %d recursive calls reached while reading the page tree. If your document is correct and not a test to try to force a crash, please report a bug.", MAX_CALL_DEPTH);
|
||||
} else {
|
||||
if ((start = readPageTree(kid.getDict(), attrs1, start, callDepth + 1))
|
||||
< 0)
|
||||
goto err2;
|
||||
}
|
||||
} else {
|
||||
error(-1, "Kid object (page %d) is wrong type (%s)",
|
||||
start+1, kid.getTypeName());
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ private:
|
||||
Object acroForm; // AcroForm dictionary
|
||||
GBool ok; // true if catalog is valid
|
||||
|
||||
int readPageTree(Dict *pages, PageAttrs *attrs, int start);
|
||||
int readPageTree(Dict *pages, PageAttrs *attrs, int start, int callDepth);
|
||||
Object *findDestInTree(Object *tree, GString *name, Object *obj);
|
||||
};
|
||||
|
||||
|
||||
@@ -684,7 +684,7 @@ load_ppds(const char *d, /* I - Actual directory */
|
||||
{ "german", "de" },
|
||||
{ "greek", "el" },
|
||||
{ "italian", "it" },
|
||||
{ "japanese", "jp" },
|
||||
{ "japanese", "ja" },
|
||||
{ "norwegian", "no" },
|
||||
{ "polish", "pl" },
|
||||
{ "portuguese", "pt" },
|
||||
|
||||
+3
-3
@@ -4792,7 +4792,7 @@ create_subscription(
|
||||
|
||||
while (attr && attr->group_tag != IPP_TAG_ZERO)
|
||||
{
|
||||
if (!strcmp(attr->name, "notify-recipient") &&
|
||||
if (!strcmp(attr->name, "notify-recipient-uri") &&
|
||||
attr->value_tag == IPP_TAG_URI)
|
||||
{
|
||||
/*
|
||||
@@ -4811,7 +4811,7 @@ create_subscription(
|
||||
resource, sizeof(resource)) < HTTP_URI_OK)
|
||||
{
|
||||
send_ipp_status(con, IPP_NOT_POSSIBLE,
|
||||
_("Bad notify-recipient URI \"%s\"!"), recipient);
|
||||
_("Bad notify-recipient-uri URI \"%s\"!"), recipient);
|
||||
ippAddInteger(con->response, IPP_TAG_SUBSCRIPTION, IPP_TAG_ENUM,
|
||||
"notify-status-code", IPP_URI_SCHEME);
|
||||
return;
|
||||
@@ -4822,7 +4822,7 @@ create_subscription(
|
||||
if (access(notifier, X_OK))
|
||||
{
|
||||
send_ipp_status(con, IPP_NOT_POSSIBLE,
|
||||
_("notify-recipient URI \"%s\" uses unknown scheme!"),
|
||||
_("notify-recipient-uri URI \"%s\" uses unknown scheme!"),
|
||||
recipient);
|
||||
ippAddInteger(con->response, IPP_TAG_SUBSCRIPTION, IPP_TAG_ENUM,
|
||||
"notify-status-code", IPP_URI_SCHEME);
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* "lp" command for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Easy Software Products and are protected by Federal
|
||||
@@ -290,7 +290,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
snprintf(email, sizeof(email), "mailto:%s@%s", cupsUser(),
|
||||
httpGetHostname(NULL, buffer, sizeof(buffer)));
|
||||
num_options = cupsAddOption("notify-recipient", email,
|
||||
num_options = cupsAddOption("notify-recipient-uri", email,
|
||||
num_options, &options);
|
||||
}
|
||||
|
||||
|
||||
@@ -174,6 +174,12 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) == NULL)
|
||||
dest = dests;
|
||||
|
||||
if (dest == NULL)
|
||||
{
|
||||
_cupsLangPuts(stderr, _("lpoptions: No printers!?!\n"));
|
||||
return (1);
|
||||
}
|
||||
|
||||
for (j = 0; j < dest->num_options; j ++)
|
||||
if (cupsGetOption(dest->options[j].name, num_options, options) == NULL)
|
||||
num_options = cupsAddOption(dest->options[j].name,
|
||||
@@ -244,6 +250,12 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) == NULL)
|
||||
dest = dests;
|
||||
|
||||
if (dest == NULL)
|
||||
{
|
||||
_cupsLangPuts(stderr, _("lpoptions: No printers!?!\n"));
|
||||
return (1);
|
||||
}
|
||||
|
||||
for (j = 0; j < dest->num_options; j ++)
|
||||
if (cupsGetOption(dest->options[j].name, num_options, options) == NULL)
|
||||
num_options = cupsAddOption(dest->options[j].name,
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário