Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet 383d0dd8b6 Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.2.12@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
171 arquivos alterados com 5621 adições e 888 exclusões
+118 -1
Ver Arquivo
@@ -1,6 +1,123 @@
CHANGES.txt - 2007-03-19
CHANGES.txt - 2007-07-09
------------------------
CHANGES IN CUPS V1.2.12
- The PHP cups_print_file() function crashed if the options
array contained non-string option values (STR #2430)
- The image/tiff file matching rule incorrectly identified
some text files as TIFF files (STR #2431)
- The filter(7) man page incorrectly documented the
"PAGE: total #-pages" message (STR #2427)
- PCL text files were mis-identified as HP-GL/2 and
caused the HP-GL/2 filter to hang (STR #2423)
- When printing to a queue with user ACLs, the scheduler
incorrectly returned a quota error instead of a "not
allowed to print" error (STR #2409)
- cupsaddsmb could get in a loop if no printer drivers
were installed (STR #2407)
- cupsRasterReadHeader() did not byte-swap the header
properly when compiled with certain versions of GCC.
- The IPP backend did not send the document-format
attribute for filtered jobs (STR #2411)
- Some PPD files could cause a crash in ppdOpen2 (STR
#2408)
- The web admin interface incorrectly handled the "share
printers" and "show remote printers" settings (STR
#2393)
- The scheduler's log messages about AuthClass and
AuthGroupName advised using a replacement directive but
had the wrong syntax (STR #2400)
- Updated the PostScript/PJL and HP-GL/2 MIME rules to
look in the first 4k of the file, not just the first 1k
(STR #2386)
- Updated the Italian localization (STR #2382)
CHANGES IN CUPS V1.2.11
- Updated the launchd support on Mac OS X to better
support reconfiguration.
- "make distclean" didn't remove all generated files
(STR #2366)
- Fixed a bug in the advertisement of classes (STR
#2373)
- The IPP backend now stays running until the job is
actually printed by the remote server; previously
it would stop monitoring the job if it was held or
temporarily stopped (STR #2352)
- PDF files were not always printed using the correct
orientation (STR #2348)
- The scheduler could crash if you specified a bad file:
URI for a printer (STR #2351)
- The Renew-Subscription operation now returns the
notify-lease-duration value that was used (STR #2346)
- The IPP backend sent job options to IPP printers,
however some printers tried to override the options
embedded in the PS/PCL stream with those job options
(STR #2349)
- ppdLocalize() now also tries a country-specific
localization for when localizing to a generic locale
name.
- The cupstestppd program now allows for partial
localizations to reduce the size of universal PPD
files.
- Chinese PPD files were incorrectly tagged with the
"cn" locale (should have been "zh")
- The backends now manage the printer-state-reasons
attribute more accurately (STR #2345)
- Java, PHP, Perl, and Python scripts did not work
properly (STR #2342)
- The scheduler would take forever to start if the
maximum number of file descriptors was set to
"unlimited" (STR #2329)
- The page-ranges option was incorrectly applied to the
banner pages (STR #2336)
- Fixed some GCC compile warnings (STR #2340)
- The DBUS notification code was broken for older
versions of DBUS (STR #2327)
- The IPv6 code did not compile on HP-UX 11.23 (STR
#2331)
- PPD constraints did not work properly with custom
options.
- Regular PPD options with the name "CustomFoo" did
not work.
- The USB backend did not work on NetBSD (STR #2324)
- The printer-state-reasons attribute was incorrectly
cleared after a job completed (STR #2323)
- The scheduler did not set the printer operation policy
on startup, only on soft reload (STR #2319)
- The AP_FIRSTPAGE_InputSlot option did not clear any
ManualFeed setting that was made, which caused problems
with some PPD files (STR #2318)
- cupsDoFileRequest() and cupsDoRequest() did not abort
when getting an error in the response (STR #2315)
- The scheduler did not schedule jobs properly to remote
or nested classes (STR #2317)
- Updated the mime.types and mime.convs headers to warn
that the files are overwritten when CUPS is installed.
Local changes should go in local.types or local.convs,
respectively (STR #2310)
- The scheduler could get in an infinite loop if a
printer in an implicit class disappeared (STR #2311)
- The pstops filter did not handle %%EndFeature comments
properly (STR #2306)
- Fixed a problem with the Polish web page printer icons
(STR #2305)
- ppdLocalize() now also localizes the cupsICCProfile
attributes.
- The scheduler still had a reference to the incorrect
"notify-recipient" attribute (STR #2307)
- The "make check" and "make test" subscription tests did
not set the locale (STR #2307)
- The "make check" and "make test" subscription tests
incorrectly used the notify-recipient attribute instead
of notify-recipient-uri (STR #2307)
- cupsRasterInterpretPPD() incorrectly limited the
cupsBorderlessScalingFactor when specified in the
job options.
CHANGES IN CUPS V1.2.10
- ppdLocalize() now supports localizing for Japanese
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
INSTALL - CUPS v1.2.10 - 2007-03-19
INSTALL - CUPS v1.2.11 - 2007-05-08
-----------------------------------
This file describes how to compile and install CUPS from source
+15 -3
Ver Arquivo
@@ -3,7 +3,7 @@
#
# Top-level Makefile 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
@@ -66,6 +66,7 @@ distclean: clean
$(RM) cups-config conf/cupsd.conf conf/pam.std
$(RM) doc/help/standard.html doc/index.html
$(RM) init/cups.sh init/cups-lpd
$(RM) man/client.conf.man
$(RM) man/cups-deviced.man man/cups-driverd.man
$(RM) man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
$(RM) man/cupsd.conf.man man/lpoptions.man
@@ -121,12 +122,21 @@ install: installhdrs
echo Installing StartupItems files...; \
$(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
$(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
$(INSTALL_DIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
$(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
echo Installing LaunchDaemons configuration files...; \
$(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
$(INSTALL_DATA) init/org.cups.cups-lpd.plist $(BUILDROOT)/System/Library/LaunchDaemons; \
case `uname -r` in \
8.*) \
$(INSTALL_DIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices; \
$(INSTALL_SCRIPT) init/PrintingServices.launchd $(BUILDROOT)/System/Library/StartupItems/PrintingServices/PrintingServices; \
$(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)/System/Library/StartupItems/PrintingServices/StartupParameters.plist; \
$(INSTALL_DIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices/Resources/English.lproj; \
$(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)/System/Library/StartupItems/PrintingServices/Resources/English.lproj/Localizable.strings; \
;; \
esac \
else \
echo Installing RC script...; \
$(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
@@ -201,7 +211,9 @@ uninstall:
$(RM) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
$(RMDIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
$(RM) $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
$(RM) $(BUILDROOT)$(INITDDIR)/org.cups.cupsd.plist; \
$(RM) $(BUILDROOT)$(INITDDIR)/org.cups.cups-lpd.plist; \
$(RMDIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices; \
else \
$(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
fi \
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
README - CUPS v1.2.10 - 2007-03-19
README - CUPS v1.2.11 - 2007-05-08
----------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
+10 -5
Ver Arquivo
@@ -101,6 +101,7 @@ main(int argc, /* I - Number of command-line args */
char *argv[]) /* I - Command-line arguments */
{
int i; /* Looping var */
int send_options; /* Send job options? */
int num_options; /* Number of printer options */
cups_option_t *options; /* Printer options */
char method[255], /* Method in URI */
@@ -416,6 +417,8 @@ main(int argc, /* I - Number of command-line args */
filename = tmpfilename;
files = &filename;
num_files = 1;
send_options = 0;
}
else
{
@@ -426,6 +429,8 @@ main(int argc, /* I - Number of command-line args */
num_files = argc - 6;
files = argv + 6;
send_options = strncasecmp(content_type, "application/vnd.cups-", 21) != 0;
#ifdef HAVE_LIBZ
if (compression)
compress_files(num_files, files);
@@ -853,6 +858,7 @@ main(int argc, /* I - Number of command-line args */
content_type = "application/postscript";
copies = 1;
copies_remaining = 1;
send_options = 0;
}
}
#endif /* __APPLE__ */
@@ -864,11 +870,11 @@ main(int argc, /* I - Number of command-line args */
break;
if (i < format_sup->num_values)
num_options = cupsAddOption("document-format", content_type,
num_options, &options);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
"document-format", NULL, content_type);
}
if (copies_sup && version > 0)
if (copies_sup && version > 0 && send_options)
{
/*
* Only send options if the destination printer supports the copies
@@ -1078,8 +1084,7 @@ main(int argc, /* I - Number of command-line args */
* Stop polling if the job is finished or pending-held...
*/
if (job_state->values[0].integer > IPP_JOB_PROCESSING ||
job_state->values[0].integer == IPP_JOB_HELD)
if (job_state->values[0].integer > IPP_JOB_STOPPED)
{
if ((job_sheets = ippFindAttribute(response,
"job-media-sheets-completed",
+5 -4
Ver Arquivo
@@ -101,7 +101,8 @@ backendRunLoop(int print_fd, /* I - Print file descriptor */
* Now loop until we are out of data from print_fd...
*/
for (print_bytes = 0, print_ptr = print_buffer, offline = 0, paperout = 0, total_bytes = 0;;)
for (print_bytes = 0, print_ptr = print_buffer, offline = -1,
paperout = -1, total_bytes = 0;;)
{
/*
* Use select() to determine whether we have data to copy around...
@@ -125,7 +126,7 @@ backendRunLoop(int print_fd, /* I - Print file descriptor */
* Pause printing to clear any pending errors...
*/
if (errno == ENXIO && !offline)
if (errno == ENXIO && offline != 1)
{
fputs("STATE: +offline-error\n", stderr);
fputs("INFO: Printer is currently off-line.\n", stderr);
@@ -203,7 +204,7 @@ backendRunLoop(int print_fd, /* I - Print file descriptor */
if (errno == ENOSPC)
{
if (!paperout)
if (paperout != 1)
{
fputs("ERROR: Out of paper!\n", stderr);
fputs("STATE: +media-empty-error\n", stderr);
@@ -212,7 +213,7 @@ backendRunLoop(int print_fd, /* I - Print file descriptor */
}
else if (errno == ENXIO)
{
if (!offline)
if (offline != 1)
{
fputs("STATE: +offline-error\n", stderr);
fputs("INFO: Printer is currently off-line.\n", stderr);
+2 -2
Ver Arquivo
@@ -227,7 +227,7 @@ static void parse_pserror (char *sockBuffer, int len);
* 'list_devices()' - List all USB devices.
*/
void list_devices()
static void list_devices()
{
iterate_printers(list_device_callback, NULL);
}
@@ -237,7 +237,7 @@ void list_devices()
* 'print_device()' - Print a file to a USB device.
*/
int /* O - Exit status */
static int /* O - Exit status */
print_device(const char *uri, /* I - Device URI */
const char *hostname, /* I - Hostname/manufacturer */
const char *resource, /* I - Resource/modelname */
+21 -5
Ver Arquivo
@@ -5,7 +5,7 @@
*
* This file is included from "usb.c" when compiled on UNIX/Linux.
*
* 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
@@ -44,7 +44,7 @@
* Local functions...
*/
int open_device(const char *uri, int *use_bc);
static int open_device(const char *uri, int *use_bc);
/*
@@ -78,6 +78,16 @@ print_device(const char *uri, /* I - Device URI */
do
{
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
/*
* *BSD's ulpt driver currently does not support the
* back-channel, incorrectly returns data ready on a select(),
* and locks up on read()...
*/
use_bc = 0;
#else
/*
* Disable backchannel data when printing to Brother, Canon, or
* Minolta USB printers - apparently these printers will return
@@ -89,6 +99,7 @@ print_device(const char *uri, /* I - Device URI */
strcasecmp(hostname, "Canon") &&
strcasecmp(hostname, "Konica Minolta") &&
strcasecmp(hostname, "Minolta");
#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
if ((device_fd = open_device(uri, &use_bc)) == -1)
{
@@ -185,7 +196,7 @@ print_device(const char *uri, /* I - Device URI */
* 'list_devices()' - List all USB devices.
*/
void
static void
list_devices(void)
{
#ifdef __linux
@@ -290,7 +301,7 @@ list_devices(void)
* 'open_device()' - Open a USB device...
*/
int /* O - File descriptor or -1 on error */
static int /* O - File descriptor or -1 on error */
open_device(const char *uri, /* I - Device URI */
int *use_bc) /* O - Set to 0 for unidirectional */
{
@@ -510,7 +521,12 @@ open_device(const char *uri, /* I - Device URI */
}
#else
{
if ((fd = open(uri + 4, O_RDWR | O_EXCL)) < 0)
if (use_bc)
fd = open(uri + 4, O_RDWR | O_EXCL);
else
fd = -1;
if (fd < 0)
{
fd = open(uri + 4, O_WRONLY | O_EXCL);
*use_bc = 0;
+7 -7
Ver Arquivo
@@ -3,7 +3,7 @@
*
* USB port backend for the Common UNIX Printing System (CUPS).
*
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
@@ -60,10 +60,10 @@
* Local functions...
*/
void list_devices(void);
int print_device(const char *uri, const char *hostname,
const char *resource, const char *options,
int print_fd, int copies, int argc, char *argv[]);
static void list_devices(void);
static int print_device(const char *uri, const char *hostname,
const char *resource, const char *options,
int print_fd, int copies, int argc, char *argv[]);
/*
@@ -85,7 +85,7 @@ int print_device(const char *uri, const char *hostname,
* 'list_devices()' - List all available USB devices to stdout.
*/
void
static void
list_devices(void)
{
/*
@@ -103,7 +103,7 @@ list_devices(void)
* 'print_device()' - Print a file to a USB device.
*/
int /* O - Exit status */
static int /* O - Exit status */
print_device(const char *uri, /* I - Device URI */
const char *hostname, /* I - Hostname/manufacturer */
const char *resource, /* I - Resource/modelname */
+7 -3
Ver Arquivo
@@ -1,9 +1,13 @@
#
# "$Id: mime.convs 5402 2006-04-14 19:21:03Z mike $"
# "$Id: mime.convs 6406 2007-03-27 16:11:27Z mike $"
#
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
# VERSIONS OF CUPS. Instead, create a "local.convs" file that
# reflects your local configuration changes.
#
# MIME converts file for the Common UNIX Printing System (CUPS).
#
# Copyright 1997-2005 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
@@ -114,5 +118,5 @@ image/x-sun-raster application/vnd.cups-raster 100 imagetoraster
#application/octet-stream application/vnd.cups-raw 0 -
#
# End of "$Id: mime.convs 5402 2006-04-14 19:21:03Z mike $".
# End of "$Id: mime.convs 6406 2007-03-27 16:11:27Z mike $".
#
+17 -13
Ver Arquivo
@@ -1,9 +1,13 @@
#
# "$Id: mime.types 6003 2006-10-02 16:26:04Z mike $"
# "$Id: mime.types 6625 2007-07-06 22:39:54Z mike $"
#
# MIME types file for the Common UNIX Printing System (CUPS).
#
# Copyright 1997-2005 by Easy Software Products.
# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
# VERSIONS OF CUPS. Instead, create a "local.types" file that
# reflects your local configuration changes.
#
# 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
@@ -74,20 +78,20 @@
application/pdf pdf string(0,%PDF)
application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
contains(0,128,<1B>%-12345X) + \
(contains(0,1024,"LANGUAGE=POSTSCRIPT") \
contains(0,1024,"LANGUAGE = Postscript") \
contains(0,1024,"LANGUAGE = PostScript") \
contains(0,1024,"LANGUAGE = POSTSCRIPT") \
(contains(0,1024,<0a>%!) + \
!contains(0,1024,"ENTER LANGUAGE")))
application/vnd.hp-HPGL hpgl string(0,<1B>&)\
(contains(0,4096,"LANGUAGE=POSTSCRIPT") \
contains(0,4096,"LANGUAGE = Postscript") \
contains(0,4096,"LANGUAGE = PostScript") \
contains(0,4096,"LANGUAGE = POSTSCRIPT") \
(contains(0,4096,<0a>%!) + \
!contains(0,4096,"ENTER LANGUAGE")))
application/vnd.hp-HPGL hpgl \
string(0,<1B>E<1B>%0B) \
string(0,<1B>%-1B) string(0,<201B>)\
string(0,BP;) string(0,IN;) string(0,DF;) \
string(0,BPINPS;) \
(contains(0,128,<1B>%-12345X) + \
(contains(0,1024,"LANGUAGE=HPGL") \
contains(0,1024,"LANGUAGE = HPGL")))
(contains(0,4096,"LANGUAGE=HPGL") \
contains(0,4096,"LANGUAGE = HPGL")))
########################################################################
#
@@ -101,7 +105,7 @@ image/jpeg jpeg jpg jpe string(0,<FFD8FF>) &&\
char(3,0xe4) char(3,0xe5) char(3,0xe6) char(3,0xe7)\
char(3,0xe8) char(3,0xe9) char(3,0xea) char(3,0xeb)\
char(3,0xec) char(3,0xed) char(3,0xee) char(3,0xef))
image/tiff tiff tif string(0,MM) string(0,II)
image/tiff tiff tif string(0,MM<002A>) string(0,II<2A00>)
image/x-photocd pcd string(2048,PCD_IPI)
image/x-portable-anymap pnm
image/x-portable-bitmap pbm string(0,P1) string(0,P4)
@@ -167,5 +171,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 6625 2007-07-06 22:39:54Z mike $".
#
+3 -3
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-common.m4 6346 2007-03-17 18:07:17Z mike $"
dnl "$Id: cups-common.m4 6550 2007-06-04 15:38:28Z 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.10"
CUPS_VERSION="1.2.12"
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 6346 2007-03-17 18:07:17Z mike $".
dnl End of "$Id: cups-common.m4 6550 2007-06-04 15:38:28Z mike $".
dnl
+6 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-compiler.m4 6145 2006-12-06 20:10:16Z mike $"
dnl "$Id: cups-compiler.m4 6448 2007-04-10 18:24:19Z mike $"
dnl
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -425,6 +425,10 @@ case $uname in
# 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"
# HP-UX 11.23 (at least) needs this definition to get the
# IPv6 header to work...
OPTIM="$OPTIM -D_HPUX_SOURCE"
;;
OSF*)
@@ -435,5 +439,5 @@ case $uname in
esac
dnl
dnl End of "$Id: cups-compiler.m4 6145 2006-12-06 20:10:16Z mike $".
dnl End of "$Id: cups-compiler.m4 6448 2007-04-10 18:24:19Z mike $".
dnl
+5 -4
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-defaults.m4 6234 2007-02-05 20:25:50Z mike $"
dnl "$Id: cups-defaults.m4 6525 2007-05-08 18:56:05Z mike $"
dnl
dnl Default cupsd configuration settings for the Common UNIX Printing System
dnl (CUPS).
@@ -24,11 +24,12 @@ dnl WWW: http://www.cups.org
dnl
dnl Default langugages...
AC_ARG_WITH(languages, [ --with-languages set installed languages, default="de es et fr it ja pl sv" ],
AC_ARG_WITH(languages, [ --with-languages set installed languages,
default="de es et fr it ja pl sv zh_TW" ],
if test "x$withval" != xno; then
LANGUAGES="$withval"
fi,
LANGUAGES="de es et fr it ja pl sv")
LANGUAGES="de es et fr it ja pl sv zh_TW")
AC_SUBST(LANGUAGES)
dnl Default ConfigFilePerm
@@ -252,5 +253,5 @@ fi
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP")
dnl
dnl End of "$Id: cups-defaults.m4 6234 2007-02-05 20:25:50Z mike $".
dnl End of "$Id: cups-defaults.m4 6525 2007-05-08 18:56:05Z mike $".
dnl
+16 -6
Ver Arquivo
@@ -656,12 +656,15 @@ cupsAdminExportSamba(
"are installed!")),
sizeof(message));
_cupsSetError(IPP_INTERNAL_ERROR, message);
_cupsSetError(IPP_NOT_FOUND, message);
_cupsLangPrintf(logfile, "%s\n", message);
}
if (have_drivers == 0)
{
_cupsSetError(IPP_NOT_FOUND, message);
return (0);
}
/*
* Finally, associate the drivers we just added with the queue...
@@ -1260,14 +1263,21 @@ _cupsAdminSetServerSettings(
{
if (!wrote_browsing)
{
int new_remote_printers = (remote_printers > 0 ||
(remote_printers == -1 &&
old_remote_printers > 0));
int new_share_printers = (share_printers > 0 ||
(share_printers == -1 &&
old_share_printers > 0));
wrote_browsing = 1;
if (remote_printers > 0 || share_printers > 0)
if (new_remote_printers || new_share_printers)
{
if (remote_printers > 0 && share_printers > 0)
if (new_remote_printers && new_share_printers)
cupsFilePuts(temp,
"# Enable printer sharing and shared printers.\n");
else if (remote_printers > 0)
else if (new_remote_printers)
cupsFilePuts(temp,
"# Show shared printers on the local network.\n");
else
@@ -1277,10 +1287,10 @@ _cupsAdminSetServerSettings(
cupsFilePuts(temp, "Browsing On\n");
cupsFilePuts(temp, "BrowseOrder allow,deny\n");
if (remote_printers > 0)
if (new_remote_printers)
cupsFilePuts(temp, "BrowseAllow @LOCAL\n");
if (share_printers > 0)
if (new_share_printers)
cupsFilePuts(temp, "BrowseAddress @LOCAL\n");
}
else
+2 -2
Ver Arquivo
@@ -68,10 +68,10 @@ extern "C" {
* Constants...
*/
# define CUPS_VERSION 1.0210
# define CUPS_VERSION 1.0212
# define CUPS_VERSION_MAJOR 1
# define CUPS_VERSION_MINOR 2
# define CUPS_VERSION_PATCH 10
# define CUPS_VERSION_PATCH 12
# define CUPS_DATE_ANY -1
+1 -1
Ver Arquivo
@@ -603,7 +603,7 @@ cupsLangGet(const char *language) /* I - Language or locale */
pthread_mutex_lock(&lang_mutex);
#endif /* HAVE_PTHREAD_H */
if ((lang = cups_cache_lookup(langname, encoding)) != NULL)
if ((lang = cups_cache_lookup(real, encoding)) != NULL)
{
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&lang_mutex);
+50
Ver Arquivo
@@ -69,6 +69,7 @@ ppdLocalize(ppd_file_t *ppd) /* I - PPD file */
ppd_choice_t *choice; /* Current choice */
ppd_coption_t *coption; /* Current custom option */
ppd_cparam_t *cparam; /* Current custom parameter */
ppd_attr_t *attr; /* Current attribute */
cups_lang_t *lang; /* Current language */
char ckeyword[PPD_MAX_NAME], /* Custom keyword */
ll_CC[6], /* Language + country locale */
@@ -95,6 +96,32 @@ ppdLocalize(ppd_file_t *ppd) /* I - PPD file */
strlcpy(ll_CC, lang->language, sizeof(ll_CC));
strlcpy(ll, lang->language, sizeof(ll));
if (strlen(ll_CC) == 2)
{
/*
* Map "ll" to primary/origin country locales to have the best
* chance of finding a match...
*/
if (!strcmp(ll_CC, "cs"))
strcpy(ll_CC, "cs_CZ");
else if (!strcmp(ll_CC, "en"))
strcpy(ll_CC, "en_US");
else if (!strcmp(ll_CC, "ja"))
strcpy(ll_CC, "ja_JP");
else if (!strcmp(ll_CC, "sv"))
strcpy(ll_CC, "sv_SE");
else if (!strcmp(ll_CC, "zh"))
strcpy(ll_CC, "zh_CN"); /* Simplified Chinese */
else
{
ll_CC[2] = '_';
ll_CC[3] = toupper(ll_CC[0] & 255);
ll_CC[4] = toupper(ll_CC[1] & 255);
ll_CC[5] = '\0';
}
}
DEBUG_printf((" lang->language=\"%s\", ll=\"%s\", ll_CC=\"%s\"...\n",
lang->language, ll, ll_CC));
@@ -151,6 +178,29 @@ ppdLocalize(ppd_file_t *ppd) /* I - PPD file */
}
}
/*
* Translate ICC profile names...
*/
if ((attr = ppdFindAttr(ppd, "APCustomColorMatchingName", NULL)) != NULL)
{
if ((text = ppd_text(ppd, "APCustomColorMatchingName", attr->spec,
ll_CC, ll)) != NULL)
strlcpy(attr->text, text, sizeof(attr->text));
}
for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
attr;
attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))
{
cupsArraySave(ppd->sorted_attrs);
if ((text = ppd_text(ppd, "cupsICCProfile", attr->spec, ll_CC, ll)) != NULL)
strlcpy(attr->text, text, sizeof(attr->text));
cupsArrayRestore(ppd->sorted_attrs);
}
return (0);
}
+73 -3
Ver Arquivo
@@ -1003,7 +1003,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
for (i = 0, sptr = string; i < 4; i ++)
ppd->custom_margins[i] = (float)_cupsStrScand(sptr, &sptr, loc);
}
else if (!strncmp(keyword, "Custom", 6) && !strcmp(name, "True"))
else if (!strncmp(keyword, "Custom", 6) && !strcmp(name, "True") && !option)
{
DEBUG_puts("Processing Custom option...");
@@ -1013,11 +1013,15 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if ((option = ppdFindOption(ppd, keyword + 6)) == NULL)
{
int groupidx; /* Index for current group */
ppd_group_t *gtemp; /* Temporary group */
DEBUG_printf(("%s option not found for %s...\n", keyword + 6, keyword));
if (group)
groupidx = group - ppd->groups; /* Save index for current group */
if ((gtemp = ppd_get_group(ppd, "General", _("General"), cg,
encoding)) == NULL)
{
@@ -1026,6 +1030,9 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
goto error;
}
if (group)
group = ppd->groups + groupidx; /* Restore group pointer */
if ((option = ppd_get_option(gtemp, keyword + 6)) == NULL)
{
DEBUG_printf(("Unable to get %s option!\n", keyword + 6));
@@ -1076,6 +1083,41 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
*/
ppd_add_size(ppd, "Custom");
if ((option = ppdFindOption(ppd, "PageRegion")) == NULL)
{
int groupidx; /* Index to current group */
ppd_group_t *gtemp; /* Temporary group */
if (group)
groupidx = group - ppd->groups; /* Save index for current group */
if ((gtemp = ppd_get_group(ppd, "General", _("General"), cg,
encoding)) == NULL)
{
DEBUG_puts("Unable to get general group!");
goto error;
}
if (group)
group = ppd->groups + groupidx; /* Restore group pointer */
option = ppd_get_option(gtemp, "PageRegion");
}
if ((choice = ppd_add_choice(option, "Custom")) == NULL)
{
DEBUG_puts("Unable to add Custom choice!");
cg->ppd_status = PPD_ALLOC_ERROR;
goto error;
}
strlcpy(choice->text, text[0] ? text : _("Custom"),
sizeof(choice->text));
option = NULL;
}
}
else if (!strcmp(keyword, "LandscapeOrientation"))
@@ -1523,10 +1565,10 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
!strcmp(keyword, "NonUIConstraints"))
{
if (ppd->num_consts == 0)
constraint = calloc(1, sizeof(ppd_const_t));
constraint = calloc(2, sizeof(ppd_const_t));
else
constraint = realloc(ppd->consts,
(ppd->num_consts + 1) * sizeof(ppd_const_t));
(ppd->num_consts + 2) * sizeof(ppd_const_t));
if (constraint == NULL)
{
@@ -1687,6 +1729,34 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
break;
}
/*
* For CustomPageSize and InputSlot/ManualFeed, create a duplicate
* constraint for PageRegion...
*/
if (!strcasecmp(constraint->option1, "CustomPageSize") &&
(!strcasecmp(constraint->option2, "InputSlot") ||
!strcasecmp(constraint->option2, "ManualFeed")))
{
ppd->num_consts ++;
strcpy(constraint[1].option1, "PageRegion");
strcpy(constraint[1].choice1, "Custom");
strcpy(constraint[1].option2, constraint->option2);
strcpy(constraint[1].choice2, constraint->choice2);
}
else if (!strcasecmp(constraint->option2, "CustomPageSize") &&
(!strcasecmp(constraint->option1, "InputSlot") ||
!strcasecmp(constraint->option1, "ManualFeed")))
{
ppd->num_consts ++;
strcpy(constraint[1].option1, constraint->option1);
strcpy(constraint[1].choice1, constraint->choice1);
strcpy(constraint[1].option2, "PageRegion");
strcpy(constraint[1].choice2, "Custom");
}
/*
* Handle CustomFoo option constraints...
*/
+15 -12
Ver Arquivo
@@ -345,19 +345,22 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
while ((state = ippRead(http, response)) != IPP_DATA)
if (state == IPP_ERROR)
{
/*
* Delete the response...
*/
DEBUG_puts("IPP read error!");
ippDelete(response);
response = NULL;
_cupsSetError(IPP_SERVICE_UNAVAILABLE, strerror(errno));
break;
}
if (state == IPP_ERROR)
{
/*
* Delete the response...
*/
DEBUG_puts("IPP read error!");
ippDelete(response);
response = NULL;
_cupsSetError(IPP_SERVICE_UNAVAILABLE, strerror(errno));
break;
}
}
}
+2
Ver Arquivo
@@ -27,3 +27,5 @@ Name[pl]=Zarządzanie drukowaniem
Comment[pl]=Interfejs WWW CUPS
Name[it]=Gestione stampa
Comment[it]=Interfaccia web di CUPS
Name[zh_TW]=印表管理
Comment[zh_TW]=CUPS 網頁介面
+18 -15
Ver Arquivo
@@ -8,7 +8,7 @@
</head>
<body>
<!--
"$Id: spec-ppd.html 6158 2006-12-17 01:44:21Z mike $"
"$Id: spec-ppd.html 6458 2007-04-17 19:22:41Z mike $"
CUPS PPD extensions specification for the Common UNIX Printing System (CUPS).
@@ -204,13 +204,13 @@ http://www.vendor.com/help"
<p>This attribute describes which language localizations are
included in the PPD. The "locale list" string is a space-delimited
list of locale names ("en", "en_US", "fr_FR", etc.)</p>
list of locale names ("en", "en_US", "fr_CA", etc.)</p>
<p>Example:</p>
<pre class='command'>
<em>*% Specify Canadian, UK, and US English, and Candian and French French</em>
*cupsLanguages: "en_CA en_UK en_US fr_CA fr_FR"
*cupsLanguages: "en_CA en_UK en_US fr_CA fr_CA"
</pre>
<h3>cupsManualCopies</h3>
@@ -540,7 +540,10 @@ languages by following the following additional rules:</p>
<li>Localizations are specified using a locale prefix of
the form "ll" or "ll_CC." where "ll" is the 2-letter ISO
language code and "CC" is the 2-letter ISO country
code</li>
code<ul>
<li>A generic language translation ("ll") SHOULD be provided with country-specific differences ("ll_CC") provided only as needed</li>
<li>For historical reasons, the "zh" and "zh_CN" locales map to Simplified Chinese while the "zh_TW" locale maps to Traditional Chinese</li>
</ul></li>
<li>Locale-specific translation strings MUST be encoded
using UTF-8.</li>
@@ -577,17 +580,17 @@ in the PPD file for a given locale.</blockquote>
<pre class='command'>
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*cupsLanguages: "de_DE fr_FR"
*cupsLanguages: "de fr_CA"
*ModelName: "Foobar Laser 9999"
<em>*% Localize ModelName for French and German</em>
*fr_FR.Translation ModelName/La Foobar Laser 9999: ""
*de_DE.Translation ModelName/Foobar LaserDrucken 9999: ""
*fr_CA.Translation ModelName/La Foobar Laser 9999: ""
*de.Translation ModelName/Foobar LaserDrucken 9999: ""
*cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html"
<em>*% Localize printer-state-reason for French and German</em>
*fr_FR.cupsIPPReason com.vendor-error/Une erreur s&egrave;rieuse s'est produite: "/help/com.vendor/error.html"
*de_DE.cupsIPPReason com.vendor-error/Eine ernste St&ouml;rung trat: "/help/com.vendor/error.html"
*fr_CA.cupsIPPReason com.vendor-error/Une erreur s&egrave;rieuse s'est produite: "/help/com.vendor/error.html"
*de.cupsIPPReason com.vendor-error/Eine ernste St&ouml;rung trat: "/help/com.vendor/error.html"
...
@@ -595,16 +598,16 @@ in the PPD file for a given locale.</blockquote>
*OrderDependency: 10 AnySetup *InputSlot
*DefaultInputSlot: Auto
<em>*% Localize InputSlot for French and German</em>
*fr_FR.Translation InputSlot/Papier source: ""
*de_DE.Translation InputSlot/Papiereinzug: ""
*fr_CA.Translation InputSlot/Papier source: ""
*de.Translation InputSlot/Papiereinzug: ""
*InputSlot Auto/Default: "&lt;&lt;/ManualFeed false&gt;&gt;setpagedevice"
<em>*% Localize InputSlot=Auto for French and German</em>
*fr_FR.InputSlot Auto/Par Defaut: ""
*de_DE.InputSlot Auto/Standard: ""
*fr_CA.InputSlot Auto/Par Defaut: ""
*de.InputSlot Auto/Standard: ""
*InputSlot Manual/Manual Feed: "&lt;&lt;/ManualFeed true&gt;&gt;setpagedevice"
<em>*% Localize InputSlot=Manual for French and German</em>
*fr_FR.InputSlot Manual/Manuel mecanisme de alimentation: ""
*de_DE.InputSlot Manual/Manueller Einzug: ""
*fr_CA.InputSlot Manual/Manuel mecanisme de alimentation: ""
*de.InputSlot Manual/Manueller Einzug: ""
*CloseUI: *InputSlot
</pre>
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.3 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.3 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.6 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.3 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 775 B

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.2 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.6 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.8 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 749 B

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.3 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.3 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.6 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.7 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.3 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 764 B

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.8 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.6 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.7 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.6 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.6 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.3 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.5 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.6 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.8 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.7 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.7 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.7 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.6 KiB

+137
Ver Arquivo
@@ -0,0 +1,137 @@
<!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>首頁 - 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;首頁&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;管理&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;分類&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;文件/求助&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;工作&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;印表機&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">歡迎!</H2>
<P>此處的網頁讓您監看您的印表機和工作,以及
進行系統管理任務。按下上方任何的分頁頁標或是
下方的按鈕,以執行某個作業。</P>
<P>
<A HREF="/help/"><IMG SRC="/images/button-help.gif" CLASS="button" ALT="求助"></A>
<A HREF="/admin?OP=add-class"><IMG SRC="/images/button-add-class.gif" CLASS="button" ALT="增加分類"></A>
<A HREF="/admin?OP=add-printer"><IMG SRC="/images/button-add-printer.gif" CLASS="button" ALT="增加印表機"></A>
<A HREF="/classes"><IMG SRC="/images/button-manage-classes.gif" CLASS="button" ALT="管理分類"></A>
<A HREF="/jobs"><IMG SRC="/images/button-manage-jobs.gif" CLASS="button" ALT="管理工作"></A>
<A HREF="/printers"><IMG SRC="/images/button-manage-printers.gif" CLASS="button" ALT="管理印表機"></A>
<A HREF="/admin"><IMG SRC="/images/button-manage-server.gif" CLASS="button" ALT="管理伺服器"></A>
</P>
<P><I>如果向您要求使用者名稱與密碼,請輸入
您的使用者名稱與密碼,或是 "root" 的使用者名稱與密碼。</I></P>
<H2 CLASS="title">關於 CUPS</H2>
<P>
<IMG SRC="/images/happy.gif" ALIGN="LEFT" WIDTH="196" HEIGHT="144"
STYLE="padding-right: 10px;" ALT="快樂的電腦與印表機">
<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 提供以 UNIX<SUP>&reg;</SUP> 為基礎的作業系統
一層具有可攜性的列印介面。它是由 <A HREF="http://www.easysw.com">Easy Software
Products</a> 為了推動一個標準的列印解決方案所開發與維護。CUPS 是目前用於
MacOS<SUP>&reg;</SUP> X 與大部份 Linux<SUP>&reg;</SUP> 發行版本的標準列印系統。</P>
<P>CUPS 使用 <A HREF="http://www.pwg.org/ipp/"
TARGET="_blank"> Internet Printing Protocol ("IPP")</A> 做為
管理列印工作與佇列的基礎,並且加入瀏覽網路印表機和基於
PostScript Printer Description ("PPD") 的列印選項,
以支援真實世界中的列印。<BR CLEAR="ALL"></P>
<H2 CLASS="title">印表機驅動程式與協助</H2>
<P>造訪 CUPS 的官方網站以獲得印表機驅動程式與協助:</P>
<PRE>
<A HREF="http://www.cups.org/" TARGET="_blank">www.cups.org</A>
</PRE>
<P>CUPS 的商業支援與進階版本名為 <A
HREF="http://www.easysw.com/printpro/">ESP Print Pro</A> 是提供自:</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>The Common UNIX Printing System, CUPS, and the CUPS logo are the
trademark property of <A HREF="http://www.easysw.com">Easy Software
Products</A>. CUPS is copyright 1997-2007 by Easy Software Products,
All Rights Reserved.</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>
+7 -1
Ver Arquivo
@@ -182,7 +182,9 @@ ParseCommand(FILE *fp, /* I - File to read from */
{
bufptr = buf;
while ((ch = getc(fp)) != ';')
if (bufptr < (buf + sizeof(buf) - 1))
if (ch == EOF)
break;
else if (bufptr < (buf + sizeof(buf) - 1))
*bufptr++ = ch;
*bufptr = '\0';
@@ -194,6 +196,10 @@ ParseCommand(FILE *fp, /* I - File to read from */
while (!done)
switch (ch = getc(fp))
{
case EOF :
done = 1;
break;
case ',' :
case ' ' :
case '\n' :
+1 -1
Ver Arquivo
@@ -248,7 +248,7 @@ cupsRasterInterpretPPD(
{
float sc = atof(val);
if (sc >= 0.9 && sc <= 1.1)
if (sc >= 0.5 && sc <= 2.0)
h->cupsBorderlessScalingFactor = sc;
}
+7 -3
Ver Arquivo
@@ -1245,7 +1245,9 @@ copy_page(cups_file_t *fp, /* I - File to read from */
pageinfo->num_options = cupsAddOption("InputSlot", doc->ap_input_slot,
pageinfo->num_options,
&(pageinfo->options));
pageinfo->num_options = cupsAddOption("ManualFeed", doc->ap_manual_feed,
pageinfo->num_options = cupsAddOption("ManualFeed",
doc->ap_input_slot ? "False" :
doc->ap_manual_feed,
pageinfo->num_options,
&(pageinfo->options));
}
@@ -1258,7 +1260,9 @@ copy_page(cups_file_t *fp, /* I - File to read from */
pageinfo->num_options = cupsAddOption("InputSlot", doc->input_slot,
pageinfo->num_options,
&(pageinfo->options));
pageinfo->num_options = cupsAddOption("ManualFeed", doc->manual_feed,
pageinfo->num_options = cupsAddOption("ManualFeed",
doc->input_slot ? "False" :
doc->manual_feed,
pageinfo->num_options,
&(pageinfo->options));
}
@@ -1537,7 +1541,7 @@ copy_page(cups_file_t *fp, /* I - File to read from */
if (doc->number_up > 1 || doc->fitplot)
continue;
}
else if (!strncmp(line, "%%EndFeature:", 13))
else if (!strncmp(line, "%%EndFeature", 12))
{
feature = 0;
+25 -12
Ver Arquivo
@@ -171,6 +171,8 @@ cupsRasterOpen(int fd, /* I - File descriptor */
r->sync == CUPS_RASTER_REVSYNCv1 ||
r->sync == CUPS_RASTER_REVSYNCv2)
r->swapped = 1;
DEBUG_printf(("r->swapped=%d, r->sync=%08x\n", r->swapped, r->sync));
}
else
{
@@ -524,10 +526,8 @@ cupsRasterWritePixels(cups_raster_t *r, /* I - Raster stream */
unsigned char *p, /* I - Bytes to write */
unsigned len)/* I - Number of bytes to write */
{
#ifdef DEBUG
fprintf(stderr, "cupsRasterWritePixels(r=%p, p=%p, len=%u), remaining=%u\n",
r, p, len, r->remaining);
#endif /* DEBUG */
DEBUG_printf(("cupsRasterWritePixels(r=%p, p=%p, len=%u), remaining=%u\n",
r, p, len, r->remaining));
if (r == NULL || r->mode != CUPS_RASTER_WRITE || r->remaining == 0)
return (0);
@@ -550,12 +550,7 @@ static unsigned /* O - 1 on success, 0 on fail */
cups_raster_read_header(
cups_raster_t *r) /* I - Raster stream */
{
int len; /* Number of words to swap */
union swap_s /* Swapping structure */
{
unsigned char b[4];
unsigned v;
} *s;
int len; /* Length for read/swap */
if (r == NULL || r->mode != CUPS_RASTER_READ)
@@ -584,10 +579,28 @@ cups_raster_read_header(
*/
if (r->swapped)
for (len = 81, s = (union swap_s *)&(r->header.AdvanceDistance);
{
unsigned *s, /* Current word */
temp; /* Temporary copy */
DEBUG_puts("Swapping header bytes...");
for (len = 81, s = &(r->header.AdvanceDistance);
len > 0;
len --, s ++)
s->v = (((((s->b[3] << 8) | s->b[2]) << 8) | s->b[1]) << 8) | s->b[0];
{
DEBUG_printf(("%08x =>", *s));
temp = *s;
*s = ((temp & 0xff) << 24) |
((temp & 0xff00) << 8) |
((temp & 0xff0000) >> 8) |
((temp & 0xff000000) >> 24);
DEBUG_printf((" %08x\n", *s));
}
}
/*
* Update the header and row count...
BIN
Ver Arquivo
Arquivo binário não exibido.
+28
Ver Arquivo
@@ -0,0 +1,28 @@
#!/bin/sh
##
# PrintingServices - a.k.a. CUPS
##
. /etc/rc.common
StartService ()
{
ConsoleMessage "Starting printing services"
launchctl start org.cups.cupsd
}
StopService ()
{
ConsoleMessage "Stopping printing services"
launchctl stop org.cups.cupsd
}
RestartService ()
{
ConsoleMessage "Restarting printing services"
launchctl stop org.cups.cupsd
launchctl start org.cups.cupsd
}
RunService "$1"
+17 -3
Ver Arquivo
@@ -6,13 +6,21 @@
<string>org.cups.cupsd</string>
<key>OnDemand</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>PathState</key>
<dict>
<key>/private/var/spool/cups/cache/org.cups.cupsd</key>
<true/>
</dict>
</dict>
<key>RunAtLoad</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/cupsd</string>
<string>-l</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<true/>
<key>Sockets</key>
@@ -21,7 +29,13 @@
<array>
<dict>
<key>SockNodeName</key>
<string>localhost</string>
<string>::1</string>
<key>SockServiceName</key>
<string>ipp</string>
</dict>
<dict>
<key>SockNodeName</key>
<string>127.0.0.1</string>
<key>SockServiceName</key>
<string>ipp</string>
</dict>
+86 -120
Ver Arquivo
@@ -17,13 +17,13 @@
# EMail: cups-info@cups.org
# WWW: http://www.cups.org
#
# Vincenzo Reale <smart2128@baslug.org>, 2006.
# Vincenzo Reale <smart2128@baslug.org>, 2006, 2007.
msgid ""
msgstr ""
"Project-Id-Version: cups_it\n"
"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
"POT-Creation-Date: 2007-01-23 09:19-0500\n"
"PO-Revision-Date: 2006-11-16 00:34+0100\n"
"PO-Revision-Date: 2007-05-13 07:50+0200\n"
"Last-Translator: Vincenzo Reale <smart2128@baslug.org>\n"
"Language-Team: Italian <kde-i18n-it@mail.kde.org>\n"
"MIME-Version: 1.0\n"
@@ -104,10 +104,8 @@ msgstr "%s non supportato!"
msgid "The printer or class was not found."
msgstr "La stampante o la classe non è stata trovata."
msgid ""
"The printer-uri must be of the form \"ipp://HOSTNAME/classes/CLASSNAME\"."
msgstr ""
"printer-uri deve essere nella forma \"ipp://NOMEHOST/classes/NOMECLASSE\"."
msgid "The printer-uri must be of the form \"ipp://HOSTNAME/classes/CLASSNAME\"."
msgstr "printer-uri deve essere nella forma \"ipp://NOMEHOST/classes/NOMECLASSE\"."
#, c-format
msgid "The printer-uri \"%s\" contains invalid characters."
@@ -144,14 +142,12 @@ msgstr "Lingua \"%s\" non supportata!"
msgid "The notify-user-data value is too large (%d > 63 octets)!"
msgstr "Il valore notify-user-data è troppo grande (%d > 63 ottetti)!"
msgid ""
"The notify-lease-duration attribute cannot be used with job subscriptions."
msgid "The notify-lease-duration attribute cannot be used with job subscriptions."
msgstr ""
"L'attributo notify-lease-duration non può essere usato con le sottoscrizioni "
"delle operazioni."
msgid ""
"The printer-uri must be of the form \"ipp://HOSTNAME/printers/PRINTERNAME\"."
msgid "The printer-uri must be of the form \"ipp://HOSTNAME/printers/PRINTERNAME\"."
msgstr ""
"printer-uri deve essere nella forma \"ipp://NOMEHOST/printers/NOMESTAMPANTE"
"\"."
@@ -216,8 +212,7 @@ msgstr "L'operazione #%d non è bloccata per l'autenticazione!"
#, c-format
msgid "You are not authorized to authenticate job #%d owned by \"%s\"!"
msgstr ""
"Non sei autorizzato ad autenticare l'operazione #%d di proprietà di \"%s\"!"
msgstr "Non sei autorizzato ad autenticare l'operazione #%d di proprietà di \"%s\"!"
msgid "The printer-uri attribute is required!"
msgstr "L'attributo printer-uri è richiesto!"
@@ -235,8 +230,7 @@ msgstr "Nessuna operazione attiva su %s!"
#, c-format
msgid "You are not authorized to delete job #%d owned by \"%s\"!"
msgstr ""
"Non sei autorizzato ad eliminare l'operazione #%d di proprietà di \"%s\"!"
msgstr "Non sei autorizzato ad eliminare l'operazione #%d di proprietà di \"%s\"!"
#, c-format
msgid "Job #%d is already %s - can't cancel."
@@ -281,10 +275,10 @@ msgid "No default printer"
msgstr "Nessuna stampante predefinita"
msgid "cups-deviced failed to execute."
msgstr "esecuzione di cups-deviced fallita."
msgstr "esecuzione di cups-deviced non riuscita."
msgid "cups-driverd failed to execute."
msgstr "esecuzione di cups-driverd fallita."
msgstr "esecuzione di cups-driverd non riuscita."
msgid "No destinations added."
msgstr "Nessuna destinazione aggiunta."
@@ -314,8 +308,7 @@ msgstr "L'operazione #%d è terminata e non può essere modificata!"
#, c-format
msgid "You are not authorized to move job #%d owned by \"%s\"!"
msgstr ""
"Non sei autorizzato a spostare l'operazione #%d di proprietà di \"%s\"!"
msgstr "Non sei autorizzato a spostare l'operazione #%d di proprietà di \"%s\"!"
msgid "job-printer-uri attribute missing!"
msgstr "attributo job-printer-uri mancante!"
@@ -470,8 +463,7 @@ msgid "lpq: Unknown destination \"%s\"!\n"
msgstr "lpq: Destinazione \"%s\" sconosciuta!\n"
#, c-format
msgid ""
"lp: error - %s environment variable names non-existent destination \"%s\"!\n"
msgid "lp: error - %s environment variable names non-existent destination \"%s\"!\n"
msgstr ""
"lp: errore - i nomi della variabile d'ambiente %s non esistono nella "
"destinazione \"%s\"!\n"
@@ -481,10 +473,9 @@ msgstr "lpq: errore - nessuna destinazione predefinita disponibile.\n"
#, c-format
msgid "lpq: get-jobs failed: %s\n"
msgstr "lpq: get-jobs fallito: %s\n"
msgstr "lpq: get-jobs non riuscito: %s\n"
msgid ""
"Rank Owner Pri Job Files Total Size\n"
msgid "Rank Owner Pri Job Files Total Size\n"
msgstr "Posiz. Proprietario Stamp. Operaz. File Dim. totali\n"
msgid "Rank Owner Job File(s) Total Size\n"
@@ -511,7 +502,7 @@ msgstr "nessuna voce\n"
#, c-format
msgid "lpq: get-printer-attributes failed: %s\n"
msgstr "lpq: get-printer-attributes fallito: %s\n"
msgstr "lpq: get-printer-attributes non riuscito: %s\n"
#, c-format
msgid "%s is ready\n"
@@ -544,8 +535,7 @@ msgid "lpr: error - expected option=value after -o option!\n"
msgstr "lpr: errore - attesa opzione=valore dopo l'opzione -o !\n"
msgid "lpr: warning - email notification is not currently supported!\n"
msgstr ""
"lpr: attenzione - le notifiche via email non sono al momento supportate!\n"
msgstr "lpr: attenzione - le notifiche via email non sono al momento supportate!\n"
msgid "lpr: error - expected destination after -P option!\n"
msgstr "lpr: errore - destinazione attesa dopo l'opzione -P!\n"
@@ -573,8 +563,7 @@ msgid "lpr: error - too many files - \"%s\"\n"
msgstr "lpr: errore - troppi file - \"%s\"\n"
#, c-format
msgid ""
"lpr: error - %s environment variable names non-existent destination \"%s\"!\n"
msgid "lpr: error - %s environment variable names non-existent destination \"%s\"!\n"
msgstr ""
"lpr: errore - i nomi della variabile d'ambiente %s non esistono nella "
"destinazione \"%s\"!\n"
@@ -587,11 +576,11 @@ msgstr "lpr: errore - il pianificatore di operazioni non risponde!\n"
#, c-format
msgid "lpr: error - unable to create temporary file \"%s\" - %s\n"
msgstr "lpr: errore - impossible creare il file temporaneo \"%s\" - %s\n"
msgstr "lpr: errore - impossibile creare il file temporaneo \"%s\" - %s\n"
#, c-format
msgid "lpr: error - unable to write to temporary file \"%s\" - %s\n"
msgstr "lpr: errore - impossible scrivere il file temporaneo \"%s\" - %s\n"
msgstr "lpr: errore - impossibile scrivere il file temporaneo \"%s\" - %s\n"
msgid "lpr: error - stdin is empty, so no job has been sent.\n"
msgstr "lpr: errore - stdin è vuoto, nessuna operazione può essere inviata.\n"
@@ -649,7 +638,7 @@ msgstr "%s: Impossibile connettersi al server: %s\n"
#, c-format
msgid "%s: Operation failed: %s\n"
msgstr "%s: Operazione fallita: %s\n"
msgstr "%s: Operazione non riuscita: %s\n"
msgid "cancel: Error - expected hostname after '-h' option!\n"
msgstr "cancel: Errore - nome host atteso dopo l'opzione '-h'!\n"
@@ -670,7 +659,7 @@ msgstr "cancel: Impossibile contattare il server!\n"
#, c-format
msgid "cancel: %s failed: %s\n"
msgstr "cancel: %s fallito: %s\n"
msgstr "cancel: %s non riuscito: %s\n"
#, c-format
msgid "cupsaddsmb: Missing value on line %d!\n"
@@ -694,7 +683,7 @@ msgstr "cupsaddsmb: Nessun file PPD per la stampante \"%s\" - omesso!\n"
#, c-format
msgid "cupsaddsmb: get-printer-attributes failed for \"%s\": %s\n"
msgstr "cupsaddsmb: get-printer-attributes fallito per \"%s\": %s\n"
msgstr "cupsaddsmb: get-printer-attributes non riuscito per \"%s\": %s\n"
#, c-format
msgid "cupsaddsmb: Unable to convert PPD file for %s - %s\n"
@@ -708,8 +697,7 @@ msgstr ""
#, c-format
msgid "cupsaddsmb: Unable to copy CUPS printer driver files (%d)!\n"
msgstr ""
"cupsaddsmb: Impossibile copiare i file del driver di stampa di CUPS (%d)!\n"
msgstr "cupsaddsmb: Impossibile copiare i file del driver di stampa di CUPS (%d)!\n"
#, c-format
msgid "cupsaddsmb: Unable to install Windows 2000 printer driver files (%d)!\n"
@@ -1183,7 +1171,7 @@ msgstr ""
" WARN %s condivide un prefisso comune con %s\n"
" RIF: Pagina 15, sezione 3.2.\n"
#, fuzzy, c-format
#, c-format
msgid " %d ERROR%s FOUND\n"
msgstr " %d ERROR%s TROVATI\n"
@@ -1234,7 +1222,7 @@ msgstr "lpstat: Impossibile connettersi al server %s alla porta %d: %s\n"
#, c-format
msgid "lpstat: get-printers failed: %s\n"
msgstr "lpstat: get-printers fallita: %s\n"
msgstr "lpstat: get-printers non riuscita: %s\n"
#, c-format
msgid "%s accepting requests since Jan 01 00:00\n"
@@ -1262,7 +1250,7 @@ msgstr ""
#, c-format
msgid "lpstat: get-classes failed: %s\n"
msgstr "lpstat: get-classes fallita: %s\n"
msgstr "lpstat: get-classes non riuscita: %s\n"
#, c-format
msgid "members of class %s:\n"
@@ -1289,8 +1277,7 @@ msgstr "nessuna destinazione predefinita di sistema\n"
#, c-format
msgid "Output for printer %s is sent to remote printer %s on %s\n"
msgstr ""
"L'uscita per la stampante %s è inviata alla stampante remota %s su %s\n"
msgstr "L'uscita per la stampante %s è inviata alla stampante remota %s su %s\n"
#, c-format
msgid "Output for printer %s is sent to %s\n"
@@ -1298,8 +1285,7 @@ msgstr "L'uscita per la stampante %s è inviata a %s\n"
#, c-format
msgid "Output for printer %s/%s is sent to remote printer %s on %s\n"
msgstr ""
"L'uscita per la stampante %s/%s è inviata alla stampante remota %s su %s\n"
msgstr "L'uscita per la stampante %s/%s è inviata alla stampante remota %s su %s\n"
#, c-format
msgid "Output for printer %s/%s is sent to %s\n"
@@ -1315,7 +1301,7 @@ msgstr "dispositivo per %s/%s: %s\n"
#, c-format
msgid "lpstat: get-jobs failed: %s\n"
msgstr "lpstat: get-jobs fallita: %s\n"
msgstr "lpstat: get-jobs non riuscita: %s\n"
#, c-format
msgid "\tqueued for %s\n"
@@ -1443,15 +1429,13 @@ msgid "lpadmin: Expected class name after '-c' option!\n"
msgstr "lpadmin: Atteso nome classe dopo l'opzione '-c'!\n"
msgid "lpadmin: Class name can only contain printable characters!\n"
msgstr ""
"lpadmin: Il nome della classe può contenere solo caratteri stampabili!\n"
msgstr "lpadmin: Il nome della classe può contenere solo caratteri stampabili!\n"
msgid "lpadmin: Expected printer name after '-d' option!\n"
msgstr "lpadmin: Atteso nome stampante dopo l'opzione '-d'!\n"
msgid "lpadmin: Printer name can only contain printable characters!\n"
msgstr ""
"lpadmin: Il nome della stampante può contenere solo caratteri stampabili!\n"
msgstr "lpadmin: Il nome della stampante può contenere solo caratteri stampabili!\n"
msgid "lpadmin: Expected hostname after '-h' option!\n"
msgstr "lpadmin: Atteso nome host dopo l'opzione '-h'!\n"
@@ -1596,15 +1580,15 @@ msgstr "lpadmin: Impossibile aprire il file \"%s\": %s\n"
#, c-format
msgid "lpadmin: add-printer (set model) failed: %s\n"
msgstr "lpadmin: add-printer (impostazione modello) fallito: %s\n"
msgstr "lpadmin: add-printer (impostazione modello) non riuscito: %s\n"
#, c-format
msgid "lpadmin: add-printer (set description) failed: %s\n"
msgstr "lpadmin: add-printer (impostazione descrizione) fallito: %s\n"
msgstr "lpadmin: add-printer (impostazione descrizione) non riuscito: %s\n"
#, c-format
msgid "lpadmin: add-printer (set location) failed: %s\n"
msgstr "lpadmin: add-printer (impostazione posizione) fallito: %s\n"
msgstr "lpadmin: add-printer (impostazione posizione) non riuscito: %s\n"
#, c-format
msgid "lpadmin: Unable to create temporary file - %s\n"
@@ -1616,7 +1600,7 @@ msgstr "lpadmin: Impossibile aprire il file PPD \"%s\" - %s\n"
#, c-format
msgid "lpadmin: %s failed: %s\n"
msgstr "lpadmin: %s fallito: %s\n"
msgstr "lpadmin: %s non riuscito: %s\n"
msgid "lp: Expected destination after -d option!\n"
msgstr "lp: Attesa destinazione dopo l'opzione -d\n"
@@ -1685,10 +1669,8 @@ msgstr "lp: Attenzione - opzione del tipo di contenuto ignorata!\n"
msgid "lp: Unknown option '%c'!\n"
msgstr "lp: Opzione '%c' sconosciuta!\n"
msgid ""
"lp: Error - cannot print from stdin if files or a job ID are provided!\n"
msgstr ""
"lp: Errore - impossibile stampare da stdin senza file o ID dell'operazione!\n"
msgid "lp: Error - cannot print from stdin if files or a job ID are provided!\n"
msgstr "lp: Errore - impossibile stampare da stdin senza file o ID dell'operazione!\n"
#, c-format
msgid "lp: Unable to access \"%s\" - %s\n"
@@ -1725,11 +1707,11 @@ msgstr "l'id richiesto è %s-%d (%d file)\n"
#, c-format
msgid "lp: restart-job failed: %s\n"
msgstr "lp: restart-job fallito: %s\n"
msgstr "lp: restart-job non riuscito: %s\n"
#, c-format
msgid "lp: set-job-attributes failed: %s\n"
msgstr "lp: set-job-attributes fallito: %s\n"
msgstr "lp: set-job-attributes non riuscito: %s\n"
#, c-format
msgid "lpinfo: Unable to connect to server: %s\n"
@@ -1745,7 +1727,7 @@ msgstr "lpinfo: Argomento '%s' sconosciuto!\n"
#, c-format
msgid "lpinfo: cups-get-devices failed: %s\n"
msgstr "lpinfo: cups-get-devices fallito: %s\n"
msgstr "lpinfo: cups-get-devices non riuscito: %s\n"
#, c-format
msgid ""
@@ -1761,7 +1743,7 @@ msgstr ""
#, c-format
msgid "lpinfo: cups-get-ppds failed: %s\n"
msgstr "lpinfo: cups-get-ppds fallito: %s\n"
msgstr "lpinfo: cups-get-ppds non riuscito: %s\n"
#, c-format
msgid ""
@@ -1790,7 +1772,7 @@ msgstr "lpmove: Impossibile connettersi al server: %s\n"
#, c-format
msgid "lpmove: move-job failed: %s\n"
msgstr "lpmove: move-job fallito: %s\n"
msgstr "lpmove: move-job non riuscito: %s\n"
msgid "lpoptions: Unknown printer or class!\n"
msgstr "lpoptions: Stampante o classe sconosciuta!\n"
@@ -1872,12 +1854,11 @@ msgstr "lppasswd: File delle password non aggiornato!\n"
#, c-format
msgid "lppasswd: failed to backup old password file: %s\n"
msgstr ""
"lppasswd: copia di sicurezza del vecchio file delle password fallita: %s\n"
msgstr "lppasswd: copia di sicurezza del vecchio file delle password non riuscita: %s\n"
#, c-format
msgid "lppasswd: failed to rename password file: %s\n"
msgstr "lppasswd: rinomina del file delle password fallita: %s\n"
msgstr "lppasswd: rinomina del file delle password non riuscita: %s\n"
msgid "Usage: lppasswd [-g groupname]\n"
msgstr "Uso: lppasswd [-g nomegruppo]\n"
@@ -2069,7 +2050,7 @@ msgstr "Impossibile eseguire il comando cupsaddsmb!"
#, c-format
msgid "cupsaddsmb failed with status %d"
msgstr "cupsaddsmb fallito con stato %d"
msgstr "cupsaddsmb non riuscito con stato %d"
#, c-format
msgid "cupsaddsmb crashed on signal %d"
@@ -2133,7 +2114,7 @@ msgid "Jobs"
msgstr "Operazioni"
msgid "Job operation failed:"
msgstr "Operazione fallita:"
msgstr "Operazione non riuscita:"
msgid "Printers"
msgstr "Stampanti"
@@ -2330,8 +2311,7 @@ msgid "%s: Error - expected hostname after '-h' option!\n"
msgstr "%s: Errore - atteso nome host dopo l'opzione '-h'!\n"
#, c-format
msgid ""
"%s: error - %s environment variable names non-existent destination \"%s\"!\n"
msgid "%s: error - %s environment variable names non-existent destination \"%s\"!\n"
msgstr ""
"%s: errore - i nomi della variabile d'ambiente %s non esistono nella "
"destinazione \"%s\"!\n"
@@ -2340,10 +2320,8 @@ msgstr ""
msgid "%s: error - no default destination available.\n"
msgstr "%s: errore - nessuna destinazione predefinita disponibile.\n"
msgid ""
"Usage: lpq [-P dest] [-U username] [-h hostname[:port]] [-l] [+interval]\n"
msgstr ""
"Uso: lpq [-P dest] [-U nomeutente] [-h nomehost[:porta]] [-l] [+intervallo]\n"
msgid "Usage: lpq [-P dest] [-U username] [-h hostname[:port]] [-l] [+interval]\n"
msgstr "Uso: lpq [-P dest] [-U nomeutente] [-h nomehost[:porta]] [-l] [+intervallo]\n"
#, c-format
msgid "%s: Error - expected hostname after '-H' option!\n"
@@ -2390,8 +2368,7 @@ msgid "%s: Error - too many files - \"%s\"\n"
msgstr "%s: Errore - troppi file - \"%s\"\n"
#, c-format
msgid ""
"%s: Error - %s environment variable names non-existent destination \"%s\"!\n"
msgid "%s: Error - %s environment variable names non-existent destination \"%s\"!\n"
msgstr ""
"%s: Errore - i nomi della variabile d'ambiente %s non esistono nella "
"destinazione \"%s\"!\n"
@@ -2430,7 +2407,7 @@ msgstr "%s: Errore - atteso nome utente dopo l'opzione '-u'!\n"
#, c-format
msgid "%s: %s failed: %s\n"
msgstr "%s: %s fallito: %s\n"
msgstr "%s: %s non riuscito: %s\n"
#, c-format
msgid "%s: Error - expected destination after '-d' option!\n"
@@ -2492,8 +2469,7 @@ msgstr "%s: Errore - atteso nome di blocco dopo l'opzione '-H'!\n"
#, c-format
msgid "%s: Need job ID ('-i jobid') before '-H restart'!\n"
msgstr ""
"%s: Usare l'ID dell'operazione ('-i idoperazione') prima di '-H restart'!\n"
msgstr "%s: Usare l'ID dell'operazione ('-i idoperazione') prima di '-H restart'!\n"
#, c-format
msgid "%s: Error - expected page list after '-P' option!\n"
@@ -2516,10 +2492,8 @@ msgid "%s: Warning - content type option ignored!\n"
msgstr "%s: Attenzione - opzione del tipo di contenuto ignorata!\n"
#, c-format
msgid ""
"%s: Error - cannot print from stdin if files or a job ID are provided!\n"
msgstr ""
"%s: Errore - impossibile stampare da stdin senza file o ID dell'operazione!\n"
msgid "%s: Error - cannot print from stdin if files or a job ID are provided!\n"
msgstr "%s: Errore - impossibile stampare da stdin senza file o ID dell'operazione!\n"
#, c-format
msgid ""
@@ -2587,8 +2561,7 @@ msgid "cupsd: Expected config filename after \"-c\" option!\n"
msgstr "cupsd: Atteso nome file di configurazione dopo l'opzione \"-c\"!\n"
msgid "cupsd: launchd(8) support not compiled in, running in normal mode.\n"
msgstr ""
"cupsd: supporto launchd(8) non compilato, esecuzione in modalità normale.\n"
msgstr "cupsd: supporto launchd(8) non compilato, esecuzione in modalità normale.\n"
#, c-format
msgid "cupsd: Unknown option \"%c\" - aborting!\n"
@@ -2619,8 +2592,7 @@ msgstr ""
msgid " WARN Line %d only contains whitespace!\n"
msgstr " WARN La riga %d contiene solamente spazi bianchi!\n"
msgid ""
" WARN File contains a mix of CR, LF, and CR LF line endings!\n"
msgid " WARN File contains a mix of CR, LF, and CR LF line endings!\n"
msgstr ""
" WARN Il file contiene un misto di interruzioni di riga CR, LF, e "
"CR LF!\n"
@@ -2652,8 +2624,7 @@ msgstr " **FAIL** Lingua \"%s\" errata!\n"
#, c-format
msgid " **FAIL** Missing \"%s\" translation string for option %s!\n"
msgstr ""
" **FAIL** Stringa di traduzione \"%s\" mancante per l'opzione %s!\n"
msgstr " **FAIL** Stringa di traduzione \"%s\" mancante per l'opzione %s!\n"
#, c-format
msgid ""
@@ -2664,8 +2635,7 @@ msgstr ""
"contiene caratteri di 8-bit!\n"
#, c-format
msgid ""
" **FAIL** Missing \"%s\" translation string for option %s, choice %s!\n"
msgid " **FAIL** Missing \"%s\" translation string for option %s, choice %s!\n"
msgstr ""
" **FAIL** Stringa di traduzione \"%s\" mancante per l'opzione %s, "
"scelta %s!\n"
@@ -2699,8 +2669,7 @@ msgstr "Opzione + scelta errata alla riga %d!\n"
#, c-format
msgid "Unable to copy Windows 2000 printer driver files (%d)!\n"
msgstr ""
"Impossibile copiare i file dei driver di stampa di Windows 2000 (%d)!\n"
msgstr "Impossibile copiare i file dei driver di stampa di Windows 2000 (%d)!\n"
#, c-format
msgid "Unable to copy CUPS printer driver files (%d)!\n"
@@ -2708,8 +2677,7 @@ msgstr "Impossibile copiare i file dei driver di stampa di CUPS (%d)!\n"
#, c-format
msgid "Unable to install Windows 2000 printer driver files (%d)!\n"
msgstr ""
"Impossibile installare i file dei driver di stampa di Windows 2000 (%d)!\n"
msgstr "Impossibile installare i file dei driver di stampa di Windows 2000 (%d)!\n"
#, c-format
msgid "Unable to copy Windows 9x printer driver files (%d)!\n"
@@ -2717,8 +2685,7 @@ msgstr "Impossibile copiare i file dei driver di stampa di Windows 9x (%d)!\n"
#, c-format
msgid "Unable to install Windows 9x printer driver files (%d)!\n"
msgstr ""
"Impossibile installare i file dei driver di stampa di Windows 9x (%d)!\n"
msgstr "Impossibile installare i file dei driver di stampa di Windows 9x (%d)!\n"
msgid "No Windows printer drivers are installed!\n"
msgstr "Nessun driver di stampa di Windows è installato!\n"
@@ -2763,8 +2730,7 @@ msgstr "Impossibile copiare i file dei driver di stampa di CUPS (%d)!"
#, c-format
msgid "Unable to install Windows 2000 printer driver files (%d)!"
msgstr ""
"Impossibile installare i file dei driver di stampa di Windows 2000 (%d)!"
msgstr "Impossibile installare i file dei driver di stampa di Windows 2000 (%d)!"
#, c-format
msgid "Unable to copy Windows 9x printer driver files (%d)!"
@@ -2782,7 +2748,7 @@ msgstr "Attenzione, nessun driver di stampa Windows 2000 è installato!"
#, c-format
msgid "open of %s failed: %s"
msgstr "apertura di %s fallita: %s"
msgstr "apertura di %s non riuscita: %s"
#, c-format
msgid "Running command: %s %s -N -A %s -c '%s'\n"
@@ -2790,7 +2756,7 @@ msgstr "Esecuzione del comando: %s %s -N -A %s -c '%s'\n"
#, c-format
msgid "stat of %s failed: %s"
msgstr "verifica di %s fallita: %s"
msgstr "verifica di %s non riuscita: %s"
#, c-format
msgid "Job #%d is already cancelled - can't cancel."
@@ -2948,54 +2914,54 @@ msgstr ""
" **FAIL** 1284DeviceId deve essere 1284DeviceID!\n"
" RIF: Pagina 72, sezione 5.5\n"
#, fuzzy, c-format
#, c-format
msgid "Missing value on line %d!"
msgstr "Valore mancante alla riga %d!\n"
msgstr "Valore mancante alla riga %d!"
#, fuzzy, c-format
#, c-format
msgid "Missing double quote on line %d!"
msgstr "Doppi apici mancanti alla riga %d!\n"
msgstr "Doppi apici mancanti alla riga %d!"
#, fuzzy, c-format
#, c-format
msgid "Bad option + choice on line %d!"
msgstr "Opzione + scelta errata alla riga %d!\n"
msgstr "Opzione + scelta errata alla riga %d!"
#, fuzzy
msgid "Empty PPD file!"
msgstr "Impossibile copiare il file PPD!"
msgstr "File PPD vuoto!"
#, fuzzy, c-format
#, c-format
msgid "Unable to set Windows printer driver (%d)!"
msgstr "Impossibile configurare il driver di stampa di Windows (%d)!\n"
msgstr "Impossibile configurare il driver di stampa di Windows (%d)!"
#, fuzzy, c-format
#, c-format
msgid "Unable to run \"%s\": %s\n"
msgstr "cupsaddsmb: Impossibile eseguire \"%s\": %s\n"
msgstr "Impossibile eseguire \"%s\": %s\n"
#, fuzzy, c-format
#, c-format
msgid "Job #%d is already canceled - can't cancel."
msgstr "L'operazione #%d è già annullata - impossibile annullare."
msgstr "L'operazione #%d è stata già annullata - impossibile annullare."
#, c-format
msgid "Bad notify-recipient URI \"%s\"!"
msgstr ""
msgstr "URI notify-recipient \"%s\" errato!"
#, c-format
msgid "notify-recipient URI \"%s\" uses unknown scheme!"
msgstr ""
msgstr "L'URI notify-recipient \"%s\" utilizza uno schema sconosciuto!"
#, fuzzy, c-format
#, c-format
msgid "Bad notify-pull-method \"%s\"!"
msgstr "port-monitor \"%s\" errato!"
msgstr "notify-pull-method \"%s\" errato!"
#, fuzzy, c-format
#, c-format
msgid ""
" **FAIL** %s must be 1284DeviceID!\n"
" REF: Page 72, section 5.5\n"
msgstr ""
" **FAIL** 1284DeviceId deve essere 1284DeviceID!\n"
" **FAIL** %s deve essere 1284DeviceID!\n"
" RIF: Pagina 72, sezione 5.5\n"
#, fuzzy, c-format
#, c-format
msgid "lpoptions: Unable to get PPD file for %s: %s\n"
msgstr "lpoptions: Impossibile aprire il file PPD per %s!\n"
msgstr "lpoptions: Impossibile ottenere il file PPD per %s: %s\n"
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+5 -5
Ver Arquivo
@@ -1,9 +1,9 @@
.\"
.\" "$Id: filter.man 5327 2006-03-23 19:53:24Z mike $"
.\" "$Id: filter.man 6625 2007-07-06 22:39:54Z mike $"
.\"
.\" filter man page 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
@@ -21,7 +21,7 @@
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
.TH filter 7 "Common UNIX Printing System" "23 March 2006" "Easy Software Products"
.TH filter 7 "Common UNIX Printing System" "6 July 2007" "Easy Software Products"
.SH NAME
filter \- cups file conversion filter interface
.SH SYNOPSIS
@@ -104,7 +104,7 @@ message to the current \fIErrorLog\fR using the "notice" log level.
.TP 5
PAGE: page-number #-copies
.TP 5
PAGE: #-pages total
PAGE: total #-pages
.br
Adds an entry to the current \fIPageLog\fR. The first form adds
#-copies to the job-media-sheets-completed attribute. The second
@@ -226,5 +226,5 @@ http://localhost:631/help
.SH COPYRIGHT
Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: filter.man 5327 2006-03-23 19:53:24Z mike $".
.\" End of "$Id: filter.man 6625 2007-07-06 22:39:54Z mike $".
.\"
+28 -2
Ver Arquivo
@@ -128,6 +128,9 @@
%subpackage sv
%description Swedish support
%subpackage zh
%description Chinese support
%subpackage
@@ -374,6 +377,8 @@ f 0644 root sys $LOCALEDIR/ja/cups_ja.po locale/cups_ja.po
f 0644 root sys $LOCALEDIR/pl/cups_pl.po locale/cups_pl.po
%subpackage sv
f 0644 root sys $LOCALEDIR/sv/cups_sv.po locale/cups_sv.po
%subpackage zh
f 0644 root sys $LOCALEDIR/zh_TW/cups_zh_TW.po locale/cups_zh_TW.po
%subpackage
d 0755 root sys $DATADIR -
@@ -428,7 +433,7 @@ d 0755 root sys $DATADIR/model -
f 0644 root sys $DATADIR/model ppd/*.ppd
d 0755 root sys $DATADIR/templates -
c 0644 root sys $DATADIR/templates templates/*.tmpl
f 0644 root sys $DATADIR/templates templates/*.tmpl
# Japanese template files
%subpackage de
@@ -455,6 +460,9 @@ f 0644 root sys $DATADIR/templates/pl templates/pl/*.tmpl
%subpackage sv
d 0755 root sys $DATADIR/templates/sv
f 0644 root sys $DATADIR/templates/sv templates/sv/*.tmpl
%subpackage zh
d 0755 root sys $DATADIR/templates/zh_TW
f 0644 root sys $DATADIR/templates/zh_TW templates/zh_TW/*.tmpl
%subpackage
# Config files
@@ -566,6 +574,11 @@ d 0755 root sys $DOCDIR/sv
f 0644 root sys $DOCDIR/sv doc/sv/*.html
d 0755 root sys $DOCDIR/sv/images -
f 0644 root sys $DOCDIR/sv/images doc/sv/images/*.gif
%subpackage zh
d 0755 root sys $DOCDIR/zh_TW
f 0644 root sys $DOCDIR/zh_TW doc/zh_TW/*.html
d 0755 root sys $DOCDIR/zh_TW/images -
f 0644 root sys $DOCDIR/zh_TW/images doc/zh_TW/images/*.gif
%subpackage
# Man pages
@@ -620,13 +633,26 @@ f 0644 root sys $AMANDIR/man$MAN8DIR/cups-lpd.$MAN8EXT man/cups-lpd.$MAN8EXT
# Startup scripts
%system darwin
f 0644 root sys /System/Library/LaunchDaemons/org.cups.cupsd.plist init/org.cups.cupsd.plist
d 0755 root sys /System/Library/StartupItems/PrintingServices -
f 0644 root sys /System/Library/StartupItems/PrintingServices/PrintingServices init/PrintingServices.launchd
f 0644 root sys /System/Library/StartupItems/PrintingServices/StartupParamters.plist init/StartupParameters.plist
d 0755 root sys /System/Library/StartupItems/PrintingServices/Resources -
d 0755 root sys /System/Library/StartupItems/PrintingServices/Resources/English.lproj -
f 0644 root sys /System/Library/StartupItems/PrintingServices/Resources/English.lproj/Localizable.strings init/Localizable.strings
%preremove <<EOF
launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0
killall cupsd
EOF
%postinstall <<EOF
rm -f /System/Library/StartupItems/PrintingServices/PrintingServices
launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0
launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist
launchctl start org.cups.cupsd
EOF
%subpackage lpd
f 0644 root sys /System/Library/LaunchDaemons/org.cups.cups-lpd.plist init/org.cups.cups-lpd.plist
%preremove <<EOF
launchctl unload /System/Library/LaunchDaemons/org.cups.cups-lpd.plist || exit 0
EOF
%postinstall <<EOF
rm -f /etc/xinetd.d/cups-lpd
launchctl unload /System/Library/LaunchDaemons/org.cups.cups-lpd.plist || exit 0
+20 -1
Ver Arquivo
@@ -5,7 +5,7 @@
#
# Original version by Jason McMullan <jmcc@ontv.com>.
#
# Copyright 1999-2006 by Easy Software Products, all rights reserved.
# Copyright 1999-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
@@ -116,6 +116,11 @@ Summary: Common UNIX Printing System - Swedish support
Group: System Environment/Daemons
Requires: %{name} = %{epoch}:%{version}
%package zh
Summary: Common UNIX Printing System - Chinese support
Group: System Environment/Daemons
Requires: %{name} = %{epoch}:%{version}
%if %{?_with_php:1}%{!?_with_php:0}
%package php
Summary: Common UNIX Printing System - PHP support
@@ -174,6 +179,10 @@ UNIX
The Common UNIX Printing System provides a portable printing layer for
UNIX® operating systems. This package provides Swedish support.
%description zh
The Common UNIX Printing System provides a portable printing layer for
UNIX® operating systems. This package provides Chinese support.
%if %{?_with_php:1}%{!?_with_php:0}
%description php
The Common UNIX Printing System provides a portable printing layer for
@@ -489,6 +498,16 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/cups/templates/sv/*
/usr/share/locale/sv/cups_sv.po
%files zh
%defattr(-,root,root)
%dir /usr/share/doc/cups/zh_TW
/usr/share/doc/cups/zh_TW/index.html
%dir /usr/share/doc/cups/zh_TW/images
/usr/share/doc/cups/zh_TW/images/*
%dir /usr/share/cups/templates/zh_TW
/usr/share/cups/templates/zh_TW/*
/usr/share/locale/zh_TW/cups_zh_TW.po
%if %{?_with_php:1}%{!?_with_php:0}
%files php
# PHP
+15 -5
Ver Arquivo
@@ -1159,7 +1159,14 @@ void PSOutputDev::writeHeader(int firstPage, int lastPage,
}
// Tell CUPS pstops filter not to do its own rotation...
writePSFmt("%%cupsRotation: %d\n", pageRotate);
int cups_rotate = 0;
int width = (int)ceil(mediaBox->x2 - mediaBox->x1);
int height = (int)ceil(mediaBox->y2 - mediaBox->y1);
int imgWidth = (int)ceil(cropBox->x2 - cropBox->x1);
if (width > height && width > imgWidth) cups_rotate = 90;
writePSFmt("%%cupsRotation: %d\n", cups_rotate);
writePSFmt("%%Producer: xpdf/pdftops %s\n", xpdfVersion);
xref->getDocInfo(&info);
@@ -2511,17 +2518,19 @@ GBool PSOutputDev::startPage(int pageNum, GfxState *state) {
landscape = gFalse;
} else {
rotate = (360 - state->getRotate()) % 360;
fprintf(stderr, "DEBUG: Page rotate=%d, width=%d, height=%d, imgWidth=%d, imgHeight=%d\n",
state->getRotate(), width, height, imgWidth, imgHeight);
if (rotate == 0 || rotate == 180) {
if ((width > height && imgWidth < imgHeight) ||
(height > width && imgHeight < imgWidth)) {
if (width > height && width > imgWidth) {
rotate += 90;
landscape = gTrue;
} else {
landscape = gFalse;
}
} else { // rotate == 90 || rotate == 270
if ((width > height && imgWidth < imgHeight) ||
(height > width && imgHeight < imgWidth)) {
if (height > width && height > imgWidth) {
rotate = 270 - rotate;
landscape = gTrue;
} else {
@@ -2529,6 +2538,7 @@ GBool PSOutputDev::startPage(int pageNum, GfxState *state) {
}
}
}
writePSFmt("%%%%PageOrientation: %s\n",
landscape ? "Landscape" : "Portrait");
writePS("pdfStartPage\n");
+22 -1
Ver Arquivo
@@ -265,6 +265,14 @@ cupsdFindAvailablePrinter(
return (NULL);
}
/*
* Make sure that the last printer is also a valid index into the printer
* array. If not, reset the last printer to 0...
*/
if (c->last_printer >= c->num_printers)
c->last_printer = 0;
/*
* Loop through the printers in the class and return the first idle
* printer... We keep track of the last printer that we used so that
@@ -667,7 +675,20 @@ cupsdLoadAllClasses(void)
else if (!strcasecmp(line, "OpPolicy"))
{
if (value)
cupsdSetString(&p->op_policy, value);
{
cupsd_policy_t *pol; /* Policy */
if ((pol = cupsdFindPolicy(value)) != NULL)
{
cupsdSetString(&p->op_policy, value);
p->op_policy_ptr = pol;
}
else
cupsdLogMessage(CUPSD_LOG_ERROR,
"Bad policy \"%s\" on line %d of classes.conf",
value, linenum);
}
else
{
cupsdLogMessage(CUPSD_LOG_ERROR,
+34 -10
Ver Arquivo
@@ -3344,9 +3344,9 @@ is_cgi(cupsd_client_t *con, /* I - Client connection */
cupsdSetString(&con->command, CUPS_JAVA);
if (options)
cupsdSetStringf(&con->options, "%s %s", filename, options);
cupsdSetStringf(&con->options, " %s %s", filename, options);
else
cupsdSetString(&con->options, filename);
cupsdSetStringf(&con->options, " %s", filename);
cupsdLogMessage(CUPSD_LOG_DEBUG2,
"is_cgi: Returning 1 with command=\"%s\" and options=\"%s\"",
@@ -3365,9 +3365,9 @@ is_cgi(cupsd_client_t *con, /* I - Client connection */
cupsdSetString(&con->command, CUPS_PERL);
if (options)
cupsdSetStringf(&con->options, "%s %s", filename, options);
cupsdSetStringf(&con->options, " %s %s", filename, options);
else
cupsdSetString(&con->options, filename);
cupsdSetStringf(&con->options, " %s", filename);
cupsdLogMessage(CUPSD_LOG_DEBUG2,
"is_cgi: Returning 1 with command=\"%s\" and options=\"%s\"",
@@ -3386,9 +3386,9 @@ is_cgi(cupsd_client_t *con, /* I - Client connection */
cupsdSetString(&con->command, CUPS_PHP);
if (options)
cupsdSetStringf(&con->options, "%s %s", filename, options);
cupsdSetStringf(&con->options, " %s %s", filename, options);
else
cupsdSetString(&con->options, filename);
cupsdSetStringf(&con->options, " %s", filename);
cupsdLogMessage(CUPSD_LOG_DEBUG2,
"is_cgi: Returning 1 with command=\"%s\" and options=\"%s\"",
@@ -3407,9 +3407,9 @@ is_cgi(cupsd_client_t *con, /* I - Client connection */
cupsdSetString(&con->command, CUPS_PYTHON);
if (options)
cupsdSetStringf(&con->options, "%s %s", filename, options);
cupsdSetStringf(&con->options, " %s %s", filename, options);
else
cupsdSetString(&con->options, filename);
cupsdSetStringf(&con->options, " %s", filename);
cupsdLogMessage(CUPSD_LOG_DEBUG2,
"is_cgi: Returning 1 with command=\"%s\" and options=\"%s\"",
@@ -3928,8 +3928,9 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
int envc; /* Number of environment variables */
char argbuf[10240], /* Argument buffer */
*argv[100], /* Argument strings */
*envp[MAX_ENV + 17]; /* Environment variables */
char content_length[1024], /* CONTENT_LENGTH environment variable */
*envp[MAX_ENV + 20]; /* Environment variables */
char auth_type[256], /* AUTH_TYPE environment variable */
content_length[1024], /* CONTENT_LENGTH environment variable */
content_type[1024], /* CONTENT_TYPE environment variable */
http_cookie[32768], /* HTTP_COOKIE environment variable */
http_user_agent[1024], /* HTTP_USER_AGENT environment variable */
@@ -3938,6 +3939,7 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
remote_addr[1024], /* REMOTE_ADDR environment variable */
remote_host[1024], /* REMOTE_HOST environment variable */
remote_user[1024], /* REMOTE_USER environment variable */
script_filename[1024], /* SCRIPT_FILENAME environment variable */
script_name[1024], /* SCRIPT_NAME environment variable */
server_name[1024], /* SERVER_NAME environment variable */
server_port[1024]; /* SERVER_PORT environment variable */
@@ -3990,6 +3992,9 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
{
commptr = argbuf;
path_info[0] = '\0';
if (*commptr == ' ')
commptr ++;
}
cupsdLogMessage(CUPSD_LOG_INFO, "commptr=\"%s\"", commptr);
@@ -4064,6 +4069,17 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
* Setup the environment variables as needed...
*/
if (con->username[0])
{
snprintf(auth_type, sizeof(auth_type), "AUTH_TYPE=%s",
httpGetField(HTTP(con), HTTP_FIELD_AUTHORIZATION));
if ((uriptr = strchr(auth_type + 10, ' ')) != NULL)
*uriptr = '\0';
}
else
auth_type[0] = '\0';
if (con->language)
snprintf(lang, sizeof(lang), "LANG=%s.UTF-8", con->language->language);
else
@@ -4080,6 +4096,9 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
if ((uriptr = strchr(script_name, '?')) != NULL)
*uriptr = '\0';
snprintf(script_filename, sizeof(script_filename), "SCRIPT_FILENAME=%s%s",
DocumentRoot, script_name + 12);
sprintf(server_port, "SERVER_PORT=%d", con->serverport);
snprintf(server_name, sizeof(server_name), "SERVER_NAME=%s",
@@ -4087,13 +4106,18 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
envc = cupsdLoadEnv(envp, (int)(sizeof(envp) / sizeof(envp[0])));
if (auth_type[0])
envp[envc ++] = auth_type;
envp[envc ++] = lang;
envp[envc ++] = "REDIRECT_STATUS=1";
envp[envc ++] = "GATEWAY_INTERFACE=CGI/1.1";
envp[envc ++] = server_name;
envp[envc ++] = server_port;
envp[envc ++] = remote_addr;
envp[envc ++] = remote_host;
envp[envc ++] = script_name;
envp[envc ++] = script_filename;
if (path_info[0])
envp[envc ++] = path_info;
+8 -7
Ver Arquivo
@@ -1146,7 +1146,7 @@ check_permissions(const char *filename, /* I - File/directory name */
{
if (errno == ENOENT && create_dir)
{
cupsdLogMessage(CUPSD_LOG_ERROR, "Creating missing directory \"%s\"",
cupsdLogMessage(CUPSD_LOG_DEBUG, "Creating missing directory \"%s\"",
filename);
if (mkdir(filename, mode))
@@ -1185,9 +1185,9 @@ check_permissions(const char *filename, /* I - File/directory name */
if (dir_created || fileinfo.st_uid != user || fileinfo.st_gid != group)
{
cupsdLogMessage(CUPSD_LOG_WARN, "Repairing ownership of \"%s\"", filename);
cupsdLogMessage(CUPSD_LOG_DEBUG, "Repairing ownership of \"%s\"", filename);
if (chown(filename, user, group))
if (chown(filename, user, group) && !getuid())
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"Unable to change ownership of \"%s\" - %s", filename,
@@ -1198,7 +1198,8 @@ check_permissions(const char *filename, /* I - File/directory name */
if (dir_created || (fileinfo.st_mode & 07777) != mode)
{
cupsdLogMessage(CUPSD_LOG_WARN, "Repairing access permissions of \"%s\"", filename);
cupsdLogMessage(CUPSD_LOG_DEBUG, "Repairing access permissions of \"%s\"",
filename);
if (chmod(filename, mode))
{
@@ -1744,7 +1745,7 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
cupsdLogMessage(CUPSD_LOG_WARN,
"\"AuthClass %s\" is deprecated; consider using "
"\"Require @groupname\" on line %d.",
"\"Require user @groupname\" on line %d.",
value, linenum);
}
else if (!strcasecmp(value, "system"))
@@ -1755,7 +1756,7 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
cupsdLogMessage(CUPSD_LOG_WARN,
"\"AuthClass %s\" is deprecated; consider using "
"\"Require @SYSTEM\" on line %d.",
"\"Require user @SYSTEM\" on line %d.",
value, linenum);
}
else
@@ -1772,7 +1773,7 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
cupsdLogMessage(CUPSD_LOG_WARN,
"\"AuthGroupName %s\" directive is deprecated; consider "
"using \"Require @%s\" on line %d.",
"using \"Require user @%s\" on line %d.",
value, value, linenum);
}
else if (!strcasecmp(line, "Require"))
+1 -1
Ver Arquivo
@@ -675,7 +675,7 @@ load_ppds(const char *d, /* I - Actual directory */
*language; /* Language code */
} languages[] =
{
{ "chinese", "cn" },
{ "chinese", "zh" },
{ "danish", "da" },
{ "dutch", "nl" },
{ "english", "en" },
+1 -1
Ver Arquivo
@@ -2627,7 +2627,7 @@ send_cups_browse(cupsd_printer_t *p) /* I - Printer to send */
{
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
iface->hostname, iface->port,
(p->type & CUPS_PRINTER_CLASS) ? "/classes/%s%s" :
(p->type & CUPS_PRINTER_CLASS) ? "/classes/%s" :
"/printers/%s",
p->name);
snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s\n",
+12 -4
Ver Arquivo
@@ -1296,11 +1296,16 @@ add_job(cupsd_client_t *con, /* I - Client connection */
return (NULL);
}
if (!check_quotas(con, printer))
if ((i = check_quotas(con, printer)) < 0)
{
send_ipp_status(con, IPP_NOT_POSSIBLE, _("Quota limit reached."));
return (NULL);
}
else if (i == 0)
{
send_ipp_status(con, IPP_NOT_AUTHORIZED, _("Not allowed to print."));
return (NULL);
}
/*
* Create the job and set things up...
@@ -1823,7 +1828,7 @@ add_job_subscriptions(
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)
recipient = attr->values[0].string.text;
else if (!strcmp(attr->name, "notify-pull-method") &&
@@ -3240,7 +3245,7 @@ check_quotas(cupsd_client_t *con, /* I - Client connection */
cupsdLogMessage(CUPSD_LOG_ERROR,
"Unable to allocate quota data for user \"%s\"!",
username);
return (0);
return (-1);
}
if ((q->k_count >= p->k_limit && p->k_limit) ||
@@ -3248,7 +3253,7 @@ check_quotas(cupsd_client_t *con, /* I - Client connection */
{
cupsdLogMessage(CUPSD_LOG_INFO, "User \"%s\" is over the quota limit...",
username);
return (0);
return (-1);
}
}
@@ -7356,6 +7361,9 @@ renew_subscription(
cupsdSaveAllSubscriptions();
con->response->request.status.status_code = IPP_OK;
ippAddInteger(con->response, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER,
"notify-lease-duration", sub->lease);
}
+9 -6
Ver Arquivo
@@ -199,12 +199,11 @@ cupsdCancelJob(cupsd_job_t *job, /* I - Job to cancel */
case IPP_JOB_COMPLETED :
/*
* Clear the printer's state_message and state_reasons and move on...
* Clear the printer's printer-state-message and move on...
*/
printer->state_message[0] = '\0';
cupsdSetPrinterReasons(printer, "");
cupsdSetPrinterState(printer, IPP_PRINTER_IDLE, 0);
cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
@@ -373,11 +372,12 @@ cupsdCheckJobs(void)
pclass = printer;
if (!(pclass->type & CUPS_PRINTER_REMOTE) &&
pclass->state != IPP_PRINTER_STOPPED)
printer = cupsdFindAvailablePrinter(job->dest);
else
if (pclass->state == IPP_PRINTER_STOPPED)
printer = NULL;
else if (pclass->type & CUPS_PRINTER_REMOTE)
break;
else
printer = cupsdFindAvailablePrinter(printer->name);
}
if (!printer && !pclass)
@@ -2839,6 +2839,7 @@ start_job(cupsd_job_t *job, /* I - Job ID */
if ((!strcmp(attr->name, "page-label") ||
!strcmp(attr->name, "page-border") ||
!strncmp(attr->name, "number-up", 9) ||
!strcmp(attr->name, "page-ranges") ||
!strcmp(attr->name, "page-set") ||
!strcasecmp(attr->name, "AP_FIRSTPAGE_InputSlot") ||
!strcasecmp(attr->name, "AP_FIRSTPAGE_ManualFeed")) &&
@@ -3431,6 +3432,8 @@ start_job(cupsd_job_t *job, /* I - Job ID */
cupsdClosePipe(job->status_pipes);
cupsdStatBufDelete(job->status_buffer);
job->status_buffer = NULL;
cupsArrayDelete(filters);
if (printer->remote && job->num_files > 1)
+98 -517
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Scheduler main loop 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
@@ -32,12 +32,7 @@
* cupsdSetStringf() - Set a formatted string value.
* launchd_checkin() - Check-in with launchd and collect the
* listening fds.
* launchd_create_dict() - Create a dictionary representing the launchd
* config file org.cups.cupsd.plist.
* launchd_reload() - Tell launchd to reload the configuration
* file to pick up the new listening directives.
* launchd_sync_conf() - Re-write the launchd config file
* org.cups.cupsd.plist based on cupsd.conf.
* launchd_checkout() - Check-out with launchd.
* parent_handler() - Catch USR1/CHLD signals...
* process_children() - Process all dead children...
* sigchld_handler() - Handle 'child' signals from old processes.
@@ -62,6 +57,17 @@
#ifdef HAVE_LAUNCH_H
# include <launch.h>
# include <libgen.h>
# define CUPS_KEEPALIVE CUPS_CACHEDIR "/org.cups.cupsd"
/* Name of the launchd KeepAlive file */
# ifndef LAUNCH_JOBKEY_KEEPALIVE
# define LAUNCH_JOBKEY_KEEPALIVE "KeepAlive"
# endif /* !LAUNCH_JOBKEY_KEEPALIVE */
# ifndef LAUNCH_JOBKEY_PATHSTATE
# define LAUNCH_JOBKEY_PATHSTATE "PathState"
# endif /* !LAUNCH_JOBKEY_PATHSTATE */
# ifndef LAUNCH_JOBKEY_SERVICEIPC
# define LAUNCH_JOBKEY_SERVICEIPC "ServiceIPC"
# endif /* !LAUNCH_JOBKEY_SERVICEIPC */
#endif /* HAVE_LAUNCH_H */
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
@@ -78,9 +84,7 @@
#ifdef HAVE_LAUNCHD
static void launchd_checkin(void);
static CFDictionaryRef launchd_create_dict(void);
static void launchd_reload(void);
static int launchd_sync_conf(void);
static void launchd_checkout(void);
#endif /* HAVE_LAUNCHD */
static void parent_handler(int sig);
static void process_children(void);
@@ -106,13 +110,6 @@ static int dead_children = 0;
static int stop_scheduler = 0;
/* Should the scheduler stop? */
#ifdef HAVE_LAUNCHD
static CFURLRef launchd_conf_url = NULL;
/* org.cups.cupsd.plist url */
static CFDictionaryRef launchd_conf_dict = NULL;
/* org.cups.cupsd.plist dict */
#endif /* HAVE_LAUNCHD */
/*
* 'main()' - Main entry for the CUPS scheduler.
@@ -351,7 +348,7 @@ main(int argc, /* I - Number of command-line args */
getrlimit(RLIMIT_NOFILE, &limit);
for (i = 0; i < limit.rlim_cur; i ++)
for (i = 0; i < limit.rlim_cur && i < 1024; i ++)
close(i);
#endif /* DEBUG */
}
@@ -415,23 +412,9 @@ main(int argc, /* I - Number of command-line args */
if (Launchd)
{
/*
* If we were started by launchd make sure the cupsd plist file contains the
* same listeners as cupsd.conf; If it didn't then reload it before getting
* the list of listening file descriptors...
* If we were started by launchd get the listen sockets file descriptors...
*/
if (launchd_sync_conf())
{
launchd_reload();
/*
* Until rdar://3854821 is fixed we have to exit after the reload...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG2, "Exiting on launchd_reload");
exit(0);
}
launchd_checkin();
}
#endif /* HAVE_LAUNCHD */
@@ -632,18 +615,9 @@ main(int argc, /* I - Number of command-line args */
#if HAVE_LAUNCHD
if (Launchd)
{
if (launchd_sync_conf())
{
launchd_reload();
/*
* Until rdar://3854821 is fixed we have to exit after the reload...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG2, "Exiting on launchd_reload");
stop_scheduler = 1;
break;
}
/*
* If we were started by launchd get the listen sockets file descriptors...
*/
launchd_checkin();
}
@@ -679,8 +653,10 @@ main(int argc, /* I - Number of command-line args */
*/
if (timeout.tv_sec == 86400 && Launchd && LaunchdTimeout && !NumPolled &&
(!Browsing || !(BrowseLocalProtocols & BROWSE_DNSSD) ||
cupsArrayCount(Printers) == 0))
(!Browsing ||
(!BrowseRemoteProtocols &&
(!NumBrowsers || !BrowseLocalProtocols ||
cupsArrayCount(Printers) == 0))))
{
timeout.tv_sec = LaunchdTimeout;
launchd_idle_exit = 1;
@@ -1111,16 +1087,11 @@ main(int argc, /* I - Number of command-line args */
#ifdef HAVE_LAUNCHD
/*
* Update the launchd config file as needed...
* Update the launchd KeepAlive file as needed...
*/
launchd_sync_conf();
if (launchd_conf_url)
CFRelease(launchd_conf_url);
if (launchd_conf_dict)
CFRelease(launchd_conf_dict);
if (Launchd)
launchd_checkout();
#endif /* HAVE_LAUNCHD */
#ifdef __sgi
@@ -1364,6 +1335,8 @@ launchd_checkin(void)
cupsd_listener_t *lis; /* Listeners array */
http_addr_t addr; /* Address variable */
socklen_t addrlen; /* Length of address */
int fd; /* File descriptor */
char s[256]; /* String addresss */
cupsdLogMessage(CUPSD_LOG_DEBUG, "launchd_checkin: pid=%d", (int)getpid());
@@ -1417,56 +1390,77 @@ launchd_checkin(void)
if (launch_data_get_type(ld_array) == LAUNCH_DATA_ARRAY)
{
/*
* Free the listeners array built from cupsd.conf...
*/
cupsdDeleteAllListeners();
/*
* Create a new array of listeners from the launchd data...
*/
Listeners = cupsArrayNew(NULL, NULL);
count = launch_data_array_get_count(ld_array);
count = launch_data_array_get_count(ld_array);
for (i = 0; i < count; i ++)
{
/*
* Copy the current address and log it...
* Get the launchd file descriptor and address...
*/
if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL)
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"launchd_checkin: Unable to allocate listener - %s.",
strerror(errno));
exit(EXIT_FAILURE);
}
cupsArrayAdd(Listeners, lis);
tmp = launch_data_array_get_index(ld_array, i);
lis->fd = launch_data_get_fd(tmp);
addrlen = sizeof(lis->address);
fd = launch_data_get_fd(tmp);
addrlen = sizeof(addr);
if (getsockname(lis->fd, (struct sockaddr *)&(lis->address), &addrlen))
if (getsockname(fd, (struct sockaddr *)&addr, &addrlen))
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"launchd_checkin: Unable to get local address - %s",
strerror(errno));
continue;
}
/*
* Try to match the launchd socket address to one of the listeners...
*/
for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
lis;
lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
if (httpAddrEqual(&lis->address, &addr))
break;
/*
* Add a new listener If there's no match...
*/
if (lis)
{
cupsdLogMessage(CUPSD_LOG_DEBUG,
"launchd_checkin: Matched existing listener %s with fd %d...",
httpAddrString(&(lis->address), s, sizeof(s)), fd);
}
else
{
cupsdLogMessage(CUPSD_LOG_DEBUG,
"launchd_checkin: Adding new listener %s with fd %d...",
httpAddrString(&addr, s, sizeof(s)), fd);
if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL)
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"launchd_checkin: Unable to allocate listener - %s.",
strerror(errno));
exit(EXIT_FAILURE);
}
cupsArrayAdd(Listeners, lis);
memcpy(&lis->address, &addr, sizeof(lis->address));
}
lis->fd = fd;
# ifdef HAVE_SSL
portnum = 0;
# ifdef AF_INET6
if (addr.addr.sa_family == AF_INET6)
portnum = ntohs(addr.ipv6.sin6_port);
if (lis->address.addr.sa_family == AF_INET6)
portnum = ntohs(lis->address.ipv6.sin6_port);
else
# endif /* AF_INET6 */
if (addr.addr.sa_family == AF_INET)
portnum = ntohs(addr.ipv4.sin_port);
if (lis->address.addr.sa_family == AF_INET)
portnum = ntohs(lis->address.ipv4.sin_port);
if (portnum == 443)
lis->encryption = HTTP_ENCRYPT_ALWAYS;
@@ -1474,458 +1468,45 @@ launchd_checkin(void)
}
}
/*
* Collect the browse socket (if there is one)...
*/
if ((ld_array = launch_data_dict_lookup(ld_sockets, "BrowseSockets")))
{
if (launch_data_get_type(ld_array) == LAUNCH_DATA_ARRAY)
{
if ((tmp = launch_data_array_get_index(ld_array, 0)))
{
if (launch_data_get_type(tmp) == LAUNCH_DATA_FD)
{
if (BrowseSocket != -1)
close(BrowseSocket);
BrowseSocket = launch_data_get_fd(tmp);
}
else
cupsdLogMessage(CUPSD_LOG_WARN,
"launchd_checkin: BrowseSocket not a fd!");
}
else
cupsdLogMessage(CUPSD_LOG_WARN,
"launchd_checkin: BrowseSockets is an empty array!");
}
else
cupsdLogMessage(CUPSD_LOG_WARN,
"launchd_checkin: BrowseSockets is not an array!");
}
else
cupsdLogMessage(CUPSD_LOG_DEBUG, "launchd_checkin: No BrowseSockets");
launch_data_free(ld_msg);
launch_data_free(ld_resp);
}
/*
* 'launchd_create_dict()' - Create a dictionary representing the launchd
* config file org.cups.cupsd.plist.
*/
static CFDictionaryRef /* O - CFDictionary */
launchd_create_dict(void)
{
int portnum; /* Port number */
bool runatload; /* Run at load? */
CFMutableDictionaryRef cupsd_dict, /* org.cups.cupsd.plist dictionary */
sockets, /* Sockets dictionary */
listener; /* Listener dictionary */
CFMutableArrayRef array; /* Array */
CFNumberRef socket_mode; /* Domain socket mode bits */
CFStringRef socket_path; /* Domain socket path */
CFTypeRef value; /* CF values */
cupsd_listener_t *lis; /* Current listening socket */
struct servent *service; /* Services data base entry */
char temp[1024]; /* Temporary buffer for value */
if ((cupsd_dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks)) == NULL)
return NULL;
CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_LABEL),
CFSTR("org.cups.cupsd"));
CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_ONDEMAND),
kCFBooleanTrue);
/*
* Run-at-load if there are active jobs, polling or shared printers
* to advertise...
*/
runatload = (cupsArrayCount(ActiveJobs) || NumPolled ||
(Browsing && BrowseLocalProtocols &&
NumBrowsers && cupsArrayCount(Printers))) ? true : false;
CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_RUNATLOAD),
runatload ? kCFBooleanTrue : kCFBooleanFalse);
# ifdef LAUNCH_JOBKEY_SERVICEIPC
CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_SERVICEIPC),
kCFBooleanTrue);
# endif /* LAUNCH_JOBKEY_SERVICEIPC */
if ((array = CFArrayCreateMutable(kCFAllocatorDefault, 2,
&kCFTypeArrayCallBacks)) != NULL)
{
CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_PROGRAMARGUMENTS),
array);
CFArrayAppendValue(array, CFSTR("/usr/sbin/cupsd"));
CFArrayAppendValue(array, CFSTR("-l"));
CFRelease(array);
}
/*
* Add a sockets dictionary...
*/
if ((sockets = (CFMutableDictionaryRef)CFDictionaryCreateMutable(
kCFAllocatorDefault, 0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks)) != NULL)
{
CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_SOCKETS), sockets);
/*
* Add a Listeners array to the sockets dictionary...
*/
if ((array = CFArrayCreateMutable(kCFAllocatorDefault, 0,
&kCFTypeArrayCallBacks)) != NULL)
{
CFDictionaryAddValue(sockets, CFSTR("Listeners"), array);
/*
* For each listener add a dictionary to the listeners array...
*/
for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
lis;
lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
{
if ((listener = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks)) != NULL)
{
CFArrayAppendValue(array, listener);
# ifdef AF_LOCAL
if (lis->address.addr.sa_family == AF_LOCAL)
{
if ((socket_path = CFStringCreateWithCString(kCFAllocatorDefault,
lis->address.un.sun_path,
kCFStringEncodingUTF8)))
{
CFDictionaryAddValue(listener,
CFSTR(LAUNCH_JOBSOCKETKEY_PATHNAME),
socket_path);
CFRelease(socket_path);
}
portnum = 0140777; /* (S_IFSOCK|S_IRWXU|S_IRWXG|S_IRWXO) or *
* 49663d decimal */
if ((socket_mode = CFNumberCreate(kCFAllocatorDefault,
kCFNumberIntType, &portnum)))
{
CFDictionaryAddValue(listener, CFSTR("SockPathMode"),
socket_mode);
CFRelease(socket_mode);
}
}
else
# endif /* AF_LOCAL */
{
# ifdef AF_INET6
if (lis->address.addr.sa_family == AF_INET6)
{
CFDictionaryAddValue(listener,
CFSTR(LAUNCH_JOBSOCKETKEY_FAMILY),
CFSTR("IPv6"));
portnum = lis->address.ipv6.sin6_port;
}
else
# endif /* AF_INET6 */
{
CFDictionaryAddValue(listener,
CFSTR(LAUNCH_JOBSOCKETKEY_FAMILY),
CFSTR("IPv4"));
portnum = lis->address.ipv4.sin_port;
}
if ((service = getservbyport(portnum, NULL)))
value = CFStringCreateWithCString(kCFAllocatorDefault,
service->s_name,
kCFStringEncodingUTF8);
else
value = CFNumberCreate(kCFAllocatorDefault,
kCFNumberIntType, &portnum);
if (value)
{
CFDictionaryAddValue(listener,
CFSTR(LAUNCH_JOBSOCKETKEY_SERVICENAME),
value);
CFRelease(value);
}
httpAddrString(&lis->address, temp, sizeof(temp));
if ((value = CFStringCreateWithCString(kCFAllocatorDefault, temp,
kCFStringEncodingUTF8)))
{
CFDictionaryAddValue(listener,
CFSTR(LAUNCH_JOBSOCKETKEY_NODENAME),
value);
CFRelease(value);
}
}
CFRelease(listener);
}
}
CFRelease(array);
}
/*
* Add the BrowseSocket to the sockets dictionary...
*/
if (Browsing && (BrowseRemoteProtocols & BROWSE_CUPS))
{
if ((array = CFArrayCreateMutable(kCFAllocatorDefault, 0,
&kCFTypeArrayCallBacks)) != NULL)
{
CFDictionaryAddValue(sockets, CFSTR("BrowseSockets"), array);
if ((listener = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks)) != NULL)
{
CFArrayAppendValue(array, listener);
CFDictionaryAddValue(listener, CFSTR(LAUNCH_JOBSOCKETKEY_FAMILY),
CFSTR("IPv4"));
CFDictionaryAddValue(listener, CFSTR(LAUNCH_JOBSOCKETKEY_TYPE),
CFSTR("dgram"));
if ((service = getservbyport(BrowsePort, NULL)))
value = CFStringCreateWithCString(kCFAllocatorDefault,
service->s_name,
kCFStringEncodingUTF8);
else
value = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType,
&BrowsePort);
CFDictionaryAddValue(listener,
CFSTR(LAUNCH_JOBSOCKETKEY_SERVICENAME), value);
CFRelease(value);
CFRelease(listener);
}
CFRelease(array);
}
}
CFRelease(sockets);
}
return (cupsd_dict);
}
/*
* 'launchd_reload()' - Tell launchd to reload the configuration file to pick
* up the new listening directives.
* 'launchd_checkout()' - Update the launchd KeepAlive file as needed.
*/
static void
launchd_reload(void)
launchd_checkout(void)
{
int child_status; /* Exit status of child process */
pid_t child_pid, /* Child PID */
waitpid_status; /* Child process exit status */
char *argv[4]; /* Argument strings */
int fd; /* File descriptor */
/*
* The current launchd doesn't support a reload option (rdar://3854821).
* Until this is fixed we need to reload the config file by execing launchctl
* twice (to unload then load). NOTE: This will cause us to exit on SIGTERM
* which will cancel all client & job activity.
*
* After this is fixed we'll be able to tell launchd to reload the file
* and pick up the new listening descriptors without disrupting current
* activity.
* Create or remove the launchd KeepAlive file based on whether
* there are active jobs, polling, browsing for remote printers or
* shared printers to advertise...
*/
/*
* Unloading the current configuration will cause launchd to send us a SIGTERM;
* block it for now so we can get our work done...
*/
if ((cupsArrayCount(ActiveJobs) || NumPolled ||
(Browsing &&
(BrowseRemoteProtocols ||
(BrowseLocalProtocols && NumBrowsers && cupsArrayCount(Printers))))))
{
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Creating launchd keepalive file \"" CUPS_KEEPALIVE "\"...");
cupsdHoldSignals();
/*
* Set up the unload arguments to launchctl...
*/
argv[0] = "/bin/launchctl";
argv[1] = "unload";
argv[2] = LaunchdConf;
argv[3] = NULL;
if (cupsdStartProcess(argv[0], argv, NULL, -1, -1, -1, -1, 1, &child_pid) < 0)
cupsdLogMessage(CUPSD_LOG_ERROR,
"launchd_reload: Unable to execute %s - %s", argv[0],
strerror(errno));
if ((fd = open(CUPS_KEEPALIVE, O_RDONLY | O_CREAT | O_EXCL, S_IRUSR)) >= 0)
close(fd);
}
else
{
do
{
waitpid_status = waitpid(child_pid, &child_status, 0);
}
while (waitpid_status == (pid_t)-1 && errno == EINTR);
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Removing launchd keepalive file \"" CUPS_KEEPALIVE "\"...");
if (WIFSIGNALED(child_status))
cupsdLogMessage(CUPSD_LOG_DEBUG,
"launchd_reload: %s pid %d crashed on signal %d!",
basename(argv[0]), child_pid, WTERMSIG(child_status));
else
cupsdLogMessage(CUPSD_LOG_DEBUG,
"launchd_reload: %s pid %d stopped with status %d!",
basename(argv[0]), child_pid, WEXITSTATUS(child_status));
/*
* Do it again with the load command...
*/
argv[1] = "load";
if (cupsdStartProcess(argv[0], argv, NULL, -1, -1, -1, -1, 1,
&child_pid) < 0)
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"launchd_reload: Unable to fork for %s - %s", argv[0],
strerror(errno));
}
else
{
do
{
waitpid_status = waitpid(child_pid, &child_status, 0);
} while (waitpid_status == (pid_t)-1 && errno == EINTR);
if (WIFSIGNALED(child_status))
cupsdLogMessage(CUPSD_LOG_DEBUG,
"launchd_reload: %s pid %d crashed on signal %d!",
basename(argv[0]), child_pid, WTERMSIG(child_status));
else
cupsdLogMessage(CUPSD_LOG_DEBUG,
"launchd_reload: %s pid %d stopped with status %d",
basename(argv[0]), child_pid,
WEXITSTATUS(child_status));
}
unlink(CUPS_KEEPALIVE);
}
/*
* Leave signals blocked since exit() will be called momentarily anyways...
*/
}
/*
* 'launchd_sync_conf()' - Rewrite the launchd config file
* org.cups.cupsd.plist based on cupsd.conf.
*/
static int /* O - 1 if the file was updated */
launchd_sync_conf(void)
{
SInt32 errorCode; /* Error code */
CFDataRef resourceData; /* XML property list */
CFDictionaryRef cupsd_dict; /* New org.cups.cupsd.plist dict */
/*
* If needed reconstitute the existing org.cups.cupsd.plist...
*/
if (!launchd_conf_url &&
!(launchd_conf_url = CFURLCreateFromFileSystemRepresentation(
kCFAllocatorDefault,
(const unsigned char *)LaunchdConf,
strlen(LaunchdConf), false)))
{
cupsdLogMessage(CUPSD_LOG_ERROR, "launchd_sync_conf: "
"Unable to create file URL for \"%s\"\n", LaunchdConf);
return (0);
}
if (!launchd_conf_dict)
{
if (CFURLCreateDataAndPropertiesFromResource(NULL, launchd_conf_url,
&resourceData, NULL, NULL, &errorCode))
{
launchd_conf_dict = CFPropertyListCreateFromXMLData(NULL, resourceData,
kCFPropertyListImmutable, NULL);
CFRelease(resourceData);
}
if (!launchd_conf_dict)
{
cupsdLogMessage(CUPSD_LOG_ERROR, "launchd_sync_conf: "
"Unable to create dictionary for \"%s\"\n", LaunchdConf);
}
}
/*
* Create a new org.cups.cupsd.plist dictionary...
*/
if ((cupsd_dict = launchd_create_dict()) == NULL)
{
cupsdLogMessage(CUPSD_LOG_ERROR, "launchd_sync_conf: "
"Unable to create file URL for \"%s\"\n", LaunchdConf);
return (0);
}
/*
* If the dictionaries are different write a new org.cups.cupsd.plist...
*/
if (!CFEqual(cupsd_dict, launchd_conf_dict))
{
if ((resourceData = CFPropertyListCreateXMLData(kCFAllocatorDefault,
cupsd_dict)))
{
if (CFURLWriteDataAndPropertiesToResource(launchd_conf_url, resourceData,
NULL, &errorCode))
{
/*
* The new cupsd dictionary becomes the on-disk launchd dictionary...
*/
if (launchd_conf_dict)
CFRelease(launchd_conf_dict);
launchd_conf_dict = cupsd_dict;
}
else
{
cupsdLogMessage(CUPSD_LOG_WARN,
"launchd_sync_conf: "
"CFURLWriteDataAndPropertiesToResource(\"%s\") "
"failed: %d\n",
LaunchdConf, (int)errorCode);
CFRelease(cupsd_dict);
}
CFRelease(resourceData);
}
/*
* Let the caller know we updated the file...
*/
return (1);
}
return (0);
}
#endif /* HAVE_LAUNCHD */
+21 -8
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Printer 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
@@ -265,7 +265,7 @@ cupsdCreateCommonData(void)
*notifier; /* Current notifier */
static const int nups[] = /* number-up-supported values */
{ 1, 2, 4, 6, 9, 16 };
static const ipp_orient_t orients[4] =/* orientation-requested-supported values */
static const int orients[4] =/* orientation-requested-supported values */
{
IPP_PORTRAIT,
IPP_LANDSCAPE,
@@ -288,7 +288,7 @@ cupsdCreateCommonData(void)
"1.0",
"1.1"
};
static const ipp_op_t ops[] = /* operations-supported values */
static const int ops[] = /* operations-supported values */
{
IPP_PRINT_JOB,
IPP_VALIDATE_JOB,
@@ -556,11 +556,11 @@ cupsdCreateCommonData(void)
/* operations-supported */
ippAddIntegers(CommonData, IPP_TAG_PRINTER, IPP_TAG_ENUM,
"operations-supported",
sizeof(ops) / sizeof(ops[0]) + JobFiles - 1, (int *)ops);
sizeof(ops) / sizeof(ops[0]) + JobFiles - 1, ops);
/* orientation-requested-supported */
ippAddIntegers(CommonData, IPP_TAG_PRINTER, IPP_TAG_ENUM,
"orientation-requested-supported", 4, (int *)orients);
"orientation-requested-supported", 4, orients);
/* page-ranges-supported */
ippAddBoolean(CommonData, IPP_TAG_PRINTER, "page-ranges-supported", 1);
@@ -1187,7 +1187,20 @@ cupsdLoadAllPrinters(void)
else if (!strcasecmp(line, "OpPolicy"))
{
if (value)
cupsdSetString(&p->op_policy, value);
{
cupsd_policy_t *pol; /* Policy */
if ((pol = cupsdFindPolicy(value)) != NULL)
{
cupsdSetString(&p->op_policy, value);
p->op_policy_ptr = pol;
}
else
cupsdLogMessage(CUPSD_LOG_ERROR,
"Bad policy \"%s\" on line %d of printers.conf",
value, linenum);
}
else
{
cupsdLogMessage(CUPSD_LOG_ERROR,
@@ -1484,7 +1497,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
ipp_attribute_t *attr; /* Attribute data */
ipp_value_t *val; /* Attribute value */
int num_finishings; /* Number of finishings */
ipp_finish_t finishings[5]; /* finishings-supported values */
int finishings[5]; /* finishings-supported values */
cups_option_t *option; /* Current printer option */
static const char * const sides[3] = /* sides-supported values */
{
@@ -2081,7 +2094,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
}
ippAddIntegers(p->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM,
"finishings-supported", num_finishings, (int *)finishings);
"finishings-supported", num_finishings, finishings);
ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM,
"finishings-default", IPP_FINISHINGS_NONE);
}
+6 -6
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Subscription routines for the Common UNIX Printing System (CUPS) scheduler.
*
* 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
@@ -52,8 +52,8 @@
# 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)
# 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 */
@@ -1362,11 +1362,11 @@ cupsd_send_dbus(cupsd_eventmask_t event,/* I - Event to send */
dbus_message_append_iter_init(message, &iter);
if (dest)
dbus_message_iter_append_string(&iter, &(dest->name));
dbus_message_iter_append_string(&iter, dest->name);
if (job)
{
dbus_message_iter_append_uint32(&iter, &(job->id));
dbus_message_iter_append_string(&iter, &(job->username));
dbus_message_iter_append_uint32(&iter, job->id);
dbus_message_iter_append_string(&iter, job->username);
}
dbus_connection_send(con, message, NULL);
+42 -5
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Printing utilities 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
@@ -23,6 +23,15 @@
*
* Contents:
*
* cups_convert_options() - Convert a PHP options array to a CUPS options array.
* zm_startup_phpcups() - Initialize the CUPS module.
* zif_cups_cancel_job() - Cancel a job.
* zif_cups_get_dests() - Get a list of printers and classes.
* zif_cups_get_jobs() - Get a list of jobs.
* zif_cups_last_error() - Return the last IPP status code.
* zif_cups_last_error_string() - Return the last IPP status
* zif_cups_print_file() - Print a single file.
* zif_cups_print_files() - Print multiple files.
*/
/*
@@ -87,15 +96,43 @@ cups_convert_options(
int num_options; /* Number of options */
HashTable *ht; /* Option array hash table */
Bucket *current; /* Current element in array */
zval *value; /* Current value in array */
char temp[255]; /* String value for numbers */
ht = Z_ARRVAL_P(optionsobj);
num_options = 0;
for (current = ht->pListHead; current; current = current->pListNext)
num_options = cupsAddOption(current->arKey,
Z_STRVAL_P(((zval *)current->pDataPtr)),
num_options, options);
{
value = (zval *)current->pDataPtr;
switch (Z_TYPE_P(value))
{
case IS_LONG :
sprintf(temp, "%ld", Z_LVAL_P(value));
num_options = cupsAddOption(current->arKey, temp, num_options,
options);
break;
case IS_DOUBLE :
sprintf(temp, "%g", Z_DVAL_P(value));
num_options = cupsAddOption(current->arKey, temp, num_options,
options);
break;
case IS_BOOL :
num_options = cupsAddOption(current->arKey,
Z_BVAL_P(value) ? "true" : "false",
num_options, options);
break;
case IS_STRING :
num_options = cupsAddOption(current->arKey, Z_STRVAL_P(value),
num_options, options);
break;
}
}
return (num_options);
}
@@ -204,7 +241,7 @@ PHP_FUNCTION(cups_cancel_job)
/*
* 'zif_cups_get_dests()' - .
* 'zif_cups_get_dests()' - Get a list of printers and classes.
*/
PHP_FUNCTION(cups_get_dests)
+3
Ver Arquivo
@@ -263,6 +263,9 @@ export_dest(http_t *http, /* I - Connection to server */
status = cupsAdminExportSamba(dest, ppdfile, SAMBAServer,
SAMBAUser, SAMBAPassword,
Verbosity ? stderr : NULL);
if (!status && cupsLastError() == IPP_NOT_FOUND)
break;
}
unlink(ppdfile);

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