Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet c08fe166d8 Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.2.4@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
162 arquivos alterados com 384 adições e 4898 exclusões
+1 -63
Ver Arquivo
@@ -1,68 +1,6 @@
CHANGES.txt - 2006-10-20
CHANGES.txt - 2006-09-21
------------------------
CHANGES IN CUPS V1.2.5
- Documentation updates (STR #2038)
- The SNMP backend no longer uses IPP for Epson printers
(STR #2028)
- Updated the configure script for Tru64 UNIX 5.1 (STR
#2033)
- Tru64 5.1B's getaddrinfo() and getnameinfo() functions
leak file descriptors (STR #2034)
- cupsAddDest() didn't add the parent destination's
options and attributes.
- ppdConflicts() did not handle custom option
constraints.
- Raw printing of gzip'd files did not work (STR #2009)
- The scheduler no longer preserves default option
choices when the new PPD no longer provides the old
default choice (STR #1929)
- The Linux SCSI backend is now only built if the SCSI
development headers are installed.
- USB printing to Minolta printers did not work (STR
#2019)
- Windows clients could not monitor the queue status (STR
#2006)
- The scheduler didn't log the operation name in the
access_log file for Create-Job and Print-Job requests.
- The PostScript filter now separates collated copies
with any required JCL commands so that JCL-based
finishing options act on the individual copies and not
all of the copies as a single document.
- The PostScript filter now disables duplex printing when
printing a 1-page document.
- cups-lpd didn't pass the correct
job-originating-host-name value (STR #2023)
- Fixed some speling errors in the German message catalog
(STR #2012)
- cupstestppd did not catch PPD files with bad
UIConstraints values (STR #2016)
- The USB backend did not work with the current udev-
created printers if the first printer was disconnected
(STR #2017)
- Mirrored and rotated printing did not work with some
documents (STR #2004)
- 2-sided printing with banners did not work properly on
some printers (STR #2018)
- Updated the raw type rule to handle PJL within the
first 4k of a print job (STR #1969)
- Added an Estonian translation (STR #1957)
- Clarified the documentation for the cupsd.conf @LOCAL
and @IF(name) allow/deny functionality (STR #1992)
- The PostScript filters did not escape the Title and For
comments in the print job header (STR #1988)
- The scheduler would use 100% CPU if browsing was
disabled and the cupsd.conf file contained BrowsePoll
lines (STR #1994)
- The cupsDirRead() function did not work properly on
non-POSIX-compliant systems (STR #2001)
- The cupsFile functions didn't handle read/write errors
properly (STR #1996)
- The DBUS support now works with older versions of the
DBUS library.
CHANGES IN CUPS V1.2.4
- The --with-printcap configure option did not work (STR
+1 -2
Ver Arquivo
@@ -1,4 +1,4 @@
CREDITS.txt - 2006-10-02
CREDITS.txt - 2006-04-17
------------------------
Few projects are completed by one person, and CUPS is no exception. We'd
@@ -20,7 +20,6 @@ like to thank the following individuals for their contributions:
testing.
Kiko - Bug fixes.
Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester.
Marek Laane - Estonian translation.
Mark Lawrence - Microsoft interoperability testing.
Jeff Licquia - Bug fixes, beta testing, evangelism.
Jason McMullan - Original CUPS RPM distributions.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
INSTALL - CUPS v1.2.5 - 2006-10-20
INSTALL - CUPS v1.2.0 - 2006-05-08
----------------------------------
This file describes how to compile and install CUPS from source
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
README - CUPS v1.2.5 - 2006-10-20
README - CUPS v1.2.3 - 2006-08-28
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
+2 -2
Ver Arquivo
@@ -80,7 +80,7 @@ void list_devices(void);
int print_device(const char *resource, int fd, int copies);
#if defined(__linux__) && defined(HAVE_SCSI_SG_H)
#ifdef __linux__
# include "scsi-linux.c"
#elif defined(__sgi)
# include "scsi-irix.c"
@@ -90,7 +90,7 @@ int print_device(const char *resource, int fd, int copies);
*/
void list_devices(void) {}
int print_device(const char *resource, int fd, int copies) { return (CUPS_BACKEND_FAILED); }
#endif /* __linux && HAVE_SCSI_SG_H */
#endif /* __linux */
/*
+2 -3
Ver Arquivo
@@ -1728,14 +1728,13 @@ probe_device(snmp_cache_t *device) /* I - Device */
debug_printf("DEBUG: %.3f Probing %s...\n", run_time(), device->addrname);
if (device->make_and_model &&
(!strncasecmp(device->make_and_model, "Epson", 5) ||
!strncasecmp(device->make_and_model, "Kyocera", 7) ||
(!strncasecmp(device->make_and_model, "Kyocera", 7) ||
!strncasecmp(device->make_and_model, "Lexmark", 7) ||
!strncasecmp(device->make_and_model, "Tektronix", 9) ||
!strncasecmp(device->make_and_model, "Xerox", 5)))
{
/*
* Epson, Kyocera, Lexmark, Tektronix, and Xerox printers often lock up on
* Kyocera, Lexmark, Tektronix, and Xerox printers often lock up on
* IPP probes, so exclude them from the IPP connection test...
*/
+48 -63
Ver Arquivo
@@ -79,13 +79,12 @@ print_device(const char *uri, /* I - Device URI */
do
{
/*
* Disable backchannel data when printing to Canon or Minolta USB
* printers - apparently these printers will return the IEEE-1284
* device ID over and over and over when they get a read request...
* Disable backchannel data when printing to Canon USB printers - apparently
* Canon printers will return the IEEE-1284 device ID over and over and over
* when they get a read request...
*/
use_bc = strcasecmp(hostname, "Canon") != 0 ||
strstr(hostname, "Minolta") != NULL;
use_bc = strcasecmp(hostname, "Canon") != 0;
if ((device_fd = open_device(uri, &use_bc)) == -1)
{
@@ -186,52 +185,44 @@ void
list_devices(void)
{
#ifdef __linux
int i; /* Looping var */
int fd; /* File descriptor */
char device[255], /* Device filename */
device_id[1024], /* Device ID string */
device_uri[1024], /* Device URI string */
make_model[1024]; /* Make and model */
int i; /* Looping var */
int fd; /* File descriptor */
char format[255], /* Format for device filename */
device[255], /* Device filename */
device_id[1024], /* Device ID string */
device_uri[1024], /* Device URI string */
make_model[1024]; /* Make and model */
/*
* Try to open each USB device...
* First figure out which USB printer filename to use...
*/
if (!access("/dev/usblp0", 0))
strcpy(format, "/dev/usblp%d");
else if (!access("/dev/usb/usblp0", 0))
strcpy(format, "/dev/usb/usblp%d");
else
strcpy(format, "/dev/usb/lp%d");
/*
* Then open each USB device...
*/
for (i = 0; i < 16; i ++)
{
/*
* Linux has a long history of changing the standard filenames used
* for USB printer devices. We get the honor of trying them all...
*/
sprintf(device, format, i);
sprintf(device, "/dev/usblp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0)
if ((fd = open(device, O_RDWR | O_EXCL)) >= 0)
{
if (errno != ENOENT)
continue;
if (!backendGetDeviceID(fd, device_id, sizeof(device_id),
make_model, sizeof(make_model),
"usb", device_uri, sizeof(device_uri)))
printf("direct %s \"%s\" \"%s USB #%d\" \"%s\"\n", device_uri,
make_model, make_model, i + 1, device_id);
sprintf(device, "/dev/usb/lp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0)
{
if (errno != ENOENT)
continue;
sprintf(device, "/dev/usb/usblp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0)
continue;
}
close(fd);
}
if (!backendGetDeviceID(fd, device_id, sizeof(device_id),
make_model, sizeof(make_model),
"usb", device_uri, sizeof(device_uri)))
printf("direct %s \"%s\" \"%s USB #%d\" \"%s\"\n", device_uri,
make_model, make_model, i + 1, device_id);
close(fd);
}
#elif defined(__sgi)
#elif defined(__sun) && defined(ECPPIOC_GETDEVID)
@@ -318,41 +309,35 @@ open_device(const char *uri, /* I - Device URI */
int i; /* Looping var */
int busy; /* Are any ports busy? */
char device[255], /* Device filename */
char format[255], /* Format for device filename */
device[255], /* Device filename */
device_id[1024], /* Device ID string */
make_model[1024], /* Make and model */
device_uri[1024]; /* Device URI string */
/*
* Find the correct USB device...
* First figure out which USB printer filename to use...
*/
if (!access("/dev/usblp0", 0))
strcpy(format, "/dev/usblp%d");
else if (!access("/dev/usb/usblp0", 0))
strcpy(format, "/dev/usb/usblp%d");
else
strcpy(format, "/dev/usb/lp%d");
/*
* Then find the correct USB device...
*/
do
{
for (busy = 0, i = 0; i < 16; i ++)
{
/*
* Linux has a long history of changing the standard filenames used
* for USB printer devices. We get the honor of trying them all...
*/
sprintf(device, format, i);
sprintf(device, "/dev/usblp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0 && errno == ENOENT)
{
sprintf(device, "/dev/usb/lp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0 && errno == ENOENT)
{
sprintf(device, "/dev/usb/usblp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0 && errno == ENOENT)
continue;
}
}
if (fd >= 0)
if ((fd = open(device, O_RDWR | O_EXCL)) >= 0)
{
backendGetDeviceID(fd, device_id, sizeof(device_id),
make_model, sizeof(make_model),
+4 -4
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: mime.types 6003 2006-10-02 16:26:04Z mike $"
# "$Id: mime.types 5402 2006-04-14 19:21:03Z mike $"
#
# MIME types file for the Common UNIX Printing System (CUPS).
#
@@ -154,8 +154,8 @@ application/vnd.cups-raster string(0,"RaSt") string(0,"tSaR")
application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
string(0,<1B>@) \
(contains(0,128,<1B>%-12345X) + \
(contains(0,4096,"LANGUAGE=PCL") \
contains(0,4096,"LANGUAGE = PCL")))
(contains(0,1024,"LANGUAGE=PCL") \
contains(0,1024,"LANGUAGE = PCL")))
########################################################################
#
@@ -167,5 +167,5 @@ application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
application/octet-stream
#
# End of "$Id: mime.types 6003 2006-10-02 16:26:04Z mike $".
# End of "$Id: mime.types 5402 2006-04-14 19:21:03Z mike $".
#
+7 -9
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-common.m4 6032 2006-10-12 19:19:47Z mike $"
dnl "$Id: cups-common.m4 5930 2006-09-07 19:49:34Z 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.4"
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'`"
@@ -132,7 +132,6 @@ AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
AC_CHECK_HEADER(usersec.h,AC_DEFINE(HAVE_USERSEC_H))
AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
AC_CHECK_HEADER(scsi/sg.h,AC_DEFINE(HAVE_SCSI_SG_H))
dnl Checks for string functions.
AC_CHECK_FUNCS(strdup strcasecmp strncasecmp strlcat strlcpy)
@@ -232,13 +231,12 @@ case $uname in
AC_MSG_CHECKING(for DBUS)
if $PKGCONFIG --exists dbus-1; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_DBUS)
CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
CUPSDLIBS="`$PKGCONFIG --libs dbus-1`"
DBUSDIR="/etc/dbus-1/system.d"
AC_CHECK_LIB(dbus-1,
dbus_message_iter_init_append,
AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
AC_DEFINE(HAVE_DBUS)
CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
CUPSDLIBS="`$PKGCONFIG --libs dbus-1`"
DBUSDIR="/etc/dbus-1/system.d")
else
AC_MSG_RESULT(no)
fi
@@ -267,5 +265,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 5930 2006-09-07 19:49:34Z mike $".
dnl
+10 -31
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-compiler.m4 6049 2006-10-20 15:07:21Z mike $"
dnl "$Id: cups-compiler.m4 5705 2006-06-30 01:07:29Z mike $"
dnl
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -93,7 +93,6 @@ PIEFLAGS=""
AC_SUBST(PIEFLAGS)
if test -n "$GCC"; then
# Add GCC-specific compiler options...
if test -z "$OPTIM"; then
if test "x$with_optim" = x; then
# Default to optimize-for-size and debug
@@ -274,7 +273,6 @@ if test -n "$GCC"; then
;;
esac
else
# Add vendor-specific compiler options...
case $uname in
AIX*)
if test -z "$OPTIM"; then
@@ -360,16 +358,6 @@ else
fi
fi
;;
OSF*)
# Tru64 UNIX aka Digital UNIX aka OSF/1
if test -z "$OPTIM"; then
if test "x$with_optim" = x; then
OPTIM="-O"
else
OPTIM="$with_optim"
fi
fi
;;
SunOS*)
# Solaris
if test -z "$OPTIM"; then
@@ -461,25 +449,16 @@ else
esac
fi
# Add general compiler options per platform...
case $uname in
HP-UX*)
# HP-UX 10.20 (at least) needs this definition to get the
# h_errno global...
OPTIM="$OPTIM -D_XOPEN_SOURCE_EXTENDED"
if test $uname = HP-UX; then
# HP-UX 10.20 (at least) needs this definition to get the
# h_errno global...
OPTIM="$OPTIM -D_XOPEN_SOURCE_EXTENDED"
# HP-UX 11.00 (at least) needs this definition to get the
# u_short type used by the IP headers...
OPTIM="$OPTIM -D_INCLUDE_HPUX_SOURCE"
;;
OSF*)
# Tru64 UNIX aka Digital UNIX aka OSF/1 need to be told
# to be POSIX-compliant...
OPTIM="$OPTIM -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_OSF_SOURCE"
;;
esac
# HP-UX 11.00 (at least) needs this definition to get the
# u_short type used by the IP headers...
OPTIM="$OPTIM -D_INCLUDE_HPUX_SOURCE"
fi
dnl
dnl End of "$Id: cups-compiler.m4 6049 2006-10-20 15:07:21Z mike $".
dnl End of "$Id: cups-compiler.m4 5705 2006-06-30 01:07:29Z mike $".
dnl
+3 -3
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-defaults.m4 6003 2006-10-02 16:26:04Z mike $"
dnl "$Id: cups-defaults.m4 5980 2006-09-21 19:01:55Z mike $"
dnl
dnl Default cupsd configuration settings for the Common UNIX Printing System
dnl (CUPS).
@@ -28,7 +28,7 @@ AC_ARG_WITH(languages, [ --with-languages set installed languages, defau
if test "x$withval" != xno; then
LANGUAGES="$withval"
fi,
LANGUAGES="de es et ja pl sv")
LANGUAGES="de es ja pl sv")
AC_SUBST(LANGUAGES)
dnl Default ConfigFilePerm
@@ -252,5 +252,5 @@ fi
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP")
dnl
dnl End of "$Id: cups-defaults.m4 6003 2006-10-02 16:26:04Z mike $".
dnl End of "$Id: cups-defaults.m4 5980 2006-09-21 19:01:55Z mike $".
dnl
+4 -9
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-network.m4 6049 2006-10-20 15:07:21Z mike $"
dnl "$Id: cups-network.m4 5634 2006-06-06 17:48:27Z mike $"
dnl
dnl Networking stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -24,17 +24,12 @@ dnl
AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(gethostbyaddr, nsl)
AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
AC_SEARCH_LIBS(rresvport_af, nsl, AC_DEFINE(HAVE_RRESVPORT_AF))
# Tru64 5.1b leaks file descriptors with these functions; disable until
# we can come up with a test for this...
if test "$uname" != "OSF1"; then
AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
fi
AC_CHECK_MEMBER(struct sockaddr.sa_len,,, [#include <sys/socket.h>])
AC_CHECK_HEADER(sys/sockio.h, AC_DEFINE(HAVE_SYS_SOCKIO_H))
@@ -90,5 +85,5 @@ AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
dnl
dnl End of "$Id: cups-network.m4 6049 2006-10-20 15:07:21Z mike $".
dnl End of "$Id: cups-network.m4 5634 2006-06-06 17:48:27Z mike $".
dnl
+2 -8
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-threads.m4 6012 2006-10-03 22:35:12Z mike $"
dnl "$Id: cups-threads.m4 5466 2006-04-26 19:52:27Z mike $"
dnl
dnl Threading stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -44,12 +44,6 @@ 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
# be POSIX-compliant... :(
if test $uname = SunOS; then
PTHREAD_FLAGS="$PTHREAD_FLAGS _POSIX_PTHREAD_SEMANTICS"
fi
break
fi
done
@@ -59,5 +53,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 5466 2006-04-26 19:52:27Z mike $".
dnl
-8
Ver Arquivo
@@ -147,13 +147,6 @@
#undef HAVE_CRYPT_H
/*
* Do we have <scsi/sg.h>?
*/
#undef HAVE_SCSI_SG_H
/*
* Use <string.h>, <strings.h>, and/or <bstring.h>?
*/
@@ -441,7 +434,6 @@
*/
#undef HAVE_DBUS
#undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
/*
+2 -2
Ver Arquivo
@@ -61,10 +61,10 @@ extern "C" {
* Constants...
*/
# define CUPS_VERSION 1.0205
# define CUPS_VERSION 1.0204
# define CUPS_VERSION_MAJOR 1
# define CUPS_VERSION_MINOR 2
# define CUPS_VERSION_PATCH 5
# define CUPS_VERSION_PATCH 4
# define CUPS_DATE_ANY -1
+13 -55
Ver Arquivo
@@ -64,31 +64,21 @@ static int cups_get_sdests(http_t *http, ipp_op_t op, int num_dests,
/*
* 'cupsAddDest()' - Add a destination to the list of destinations.
*
* This function cannot be used to add a new class or printer queue,
* it only adds a new container of saved options for the named
* destination or instance.
*
* If the named destination already exists, the destination list is
* returned unchanged. Adding a new instance of a destination creates
* a copy of that destination's options.
*
* Use the cupsSaveDests() function to save the updated list of
* destinations to the user's lpoptions file.
* Use the cupsSaveDests() function to save the updated list of destinations
* to the user's lpoptions file.
*/
int /* O - New number of destinations */
cupsAddDest(const char *name, /* I - Destination name */
const char *instance, /* I - Instance name or NULL for none/primary */
cupsAddDest(const char *name, /* I - Name of destination */
const char *instance, /* I - Instance of destination or NULL for none/primary */
int num_dests, /* I - Number of destinations */
cups_dest_t **dests) /* IO - Destinations */
{
int i; /* Looping var */
cups_dest_t *dest; /* Destination pointer */
cups_dest_t *parent; /* Parent destination */
cups_option_t *option; /* Current option */
if (!name || !dests)
if (name == NULL || dests == NULL)
return (0);
if ((dest = cupsGetDest(name, instance, num_dests, *dests)) != NULL)
@@ -108,53 +98,27 @@ cupsAddDest(const char *name, /* I - Destination name */
*dests = dest;
/*
* Find where to insert the destination...
*/
for (i = num_dests; i > 0; i --, dest ++)
if (strcasecmp(name, dest->name) < 0)
break;
else if (!instance && dest->instance)
break;
else if (!strcasecmp(name, dest->name) &&
instance && dest->instance &&
instance != NULL && dest->instance != NULL &&
strcasecmp(instance, dest->instance) < 0)
break;
if (i > 0)
memmove(dest + 1, dest, i * sizeof(cups_dest_t));
/*
* Initialize the destination...
*/
dest->name = strdup(name);
dest->is_default = 0;
dest->num_options = 0;
dest->options = (cups_option_t *)0;
if (!instance)
if (instance == NULL)
dest->instance = NULL;
else
{
/*
* Copy options from the primary instance...
*/
dest->instance = strdup(instance);
if ((parent = cupsGetDest(name, NULL, num_dests + 1, *dests)) != NULL)
{
for (i = parent->num_options, option = parent->options;
i > 0;
i --, option ++)
dest->num_options = cupsAddOption(option->name, option->value,
dest->num_options,
&(dest->options));
}
}
return (num_dests + 1);
}
@@ -196,18 +160,18 @@ cupsFreeDests(int num_dests, /* I - Number of destinations */
*/
cups_dest_t * /* O - Destination pointer or NULL */
cupsGetDest(const char *name, /* I - Destination name or NULL for the default destination */
const char *instance, /* I - Instance name or NULL */
cupsGetDest(const char *name, /* I - Name of destination */
const char *instance, /* I - Instance of destination */
int num_dests, /* I - Number of destinations */
cups_dest_t *dests) /* I - Destinations */
{
int comp; /* Result of comparison */
if (num_dests <= 0 || !dests)
if (num_dests == 0 || dests == NULL)
return (NULL);
if (!name)
if (name == NULL)
{
/*
* NULL name for default printer.
@@ -234,9 +198,9 @@ cupsGetDest(const char *name, /* I - Destination name or NULL for the default
return (NULL);
else if (comp == 0)
{
if ((!instance && !dests->instance) ||
if ((instance == NULL && dests->instance == NULL) ||
(instance != NULL && dests->instance != NULL &&
!strcasecmp(instance, dests->instance)))
strcasecmp(instance, dests->instance) == 0))
return (dests);
}
@@ -256,9 +220,6 @@ cupsGetDest(const char *name, /* I - Destination name or NULL for the default
* printer-info, printer-is-accepting-jobs, printer-is-shared,
* printer-make-and-model, printer-state, printer-state-change-time,
* printer-state-reasons, and printer-type attributes as options.
*
* Use the cupsFreeDests() function to free the destination list and
* the cupsGetDest() function to find a particular destination.
*/
int /* O - Number of destinations */
@@ -291,9 +252,6 @@ cupsGetDests(cups_dest_t **dests) /* O - Destinations */
* printer-make-and-model, printer-state, printer-state-change-time,
* printer-state-reasons, and printer-type attributes as options.
*
* Use the cupsFreeDests() function to free the destination list and
* the cupsGetDest() function to find a particular destination.
*
* @since CUPS 1.1.21@
*/
+2 -28
Ver Arquivo
@@ -347,12 +347,10 @@ cupsDirOpen(const char *directory) /* I - Directory name */
cups_dentry_t * /* O - Directory entry */
cupsDirRead(cups_dir_t *dp) /* I - Directory */
{
struct dirent *entry; /* Pointer to entry */
char filename[1024]; /* Full filename */
# ifdef HAVE_PTHREAD_H
char buffer[sizeof(struct dirent) + 1024];
/* Directory entry buffer */
# endif /* HAVE_PTHREAD_H */
struct dirent *entry; /* Pointer to entry */
char filename[1024]; /* Full filename */
DEBUG_printf(("cupsDirRead(dp=%p)\n", dp));
@@ -370,11 +368,6 @@ cupsDirRead(cups_dir_t *dp) /* I - Directory */
for (;;)
{
# ifdef HAVE_PTHREAD_H
/*
* Read the next entry using the reentrant version of readdir...
*/
if (readdir_r(dp->dir, (struct dirent *)buffer, &entry))
{
DEBUG_printf((" readdir_r() failed - %s\n", strerror(errno)));
@@ -389,25 +382,6 @@ cupsDirRead(cups_dir_t *dp) /* I - Directory */
DEBUG_printf((" readdir_r() returned \"%s\"...\n", entry->d_name));
# else
/*
* Read the next entry using the original version of readdir...
*/
if ((entry = readdir(dp->dir)) == NULL)
{
DEBUG_puts(" readdir() returned a NULL pointer!");
return (NULL);
}
DEBUG_printf((" readdir() returned \"%s\"...\n", entry->d_name));
# endif /* HAVE_PTHREAD_H */
/*
* Skip "." and ".."...
*/
if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))
continue;
+8 -8
Ver Arquivo
@@ -377,7 +377,7 @@ cupsFileFind(const char *filename, /* I - File to find */
int /* O - 0 on success, -1 on error */
cupsFileFlush(cups_file_t *fp) /* I - CUPS file */
{
ssize_t bytes; /* Bytes to write */
size_t bytes; /* Bytes to write */
DEBUG_printf(("cupsFileFlush(fp=%p)\n", fp));
@@ -991,7 +991,7 @@ cupsFilePrintf(cups_file_t *fp, /* I - CUPS file */
...) /* I - Additional args as necessary */
{
va_list ap; /* Argument list */
ssize_t bytes; /* Formatted size */
size_t bytes; /* Formatted size */
char buf[8192]; /* Formatted text */
@@ -1090,7 +1090,7 @@ int /* O - Number of bytes written or -1 */
cupsFilePuts(cups_file_t *fp, /* I - CUPS file */
const char *s) /* I - String to write */
{
ssize_t bytes; /* Bytes to write */
size_t bytes; /* Bytes to write */
/*
@@ -1149,8 +1149,8 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
char *buf, /* O - Buffer */
size_t bytes) /* I - Number of bytes to read */
{
size_t total; /* Total bytes read */
ssize_t count; /* Bytes read */
size_t total, /* Total bytes read */
count; /* Bytes read */
DEBUG_printf(("cupsFileRead(fp=%p, buf=%p, bytes=%ld)\n", fp, buf,
@@ -1274,7 +1274,7 @@ off_t /* O - New file position or -1 */
cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
off_t pos) /* I - Position in file */
{
ssize_t bytes; /* Number bytes in buffer */
size_t bytes; /* Number bytes in buffer */
DEBUG_printf(("cupsFileSeek(fp=%p, pos=" CUPS_LLFMT ")\n", fp, pos));
@@ -2030,8 +2030,8 @@ cups_write(cups_file_t *fp, /* I - CUPS file */
const char *buf, /* I - Buffer */
size_t bytes) /* I - Number bytes */
{
size_t total; /* Total bytes written */
ssize_t count; /* Count this time */
size_t total, /* Total bytes written */
count; /* Count this time */
DEBUG_printf(("cups_write(fp=%p, buf=%p, bytes=%ld)\n", fp, buf,
+26 -17
Ver Arquivo
@@ -62,14 +62,15 @@ static void ppd_defaults(ppd_file_t *ppd, ppd_group_t *g);
int /* O - Number of conflicts found */
ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
{
int i, j, /* Looping variables */
int i, j, k, /* Looping variables */
conflicts; /* Number of conflicts */
ppd_const_t *c; /* Current constraint */
ppd_group_t *g, *sg; /* Groups */
ppd_option_t *o1, *o2; /* Options */
ppd_choice_t *c1, *c2; /* Choices */
if (!ppd)
if (ppd == NULL)
return (0);
/*
@@ -78,8 +79,15 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
conflicts = 0;
for (o1 = ppdFirstOption(ppd); o1; o1 = ppdNextOption(ppd))
o1->conflicted = 0;
for (i = ppd->num_groups, g = ppd->groups; i > 0; i --, g ++)
{
for (j = g->num_options, o1 = g->options; j > 0; j --, o1 ++)
o1->conflicted = 0;
for (j = g->num_subgroups, sg = g->subgroups; j > 0; j --, sg ++)
for (k = sg->num_options, o1 = sg->options; k > 0; k --, o1 ++)
o1->conflicted = 0;
}
/*
* Loop through all of the UI constraints and flag any options
@@ -94,9 +102,9 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
o1 = ppdFindOption(ppd, c->option1);
if (!o1)
if (o1 == NULL)
continue;
else if (c->choice1[0])
else if (c->choice1[0] != '\0')
{
/*
* This constraint maps to a specific choice.
@@ -114,10 +122,10 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
if (c1->marked)
break;
if (!j ||
!strcasecmp(c1->choice, "None") ||
!strcasecmp(c1->choice, "Off") ||
!strcasecmp(c1->choice, "False"))
if (j == 0 ||
strcasecmp(c1->choice, "None") == 0 ||
strcasecmp(c1->choice, "Off") == 0 ||
strcasecmp(c1->choice, "False") == 0)
c1 = NULL;
}
@@ -127,9 +135,9 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
o2 = ppdFindOption(ppd, c->option2);
if (!o2)
if (o2 == NULL)
continue;
else if (c->choice2[0])
else if (c->choice2[0] != '\0')
{
/*
* This constraint maps to a specific choice.
@@ -147,10 +155,10 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
if (c2->marked)
break;
if (!j ||
!strcasecmp(c2->choice, "None") ||
!strcasecmp(c2->choice, "Off") ||
!strcasecmp(c2->choice, "False"))
if (j == 0 ||
strcasecmp(c2->choice, "None") == 0 ||
strcasecmp(c2->choice, "Off") == 0 ||
strcasecmp(c2->choice, "False") == 0)
c2 = NULL;
}
@@ -158,7 +166,8 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
* If both options are marked then there is a conflict...
*/
if (c1 && c1->marked && c2 && c2->marked)
if (c1 != NULL && c1->marked &&
c2 != NULL && c2->marked)
{
DEBUG_printf(("%s->%s conflicts with %s->%s (%s %s %s %s)\n",
o1->keyword, c1->choice, o2->keyword, c2->choice,
+2 -112
Ver Arquivo
@@ -1549,18 +1549,6 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
goto error;
case 2 : /* Two options... */
/*
* Check for broken constraints like "* Option"...
*/
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
(!strcmp(constraint->option1, "*") ||
!strcmp(constraint->choice1, "*")))
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
/*
* The following strcpy's are safe, as optionN and
* choiceN are all the same size (size defined by PPD spec...)
@@ -1568,38 +1556,17 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if (constraint->option1[0] == '*')
_cups_strcpy(constraint->option1, constraint->option1 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (constraint->choice1[0] == '*')
_cups_strcpy(constraint->option2, constraint->choice1 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
else
_cups_strcpy(constraint->option2, constraint->choice1);
constraint->choice1[0] = '\0';
constraint->choice2[0] = '\0';
break;
case 3 : /* Two options, one choice... */
/*
* Check for broken constraints like "* Option"...
*/
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
(!strcmp(constraint->option1, "*") ||
!strcmp(constraint->choice1, "*") ||
!strcmp(constraint->option2, "*")))
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
/*
* The following _cups_strcpy's are safe, as optionN and
* choiceN are all the same size (size defined by PPD spec...)
@@ -1607,21 +1574,9 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if (constraint->option1[0] == '*')
_cups_strcpy(constraint->option1, constraint->option1 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (constraint->choice1[0] == '*')
{
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
constraint->option2[0] == '*')
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
_cups_strcpy(constraint->choice2, constraint->option2);
_cups_strcpy(constraint->option2, constraint->choice1 + 1);
constraint->choice1[0] = '\0';
@@ -1630,85 +1585,20 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
{
if (constraint->option2[0] == '*')
_cups_strcpy(constraint->option2, constraint->option2 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
constraint->choice2[0] = '\0';
}
break;
case 4 : /* Two options, two choices... */
/*
* Check for broken constraints like "* Option"...
*/
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
(!strcmp(constraint->option1, "*") ||
!strcmp(constraint->choice1, "*") ||
!strcmp(constraint->option2, "*") ||
!strcmp(constraint->choice2, "*")))
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (constraint->option1[0] == '*')
_cups_strcpy(constraint->option1, constraint->option1 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
constraint->choice1[0] == '*')
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (constraint->option2[0] == '*')
_cups_strcpy(constraint->option2, constraint->option2 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
constraint->choice2[0] == '*')
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
break;
}
/*
* Handle CustomFoo option constraints...
*/
if (!strncasecmp(constraint->option1, "Custom", 6) &&
!strcasecmp(constraint->choice1, "True"))
{
_cups_strcpy(constraint->option1, constraint->option1 + 6);
strcpy(constraint->choice1, "Custom");
}
if (!strncasecmp(constraint->option2, "Custom", 6) &&
!strcasecmp(constraint->choice2, "True"))
{
_cups_strcpy(constraint->option2, constraint->option2 + 6);
strcpy(constraint->choice2, "Custom");
}
/*
* Don't add this one as an attribute...
*/
ppd_free(string);
string = NULL;
}
+12 -14
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Temp file utilities for the Common UNIX Printing System (CUPS).
*
* Copyright 1997-2006 by Easy Software Products.
* Copyright 1997-2005 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
@@ -25,9 +25,9 @@
*
* Contents:
*
* cupsTempFd() - Creates a temporary file.
* cupsTempFile() - Generates a temporary filename.
* cupsTempFile2() - Creates a temporary CUPS file.
* cupsTempFd() - Create a temporary file.
* cupsTempFile() - Generate a temporary filename.
* cupsTempFile2() - Create a temporary CUPS file.
*/
/*
@@ -48,13 +48,12 @@
/*
* 'cupsTempFd()' - Creates a temporary file.
* 'cupsTempFd()' - Create a temporary file.
*
* The temporary filename is returned in the filename buffer.
* The temporary file is opened for reading and writing.
* The temporary filename is stored in the filename buffer.
*/
int /* O - New file descriptor or -1 on error */
int /* O - New file descriptor */
cupsTempFd(char *filename, /* I - Pointer to buffer */
int len) /* I - Size of buffer */
{
@@ -159,16 +158,16 @@ cupsTempFd(char *filename, /* I - Pointer to buffer */
/*
* 'cupsTempFile()' - Generates a temporary filename.
* 'cupsTempFile()' - Generate a temporary filename.
*
* The temporary filename is returned in the filename buffer.
* The temporary filename is stored in the filename buffer.
* This function is deprecated - use cupsTempFd() or cupsTempFile2()
* instead.
*
* @deprecated@
*/
char * /* O - Filename or NULL on error */
char * /* O - Filename */
cupsTempFile(char *filename, /* I - Pointer to buffer */
int len) /* I - Size of buffer */
{
@@ -208,10 +207,9 @@ cupsTempFile(char *filename, /* I - Pointer to buffer */
/*
* 'cupsTempFile2()' - Creates a temporary CUPS file.
* 'cupsTempFile2()' - Create a temporary CUPS file.
*
* The temporary filename is returned in the filename buffer.
* The temporary file is opened for writing.
* The temporary filename is stored in the filename buffer.
*
* @since CUPS 1.2@
*/
-2
Ver Arquivo
@@ -84,8 +84,6 @@ static uri_test_t uri_tests[] = /* URI test data */
"http", "username:password", "server", "/", 8080, 8080 },
{ HTTP_URI_OK, "http://username:passwor%64@server:8080/directory/filename",
"http", "username:password", "server", "/directory/filename", 8080, 8080 },
{ HTTP_URI_OK, "http://[2000::10:100]:631/ipp",
"http", "", "2000::10:100", "/ipp", 631, 631 },
{ HTTP_URI_OK, "https://username:passwor%64@server/directory/filename",
"https", "username:password", "server", "/directory/filename", 443, 0 },
{ HTTP_URI_OK, "ipp://username:passwor%64@[::1]/ipp",
+1 -2
Ver Arquivo
@@ -445,7 +445,6 @@ cupsUTF8ToUTF32(
*/
*dest++ = ch;
continue;
}
else if ((ch & 0xe0) == 0xc0)
{
@@ -541,7 +540,7 @@ cupsUTF8ToUTF32(
* Check for UTF-16 surrogate (illegal UTF-8)...
*/
if (ch32 >= 0xd800 && ch32 <= 0xdfff)
if (*dest >= 0xd800 && *dest <= 0xdfff)
return (-1);
}
+1 -3
Ver Arquivo
@@ -14,12 +14,10 @@ X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
Name=Manage Printing
Comment=CUPS Web Interface
Name[en_US]=Manage Printing
Comment=CUPS Web Interface
Comment[en_US]=CUPS Web Interface
Name[es]=Administrar impresión
Comment[es]=Interfaz Web de CUPS
Name[et]=Trükkimise haldur
Comment[et]=CUPS-i veebiliides
Name[pl]=Zarządzanie drukowaniem
Comment[pl]=Interfejs WWW CUPS
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 595 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 443 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 472 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 563 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 636 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 513 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 612 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 644 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 419 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 355 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 506 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 522 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 721 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 874 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 313 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 451 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 523 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 450 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 571 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 541 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 537 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 552 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 475 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 606 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 768 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 630 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 560 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 649 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 534 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 551 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 709 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 329 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 753 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 742 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 696 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 683 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 567 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 683 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 556 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 529 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 607 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 624 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 537 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 567 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 491 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 500 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 638 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 903 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 687 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 550 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 576 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 758 B

-141
Ver Arquivo
@@ -1,141 +0,0 @@
<!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>Kodu - 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="">&nbsp;&nbsp;Kodu&nbsp;&nbsp;<IMG
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
BORDER="0" ALT=""></A>
&nbsp;<A CLASS="unsel" HREF="/admin/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
HEIGHT="4" ALIGN="TOP" BORDER="0"
ALT="">&nbsp;&nbsp;Haldus&nbsp;&nbsp;<IMG
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
BORDER="0" ALT=""></A>
&nbsp;<A CLASS="unsel" HREF="/classes/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
HEIGHT="4" ALIGN="TOP" BORDER="0"
ALT="">&nbsp;&nbsp;Klassid&nbsp;&nbsp;<IMG
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
BORDER="0" ALT=""></A>
&nbsp;<A CLASS="unsel" HREF="/help/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
HEIGHT="4" ALIGN="TOP" BORDER="0"
ALT="">&nbsp;&nbsp;Dokumentatsioon/Abi&nbsp;&nbsp;<IMG
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
BORDER="0" ALT=""></A>
&nbsp;<A CLASS="unsel" HREF="/jobs/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
HEIGHT="4" ALIGN="TOP" BORDER="0"
ALT="">&nbsp;&nbsp;Tööd&nbsp;&nbsp;<IMG
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
BORDER="0" ALT=""></A>
&nbsp;<A CLASS="unsel" HREF="/printers/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
HEIGHT="4" ALIGN="TOP" BORDER="0"
ALT="">&nbsp;&nbsp;Printerid&nbsp;&nbsp;<IMG
SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
BORDER="0" ALT=""></A>
</TD></TR>
<TR CLASS="page">
<TD WIDTH="15">&nbsp;</TD>
<TD COLSPAN="2" WIDTH="100%" VALIGN="TOP" CLASS="page">
<H2 CLASS="title">Tere tulemast!</H2>
<P>Käesolevad veebileheküljed võimaldavad Teil jälgida oma printereid ja töid
ning süsteemi hallata. Klõpsake vajalike ülesannete sooritamiseks mõnele
ülal paiknevale sakile või all asuvale nupule.</P>
<P>
<A HREF="/help/"><IMG SRC="/images/button-help.gif" CLASS="button" ALT="Abi"></A>
<A HREF="/admin?OP=add-class"><IMG SRC="/images/button-add-class.gif" CLASS="button" ALT="Lisa klass"></A>
<A HREF="/admin?OP=add-printer"><IMG SRC="/images/button-add-printer.gif" CLASS="button" ALT="Lisa printer"></A>
<A HREF="/classes"><IMG SRC="/images/button-manage-classes.gif" CLASS="button" ALT="Halda klasse"></A>
<A HREF="/jobs"><IMG SRC="/images/button-manage-jobs.gif" CLASS="button" ALT="Halda töid"></A>
<A HREF="/printers"><IMG SRC="/images/button-manage-printers.gif" CLASS="button" ALT="Halda printereid"></A>
<A HREF="/admin"><IMG SRC="/images/button-manage-server.gif" CLASS="button" ALT="Halda serverit"></A>
</P>
<P><I>Kui Teie käest päritakse kasutajanime ja parooli, sisestage enda
või administraatori (root) kasutajanimi ja parool.</I></P>
<H2 CLASS="title">CUPS-i info</H2>
<P>
<IMG SRC="/images/happy.gif" ALIGN="LEFT" WIDTH="196" HEIGHT="144"
STYLE="padding-right: 10px;" ALT="Happy Computer and Printer">
<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 pakub porditavat trükkimiskihti
UNIX<SUP>&reg;</SUP> põhistele operatsioonisüsteemidele. CUPS-i töötas
välja ja hooldab <A HREF="http://www.easysw.com">Easy Software
Products</a>, selle siht on edendada standardseid trükkimislahendusi. CUPS on
standardne trükkimissüsteem, mida kasutavad MacOS<SUP>&reg;</SUP> X ja
suurem osa Linux<SUP>&reg;</SUP> distributsioone.</P>
<P>CUPS kasutab <A HREF="http://www.pwg.org/ipp/"
TARGET="_blank"> Interneti trükkimisprotokolli ("IPP")</A>
trükitööde ja järjekordade haldamiseks, lisades sellele
võrguprinterite kasutamise ning PostScript-printerikirjelduste ("PPD")
põhise trükkimise võimalused trükkimise maksimaalseks hõlbustamiseks.<BR CLEAR="ALL"></P>
<H2 CLASS="title">Printeridraiveritest ja abist</H2>
<P>Printeridraiverite ja muu abi leidmiseks külastage CUPS-i
ametlikku veebilehekülge:</P>
<PRE>
<A HREF="http://www.cups.org/" TARGET="_blank">www.cups.org</A>
</PRE>
<P>Kommertstoetus ja CUPS-i täiustatud versioon nimetusega <A
HREF="http://www.easysw.com/printpro/">ESP Print Pro</A> on
saadaval aadressil:</P>
<PRE>
<A HREF="http://www.easysw.com/" TARGET="_blank">www.easysw.com</A>
</PRE>
</TD>
<TD WIDTH="15">&nbsp;</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>Common UNIX Printing System, CUPS ja CUPS-i logo on
firma <A HREF="http://www.easysw.com">Easy Software
Products</A> kaubamärgid. CUPS-i autoriõigus 1997-2006: Easy Software Products,
kõik õigused kaitstud.</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>
+15 -31
Ver Arquivo
@@ -176,16 +176,8 @@ CUPS 1.1 or higher.</p>
<h4>Description</h4>
<p>Add a destination to the list of destinations.
This function cannot be used to add a new class or printer queue,
it only adds a new container of saved options for the named
destination or instance.
If the named destination already exists, the destination list is
returned unchanged. Adding a new instance of a destination creates
a copy of that destination's options.
Use the cupsSaveDests() function to save the updated list of
destinations to the user's lpoptions file.</p>
Use the cupsSaveDests() function to save the updated list of destinations
to the user's lpoptions file.</p>
<h4>Syntax</h4>
<pre>
int
@@ -199,8 +191,8 @@ cupsAddDest(
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>name</tt></td><td>Destination name</td></tr>
<tr><td><tt>instance</tt></td><td>Instance name or NULL for none/primary</td></tr>
<tr><td><tt>name</tt></td><td>Name of destination</td></tr>
<tr><td><tt>instance</tt></td><td>Instance of destination or NULL for none/primary</td></tr>
<tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
<tr><td><tt>dests</tt></td><td>Destinations</td></tr>
</tbody></table></div>
@@ -420,8 +412,8 @@ cupsGetDest(
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>name</tt></td><td>Destination name or NULL for the default destination</td></tr>
<tr><td><tt>instance</tt></td><td>Instance name or NULL</td></tr>
<tr><td><tt>name</tt></td><td>Name of destination</td></tr>
<tr><td><tt>instance</tt></td><td>Instance of destination</td></tr>
<tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
<tr><td><tt>dests</tt></td><td>Destinations</td></tr>
</tbody></table></div>
@@ -435,10 +427,7 @@ cupsGetDest(
Starting with CUPS 1.2, the returned list of destinations include the
printer-info, printer-is-accepting-jobs, printer-is-shared,
printer-make-and-model, printer-state, printer-state-change-time,
printer-state-reasons, and printer-type attributes as options.
Use the cupsFreeDests() function to free the destination list and
the cupsGetDest() function to find a particular destination.</p>
printer-state-reasons, and printer-type attributes as options.</p>
<h4>Syntax</h4>
<pre>
int
@@ -463,9 +452,6 @@ printer-info, printer-is-accepting-jobs, printer-is-shared,
printer-make-and-model, printer-state, printer-state-change-time,
printer-state-reasons, and printer-type attributes as options.
Use the cupsFreeDests() function to free the destination list and
the cupsGetDest() function to find a particular destination.
</p>
<h4>Syntax</h4>
<pre>
@@ -1206,10 +1192,9 @@ cupsSetUser(
<!-- NEW PAGE -->
<h3 class='title'><a name='cupsTempFd'>cupsTempFd()</a></h3>
<h4>Description</h4>
<p>Creates a temporary file.
<p>Create a temporary file.
The temporary filename is returned in the filename buffer.
The temporary file is opened for reading and writing.</p>
The temporary filename is stored in the filename buffer.</p>
<h4>Syntax</h4>
<pre>
int
@@ -1225,13 +1210,13 @@ cupsTempFd(
<tr><td><tt>len</tt></td><td>Size of buffer</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New file descriptor or -1 on error</p>
<p>New file descriptor</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='cupsTempFile'>cupsTempFile()</a></h3>
<h4>Description</h4>
<p>Generates a temporary filename.
<p>Generate a temporary filename.
The temporary filename is returned in the filename buffer.
The temporary filename is stored in the filename buffer.
This function is deprecated - use cupsTempFd() or cupsTempFile2()
instead.
@@ -1251,14 +1236,13 @@ cupsTempFile(
<tr><td><tt>len</tt></td><td>Size of buffer</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Filename or NULL on error</p>
<p>Filename</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsTempFile2'>cupsTempFile2()</a></h3>
<h4>Description</h4>
<p>Creates a temporary CUPS file.
<p>Create a temporary CUPS file.
The temporary filename is returned in the filename buffer.
The temporary file is opened for writing.
The temporary filename is stored in the filename buffer.
</p>
<h4>Syntax</h4>
+1 -2
Ver Arquivo
@@ -112,7 +112,6 @@ require CUPS 1.1 or higher.</p>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>HTTP_ENCODE_CHUNKED</tt> </td><td>Data is chunked</td></tr>
<tr><td><tt>HTTP_ENCODE_FIELDS</tt> </td><td>Sending HTTP fields</td></tr>
<tr><td><tt>HTTP_ENCODE_LENGTH</tt> </td><td>Data is sent with Content-Length</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
@@ -257,7 +256,7 @@ require CUPS 1.1 or higher.</p>
<tr><td><tt>IPP_DOCUMENT_ACCESS_ERROR</tt> </td><td>client-error-document-access-error</td></tr>
<tr><td><tt>IPP_DOCUMENT_FORMAT</tt> </td><td>client-error-document-format-not-supported</td></tr>
<tr><td><tt>IPP_DOCUMENT_FORMAT_ERROR</tt> </td><td>client-error-document-format-error</td></tr>
<tr><td><tt>IPP_ERROR_JOB_CANCELED</tt> </td><td>server-error-job-canceled</td></tr>
<tr><td><tt>IPP_ERROR_JOB_CANCELLED</tt> </td><td>server-error-job-canceled</td></tr>
<tr><td><tt>IPP_FORBIDDEN</tt> </td><td>client-error-forbidden</td></tr>
<tr><td><tt>IPP_GONE</tt> </td><td>client-error-gone</td></tr>
<tr><td><tt>IPP_IGNORED_ALL_NOTIFICATIONS</tt> </td><td>client-error-ignored-all-notifications</td></tr>
+4 -16
Ver Arquivo
@@ -139,10 +139,7 @@ specifies a CIDR netmask, as shown in Table 1.</P>
<P>The <CODE>@LOCAL</CODE> name will allow access from all local
interfaces. The <CODE>@IF(name)</CODE> name will allow access
from the named interface. In both cases, CUPS only allows access
from the network that the interface(s) are configured for -
requests arriving on the interface from a foreign network will
<em>not</em> be accepted.</P>
from the named interface.</P>
<P>The <CODE>Allow</CODE> directive must appear inside a <A
HREF="#Location"><CODE>Location</CODE></A> or <A
@@ -356,10 +353,7 @@ or bit count.</P>
<P>The <CODE>@LOCAL</CODE> name will allow browse data from all
local interfaces. The <CODE>@IF(name)</CODE> name will allow
browse data from the named interface. In both cases, CUPS only
allows data from the network that the interface(s) are configured
for - data arriving on the interface from a foreign network will
<em>not</em> be allowed.</P>
browse data from the named interface.</P>
<H2 CLASS="title"><A NAME="BrowseDeny">BrowseDeny</A></H2>
@@ -394,10 +388,7 @@ or bit count.</P>
<P>The <CODE>@LOCAL</CODE> name will block browse data from all
local interfaces. The <CODE>@IF(name)</CODE> name will block
browse data from the named interface. In both cases, CUPS only
blocks data from the network that the interface(s) are configured
for - data arriving on the interface from a foreign network will
<em>not</em> be blocked.</P>
browse data from the named interface.</P>
<H2 CLASS="title"><A NAME="BrowseInterval">BrowseInterval</A></H2>
@@ -990,10 +981,7 @@ specifies a CIDR netmask, a shown in <A HREF="TABLE1">Table
<P>The <CODE>@LOCAL</CODE> name will deny access from all local
interfaces. The <CODE>@IF(name)</CODE> name will deny access from
the named interface. In both cases, CUPS only denies access from
the network that the interface(s) are configured for - requests
arriving on the interface from a foreign network will
<em>not</em> be denied.</P>
the named interface.</P>
<P>The <CODE>Deny</CODE> directive must appear inside a <A
HREF="#Location"><CODE>Location</CODE></A> or <A
+2 -18
Ver Arquivo
@@ -8,7 +8,7 @@
</head>
<body>
<!--
"$Id: spec-ppd.html 6025 2006-10-11 14:59:20Z mike $"
"$Id: spec-ppd.html 5496 2006-05-05 19:26:23Z mike $"
CUPS PPD extensions specification for the Common UNIX Printing System (CUPS).
@@ -106,21 +106,6 @@ default value is <code>true</code>.</p>
<p>Also see the related <tt>cupsFlipDuplex</tt> attribute.</p>
<h3>cupsEvenDuplex</h3>
<p class='summary'>*cupsEvenDuplex: boolean</p>
<p>This boolean attribute notifies the RIP filters that the
destination printer requires an even number of pages when 2-sided
printing is selected. The default value is <code>false</code>.</p>
<p>Example:</p>
<pre class='command'>
<em>*% Always send an even number of pages when duplexing</em>
*cupsEvenDuplex: true
</pre>
<h3>cupsFilter</h3>
<p class='summary'>*cupsFilter: "source/type cost program"</p>
@@ -158,8 +143,7 @@ page. The default value is <code>false</code>.</p>
*cupsFlipDuplex: true
</pre>
<p>Also see the related <tt>APDuplexRequiresFlippedMargins</tt>
attribute.</p>
<p>Also see the related <tt>APDuplexRequiresFlippedMargins</tt> attribute.</p>
<h3>cupsIPPReason</h3>
+19 -92
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Common filter routines for the Common UNIX Printing System (CUPS).
*
* Copyright 1997-2006 by Easy Software Products.
* Copyright 1997-2005 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
@@ -28,7 +28,6 @@
* SetCommonOptions() - Set common filter options for media size,
* etc.
* UpdatePageVars() - Update the page variables for the orientation.
* WriteComment() - Write a DSC comment.
* WriteCommon() - Write common procedures...
* WriteLabelProlog() - Write the prolog with the classification
* and page label.
@@ -47,31 +46,30 @@
* Globals...
*/
int Orientation = 0, /* 0 = portrait, 1 = landscape, etc. */
Duplex = 0, /* Duplexed? */
LanguageLevel = 1, /* Language level of printer */
ColorDevice = 1; /* Do color text? */
float PageLeft = 18.0f, /* Left margin */
PageRight = 594.0f, /* Right margin */
PageBottom = 36.0f, /* Bottom margin */
PageTop = 756.0f, /* Top margin */
PageWidth = 612.0f, /* Total page width */
PageLength = 792.0f; /* Total page length */
int Orientation = 0, /* 0 = portrait, 1 = landscape, etc. */
Duplex = 0, /* Duplexed? */
LanguageLevel = 1, /* Language level of printer */
ColorDevice = 1; /* Do color text? */
float PageLeft = 18.0f, /* Left margin */
PageRight = 594.0f, /* Right margin */
PageBottom = 36.0f, /* Bottom margin */
PageTop = 756.0f, /* Top margin */
PageWidth = 612.0f, /* Total page width */
PageLength = 792.0f; /* Total page length */
/*
* 'SetCommonOptions()' - Set common filter options for media size, etc.
*/
ppd_file_t * /* O - PPD file */
SetCommonOptions(
int num_options, /* I - Number of options */
cups_option_t *options, /* I - Options */
int change_size) /* I - Change page size? */
ppd_file_t * /* O - PPD file */
SetCommonOptions(int num_options, /* I - Number of options */
cups_option_t *options, /* I - Options */
int change_size) /* I - Change page size? */
{
ppd_file_t *ppd; /* PPD file */
ppd_size_t *pagesize; /* Current page size */
const char *val; /* Option value */
ppd_file_t *ppd; /* PPD file */
ppd_size_t *pagesize; /* Current page size */
const char *val; /* Option value */
#ifdef LC_TIME
@@ -229,7 +227,7 @@ SetCommonOptions(
void
UpdatePageVars(void)
{
float temp; /* Swapping variable */
float temp; /* Swapping variable */
switch (Orientation & 3)
@@ -468,77 +466,6 @@ WriteLabels(int orient) /* I - Orientation of the page */
}
/*
* 'WriteTextComment()' - Write a DSC text comment.
*/
void
WriteTextComment(const char *name, /* I - Comment name ("Title", etc.) */
const char *value) /* I - Comment value */
{
int len; /* Current line length */
/*
* DSC comments are of the form:
*
* %%name: value
*
* The name and value must be limited to 7-bit ASCII for most printers,
* so we escape all non-ASCII and ASCII control characters as described
* in the Adobe Document Structuring Conventions specification.
*/
printf("%%%%%s: (", name);
len = 5 + strlen(name);
while (*value)
{
if (*value < ' ' || *value >= 127)
{
/*
* Escape this character value...
*/
if (len >= 251) /* Keep line < 254 chars */
break;
printf("\\%03o", *value & 255);
len += 4;
}
else if (*value == '\\')
{
/*
* Escape the backslash...
*/
if (len >= 253) /* Keep line < 254 chars */
break;
putchar('\\');
putchar('\\');
len += 2;
}
else
{
/*
* Put this character literally...
*/
if (len >= 254) /* Keep line < 254 chars */
break;
putchar(*value);
len ++;
}
value ++;
}
puts(")");
}
/*
* End of "$Id$".
*/
+1 -2
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Common filter definitions for the Common UNIX Printing System (CUPS).
*
* Copyright 1997-2006 by Easy Software Products.
* Copyright 1997-2005 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
@@ -76,7 +76,6 @@ extern void WriteCommon(void);
extern void WriteLabelProlog(const char *label, float bottom,
float top, float width);
extern void WriteLabels(int orient);
extern void WriteTextComment(const char *name, const char *value);
/*
+2 -2
Ver Arquivo
@@ -70,8 +70,8 @@ OutputProlog(char *title, /* I - Job title */
puts("%%Creator: hpgltops/" CUPS_SVERSION);
strftime(line, sizeof(line), "%c", curtm);
printf("%%%%CreationDate: %s\n", line);
WriteTextComment("Title", title);
WriteTextComment("For", user);
printf("%%%%Title: %s\n", title);
printf("%%%%For: %s\n", user);
printf("%%cupsRotation: %d\n", (Orientation & 3) * 90);
puts("%%EndComments");
puts("%%BeginProlog");
+2 -2
Ver Arquivo
@@ -609,8 +609,8 @@ main(int argc, /* I - Number of command-line arguments */
puts("%%Creator: imagetops/" CUPS_SVERSION);
strftime(curdate, sizeof(curdate), "%c", curtm);
printf("%%%%CreationDate: %s\n", curdate);
WriteTextComment("Title", argv[3]);
WriteTextComment("For", argv[2]);
printf("%%%%Title: %s\n", argv[3]);
printf("%%%%For: %s\n", argv[2]);
if (Orientation & 1)
puts("%%Orientation: Landscape");
else
+11 -85
Ver Arquivo
@@ -163,8 +163,8 @@ static int check_range(pstops_doc_t *doc, int page);
static void copy_bytes(cups_file_t *fp, off_t offset,
size_t length);
static size_t copy_comments(cups_file_t *fp, pstops_doc_t *doc,
ppd_file_t *ppd, char *line,
size_t linelen, size_t linesize);
char *line, size_t linelen,
size_t linesize);
static void copy_dsc(cups_file_t *fp, pstops_doc_t *doc,
ppd_file_t *ppd, char *line, size_t linelen,
size_t linesize);
@@ -542,7 +542,6 @@ copy_bytes(cups_file_t *fp, /* I - File to read from */
static size_t /* O - Length of next line */
copy_comments(cups_file_t *fp, /* I - File to read from */
pstops_doc_t *doc, /* I - Document info */
ppd_file_t *ppd, /* I - PPD file */
char *line, /* I - Line buffer */
size_t linelen, /* I - Length of initial line */
size_t linesize) /* I - Size of line buffer */
@@ -590,53 +589,10 @@ copy_comments(cups_file_t *fp, /* I - File to read from */
if (!strncmp(line, "%%Pages:", 8))
{
int pages; /* Number of pages */
if (saw_pages)
fputs("ERROR: Duplicate %%Pages: comment seen!\n", stderr);
saw_pages = 1;
if (Duplex && (pages = atoi(line + 8)) > 0 && pages <= doc->number_up)
{
/*
* Since we will only be printing on a single page, disable duplexing.
*/
Duplex = 0;
doc->slow_duplex = 0;
if (cupsGetOption("sides", doc->num_options, doc->options))
doc->num_options = cupsAddOption("sides", "one-sided",
doc->num_options, &(doc->options));
if (cupsGetOption("Duplex", doc->num_options, doc->options))
doc->num_options = cupsAddOption("Duplex", "None",
doc->num_options, &(doc->options));
if (cupsGetOption("EFDuplex", doc->num_options, doc->options))
doc->num_options = cupsAddOption("EFDuplex", "None",
doc->num_options, &(doc->options));
if (cupsGetOption("EFDuplexing", doc->num_options, doc->options))
doc->num_options = cupsAddOption("EFDuplexing", "False",
doc->num_options, &(doc->options));
if (cupsGetOption("KD03Duplex", doc->num_options, doc->options))
doc->num_options = cupsAddOption("KD03Duplex", "None",
doc->num_options, &(doc->options));
if (cupsGetOption("JCLDuplex", doc->num_options, doc->options))
doc->num_options = cupsAddOption("JCLDuplex", "None",
doc->num_options, &(doc->options));
ppdMarkOption(ppd, "Duplex", "None");
ppdMarkOption(ppd, "EFDuplex", "None");
ppdMarkOption(ppd, "EFDuplexing", "False");
ppdMarkOption(ppd, "KD03Duplex", "None");
ppdMarkOption(ppd, "JCLDuplex", "None");
}
}
else if (!strncmp(line, "%%BoundingBox:", 14))
{
@@ -710,10 +666,10 @@ copy_comments(cups_file_t *fp, /* I - File to read from */
fputs("ERROR: No %%Pages: comment in header!\n", stderr);
if (!saw_for)
WriteTextComment("For", doc->user);
printf("%%%%For: %s\n", doc->user);
if (!saw_title)
WriteTextComment("Title", doc->title);
printf("%%%%Title: %s\n", doc->title);
if (doc->copies != 1 && (!doc->collate || !doc->slow_collate))
{
@@ -789,7 +745,7 @@ copy_dsc(cups_file_t *fp, /* I - File to read from */
*/
fprintf(stderr, "DEBUG: Before copy_comments - %s", line);
linelen = copy_comments(fp, doc, ppd, line, linelen, linesize);
linelen = copy_comments(fp, doc, line, linelen, linesize);
/*
* Now find the prolog section, if any...
@@ -904,33 +860,6 @@ copy_dsc(cups_file_t *fp, /* I - File to read from */
for (copy = !doc->slow_order; copy < doc->copies; copy ++)
{
/*
* Send end-of-job stuff followed by any start-of-job stuff required
* for the JCL options...
*/
if (!doc->saw_eof)
puts("%%EOF");
if (doc->emit_jcl)
{
if (ppd && ppd->jcl_end)
ppdEmitJCLEnd(ppd, stdout);
else
putchar(0x04);
ppdEmitJCL(ppd, stdout, doc->job_id, doc->user, doc->title);
}
puts("%!PS-Adobe-3.0");
puts("%%Pages: (atend)");
puts("%%BoundingBox: (atend)");
puts("%%EndComments");
/*
* Then copy all of the pages...
*/
pageinfo = doc->slow_order ? (pstops_page_t *)cupsArrayLast(doc->pages) :
(pstops_page_t *)cupsArrayFirst(doc->pages);
@@ -1017,8 +946,8 @@ copy_non_dsc(cups_file_t *fp, /* I - File to read from */
else
puts("%%Pages: 1");
WriteTextComment("For", doc->user);
WriteTextComment("Title", doc->title);
printf("%%%%For: %s\n", doc->user);
printf("%%%%Title: %s\n", doc->title);
if (doc->copies != 1 && (!doc->collate || !doc->slow_collate))
{
@@ -1939,7 +1868,7 @@ static void
end_nup(pstops_doc_t *doc, /* I - Document information */
int number) /* I - Page number */
{
if (doc->number_up > 1)
if (doc->mirror || Orientation || doc->number_up > 1)
doc_puts(doc, "userdict/ESPsave get restore\n");
switch (doc->number_up)
@@ -2478,7 +2407,7 @@ set_pstops_options(
* turn the hardware collate option off...
*/
if ((option = ppdFindOption(ppd, "Collate")) != NULL &&
if ((option = ppdFindOption(ppd, "Option")) != NULL &&
!option->conflicted)
doc->slow_collate = 0;
else
@@ -2493,10 +2422,7 @@ set_pstops_options(
else
doc->slow_order = 0;
if (Duplex &&
(doc->slow_collate || doc->slow_order ||
((attr = ppdFindAttr(ppd, "cupsEvenDuplex", NULL)) != NULL &&
attr->value && !strcasecmp(attr->value, "true"))))
if ((doc->slow_collate || doc->slow_order) && Duplex)
doc->slow_duplex = 1;
else
doc->slow_duplex = 0;
@@ -2617,7 +2543,7 @@ start_nup(pstops_doc_t *doc, /* I - Document information */
bboxl; /* BoundingBox height */
if (doc->number_up > 1)
if (doc->mirror || Orientation || doc->number_up > 1)
doc_puts(doc, "userdict/ESPsave save put\n");
if (doc->mirror)
+2 -2
Ver Arquivo
@@ -208,8 +208,8 @@ WriteProlog(const char *title, /* I - Title of job */
printf("%%cupsRotation: %d\n", (Orientation & 3) * 90);
puts("%%Creator: texttops/" CUPS_SVERSION);
printf("%%%%CreationDate: %s\n", curdate);
WriteTextComment("Title", title);
WriteTextComment("For", user);
printf("%%%%Title: %s\n", title);
printf("%%%%For: %s\n", user);
puts("%%Pages: (atend)");
/*
+3 -3
Ver Arquivo
@@ -76,7 +76,7 @@ msgid "Auto"
msgstr "Automatisch"
msgid "Enter your username and password or the root username and password to access this page."
msgstr "Für Zugang Benutzername und Passwort (oder Benutzername und Passwort für root) eingeben."
msgstr "Für Zugang Benutzername und Passwort (oder Benutzername und Password für root) eingeben."
msgid "You must use a https: URL to access this page."
msgstr "Eine https:-URL ist für den Zugriff erforderlich."
@@ -401,7 +401,7 @@ msgid "status\t\tshow status of daemon and queue\n"
msgstr "status\t\tzeigt den Status von Diensten und Warteschlangen\n"
msgid "?Invalid help command unknown\n"
msgstr "?Ungültiger Hilfebefehl nicht bekannt\n"
msgstr "?Ungültig Hilfebefehl nicht bekannt\n"
#, c-format
msgid "\tprinter is on device '%s' speed -1\n"
@@ -1884,7 +1884,7 @@ msgid "Unable to add printer:"
msgstr "Kann Drucker nicht hinzufügen:"
msgid "Set Printer Options"
msgstr "Druckereinstellungen setzen"
msgstr "Druckereinstellugen setzen"
msgid "Missing form variable!"
msgstr "Vermisse Formularvariable!"
-2826
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+2 -7
Ver Arquivo
@@ -21,7 +21,7 @@
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
.TH cupsaddsmb 8 "Common UNIX Printing System" "20 October 2006" "Easy Software Products"
.TH cupsaddsmb 8 "Common UNIX Printing System" "13 June 2006" "Easy Software Products"
.SH NAME
cupsaddsmb \- export printers to samba for windows clients
@@ -120,7 +120,7 @@ accordingly on your system as needed.
The base driver for Windows 2000 and higher is the Microsoft
PostScript driver, which is available on any system running
Windows 2000 or higher in the
%WINDIR%\\SYSTEM32\\SPOOL\\DRIVERS\\W32X86\\3 folder.
%WINDOWS%\\SYSTEM32\\SPOOL\\DRIVERS\\W32X86\\3 folder.
.LP
The CUPS printer driver is preferred over the Microsoft driver
since it supports the page-label, job-billing, and
@@ -201,11 +201,6 @@ exactly as named below:
you use the UPPERCASE filenames shown above, otherwise
\fIcupsaddsmb\fR will fail to export the drivers.
.SH KNOWN ISSUES
\fIcupsaddsmb\fR currently only supports 32-bit x86 drivers on
Windows 2000 and higher. Support for 64-bit x86 drivers will be
added in a future release.
.SH SEE ALSO
\fIsmbd(8)\fR, \fIsmb.conf(5)\fR,
http://localhost:631/help
+18 -33
Ver Arquivo
@@ -42,19 +42,14 @@
%description Berkeley command-line interfaces.
%format rpm
%provides lpd
%provides lpr
%provides LPRng
%replaces lpd
%replaces lpr
%replaces LPRng
%requires cups-libs 1:@CUPS_VERSION@
%provides cups 1:@CUPS_VERSION@
%provides lpd, lpr, LPRng
%replaces lpd, lpr, LPRng
%format deb
%provides cupsys
%provides cupsys-client
%provides cupsys-bsd
%requires cups-libs
%format pkg
%replaces SUNWlpmsg LP Alerts
@@ -78,15 +73,13 @@
%incompat maint*.print_*.* 0 0 1289999999 1289999999
%incompat print 0 0 1289999999 1289999999
%incompat fw_cups 0 0 1289999999 1289999999
%requires cups.sw.libs
%format portable
%requires cups-libs
%format all
%subpackage libs
%description Shared libraries
%description Common UNIX Printing System - shared libraries
%format rpm
%provides cups-libs 1:@CUPS_VERSION@
%format deb
%provides libcups1
%provides libcupsys2
@@ -95,32 +88,34 @@
%format all
%subpackage devel
%description Development environment
%description Common UNIX Printing System - development environment
%format rpm
%provides cups-devel 1:@CUPS_VERSION@
%format deb
%provides libcupsys2-dev
%provides libcupsimage2-dev
%format all
%subpackage lpd
%description LPD support
%description Common UNIX Printing System - LPD support
%format rpm
%provides cups-lpd 1:@CUPS_VERSION@
%format all
%subpackage de
%description German support
%description Common UNIX Printing System - German support
%subpackage es
%description Spanish support
%subpackage et
%description Estonian support
%description Common UNIX Printing System - Spanish support
%subpackage ja
%description Japanese support
%description Common UNIX Printing System - Japanese support
%subpackage pl
%description Polish support
%description Common UNIX Printing System - Polish support
%subpackage sv
%description Swedish support
%description Common UNIX Printing System - Swedish support
%subpackage
@@ -356,8 +351,6 @@ d 0511 root $CUPS_PRIMARY_SYSTEM_GROUP $STATEDIR/certs -
f 0644 root sys $LOCALEDIR/de/cups_de.po locale/cups_de.po
%subpackage es
f 0644 root sys $LOCALEDIR/es/cups_es.po locale/cups_es.po
%subpackage et
f 0644 root sys $LOCALEDIR/et/cups_et.po locale/cups_et.po
%subpackage ja
f 0644 root sys $LOCALEDIR/ja/cups_ja.po locale/cups_ja.po
%subpackage pl
@@ -427,9 +420,6 @@ f 0644 root sys $DATADIR/templates/de templates/de/*.tmpl
%subpackage es
d 0755 root sys $DATADIR/templates/es
f 0644 root sys $DATADIR/templates/es templates/es/*.tmpl
%subpackage et
d 0755 root sys $DATADIR/templates/et
f 0644 root sys $DATADIR/templates/et templates/et/*.tmpl
%subpackage ja
d 0755 root sys $DATADIR/templates/ja
f 0644 root sys $DATADIR/templates/ja templates/ja/*.tmpl
@@ -520,11 +510,6 @@ d 0755 root sys $DOCDIR/es
f 0644 root sys $DOCDIR/es doc/es/*.html
d 0755 root sys $DOCDIR/es/images -
f 0644 root sys $DOCDIR/es/images doc/es/images/*.gif
%subpackage et
d 0755 root sys $DOCDIR/et
f 0644 root sys $DOCDIR/et doc/et/*.html
d 0755 root sys $DOCDIR/et/images -
f 0644 root sys $DOCDIR/et/images doc/et/images/*.gif
%subpackage ja
d 0755 root sys $DOCDIR/ja
f 0644 root sys $DOCDIR/ja doc/ja/*.html
-19
Ver Arquivo
@@ -86,11 +86,6 @@ Summary: Common UNIX Printing System - Spanish support
Group: System Environment/Daemons
Requires: %{name} = %{epoch}:%{version}
%package et
Summary: Common UNIX Printing System - Estonian support
Group: System Environment/Daemons
Requires: %{name} = %{epoch}:%{version}
%package ja
Summary: Common UNIX Printing System - Japanese support
Group: System Environment/Daemons
@@ -140,10 +135,6 @@ UNIX
The Common UNIX Printing System provides a portable printing layer for
UNIX® operating systems. This package provides Spanish support.
%description et
The Common UNIX Printing System provides a portable printing layer for
UNIX® operating systems. This package provides Estonian support.
%description ja
The Common UNIX Printing System provides a portable printing layer for
UNIX® operating systems. This package provides Japanese support.
@@ -411,16 +402,6 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/cups/templates/es/*
/usr/share/locale/es/cups_es.po
%files et
%defattr(-,root,root)
%dir /usr/share/doc/cups/et
/usr/share/doc/cups/et/index.html
%dir /usr/share/doc/cups/et/images
/usr/share/doc/cups/et/images/*
%dir /usr/share/cups/templates/et
/usr/share/cups/templates/et/*
/usr/share/locale/et/cups_et.po
%files ja
%defattr(-,root,root)
%dir /usr/share/doc/cups/ja
+3 -52
Ver Arquivo
@@ -1231,58 +1231,9 @@ void PSOutputDev::writeHeader(int firstPage, int lastPage,
s = obj1.getString();
if ((s->getChar(0) & 0xff) == 0xfe &&
(s->getChar(1) & 0xff) == 0xff) {
// Convert UTF-16 to UTF-8...
for (i = 2; i < s->getLength() && i < 400; i += 2) {
int ch = ((s->getChar(i) & 255) << 8) | (s->getChar(i + 1) & 255);
if (ch >= 0xd800 && ch <= 0xdbff) {
// Multi-word UTF-16 char...
i += 2;
int lch = ((s->getChar(i) & 255) << 8) | (s->getChar(i + 1) & 255);
if (lch < 0xdc00 || lch >= 0xdfff) continue;
ch = (((ch & 0x3ff) << 10) | (lch & 0x3ff)) + 0x10000;
}
if (ch < 0x80)
{
/*
* Single byte ASCII...
*/
writePSChar(ch);
}
else if (ch < 0x800)
{
/*
* Two-byte UTF-8...
*/
writePSChar(0xc0 | (ch >> 6));
writePSChar(0x80 | (ch & 0x3f));
}
else if (ch < 0x10000)
{
/*
* Three-byte UTF-8...
*/
writePSChar(0xe0 | (ch >> 12));
writePSChar(0x80 | ((ch >> 6) & 0x3f));
writePSChar(0x80 | (ch & 0x3f));
}
else
{
/*
* Four-byte UTF-8...
*/
writePSChar(0xf0 | (ch >> 18));
writePSChar(0x80 | ((ch >> 12) & 0x3f));
writePSChar(0x80 | ((ch >> 6) & 0x3f));
writePSChar(0x80 | (ch & 0x3f));
}
// cheap Unicode-to-ASCII conversion
for (i = 3; i < s->getLength() && i < 400; i += 2) {
writePSChar(s->getChar(i));
}
} else {
for (i = 0; i < s->getLength() && i < 200; ++i) {
+5 -17
Ver Arquivo
@@ -796,19 +796,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
cupsdClearString(&con->command);
cupsdClearString(&con->options);
if (con->request)
{
ippDelete(con->request);
con->request = NULL;
}
if (con->response)
{
ippDelete(con->response);
con->response = NULL;
}
if (con->language)
if (con->language != NULL)
{
cupsLangFree(con->language);
con->language = NULL;
@@ -1759,7 +1747,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
"CHUNKED" : "LENGTH",
CUPS_LLCAST con->http.data_remaining, con->file);
if (con->request)
if (con->request != NULL)
{
/*
* Grab any request data from the connection...
@@ -2279,7 +2267,7 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
con->http.state != HTTP_POST_SEND)
return (1);
if (con->response)
if (con->response != NULL)
{
ipp_state = ippWrite(HTTP(con), con->response);
bytes = ipp_state != IPP_ERROR && ipp_state != IPP_DATA;
@@ -2475,13 +2463,13 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
cupsdClearString(&con->filename);
}
if (con->request)
if (con->request != NULL)
{
ippDelete(con->request);
con->request = NULL;
}
if (con->response)
if (con->response != NULL)
{
ippDelete(con->response);
con->response = NULL;
+2 -3
Ver Arquivo
@@ -150,6 +150,8 @@ main(int argc, /* I - Number of command-line arguments */
num_defaults = 0;
defaults = NULL;
hostlookups = 1;
num_defaults = cupsAddOption("job-originating-host-name", hostname,
num_defaults, &defaults);
for (i = 1; i < argc; i ++)
if (argv[i][0] == '-')
@@ -215,9 +217,6 @@ main(int argc, /* I - Number of command-line arguments */
hostip);
}
num_defaults = cupsAddOption("job-originating-host-name", hostname,
num_defaults, &defaults);
/*
* RFC1179 specifies that only 1 daemon command can be received for
* every connection.
+1 -1
Ver Arquivo
@@ -1062,7 +1062,7 @@ cupsdStartPolling(void)
* Don't do anything if we aren't polling...
*/
if (NumPolled == 0 || BrowseSocket < 0)
if (NumPolled == 0)
{
PollPipe = -1;
PollStatusBuffer = NULL;
+132 -65
Ver Arquivo
@@ -71,6 +71,7 @@
* get_username() - Get the username associated with a request.
* hold_job() - Hold a print job.
* move_job() - Move a job to a new destination.
* ppd_add_default() - Add a PPD default choice.
* ppd_parse_line() - Parse a PPD default line.
* print_job() - Print a file to a printer or class.
* read_ps_line() - Read a line from a PS file...
@@ -106,6 +107,17 @@
#endif /* HAVE_LIBPAPER */
/*
* PPD default choice structure...
*/
typedef struct
{
char option[PPD_MAX_NAME]; /* Main keyword (option name) */
char choice[PPD_MAX_NAME]; /* Option keyword (choice name) */
} ppd_default_t;
/*
* Local functions...
*/
@@ -166,6 +178,8 @@ static void get_subscriptions(cupsd_client_t *con, ipp_attribute_t *uri);
static const char *get_username(cupsd_client_t *con);
static void hold_job(cupsd_client_t *con, ipp_attribute_t *uri);
static void move_job(cupsd_client_t *con, ipp_attribute_t *uri);
static int ppd_add_default(const char *option, const char *choice,
int num_defaults, ppd_default_t **defaults);
static int ppd_parse_line(const char *line, char *option, int olen,
char *choice, int clen);
static void print_job(cupsd_client_t *con, ipp_attribute_t *uri);
@@ -1337,7 +1351,7 @@ add_job(cupsd_client_t *con, /* I - Client connection */
job->dtype = dtype;
job->attrs = con->request;
con->request = ippNewRequest(job->attrs->request.op.operation_id);
con->request = NULL;
add_job_uuid(con, job);
apply_printer_defaults(printer, job);
@@ -3451,8 +3465,8 @@ copy_attrs(ipp_t *to, /* I - Destination request */
* Filter attributes as needed...
*/
if ((group != IPP_TAG_ZERO && fromattr->group_tag != group &&
fromattr->group_tag != IPP_TAG_ZERO) || !fromattr->name)
if (group != IPP_TAG_ZERO && fromattr->group_tag != group &&
fromattr->group_tag != IPP_TAG_ZERO && !fromattr->name)
continue;
if (!ra || cupsArrayFind(ra, fromattr->name))
@@ -3805,15 +3819,15 @@ copy_model(cupsd_client_t *con, /* I - Client connection */
*envp[MAX_ENV]; /* Environment */
cups_file_t *src, /* Source file */
*dst; /* Destination file */
ppd_file_t *ppd; /* PPD file */
int bytes, /* Bytes from pipe */
total; /* Total bytes from pipe */
char buffer[2048]; /* Copy buffer */
char buffer[2048], /* Copy buffer */
*ptr; /* Pointer into buffer */
int i; /* Looping var */
char option[PPD_MAX_NAME], /* Option name */
choice[PPD_MAX_NAME]; /* Choice name */
int num_defaults; /* Number of default options */
cups_option_t *defaults; /* Default options */
ppd_default_t *defaults; /* Default options */
char cups_protocol[PPD_MAX_LINE];
/* cupsProtocol attribute */
int have_letter, /* Have Letter size */
@@ -3954,14 +3968,41 @@ copy_model(cupsd_client_t *con, /* I - Client connection */
* Read the source file and see what page sizes are supported...
*/
if ((ppd = ppdOpenFile(tempfile)) == NULL)
if ((src = cupsFileOpen(tempfile, "rb")) == NULL)
{
unlink(tempfile);
return (-1);
}
have_letter = ppdPageSize(ppd, "Letter") != NULL;
have_a4 = ppdPageSize(ppd, "A4") != NULL;
have_letter = 0;
have_a4 = 0;
while (cupsFileGets(src, buffer, sizeof(buffer)))
if (!strncmp(buffer, "*PageSize ", 10))
{
/*
* Strip UI text and command data from the end of the line...
*/
if ((ptr = strchr(buffer + 10, '/')) != NULL)
*ptr = '\0';
if ((ptr = strchr(buffer + 10, ':')) != NULL)
*ptr = '\0';
for (ptr = buffer + 10; isspace(*ptr); ptr ++);
/*
* Look for Letter and A4 page sizes...
*/
if (!strcmp(ptr, "Letter"))
have_letter = 1;
if (!strcmp(ptr, "A4"))
have_a4 = 1;
}
cupsFileRewind(src);
/*
* Open the destination (if possible) and set the default options...
@@ -3986,21 +4027,8 @@ copy_model(cupsd_client_t *con, /* I - Client connection */
if (!ppd_parse_line(buffer, option, sizeof(option),
choice, sizeof(choice)))
{
ppd_option_t *ppdo; /* PPD option */
/*
* Only add the default if the default hasn't already been
* set and the choice exists in the new PPD...
*/
if (!cupsGetOption(option, num_defaults, defaults) &&
(ppdo = ppdFindOption(ppd, option)) != NULL &&
ppdFindChoice(ppdo, choice))
num_defaults = cupsAddOption(option, choice, num_defaults,
num_defaults = ppd_add_default(option, choice, num_defaults,
&defaults);
}
}
else if (!strncmp(buffer, "*cupsProtocol:", 14))
strlcpy(cups_protocol, buffer, sizeof(cups_protocol));
@@ -4046,7 +4074,6 @@ copy_model(cupsd_client_t *con, /* I - Client connection */
!strcasecmp(DefaultLanguage, "C") ||
!strcasecmp(DefaultLanguage, "POSIX") ||
!strcasecmp(DefaultLanguage, "en") ||
!strncasecmp(DefaultLanguage, "en.", 3) ||
!strncasecmp(DefaultLanguage, "en_US", 5) ||
!strncasecmp(DefaultLanguage, "en_CA", 5) ||
!strncasecmp(DefaultLanguage, "fr_CA", 5))
@@ -4057,14 +4084,14 @@ copy_model(cupsd_client_t *con, /* I - Client connection */
if (have_letter)
{
num_defaults = cupsAddOption("PageSize", "Letter", num_defaults,
&defaults);
num_defaults = cupsAddOption("PageRegion", "Letter", num_defaults,
&defaults);
num_defaults = cupsAddOption("PaperDimension", "Letter", num_defaults,
&defaults);
num_defaults = cupsAddOption("ImageableArea", "Letter", num_defaults,
&defaults);
num_defaults = ppd_add_default("PageSize", "Letter", num_defaults,
&defaults);
num_defaults = ppd_add_default("PageRegion", "Letter", num_defaults,
&defaults);
num_defaults = ppd_add_default("PaperDimension", "Letter", num_defaults,
&defaults);
num_defaults = ppd_add_default("ImageableArea", "Letter", num_defaults,
&defaults);
}
}
else if (have_a4)
@@ -4073,37 +4100,26 @@ copy_model(cupsd_client_t *con, /* I - Client connection */
* The rest default to "a4" size...
*/
num_defaults = cupsAddOption("PageSize", "A4", num_defaults,
&defaults);
num_defaults = cupsAddOption("PageRegion", "A4", num_defaults,
&defaults);
num_defaults = cupsAddOption("PaperDimension", "A4", num_defaults,
&defaults);
num_defaults = cupsAddOption("ImageableArea", "A4", num_defaults,
&defaults);
num_defaults = ppd_add_default("PageSize", "A4", num_defaults,
&defaults);
num_defaults = ppd_add_default("PageRegion", "A4", num_defaults,
&defaults);
num_defaults = ppd_add_default("PaperDimension", "A4", num_defaults,
&defaults);
num_defaults = ppd_add_default("ImageableArea", "A4", num_defaults,
&defaults);
}
}
ppdClose(ppd);
/*
* Open the source file for a copy...
*/
if ((src = cupsFileOpen(tempfile, "rb")) == NULL)
{
cupsFreeOptions(num_defaults, defaults);
unlink(tempfile);
return (-1);
}
/*
* Open the destination file for a copy...
*/
if ((dst = cupsFileOpen(to, "wb")) == NULL)
{
cupsFreeOptions(num_defaults, defaults);
if (num_defaults > 0)
free(defaults);
cupsFileClose(src);
unlink(tempfile);
return (-1);
@@ -4124,17 +4140,17 @@ copy_model(cupsd_client_t *con, /* I - Client connection */
if (!ppd_parse_line(buffer, option, sizeof(option),
choice, sizeof(choice)))
{
const char *val; /* Default option value */
for (i = 0; i < num_defaults; i ++)
if (!strcmp(option, defaults[i].option))
{
/*
* Substitute the previous choice...
*/
if ((val = cupsGetOption(option, num_defaults, defaults)) != NULL)
{
/*
* Substitute the previous choice...
*/
snprintf(buffer, sizeof(buffer), "*Default%s: %s", option, val);
}
snprintf(buffer, sizeof(buffer), "*Default%s: %s", option,
defaults[i].choice);
break;
}
}
}
@@ -4144,7 +4160,8 @@ copy_model(cupsd_client_t *con, /* I - Client connection */
if (cups_protocol[0])
cupsFilePrintf(dst, "%s\n", cups_protocol);
cupsFreeOptions(num_defaults, defaults);
if (num_defaults > 0)
free(defaults);
/*
* Close both files and return...
@@ -6558,6 +6575,56 @@ move_job(cupsd_client_t *con, /* I - Client connection */
}
/*
* 'ppd_add_default()' - Add a PPD default choice.
*/
static int /* O - Number of defaults */
ppd_add_default(
const char *option, /* I - Option name */
const char *choice, /* I - Choice name */
int num_defaults, /* I - Number of defaults */
ppd_default_t **defaults) /* IO - Defaults */
{
int i; /* Looping var */
ppd_default_t *temp; /* Temporary defaults array */
/*
* First check if the option already has a default value; the PPD spec
* says that the first one is used...
*/
for (i = 0, temp = *defaults; i < num_defaults; i ++)
if (!strcmp(option, temp[i].option))
return (num_defaults);
/*
* Now add the option...
*/
if (num_defaults == 0)
temp = malloc(sizeof(ppd_default_t));
else
temp = realloc(*defaults, (num_defaults + 1) * sizeof(ppd_default_t));
if (!temp)
{
cupsdLogMessage(CUPSD_LOG_ERROR, "ppd_add_default: Unable to add default value for \"%s\" - %s",
option, strerror(errno));
return (num_defaults);
}
*defaults = temp;
temp += num_defaults;
strlcpy(temp->option, option, sizeof(temp->option));
strlcpy(temp->choice, choice, sizeof(temp->choice));
return (num_defaults + 1);
}
/*
* 'ppd_parse_line()' - Parse a PPD default line.
*/
-6
Ver Arquivo
@@ -2626,9 +2626,6 @@ start_job(cupsd_job_t *job, /* I - Job ID */
* Add gziptoany filter to the front of the list...
*/
if (!filters)
filters = cupsArrayNew(NULL, NULL);
if (!cupsArrayInsert(filters, &gziptoany_filter))
{
cupsdLogMessage(CUPSD_LOG_ERROR,
@@ -2656,9 +2653,6 @@ start_job(cupsd_job_t *job, /* I - Job ID */
* Add port monitor to the end of the list...
*/
if (!filters)
filters = cupsArrayNew(NULL, NULL);
if (!cupsArrayAdd(filters, &port_monitor))
{
cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to add port monitor - %s",
+2 -7
Ver Arquivo
@@ -362,16 +362,11 @@ cupsdLogRequest(cupsd_client_t *con, /* I - Request to log */
if (!strcmp(AccessLog, "syslog"))
{
syslog(LOG_INFO,
"REQUEST %s - %s \"%s %s HTTP/%d.%d\" %d " CUPS_LLFMT " %s %s\n",
syslog(LOG_INFO, "REQUEST %s - %s \"%s %s HTTP/%d.%d\" %d " CUPS_LLFMT "\n",
con->http.hostname, con->username[0] != '\0' ? con->username : "-",
states[con->operation], con->uri,
con->http.version / 100, con->http.version % 100,
code, CUPS_LLCAST con->bytes,
con->request ?
ippOpString(con->request->request.op.operation_id) : "-",
con->response ?
ippErrorString(con->response->request.status.status_code) : "-");
code, CUPS_LLCAST con->bytes);
return (1);
}
+4 -9
Ver Arquivo
@@ -50,11 +50,6 @@
#include "cupsd.h"
#ifdef HAVE_DBUS
# include <dbus/dbus.h>
# ifdef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
# define dbus_message_append_iter_init dbus_message_iter_init_append
# define dbus_message_iter_append_string(i,v) dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, v)
# define dbus_message_iter_append_uint32(i,v) dbus_message_iter_append_basic(i, DBUS_TYPE_UINT32, v)
# endif /* HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
#endif /* HAVE_DBUS */
@@ -1360,13 +1355,13 @@ cupsd_send_dbus(cupsd_eventmask_t event,/* I - Event to send */
message = dbus_message_new_signal("/com/redhat/PrinterSpooler",
"com.redhat.PrinterSpooler", what);
dbus_message_append_iter_init(message, &iter);
dbus_message_iter_init_append(message, &iter);
if (dest)
dbus_message_iter_append_string(&iter, &(dest->name));
dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &(dest->name));
if (job)
{
dbus_message_iter_append_uint32(&iter, &(job->id));
dbus_message_iter_append_string(&iter, &(job->username));
dbus_message_iter_append_basic(&iter, DBUS_TYPE_UINT32, &(job->id));
dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &(job->username));
}
dbus_connection_send(con, message, NULL);

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais