Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet c8bbf4a9b9 Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.3.10@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
444 arquivos alterados com 27087 adições e 69276 exclusões
+254 -1
Ver Arquivo
@@ -1,6 +1,259 @@
CHANGES.txt - 2008-04-01
CHANGES.txt - 2009-04-16
------------------------
CHANGES IN CUPS V1.3.10
- Documentation fixes (STR #2994, STR #2995, STR #3008, STR #3056,
STR #3057)
- SECURITY: The scheduler now protects against DNS rebinding attacks
(STR #3118)
- SECURITY: Fixed TIFF integer overflow in image filters (STR #3031)
- The scheduler did not support the job-hold-until attribute with the
Restart-Job operation (STR #3130)
- SECURITY: The PNG image reading code did not validate the
image size properly, leading to a potential buffer overflow
(STR #2974)
- The rastertohp driver did not set the 1-sided printing mode when
needed (STR #3131)
- Now use a wrapper program instead of our fork of the Xpdf code to
support printing of PDF files. The new wrapper supports using Xpdf,
poppler, or Ghostscript to convert PDF files to PostScript (STR #3129)
- Long job names caused problems with some PJL printers (STR #3125)
- The lpq command did not work when showing all destinations (STR #3117)
- The scheduler used a codeset name of UTF8 which is not supported on
Solaris (STR #3113)
- cupsGetJobs() did not work with a NULL destination (STR #3107)
- Fixed a localization problem for option choices (incorrectly) named
"Custom" (STR #3106)
- The fallback OpenSSL random number seeding would not work (STR #3079)
- The scheduler might miss a child signal, causing high CPU usage.
- The scheduler did not enforce quotas after the job history was
unloaded (STR #3078)
- The job-k-limit, job-page-limit, and job-quota-period attributes
could not be set using the lpadmin command (STR #3077)
- httpSeparateURI() did not error out on URIs with a missing port
number after a colon.
- Fixed a Valgrind-detected initialization error when creating a
missing directory on startup.
- The scheduler did not always read all of the HTTP headers from a
CGI script/program.
- The scheduler did not always set the "air" property in Bonjour/DNS-SD
registrations.
- The scheduler incorrectly compared Mac OS X UUIDs for access
control, preventing access in certain configurations.
- The IPP backend incorrectly reset the required authentication
to Kerberos when authentication failed.
- The scheduler no longer looks up the local hostname by default;
turn on hostname lookups to restore the previous behavior.
- The scheduler did not always load MIME type rules correctly
(STR #3059)
- The test page did not format correctly on A4 paper (STR #3060)
- The web interface sometimes incorrectly redirected users to
127.0.0.1 (STR #3022)
- cupsPrintFile*() did not send the document filename for single
file submissions (STR #3055)
- The scheduler did not update the member-names attribute when
removing the last printer from a class.
- The scheduler did not report PPD Products with parenthesis
in them properly (STR #3046)
- The wrong italic fonts were listed in the UTF-8 charset file
for the text filter.
- The backends did not return an OK status for the
CUPS_SC_CMD_GET_BIDI side-channel command (STR #3029)
- The scheduler did not purge jobs that were missing a
time-at-creation attribute, indicating a bad job control file
(STR #3030)
- The "-o job-hold-until=week-end" option did not work properly
(STR #3025)
- The Solaris USB printer device does not support select or poll
(STR #3028)
- The scheduler would crash if you exceeded the MaxSubscriptions
limit.
- The lp "-H immediate" option did not specify that the job
should not be held (STR #3013)
- The scheduler did not support the "Connection: close"
HTTP header (STR #3010)
- The mailto notifier didn't terminate messages properly
(STR #3011)
- Backends could spin trying to read back-channel data
(STR #3001)
- The HP-GL/2 filter was using the wrong default colors
(STR #2966)
- The scheduler incorrectly allowed Get-Jobs operations without a
printer-uri (STR #2996)
- The compression option was not being encoded properly
(STR #2997)
- Added a missing character map for JIS-X0213/ShiftJIS.
- The scheduler now rejects ATTR: messages with empty values.
- The scheduler could consume all CPU handling closed connections
(STR #2988)
- Fixed some configure script bugs with rc/xinetd directories
(STR #2970)
- The Epson sample driver PPDs contained errors (STR #2979)
CHANGES IN CUPS V1.3.9
- SECURITY: The HP-GL/2 filter did not range check pen numbers
(STR #2911)
- SECURITY: The SGI image file reader did not range check
16-bit run lengths (STR #2918)
- SECURITY: The text filter did not range check cpi, lpi, or
column values (STR #2919)
- Documentation updates (STR #2904, STR #2944)
- The French web admin page was never updated (STR #2963)
- The IPP backend did not retry print jobs when the printer
reported itself as busy or unavailable (STR #2951)
- The "Set Allowed Users" web interface did not handle trailing
whitespace correctly (STR #2956)
- The PostScript filter did not work with Adobe applications
using custom page sizes (STR #2968)
- The Mac OS X USB backend did not work with some printers
that reported a bad 1284 device ID.
- The scheduler incorrectly resolved the client connection
address when HostNameLookups was set to Off (STR #2946)
- The IPP backend incorrectly stopped the local queue if
the remote server reported the "paused" state.
- The cupsGetDests() function did not catch all types of
request errors.
- The scheduler did not always log "job queued" messages
(STR #2943)
- The scheduler did not support destination filtering using
the printer-location attribute properly (STR #2945)
- The scheduler did not send the server-started,
server-restarted, or server-stopped events (STR #2927)
- The scheduler no longer enforces configuration file
permissions on symlinked files (STR #2937)
- CUPS now reinitializes the DNS resolver on failures
(STR #2920)
- The CUPS desktop menu item was broken (STR #2924)
- The PPD parser was too strict about missing keyword
values in "relaxed" mode.
- The PostScript filter incorrectly mirrored landscape
documents.
- The scheduler did not correctly update the
auth-info-required value(s) if the AuthType was Default.
- The scheduler required Kerberos authentication for
all operations on remote Kerberized printers instead
of just for the operations that needed it.
- The socket backend could wait indefinitely for back-
channel data with some devices.
- PJL panel messages were not reset correctly on older
printers (STR #2909)
- cupsfilter used the wrong default path (STR #2908)
- Fixed address matching for "BrowseAddress @IF(name)"
(STR #2910)
- Fixed compiles on AIX.
- Firefox 3 did not work with the CUPS web interface in SSL
mode (STR #2892)
- Custom options with multiple parameters were not emitted
correctly.
- Refined the cupstestppd utility.
- ppdEmit*() did not support custom JCL options (STR #2889)
- The cupstestppd utility incorrectly reported missing
"en" base translations (STR #2887)
CHANGES IN CUPS V1.3.8
- Documentation updates (STR #2785, STR #2861, STR #2862)
- The scheduler did not add the ending job sheet when the
job was released.
- The IPP backend did not relay marker-* attributes.
- The CUPS GNOME/KDE menu item was not localized for
Chinese (STR #2880)
- The CUPS GNOME/KDE menu item was not localized for
Japanese (STR #2876)
- The cupstestppd utility reported mixed line endings for
Mac OS and Windows PPD files (STR #2874)
- The pdftops filter did not print landscape orientation PDF
pages correctly on all printers (STR #2850)
- The scheduler did not handle expiring of implicit classes
or their members properly, leading to a configuration where
one of the members would have a short name (STR #2766)
- The scheduler and cupstestppd utilities did not support
cupsFilter and cupsPreFilter programs with spaces in their
names (STR #2866)
- Removed unused variables and assignments found by the
LLVM "clang" tool.
- Added NULL checks recommended by the LLVM "clang" tool.
- The scheduler would crash if you started a printer that
pointed to a backend that did not exist (STR #2865)
- The ppdLocalize functions incorrectly mapped all generic
locales to country-specific locales.
- The cups-driverd program did not support Simplified Chinese
or Traditional Chinese language version strings (STR #2851)
- Added an Indonesian translation (STR #2792)
- Fixed a timing issue in the backends that could cause data
corruption with the CUPS_SC_CMD_DRAIN_OUTPUT side-channel
command (STR #2858)
- The scheduler did not support "HostNameLookups" with all of
the boolean names (STR #2861)
- Fixed a compile problem with glibc 2.8 (STR #2860)
- The PostScript filter did not support %%IncludeFeature lines
in the page setup section of each page (STR #2831)
- The scheduler did not generate printer-state events when the
default printer was changed (STR #2764)
- cupstestppd incorrectly reported a warning about the PPD format
version in some locales (STR #2854)
- cupsGetPPD() and friends incorrectly returned a PPD file for
a class with no printers.
- The member-uris values for local printers in a class returned
by the scheduler did not reflect the connected hostname or
port.
- The CUPS PHP extension was not thread-safe (STR #2828)
- The scheduler incorrectly added the document-format-default
attribute to the list of "common" printer attributes, which
over time would slow down the printing system (STR #2755,
STR #2836)
- The cups-deviced and cups-driverd helper programs did not set
the CFProcessPath environment variable on Mac OS X (STR #2837)
- "lpstat -p" could report the wrong job as printing (STR #2845)
- The scheduler would crash when some cupsd.conf directives
were missing values (STR #2849)
- The web interface "move jobs" operation redirected users to
the wrong URL (STR #2815)
- The Polish web interface translation contained errors
(STR #2815)
- The scheduler did not report PostScript printer PPDs with
filters as PostScript devices.
- The scheduler did not set the job document-format attribute
for jobs submitted using Create-Job and Send-Document.
- cupsFileTell() did not work for log files opened in append
mode (STR #2810)
- The scheduler did not set QUERY_STRING all of the time
for CGI scripts (STR #2781, STR #2816)
- The scheduler now returns an error for bad job-sheets
values (STR #2775)
- Authenticated remote printing did not work over domain
sockets (STR #2750)
- The scheduler incorrectly logged errors for print filters
when a job was canceled (STR #2806, #2808)
- The scheduler no longer allows multiple RSS subscriptions
with the same URI (STR #2789)
- The scheduler now supports Kerberized printing with
multiple server names (STR #2783)
- "Satisfy any" did not work in IPP policies (STR #2782)
- The CUPS imaging library would crash with very large
images - more than 16Mx16M pixels (STR #2805)
- The PNG image loading code would crash with large images
(STR #2790)
- The scheduler did not limit the total number of filters.
- The scheduler now ensures that the RSS directory has
the correct permissions.
- The RSS notifier did not quote the feed URL in the RSS
file it created (STR #2801)
- The web interface allowed the creation and cancellation
of RSS subscriptions without a username (STR #2774)
- Increased the default MaxCopies value on Mac OS X to
9999 to match the limit imposed by the print dialog.
- The scheduler did not reject requests with an empty
Content-Length field (STR #2787)
- The scheduler did not log the current date and time and
did not escape special characters in request URIs when
logging bad requests to the access_log file (STR #2788)
CHANGES IN CUPS V1.3.7
- CVE-2008-0047: cgiCompileSearch buffer overflow (STR #2729)
+2 -1
Ver Arquivo
@@ -1,4 +1,4 @@
CREDITS.txt - 2007-09-10
CREDITS.txt - 2008-06-16
------------------------
Few projects are completed by one person, and CUPS is no exception. We'd
@@ -30,6 +30,7 @@ like to thank the following individuals for their contributions:
Daniel Nylander - Swedish localization.
Giulio Orsero - Bug fixes and testing.
Michal Osowiecki - Polish localization.
Citra Paska - Indonesian localization.
Kurt Pfeifle - Bug fixes, beta testing, evangelism.
Vincenzo Reale - Italian localization.
Petter Reinholdtsen - HP-UX compiler stuff.
+2 -2
Ver Arquivo
@@ -1,4 +1,4 @@
INSTALL - CUPS v1.3.7 - 2008-04-01
INSTALL - CUPS v1.3.9 - 2008-10-09
----------------------------------
This file describes how to compile and install CUPS from source
@@ -32,7 +32,7 @@ BEFORE YOU BEGIN
many of the features provided by CUPS.
Kerberos support requires MIT Kerberos 1.6.3 or later or
or Heimdal Kerberos, along with the corresponding GSSAPI
Heimdal Kerberos, along with the corresponding GSSAPI
pieces.
Also, please note that CUPS no longer includes the
+18 -13
Ver Arquivo
@@ -1,6 +1,6 @@
Common UNIX Printing System License Agreement
CUPS License Agreement
Copyright 2007 by Apple Inc.
Copyright 2007-2009 by Apple Inc.
1 Infinite Loop
Cupertino, CA 95014 USA
@@ -9,11 +9,10 @@
INTRODUCTION
The Common UNIX Printing System(tm), ("CUPS(tm)"), is provided
under the GNU General Public License ("GPL") and GNU Library
General Public License ("LGPL"), Version 2, with exceptions for
Apple operating systems and the OpenSSL toolkit. A copy of the
exceptions and licenses follow this introduction.
CUPS(tm) is provided under the GNU General Public License ("GPL")
and GNU Library General Public License ("LGPL"), Version 2, with
exceptions for Apple operating systems and the OpenSSL toolkit. A
copy of the exceptions and licenses follow this introduction.
The GNU LGPL applies to the CUPS and CUPS Imaging libraries
located in the "cups" and "filter" subdirectories of the CUPS
@@ -137,12 +136,18 @@ redistribute it freely, subject to the following restrictions:
TRADEMARKS
Apple Inc. has trademarked the Common UNIX Printing System, CUPS,
and CUPS logo. You may use these names and logos in any direct port
or binary distribution of CUPS. Please contact Apple Inc. for written
permission to use them in derivative products. Our intention is to
protect the value of these trademarks and ensure that any derivative
product meets the same high-quality standards as the original.
CUPS and the CUPS logo (the "CUPS Marks") are trademarks of Apple
Inc. Apple grants you a non-exclusive and non-transferable right
to use the CUPS Marks in any direct port or binary distribution
incorporating CUPS software and in any promotional material
therefor. You agree that your products will meet the highest
levels of quality and integrity for similar goods, not be unlawful,
and be developed, manufactured, and distributed in compliance with
this license. You will not interfere with Apple's rights in the
CUPS Marks, and all use of the CUPS Marks shall inure to the
benefit of Apple. This license does not apply to use of the CUPS
Marks in a derivative products, which requires prior written
permission from Apple Inc.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
+13 -2
Ver Arquivo
@@ -3,7 +3,7 @@
#
# Top-level Makefile for the Common UNIX Printing System (CUPS).
#
# Copyright 2007 by Apple Inc.
# Copyright 2007-2009 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -20,7 +20,7 @@ include Makedefs
#
DIRS = cups backend berkeley cgi-bin filter locale man monitor \
notifier $(PDFTOPS) scheduler systemv test \
notifier scheduler systemv test \
$(PHPDIR) \
conf data doc $(FONTS) ppd templates
@@ -84,6 +84,17 @@ depend:
done
#
# Run the clang.llvm.org static code analysis tool on the C sources.
#
.PHONY: clang
clang:
$(RM) -r clang
scan-build -k -o `pwd`/clang $(MAKE) $(MFLAGS) \
CC=ccc-analyzer CXX=ccc-analyzer clean all
#
# Generate a ctags file...
#
+3 -4
Ver Arquivo
@@ -1,4 +1,4 @@
README - CUPS v1.3.7 - 2008-04-01
README - CUPS v1.3.9 - 2008-10-09
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
@@ -153,9 +153,8 @@ PRINTING FILES
LEGAL STUFF
CUPS is Copyright 2007-2008 Apple Inc. All Rights Reserved.
CUPS, the CUPS logo, and the Common UNIX Printing System are
trademarks of Apple Inc.
CUPS is Copyright 2007-2009 by Apple Inc. CUPS and the CUPS
logo are trademarks of Apple Inc.
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
+43 -49
Ver Arquivo
@@ -1,50 +1,44 @@
# DO NOT DELETE THIS LINE -- make depend depends on it.
betest.o: betest.c ../cups/string.h ../config.h
ipp.o: ipp.c ../cups/http-private.h ../config.h ../cups/http.h \
../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/backend.h \
../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/language.h ../cups/i18n.h \
../cups/transcode.h ../cups/string.h
lpd.o: lpd.c ../cups/backend.h ../cups/http-private.h ../config.h \
../cups/http.h ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h \
../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/i18n.h ../cups/transcode.h ../cups/string.h
pap.o: pap.c ../config.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h \
../cups/backend.h ../cups/sidechannel.h ../cups/i18n.h \
../cups/transcode.h
parallel.o: parallel.c backend-private.h ../cups/backend.h \
../cups/sidechannel.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h \
../cups/debug.h ../cups/i18n.h ../cups/transcode.h ../cups/string.h \
../config.h
scsi.o: scsi.c ../cups/backend.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/i18n.h ../cups/transcode.h ../cups/string.h \
../config.h scsi-linux.c
serial.o: serial.c backend-private.h ../cups/backend.h \
../cups/sidechannel.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h \
../cups/debug.h ../cups/i18n.h ../cups/transcode.h ../cups/string.h \
../config.h
snmp.o: snmp.c ../cups/http-private.h ../config.h ../cups/http.h \
../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h backend-private.h \
../cups/backend.h ../cups/sidechannel.h ../cups/cups.h ../cups/ppd.h \
../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../cups/array.h \
../cups/file.h
socket.o: socket.c ../cups/http-private.h ../config.h ../cups/http.h \
../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h backend-private.h \
../cups/backend.h ../cups/sidechannel.h ../cups/cups.h ../cups/ppd.h \
../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h
test1284.o: test1284.c ../cups/string.h ../config.h ieee1284.c \
backend-private.h ../cups/backend.h ../cups/sidechannel.h \
../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h \
../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h
usb.o: usb.c ../cups/backend.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/string.h ../config.h ../cups/i18n.h \
../cups/transcode.h usb-unix.c ieee1284.c backend-private.h \
../cups/sidechannel.h ../cups/debug.h
betest.o: ../cups/string.h ../config.h
ipp.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
ipp.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/backend.h ../cups/cups.h
ipp.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
ipp.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h ../cups/string.h
lpd.o: ../cups/backend.h ../cups/http-private.h ../config.h ../cups/http.h
lpd.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h
lpd.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
lpd.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h
pap.o: ../config.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
pap.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/backend.h
pap.o: ../cups/sidechannel.h ../cups/i18n.h ../cups/transcode.h
parallel.o: backend-private.h ../cups/backend.h ../cups/sidechannel.h
parallel.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
parallel.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h
parallel.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
scsi.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
scsi.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
scsi.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
serial.o: backend-private.h ../cups/backend.h ../cups/sidechannel.h
serial.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
serial.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h
serial.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
snmp.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
snmp.o: ../cups/ipp-private.h ../cups/ipp.h backend-private.h
snmp.o: ../cups/backend.h ../cups/sidechannel.h ../cups/cups.h ../cups/ppd.h
snmp.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h
snmp.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../cups/array.h
snmp.o: ../cups/file.h
socket.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
socket.o: ../cups/ipp-private.h ../cups/ipp.h backend-private.h
socket.o: ../cups/backend.h ../cups/sidechannel.h ../cups/cups.h
socket.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
socket.o: ../cups/debug.h ../cups/i18n.h ../cups/transcode.h ../cups/string.h
test1284.o: ../cups/string.h ../config.h ieee1284.c backend-private.h
test1284.o: ../cups/backend.h ../cups/sidechannel.h ../cups/cups.h
test1284.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
test1284.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/i18n.h
test1284.o: ../cups/transcode.h
usb.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
usb.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
usb.o: ../cups/string.h ../config.h ../cups/i18n.h ../cups/transcode.h
+115 -13
Ver Arquivo
@@ -22,6 +22,7 @@
* compress_files() - Compress print files...
* password_cb() - Disable the password prompt for
* cupsDoFileRequest().
* report_attr() - Report an IPP attribute value.
* report_printer_state() - Report the printer state.
* run_pictwps_filter() - Convert PICT files to PostScript when printing
* remotely.
@@ -72,6 +73,7 @@ static void check_printer_state(http_t *http, const char *uri,
static void compress_files(int num_files, char **files);
#endif /* HAVE_LIBZ */
static const char *password_cb(const char *);
static void report_attr(ipp_attribute_t *attr);
static int report_printer_state(ipp_t *ipp, int job_id);
#ifdef __APPLE__
@@ -142,6 +144,11 @@ main(int argc, /* I - Number of command-line args */
{ /* Printer attributes we want */
"copies-supported",
"document-format-supported",
"marker-colors",
"marker-levels",
"marker-message",
"marker-names",
"marker-types",
"printer-is-accepting-jobs",
"printer-state",
"printer-state-message",
@@ -1054,7 +1061,7 @@ main(int argc, /* I - Number of command-line args */
}
else if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
ipp_status == IPP_PRINTER_BUSY)
break;
continue;
else
copies_remaining --;
@@ -1182,6 +1189,19 @@ main(int argc, /* I - Number of command-line args */
check_printer_state(http, uri, resource, argv[2], version, job_id);
/*
* Update auth-info-required as needed...
*/
if (ipp_status == IPP_NOT_AUTHORIZED)
{
if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE),
"Negotiate", 9))
fputs("ATTR: auth-info-required=negotiate\n", stderr);
else
fputs("ATTR: auth-info-required=username,password\n", stderr);
}
/*
* Free memory...
*/
@@ -1215,15 +1235,7 @@ main(int argc, /* I - Number of command-line args */
*/
if (ipp_status == IPP_NOT_AUTHORIZED)
{
/*
* Authorization failures here mean that we need Kerberos. Username +
* password authentication is handled in the password_cb function.
*/
fputs("ATTR: auth-info-required=negotiate\n", stderr);
return (CUPS_BACKEND_AUTH_REQUIRED);
}
else if (ipp_status > IPP_OK_CONFLICT)
return (CUPS_BACKEND_FAILED);
else
@@ -1288,6 +1300,11 @@ check_printer_state(
*response; /* IPP response */
static const char * const attrs[] = /* Attributes we want */
{
"marker-colors",
"marker-levels",
"marker-message",
"marker-names",
"marker-types",
"printer-state-message",
"printer-state-reasons"
};
@@ -1410,7 +1427,7 @@ password_cb(const char *prompt) /* I - Prompt (not used) */
{
(void)prompt;
if (password && password_tries < 3)
if (password && *password && password_tries < 3)
{
password_tries ++;
@@ -1440,6 +1457,74 @@ password_cb(const char *prompt) /* I - Prompt (not used) */
}
/*
* 'report_attr()' - Report an IPP attribute value.
*/
static void
report_attr(ipp_attribute_t *attr) /* I - Attribute */
{
int i; /* Looping var */
char value[1024], /* Value string */
*valptr, /* Pointer into value string */
*attrptr; /* Pointer into attribute value */
/*
* Convert the attribute values into quoted strings...
*/
for (i = 0, valptr = value;
i < attr->num_values && valptr < (value + sizeof(value) - 10);
i ++)
{
if (i > 0)
*valptr++ = ',';
switch (attr->value_tag)
{
case IPP_TAG_INTEGER :
case IPP_TAG_ENUM :
snprintf(valptr, sizeof(value) - (valptr - value), "%d",
attr->values[i].integer);
valptr += strlen(valptr);
break;
case IPP_TAG_TEXT :
case IPP_TAG_NAME :
case IPP_TAG_KEYWORD :
*valptr++ = '\"';
for (attrptr = attr->values[i].string.text;
*attrptr && valptr < (value + sizeof(value) - 10);
attrptr ++)
{
if (*attrptr == '\\' || *attrptr == '\"')
*valptr++ = '\\';
*valptr++ = *attrptr;
}
*valptr++ = '\"';
break;
default :
/*
* Unsupported value type...
*/
return;
}
}
*valptr = '\0';
/*
* Tell the scheduler about the new values...
*/
fprintf(stderr, "ATTR: %s=%s\n", attr->name, value);
}
/*
* 'report_printer_state()' - Report the printer state.
*/
@@ -1450,8 +1535,9 @@ report_printer_state(ipp_t *ipp, /* I - IPP response */
{
int i; /* Looping var */
int count; /* Count of reasons shown... */
ipp_attribute_t *psm, /* pritner-state-message */
*reasons; /* printer-state-reasons */
ipp_attribute_t *psm, /* printer-state-message */
*reasons, /* printer-state-reasons */
*marker; /* marker-* attributes */
const char *reason; /* Current reason */
const char *message; /* Message to show */
char unknown[1024]; /* Unknown message string */
@@ -1476,7 +1562,7 @@ report_printer_state(ipp_t *ipp, /* I - IPP response */
{
reason = reasons->values[i].string.text;
if (job_id == 0 || strcmp(reason, "paused"))
if (strcmp(reason, "paused"))
{
strlcat(state, prefix, sizeof(state));
strlcat(state, reason, sizeof(state));
@@ -1558,6 +1644,22 @@ report_printer_state(ipp_t *ipp, /* I - IPP response */
fprintf(stderr, "%s\n", state);
/*
* Relay the current marker-* attribute values...
*/
if ((marker = ippFindAttribute(ipp, "marker-colors", IPP_TAG_NAME)) != NULL)
report_attr(marker);
if ((marker = ippFindAttribute(ipp, "marker-levels",
IPP_TAG_INTEGER)) != NULL)
report_attr(marker);
if ((marker = ippFindAttribute(ipp, "marker-message", IPP_TAG_TEXT)) != NULL)
report_attr(marker);
if ((marker = ippFindAttribute(ipp, "marker-names", IPP_TAG_NAME)) != NULL)
report_attr(marker);
if ((marker = ippFindAttribute(ipp, "marker-types", IPP_TAG_KEYWORD)) != NULL)
report_attr(marker);
return (count);
}
+1 -3
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Line Printer Daemon backend for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -445,8 +445,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
unlink(tmpfilename);
return (CUPS_BACKEND_FAILED);
}
filename = tmpfilename;
}
else if (argc == 6)
{
+8 -12
Ver Arquivo
@@ -280,7 +280,6 @@ int main (int argc, const char * argv[])
*/
static int listDevices(void)
{
int err = noErr;
int i;
int numberFound;
@@ -300,7 +299,7 @@ static int listDevices(void)
return -1; /* Network is down */
}
if ((err = zip_getmyzone(ZIP_DEF_INTERFACE, &at_zone)) != 0)
if (zip_getmyzone(ZIP_DEF_INTERFACE, &at_zone))
{
perror("ERROR: Unable to get default AppleTalk zone");
return -2;
@@ -409,14 +408,13 @@ static int printFile(char* name, char* type, char* zone, int fdin, int fdout, in
at_inet_t sendDataAddr;
at_inet_t src;
at_resp_t resp;
int userdata, xo, reqlen;
int userdata, xo = 0, reqlen;
u_short tid;
u_char bitmap;
int maxfdp1,
nbp_failures = 0;
struct timeval timeout, *timeoutPtr;
u_char flowQuantum = 1;
u_short recvSequence = 0;
time_t now,
start_time,
elasped_time,
@@ -728,7 +726,7 @@ static int printFile(char* name, char* type, char* zone, int fdin, int fdout, in
case AT_PAP_TYPE_SEND_DATA: /* Send-Data packet */
sendDataAddr.socket = src.socket;
gSendDataID = tid;
recvSequence = OSReadBigInt16(&SEQUENCE_NUM(userdata), 0);
OSReadBigInt16(&SEQUENCE_NUM(userdata), 0);
if ((fileBufferNbytes > 0 || fileEOFRead) && fileEOFSent == false)
{
@@ -906,8 +904,7 @@ static int papOpen(at_nbptuple_t* tuple, u_char* connID, int* fd,
{
int result,
open_result,
userdata,
atp_err;
userdata;
time_t tm,
waitTime;
char data[10],
@@ -956,8 +953,8 @@ static int papOpen(at_nbptuple_t* tuple, u_char* connID, int* fd,
fprintf(stderr, "DEBUG: -> %s\n", packet_name(AT_PAP_TYPE_OPEN_CONN));
if ((atp_err = atp_sendreq(*fd, &tuple->enu_addr, data, 4, userdata, 1, 0,
0, &resp, &retry, 0)) < 0)
if (atp_sendreq(*fd, &tuple->enu_addr, data, 4, userdata, 1, 0,
0, &resp, &retry, 0) < 0)
{
statusUpdate("Destination unreachable", 23);
result = EHOSTUNREACH;
@@ -1024,7 +1021,6 @@ static int papClose()
{
int fd;
u_short tmpID;
int result;
unsigned char rdata[ATP_DATA_SIZE];
int userdata;
u_char *puserdata = (u_char *)&userdata;
@@ -1077,9 +1073,9 @@ static int papClose()
resp.resp[0].iov_base = rdata;
resp.resp[0].iov_len = sizeof(rdata);
result = atp_sendreq(fd, &gSessionAddr, 0, 0, userdata, 1, 0, 0, &resp, &retry, 0);
atp_sendreq(fd, &gSessionAddr, 0, 0, userdata, 1, 0, 0, &resp, &retry, 0);
result = close(fd);
close(fd);
}
return noErr;
}
+1
Ver Arquivo
@@ -639,6 +639,7 @@ side_cb(int print_fd, /* I - Print file */
break;
case CUPS_SC_CMD_GET_BIDI :
status = CUPS_SC_STATUS_OK;
data[0] = use_bc;
datalen = 1;
break;
+15 -1
Ver Arquivo
@@ -212,7 +212,7 @@ backendRunLoop(
FD_SET(print_fd, &input);
if (use_bc)
FD_SET(device_fd, &input);
if (side_cb)
if (!print_bytes && side_cb)
FD_SET(CUPS_SC_FD, &input);
FD_ZERO(&output);
@@ -250,7 +250,15 @@ backendRunLoop(
*/
if (side_cb && FD_ISSET(CUPS_SC_FD, &input))
{
/*
* Do the side-channel request, then start back over in the select
* loop since it may have read from print_fd...
*/
(*side_cb)(print_fd, device_fd, use_bc);
continue;
}
/*
* Check if we have back-channel data ready...
@@ -265,6 +273,12 @@ backendRunLoop(
CUPS_LLCAST bc_bytes);
cupsBackChannelWrite(bc_buffer, bc_bytes, 1.0);
}
else if (bc_bytes < 0 && errno != EAGAIN && errno != EINTR)
{
fprintf(stderr, "DEBUG: Error reading back-channel data: %s\n",
strerror(errno));
use_bc = 0;
}
}
/*
+11 -1
Ver Arquivo
@@ -556,7 +556,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (!print_bytes)
FD_SET(print_fd, &input);
FD_SET(device_fd, &input);
FD_SET(CUPS_SC_FD, &input);
if (!print_bytes)
FD_SET(CUPS_SC_FD, &input);
FD_ZERO(&output);
if (print_bytes)
@@ -570,7 +571,15 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*/
if (FD_ISSET(CUPS_SC_FD, &input))
{
/*
* Do the side-channel request, then start back over in the select
* loop since it may have read from print_fd...
*/
side_cb(print_fd, device_fd, 1);
continue;
}
/*
* Check if we have back-channel data ready...
@@ -1271,6 +1280,7 @@ side_cb(int print_fd, /* I - Print file */
break;
case CUPS_SC_CMD_GET_BIDI :
status = CUPS_SC_STATUS_OK;
data[0] = use_bc;
datalen = 1;
break;
+9 -3
Ver Arquivo
@@ -73,7 +73,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
sep; /* Option separator */
int print_fd; /* Print file */
int copies; /* Number of copies to print */
time_t start_time; /* Time of first connect */
time_t start_time, /* Time of first connect */
current_time, /* Current time */
wait_time; /* Time to wait before shutting down socket */
int recoverable; /* Recoverable error shown? */
int contimeout; /* Connection timeout */
int waiteof; /* Wait for end-of-file? */
@@ -385,10 +387,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
/*
* Get any pending back-channel data...
* Wait up to 5 seconds to get any pending back-channel data...
*/
while (wait_bc(device_fd, 5) > 0);
wait_time = time(NULL) + 5;
while (wait_time >= time(&current_time))
if (wait_bc(device_fd, wait_time - current_time) <= 0)
break;
if (waiteof)
{
@@ -466,6 +471,7 @@ side_cb(int print_fd, /* I - Print file */
break;
case CUPS_SC_CMD_GET_BIDI :
status = CUPS_SC_STATUS_OK;
data[0] = use_bc;
datalen = 1;
break;
+8 -16
Ver Arquivo
@@ -633,14 +633,12 @@ print_device(const char *uri, /* I - Device URI */
status = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
/*
* Ignore timeout errors...
* Ignore timeout errors, but retain the number of bytes written to
* avoid sending duplicate data (<rdar://problem/6254911>)...
*/
if (status == kIOUSBTransactionTimeout)
{
status = 0;
bytes = 0;
}
if (status || bytes < 0)
{
@@ -1018,11 +1016,13 @@ static Boolean list_device_cb(void *refcon,
modelstr[0] = '/';
if (!CFStringGetCString(make, makestr, sizeof(makestr),
if (!make ||
!CFStringGetCString(make, makestr, sizeof(makestr),
kCFStringEncodingUTF8))
strcpy(makestr, "Unknown");
if (!CFStringGetCString(model, &modelstr[1], sizeof(modelstr)-1,
if (!model ||
!CFStringGetCString(model, &modelstr[1], sizeof(modelstr)-1,
kCFStringEncodingUTF8))
strcpy(modelstr + 1, "Printer");
@@ -1175,18 +1175,10 @@ static void copy_deviceinfo(CFStringRef deviceIDString,
CFStringRef serialKeys[] = { CFSTR("SN:"), CFSTR("SERN:"), NULL };
if (make != NULL)
{
if ((*make = copy_value_for_key(deviceIDString, makeKeys)) == NULL)
*make = CFStringCreateWithCString(kCFAllocatorDefault, "Unknown",
kCFStringEncodingUTF8);
}
*make = copy_value_for_key(deviceIDString, makeKeys);
if (model != NULL)
{
if ((*model = copy_value_for_key(deviceIDString, modelKeys)) == NULL)
*model = CFStringCreateWithCString(kCFAllocatorDefault, "Printer",
kCFStringEncodingUTF8);
}
*model = copy_value_for_key(deviceIDString, modelKeys);
if (serial != NULL)
*serial = copy_value_for_key(deviceIDString, serialKeys);
+19
Ver Arquivo
@@ -80,6 +80,14 @@ print_device(const char *uri, /* I - Device URI */
use_bc = 0;
#elif defined(__sun)
/*
* CUPS STR #3028: Solaris' usbprn driver apparently does not support
* select() or poll(), so we can't support backchannel...
*/
use_bc = 0;
#else
/*
* Disable backchannel data when printing to Brother, Canon, or
@@ -173,7 +181,17 @@ print_device(const char *uri, /* I - Device URI */
lseek(print_fd, 0, SEEK_SET);
}
#ifdef __sun
/*
* CUPS STR #3028: Solaris' usbprn driver apparently does not support
* select() or poll(), so we can't support the sidechannel either...
*/
tbytes = backendRunLoop(print_fd, device_fd, use_bc, NULL);
#else
tbytes = backendRunLoop(print_fd, device_fd, use_bc, side_cb);
#endif /* __sun */
if (print_fd != 0 && tbytes >= 0)
_cupsLangPrintf(stderr,
@@ -574,6 +592,7 @@ side_cb(int print_fd, /* I - Print file */
break;
case CUPS_SC_CMD_GET_BIDI :
status = CUPS_SC_STATUS_OK;
data[0] = use_bc;
datalen = 1;
break;
+13 -12
Ver Arquivo
@@ -1,13 +1,14 @@
# DO NOT DELETE THIS LINE -- make depend depends on it.
lpc.o: lpc.c ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h \
../cups/array.h ../cups/file.h ../cups/language.h ../cups/i18n.h \
../cups/transcode.h ../cups/debug.h ../cups/string.h ../config.h
lpq.o: lpq.c ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/i18n.h ../cups/transcode.h ../cups/debug.h
lpr.o: lpr.c ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/i18n.h ../cups/transcode.h
lprm.o: lprm.c ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h \
../cups/array.h ../cups/file.h ../cups/language.h ../cups/i18n.h \
../cups/transcode.h ../cups/string.h ../config.h
lpc.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
lpc.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/i18n.h
lpc.o: ../cups/transcode.h ../cups/debug.h ../cups/string.h ../config.h
lpq.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
lpq.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
lpq.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h ../cups/debug.h
lpr.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
lpr.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
lpr.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h
lprm.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
lprm.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/i18n.h
lprm.o: ../cups/transcode.h ../cups/string.h ../config.h
+7 -8
Ver Arquivo
@@ -3,7 +3,7 @@
*
* "lpq" command for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -372,17 +372,13 @@ show_jobs(const char *command, /* I - Command name */
request = ippNewRequest(id ? IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS);
if (dest == NULL)
if (id)
{
if (id)
sprintf(resource, "ipp://localhost/jobs/%d", id);
else
strcpy(resource, "ipp://localhost/jobs");
snprintf(resource, sizeof(resource), "ipp://localhost/jobs/%d", id);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri",
NULL, resource);
}
else
else if (dest)
{
httpAssembleURIf(HTTP_URI_CODING_ALL, resource, sizeof(resource), "ipp",
NULL, "localhost", 0, "/printers/%s", dest);
@@ -390,6 +386,9 @@ show_jobs(const char *command, /* I - Command name */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, resource);
}
else
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, "ipp://localhost/");
if (user)
{
+1 -3
Ver Arquivo
@@ -3,7 +3,7 @@
*
* "lpr" command for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -420,8 +420,6 @@ main(int argc, /* I - Number of command-line arguments */
}
else
{
num_files = 1;
#ifndef WIN32
# if defined(HAVE_SIGSET)
sigset(SIGHUP, sighandler);
+55 -55
Ver Arquivo
@@ -1,56 +1,56 @@
# DO NOT DELETE THIS LINE -- make depend depends on it.
help-index.o: help-index.c cgi-private.h cgi.h ../cups/cups.h \
../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h \
../cups/file.h ../cups/language.h ../cups/array.h help-index.h \
../cups/debug.h ../cups/i18n.h ../cups/transcode.h ../cups/string.h \
../config.h ../cups/dir.h
html.o: html.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
ipp-var.o: ipp-var.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
search.o: search.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
template.o: template.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
var.o: var.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
admin.o: admin.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h \
../cups/adminutil.h ../cups/cups.h ../cups/file.h
classes.o: classes.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
help.o: help.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
jobs.o: jobs.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
printers.o: printers.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h ../cups/debug.h \
../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
testcgi.o: testcgi.c cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h \
../cups/array.h help-index.h
testhi.o: testhi.c cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h \
../cups/array.h help-index.h
testtemplate.o: testtemplate.c cgi.h ../cups/cups.h ../cups/ipp.h \
../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
../cups/language.h ../cups/array.h help-index.h
help-index.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
help-index.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
help-index.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
help-index.o: ../cups/transcode.h ../cups/string.h ../config.h ../cups/dir.h
html.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
html.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
html.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
html.o: ../cups/transcode.h ../cups/string.h ../config.h
ipp-var.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
ipp-var.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
ipp-var.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
ipp-var.o: ../cups/transcode.h ../cups/string.h ../config.h
search.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
search.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
search.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
search.o: ../cups/transcode.h ../cups/string.h ../config.h
template.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
template.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
template.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
template.o: ../cups/transcode.h ../cups/string.h ../config.h
var.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
var.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
var.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
var.o: ../cups/transcode.h ../cups/string.h ../config.h
admin.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
admin.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
admin.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
admin.o: ../cups/transcode.h ../cups/string.h ../config.h ../cups/adminutil.h
admin.o: ../cups/cups.h ../cups/file.h
classes.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
classes.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
classes.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
classes.o: ../cups/transcode.h ../cups/string.h ../config.h
help.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
help.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
help.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
help.o: ../cups/transcode.h ../cups/string.h ../config.h
jobs.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
jobs.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
jobs.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
jobs.o: ../cups/transcode.h ../cups/string.h ../config.h
printers.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
printers.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
printers.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
printers.o: ../cups/transcode.h ../cups/string.h ../config.h
testcgi.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
testcgi.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/array.h
testcgi.o: help-index.h
testhi.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
testhi.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/array.h
testhi.o: help-index.h
testtemplate.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
testtemplate.o: ../cups/ppd.h ../cups/array.h ../cups/file.h
testtemplate.o: ../cups/language.h ../cups/array.h help-index.h
+36 -16
Ver Arquivo
@@ -308,6 +308,16 @@ do_add_rss_subscription(http_t *http) /* I - HTTP connection */
return;
}
/*
* Make sure we have a username...
*/
if ((user = getenv("REMOTE_USER")) == NULL)
{
puts("Status: 401\n");
exit(0);
}
/*
* Validate the subscription name...
*/
@@ -352,9 +362,6 @@ do_add_rss_subscription(http_t *http) /* I - HTTP connection */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, printer_uri);
if ((user = getenv("REMOTE_USER")) == NULL)
user = "guest";
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
NULL, user);
@@ -897,7 +904,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
cgiCopyTemplateLang("choose-serial.tmpl");
cgiEndHTML();
}
else if (!file && (var = cgiGetVariable("PPD_NAME")) == NULL)
else if (!file && !cgiGetVariable("PPD_NAME"))
{
if (modify)
{
@@ -1268,6 +1275,16 @@ do_cancel_subscription(http_t *http)/* I - HTTP connection */
return;
}
/*
* Require a username...
*/
if ((user = getenv("REMOTE_USER")) == NULL)
{
puts("Status: 401\n");
exit(0);
}
/*
* Cancel the subscription...
*/
@@ -1279,9 +1296,6 @@ do_cancel_subscription(http_t *http)/* I - HTTP connection */
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER,
"notify-subscription-id", id);
if ((user = getenv("REMOTE_USER")) == NULL)
user = "guest";
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
NULL, user);
@@ -2584,6 +2598,9 @@ do_set_allowed_users(http_t *http) /* I - HTTP connection */
while (*ptr == ',' || isspace(*ptr & 255))
ptr ++;
if (!*ptr)
break;
if (*ptr == '\'' || *ptr == '\"')
{
/*
@@ -2649,6 +2666,9 @@ do_set_allowed_users(http_t *http) /* I - HTTP connection */
while (*ptr == ',' || isspace(*ptr & 255))
ptr ++;
if (!*ptr)
break;
if (*ptr == '\'' || *ptr == '\"')
{
/*
@@ -2998,15 +3018,15 @@ do_set_options(http_t *http, /* I - HTTP connection */
cgiSetVariable("KEYWORD", "job_sheets_start");
cgiSetVariable("KEYTEXT", cgiText(_("Starting Banner")));
cgiSetVariable("DEFCHOICE", attr == NULL ?
"" : attr->values[0].string.text);
cgiSetVariable("DEFCHOICE", attr != NULL ?
attr->values[0].string.text : "");
cgiCopyTemplateLang("option-pickone.tmpl");
cgiSetVariable("KEYWORD", "job_sheets_end");
cgiSetVariable("KEYTEXT", cgiText(_("Ending Banner")));
cgiSetVariable("DEFCHOICE", attr == NULL && attr->num_values > 1 ?
"" : attr->values[1].string.text);
cgiSetVariable("DEFCHOICE", attr != NULL && attr->num_values > 1 ?
attr->values[1].string.text : "");
cgiCopyTemplateLang("option-pickone.tmpl");
@@ -3193,7 +3213,7 @@ do_set_options(http_t *http, /* I - HTTP connection */
}
if ((var = cgiGetVariable("protocol")) != NULL)
cupsFilePrintf(out, "*cupsProtocol: %s\n", cgiGetVariable("protocol"));
cupsFilePrintf(out, "*cupsProtocol: %s\n", var);
cupsFileClose(in);
cupsFileClose(out);
@@ -3232,12 +3252,12 @@ do_set_options(http_t *http, /* I - HTTP connection */
attr->values[1].string.text = _cupsStrAlloc(cgiGetVariable("job_sheets_end"));
if ((var = cgiGetVariable("printer_error_policy")) != NULL)
attr = ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME,
"printer-error-policy", NULL, var);
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME,
"printer-error-policy", NULL, var);
if ((var = cgiGetVariable("printer_op_policy")) != NULL)
attr = ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME,
"printer-op-policy", NULL, var);
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME,
"printer-op-policy", NULL, var);
/*
* Do the request and get back a response...
+20 -12
Ver Arquivo
@@ -474,10 +474,16 @@ cgiMoveJobs(http_t *http, /* I - Connection to server */
if (cupsLastError() <= IPP_OK_CONFLICT)
{
cgiRewriteURL(job_printer_uri, resource, sizeof(resource), NULL);
cgiFormEncode(uri, resource, sizeof(uri));
snprintf(refresh, sizeof(refresh), "2;URL=%s", uri);
cgiSetVariable("refresh_page", refresh);
const char *path = strstr(job_printer_uri, "/printers/");
if (!path)
path = strstr(job_printer_uri, "/classes/");
if (path)
{
cgiFormEncode(uri, path, sizeof(uri));
snprintf(refresh, sizeof(refresh), "2;URL=%s", uri);
cgiSetVariable("refresh_page", refresh);
}
}
if (job_id)
@@ -626,7 +632,7 @@ cgiRewriteURL(const char *uri, /* I - Current URI */
int urlsize, /* I - Size of URL buffer */
const char *newresource) /* I - Replacement resource */
{
char method[HTTP_MAX_URI],
char scheme[HTTP_MAX_URI],
userpass[HTTP_MAX_URI],
hostname[HTTP_MAX_URI],
rawresource[HTTP_MAX_URI],
@@ -673,13 +679,13 @@ cgiRewriteURL(const char *uri, /* I - Current URI */
* Convert the URI to a URL...
*/
httpSeparateURI(HTTP_URI_CODING_ALL, uri, method, sizeof(method), userpass,
httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme), userpass,
sizeof(userpass), hostname, sizeof(hostname), &port,
rawresource, sizeof(rawresource));
if (!strcmp(method, "ipp") ||
!strcmp(method, "http") ||
!strcmp(method, "https"))
if (!strcmp(scheme, "ipp") ||
!strcmp(scheme, "http") ||
!strcmp(scheme, "https"))
{
if (newresource)
{
@@ -718,7 +724,9 @@ cgiRewriteURL(const char *uri, /* I - Current URI */
* Map local access to a local URI...
*/
if (!strcasecmp(hostname, "localhost") ||
if (!strcasecmp(hostname, "127.0.0.1") ||
!strcasecmp(hostname, "[::1]") ||
!strcasecmp(hostname, "localhost") ||
!strncasecmp(hostname, "localhost.", 10) ||
!strcasecmp(hostname, server) ||
!strcasecmp(hostname, servername))
@@ -1238,8 +1246,8 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
NULL, url);
}
else
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL,
"ipp://localhost/jobs");
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL,
"ipp://localhost/");
if ((which_jobs = cgiGetVariable("which_jobs")) != NULL)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "which-jobs",
-1
Ver Arquivo
@@ -49,7 +49,6 @@ depend:
#
install: all
$(INSTALL_DIR) -m 755 $(SERVERROOT)
for file in $(KEEP); do \
if test -r $(SERVERROOT)/$$file ; then \
$(INSTALL_CONFIG) $$file $(SERVERROOT)/$$file.N ; \
+26 -5
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-common.m4 7329 2008-02-20 00:32:58Z mike $"
dnl "$Id: cups-common.m4 8317 2009-02-02 22:03:58Z mike $"
dnl
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Version number information...
CUPS_VERSION="1.3.7"
CUPS_VERSION="1.3.10"
CUPS_REVISION=""
AC_SUBST(CUPS_VERSION)
@@ -258,10 +258,31 @@ case $uname in
AC_CHECK_FUNCS(notify_post)
dnl Check for Authorization Services support
AC_ARG_WITH(adminkey, [ --with-adminkey set the default SystemAuthKey value],
default_adminkey="$withval",
default_adminkey="default")
AC_ARG_WITH(operkey, [ --with-operkey set the default operator @AUTHKEY value],
default_operkey="$withval",
default_operkey="default")
AC_CHECK_HEADER(Security/Authorization.h, [
AC_DEFINE(HAVE_AUTHORIZATION_H)
CUPS_DEFAULT_PRINTADMIN_AUTH="@AUTHKEY(system.print.admin) @admin @lpadmin"
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"])
if test "x$default_adminkey" != xdefault; then
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey $default_adminkey"
elif grep -q system.print.admin /etc/authorization; then
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.print.admin"
else
CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"
fi
if test "x$default_operkey" != xdefault; then
CUPS_DEFAULT_PRINTADMIN_AUTH="@AUTHKEY($default_operkey) @admin @lpadmin"
elif grep -q system.print.operator /etc/authorization; then
CUPS_DEFAULT_PRINTADMIN_AUTH="@AUTHKEY(system.print.operator) @admin @lpadmin"
else
CUPS_DEFAULT_PRINTADMIN_AUTH="@AUTHKEY(system.print.admin) @admin @lpadmin"
fi])
AC_CHECK_HEADER(Security/SecBasePriv.h,AC_DEFINE(HAVE_SECBASEPRIV_H))
;;
esac
@@ -273,5 +294,5 @@ AC_SUBST(FONTS)
AC_SUBST(LEGACY_BACKENDS)
dnl
dnl End of "$Id: cups-common.m4 7329 2008-02-20 00:32:58Z mike $".
dnl End of "$Id: cups-common.m4 8317 2009-02-02 22:03:58Z mike $".
dnl
+8 -2
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-compiler.m4 7353 2008-02-28 00:54:04Z mike $"
dnl "$Id: cups-compiler.m4 7648 2008-06-16 17:41:11Z mike $"
dnl
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -521,6 +521,12 @@ case $uname in
OPTIM="$OPTIM -D_HPUX_SOURCE"
;;
Linux*)
# glibc 2.8 and higher breaks peer credentials unless you
# define _GNU_SOURCE...
OPTIM="$OPTIM -D_GNU_SOURCE"
;;
OSF*)
# Tru64 UNIX aka Digital UNIX aka OSF/1 need to be told
# to be POSIX-compliant...
@@ -529,5 +535,5 @@ case $uname in
esac
dnl
dnl End of "$Id: cups-compiler.m4 7353 2008-02-28 00:54:04Z mike $".
dnl End of "$Id: cups-compiler.m4 7648 2008-06-16 17:41:11Z mike $".
dnl
+4 -4
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-defaults.m4 7296 2008-02-12 00:20:32Z mike $"
dnl "$Id: cups-defaults.m4 7448 2008-04-14 18:10:27Z mike $"
dnl
dnl Default cupsd configuration settings for the Common UNIX Printing System
dnl (CUPS).
@@ -290,10 +290,10 @@ fi
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP")
dnl Default MaxCopies value...
AC_ARG_WITH(max-copies, [ --with-max-copies set max copies value, default=100 ],
AC_ARG_WITH(max-copies, [ --with-max-copies set default max copies value, default=auto ],
CUPS_MAX_COPIES="$withval",
if test "x$uname" = xDarwin; then
CUPS_MAX_COPIES="999"
CUPS_MAX_COPIES="9999"
else
CUPS_MAX_COPIES="100"
fi)
@@ -346,5 +346,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
dnl
dnl End of "$Id: cups-defaults.m4 7296 2008-02-12 00:20:32Z mike $".
dnl End of "$Id: cups-defaults.m4 7448 2008-04-14 18:10:27Z mike $".
dnl
+5 -3
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-directories.m4 6976 2007-09-18 20:39:31Z mike $"
dnl "$Id: cups-directories.m4 8077 2008-10-23 15:40:14Z mike $"
dnl
dnl Directory stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -201,7 +201,7 @@ if test x$rcdir = x; then
;;
esac
else
elif test "x$rcdir" != xno; then
if test "x$rclevels" = x; then
INITDDIR="$rcdir"
else
@@ -225,6 +225,8 @@ if test "x$XINETD" = x -a ! -x /sbin/launchd; then
break
fi
done
elif test "x$XINETD" = xno; then
XINETD=""
fi
AC_SUBST(XINETD)
@@ -367,5 +369,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
AC_SUBST(CUPS_STATEDIR)
dnl
dnl End of "$Id: cups-directories.m4 6976 2007-09-18 20:39:31Z mike $".
dnl End of "$Id: cups-directories.m4 8077 2008-10-23 15:40:14Z mike $".
dnl
+4 -12
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-manpages.m4 6649 2007-07-11 21:46:42Z mike $"
dnl "$Id: cups-manpages.m4 8231 2009-01-12 19:17:21Z mike $"
dnl
dnl Manpage stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -51,14 +51,6 @@ AC_SUBST(PMANDIR)
dnl Setup manpage extensions...
case "$uname" in
*BSD* | Darwin*)
# *BSD
MAN1EXT=1
MAN5EXT=5
MAN7EXT=7
MAN8EXT=8
MAN8DIR=8
;;
IRIX*)
# SGI IRIX
MAN1EXT=1
@@ -75,8 +67,8 @@ case "$uname" in
MAN8EXT=1m
MAN8DIR=1m
;;
Linux* | GNU*)
# Linux and GNU Hurd
Linux* | GNU* | Darwin*)
# Linux, GNU Hurd, and Mac OS X
MAN1EXT=1.gz
MAN5EXT=5.gz
MAN7EXT=7.gz
@@ -100,5 +92,5 @@ AC_SUBST(MAN8EXT)
AC_SUBST(MAN8DIR)
dnl
dnl End of "$Id: cups-manpages.m4 6649 2007-07-11 21:46:42Z mike $".
dnl End of "$Id: cups-manpages.m4 8231 2009-01-12 19:17:21Z mike $".
dnl
+7 -3
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id: cups-network.m4 7140 2007-12-19 01:47:57Z mike $"
dnl "$Id: cups-network.m4 7919 2008-09-09 22:03:27Z mike $"
dnl
dnl Networking stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007 by Apple Inc.
dnl Copyright 2007-2008 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
@@ -13,11 +13,15 @@ dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H))
AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(gethostbyaddr, nsl)
AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
AC_SEARCH_LIBS(rresvport_af, nsl, AC_DEFINE(HAVE_RRESVPORT_AF))
AC_SEARCH_LIBS(__res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),
AC_SEARCH_LIBS(res_9_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),
AC_SEARCH_LIBS(res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT))))
# Tru64 5.1b leaks file descriptors with these functions; disable until
# we can come up with a test for this...
@@ -66,5 +70,5 @@ AC_CHECK_HEADERS(AppleTalk/at_proto.h,AC_DEFINE(HAVE_APPLETALK_AT_PROTO_H),,
[#include <netat/appletalk.h>])
dnl
dnl End of "$Id: cups-network.m4 7140 2007-12-19 01:47:57Z mike $".
dnl End of "$Id: cups-network.m4 7919 2008-09-09 22:03:27Z mike $".
dnl
+9 -6
Ver Arquivo
@@ -3,7 +3,7 @@ dnl "$Id: cups-pam.m4 5466 2006-04-26 19:52:27Z mike $"
dnl
dnl PAP (AppleTalk) stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007 by Apple Inc.
dnl Copyright 2007-2008 by Apple Inc.
dnl Copyright 2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
@@ -15,14 +15,17 @@ dnl
# Currently the PAP backend is only supported on MacOS X with the AppleTalk
# SDK installed...
PAP=""
if test $uname = Darwin; then
PAP="pap"
AC_CHECK_HEADER(AppleTalk/at_proto.h)
fi
AC_ARG_ENABLE(pap, [ --enable-pap build with AppleTalk support, default=auto])
PAP=""
AC_SUBST(PAP)
if test x$enable_pap != xno -a $uname = Darwin; then
AC_CHECK_HEADER(netat/appletalk.h,[
PAP="pap"
AC_CHECK_HEADER(AppleTalk/at_proto.h)])
fi
dnl
dnl End of "$Id: cups-pam.m4 5466 2006-04-26 19:52:27Z mike $".
dnl
+52 -13
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id: cups-pdf.m4 6649 2007-07-11 21:46:42Z mike $"
dnl "$Id: cups-pdf.m4 8429 2009-03-12 21:34:21Z mike $"
dnl
dnl PDF filter configuration stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 2007 by Apple Inc.
dnl Copyright 2007-2009 by Apple Inc.
dnl Copyright 2006 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
@@ -14,21 +14,60 @@ dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
AC_ARG_ENABLE(pdftops, [ --enable-pdftops build pdftops filter, default=auto ])
AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,pdftops,none), default=pdftops ])
PDFTOPS=""
if test "x$enable_pdftops" != xno; then
AC_MSG_CHECKING(whether to build pdftops filter)
if test "x$enable_pdftops" = xyes -o $uname != Darwin; then
PDFTOPS="pdftops"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if test "x$enable_pdftops" = xno -a "x$with_pdftops" = x; then
with_pdftops=no
fi
PDFTOPS=""
CUPS_PDFTOPS=""
CUPS_GHOSTSCRIPT=""
case "x$with_pdftops" in
x) # Default/auto
if test $uname != Darwin; then
AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
if test "x$CUPS_PDFTOPS" != x; then
AC_DEFINE(HAVE_PDFTOPS)
PDFTOPS="pdftops"
else
AC_PATH_PROG(CUPS_GHOSTSCRIPT, gs)
if test "x$CUPS_GHOSTSCRIPT" != x; then
AC_DEFINE(HAVE_GHOSTSCRIPT)
PDFTOPS="pdftops"
fi
fi
fi
;;
xgs)
AC_PATH_PROG(CUPS_GHOSTSCRIPT, gs)
if test "x$CUPS_GHOSTSCRIPT" != x; then
AC_DEFINE(HAVE_GHOSTSCRIPT)
PDFTOPS="pdftops"
else
AC_MSG_ERROR(Unable to find gs program!)
exit 1
fi
;;
xpdftops)
AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
if test "x$CUPS_PDFTOPS" != x; then
AC_DEFINE(HAVE_PDFTOPS)
PDFTOPS="pdftops"
else
AC_MSG_ERROR(Unable to find pdftops program!)
exit 1
fi
;;
esac
AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")
AC_DEFINE_UNQUOTED(CUPS_GHOSTSCRIPT, "$CUPS_GHOSTSCRIPT")
AC_SUBST(PDFTOPS)
dnl
dnl End of "$Id: cups-pdf.m4 6649 2007-07-11 21:46:42Z mike $".
dnl End of "$Id: cups-pdf.m4 8429 2009-03-12 21:34:21Z mike $".
dnl
+31 -1
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Configuration file for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -371,6 +371,20 @@
#undef HAVE_HSTRERROR
/*
* Do we have res_init()?
*/
#undef HAVE_RES_INIT
/*
* Do we have <resolv.h>
*/
#undef HAVE_RESOLV_H
/*
* Do we have the <sys/sockio.h> header file?
*/
@@ -421,6 +435,22 @@
#define CUPS_PYTHON "/usr/bin/python"
/*
* Location of the poppler/Xpdf pdftops program...
*/
#undef HAVE_PDFTOPS
#define CUPS_PDFTOPS "/usr/bin/pdftops"
/*
* Location of the Ghostscript gs program...
*/
#undef HAVE_GHOSTSCRIPT
#define CUPS_GHOSTSCRIPT "/usr/bin/gs"
/*
* Do we have Darwin's CoreFoundation and SystemConfiguration frameworks?
*/
+303 -324
Ver Arquivo
@@ -1,324 +1,303 @@
# DO NOT DELETE THIS LINE -- make depend depends on it.
adminutil.o: adminutil.c adminutil.h cups.h ipp.h http.h string.h \
../config.h ppd.h array.h file.h language.h globals.h string.h \
http-private.h md5.h ipp-private.h i18n.h transcode.h debug.h
array.o: array.c array.h string.h ../config.h string.h debug.h
attr.o: attr.c ppd.h array.h file.h debug.h string.h ../config.h string.h
auth.o: auth.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
backchannel.o: backchannel.c cups.h ipp.h http.h string.h ../config.h \
ppd.h array.h file.h language.h
backend.o: backend.c backend.h string.h ../config.h string.h
custom.o: custom.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
dest.o: dest.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h
dir.o: dir.c dir.h string.h ../config.h string.h debug.h
emit.o: emit.c ppd.h array.h file.h string.h ../config.h string.h debug.h
encode.o: encode.c cups.h ipp.h http.h string.h ../config.h ppd.h array.h \
file.h language.h ipp-private.h string.h debug.h
file.o: file.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
getifaddrs.o: getifaddrs.c http-private.h ../config.h http.h string.h \
md5.h ipp-private.h ipp.h
getputfile.o: getputfile.c http-private.h ../config.h http.h string.h \
md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
string.h debug.h
globals.o: globals.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
http.o: http.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
http-addr.o: http-addr.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
http-addrlist.o: http-addrlist.c http-private.h ../config.h http.h \
string.h md5.h ipp-private.h ipp.h globals.h string.h cups.h ppd.h \
array.h file.h language.h i18n.h transcode.h debug.h
http-support.o: http-support.c debug.h globals.h string.h ../config.h \
string.h http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h \
array.h file.h language.h i18n.h transcode.h
ipp.o: ipp.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
ipp-support.o: ipp-support.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
langprintf.o: langprintf.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h
language.o: language.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
localize.o: localize.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
mark.o: mark.c cups.h ipp.h http.h string.h ../config.h ppd.h array.h \
file.h language.h string.h debug.h
md5.o: md5.c md5.h string.h ../config.h string.h
md5passwd.o: md5passwd.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h string.h
notify.o: notify.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h
options.o: options.c cups.h ipp.h http.h string.h ../config.h ppd.h \
array.h file.h language.h string.h debug.h
page.o: page.c ppd.h array.h file.h string.h ../config.h string.h
ppd.o: ppd.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
request.o: request.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
sidechannel.o: sidechannel.c sidechannel.h string.h ../config.h string.h
snprintf.o: snprintf.c string.h ../config.h string.h
string.o: string.c array.h debug.h string.h ../config.h string.h
tempfile.o: tempfile.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
transcode.o: transcode.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
usersys.o: usersys.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
util.o: util.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
testadmin.o: testadmin.c adminutil.h cups.h ipp.h http.h string.h \
../config.h ppd.h array.h file.h language.h string.h
testarray.o: testarray.c ../cups/string.h ../config.h string.h array.h \
dir.h debug.h
testcups.o: testcups.c cups.h ipp.h http.h string.h ../config.h ppd.h \
array.h file.h language.h
testfile.o: testfile.c string.h ../config.h string.h file.h debug.h
testhttp.o: testhttp.c http.h string.h ../config.h string.h
testi18n.o: testi18n.c i18n.h transcode.h language.h array.h string.h \
../config.h string.h
testipp.o: testipp.c ../cups/string.h ../config.h string.h ipp-private.h \
ipp.h http.h
testlang.o: testlang.c i18n.h transcode.h language.h array.h string.h \
../config.h string.h
testppd.o: testppd.c ../cups/string.h ../config.h string.h ppd.h array.h \
file.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
adminutil.32.o: adminutil.c adminutil.c adminutil.h cups.h ipp.h http.h string.h \
../config.h ppd.h array.h file.h language.h globals.h string.h \
http-private.h md5.h ipp-private.h i18n.h transcode.h debug.h
array.32.o: array.c array.c array.h string.h ../config.h string.h debug.h
attr.32.o: attr.c attr.c ppd.h array.h file.h debug.h string.h ../config.h string.h
auth.32.o: auth.c auth.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
backchannel.32.o: backchannel.c backchannel.c cups.h ipp.h http.h string.h ../config.h \
ppd.h array.h file.h language.h
backend.32.o: backend.c backend.c backend.h string.h ../config.h string.h
custom.32.o: custom.c custom.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
dest.32.o: dest.c dest.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h
dir.32.o: dir.c dir.c dir.h string.h ../config.h string.h debug.h
emit.32.o: emit.c emit.c ppd.h array.h file.h string.h ../config.h string.h debug.h
encode.32.o: encode.c encode.c cups.h ipp.h http.h string.h ../config.h ppd.h array.h \
file.h language.h ipp-private.h string.h debug.h
file.32.o: file.c file.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
getifaddrs.32.o: getifaddrs.c getifaddrs.c http-private.h ../config.h http.h string.h \
md5.h ipp-private.h ipp.h
getputfile.32.o: getputfile.c getputfile.c http-private.h ../config.h http.h string.h \
md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
string.h debug.h
globals.32.o: globals.c globals.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
http.32.o: http.c http.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
http-addr.32.o: http-addr.c http-addr.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
http-addrlist.32.o: http-addrlist.c http-addrlist.c http-private.h ../config.h http.h \
string.h md5.h ipp-private.h ipp.h globals.h string.h cups.h ppd.h \
array.h file.h language.h i18n.h transcode.h debug.h
http-support.32.o: http-support.c http-support.c debug.h globals.h string.h ../config.h \
string.h http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h \
array.h file.h language.h i18n.h transcode.h
ipp.32.o: ipp.c ipp.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
ipp-support.32.o: ipp-support.c ipp-support.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
langprintf.32.o: langprintf.c langprintf.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h
language.32.o: language.c language.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
localize.32.o: localize.c localize.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
mark.32.o: mark.c mark.c cups.h ipp.h http.h string.h ../config.h ppd.h array.h \
file.h language.h string.h debug.h
md5.32.o: md5.c md5.c md5.h string.h ../config.h string.h
md5passwd.32.o: md5passwd.c md5passwd.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h string.h
notify.32.o: notify.c notify.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h
options.32.o: options.c options.c cups.h ipp.h http.h string.h ../config.h ppd.h \
array.h file.h language.h string.h debug.h
page.32.o: page.c page.c ppd.h array.h file.h string.h ../config.h string.h
ppd.32.o: ppd.c ppd.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
request.32.o: request.c request.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
sidechannel.32.o: sidechannel.c sidechannel.c sidechannel.h string.h ../config.h string.h
snprintf.32.o: snprintf.c snprintf.c string.h ../config.h string.h
string.32.o: string.c string.c array.h debug.h string.h ../config.h string.h
tempfile.32.o: tempfile.c tempfile.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
transcode.32.o: transcode.c transcode.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
usersys.32.o: usersys.c usersys.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
util.32.o: util.c util.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
testadmin.32.o: testadmin.c testadmin.c adminutil.h cups.h ipp.h http.h string.h \
../config.h ppd.h array.h file.h language.h string.h
testarray.32.o: testarray.c testarray.c ../cups/string.h ../config.h string.h array.h \
dir.h debug.h
testcups.32.o: testcups.c testcups.c cups.h ipp.h http.h string.h ../config.h ppd.h \
array.h file.h language.h
testfile.32.o: testfile.c testfile.c string.h ../config.h string.h file.h debug.h
testhttp.32.o: testhttp.c testhttp.c http.h string.h ../config.h string.h
testi18n.32.o: testi18n.c testi18n.c i18n.h transcode.h language.h array.h string.h \
../config.h string.h
testipp.32.o: testipp.c testipp.c ../cups/string.h ../config.h string.h ipp-private.h \
ipp.h http.h
testlang.32.o: testlang.c testlang.c i18n.h transcode.h language.h array.h string.h \
../config.h string.h
testppd.32.o: testppd.c testppd.c ../cups/string.h ../config.h string.h ppd.h array.h \
file.h
# DO NOT DELETE THIS LINE -- make depend depends on it.
adminutil.64.o: adminutil.c adminutil.c adminutil.h cups.h ipp.h http.h string.h \
../config.h ppd.h array.h file.h language.h globals.h string.h \
http-private.h md5.h ipp-private.h i18n.h transcode.h debug.h
array.64.o: array.c array.c array.h string.h ../config.h string.h debug.h
attr.64.o: attr.c attr.c ppd.h array.h file.h debug.h string.h ../config.h string.h
auth.64.o: auth.c auth.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
backchannel.64.o: backchannel.c backchannel.c cups.h ipp.h http.h string.h ../config.h \
ppd.h array.h file.h language.h
backend.64.o: backend.c backend.c backend.h string.h ../config.h string.h
custom.64.o: custom.c custom.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
dest.64.o: dest.c dest.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h
dir.64.o: dir.c dir.c dir.h string.h ../config.h string.h debug.h
emit.64.o: emit.c emit.c ppd.h array.h file.h string.h ../config.h string.h debug.h
encode.64.o: encode.c encode.c cups.h ipp.h http.h string.h ../config.h ppd.h array.h \
file.h language.h ipp-private.h string.h debug.h
file.64.o: file.c file.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
getifaddrs.64.o: getifaddrs.c getifaddrs.c http-private.h ../config.h http.h string.h \
md5.h ipp-private.h ipp.h
getputfile.64.o: getputfile.c getputfile.c http-private.h ../config.h http.h string.h \
md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
string.h debug.h
globals.64.o: globals.c globals.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
http.64.o: http.c http.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
http-addr.64.o: http-addr.c http-addr.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
http-addrlist.64.o: http-addrlist.c http-addrlist.c http-private.h ../config.h http.h \
string.h md5.h ipp-private.h ipp.h globals.h string.h cups.h ppd.h \
array.h file.h language.h i18n.h transcode.h debug.h
http-support.64.o: http-support.c http-support.c debug.h globals.h string.h ../config.h \
string.h http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h \
array.h file.h language.h i18n.h transcode.h
ipp.64.o: ipp.c ipp.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
ipp-support.64.o: ipp-support.c ipp-support.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
langprintf.64.o: langprintf.c langprintf.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h
language.64.o: language.c language.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
localize.64.o: localize.c localize.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
mark.64.o: mark.c mark.c cups.h ipp.h http.h string.h ../config.h ppd.h array.h \
file.h language.h string.h debug.h
md5.64.o: md5.c md5.c md5.h string.h ../config.h string.h
md5passwd.64.o: md5passwd.c md5passwd.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h string.h
notify.64.o: notify.c notify.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h
options.64.o: options.c options.c cups.h ipp.h http.h string.h ../config.h ppd.h \
array.h file.h language.h string.h debug.h
page.64.o: page.c page.c ppd.h array.h file.h string.h ../config.h string.h
ppd.64.o: ppd.c ppd.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
request.64.o: request.c request.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
sidechannel.64.o: sidechannel.c sidechannel.c sidechannel.h string.h ../config.h string.h
snprintf.64.o: snprintf.c snprintf.c string.h ../config.h string.h
string.64.o: string.c string.c array.h debug.h string.h ../config.h string.h
tempfile.64.o: tempfile.c tempfile.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
transcode.64.o: transcode.c transcode.c globals.h string.h ../config.h string.h \
http-private.h http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h \
file.h language.h i18n.h transcode.h debug.h
usersys.64.o: usersys.c usersys.c http-private.h ../config.h http.h string.h md5.h \
ipp-private.h ipp.h globals.h string.h cups.h ppd.h array.h file.h \
language.h i18n.h transcode.h debug.h
util.64.o: util.c util.c globals.h string.h ../config.h string.h http-private.h \
http.h md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h \
i18n.h transcode.h debug.h
testadmin.64.o: testadmin.c testadmin.c adminutil.h cups.h ipp.h http.h string.h \
../config.h ppd.h array.h file.h language.h string.h
testarray.64.o: testarray.c testarray.c ../cups/string.h ../config.h string.h array.h \
dir.h debug.h
testcups.64.o: testcups.c testcups.c cups.h ipp.h http.h string.h ../config.h ppd.h \
array.h file.h language.h
testfile.64.o: testfile.c testfile.c string.h ../config.h string.h file.h debug.h
testhttp.64.o: testhttp.c testhttp.c http.h string.h ../config.h string.h
testi18n.64.o: testi18n.c testi18n.c i18n.h transcode.h language.h array.h string.h \
../config.h string.h
testipp.64.o: testipp.c testipp.c ../cups/string.h ../config.h string.h ipp-private.h \
ipp.h http.h
testlang.64.o: testlang.c testlang.c i18n.h transcode.h language.h array.h string.h \
../config.h string.h
testppd.64.o: testppd.c testppd.c ../cups/string.h ../config.h string.h ppd.h array.h \
file.h
# DO NOT DELETE
adminutil.o: adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
adminutil.o: globals.h string.h ../config.h http-private.h md5.h
adminutil.o: ipp-private.h i18n.h transcode.h debug.h
array.o: array.h string.h ../config.h debug.h
attr.o: ppd.h array.h file.h debug.h string.h ../config.h
auth.o: globals.h string.h ../config.h http-private.h http.h md5.h
auth.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
auth.o: transcode.h debug.h
backchannel.o: cups.h ipp.h http.h ppd.h array.h file.h language.h
backend.o: backend.h string.h ../config.h
custom.o: globals.h string.h ../config.h http-private.h http.h md5.h
custom.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
custom.o: transcode.h debug.h
dest.o: globals.h string.h ../config.h http-private.h http.h md5.h
dest.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
dest.o: transcode.h
dir.o: dir.h string.h ../config.h debug.h
emit.o: ppd.h array.h file.h string.h ../config.h debug.h
encode.o: cups.h ipp.h http.h ppd.h array.h file.h language.h ipp-private.h
encode.o: string.h ../config.h debug.h
file.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
file.o: string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
file.o: debug.h
getifaddrs.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
getputfile.o: globals.h string.h ../config.h http-private.h http.h md5.h
getputfile.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
getputfile.o: i18n.h transcode.h debug.h
globals.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
globals.o: globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
globals.o: transcode.h debug.h
http.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
http.o: string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
http.o: debug.h
http-addr.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
http-addr.o: globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
http-addr.o: transcode.h debug.h
http-addrlist.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
http-addrlist.o: globals.h string.h cups.h ppd.h array.h file.h language.h
http-addrlist.o: i18n.h transcode.h debug.h
http-support.o: debug.h globals.h string.h ../config.h http-private.h http.h
http-support.o: md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h
http-support.o: language.h i18n.h transcode.h
ipp.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
ipp.o: string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
ipp.o: debug.h
ipp-support.o: globals.h string.h ../config.h http-private.h http.h md5.h
ipp-support.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
ipp-support.o: i18n.h transcode.h debug.h
langprintf.o: globals.h string.h ../config.h http-private.h http.h md5.h
langprintf.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
langprintf.o: i18n.h transcode.h
language.o: globals.h string.h ../config.h http-private.h http.h md5.h
language.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
language.o: transcode.h debug.h
localize.o: globals.h string.h ../config.h http-private.h http.h md5.h
localize.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
localize.o: transcode.h debug.h
mark.o: cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
mark.o: ../config.h debug.h
md5.o: md5.h string.h ../config.h
md5passwd.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
md5passwd.o: string.h
notify.o: globals.h string.h ../config.h http-private.h http.h md5.h
notify.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
notify.o: transcode.h
options.o: cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
options.o: ../config.h debug.h
page.o: ppd.h array.h file.h string.h ../config.h
ppd.o: globals.h string.h ../config.h http-private.h http.h md5.h
ppd.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
ppd.o: transcode.h debug.h
request.o: globals.h string.h ../config.h http-private.h http.h md5.h
request.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
request.o: transcode.h debug.h
sidechannel.o: sidechannel.h string.h ../config.h
snprintf.o: string.h ../config.h
string.o: array.h debug.h string.h ../config.h
tempfile.o: globals.h string.h ../config.h http-private.h http.h md5.h
tempfile.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
tempfile.o: transcode.h debug.h
transcode.o: globals.h string.h ../config.h http-private.h http.h md5.h
transcode.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
transcode.o: i18n.h transcode.h debug.h
usersys.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
usersys.o: globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
usersys.o: transcode.h debug.h
util.o: globals.h string.h ../config.h http-private.h http.h md5.h
util.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
util.o: transcode.h debug.h
testadmin.o: adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
testadmin.o: string.h ../config.h
testarray.o: ../cups/string.h ../config.h string.h array.h dir.h debug.h
testcups.o: cups.h ipp.h http.h ppd.h array.h file.h language.h
testfile.o: string.h ../config.h file.h debug.h
testhttp.o: http.h string.h ../config.h
testi18n.o: i18n.h transcode.h language.h array.h string.h ../config.h
testipp.o: ../cups/string.h ../config.h string.h ipp-private.h ipp.h http.h
testlang.o: i18n.h transcode.h language.h array.h string.h ../config.h
testppd.o: ../cups/string.h ../config.h string.h ppd.h array.h file.h
# DO NOT DELETE
adminutil.32.o: adminutil.c adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
adminutil.32.o: adminutil.c globals.h string.h ../config.h http-private.h md5.h
adminutil.32.o: adminutil.c ipp-private.h i18n.h transcode.h debug.h
array.32.o: array.c array.h string.h ../config.h debug.h
attr.32.o: attr.c ppd.h array.h file.h debug.h string.h ../config.h
auth.32.o: auth.c globals.h string.h ../config.h http-private.h http.h md5.h
auth.32.o: auth.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
auth.32.o: auth.c transcode.h debug.h
backchannel.32.o: backchannel.c cups.h ipp.h http.h ppd.h array.h file.h language.h
backend.32.o: backend.c backend.h string.h ../config.h
custom.32.o: custom.c globals.h string.h ../config.h http-private.h http.h md5.h
custom.32.o: custom.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
custom.32.o: custom.c transcode.h debug.h
dest.32.o: dest.c globals.h string.h ../config.h http-private.h http.h md5.h
dest.32.o: dest.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
dest.32.o: dest.c transcode.h
dir.32.o: dir.c dir.h string.h ../config.h debug.h
emit.32.o: emit.c ppd.h array.h file.h string.h ../config.h debug.h
encode.32.o: encode.c cups.h ipp.h http.h ppd.h array.h file.h language.h ipp-private.h
encode.32.o: encode.c string.h ../config.h debug.h
file.32.o: file.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
file.32.o: file.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
file.32.o: file.c debug.h
getifaddrs.32.o: getifaddrs.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
getputfile.32.o: getputfile.c globals.h string.h ../config.h http-private.h http.h md5.h
getputfile.32.o: getputfile.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
getputfile.32.o: getputfile.c i18n.h transcode.h debug.h
globals.32.o: globals.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
globals.32.o: globals.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
globals.32.o: globals.c transcode.h debug.h
http.32.o: http.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
http.32.o: http.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
http.32.o: http.c debug.h
http-addr.32.o: http-addr.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
http-addr.32.o: http-addr.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
http-addr.32.o: http-addr.c transcode.h debug.h
http-addrlist.32.o: http-addrlist.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
http-addrlist.32.o: http-addrlist.c globals.h string.h cups.h ppd.h array.h file.h language.h
http-addrlist.32.o: http-addrlist.c i18n.h transcode.h debug.h
http-support.32.o: http-support.c debug.h globals.h string.h ../config.h http-private.h http.h
http-support.32.o: http-support.c md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h
http-support.32.o: http-support.c language.h i18n.h transcode.h
ipp.32.o: ipp.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
ipp.32.o: ipp.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
ipp.32.o: ipp.c debug.h
ipp-support.32.o: ipp-support.c globals.h string.h ../config.h http-private.h http.h md5.h
ipp-support.32.o: ipp-support.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
ipp-support.32.o: ipp-support.c i18n.h transcode.h debug.h
langprintf.32.o: langprintf.c globals.h string.h ../config.h http-private.h http.h md5.h
langprintf.32.o: langprintf.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
langprintf.32.o: langprintf.c i18n.h transcode.h
language.32.o: language.c globals.h string.h ../config.h http-private.h http.h md5.h
language.32.o: language.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
language.32.o: language.c transcode.h debug.h
localize.32.o: localize.c globals.h string.h ../config.h http-private.h http.h md5.h
localize.32.o: localize.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
localize.32.o: localize.c transcode.h debug.h
mark.32.o: mark.c cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
mark.32.o: mark.c ../config.h debug.h
md5.32.o: md5.c md5.h string.h ../config.h
md5passwd.32.o: md5passwd.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
md5passwd.32.o: md5passwd.c string.h
notify.32.o: notify.c globals.h string.h ../config.h http-private.h http.h md5.h
notify.32.o: notify.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
notify.32.o: notify.c transcode.h
options.32.o: options.c cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
options.32.o: options.c ../config.h debug.h
page.32.o: page.c ppd.h array.h file.h string.h ../config.h
ppd.32.o: ppd.c globals.h string.h ../config.h http-private.h http.h md5.h
ppd.32.o: ppd.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
ppd.32.o: ppd.c transcode.h debug.h
request.32.o: request.c globals.h string.h ../config.h http-private.h http.h md5.h
request.32.o: request.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
request.32.o: request.c transcode.h debug.h
sidechannel.32.o: sidechannel.c sidechannel.h string.h ../config.h
snprintf.32.o: snprintf.c string.h ../config.h
string.32.o: string.c array.h debug.h string.h ../config.h
tempfile.32.o: tempfile.c globals.h string.h ../config.h http-private.h http.h md5.h
tempfile.32.o: tempfile.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
tempfile.32.o: tempfile.c transcode.h debug.h
transcode.32.o: transcode.c globals.h string.h ../config.h http-private.h http.h md5.h
transcode.32.o: transcode.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
transcode.32.o: transcode.c i18n.h transcode.h debug.h
usersys.32.o: usersys.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
usersys.32.o: usersys.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
usersys.32.o: usersys.c transcode.h debug.h
util.32.o: util.c globals.h string.h ../config.h http-private.h http.h md5.h
util.32.o: util.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
util.32.o: util.c transcode.h debug.h
testadmin.32.o: testadmin.c adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
testadmin.32.o: testadmin.c string.h ../config.h
testarray.32.o: testarray.c ../cups/string.h ../config.h string.h array.h dir.h debug.h
testcups.32.o: testcups.c cups.h ipp.h http.h ppd.h array.h file.h language.h
testfile.32.o: testfile.c string.h ../config.h file.h debug.h
testhttp.32.o: testhttp.c http.h string.h ../config.h
testi18n.32.o: testi18n.c i18n.h transcode.h language.h array.h string.h ../config.h
testipp.32.o: testipp.c ../cups/string.h ../config.h string.h ipp-private.h ipp.h http.h
testlang.32.o: testlang.c i18n.h transcode.h language.h array.h string.h ../config.h
testppd.32.o: testppd.c ../cups/string.h ../config.h string.h ppd.h array.h file.h
# DO NOT DELETE
adminutil.64.o: adminutil.c adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
adminutil.64.o: adminutil.c globals.h string.h ../config.h http-private.h md5.h
adminutil.64.o: adminutil.c ipp-private.h i18n.h transcode.h debug.h
array.64.o: array.c array.h string.h ../config.h debug.h
attr.64.o: attr.c ppd.h array.h file.h debug.h string.h ../config.h
auth.64.o: auth.c globals.h string.h ../config.h http-private.h http.h md5.h
auth.64.o: auth.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
auth.64.o: auth.c transcode.h debug.h
backchannel.64.o: backchannel.c cups.h ipp.h http.h ppd.h array.h file.h language.h
backend.64.o: backend.c backend.h string.h ../config.h
custom.64.o: custom.c globals.h string.h ../config.h http-private.h http.h md5.h
custom.64.o: custom.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
custom.64.o: custom.c transcode.h debug.h
dest.64.o: dest.c globals.h string.h ../config.h http-private.h http.h md5.h
dest.64.o: dest.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
dest.64.o: dest.c transcode.h
dir.64.o: dir.c dir.h string.h ../config.h debug.h
emit.64.o: emit.c ppd.h array.h file.h string.h ../config.h debug.h
encode.64.o: encode.c cups.h ipp.h http.h ppd.h array.h file.h language.h ipp-private.h
encode.64.o: encode.c string.h ../config.h debug.h
file.64.o: file.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
file.64.o: file.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
file.64.o: file.c debug.h
getifaddrs.64.o: getifaddrs.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
getputfile.64.o: getputfile.c globals.h string.h ../config.h http-private.h http.h md5.h
getputfile.64.o: getputfile.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
getputfile.64.o: getputfile.c i18n.h transcode.h debug.h
globals.64.o: globals.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
globals.64.o: globals.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
globals.64.o: globals.c transcode.h debug.h
http.64.o: http.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
http.64.o: http.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
http.64.o: http.c debug.h
http-addr.64.o: http-addr.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
http-addr.64.o: http-addr.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
http-addr.64.o: http-addr.c transcode.h debug.h
http-addrlist.64.o: http-addrlist.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
http-addrlist.64.o: http-addrlist.c globals.h string.h cups.h ppd.h array.h file.h language.h
http-addrlist.64.o: http-addrlist.c i18n.h transcode.h debug.h
http-support.64.o: http-support.c debug.h globals.h string.h ../config.h http-private.h http.h
http-support.64.o: http-support.c md5.h ipp-private.h ipp.h cups.h ppd.h array.h file.h
http-support.64.o: http-support.c language.h i18n.h transcode.h
ipp.64.o: ipp.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
ipp.64.o: ipp.c string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
ipp.64.o: ipp.c debug.h
ipp-support.64.o: ipp-support.c globals.h string.h ../config.h http-private.h http.h md5.h
ipp-support.64.o: ipp-support.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
ipp-support.64.o: ipp-support.c i18n.h transcode.h debug.h
langprintf.64.o: langprintf.c globals.h string.h ../config.h http-private.h http.h md5.h
langprintf.64.o: langprintf.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
langprintf.64.o: langprintf.c i18n.h transcode.h
language.64.o: language.c globals.h string.h ../config.h http-private.h http.h md5.h
language.64.o: language.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
language.64.o: language.c transcode.h debug.h
localize.64.o: localize.c globals.h string.h ../config.h http-private.h http.h md5.h
localize.64.o: localize.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
localize.64.o: localize.c transcode.h debug.h
mark.64.o: mark.c cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
mark.64.o: mark.c ../config.h debug.h
md5.64.o: md5.c md5.h string.h ../config.h
md5passwd.64.o: md5passwd.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
md5passwd.64.o: md5passwd.c string.h
notify.64.o: notify.c globals.h string.h ../config.h http-private.h http.h md5.h
notify.64.o: notify.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
notify.64.o: notify.c transcode.h
options.64.o: options.c cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
options.64.o: options.c ../config.h debug.h
page.64.o: page.c ppd.h array.h file.h string.h ../config.h
ppd.64.o: ppd.c globals.h string.h ../config.h http-private.h http.h md5.h
ppd.64.o: ppd.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
ppd.64.o: ppd.c transcode.h debug.h
request.64.o: request.c globals.h string.h ../config.h http-private.h http.h md5.h
request.64.o: request.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
request.64.o: request.c transcode.h debug.h
sidechannel.64.o: sidechannel.c sidechannel.h string.h ../config.h
snprintf.64.o: snprintf.c string.h ../config.h
string.64.o: string.c array.h debug.h string.h ../config.h
tempfile.64.o: tempfile.c globals.h string.h ../config.h http-private.h http.h md5.h
tempfile.64.o: tempfile.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
tempfile.64.o: tempfile.c transcode.h debug.h
transcode.64.o: transcode.c globals.h string.h ../config.h http-private.h http.h md5.h
transcode.64.o: transcode.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
transcode.64.o: transcode.c i18n.h transcode.h debug.h
usersys.64.o: usersys.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
usersys.64.o: usersys.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
usersys.64.o: usersys.c transcode.h debug.h
util.64.o: util.c globals.h string.h ../config.h http-private.h http.h md5.h
util.64.o: util.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
util.64.o: util.c transcode.h debug.h
testadmin.64.o: testadmin.c adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
testadmin.64.o: testadmin.c string.h ../config.h
testarray.64.o: testarray.c ../cups/string.h ../config.h string.h array.h dir.h debug.h
testcups.64.o: testcups.c cups.h ipp.h http.h ppd.h array.h file.h language.h
testfile.64.o: testfile.c string.h ../config.h file.h debug.h
testhttp.64.o: testhttp.c http.h string.h ../config.h
testi18n.64.o: testi18n.c i18n.h transcode.h language.h array.h string.h ../config.h
testipp.64.o: testipp.c ../cups/string.h ../config.h string.h ipp-private.h ipp.h http.h
testlang.64.o: testlang.c i18n.h transcode.h language.h array.h string.h ../config.h
testppd.64.o: testppd.c ../cups/string.h ../config.h string.h ppd.h array.h file.h
+2 -2
Ver Arquivo
@@ -144,8 +144,8 @@ depend:
makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1
$(RM) Dependencies
cp Dependencies.tmp Dependencies
sed -r -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
sed -r -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies
sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies
$(RM) Dependencies.tmp
+7 -7
Ver Arquivo
@@ -386,7 +386,7 @@ cupsAdminCreateWindowsPPD(
{
write_option(dstfp, jclorder ++, "cupsJobSheetsStart", "Start Banner",
"job-sheets", suppattr, defattr, 0, 2);
write_option(dstfp, jclorder ++, "cupsJobSheetsEnd", "End Banner",
write_option(dstfp, jclorder, "cupsJobSheetsEnd", "End Banner",
"job-sheets", suppattr, defattr, 1, 2);
}
@@ -961,7 +961,7 @@ _cupsAdminGetServerSettings(
if (!value && strncmp(line, "</", 2))
value = line + strlen(line);
if (!strcasecmp(line, "Port") || !strcasecmp(line, "Listen"))
if ((!strcasecmp(line, "Port") || !strcasecmp(line, "Listen")) && value)
{
char *port; /* Pointer to port number, if any */
@@ -1017,7 +1017,7 @@ _cupsAdminGetServerSettings(
{
in_policy = 0;
}
else if (!strcasecmp(line, "<Limit") && in_policy)
else if (!strcasecmp(line, "<Limit") && in_policy && value)
{
/*
* See if the policy limit is for the Cancel-Job operation...
@@ -1050,7 +1050,7 @@ _cupsAdminGetServerSettings(
{
cancel_policy = 0;
}
else if (!strcasecmp(line, "<Location"))
else if (!strcasecmp(line, "<Location") && value)
{
in_admin_location = !strcasecmp(value, "/admin");
in_location = 1;
@@ -1060,7 +1060,7 @@ _cupsAdminGetServerSettings(
in_admin_location = 0;
in_location = 0;
}
else if (!strcasecmp(line, "Allow") &&
else if (!strcasecmp(line, "Allow") && value &&
strcasecmp(value, "localhost") && strcasecmp(value, "127.0.0.1")
#ifdef AF_LOCAL
&& *value != '/'
@@ -1224,8 +1224,8 @@ _cupsAdminSetServerSettings(
* Get the cupsd.conf file...
*/
if ((status = get_cupsd_conf(http, cg, 0, cupsdconf, sizeof(cupsdconf),
&remote)) == HTTP_OK)
if (get_cupsd_conf(http, cg, 0, cupsdconf, sizeof(cupsdconf),
&remote) == HTTP_OK)
{
if ((cupsd = cupsFileOpen(cupsdconf, "r")) == NULL)
{
+3 -4
Ver Arquivo
@@ -270,8 +270,7 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
if (http->gssctx != GSS_C_NO_CONTEXT)
{
major_status = gss_delete_sec_context(&minor_status, &http->gssctx,
GSS_C_NO_BUFFER);
gss_delete_sec_context(&minor_status, &http->gssctx, GSS_C_NO_BUFFER);
http->gssctx = GSS_C_NO_CONTEXT;
}
@@ -323,14 +322,14 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
httpEncode64_2(http->authstring + 10, authsize - 10, output_token.value,
output_token.length);
major_status = gss_release_buffer(&minor_status, &output_token);
gss_release_buffer(&minor_status, &output_token);
}
else
{
DEBUG_printf(("cupsDoAuthentication: Kerberos credentials too large - "
"%d bytes!\n", output_token.length));
major_status = gss_release_buffer(&minor_status, &output_token);
gss_release_buffer(&minor_status, &output_token);
return (-1);
}
+2 -2
Ver Arquivo
@@ -59,10 +59,10 @@ extern "C" {
* Constants...
*/
# define CUPS_VERSION 1.0307
# define CUPS_VERSION 1.0310
# define CUPS_VERSION_MAJOR 1
# define CUPS_VERSION_MINOR 3
# define CUPS_VERSION_PATCH 7
# define CUPS_VERSION_PATCH 10
# define CUPS_DATE_ANY -1
+11 -3
Ver Arquivo
@@ -4,7 +4,7 @@
* User-defined destination (and option) support for the Common UNIX
* Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -89,7 +89,7 @@ cupsAddDest(const char *name, /* I - Destination name */
if (!name || !dests)
return (0);
if ((dest = cupsGetDest(name, instance, num_dests, *dests)) != NULL)
if (cupsGetDest(name, instance, num_dests, *dests))
return (num_dests);
/*
@@ -331,7 +331,15 @@ cupsGetDests2(http_t *http, /* I - HTTP connection */
*/
num_dests = cups_get_sdests(http, CUPS_GET_PRINTERS, num_dests, dests);
num_dests = cups_get_sdests(http, CUPS_GET_CLASSES, num_dests, dests);
if (cupsLastError() < IPP_REDIRECTION_OTHER_SITE)
num_dests = cups_get_sdests(http, CUPS_GET_CLASSES, num_dests, dests);
if (cupsLastError() >= IPP_REDIRECTION_OTHER_SITE)
{
cupsFreeDests(num_dests, *dests);
*dests = (cups_dest_t *)0;
return (0);
}
/*
* Make a copy of the "real" queues for a later sanity check...
+202 -29
Ver Arquivo
@@ -3,7 +3,7 @@
*
* PPD code emission routines for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2008 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -18,19 +18,21 @@
*
* Contents:
*
* ppdCollect() - Collect all marked options that reside in the
* specified section.
* ppdCollect2() - Collect all marked options that reside in the
* specified section and minimum order.
* ppdEmit() - Emit code for marked options to a file.
* ppdEmitAfterOrder() - Emit a subset of the code for marked options to a
* file.
* ppdEmitFd() - Emit code for marked options to a file.
* ppdEmitJCL() - Emit code for JCL options to a file.
* ppdEmitJCLEnd() - Emit JCLEnd code to a file.
* ppdEmitString() - Get a string containing the code for marked options.
* ppd_handle_media() - Handle media selection...
* ppd_sort() - Sort options by ordering numbers...
* ppdCollect() - Collect all marked options that reside in the
* specified section.
* ppdCollect2() - Collect all marked options that reside in the
* specified section and minimum order.
* ppdEmit() - Emit code for marked options to a file.
* ppdEmitAfterOrder() - Emit a subset of the code for marked options to a
* file.
* ppdEmitFd() - Emit code for marked options to a file.
* ppdEmitJCL() - Emit code for JCL options to a file.
* ppdEmitJCLEnd() - Emit JCLEnd code to a file.
* ppdEmitString() - Get a string containing the code for marked
* options.
* ppd_compare_cparams() - Compare the order of two custom parameters.
* ppd_handle_media() - Handle media selection...
* ppd_sort() - Sort options by ordering numbers...
*/
/*
@@ -54,6 +56,7 @@
* Local functions...
*/
static int ppd_compare_cparams(ppd_cparam_t *a, ppd_cparam_t *b);
static void ppd_handle_media(ppd_file_t *ppd);
static int ppd_sort(ppd_choice_t **c1, ppd_choice_t **c2);
@@ -330,7 +333,8 @@ ppdEmitJCL(ppd_file_t *ppd, /* I - PPD file record */
const char *title) /* I - Title */
{
char *ptr; /* Pointer into JCL string */
char temp[81]; /* Local title string */
char temp[65], /* Local title string */
displaymsg[33]; /* Local display string */
/*
@@ -397,14 +401,39 @@ ppdEmitJCL(ppd_file_t *ppd, /* I - PPD file record */
}
/*
* Eliminate any path info from the job title...
* Clean up the job title...
*/
if ((ptr = strrchr(title, '/')) != NULL)
{
/*
* Only show basename of file path...
*/
title = ptr + 1;
}
if (!strncmp(title, "smbprn.", 7))
{
/*
* Skip leading smbprn.######## from Samba jobs...
*/
for (title += 7; *title && isdigit(*title & 255); title ++);
for (; *title && isspace(*title & 255); title ++);
if ((ptr = strstr(title, " - ")) != NULL)
{
/*
* Skip application name in "Some Application - Title of job"...
*/
title = ptr + 3;
}
}
/*
* Replace double quotes with single quotes and 8-bit characters with
* Replace double quotes with single quotes and UTF-8 characters with
* question marks so that the title does not cause a PJL syntax error.
*/
@@ -413,16 +442,24 @@ ppdEmitJCL(ppd_file_t *ppd, /* I - PPD file record */
for (ptr = temp; *ptr; ptr ++)
if (*ptr == '\"')
*ptr = '\'';
else if (charset && (*ptr & 128))
else if (!charset && (*ptr & 128))
*ptr = '?';
/*
* CUPS STR #3125: Long PJL JOB NAME causes problems with some printers
*
* Generate the display message, truncating at 32 characters + nul to avoid
* issues with some printer's PJL implementations...
*/
snprintf(displaymsg, sizeof(displaymsg), "%d %s %s", job_id, user, temp);
/*
* Send PJL JOB and PJL RDYMSG commands before we enter PostScript mode...
*/
fprintf(fp, "@PJL JOB NAME = \"%s\" DISPLAY = \"%d %s %s\"\n", temp,
job_id, user, temp);
fprintf(fp, "@PJL RDYMSG DISPLAY = \"%d %s %s\"\n", job_id, user, temp);
fprintf(fp, "@PJL JOB NAME = \"%s\" DISPLAY = \"%s\"\n", temp, displaymsg);
fprintf(fp, "@PJL RDYMSG DISPLAY = \"%s\"\n", displaymsg);
}
else
fputs(ppd->jcl_begin, fp);
@@ -475,7 +512,7 @@ ppdEmitJCLEnd(ppd_file_t *ppd, /* I - PPD file record */
*/
fputs("\033%-12345X@PJL\n", fp);
fputs("@PJL RDYMSG DISPLAY = \"READY\"\n", fp);
fputs("@PJL RDYMSG DISPLAY = \"\"\n", fp);
fputs(ppd->jcl_end + 9, fp);
}
else
@@ -547,7 +584,40 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
for (i = 0, bufsize = 1; i < count; i ++)
{
if (section != PPD_ORDER_EXIT && section != PPD_ORDER_JCL)
if (section == PPD_ORDER_JCL)
{
if (!strcasecmp(choices[i]->choice, "Custom") &&
(coption = ppdFindCustomOption(ppd, choices[i]->option->keyword))
!= NULL)
{
/*
* Add space to account for custom parameter substitution...
*/
for (cparam = (ppd_cparam_t *)cupsArrayFirst(coption->params);
cparam;
cparam = (ppd_cparam_t *)cupsArrayNext(coption->params))
{
switch (cparam->type)
{
case PPD_CUSTOM_CURVE :
case PPD_CUSTOM_INVCURVE :
case PPD_CUSTOM_POINTS :
case PPD_CUSTOM_REAL :
case PPD_CUSTOM_INT :
bufsize += 10;
break;
case PPD_CUSTOM_PASSCODE :
case PPD_CUSTOM_PASSWORD :
case PPD_CUSTOM_STRING :
bufsize += strlen(cparam->current.custom_string);
break;
}
}
}
}
else if (section != PPD_ORDER_EXIT)
{
bufsize += 3; /* [{\n */
@@ -626,7 +696,89 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
*/
for (i = 0, bufptr = buffer; i < count; i ++, bufptr += strlen(bufptr))
if (section != PPD_ORDER_EXIT && section != PPD_ORDER_JCL)
if (section == PPD_ORDER_JCL)
{
if (!strcasecmp(choices[i]->choice, "Custom") &&
(coption = ppdFindCustomOption(ppd, choices[i]->option->keyword))
!= NULL)
{
/*
* Handle substitutions in custom JCL options...
*/
char *cptr; /* Pointer into code */
int pnum; /* Parameter number */
for (cptr = choices[i]->code; *cptr && bufptr < bufend;)
{
if (*cptr == '\\')
{
cptr ++;
if (isdigit(*cptr & 255))
{
/*
* Substitute parameter...
*/
pnum = *cptr++ - '0';
while (isalnum(*cptr & 255))
pnum = pnum * 10 + *cptr - '0';
for (cparam = (ppd_cparam_t *)cupsArrayFirst(coption->params);
cparam;
cparam = (ppd_cparam_t *)cupsArrayNext(coption->params))
if (cparam->order == pnum)
break;
if (cparam)
{
switch (cparam->type)
{
case PPD_CUSTOM_CURVE :
case PPD_CUSTOM_INVCURVE :
case PPD_CUSTOM_POINTS :
case PPD_CUSTOM_REAL :
bufptr = _cupsStrFormatd(bufptr, bufend,
cparam->current.custom_real,
loc);
break;
case PPD_CUSTOM_INT :
snprintf(bufptr, bufend - bufptr, "%d",
cparam->current.custom_int);
bufptr += strlen(bufptr);
break;
case PPD_CUSTOM_PASSCODE :
case PPD_CUSTOM_PASSWORD :
case PPD_CUSTOM_STRING :
strlcpy(bufptr, cparam->current.custom_string,
bufend - bufptr);
bufptr += strlen(bufptr);
break;
}
}
}
else if (*cptr)
*bufptr++ = *cptr++;
}
else
*bufptr++ = *cptr++;
}
}
else
{
/*
* Otherwise just copy the option code directly...
*/
strlcpy(bufptr, choices[i]->code, bufend - bufptr + 1);
bufptr += strlen(bufptr);
}
}
else if (section != PPD_ORDER_EXIT)
{
/*
* Add wrapper commands to prevent printer errors for unsupported
@@ -759,8 +911,7 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
}
}
else if (!strcasecmp(choices[i]->choice, "Custom") &&
(coption = ppdFindCustomOption(ppd,
choices[i]->option->keyword))
(coption = ppdFindCustomOption(ppd, choices[i]->option->keyword))
!= NULL)
{
/*
@@ -768,15 +919,23 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
*/
const char *s; /* Pointer into string value */
cups_array_t *params; /* Parameters in the correct output order */
params = cupsArrayNew((cups_array_func_t)ppd_compare_cparams, NULL);
for (cparam = (ppd_cparam_t *)cupsArrayFirst(coption->params);
cparam;
cparam = (ppd_cparam_t *)cupsArrayNext(coption->params))
cupsArrayAdd(params, cparam);
snprintf(bufptr, bufend - bufptr + 1,
"%%%%BeginFeature: *Custom%s True\n", coption->keyword);
bufptr += strlen(bufptr);
for (cparam = (ppd_cparam_t *)cupsArrayFirst(coption->params);
for (cparam = (ppd_cparam_t *)cupsArrayFirst(params);
cparam;
cparam = (ppd_cparam_t *)cupsArrayNext(coption->params))
cparam = (ppd_cparam_t *)cupsArrayNext(params))
{
switch (cparam->type)
{
@@ -814,6 +973,8 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
break;
}
}
cupsArrayDelete(params);
}
else
{
@@ -857,12 +1018,24 @@ ppdEmitString(ppd_file_t *ppd, /* I - PPD file record */
}
/*
* 'ppd_compare_cparams()' - Compare the order of two custom parameters.
*/
static int /* O - Result of comparison */
ppd_compare_cparams(ppd_cparam_t *a, /* I - First parameter */
ppd_cparam_t *b) /* I - Second parameter */
{
return (a->order - b->order);
}
/*
* 'ppd_handle_media()' - Handle media selection...
*/
static void
ppd_handle_media(ppd_file_t *ppd)
ppd_handle_media(ppd_file_t *ppd) /* I - PPD file */
{
ppd_choice_t *manual_feed, /* ManualFeed choice, if any */
*input_slot, /* InputSlot choice, if any */
+5 -4
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Option encoding routines for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2008 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -51,6 +51,7 @@ static const _ipp_option_t ipp_options[] =
{ 0, "brightness-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "columns", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "columns-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "compression", IPP_TAG_KEYWORD, IPP_TAG_OPERATION },
{ 0, "copies", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "copies-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "document-format", IPP_TAG_MIMETYPE, IPP_TAG_OPERATION },
@@ -63,10 +64,10 @@ static const _ipp_option_t ipp_options[] =
{ 0, "gamma-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "hue", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "hue-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "job-k-limit", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "job-page-limit", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "job-k-limit", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "job-page-limit", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "job-priority", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "job-quota-period", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "job-quota-period", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 1, "job-sheets", IPP_TAG_NAME, IPP_TAG_JOB },
{ 1, "job-sheets-default", IPP_TAG_NAME, IPP_TAG_PRINTER },
{ 0, "job-uuid", IPP_TAG_URI, IPP_TAG_JOB },
+158 -84
Ver Arquivo
@@ -110,7 +110,8 @@ struct _cups_file_s /**** CUPS file structure... ****/
buf[4096], /* Buffer */
*ptr, /* Pointer into buffer */
*end; /* End of buffer data */
off_t pos; /* File position for start of buffer */
off_t pos, /* Position in file */
bufpos; /* File position for start of buffer */
#ifdef HAVE_LIBZ
z_stream stream; /* (De)compression stream */
@@ -402,13 +403,14 @@ cupsFileFlush(cups_file_t *fp) /* I - CUPS file */
if (!fp || fp->mode != 'w')
{
DEBUG_puts(" Attempt to flush a read-only file...");
DEBUG_puts("cupsFileFlush: Attempt to flush a read-only file...");
return (-1);
}
bytes = (ssize_t)(fp->ptr - fp->buf);
DEBUG_printf((" Flushing %ld bytes...\n", (long)bytes));
DEBUG_printf(("cupsFileFlush: Flushing " CUPS_LLFMT " bytes...\n",
CUPS_LLCAST bytes));
if (bytes > 0)
{
@@ -440,6 +442,8 @@ cupsFileGetChar(cups_file_t *fp) /* I - CUPS file */
* Range check input...
*/
DEBUG_printf(("cupsFileGetChar(fp=%p)\n", fp));
if (!fp || (fp->mode != 'r' && fp->mode != 's'))
{
DEBUG_puts("cupsFileGetChar: Bad arguments!");
@@ -463,6 +467,10 @@ cupsFileGetChar(cups_file_t *fp) /* I - CUPS file */
DEBUG_printf(("cupsFileGetChar: Returning %d...\n", *(fp->ptr) & 255));
fp->pos ++;
DEBUG_printf(("cupsFileGetChar: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return (*(fp->ptr)++ & 255);
}
@@ -485,6 +493,10 @@ cupsFileGetConf(cups_file_t *fp, /* I - CUPS file */
* Range check input...
*/
DEBUG_printf(("cupsFileGetConf(fp=%p, buf=%p, buflen=" CUPS_LLFMT
", value=%p, linenum=%p)\n", fp, buf, CUPS_LLCAST buflen,
value, linenum));
if (!fp || (fp->mode != 'r' && fp->mode != 's') ||
!buf || buflen < 2 || !value)
{
@@ -623,6 +635,9 @@ cupsFileGetLine(cups_file_t *fp, /* I - File to read from */
* Range check input...
*/
DEBUG_printf(("cupsFileGetLine(fp=%p, buf=%p, buflen=" CUPS_LLFMT ")\n",
fp, buf, CUPS_LLCAST buflen));
if (!fp || (fp->mode != 'r' && fp->mode != 's') || !buf || buflen < 3)
return (0);
@@ -637,6 +652,7 @@ cupsFileGetLine(cups_file_t *fp, /* I - File to read from */
break;
*ptr++ = ch = *(fp->ptr)++;
fp->pos ++;
if (ch == '\r')
{
@@ -649,7 +665,10 @@ cupsFileGetLine(cups_file_t *fp, /* I - File to read from */
break;
if (*(fp->ptr) == '\n')
{
*ptr++ = *(fp->ptr)++;
fp->pos ++;
}
break;
}
@@ -665,6 +684,8 @@ cupsFileGetLine(cups_file_t *fp, /* I - File to read from */
*ptr = '\0';
DEBUG_printf(("cupsFileGetLine: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return (ptr - buf);
}
@@ -687,6 +708,9 @@ cupsFileGets(cups_file_t *fp, /* I - CUPS file */
* Range check input...
*/
DEBUG_printf(("cupsFileGets(fp=%p, buf=%p, buflen=" CUPS_LLFMT ")\n", fp, buf,
CUPS_LLCAST buflen));
if (!fp || (fp->mode != 'r' && fp->mode != 's') || !buf || buflen < 2)
return (NULL);
@@ -706,6 +730,7 @@ cupsFileGets(cups_file_t *fp, /* I - CUPS file */
}
ch = *(fp->ptr)++;
fp->pos ++;
if (ch == '\r')
{
@@ -718,7 +743,10 @@ cupsFileGets(cups_file_t *fp, /* I - CUPS file */
break;
if (*(fp->ptr) == '\n')
fp->ptr ++;
{
fp->ptr ++;
fp->pos ++;
}
break;
}
@@ -736,6 +764,8 @@ cupsFileGets(cups_file_t *fp, /* I - CUPS file */
*ptr = '\0';
DEBUG_printf(("cupsFileGets: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return (buf);
}
@@ -801,7 +831,8 @@ cupsFileOpen(const char *filename, /* I - Name of file */
*/
if (!filename || !mode ||
(*mode != 'r' && *mode != 'w' && *mode != 'a' && *mode != 's'))
(*mode != 'r' && *mode != 'w' && *mode != 'a' && *mode != 's') ||
(*mode == 'a' && isdigit(mode[1] & 255)))
return (NULL);
/*
@@ -893,7 +924,8 @@ cupsFileOpenFd(int fd, /* I - File descriptor */
*/
if (fd < 0 || !mode ||
(*mode != 'r' && *mode != 'w' && *mode != 'a' && *mode != 's'))
(*mode != 'r' && *mode != 'w' && *mode != 'a' && *mode != 's') ||
(*mode == 'a' && isdigit(mode[1] & 255)))
return (NULL);
/*
@@ -911,8 +943,10 @@ cupsFileOpenFd(int fd, /* I - File descriptor */
switch (*mode)
{
case 'w' :
case 'a' :
fp->pos = lseek(fd, 0, SEEK_END);
case 'w' :
fp->mode = 'w';
fp->ptr = fp->buf;
fp->end = fp->buf + sizeof(fp->buf);
@@ -1039,7 +1073,16 @@ cupsFilePrintf(cups_file_t *fp, /* I - CUPS file */
return (-1);
if (fp->mode == 's')
return (cups_write(fp, buf, bytes));
{
if (cups_write(fp, buf, bytes) < 0)
return (-1);
fp->pos += bytes;
DEBUG_printf(("cupsFilePrintf: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return (bytes);
}
if ((fp->ptr + bytes) > fp->end)
if (cupsFileFlush(fp))
@@ -1047,6 +1090,8 @@ cupsFilePrintf(cups_file_t *fp, /* I - CUPS file */
fp->pos += bytes;
DEBUG_printf(("cupsFilePrintf: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
if (bytes > sizeof(fp->buf))
{
#ifdef HAVE_LIBZ
@@ -1109,6 +1154,8 @@ cupsFilePutChar(cups_file_t *fp, /* I - CUPS file */
fp->pos ++;
DEBUG_printf(("cupsFilePutChar: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return (0);
}
@@ -1144,6 +1191,8 @@ cupsFilePuts(cups_file_t *fp, /* I - CUPS file */
fp->pos += bytes;
DEBUG_printf(("cupsFilePuts: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return (bytes);
}
@@ -1153,6 +1202,8 @@ cupsFilePuts(cups_file_t *fp, /* I - CUPS file */
fp->pos += bytes;
DEBUG_printf(("cupsFilePuts: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
if (bytes > sizeof(fp->buf))
{
#ifdef HAVE_LIBZ
@@ -1184,8 +1235,8 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
ssize_t count; /* Bytes read */
DEBUG_printf(("cupsFileRead(fp=%p, buf=%p, bytes=%ld)\n", fp, buf,
(long)bytes));
DEBUG_printf(("cupsFileRead(fp=%p, buf=%p, bytes=" CUPS_LLFMT ")\n", fp, buf,
CUPS_LLCAST bytes));
/*
* Range check input...
@@ -1207,7 +1258,8 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
if (fp->ptr >= fp->end)
if (cups_fill(fp) <= 0)
{
DEBUG_printf((" cups_fill() returned -1, total=%d\n", (int)total));
DEBUG_printf(("cupsFileRead: cups_fill() returned -1, total=" CUPS_LLFMT "\n",
CUPS_LLCAST total));
if (total > 0)
return ((ssize_t)total);
@@ -1221,6 +1273,9 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
memcpy(buf, fp->ptr, count);
fp->ptr += count;
fp->pos += count;
DEBUG_printf(("cupsFileRead: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
/*
* Update the counts for the last read...
@@ -1235,7 +1290,7 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
* Return the total number of bytes read...
*/
DEBUG_printf((" total=%d\n", (int)total));
DEBUG_printf(("cupsFileRead: total=%d\n", (int)total));
return ((ssize_t)total);
}
@@ -1252,6 +1307,9 @@ cupsFileRewind(cups_file_t *fp) /* I - CUPS file */
* Range check input...
*/
DEBUG_printf(("cupsFileRewind(fp=%p)\n", fp));
DEBUG_printf(("cupsFileRewind: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
if (!fp || fp->mode != 'r')
return (-1);
@@ -1259,18 +1317,22 @@ cupsFileRewind(cups_file_t *fp) /* I - CUPS file */
* Handle special cases...
*/
if (fp->pos == 0)
if (fp->bufpos == 0)
{
/*
* No seeking necessary...
*/
fp->pos = 0;
if (fp->ptr)
{
fp->ptr = fp->buf;
fp->eof = 0;
}
DEBUG_printf(("cupsFileRewind: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return (0);
}
@@ -1288,10 +1350,13 @@ cupsFileRewind(cups_file_t *fp) /* I - CUPS file */
lseek(fp->fd, 0, SEEK_SET);
fp->pos = 0;
fp->ptr = NULL;
fp->end = NULL;
fp->eof = 0;
fp->bufpos = 0;
fp->pos = 0;
fp->ptr = NULL;
fp->end = NULL;
fp->eof = 0;
DEBUG_printf(("cupsFileRewind: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return (0);
}
@@ -1308,9 +1373,10 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
ssize_t bytes; /* Number bytes in buffer */
DEBUG_printf(("cupsFileSeek(fp=%p, pos=" CUPS_LLFMT ")\n", fp, pos));
DEBUG_printf((" fp->pos=" CUPS_LLFMT "\n", fp->pos));
DEBUG_printf((" fp->ptr=%p, fp->end=%p\n", fp->ptr, fp->end));
DEBUG_printf(("cupsFileSeek(fp=%p, pos=" CUPS_LLFMT ")\n", fp,
CUPS_LLCAST pos));
DEBUG_printf(("cupsFileSeek: fp->pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
DEBUG_printf(("cupsFileSeek: fp->ptr=%p, fp->end=%p\n", fp->ptr, fp->end));
/*
* Range check input...
@@ -1326,19 +1392,22 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
if (pos == 0)
return (cupsFileRewind(fp));
if (fp->pos == pos)
if (fp->ptr)
{
/*
* No seeking necessary...
*/
bytes = (ssize_t)(fp->end - fp->buf);
if (fp->ptr)
if (pos >= fp->bufpos && pos < (fp->bufpos + bytes))
{
fp->ptr = fp->buf;
fp->eof = 0;
}
/*
* No seeking necessary...
*/
return (pos);
fp->pos = pos;
fp->ptr = fp->buf + pos - fp->bufpos;
fp->eof = 0;
return (pos);
}
}
#ifdef HAVE_LIBZ
@@ -1354,26 +1423,20 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
#endif /* HAVE_LIBZ */
/*
* Figure out the number of bytes in the current buffer, and then
* see if we are outside of it...
* Seek forwards or backwards...
*/
if (fp->ptr)
bytes = (ssize_t)(fp->end - fp->buf);
else
bytes = 0;
fp->eof = 0;
DEBUG_printf((" bytes=" CUPS_LLFMT "\n", CUPS_LLCAST bytes));
DEBUG_printf(("cupsFileSeek: bytes=" CUPS_LLFMT "\n", CUPS_LLCAST bytes));
if (pos < fp->pos)
if (pos < fp->bufpos)
{
/*
* Need to seek backwards...
*/
DEBUG_puts(" SEEK BACKWARDS");
DEBUG_puts("cupsFileSeek: SEEK BACKWARDS");
#ifdef HAVE_LIBZ
if (fp->compressed)
@@ -1381,72 +1444,70 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
inflateEnd(&fp->stream);
lseek(fp->fd, 0, SEEK_SET);
fp->pos = 0;
fp->ptr = NULL;
fp->end = NULL;
fp->bufpos = 0;
fp->pos = 0;
fp->ptr = NULL;
fp->end = NULL;
while ((bytes = cups_fill(fp)) > 0)
if (pos >= fp->pos && pos < (fp->pos + bytes))
if (pos >= fp->bufpos && pos < (fp->bufpos + bytes))
break;
if (bytes <= 0)
return (-1);
fp->ptr = fp->buf + pos - fp->pos;
fp->ptr = fp->buf + pos - fp->bufpos;
fp->pos = pos;
}
else
#endif /* HAVE_LIBZ */
{
fp->pos = lseek(fp->fd, pos, SEEK_SET);
fp->ptr = NULL;
fp->end = NULL;
fp->bufpos = lseek(fp->fd, pos, SEEK_SET);
fp->pos = fp->bufpos;
fp->ptr = NULL;
fp->end = NULL;
DEBUG_printf((" lseek() returned %ld...\n", (long)fp->pos));
DEBUG_printf(("cupsFileSeek: lseek() returned " CUPS_LLFMT "...\n",
CUPS_LLCAST fp->pos));
}
}
else if (pos >= (fp->pos + bytes))
else
{
/*
* Need to seek forwards...
*/
DEBUG_puts(" SEEK FORWARDS");
DEBUG_puts("cupsFileSeek: SEEK FORWARDS");
#ifdef HAVE_LIBZ
if (fp->compressed)
{
while ((bytes = cups_fill(fp)) > 0)
{
if (pos >= fp->pos && pos < (fp->pos + bytes))
if (pos >= fp->bufpos && pos < (fp->bufpos + bytes))
break;
}
if (bytes <= 0)
return (-1);
fp->ptr = fp->buf + pos - fp->pos;
fp->ptr = fp->buf + pos - fp->bufpos;
fp->pos = pos;
}
else
#endif /* HAVE_LIBZ */
{
fp->pos = lseek(fp->fd, pos, SEEK_SET);
fp->ptr = NULL;
fp->end = NULL;
fp->bufpos = lseek(fp->fd, pos, SEEK_SET);
fp->pos = fp->bufpos;
fp->ptr = NULL;
fp->end = NULL;
DEBUG_printf((" lseek() returned " CUPS_LLFMT "...\n", fp->pos));
DEBUG_printf(("cupsFileSeek: lseek() returned " CUPS_LLFMT "...\n",
CUPS_LLCAST fp->pos));
}
}
else
{
/*
* Just reposition the current pointer, since we have the right
* range...
*/
DEBUG_puts(" SEEK INSIDE BUFFER");
fp->ptr = fp->buf + pos - fp->pos;
}
DEBUG_printf(("cupsFileSeek: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return (fp->pos);
}
@@ -1555,6 +1616,9 @@ cupsFileStdout(void)
off_t /* O - File position */
cupsFileTell(cups_file_t *fp) /* I - CUPS file */
{
DEBUG_printf(("cupsFileTell(fp=%p)\n", fp));
DEBUG_printf(("cupsFileTell: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return (fp ? fp->pos : 0);
}
@@ -1570,6 +1634,8 @@ cupsFileUnlock(cups_file_t *fp) /* I - File to lock */
* Range check...
*/
DEBUG_printf(("cupsFileUnlock(fp=%p)\n", fp));
if (!fp || fp->mode == 's')
return (-1);
@@ -1598,6 +1664,9 @@ cupsFileWrite(cups_file_t *fp, /* I - CUPS file */
* Range check input...
*/
DEBUG_printf(("cupsFileWrite(fp=%p, buf=%p, bytes=" CUPS_LLFMT ")\n",
fp, buf, CUPS_LLCAST bytes));
if (!fp || !buf || bytes < 0 || (fp->mode != 'w' && fp->mode != 's'))
return (-1);
@@ -1615,6 +1684,8 @@ cupsFileWrite(cups_file_t *fp, /* I - CUPS file */
fp->pos += (off_t)bytes;
DEBUG_printf(("cupsFileWrite: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
return ((ssize_t)bytes);
}
@@ -1624,6 +1695,8 @@ cupsFileWrite(cups_file_t *fp, /* I - CUPS file */
fp->pos += (off_t)bytes;
DEBUG_printf(("cupsFileWrite: pos=" CUPS_LLFMT "\n", CUPS_LLCAST fp->pos));
if (bytes > sizeof(fp->buf))
{
#ifdef HAVE_LIBZ
@@ -1652,8 +1725,8 @@ cups_compress(cups_file_t *fp, /* I - CUPS file */
const char *buf, /* I - Buffer */
size_t bytes) /* I - Number bytes */
{
DEBUG_printf(("cups_compress(fp=%p, buf=%p, bytes=%ld)\n", fp, buf,
(long)bytes));
DEBUG_printf(("cups_compress(fp=%p, buf=%p, bytes=" CUPS_LLFMT "\n", fp, buf,
CUPS_LLCAST bytes));
/*
* Update the CRC...
@@ -1674,8 +1747,8 @@ cups_compress(cups_file_t *fp, /* I - CUPS file */
* Flush the current buffer...
*/
DEBUG_printf((" avail_in=%d, avail_out=%d\n", fp->stream.avail_in,
fp->stream.avail_out));
DEBUG_printf(("cups_compress: avail_in=%d, avail_out=%d\n",
fp->stream.avail_in, fp->stream.avail_out));
if (fp->stream.avail_out < (int)(sizeof(fp->cbuf) / 8))
{
@@ -1710,19 +1783,15 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
DEBUG_printf(("cups_fill(fp=%p)\n", fp));
DEBUG_printf((" fp->ptr=%p, fp->end=%p, fp->buf=%p, "
"fp->pos=" CUPS_LLFMT ", fp->eof=%d\n",
fp->ptr, fp->end, fp->buf, fp->pos, fp->eof));
/*
* Update the "pos" element as needed...
*/
DEBUG_printf(("cups_fill: fp->ptr=%p, fp->end=%p, fp->buf=%p, "
"fp->bufpos=" CUPS_LLFMT ", fp->eof=%d\n",
fp->ptr, fp->end, fp->buf, CUPS_LLCAST fp->bufpos, fp->eof));
if (fp->ptr && fp->end)
fp->pos += (off_t)(fp->end - fp->buf);
fp->bufpos += fp->end - fp->buf;
#ifdef HAVE_LIBZ
DEBUG_printf((" fp->compressed=%d\n", fp->compressed));
DEBUG_printf(("cups_fill: fp->compressed=%d\n", fp->compressed));
while (!fp->ptr || fp->compressed)
{
@@ -1750,7 +1819,7 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
* Can't read from file!
*/
DEBUG_printf((" cups_read() returned " CUPS_LLFMT "!\n",
DEBUG_printf(("cups_fill: cups_read() returned " CUPS_LLFMT "!\n",
CUPS_LLCAST bytes));
return (-1);
@@ -2030,6 +2099,9 @@ cups_read(cups_file_t *fp, /* I - CUPS file */
ssize_t total; /* Total bytes read */
DEBUG_printf(("cups_read(fp=%p, buf=%p, bytes=" CUPS_LLFMT ")\n", fp, buf,
CUPS_LLCAST bytes));
/*
* Loop until we read at least 0 bytes...
*/
@@ -2048,6 +2120,8 @@ cups_read(cups_file_t *fp, /* I - CUPS file */
total = read(fp->fd, buf, bytes);
#endif /* WIN32 */
DEBUG_printf(("cups_read: total=" CUPS_LLFMT "\n", CUPS_LLCAST total));
if (total >= 0)
break;
@@ -2082,8 +2156,8 @@ cups_write(cups_file_t *fp, /* I - CUPS file */
ssize_t count; /* Count this time */
DEBUG_printf(("cups_write(fp=%p, buf=%p, bytes=%ld)\n", fp, buf,
(long)bytes));
DEBUG_printf(("cups_write(fp=%p, buf=%p, bytes=" CUPS_LLFMT ")\n", fp, buf,
CUPS_LLCAST bytes));
/*
* Loop until all bytes are written...
@@ -2104,6 +2178,8 @@ cups_write(cups_file_t *fp, /* I - CUPS file */
count = write(fp->fd, buf, bytes);
#endif /* WIN32 */
DEBUG_printf(("cups_write: count=" CUPS_LLFMT "\n", CUPS_LLCAST count));
if (count < 0)
{
/*
@@ -2116,8 +2192,6 @@ cups_write(cups_file_t *fp, /* I - CUPS file */
return (-1);
}
DEBUG_printf((" count=%ld\n", (long)count));
/*
* Update the counts for the last write call...
*/
+1
Ver Arquivo
@@ -77,6 +77,7 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
# ifdef HAVE_GETADDRINFO
char hostname[1024]; /* Hostname */
# endif /* HAVE_GETADDRINFO */
int need_res_init; /* Need to reinitialize resolver? */
/* ipp.c */
ipp_uchar_t ipp_date[11]; /* RFC-1903 date/time data */
+58 -7
Ver Arquivo
@@ -3,7 +3,7 @@
*
* HTTP address routines for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -28,10 +28,14 @@
* Include necessary headers...
*/
#include "http-private.h"
#include "globals.h"
#include "debug.h"
#include <stdlib.h>
#include <stddef.h>
#ifdef HAVE_RESOLV_H
# include <resolv.h>
#endif /* HAVE_RESOLV_H */
/*
@@ -149,7 +153,7 @@ httpAddrLocalhost(
#endif /* AF_LOCAL */
if (addr->addr.sa_family == AF_INET &&
ntohl(addr->ipv4.sin_addr.s_addr) == 0x7f000001)
(ntohl(addr->ipv4.sin_addr.s_addr) & 0xff000000) == 0x7f000000)
return (1);
return (0);
@@ -175,6 +179,10 @@ httpAddrLookup(
char *name, /* I - Host name buffer */
int namelen) /* I - Size of name buffer */
{
_cups_globals_t *cg = _cupsGlobals();
/* Global data */
DEBUG_printf(("httpAddrLookup(addr=%p, name=%p, namelen=%d)\n",
addr, name, namelen));
@@ -192,9 +200,43 @@ httpAddrLookup(
#ifdef AF_LOCAL
if (addr->addr.sa_family == AF_LOCAL)
{
strlcpy(name, addr->un.sun_path, namelen);
else
return (name);
}
#endif /* AF_LOCAL */
/*
* Optimize lookups for localhost/loopback addresses...
*/
if (httpAddrLocalhost(addr))
{
strlcpy(name, "localhost", namelen);
return (name);
}
#ifdef HAVE_RES_INIT
/*
* STR #2920: Initialize resolver after failure in cups-polld
*
* If the previous lookup failed, re-initialize the resolver to prevent
* temporary network errors from persisting. This *should* be handled by
* the resolver libraries, but apparently the glibc folks do not agree.
*
* We set a flag at the end of this function if we encounter an error that
* requires reinitialization of the resolver functions. We then call
* res_init() if the flag is set on the next call here or in httpAddrLookup().
*/
if (cg->need_res_init)
{
res_init();
cg->need_res_init = 0;
}
#endif /* HAVE_RES_INIT */
#ifdef HAVE_GETNAMEINFO
{
/*
@@ -205,9 +247,16 @@ httpAddrLookup(
* do...
*/
if (getnameinfo(&addr->addr, httpAddrLength(addr), name, namelen,
NULL, 0, 0))
int error = getnameinfo(&addr->addr, httpAddrLength(addr), name, namelen,
NULL, 0, 0);
if (error)
{
if (error == EAI_FAIL)
cg->need_res_init = 1;
return (httpAddrString(addr, name, namelen));
}
}
#else
{
@@ -229,8 +278,10 @@ httpAddrLookup(
* No hostname, so return the raw address...
*/
httpAddrString(addr, name, namelen);
return (NULL);
if (h_errno == NO_RECOVERY)
cg->need_res_init = 1;
return (httpAddrString(addr, name, namelen));
}
strlcpy(name, host->h_name, namelen);
+40 -8
Ver Arquivo
@@ -3,7 +3,7 @@
*
* HTTP address list routines for the Common UNIX Printing System (CUPS).
*
* Copyright 2007-2008 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -27,6 +27,10 @@
#include "globals.h"
#include "debug.h"
#include <stdlib.h>
#include <errno.h>
#ifdef HAVE_RESOLV_H
# include <resolv.h>
#endif /* HAVE_RESOLV_H */
/*
@@ -174,6 +178,8 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
http_addrlist_t *first, /* First address in list */
*addr, /* Current address in list */
*temp; /* New address */
_cups_globals_t *cg = _cupsGlobals();
/* Global data */
#ifdef DEBUG
@@ -189,6 +195,28 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
family == AF_INET ? "INET" : "???", service);
#endif /* DEBUG */
#ifdef HAVE_RES_INIT
/*
* STR #2920: Initialize resolver after failure in cups-polld
*
* If the previous lookup failed, re-initialize the resolver to prevent
* temporary network errors from persisting. This *should* be handled by
* the resolver libraries, but apparently the glibc folks do not agree.
*
* We set a flag at the end of this function if we encounter an error that
* requires reinitialization of the resolver functions. We then call
* res_init() if the flag is set on the next call here or in httpAddrLookup().
*/
if (cg->need_res_init)
{
res_init();
cg->need_res_init = 0;
}
#endif /* HAVE_RES_INIT */
/*
* Lookup the address the best way we can...
*/
@@ -210,6 +238,7 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
}
else
#endif /* AF_LOCAL */
if (!hostname || strcasecmp(hostname, "localhost"))
{
#ifdef HAVE_GETADDRINFO
struct addrinfo hints, /* Address lookup hints */
@@ -218,6 +247,8 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
char ipv6[1024], /* IPv6 address */
*ipv6zone; /* Pointer to zone separator */
int ipv6len; /* Length of IPv6 address */
int error; /* getaddrinfo() error */
/*
* Lookup the address as needed...
@@ -269,7 +300,7 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
}
}
if (!getaddrinfo(hostname, service, &hints, &results))
if ((error = getaddrinfo(hostname, service, &hints, &results)) == 0)
{
/*
* Copy the results to our own address list structure...
@@ -315,6 +346,9 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
freeaddrinfo(results);
}
else if (error == EAI_FAIL)
cg->need_res_init = 1;
#else
if (hostname)
{
@@ -431,6 +465,8 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
addr = temp;
}
}
else if (h_errno == NO_RECOVERY)
cg->need_res_init = 1;
}
#endif /* HAVE_GETADDRINFO */
}
@@ -439,7 +475,7 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
* Detect some common errors and handle them sanely...
*/
if (!addr && (!hostname || !strcmp(hostname, "localhost")))
if (!addr && (!hostname || !strcasecmp(hostname, "localhost")))
{
struct servent *port; /* Port number for service */
int portnum; /* Port number */
@@ -468,7 +504,7 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
else
return (NULL);
if (hostname && !strcmp(hostname, "localhost"))
if (hostname && !strcasecmp(hostname, "localhost"))
{
/*
* Unfortunately, some users ignore all of the warnings in the
@@ -528,8 +564,6 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
if (addr)
addr->next = temp;
else
addr = temp;
}
}
else if (!hostname)
@@ -583,8 +617,6 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
if (addr)
addr->next = temp;
else
addr = temp;
}
}
}
+6
Ver Arquivo
@@ -257,6 +257,12 @@ extern void _cups_freeifaddrs(struct ifaddrs *addrs);
# endif /* HAVE_GETIFADDRS */
# endif /* !WIN32 */
/*
* Common URI encoding function...
*/
extern char *_httpEncodeURI(char *dst, const char *src, size_t dstsize);
#endif /* !_CUPS_HTTP_PRIVATE_H_ */
/*
+24 -1
Ver Arquivo
@@ -3,7 +3,7 @@
*
* HTTP support routines for the Common UNIX Printing System (CUPS) scheduler.
*
* Copyright 2007 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -36,6 +36,7 @@
* httpStatus() - Return a short string describing a HTTP status code.
* _cups_hstrerror() - hstrerror() emulation function for Solaris and
* others...
* _httpEncodeURI() - Percent-encode a HTTP request URI.
* http_copy_decode() - Copy and decode a URI.
* http_copy_encode() - Copy and encode a URI.
*/
@@ -1058,6 +1059,12 @@ httpSeparateURI(
* Yes, collect the port number...
*/
if (!isdigit(uri[1] & 255))
{
*port = 0;
return (HTTP_URI_BAD_PORT);
}
*port = strtol(uri + 1, (char **)&uri, 10);
if (*uri != '/' && *uri)
@@ -1203,6 +1210,20 @@ _cups_hstrerror(int error) /* I - Error number */
#endif /* !HAVE_HSTRERROR */
/*
* '_httpEncodeURI()' - Percent-encode a HTTP request URI.
*/
char * /* O - Encoded URI */
_httpEncodeURI(char *dst, /* I - Destination buffer */
const char *src, /* I - Source URI */
size_t dstsize) /* I - Size of destination buffer */
{
http_copy_encode(dst, src, dst + dstsize - 1, NULL, NULL, 1);
return (dst);
}
/*
* 'http_copy_decode()' - Copy and decode a URI.
*/
@@ -1311,6 +1332,8 @@ http_copy_encode(char *dst, /* O - Destination buffer */
*dst++ = *src++;
}
*dst = '\0';
if (*src)
return (NULL);
else
+36 -36
Ver Arquivo
@@ -293,8 +293,7 @@ void
httpClose(http_t *http) /* I - HTTP connection */
{
#ifdef HAVE_GSSAPI
OM_uint32 minor_status, /* Minor status code */
major_status; /* Major status code */
OM_uint32 minor_status; /* Minor status code */
#endif /* HAVE_GSSAPI */
@@ -321,11 +320,10 @@ httpClose(http_t *http) /* I - HTTP connection */
#ifdef HAVE_GSSAPI
if (http->gssctx != GSS_C_NO_CONTEXT)
major_status = gss_delete_sec_context(&minor_status, &http->gssctx,
GSS_C_NO_BUFFER);
gss_delete_sec_context(&minor_status, &http->gssctx, GSS_C_NO_BUFFER);
if (http->gssname != GSS_C_NO_NAME)
major_status = gss_release_name(&minor_status, &http->gssname);
gss_release_name(&minor_status, &http->gssname);
#endif /* HAVE_GSSAPI */
#ifdef HAVE_AUTHORIZATION_H
@@ -1168,16 +1166,16 @@ httpInitialize(void)
* it is the best we can do (on others, this seed isn't even used...)
*/
#ifdef WIN32
#else
# ifdef WIN32
# else
gettimeofday(&curtime, NULL);
srand(curtime.tv_sec + curtime.tv_usec);
#endif /* WIN32 */
# endif /* WIN32 */
for (i = 0; i < sizeof(data); i ++)
data[i] = rand(); /* Yes, this is a poor source of random data... */
data[i] = rand();
RAND_seed(&data, sizeof(data));
RAND_seed(data, sizeof(data));
#endif /* HAVE_LIBSSL */
}
@@ -1437,7 +1435,7 @@ httpRead2(http_t *http, /* I - HTTP connection */
bytes = (ssize_t)recv(http->fd, buffer, (int)length, 0);
#else
while ((bytes = recv(http->fd, buffer, length, 0)) < 0)
if (errno != EINTR)
if (errno != EINTR && errno != EAGAIN)
break;
#endif /* WIN32 */
@@ -1458,7 +1456,7 @@ httpRead2(http_t *http, /* I - HTTP connection */
#ifdef WIN32
http->error = WSAGetLastError();
#else
if (errno == EINTR)
if (errno == EINTR || errno == EAGAIN)
bytes = 0;
else
http->error = errno;
@@ -1820,18 +1818,35 @@ httpSetField(http_t *http, /* I - HTTP connection */
strlcpy(http->fields[field], value, HTTP_MAX_VALUE);
/*
* Special case for Authorization: as its contents can be
* longer than HTTP_MAX_VALUE
*/
if (field == HTTP_FIELD_AUTHORIZATION)
{
/*
* Special case for Authorization: as its contents can be
* longer than HTTP_MAX_VALUE
*/
if (http->field_authorization)
free(http->field_authorization);
http->field_authorization = strdup(value);
}
else if (field == HTTP_FIELD_HOST)
{
/*
* Special-case for Host: as we don't want a trailing "." on the hostname.
*/
char *ptr = http->fields[HTTP_FIELD_HOST];
/* Pointer into Host: field */
if (*ptr)
{
ptr += strlen(ptr) - 1;
if (*ptr == '.')
*ptr = '\0';
}
}
}
@@ -2522,8 +2537,7 @@ http_send(http_t *http, /* I - HTTP connection */
const char *uri) /* I - URI */
{
int i; /* Looping var */
char *ptr, /* Pointer in buffer */
buf[1024]; /* Encoded URI buffer */
char buf[1024]; /* Encoded URI buffer */
static const char * const codes[] =
{ /* Request code strings */
NULL,
@@ -2540,8 +2554,6 @@ http_send(http_t *http, /* I - HTTP connection */
"TRACE",
"CLOSE"
};
static const char hex[] = "0123456789ABCDEF";
/* Hex digits */
DEBUG_printf(("http_send(http=%p, request=HTTP_%s, uri=\"%s\")\n",
@@ -2561,20 +2573,7 @@ http_send(http_t *http, /* I - HTTP connection */
* Encode the URI as needed...
*/
for (ptr = buf; *uri != '\0' && ptr < (buf + sizeof(buf) - 1); uri ++)
if (*uri <= ' ' || *uri >= 127)
{
if (ptr < (buf + sizeof(buf) - 1))
*ptr ++ = '%';
if (ptr < (buf + sizeof(buf) - 1))
*ptr ++ = hex[(*uri >> 4) & 15];
if (ptr < (buf + sizeof(buf) - 1))
*ptr ++ = hex[*uri & 15];
}
else
*ptr ++ = *uri;
*ptr = '\0';
_httpEncodeURI(buf, uri, sizeof(buf));
/*
* See if we had an error the last time around; if so, reconnect...
@@ -3009,7 +3008,8 @@ http_wait(http_t *http, /* I - HTTP connection */
# elif defined(HAVE_CDSASSL)
size_t bytes; /* Bytes that are available */
if (!SSLGetBufferedReadSize(((http_tls_t *)http->tls)->session, &bytes) && bytes > 0)
if (!SSLGetBufferedReadSize(((http_tls_t *)(http->tls))->session, &bytes) &&
bytes > 0)
return (1);
# endif /* HAVE_LIBSSL */
}
+19 -2
Ver Arquivo
@@ -1049,7 +1049,7 @@ ippReadIO(void *src, /* I - Data source */
* Get the request header...
*/
if ((n = (*cb)(src, buffer, 8)) < 8)
if ((*cb)(src, buffer, 8) < 8)
{
DEBUG_printf(("ippReadIO: Unable to read header (%d bytes read)!\n", n));
return (IPP_ERROR);
@@ -1556,6 +1556,12 @@ ippReadIO(void *src, /* I - Data source */
return (IPP_ERROR);
}
if (!value)
{
DEBUG_puts("ippReadIO: NULL value!");
return (IPP_ERROR);
}
value->unknown.length = n;
if (n > 0)
{
@@ -2828,7 +2834,18 @@ ipp_read_http(http_t *http, /* I - Client connection */
}
}
if ((bytes = httpRead2(http, (char *)buffer, length - tbytes)) <= 0)
if ((bytes = httpRead2(http, (char *)buffer, length - tbytes)) < 0)
{
#ifdef WIN32
break;
#else
if (errno != EAGAIN && errno != EINTR)
break;
bytes = 0;
#endif /* WIN32 */
}
else if (bytes == 0)
break;
}
}
+2 -2
Ver Arquivo
@@ -63,8 +63,8 @@ _cupsLangPrintf(FILE *fp, /* I - File to write to */
*/
va_start(ap, message);
bytes = vsnprintf(buffer, sizeof(buffer),
_cupsLangString(cg->lang_default, message), ap);
vsnprintf(buffer, sizeof(buffer),
_cupsLangString(cg->lang_default, message), ap);
va_end(ap);
/*
+4 -2
Ver Arquivo
@@ -134,7 +134,8 @@ static const char * const lang_encodings[] =
"unknown", "unknown",
"unknown", "unknown",
"euc-cn", "euc-jp",
"euc-kr", "euc-tw"
"euc-kr", "euc-tw",
"jis-x0213"
};
#ifdef __APPLE__
@@ -423,7 +424,8 @@ cupsLangGet(const char *language) /* I - Language or locale */
"", "", "", "",
"", "", "", "",
"EUCCN", "EUCJP", "EUCKR", "EUCTW"
"EUCCN", "EUCJP", "EUCKR", "EUCTW",
"SHIFT_JISX0213"
};
+2 -1
Ver Arquivo
@@ -67,7 +67,7 @@ typedef enum cups_encoding_e /**** Language Encodings ****/
CUPS_ISO8859_11, /* ISO-8859-11 */
CUPS_ISO8859_16, /* ISO-8859-16 */
CUPS_MAC_ROMAN, /* MacRoman */
CUPS_ENCODING_SBCS_END = 63, /* End of single-bybte encodings @private@ */
CUPS_ENCODING_SBCS_END = 63, /* End of single-byte encodings @private@ */
CUPS_WINDOWS_932, /* Japanese JIS X0208-1990 */
CUPS_WINDOWS_936, /* Simplified Chinese GB 2312-80 */
@@ -80,6 +80,7 @@ typedef enum cups_encoding_e /**** Language Encodings ****/
CUPS_EUC_JP, /* EUC Japanese */
CUPS_EUC_KR, /* EUC Korean */
CUPS_EUC_TW, /* EUC Traditional Chinese */
CUPS_JIS_X0213, /* JIS X0213 aka Shift JIS */
CUPS_ENCODING_VBCS_END = 191 /* End of variable-length encodings @private@ */
} cups_encoding_t;
+1
Ver Arquivo
@@ -25,6 +25,7 @@ __cupsStrFormatd
__cupsStrFree
__cupsStrScand
__cupsStrStatistics
__httpEncodeURI
__httpReadCDSA
__httpWriteCDSA
__ippAddAttr
+1
Ver Arquivo
@@ -29,6 +29,7 @@ _cups_strcpy
_cups_strlcat
_cups_strlcpy
_httpBIOMethods
_httpEncodeURI
_ippAddAttr
_ippFreeAttr
_ppdGetEncoding
+2 -8
Ver Arquivo
@@ -113,7 +113,8 @@ ppdLocalize(ppd_file_t *ppd) /* I - PPD file */
k > 0;
k --, choice ++)
{
if (strcmp(choice->choice, "Custom"))
if (strcmp(choice->choice, "Custom") ||
!ppdFindCustomOption(ppd, option->keyword))
locattr = ppd_localized_attr(ppd, option->keyword, choice->choice,
ll_CC, ll);
else
@@ -436,13 +437,6 @@ ppd_ll_CC(char *ll_CC, /* O - Country-specific locale name */
strlcpy(ll_CC, "sv_SE", ll_CC_size);
else if (!strcmp(ll_CC, "zh")) /* Simplified Chinese */
strlcpy(ll_CC, "zh_CN", ll_CC_size);
else if (ll_CC_size >= 6)
{
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(("ppd_ll_CC: lang->language=\"%s\", ll=\"%s\", ll_CC=\"%s\"...\n",
+6 -3
Ver Arquivo
@@ -197,11 +197,14 @@ ppdFindChoice(ppd_option_t *o, /* I - Pointer to option */
ppd_choice_t *c; /* Current choice */
if (o == NULL || choice == NULL)
if (!o || !choice)
return (NULL);
if (choice[0] == '{' || !strncasecmp(choice, "Custom.", 7))
choice = "Custom";
for (i = o->num_choices, c = o->choices; i > 0; i --, c ++)
if (strcasecmp(c->choice, choice) == 0)
if (!strcasecmp(c->choice, choice))
return (c);
return (NULL);
@@ -498,7 +501,7 @@ ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */
if ((coption = ppdFindCustomOption(ppd, option)) != NULL)
{
num_vals = cupsParseOptions(choice + 1, 0, &vals);
num_vals = cupsParseOptions(choice, 0, &vals);
for (i = 0, val = vals; i < num_vals; i ++, val ++)
{
+130 -62
Ver Arquivo
@@ -63,9 +63,14 @@ cupsAddOption(const char *name, /* I - Name of option */
cups_option_t *temp; /* Pointer to new option */
if (name == NULL || !name[0] || value == NULL ||
options == NULL || num_options < 0)
DEBUG_printf(("cupsAddOption(name=\"%s\", value=\"%s\", num_options=%d, "
"options=%p)\n", name, value, num_options, options));
if (!name || !name[0] || !value || !options || num_options < 0)
{
DEBUG_printf(("cupsAddOption: Returning %d\n", num_options));
return (num_options);
}
/*
* Look for an existing option with the same name...
@@ -81,6 +86,8 @@ cupsAddOption(const char *name, /* I - Name of option */
* No matching option name...
*/
DEBUG_puts("cupsAddOption: New option...");
if (num_options == 0)
temp = (cups_option_t *)malloc(sizeof(cups_option_t));
else
@@ -88,7 +95,10 @@ cupsAddOption(const char *name, /* I - Name of option */
(num_options + 1));
if (temp == NULL)
{
DEBUG_puts("cupsAddOption: Unable to expand option array, returning 0");
return (0);
}
*options = temp;
temp += num_options;
@@ -122,7 +132,10 @@ cupsFreeOptions(
int i; /* Looping var */
if (num_options <= 0 || options == NULL)
DEBUG_printf(("cupsFreeOptions(num_options=%d, options=%p)\n", num_options,
options));
if (num_options <= 0 || !options)
return;
for (i = 0; i < num_options; i ++)
@@ -147,13 +160,23 @@ cupsGetOption(const char *name, /* I - Name of option */
int i; /* Looping var */
if (name == NULL || num_options <= 0 || options == NULL)
DEBUG_printf(("cupsGetOption(name=\"%s\", num_options=%d, options=%p)\n",
name, num_options, options));
if (!name || num_options <= 0 || !options)
{
DEBUG_puts("cupsGetOption: Returning NULL");
return (NULL);
}
for (i = 0; i < num_options; i ++)
if (strcasecmp(options[i].name, name) == 0)
if (!strcasecmp(options[i].name, name))
{
DEBUG_printf(("cupsGetOption: Returning \"%s\"\n", options[i].value));
return (options[i].value);
}
DEBUG_puts("cupsGetOption: Returning NULL");
return (NULL);
}
@@ -474,24 +497,52 @@ cupsParseOptions(
quote; /* Quote character */
DEBUG_printf(("cupsParseOptions(arg=\"%s\", num_options=%d, options=%p)\n",
arg, num_options, options));
/*
* Range check input...
*/
if (!arg)
{
DEBUG_printf(("cupsParseOptions: Returning %d\n", num_options));
return (num_options);
}
if (!options || num_options < 0)
{
DEBUG_puts("cupsParseOptions: Returning 0");
return (0);
}
/*
* Make a copy of the argument string and then divide it up...
*/
if ((copyarg = strdup(arg)) == NULL)
{
DEBUG_puts("cupsParseOptions: Unable to copy arg string");
DEBUG_printf(("cupsParseOptions: Returning %d\n", num_options));
return (num_options);
}
ptr = copyarg;
if (*copyarg == '{')
{
/*
* Remove surrounding {} so we can parse "{name=value ... name=value}"...
*/
if ((ptr = copyarg + strlen(copyarg) - 1) > copyarg && *ptr == '}')
{
*ptr = '\0';
ptr = copyarg + 1;
}
else
ptr = copyarg;
}
else
ptr = copyarg;
/*
* Skip leading spaces...
@@ -528,6 +579,8 @@ cupsParseOptions(
while (isspace(*ptr & 255))
*ptr++ = '\0';
DEBUG_printf(("cupsParseOptions: name=\"%s\"\n", name));
if (*ptr != '=')
{
/*
@@ -548,80 +601,84 @@ cupsParseOptions(
*/
*ptr++ = '\0';
value = ptr;
if (*ptr == '\'' || *ptr == '\"')
while (*ptr && !isspace(*ptr & 255))
{
/*
* Quoted string constant...
*/
quote = *ptr++;
value = ptr;
while (*ptr != quote && *ptr)
{
if (*ptr == '\\' && ptr[1])
_cups_strcpy(ptr, ptr + 1);
if (*ptr == ',')
ptr ++;
}
else if (*ptr == '\'' || *ptr == '\"')
{
/*
* Quoted string constant...
*/
if (*ptr != '\0')
*ptr++ = '\0';
}
else if (*ptr == '{')
{
/*
* Collection value...
*/
quote = *ptr;
_cups_strcpy(ptr, ptr + 1);
int depth;
value = ptr;
for (depth = 1; *ptr; ptr ++)
if (*ptr == '{')
depth ++;
else if (*ptr == '}')
while (*ptr != quote && *ptr)
{
depth --;
if (!depth)
{
ptr ++;
if (*ptr == '\\' && ptr[1])
_cups_strcpy(ptr, ptr + 1);
if (*ptr != ',')
break;
}
}
else if (*ptr == '\\' && ptr[1])
ptr ++;
}
if (*ptr)
_cups_strcpy(ptr, ptr + 1);
if (*ptr != '\0')
*ptr++ = '\0';
}
else
{
/*
* Normal space-delimited string...
*/
value = ptr;
while (!isspace(*ptr & 255) && *ptr)
}
else if (*ptr == '{')
{
if (*ptr == '\\' && ptr[1])
_cups_strcpy(ptr, ptr + 1);
/*
* Collection value...
*/
ptr ++;
int depth;
for (depth = 0; *ptr; ptr ++)
{
if (*ptr == '{')
depth ++;
else if (*ptr == '}')
{
depth --;
if (!depth)
{
ptr ++;
break;
}
}
else if (*ptr == '\\' && ptr[1])
_cups_strcpy(ptr, ptr + 1);
}
}
else
{
/*
* Normal space-delimited string...
*/
while (!isspace(*ptr & 255) && *ptr)
{
if (*ptr == '\\' && ptr[1])
_cups_strcpy(ptr, ptr + 1);
ptr ++;
}
}
}
if (*ptr != '\0')
*ptr++ = '\0';
DEBUG_printf(("cupsParseOptions: value=\"%s\"\n", value));
/*
* Skip trailing whitespace...
*/
while (isspace(*ptr & 255))
*ptr++ = '\0';
ptr ++;
/*
* Add the string value...
@@ -637,6 +694,8 @@ cupsParseOptions(
free(copyarg);
DEBUG_printf(("cupsParseOptions: Returning %d\n", num_options));
return (num_options);
}
@@ -657,12 +716,18 @@ cupsRemoveOption(
cups_option_t *option; /* Current option */
DEBUG_printf(("cupsRemoveOption(name=\"%s\", num_options=%d, options=%p)\n",
name, num_options, options));
/*
* Range check input...
*/
if (!name || num_options < 1 || !options)
{
DEBUG_printf(("cupsRemoveOption: Returning %d\n", num_options));
return (num_options);
}
/*
* Loop for the option...
@@ -678,6 +743,8 @@ cupsRemoveOption(
* Remove this option from the array...
*/
DEBUG_puts("cupsRemoveOption: Found option, removing it...");
num_options --;
i --;
@@ -693,6 +760,7 @@ cupsRemoveOption(
* Return the new number of options...
*/
DEBUG_printf(("cupsRemoveOption: Returning %d\n", num_options));
return (num_options);
}
+28 -27
Ver Arquivo
@@ -350,7 +350,7 @@ _ppdGetEncoding(const char *name) /* I - LanguageEncoding string */
else if (!strcasecmp(name, "ISOLatin5"))
return (CUPS_ISO8859_5);
else if (!strcasecmp(name, "JIS83-RKSJ"))
return (CUPS_WINDOWS_932);
return (CUPS_JIS_X0213);
else if (!strcasecmp(name, "MacStandard"))
return (CUPS_MAC_ROMAN);
else if (!strcasecmp(name, "WindowsANSI"))
@@ -623,11 +623,8 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
puts("");
#endif /* DEBUG */
if (strcmp(keyword, "CloseUI") && strcmp(keyword, "CloseGroup") &&
strcmp(keyword, "CloseSubGroup") && strncmp(keyword, "Default", 7) &&
strcmp(keyword, "JCLCloseUI") && strcmp(keyword, "JCLOpenUI") &&
strcmp(keyword, "OpenUI") && strcmp(keyword, "OpenGroup") &&
strcmp(keyword, "OpenSubGroup") && string == NULL)
if (strncmp(keyword, "Default", 7) && !string &&
cg->ppd_conform != PPD_CONFORM_RELAXED)
{
/*
* Need a string value!
@@ -1041,19 +1038,23 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
* Add the "custom" option...
*/
if ((choice = ppd_add_choice(custom_option, "Custom")) == NULL)
{
DEBUG_puts("Unable to add Custom choice!");
if ((choice = ppdFindChoice(custom_option, "Custom")) == NULL)
if ((choice = ppd_add_choice(custom_option, "Custom")) == NULL)
{
DEBUG_puts("Unable to add Custom choice!");
cg->ppd_status = PPD_ALLOC_ERROR;
cg->ppd_status = PPD_ALLOC_ERROR;
goto error;
}
goto error;
}
strlcpy(choice->text, text[0] ? text : _("Custom"),
sizeof(choice->text));
choice->code = strdup(string);
if (custom_option->section == PPD_ORDER_JCL)
ppd_decode(choice->code);
}
/*
@@ -1077,14 +1078,15 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if (custom_option)
{
if ((choice = ppd_add_choice(custom_option, "Custom")) == NULL)
{
DEBUG_puts("Unable to add Custom choice!");
if ((choice = ppdFindChoice(custom_option, "Custom")) == NULL)
if ((choice = ppd_add_choice(custom_option, "Custom")) == NULL)
{
DEBUG_puts("Unable to add Custom choice!");
cg->ppd_status = PPD_ALLOC_ERROR;
cg->ppd_status = PPD_ALLOC_ERROR;
goto error;
}
goto error;
}
strlcpy(choice->text, text[0] ? text : _("Custom"),
sizeof(choice->text));
@@ -1098,7 +1100,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
else if (!strcmp(string, "Plus90"))
ppd->landscape = 90;
}
else if (!strcmp(keyword, "Emulators"))
else if (!strcmp(keyword, "Emulators") && string)
{
for (count = 1, sptr = string; sptr != NULL;)
if ((sptr = strchr(sptr, ' ')) != NULL)
@@ -1289,14 +1291,15 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if ((custom_attr = ppdFindAttr(ppd, custom_name, "True")) != NULL)
{
if ((choice = ppd_add_choice(option, "Custom")) == NULL)
{
DEBUG_puts("Unable to add Custom choice!");
if ((choice = ppdFindChoice(option, "Custom")) == NULL)
if ((choice = ppd_add_choice(option, "Custom")) == NULL)
{
DEBUG_puts("Unable to add Custom choice!");
cg->ppd_status = PPD_ALLOC_ERROR;
cg->ppd_status = PPD_ALLOC_ERROR;
goto error;
}
goto error;
}
strlcpy(choice->text,
custom_attr->text[0] ? custom_attr->text : _("Custom"),
@@ -2865,8 +2868,6 @@ ppd_read(cups_file_t *fp, /* I - File to read from */
if (ch == 0x0a)
cupsFileGetChar(fp);
}
ch = '\n';
}
else if (ch < ' ' && ch != '\t' && cg->ppd_conform == PPD_CONFORM_STRICT)
{
+15 -15
Ver Arquivo
@@ -123,9 +123,9 @@ cupsDoIORequest(http_t *http, /* I - HTTP connection to server */
http_status_t expect; /* Expect: header to use */
DEBUG_printf(("cupsDoFileRequest(%p, %p, \'%s\', \'%s\')\n",
http, request, resource ? resource : "(null)",
filename ? filename : "(null)"));
DEBUG_printf(("cupsDoFileRequest(%p, %p, \'%s\', %d, %d)\n",
http, request, resource ? resource : "(null)", infile,
outfile));
if (http == NULL || request == NULL || resource == NULL)
{
@@ -198,7 +198,7 @@ cupsDoIORequest(http_t *http, /* I - HTTP connection to server */
while (response == NULL)
{
DEBUG_puts("cupsDoFileRequest: setup...");
DEBUG_puts("cupsDoIORequest: setup...");
/*
* Setup the HTTP variables needed...
@@ -221,13 +221,13 @@ cupsDoIORequest(http_t *http, /* I - HTTP connection to server */
httpSetField(http, HTTP_FIELD_AUTHORIZATION, http->authstring);
httpSetExpect(http, expect);
DEBUG_printf(("cupsDoFileRequest: authstring=\"%s\"\n", http->authstring));
DEBUG_printf(("cupsDoIORequest: authstring=\"%s\"\n", http->authstring));
/*
* Try the request...
*/
DEBUG_puts("cupsDoFileRequest: post...");
DEBUG_puts("cupsDoIORequest: post...");
if (httpPost(http, resource))
{
@@ -244,7 +244,7 @@ cupsDoIORequest(http_t *http, /* I - HTTP connection to server */
* Send the IPP data...
*/
DEBUG_puts("cupsDoFileRequest: ipp write...");
DEBUG_puts("cupsDoIORequest: ipp write...");
request->state = IPP_IDLE;
status = HTTP_CONTINUE;
@@ -275,7 +275,7 @@ cupsDoIORequest(http_t *http, /* I - HTTP connection to server */
if (status == HTTP_CONTINUE && state == IPP_DATA && infile >= 0)
{
DEBUG_puts("cupsDoFileRequest: file write...");
DEBUG_puts("cupsDoIORequest: file write...");
/*
* Send the file...
@@ -303,16 +303,16 @@ cupsDoIORequest(http_t *http, /* I - HTTP connection to server */
* Get the server's return status...
*/
DEBUG_puts("cupsDoFileRequest: update...");
DEBUG_puts("cupsDoIORequest: update...");
while (status == HTTP_CONTINUE)
status = httpUpdate(http);
DEBUG_printf(("cupsDoFileRequest: status = %d\n", status));
DEBUG_printf(("cupsDoIORequest: status = %d\n", status));
if (status == HTTP_UNAUTHORIZED)
{
DEBUG_puts("cupsDoFileRequest: unauthorized...");
DEBUG_puts("cupsDoIORequest: unauthorized...");
/*
* Flush any error message...
@@ -337,7 +337,7 @@ cupsDoIORequest(http_t *http, /* I - HTTP connection to server */
}
else if (status == HTTP_ERROR)
{
DEBUG_printf(("cupsDoFileRequest: http->error=%d (%s)\n", http->error,
DEBUG_printf(("cupsDoIORequest: http->error=%d (%s)\n", http->error,
strerror(http->error)));
#ifdef WIN32
@@ -381,7 +381,7 @@ cupsDoIORequest(http_t *http, /* I - HTTP connection to server */
}
else if (status != HTTP_OK)
{
DEBUG_printf(("cupsDoFileRequest: error %d...\n", status));
DEBUG_printf(("cupsDoIORequest: error %d...\n", status));
/*
* Flush any error message...
@@ -396,7 +396,7 @@ cupsDoIORequest(http_t *http, /* I - HTTP connection to server */
* Read the response...
*/
DEBUG_puts("cupsDoFileRequest: response...");
DEBUG_puts("cupsDoIORequest: response...");
response = ippNew();
@@ -476,7 +476,7 @@ cupsDoRequest(http_t *http, /* I - HTTP connection to server */
ipp_t *request, /* I - IPP request */
const char *resource) /* I - HTTP resource for POST */
{
return (cupsDoFileRequest(http, request, resource, NULL));
return (cupsDoIORequest(http, request, resource, -1, -1));
}
+2 -1
Ver Arquivo
@@ -134,7 +134,8 @@
*CloseUI: *StringOption
*CustomStringOption True/Custom String: "StringOption=Custom"
*ParamCustomStringOption String: 1 string 1 10
*ParamCustomStringOption String1: 2 string 1 10
*ParamCustomStringOption String2: 1 string 1 10
*CloseGroup: Extended
+1 -1
Ver Arquivo
@@ -61,7 +61,7 @@ main(int argc, /* I - Number of command-line args */
if (argc > 1)
{
for (i = 1, num_settings = 0; i < argc; i ++)
for (i = 1, num_settings = 0, settings = NULL; i < argc; i ++)
num_settings = cupsParseOptions(argv[i], num_settings, &settings);
if (cupsAdminSetServerSettings(http, num_settings, settings))
+3 -5
Ver Arquivo
@@ -3,7 +3,7 @@
*
* CUPS API test program for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -70,8 +70,7 @@ main(int argc, /* I - Number of command-line arguments */
printf("cupsGetDest(\"%s\"): ", dests[num_dests / 2].name);
fflush(stdout);
if ((dest = cupsGetDest(dests[num_dests / 2].name, NULL, num_dests,
dests)) == NULL)
if (!cupsGetDest(dests[num_dests / 2].name, NULL, num_dests, dests))
{
status = 1;
puts("FAIL");
@@ -88,8 +87,8 @@ main(int argc, /* I - Number of command-line arguments */
if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) == NULL)
{
status = 1;
puts("FAIL");
return (1);
}
else
puts("PASS");
@@ -104,7 +103,6 @@ main(int argc, /* I - Number of command-line arguments */
if (cupsPrintFile(dest->name, "../data/testprint.ps", "Test Page",
dest->num_options, dest->options) <= 0)
{
status = 1;
puts("FAIL");
return (1);
}
+270 -21
Ver Arquivo
@@ -3,7 +3,7 @@
*
* File test program for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2007-2008 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -34,12 +34,14 @@
#ifdef HAVE_LIBZ
# include <zlib.h>
#endif /* HAVE_LIBZ */
#include <fcntl.h>
/*
* Local functions...
*/
static int random_tests(void);
static int read_write_tests(int compression);
@@ -51,8 +53,10 @@ int /* O - Exit status */
main(int argc, /* I - Number of command-line arguments */
char *argv[]) /* I - Command-line arguments */
{
int status; /* Exit status */
char filename[1024]; /* Filename buffer */
int status; /* Exit status */
char filename[1024]; /* Filename buffer */
int fds[2]; /* Open file descriptors */
cups_file_t *fdfile; /* File opened with cupsFileOpenFd() */
if (argc == 1)
@@ -73,11 +77,51 @@ main(int argc, /* I - Number of command-line arguments */
status += read_write_tests(1);
#endif /* HAVE_LIBZ */
/*
* Do uncompressed random I/O tests...
*/
status += random_tests();
/*
* Test fdopen and close without reading...
*/
pipe(fds);
close(fds[1]);
fputs("\ncupsFileOpenFd(fd, \"r\"): ", stdout);
fflush(stdout);
if ((fdfile = cupsFileOpenFd(fds[0], "r")) == NULL)
{
puts("FAIL");
status ++;
}
else
{
/*
* Able to open file, now close without reading. If we don't return
* before the alarm fires, that is a failure and we will crash on the
* alarm signal...
*/
puts("PASS");
fputs("cupsFileClose(no read): ", stdout);
fflush(stdout);
alarm(5);
cupsFileClose(fdfile);
alarm(0);
puts("PASS");
}
/*
* Test path functions...
*/
fputs("cupsFileFind: ", stdout);
fputs("\ncupsFileFind: ", stdout);
#ifdef WIN32
if (cupsFileFind("notepad.exe", "C:/WINDOWS", 1, filename, sizeof(filename)) &&
cupsFileFind("notepad.exe", "C:/WINDOWS;C:/WINDOWS/SYSTEM32", 1, filename, sizeof(filename)))
@@ -134,6 +178,190 @@ main(int argc, /* I - Number of command-line arguments */
}
/*
* 'random_tests()' - Do random access tests.
*/
static int /* O - Status */
random_tests(void)
{
int status, /* Status of tests */
pass, /* Current pass */
count, /* Number of records read */
record, /* Current record */
num_records; /* Number of records */
ssize_t pos, /* Position in file */
expected; /* Expected position in file */
cups_file_t *fp; /* File */
char buffer[512]; /* Data buffer */
/*
* Run 4 passes, each time appending to a data file and then reopening the
* file for reading to validate random records in the file.
*/
for (status = 0, pass = 0; pass < 4; pass ++)
{
/*
* cupsFileOpen(append)
*/
printf("\ncupsFileOpen(append %d): ", pass);
if ((fp = cupsFileOpen("testfile.dat", "a")) == NULL)
{
printf("FAIL (%s)\n", strerror(errno));
status ++;
break;
}
else
puts("PASS");
/*
* cupsFileTell()
*/
expected = 256 * sizeof(buffer) * pass;
fputs("cupsFileTell(): ", stdout);
if ((pos = cupsFileTell(fp)) != expected)
{
printf("FAIL (" CUPS_LLFMT " instead of " CUPS_LLFMT ")\n",
CUPS_LLCAST pos, CUPS_LLCAST expected);
status ++;
break;
}
else
puts("PASS");
/*
* cupsFileWrite()
*/
fputs("cupsFileWrite(256 512-byte records): ", stdout);
for (record = 0; record < 256; record ++)
{
memset(buffer, record, sizeof(buffer));
if (cupsFileWrite(fp, buffer, sizeof(buffer)) < sizeof(buffer))
break;
}
if (record < 256)
{
printf("FAIL (%d: %s)\n", record, strerror(errno));
status ++;
break;
}
else
puts("PASS");
/*
* cupsFileTell()
*/
expected += 256 * sizeof(buffer);
fputs("cupsFileTell(): ", stdout);
if ((pos = cupsFileTell(fp)) != expected)
{
printf("FAIL (" CUPS_LLFMT " instead of " CUPS_LLFMT ")\n",
CUPS_LLCAST pos, CUPS_LLCAST expected);
status ++;
break;
}
else
puts("PASS");
cupsFileClose(fp);
/*
* cupsFileOpen(read)
*/
printf("\ncupsFileOpen(read %d): ", pass);
if ((fp = cupsFileOpen("testfile.dat", "r")) == NULL)
{
printf("FAIL (%s)\n", strerror(errno));
status ++;
break;
}
else
puts("PASS");
/*
* cupsFileSeek, cupsFileRead
*/
fputs("cupsFileSeek(), cupsFileRead(): ", stdout);
for (num_records = (pass + 1) * 256, count = (pass + 1) * 256,
record = rand() % num_records;
count > 0;
count --, record = (record + (rand() & 31) - 16 + num_records) %
num_records)
{
/*
* The last record is always the first...
*/
if (count == 1)
record = 0;
/*
* Try reading the data for the specified record, and validate the
* contents...
*/
expected = sizeof(buffer) * record;
if ((pos = cupsFileSeek(fp, expected)) != expected)
{
printf("FAIL (" CUPS_LLFMT " instead of " CUPS_LLFMT ")\n",
CUPS_LLCAST pos, CUPS_LLCAST expected);
status ++;
break;
}
else
{
if (cupsFileRead(fp, buffer, sizeof(buffer)) != sizeof(buffer))
{
printf("FAIL (%s)\n", strerror(errno));
status ++;
break;
}
else if ((buffer[0] & 255) != (record & 255) ||
memcmp(buffer, buffer + 1, sizeof(buffer) - 1))
{
printf("FAIL (Bad Data - %d instead of %d)\n", buffer[0] & 255,
record & 255);
status ++;
break;
}
}
}
if (count == 0)
puts("PASS");
cupsFileClose(fp);
}
/*
* Remove the test file...
*/
unlink("testfile.dat");
/*
* Return the test status...
*/
return (status);
}
/*
* 'read_write_tests()' - Perform read/write tests.
*/
@@ -142,7 +370,7 @@ static int /* O - Status */
read_write_tests(int compression) /* I - Use compression? */
{
int i; /* Looping var */
cups_file_t *fp; /* First file */
cups_file_t *fp; /* File */
int status; /* Exit status */
char line[1024], /* Line from file */
*value; /* Directive value from line */
@@ -150,6 +378,7 @@ read_write_tests(int compression) /* I - Use compression? */
unsigned char readbuf[8192], /* Read buffer */
writebuf[8192]; /* Write buffer */
int byte; /* Byte from file */
off_t length; /* Length of file */
static const char *partial_line = "partial line";
/* Partial line */
@@ -221,7 +450,7 @@ read_write_tests(int compression) /* I - Use compression? */
fputs("cupsFilePrintf(): ", stdout);
for (i = 0; i < 1000; i ++)
if (cupsFilePrintf(fp, "TestLine %d\n", i) < 0)
if (cupsFilePrintf(fp, "TestLine %03d\n", i) < 0)
break;
if (i >= 1000)
@@ -282,6 +511,20 @@ read_write_tests(int compression) /* I - Use compression? */
status ++;
}
/*
* cupsFileTell()
*/
fputs("cupsFileTell(): ", stdout);
if ((length = cupsFileTell(fp)) == 81933283)
puts("PASS");
else
{
printf("FAIL (" CUPS_LLFMT " instead of 81933283)\n", CUPS_LLCAST length);
status ++;
}
/*
* cupsFileClose()
*/
@@ -306,7 +549,7 @@ read_write_tests(int compression) /* I - Use compression? */
* cupsFileOpen(read)
*/
fputs("cupsFileOpen(read): ", stdout);
fputs("\ncupsFileOpen(read): ", stdout);
fp = cupsFileOpen(compression ? "testfile.dat.gz" : "testfile.dat", "r");
if (fp)
@@ -385,23 +628,9 @@ read_write_tests(int compression) /* I - Use compression? */
fputs("cupsFileGetChar(): ", stdout);
#ifdef DEBUG
puts("\ni byte\n----- -----");
for (i = 0; i < 256; i ++)
{
byte = cupsFileGetChar(fp);
printf("%-5d %-5d\n", i, byte);
if (byte != i)
break;
}
#else
for (i = 0; i < 256; i ++)
if ((byte = cupsFileGetChar(fp)) != i)
break;
#endif /* DEBUG */
if (i >= 256)
puts("PASS");
@@ -467,6 +696,20 @@ read_write_tests(int compression) /* I - Use compression? */
status ++;
}
/*
* cupsFileTell()
*/
fputs("cupsFileTell(): ", stdout);
if ((length = cupsFileTell(fp)) == 81933283)
puts("PASS");
else
{
printf("FAIL (" CUPS_LLFMT " instead of 81933283)\n", CUPS_LLCAST length);
status ++;
}
/*
* cupsFileClose()
*/
@@ -487,6 +730,12 @@ read_write_tests(int compression) /* I - Use compression? */
status ++;
}
/*
* Remove the test file...
*/
unlink(compression ? "testfile.dat.gz" : "testfile.dat");
/*
* Return the test status...
*/
+21 -2
Ver Arquivo
@@ -3,7 +3,7 @@
*
* HTTP test program for the Common UNIX Printing System (CUPS).
*
* Copyright 2007 by Apple Inc.
* Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -299,7 +299,7 @@ main(int argc, /* I - Number of command-line arguments */
* httpAddrGetList()
*/
fputs("httpAddrGetList(): ", stdout);
printf("httpAddrGetList(%s): ", hostname);
addrlist = httpAddrGetList(hostname, AF_UNSPEC, NULL);
if (addrlist)
@@ -450,6 +450,25 @@ main(int argc, /* I - Number of command-line arguments */
return (failures);
}
else if (!strcmp(argv[1], "-u") && argc == 3)
{
/*
* Test URI separation...
*/
uri_status = httpSeparateURI(HTTP_URI_CODING_ALL, argv[2], scheme,
sizeof(scheme), username, sizeof(username),
hostname, sizeof(hostname), &port,
resource, sizeof(resource));
printf("uri_status = %s\n", uri_status_strings[uri_status + 8]);
printf("scheme = \"%s\"\n", scheme);
printf("username = \"%s\"\n", username);
printf("hostname = \"%s\"\n", hostname);
printf("port = %d\n", port);
printf("resource = \"%s\"\n", resource);
return (0);
}
/*
* Test HTTP GET requests...
+6 -2
Ver Arquivo
@@ -81,7 +81,10 @@ static const char *custom_code =
"%%EndFeature\n"
"} stopped cleartomark\n"
"[{\n"
"%%BeginFeature: *StringOption None\n"
"%%BeginFeature: *CustomStringOption True\n"
"(value\\0502\\051)\n"
"(value 1)\n"
"StringOption=Custom\n"
"%%EndFeature\n"
"} stopped cleartomark\n";
@@ -149,8 +152,9 @@ main(int argc, /* I - Number of command-line arguments */
if (s)
free(s);
fputs("ppdEmitString (custom size): ", stdout);
fputs("ppdEmitString (custom size and string): ", stdout);
ppdMarkOption(ppd, "PageSize", "Custom.400x500");
ppdMarkOption(ppd, "StringOption", "{String1=\"value 1\" String2=value(2)}");
if ((s = ppdEmitString(ppd, PPD_ORDER_ANY, 0.0)) != NULL &&
!strcmp(s, custom_code))
+28 -3
Ver Arquivo
@@ -504,7 +504,7 @@ cupsGetJobs2(http_t *http, /* I - HTTP connection */
}
}
else
strcpy(uri, "ipp://localhost/jobs");
strcpy(uri, "ipp://localhost/");
/*
@@ -772,7 +772,7 @@ cupsGetPPD2(http_t *http, /* I - HTTP connection */
resource, sizeof(resource), 0))
return (NULL);
DEBUG_printf(("Printer hostname=\"%s\", port=%d\n", hostname, port));
DEBUG_printf(("cupsGetPPD3: Printer hostname=\"%s\", port=%d\n", hostname, port));
/*
* Remap local hostname to localhost...
@@ -1253,6 +1253,21 @@ cupsPrintFiles2(http_t *http, /* I - HTTP connection */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,
title);
if (num_files == 1)
{
/*
* Add the original document filename...
*/
if ((base = strrchr(files[0], '/')) != NULL)
base ++;
else
base = files[0];
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "document-name",
NULL, base);
}
/*
* Then add all options...
*/
@@ -1611,6 +1626,16 @@ cups_get_printer_uri(
host, hostsize, port, resource, resourcesize);
ippDelete(response);
if (!strncmp(resource, "/classes/", 9))
{
_cupsSetError(IPP_INTERNAL_ERROR, _("No printer-uri found for class!"));
*host = '\0';
*resource = '\0';
return (0);
}
return (1);
}
@@ -1618,7 +1643,7 @@ cups_get_printer_uri(
}
if (cupsLastError() != IPP_NOT_FOUND)
_cupsSetError(IPP_INTERNAL_ERROR, "No printer-uri found!");
_cupsSetError(IPP_INTERNAL_ERROR, _("No printer-uri found!"));
*host = '\0';
*resource = '\0';
+1
Ver Arquivo
@@ -47,6 +47,7 @@ CHARMAPS = \
iso-8859-7.txt \
iso-8859-8.txt \
iso-8859-9.txt \
jis-x0213.txt \
koi8-r.txt \
koi8-u.txt \
mac-roman.txt \
+7038
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+8 -8
Ver Arquivo
@@ -6,7 +6,7 @@
%%DocumentSuppliedResources: procset testprint/1.3
%%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman
%%Creator: Michael Sweet, Apple Inc.
%%CreationDate: D:20070606214000+0500
%%CreationDate: D:20090113092400+0800
%%Title: Test Page
%%EndComments
%%BeginProlog
@@ -14,7 +14,7 @@
%
% PostScript test page for the Common UNIX Printing System ("CUPS").
%
% Copyright 2007-2008 Apple Inc.
% Copyright 2007-2009 Apple Inc.
% Copyright 1993-2007 Easy Software Products
%
% These coded instructions, statements, and computer programs are the
@@ -565,18 +565,18 @@ gsave
% Draw the copyright notice at the bottom...
pageWidth 17 mul % Center of page
pageHeight 10 mul % Bottom of page
pageHeight 9.5 mul % Bottom of page
moveto % Position text
(Printed Using CUPS v1.3.x) show
(Printed with CUPS v1.3.x) show
pageWidth 17 mul % Left side of page
pageHeight 8 mul % Move down...
pageHeight 7.5 mul % Move down...
2 copy moveto % Position text
smallFont setfont % Font
(Copyright 2007-2008 Apple Inc., All Rights Reserved. CUPS and the CUPS logo are the) show
(Copyright 2007-2009 Apple Inc., All Rights Reserved. CUPS and the CUPS logo are) show
pageHeight 2 add sub % Move down...
2 copy moveto % Position text
(trademark property of Apple Inc., 1 Infinite Loop, Cupertino, CA 95014, USA.) show
(the trademark property of Apple Inc., 1 Infinite Loop, Cupertino, CA 95014, USA.) show
pageHeight 2 mul 4 add sub % Move down...
moveto % Position text
(Need help? Contact your operating system vendor or visit "http://www.cups.org/".) show
@@ -593,6 +593,6 @@ gsave
grestore
showpage
%
% End of "$Id: testprint.ps 7158 2008-01-02 21:23:11Z mike $".
% End of "$Id: testprint.ps 8236 2009-01-13 17:27:16Z mike $".
%
%%EOF
+7 -7
Ver Arquivo
@@ -26,14 +26,14 @@ charset utf8
# printing.
#
0000 00FF ltor single Courier Courier-Bold Courier-Italic Courier-Bold-Italic
0100 01FF ltor single Courier Courier-Bold Courier-Italic Courier-Bold-Italic
0200 02FF ltor single Courier Courier-Bold Courier-Italic Courier-Bold-Italic
0000 00FF ltor single Courier Courier-Bold Courier-Oblique Courier-BoldOblique
0100 01FF ltor single Courier Courier-Bold Courier-Oblique Courier-BoldOblique
0200 02FF ltor single Courier Courier-Bold Courier-Oblique Courier-BoldOblique
0300 03FF ltor single Symbol
0400 04FF ltor single Courier Courier-Bold Courier-Italic Courier-Bold-Italic
0400 04FF ltor single Courier Courier-Bold Courier-Oblique Courier-BoldOblique
0500 05FF rtol single Courier
1E00 1EFF ltor single Courier Courier-Bold Courier-Italic Courier-Bold-Italic
2000 20FF ltor single Courier Courier-Bold Courier-Italic Courier-Bold-Italic
2100 21FF ltor single Courier Courier-Bold Courier-Italic Courier-Bold-Italic
1E00 1EFF ltor single Courier Courier-Bold Courier-Oblique Courier-BoldOblique
2000 20FF ltor single Courier Courier-Bold Courier-Oblique Courier-BoldOblique
2100 21FF ltor single Courier Courier-Bold Courier-Oblique Courier-BoldOblique
2200 22FF ltor single Symbol
2300 23FF ltor single Symbol
+25 -28
Ver Arquivo
@@ -1,36 +1,33 @@
[Desktop Entry]
Categories=Application;System;X-Red-Hat-Base;
Encoding=UTF-8
Categories=System;Printing;HardwareSettings;X-Red-Hat-Base;
Exec=htmlview http://localhost:631/
GenericName=
Icon=cups
MimeType=
Path=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
Name=Manage Printing
Comment=CUPS Web Interface
Name[en_US]=Manage Printing
Comment[en_US]=CUPS Web Interface
Name[es]=Administrar impresión
Comment[es]=Interfaz Web de CUPS
Name[et]=Trükkimise haldur
Comment[et]=CUPS-i veebiliides
Name[fr]=Gestionnaire d'impression
Comment[fr]=Interface Web de CUPS
Name[pl]=Zarządzanie drukowaniem
Comment[pl]=Interfejs WWW CUPS
Name[it]=Gestione stampa
Comment[it]=Interfaccia web di CUPS
Name[he]=נהל הדפסות
Comment[he]=ממשק דפדפן של CUPS
Name[zh_TW]=
Comment[zh_TW]=CUPS
Name[de]=Druckerverwaltung
Comment[de]=CUPS Webinterface
Name[de.UTF-8]=Druckerverwaltung
Comment[de.UTF-8]=CUPS Webinterface
Name[en_US.UTF-8]=Manage Printing
Comment[en_US.UTF-8]=CUPS Web Interface
Name[es.UTF-8]=Administrar impresión
Comment[es.UTF-8]=Interfaz Web de CUPS
Name[et.UTF-8]=Trükkimise haldur
Comment[et.UTF-8]=CUPS-i veebiliides
Name[fr.UTF-8]=Gestionnaire d'impression
Comment[fr.UTF-8]=Interface Web de CUPS
Name[he.UTF-8]=נהל הדפסות
Comment[he.UTF-8]=ממשק דפדפן של CUPS
Name[id.UTF-8]=Manajemen Pencetakan
Comment[id.UTF-8]=Antarmuka Web CUPS
Name[it.UTF-8]=Gestione stampa
Comment[it.UTF-8]=Interfaccia web di CUPS
Name[ja.UTF-8]=
Comment[ja.UTF-8]=CUPS Web
Name[pl.UTF-8]=Zarządzanie drukowaniem
Comment[pl.UTF-8]=Interfejs WWW CUPS
Name[zh.UTF-8]=
Comment[zh.UTF-8]=CUPS
Name[zh_TW.UTF-8]=
Comment[zh_TW.UTF-8]=CUPS
+3 -3
Ver Arquivo
@@ -114,9 +114,9 @@ Unterst&uuml;tzung zu erhalten:</P>
WIDTH="15" HEIGHT="15" ALT=""></TD>
<TD COLSPAN="2" WIDTH="100%" STYLE="padding: 5;">
<P><SMALL>Das Common UNIX Printing System, CUPS, und das CUPS Logo sind
eingetragene Warenzeichen der <A HREF="http://www.apple.com">Apple Inc.</A>
CUPS ist urheberrechtlich gesch&uuml;tzt 2007 von Apple Inc, alle Rechte vorbehalten.</SMALL></P>
<P><SMALL>CUPS and the CUPS logo are trademarks of
<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2009
Apple Inc. All rights reserved.</SMALL></P>
</TD>
+3 -4
Ver Arquivo
@@ -117,10 +117,9 @@ y asistencia:</P>
WIDTH="15" HEIGHT="15" ALT=""></TD>
<TD COLSPAN="2" WIDTH="100%" STYLE="padding: 5;">
<P><SMALL>Common UNIX Printing System, CUPS, y el logo de CUPS son
marcas registradas de <A HREF="http://www.apple.com">Apple Inc.</A>
Los derechos de copia de CUPS 2007 son de Apple Inc.
Todos los derechos reservados.</SMALL></P>
<P><SMALL>CUPS and the CUPS logo are trademarks of
<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2009
Apple Inc. All rights reserved.</SMALL></P>
</TD>
+3 -3
Ver Arquivo
@@ -113,9 +113,9 @@ ametlikku veebilehekülge:</P>
WIDTH="15" HEIGHT="15" ALT=""></TD>
<TD COLSPAN="2" WIDTH="100%" STYLE="padding: 5;">
<P><SMALL>Common UNIX Printing System, CUPS ja CUPS-i logo on
firma <A HREF="http://www.apple.com">Apple Inc.</A> kaubamärgid. CUPS-i autoriõigus 2007: Apple Inc,
kõik õigused kaitstud.</SMALL></P>
<P><SMALL>CUPS and the CUPS logo are trademarks of
<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2009
Apple Inc. All rights reserved.</SMALL></P>
</TD>
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.2 KiB

+3 -4
Ver Arquivo
@@ -111,10 +111,9 @@ autre assistance:</P>
WIDTH="15" HEIGHT="15" ALT=""></TD>
<TD COLSPAN="2" WIDTH="100%" STYLE="padding: 5;">
<P><SMALL>Le logiciel CUPS ( Common UNIX Printing System ) et son logo sont
propriété commerciale de <A HREF="http://www.apple.com">Apple Inc.</A> CUPS
est sous copyright 2007 par Apple Inc, Tous
Droits Réservés.</SMALL></P>
<P><SMALL>CUPS and the CUPS logo are trademarks of
<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2009
Apple Inc. All rights reserved.</SMALL></P>
</TD>
+3 -3
Ver Arquivo
@@ -108,9 +108,9 @@ dir=ltr>Internet Printing Protocol ("IPP")</A> כבסיס לניהול
WIDTH="15" HEIGHT="15" ALT=""></TD>
<TD COLSPAN="2" WIDTH="100%" STYLE="padding: 5;" dir=ltr>
<P><SMALL>The Common UNIX Printing System, CUPS, and the CUPS logo are the
trademark property of <A HREF="http://www.apple.com">Apple Inc.</A>
CUPS is copyright 2007 by Apple Inc, All Rights Reserved.</SMALL></P>
<P><SMALL>CUPS and the CUPS logo are trademarks of
<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2009
Apple Inc. All rights reserved.</SMALL></P>
</TD>
+16 -14
Ver Arquivo
@@ -5,7 +5,7 @@
</HEAD>
<BODY>
<P ALIGN="CENTER">Copyright 2007 by Apple Inc.<BR>
<P ALIGN="CENTER">Copyright 2007-2009 by Apple Inc.<BR>
1 Infinite Loop<BR>
Cupertino, CA 95014 USA<BR>
<BR>
@@ -13,12 +13,10 @@ WWW: <A HREF="http://www.cups.org/">http://www.cups.org/</A>
<H2 CLASS="title"><A NAME="INTRO">Introduction</A></H2>
<P>The Common UNIX Printing System<SUP>TM</SUP>,
("CUPS<SUP>TM</SUP>"), is provided under the GNU General Public
License ("GPL") and GNU Library General Public License ("LGPL"),
Version 2, with exceptions for Apple operating systems and the
OpenSSL toolkit. A copy of the exceptions and licenses follow
this introduction.</P>
<P>CUPS<SUP>TM</SUP> is provided under the GNU General Public License ("GPL")
and GNU Library General Public License ("LGPL"), Version 2, with exceptions for
Apple operating systems and the OpenSSL toolkit. A copy of the exceptions and
licenses follow this introduction.</P>
<P>The GNU LGPL applies to the CUPS and CUPS Imaging libraries
located in the "cups" and "filter" subdirectories of the CUPS
@@ -172,13 +170,17 @@ restrictions:</P>
<H2 CLASS="title"><A NAME="TRADEMARKS">Trademarks</A></H2>
<P>Apple Inc. has trademarked the Common UNIX
Printing System, CUPS, and CUPS logo. You may use these names and
logos in any direct port or binary distribution of CUPS. Please
contact Apple Inc. for written permission to use them
in derivative products. Our intention is to protect the value of
these trademarks and ensure that any derivative product meets the
same high-quality standards as the original.</P>
<P>CUPS and the CUPS logo (the "CUPS Marks") are trademarks of Apple Inc. Apple
grants you a non-exclusive and non-transferable right to use the CUPS Marks in
any direct port or binary distribution incorporating CUPS software and in any
promotional material therefor. You agree that your products will meet the
highest levels of quality and integrity for similar goods, not be unlawful, and
be developed, manufactured, and distributed in compliance with this license.
You will not interfere with Apple's rights in the CUPS Marks, and all use of the
CUPS Marks shall inure to the benefit of Apple. This license does not apply to
use of the CUPS Marks in a derivative products, which requires prior written
permission from Apple Inc.</P>
<H2 CLASS="title"><A NAME="GPL">GNU GENERAL PUBLIC LICENSE</A></H2>
+8
Ver Arquivo
@@ -165,8 +165,11 @@ ipp://<i>ip-address-or-hostname</i>:<i>port-number</i>/<i>resource</i>?<i>option
<PRE>
lpd://<i>ip-address-or-hostname</i>/<i>queue</i>
lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>
lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value</i>
lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value</i>
lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option=value</i>
lpd://<i>username@ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option=value</i>
</PRE>
<P><A HREF="#TABLE3">Table 3</A> summarizes the options supported by the <tt>lpd</tt> backend.</P>
@@ -352,6 +355,11 @@ lpd://<i>ip-address-or-hostname</i>/<i>queue</i>?<i>option=value&option=value</i
<TD>Kodak&reg;</TD>
<TD>lpd://<I>address</I>/ps</TD>
</TR>
<TR>
<TD>Netgear WGPS606</TD>
<TD>lpd://<I>address</I>/L1<BR>
lpd://<I>address</I>/L2</TD>
</TR>
<TR>
<TD>QMS&reg; CrownNet<SUP>TM</SUP></TD>
<TD>lpd://<I>address</I>/ps</TD>
+9
Ver Arquivo
@@ -440,6 +440,15 @@ of the order of the pages in the <CODE>page-ranges</CODE> option.
<P>The default is to print all pages.
<blockquote><b>Note:</b>
<p>The page numbers used by <code>page-ranges</code> refer to the output
pages and not the document's page numbers. Options like <code>number-up</code>
can make the output page numbering not match the document page numbers.</p>
</blockquote>
<H3><A NAME="PAGESET">Selecting Even or Odd Pages</A></H3>
<P>Use the <CODE>-o page-set=set</CODE> option to select the even or odd pages:</P>
+33 -2
Ver Arquivo
@@ -988,7 +988,7 @@ printers are shared (published) by default. The default is
<H3>Description</H3>
<P>The <CODE>Deny</CODE> directive specifies a hostname, IP
address, or network that is allowed access to the server.
address, or network that is denied access to the server.
<CODE>Deny</CODE> directives are cummulative, so multiple
<CODE>Deny</CODE> directives can be used to allow access for
multiple hosts or networks. The <CODE>/mm</CODE> notation
@@ -2378,7 +2378,7 @@ authentication is required for the resource. The
must be a member of one or more of the named groups that
follow.</P>
<P>The <CODE>user</CODE> keyboard specifies that the
<P>The <CODE>user</CODE> keyword specifies that the
authenticated user must be one of the named users or groups that
follow. Group names are specified using the "@" prefix.</P>
@@ -2477,6 +2477,37 @@ administrator email address is <CODE>root@server</CODE>, where
HREF="#ServerName"><CODE>ServerName</CODE></A>.</P>
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.3.10</SPAN><A NAME="ServerAlias">ServerAlias</A></H2>
<H3>Examples</H3>
<PRE CLASS="command">
ServerAlias althost
ServerAlias althost.foo.com
ServerAlias althost.bar.com
ServerAlias *
</PRE>
<H3>Description</H3>
<P>The <CODE>ServerAlias</CODE> directive specifies alternate names that the
server is known by. By default it contains a list of all aliases associated
with the <A HREF="#ServerName"><CODE>ServerName</CODE></A>. The special name
"*" can be used to allow any hostname when accessing CUPS via an external
network interfaces.</P>
<BLOCKQUOTE><B>Note</B>
<P>The <CODE>ServerAlias</CODE> directive is used for HTTP Host header
validation when clients connect to the scheduler from external interfaces.
Using the special name "*" can expose your system to known browser-based
DNS rebinding attacks, even when accessing sites through a firewall. If the
auto-discovery of alternate names does not work, we recommend listing each
alternate name with a ServerAlias directive instead of using "*".</P>
</BLOCKQUOTE>
<H2 CLASS="title"><A NAME="ServerBin">ServerBin</A></H2>
<H3>Examples</H3>
+4 -14
Ver Arquivo
@@ -16,20 +16,10 @@
Copyright 1997-2006 by Easy Software Products.
These coded instructions, statements, and computer programs are the
property of Easy Software Products and are protected by Federal
copyright law. Distribution and use rights are outlined in the file
"LICENSE.txt" which should have been included with this file. If this
file is missing or damaged please contact Easy Software Products
at:
Attn: CUPS Licensing Information
Easy Software Products
44141 Airport View Drive, Suite 204
Hollywood, Maryland 20636 USA
Voice: (301) 373-9600
EMail: cups-info@cups.org
WWW: http://www.cups.org
property of Apple Inc. and are protected by Federal copyright
law. Distribution and use rights are outlined in the file "LICENSE.txt"
which should have been included with this file. If this file is
file is missing or damaged, see the license at "http://www.cups.org/".
-->
<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
+27 -26
Ver Arquivo
@@ -15,20 +15,10 @@
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
copyright law. Distribution and use rights are outlined in the file
"LICENSE.txt" which should have been included with this file. If this
file is missing or damaged please contact Easy Software Products
at:
Attn: CUPS Licensing Information
Easy Software Products
44141 Airport View Drive, Suite 204
Hollywood, Maryland 20636 USA
Voice: (301) 373-9600
EMail: cups-info@cups.org
WWW: http://www.cups.org
property of Apple Inc. and are protected by Federal copyright
law. Distribution and use rights are outlined in the file "LICENSE.txt"
which should have been included with this file. If this file is
file is missing or damaged, see the license at "http://www.cups.org/".
-->
<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
@@ -442,7 +432,7 @@ Response:
<dd>The required authentication information.
</dl
</dl>
<h3 class='title'><span class='info'>CUPS 1.1</span><a name='CREATE_JOB'>Create-Job Operation</a></h3>
@@ -547,7 +537,7 @@ Create-Job Response:
<dd>The required authentication information.
</dl
</dl>
<h3 class='title'><span class='info'>CUPS 1.1</span><a name='SET_JOB_ATTRIBUTES'>Set-Job-Attributes Operation</a></h3>
@@ -803,16 +793,16 @@ CUPS-Get-Printers request:
attributes as described in section 3.1.4.1 of the IPP Model and
Semantics document.
<dt>"first-printer-name" (name(127)):<span class='info'>CUPS 1.2</span>
<dd>The client OPTIONALLY supplies this attribute to
select the first printer that is returned.
<dt>"limit" (integer (1:MAX)):
<dd>The client OPTIONALLY supplies this attribute limiting the
number of printers that are returned.
<dt>"printer-info" (text(127)):<span class='info'>CUPS 1.1</span>
<dd>The client OPTIONALLY supplies this attribute to
select which printers are returned.
<dt>"printer-location" (text(127)): <span class='info'>CUPS 1.1.7</span>
<dd>The client OPTIONALLY supplies this attribute to
@@ -837,6 +827,11 @@ CUPS-Get-Printers request:
responds as if this attribute had been supplied with a value of
'all'.
<dt>"requested-user-name" (name(127)) : <span class='info'>CUPS 1.2</span>
<dd>The client OPTIONALLY supplies a user name that is used to filter
the returned printers.
</dl>
<h4>CUPS-Get-Printers Response</h4>
@@ -1062,15 +1057,16 @@ CUPS-Get-Classes request:
attributes as described in section 3.1.4.1 of the IPP Model and
Semantics document.
<dt>"first-printer-name" (name(127)):<span class='info'>CUPS 1.2</span>
<dd>The client OPTIONALLY supplies this attribute to
select the first printer that is returned.
<dt>"limit" (integer (1:MAX)):
<dd>The client OPTIONALLY supplies this attribute limiting the
number of printer classes that are returned.
<dt>"printer-info" (text(127)): <span class='info'>CUPS 1.1.7</span>
<dd>The client OPTIONALLY supplies this attribute to
select which printer classes are returned.
<dt>"printer-location" (text(127)): <span class='info'>CUPS 1.1.7</span>
<dd>The client OPTIONALLY supplies this attribute to
select which printer classes are returned.
@@ -1091,6 +1087,11 @@ CUPS-Get-Classes request:
interested. If the client omits this attribute, the server responds as
if this attribute had been supplied with a value of 'all'.
<dt>"requested-user-name" (name(127)) : <span class='info'>CUPS 1.2</span>
<dd>The client OPTIONALLY supplies a user name that is used to filter
the returned printers.
</dl>
<h4>CUPS-Get-Classes Response</h4>
@@ -1714,7 +1715,7 @@ CUPS-Authenticate-Job Response:
<dd>The required authentication information.
</dl
</dl>
<h3 class='title'><span class='info'>CUPS 1.3</span><a name='CUPS_GET_PPD'>CUPS-Get-PPD Operation</a></h3>
+56 -30
Ver Arquivo
@@ -12,23 +12,14 @@
CUPS PostScript file specification for the Common UNIX Printing System (CUPS).
Copyright 2007-2008 by Apple Inc.
Copyright 2006 by Easy Software Products.
These coded instructions, statements, and computer programs are the
property of Easy Software Products and are protected by Federal
copyright law. Distribution and use rights are outlined in the file
"LICENSE.txt" which should have been included with this file. If this
file is missing or damaged please contact Easy Software Products
at:
Attn: CUPS Licensing Information
Easy Software Products
44141 Airport View Drive, Suite 204
Hollywood, Maryland 20636 USA
Voice: (301) 373-9600
EMail: cups-info@cups.org
WWW: http://www.cups.org
property of Apple Inc. and are protected by Federal copyright
law. Distribution and use rights are outlined in the file "LICENSE.txt"
which should have been included with this file. If this file is
file is missing or damaged, see the license at "http://www.cups.org/".
-->
<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
@@ -46,16 +37,16 @@ output will work reliably.</p>
defacto-standard print job file format/language for UNIX-based
applications, it is slowly being phased out in favor of Adobe's
Portable Document Format ("PDF") which offers many advantages
over PostScript. MacOS X uses PDF as the primary print job file
format, and we expect Linux to soon follow. Both PostScript and
over PostScript. Mac OS X uses PDF as the primary print job file
format and Linux is making the transition. Both PostScript and
PDF are complex formats, and we highly recommend using high-level
toolkits whenever possible.</blockquote>
toolkits whenever possible to create your print jobs.</blockquote>
<h3>Anatomy of a PostScript File</h3>
<p>PostScript files are ASCII text files starting with a header
line (<tt>%!PS-Adobe-3.0</tt>) followed by a combination of
comment lines starting with two percent signs (<tt>%%</tt>) and
comment lines starting with the percent sign (<tt>%</tt>) and
PostScript code lines. The lines themselves should not exceed 255
characters to conform to the DSC. The following short PostScript
file produces a box with a smiley face in it:</p>
@@ -66,7 +57,13 @@ file produces a box with a smiley face in it:</p>
%%Pages: 1
%%LanguageLevel: 2
%%EndComments
%%BeginSetup
% this is where fonts would be embedded
%%EndSetup
%%Page: (1) 1
%%BeginPageSetup
% this is where page-specific features would be specified
%%EndPageSetup
% Draw a black box around the page
0 setgray
1 setlinewidth
@@ -98,23 +95,52 @@ width="445" height="570" alt="Sample PostScript File Output"></td></tr>
</table></div>
<h2>Embedding Printer Options</h2>
<h2><a name='OPTIONS'>Embedding Printer Options</a></h2>
<p>There are two main strategies for embedding printer options in PostScript
files. The first is to list CUPS options using the <code>%cupsJobTicket</code>
comment:</p>
<pre>
%!PS-Adobe-3.0
%cupsJobTicket: media=A4 sides=two-sided-long-edge
%cupsJobTicket: PrinterOption=foo PrinterOption2=bar
...
%%EndComments
</pre>
<p>CUPS options apply to the entire job. To apply options to individual pages,
use the <code>%%IncludeFeature</code> comment instead:</p>
<pre>
%%Page: label 123
%%BeginPageSetup
%%IncludeFeature: *PageSize A4
%%IncludeFeature: *PrinterOption Foo
%%IncludeFeature: *PrinterOption2 Bar
%%EndPageSetup
...
</pre>
<h2>Embedding Fonts and Text</h2>
<h2><a name='FONTS'>Embedding Fonts and Text</a></h2>
<p>Always embed the fonts used by your print job, and for best performance
embed the fonts and character encodings in the setup section of the PostScript
file. Type 1 and Type 3 fonts are supported by all PostScript printers, while
Type 42 (TrueType) and CID fonts are supported by most level 2 and all level 3
PostScript printers. Binary font files should always be converted to the
corresponding ASCII (hex) encoding to avoid problems when printing over
interfaces that do not support binary PostScript.</p>
<h2>Embedding Images</h2>
<blockquote><b>Note:</b> While some printers support arbitrary
binary data in PostScript files, we do not recommend this
practice because it does not work with all printers or
interfaces. In most cases, the Base-85 encoding and compression
filters can be used to embed images with very little, if any,
increase in data size.</blockquote>
<h2><a name='IMAGES'>Embedding Images</a></h2>
<p>The <code>image</code> operator should be used to embed images in PostScript
files. Always use ASCII hex or Base-85 encoding for the image data to avoid
problems when printing over interfaces that do not support binary PostScript.
In most cases, the Base-85 encoding and compression filters can be used to
embed images with very little, if any, increase in data size.</p>
</body>
</html>
+35 -30
Ver Arquivo
@@ -8,11 +8,11 @@
</head>
<body>
<!--
"$Id: spec-ppd.html 7273 2008-01-30 19:21:55Z mike $"
"$Id: spec-ppd.html 8079 2008-10-23 22:18:13Z mike $"
CUPS PPD extensions specification for the Common UNIX Printing System (CUPS).
Copyright 2007 by Apple Inc.
Copyright 2007-2008 by Apple Inc.
Copyright 1997-2007 by Easy Software Products.
These coded instructions, statements, and computer programs are the
@@ -1185,13 +1185,27 @@ text:for%20all%20good%20men%20to%20come%20to%20the%20aid%20of%20their%20country.
*cupsIPPReason com.vendor-error/A serious error occurred: "http://www.vendor.com/help"
<em>*% Map com.vendor-error to text and a local, Apple help book, and remote page</em>
*APHelpBook: "file:///Library/Printers/vendor/Help/filename"
*APHelpBook: "file:///Library/Printers/vendor/Help.bundle"
*cupsIPPReason com.vendor-error/A serious error occurred: "/help/com.vendor/error.html
help:anchor='com.vendor-error'%20bookID=Vendor%20Help
http://www.vendor.com/help"
*End
</pre>
<h3><span class='info'>CUPS 1.4</span><a name='cupsMarkerName'>cupsMarkerName</a></h3>
<p class='summary'>*cupsMarkerName/Name Text: ""</p>
<p>This optional attribute maps <code>marker-names</code> strings that are
generated by the driver to human readable text.</p>
<p>Examples:</p>
<pre class='command'>
<em>*% Map cyanToner to "Cyan Toner"</em>
*cupsMarkerName cyanToner/Cyan Toner: ""
</pre>
<h3><span class='info'>CUPS 1.2</span><a name='cupsLanguages'>cupsLanguages</a></h3>
<p class='summary'>*cupsLanguages: "locale list"</p>
@@ -1322,21 +1336,6 @@ PPD file extensions was used. Currently it must be the string
<h2 class='title'><a name='MACOSX'>Mac OS X Attributes</a></h2>
<h3><a name='APBookFile'>APBookFile</a></h3>
<p class='summary'>*APBookFile: "file URL"</p>
<p>This string attribute specifies the Apple help book file to use when
looking up IPP reason codes for this printer driver. The
<a href='#cupsIPPReason'><tt>cupsIPPReason</tt></a> attribute maps
"help" URIs to this file.</p>
<p>Example:</p>
<pre class='command'>
*APBookFile: "file:///Library/Printers/vendor/Help/filename"
</pre>
<h3><span class='info'>Mac OS X 10.3</span><a name='APDialogExtension'>APDialogExtension</a></h3>
<p class='summary'>*APDialogExtension: "/Library/Printers/vendor/filename.plugin"</p>
@@ -1445,27 +1444,33 @@ and the <tt>Tumble</tt> page attribute.</p>
<p>Also see the related <a href='#cupsBackSide'><tt>cupsBackSide</tt></a>
attribute.</p>
<h3><a name='APHelpBook'>APHelpBook</a></h3>
<p class='summary'>*APHelpBook: "bundle URL"</p>
<p>This string attribute specifies the Apple help book bundle to use when
looking up IPP reason codes for this printer driver. The
<a href='#cupsIPPReason'><tt>cupsIPPReason</tt></a> attribute maps
"help" URIs to this file.</p>
<p>Example:</p>
<pre class='command'>
*APHelpBook: "file:///Library/Printers/vendor/Help.bundle"
</pre>
<h3><span class='info'>Mac OS X 10.3</span><a name='APPrinterIconPath'>APPrinterIconPath</a></h3>
<p class='summary'>*APPrinterIconPath: "/Library/Printers/vendor/filename"</p>
<p class='summary'>*APPrinterIconPath: "/Library/Printers/vendor/filename.icns"</p>
<p>This attribute defines the location of a printer icon file to use when
displaying the printer.</p>
displaying the printer. The file must be in the Apple icon format.</p>
<p>Examples:</p>
<pre class='command'>
*% Apple icon file
*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.icns"
*% TIFF icon file
*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.tiff"
*% PNG icon file
*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.png"
*% JPEG icon file
*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.jpg"
</pre>
<h3><span class='info'>Mac OS X 10.4</span><a name='APPrinterLowInkTool'>APPrinterLowInkTool</a></h3>
@@ -1620,7 +1625,7 @@ the device.</p>
<li>Added custom option values support</li>
<li>Added <tt>APBookFile</tt> attribute</li>
<li>Added <tt>APHelpBook</tt> attribute</li>
<li>Added <tt>APDuplexRequiresFlippedMargin</tt> attribute</li>
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: 2.2 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 2.0 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 2.1 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.8 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 2.0 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 2.1 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 1.8 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 2.3 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 2.2 KiB

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